DRAGONS: Fixed bugs in first mini game. It should be winable now
This commit is contained in:
parent
c91c21bf89
commit
4a0a4ee1af
5 changed files with 43 additions and 2 deletions
|
@ -872,7 +872,7 @@ void Minigame1::run() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((local_252 == 2) && (gameState == 6)) {
|
if ((local_252 == 2) && (gameState == 6)) {
|
||||||
_vm->getINI(DAT_80063a40)->actorResourceId = 2;
|
_vm->getINI(DAT_80063a40 - 1)->field_14 = 2;
|
||||||
if (local_250 != 0) {
|
if (local_250 != 0) {
|
||||||
_vm->_talk->FUN_8001a7c4_clearDialogBoxMaybe();
|
_vm->_talk->FUN_8001a7c4_clearDialogBoxMaybe();
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,7 +123,7 @@ void ScriptOpcodes::initOpcodes() {
|
||||||
OPCODE(0x1E, opUnk1ESetActorFlag0x400);
|
OPCODE(0x1E, opUnk1ESetActorFlag0x400);
|
||||||
OPCODE(0x1F, opPlayMusic);
|
OPCODE(0x1F, opPlayMusic);
|
||||||
OPCODE(0x20, opUnk20);
|
OPCODE(0x20, opUnk20);
|
||||||
|
OPCODE(0x21, opUnk21);
|
||||||
OPCODE(0x22, opCodeActorTalk);
|
OPCODE(0x22, opCodeActorTalk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -439,6 +439,15 @@ void ScriptOpcodes::opUnk20(ScriptOpCall &scriptOpCall) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScriptOpcodes::opUnk21(ScriptOpCall &scriptOpCall) {
|
||||||
|
ARG_INT16(field0);
|
||||||
|
ARG_UINT32(textIndex);
|
||||||
|
|
||||||
|
if (scriptOpCall._field8 == 0) {
|
||||||
|
//TODO play dialog audio without text on screen.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool ScriptOpcodes::checkPropertyFlag(ScriptOpCall &scriptOpCall) {
|
bool ScriptOpcodes::checkPropertyFlag(ScriptOpCall &scriptOpCall) {
|
||||||
byte *codePtrOffsetA = scriptOpCall._code + 0xA;
|
byte *codePtrOffsetA = scriptOpCall._code + 0xA;
|
||||||
byte *codePtrOffset2 = scriptOpCall._code + 2;
|
byte *codePtrOffset2 = scriptOpCall._code + 2;
|
||||||
|
|
|
@ -114,6 +114,7 @@ protected:
|
||||||
void opSetActorFlag0x1000(ScriptOpCall &scriptOpCall);
|
void opSetActorFlag0x1000(ScriptOpCall &scriptOpCall);
|
||||||
void opPlayMusic(ScriptOpCall &scriptOpCall);
|
void opPlayMusic(ScriptOpCall &scriptOpCall);
|
||||||
void opUnk20(ScriptOpCall &scriptOpCall);
|
void opUnk20(ScriptOpCall &scriptOpCall);
|
||||||
|
void opUnk21(ScriptOpCall &scriptOpCall);
|
||||||
|
|
||||||
bool checkPropertyFlag(ScriptOpCall &scriptOpCall);
|
bool checkPropertyFlag(ScriptOpCall &scriptOpCall);
|
||||||
void opCode_UnkA_setsProperty(ScriptOpCall &scriptOpCall);
|
void opCode_UnkA_setsProperty(ScriptOpCall &scriptOpCall);
|
||||||
|
|
|
@ -128,9 +128,15 @@ void SpecialOpcodes::initOpcodes() {
|
||||||
OPCODE(0x6b, spcTransitionToMap);
|
OPCODE(0x6b, spcTransitionToMap);
|
||||||
OPCODE(0x6c, spcTransitionFromMap);
|
OPCODE(0x6c, spcTransitionFromMap);
|
||||||
|
|
||||||
|
OPCODE(0x7a, spcBlackDragonDialogForCamelhot);
|
||||||
OPCODE(0x7b, spcSetCameraXToZero);
|
OPCODE(0x7b, spcSetCameraXToZero);
|
||||||
OPCODE(0x7c, spcDiamondIntroSequenceLogic);
|
OPCODE(0x7c, spcDiamondIntroSequenceLogic);
|
||||||
|
|
||||||
|
OPCODE(0x82, spc82CallResetDataMaybe);
|
||||||
|
|
||||||
|
OPCODE(0x89, spcSetUnkFlag2);
|
||||||
|
OPCODE(0x8a, spcClearUnkFlag2);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef OPCODE
|
#undef OPCODE
|
||||||
|
@ -332,6 +338,7 @@ void SpecialOpcodes::spcZigmondFraudSceneLogic1() {
|
||||||
|
|
||||||
void SpecialOpcodes::spcBlackDragonOnHillSceneLogic() {
|
void SpecialOpcodes::spcBlackDragonOnHillSceneLogic() {
|
||||||
//TODO
|
//TODO
|
||||||
|
sceneUpdater.sequenceID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpecialOpcodes::spcUnk4e() {
|
void SpecialOpcodes::spcUnk4e() {
|
||||||
|
@ -440,6 +447,12 @@ void SpecialOpcodes::panCamera(int16 mode) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SpecialOpcodes::spcBlackDragonDialogForCamelhot() {
|
||||||
|
uint16 buffer[1024];
|
||||||
|
_vm->_talk->loadText(0x30DD8, buffer, 1024); //TODO might need to check dialog in other game versions
|
||||||
|
_vm->_talk->displayDialogAroundPoint(buffer,0x27,0xc,0xc01,0,0x30DD8);
|
||||||
|
}
|
||||||
|
|
||||||
void SpecialOpcodes::spcSetCameraXToZero() {
|
void SpecialOpcodes::spcSetCameraXToZero() {
|
||||||
_vm->_scene->_camera.x = 0;
|
_vm->_scene->_camera.x = 0;
|
||||||
}
|
}
|
||||||
|
@ -450,6 +463,18 @@ void SpecialOpcodes::spcDiamondIntroSequenceLogic() {
|
||||||
delete cutScene;
|
delete cutScene;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SpecialOpcodes::spc82CallResetDataMaybe() {
|
||||||
|
//TODO callMaybeResetData();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SpecialOpcodes::spcSetUnkFlag2() {
|
||||||
|
_vm->setUnkFlags(ENGINE_UNK1_FLAG_2);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SpecialOpcodes::spcClearUnkFlag2() {
|
||||||
|
_vm->clearUnkFlags(ENGINE_UNK1_FLAG_2);
|
||||||
|
}
|
||||||
|
|
||||||
void SpecialOpcodes::spcLoadScene1() {
|
void SpecialOpcodes::spcLoadScene1() {
|
||||||
CutScene *cutScene = new CutScene(_vm);
|
CutScene *cutScene = new CutScene(_vm);
|
||||||
cutScene->scene1();
|
cutScene->scene1();
|
||||||
|
|
|
@ -127,9 +127,15 @@ protected:
|
||||||
void spcTransitionToMap(); // 0x6b
|
void spcTransitionToMap(); // 0x6b
|
||||||
void spcTransitionFromMap(); // 0x6c
|
void spcTransitionFromMap(); // 0x6c
|
||||||
|
|
||||||
|
void spcBlackDragonDialogForCamelhot(); // 0x7a
|
||||||
void spcSetCameraXToZero(); //0x7b
|
void spcSetCameraXToZero(); //0x7b
|
||||||
void spcDiamondIntroSequenceLogic(); //0x7c
|
void spcDiamondIntroSequenceLogic(); //0x7c
|
||||||
|
|
||||||
|
void spc82CallResetDataMaybe(); // 0x82
|
||||||
|
|
||||||
|
void spcSetUnkFlag2(); // 0x89
|
||||||
|
void spcClearUnkFlag2(); //0x8a
|
||||||
|
|
||||||
void setupTableBasedSceneUpdateFunction(uint16 initialCounter, uint16 numSequences, uint16 sequenceDuration);
|
void setupTableBasedSceneUpdateFunction(uint16 initialCounter, uint16 numSequences, uint16 sequenceDuration);
|
||||||
private:
|
private:
|
||||||
void panCamera(int16 mode);
|
void panCamera(int16 mode);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue