DRAGONS: Fixed bug when attempting some actions. More work on special
opcodes
This commit is contained in:
parent
52c0f285a0
commit
59b26b78f5
5 changed files with 34 additions and 6 deletions
|
@ -326,7 +326,7 @@ void DragonsEngine::gameLoop()
|
|||
}
|
||||
}
|
||||
|
||||
works_with_obd_data_1();
|
||||
performAction();
|
||||
if ((getCurrentSceneId() == 0x1d) && (getINI(0x179)->field_2 != 0))
|
||||
{
|
||||
clearFlags(ENGINE_FLAG_8);
|
||||
|
@ -956,7 +956,7 @@ void DragonsEngine::call_fade_related_1f() {
|
|||
fade_related(0x1f);
|
||||
}
|
||||
|
||||
void DragonsEngine::works_with_obd_data_1() {
|
||||
void DragonsEngine::performAction() {
|
||||
uint uVar1;
|
||||
ushort uVar2;
|
||||
uint uVar4;
|
||||
|
@ -987,9 +987,9 @@ void DragonsEngine::works_with_obd_data_1() {
|
|||
uVar4 = _cursor->executeScript(local_48, 1);
|
||||
if (_cursor->data_800728b0_cursor_seqID > 4) {
|
||||
_scriptOpcodes->_data_80071f5c = 0;
|
||||
_scriptOpcodes->_data_800728c0 = _cursor->data_80072890;
|
||||
|
||||
obd = _dragonOBD->getFromOpt(_scriptOpcodes->_data_800728c0 - 1);
|
||||
_scriptOpcodes->_data_800728c0 = _cursor->data_80072890;
|
||||
|
||||
local_38._code = obd + 8;
|
||||
local_38._codeEnd = local_38._code + READ_LE_UINT32(obd);
|
||||
|
|
|
@ -217,7 +217,7 @@ public:
|
|||
void fade_related(uint32 flags);
|
||||
|
||||
uint16 ipt_img_file_related();
|
||||
void works_with_obd_data_1();
|
||||
void performAction();
|
||||
|
||||
void reset_screen_maybe();
|
||||
|
||||
|
|
|
@ -319,7 +319,7 @@ void ScriptOpcodes::opUnk6(ScriptOpCall &scriptOpCall) {
|
|||
_vm->_cursor->data_800728b0_cursor_seqID = _vm->_cursor->_sequenceID;
|
||||
_vm->_cursor->data_80072890 = _vm->_cursor->_iniUnderCursor;
|
||||
// EnableVSyncEvent();
|
||||
_vm->works_with_obd_data_1();
|
||||
_vm->performAction();
|
||||
if (isEngineFlag8Set) {
|
||||
_vm->setFlags(ENGINE_FLAG_8);
|
||||
}
|
||||
|
@ -980,6 +980,8 @@ uint16 ScriptOpcodes::getINIField(uint32 iniIndex, uint16 fieldOffset) {
|
|||
case 0x16 : return ini->x;
|
||||
case 0x18 : return ini->y;
|
||||
case 0x1A : return ini->field_1a_flags_maybe;
|
||||
case 0x1C : return ini->field_1c;
|
||||
case 0x1E : return ini->field_1e;
|
||||
case 0x20 : return ini->field_20_actor_field_14;
|
||||
default: error("getINIField() Invalid fieldOffset 0x%X", fieldOffset);
|
||||
}
|
||||
|
@ -1000,6 +1002,8 @@ void ScriptOpcodes::setINIField(uint32 iniIndex, uint16 fieldOffset, uint16 valu
|
|||
case 0x16 : ini->x = value; break;
|
||||
case 0x18 : ini->y = value; break;
|
||||
case 0x1A : ini->field_1a_flags_maybe = value; break;
|
||||
case 0x1C : ini->field_1c = value; break;
|
||||
case 0x1E : ini->field_1e = value; break;
|
||||
case 0x20 : ini->field_20_actor_field_14 = value; break;
|
||||
default: error("setINIField() Invalid fieldOffset 0x%X", fieldOffset);
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ void SpecialOpcodes::initOpcodes() {
|
|||
|
||||
OPCODE(9, spcUnk9);
|
||||
OPCODE(0xa, spcUnkA);
|
||||
|
||||
OPCODE(0xb, clearSceneUpdateFunction);
|
||||
OPCODE(0xc, spcUnkC);
|
||||
|
||||
OPCODE(0x12, spcHandleInventionBookTransition);
|
||||
|
@ -79,6 +79,8 @@ void SpecialOpcodes::initOpcodes() {
|
|||
OPCODE(0x14, spcClearEngineFlag8);
|
||||
OPCODE(0x15, spcSetEngineFlag8);
|
||||
|
||||
OPCODE(0x18, clearSceneUpdateFunction);
|
||||
|
||||
OPCODE(0x1a, spcActivatePizzaMakerActor);
|
||||
OPCODE(0x1b, spcDeactivatePizzaMakerActor);
|
||||
OPCODE(0x1c, spcPizzaMakerActorStopWorking);
|
||||
|
@ -92,6 +94,9 @@ void SpecialOpcodes::initOpcodes() {
|
|||
|
||||
OPCODE(0x3b, spcSetEngineFlag0x2000000);
|
||||
OPCODE(0x3c, spcClearEngineFlag0x2000000);
|
||||
OPCODE(0x3d, clearSceneUpdateFunction);
|
||||
OPCODE(0x3e, spcZigmondFraudSceneLogic);
|
||||
OPCODE(0x3f, clearSceneUpdateFunction);
|
||||
|
||||
OPCODE(0x49, spcLoadScene1);
|
||||
|
||||
|
@ -228,6 +233,10 @@ void SpecialOpcodes::spcClearEngineFlag0x2000000() {
|
|||
_vm->clearFlags(Dragons::ENGINE_FLAG_2000000);
|
||||
}
|
||||
|
||||
void SpecialOpcodes::spcZigmondFraudSceneLogic() {
|
||||
//TODO
|
||||
}
|
||||
|
||||
void SpecialOpcodes::spcUnk4e() {
|
||||
panCamera(1);
|
||||
}
|
||||
|
@ -383,6 +392,17 @@ void SpecialOpcodes::pizzaMakerStopWorking() {
|
|||
}
|
||||
}
|
||||
|
||||
void SpecialOpcodes::clearSceneUpdateFunction() {
|
||||
//TODO
|
||||
// if (DAT_80083148 != DAT_80083154) {
|
||||
// FUN_8001ac5c((uint)DAT_80083148,(uint)DAT_80083150,(uint)DAT_80083154,(uint)DAT_80083158);
|
||||
// }
|
||||
// if (DAT_8006f3a4 != 0xffff) {
|
||||
// actor_update_sequenceID((uint)dragon_ini_pointer[(uint)DAT_80069630].actorId,DAT_8006f3a4);
|
||||
// }
|
||||
_vm->setSceneUpdateFunction(NULL);
|
||||
}
|
||||
|
||||
void pizzaUpdateFunction() {
|
||||
static int16 DAT_800634bc = 0;
|
||||
DragonsEngine *vm = getEngine();
|
||||
|
|
|
@ -76,6 +76,8 @@ protected:
|
|||
void spcSetEngineFlag0x2000000(); // 0x3b
|
||||
void spcClearEngineFlag0x2000000(); // 0x3c
|
||||
|
||||
void spcZigmondFraudSceneLogic(); // 0x3e
|
||||
|
||||
void spcLoadScene1(); // 0x49
|
||||
|
||||
void spcUnk4e();
|
||||
|
@ -102,6 +104,8 @@ private:
|
|||
void panCamera(int16 mode);
|
||||
void pizzaMakerStopWorking();
|
||||
|
||||
void clearSceneUpdateFunction();
|
||||
|
||||
};
|
||||
|
||||
// update functions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue