[Scummvm-git-logs] scummvm branch-2-2 -> e575967d781cd9afc190b34c164083b0204affeb
yuv422
yuv422 at users.noreply.github.com
Fri Sep 4 03:30:03 UTC 2020
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a159d341f7 DRAGONS: Fix initial display of rabbits under the hats in the mini game. Trac#11641
e575967d78 DRAGONS: Fixed crash on mini game 3 for non-english versions. Trac#11609
Commit: a159d341f734a8631c2ef43ef220f8294d61d1bf
https://github.com/scummvm/scummvm/commit/a159d341f734a8631c2ef43ef220f8294d61d1bf
Author: Eric Fry (yuv422 at users.noreply.github.com)
Date: 2020-09-04T13:29:15+10:00
Commit Message:
DRAGONS: Fix initial display of rabbits under the hats in the mini game. Trac#11641
Changed paths:
engines/dragons/minigame3.cpp
diff --git a/engines/dragons/minigame3.cpp b/engines/dragons/minigame3.cpp
index 06171470ef..2453797e8d 100644
--- a/engines/dragons/minigame3.cpp
+++ b/engines/dragons/minigame3.cpp
@@ -114,7 +114,6 @@ void Minigame3::run() {
uint16 local_1e = 0;
uint16 local_1c = 0;
uint16 local_1a = 0;
- int16 local_16;
int16 local_14;
InventoryState origInventoryType;
int16 local_10;
@@ -280,8 +279,8 @@ void Minigame3::run() {
goodRabbitPositionTbl[(int16)i] = 0;
i = i + 1;
}
- local_16 = _vm->getRand(4);
- goodRabbitPositionTbl[(int16)local_16] = 1;
+ int16 goodRabbitStartingPosition = _vm->getRand(4);
+ goodRabbitPositionTbl[goodRabbitStartingPosition] = 1;
i = 0;
while ((int16)i < 4) {
bunnyPositionTbl[(int16)i] = i;
@@ -302,23 +301,14 @@ void Minigame3::run() {
while ((int16)i < 4) {
if (goodRabbitPositionTbl[(int16)i] == 0) {
bunnyActorTbl[(int16)i]->updateSequence(1);
- } else {
- local_16 = i;
}
i = i + 1;
}
-//TODO why doesn't this work?
-// do {
-// iVar3 = (int)(int16)local_16 + 1;
-// iVar4 = iVar3;
-// if (iVar3 < 0) {
-// iVar4 = (int)(int16)local_16 + 4;
-// }
-// } while (!bunnyActorTbl[iVar3 + (iVar4 >> 2) * -4]->isFlagSet(ACTOR_FLAG_4));
- bunnyActorTbl[local_16]->waitUntilFlag4IsSet();
- bunnyActorTbl[(int16)local_16]->updateSequence(0);
- bunnyActorTbl[(int16)local_16]->waitUntilFlag4IsSet();
+ bunnyActorTbl[(goodRabbitStartingPosition + 1) % 4]->waitUntilFlag4IsSet(); // wait for a rabid rabbit to complete its display sequence.
+
+ bunnyActorTbl[goodRabbitStartingPosition]->updateSequence(0);
+ bunnyActorTbl[goodRabbitStartingPosition]->waitUntilFlag4IsSet();
i = 0;
while ((int16)i < 4) {
bunnyActorTbl[(int16)i]->updateSequence(4);
@@ -650,9 +640,9 @@ void Minigame3::run() {
_vm->waitForFrames(1);
i = 0;
while ((int16)i < 3) {
- local_16 = 0;
- while ((int16)local_16 < 3) {
- updateBackgroundLayerOffset(2, ((int) (int16) local_16 * 0x140 + 0x640) * 0x10000 >> 0x10, 0);
+ int16 local_16 = 0;
+ while (local_16 < 3) {
+ updateBackgroundLayerOffset(2, ((int) local_16 * 0x140 + 0x640) * 0x10000 >> 0x10, 0);
_vm->waitForFrames(5);
local_16 = local_16 + 1;
}
@@ -671,8 +661,8 @@ void Minigame3::run() {
}
_vm->waitForFrames(0xf);
local_16 = 1;
- while (-1 < (int16)local_16) {
- updateBackgroundLayerOffset(2, ((int) (int16) local_16 * 0x140 + 0x640) * 0x10000 >> 0x10, 0);
+ while (-1 < local_16) {
+ updateBackgroundLayerOffset(2, ((int) local_16 * 0x140 + 0x640) * 0x10000 >> 0x10, 0);
_vm->waitForFrames(5);
local_16 = local_16 + -1;
}
Commit: e575967d781cd9afc190b34c164083b0204affeb
https://github.com/scummvm/scummvm/commit/e575967d781cd9afc190b34c164083b0204affeb
Author: Eric Fry (yuv422 at users.noreply.github.com)
Date: 2020-09-04T13:29:27+10:00
Commit Message:
DRAGONS: Fixed crash on mini game 3 for non-english versions. Trac#11609
Changed paths:
engines/dragons/dragons.cpp
engines/dragons/dragons.h
engines/dragons/minigame3.cpp
diff --git a/engines/dragons/dragons.cpp b/engines/dragons/dragons.cpp
index 44c370e50d..bf161029a6 100644
--- a/engines/dragons/dragons.cpp
+++ b/engines/dragons/dragons.cpp
@@ -1820,6 +1820,31 @@ uint16 DragonsEngine::getCursorHandPointerSequenceID() {
return _language == Common::DE_DEU || _language == Common::FR_FRA ? 0x86 : 0x84;
}
+uint32 DragonsEngine::getMiniGame3StartingDialog() {
+ switch (_language) {
+ case Common::DE_DEU : return 0x5456;
+ case Common::FR_FRA : return 0x509C;
+ default : break;
+ }
+ return 0x479A;
+}
+
+uint32 DragonsEngine::getMiniGame3PickAHatDialog() {
+ switch (_language) {
+ case Common::DE_DEU : return 0x2E32E;
+ case Common::FR_FRA : return 0x2F180;
+ default : break;
+ }
+ return 0x2958A;
+}
+
+uint32 DragonsEngine::getMiniGame3DataOffset() {
+ if (_language == Common::DE_DEU || _language == Common::FR_FRA) {
+ return 0x265c;
+ }
+ return 0x4914;
+}
+
void (*DragonsEngine::getSceneUpdateFunction())() {
return _sceneUpdateFunction;
}
diff --git a/engines/dragons/dragons.h b/engines/dragons/dragons.h
index f175cf1848..a73eb1c904 100644
--- a/engines/dragons/dragons.h
+++ b/engines/dragons/dragons.h
@@ -359,6 +359,9 @@ public:
uint32 getCutscenePaletteOffsetFromDragonEXE();
uint32 defaultResponseOffsetFromDragonEXE();
uint16 getCursorHandPointerSequenceID();
+ uint32 getMiniGame3StartingDialog();
+ uint32 getMiniGame3PickAHatDialog();
+ uint32 getMiniGame3DataOffset();
private:
bool savegame(const char *filename, const char *description);
bool loadgame(const char *filename);
diff --git a/engines/dragons/minigame3.cpp b/engines/dragons/minigame3.cpp
index 2453797e8d..b9f3f15c68 100644
--- a/engines/dragons/minigame3.cpp
+++ b/engines/dragons/minigame3.cpp
@@ -149,7 +149,7 @@ void Minigame3::run() {
handPositionsTbl[i].y = fd->readUint16LE();
}
- fd->seek(0x4914);
+ fd->seek(_vm->getMiniGame3DataOffset());
for (int i = 0; i < 4; i++) {
UnkStruct_ARRAY_800931a0[i].position1 = fd->readUint16LE();
@@ -294,7 +294,7 @@ void Minigame3::run() {
updateBackgroundLayerOffset(0, 0, 0);
_vm->fadeFromBlack();
_vm->waitForFrames(0xf);
- _vm->_talk->loadAndDisplayDialogAroundPoint(0x479A, 0x14, 3, 0x1e01, 0);
+ _vm->_talk->loadAndDisplayDialogAroundPoint(_vm->getMiniGame3StartingDialog(), 0x14, 3, 0x1e01, 0);
_vm->waitForFrames(0x1e);
// TODO clearTextDialog((uint)DAT_8008e7e8, (uint)DAT_8008e844, (uint)DAT_8008e848, (uint)DAT_8008e874);
i = 0;
@@ -679,7 +679,8 @@ void Minigame3::run() {
handActorId->_y_pos = handPositionsTbl[local_224].y;
handActorId->_priorityLayer = 2;
bVar1 = false;
- _vm->_talk->loadAndDisplayDialogAroundPoint(0x2958A, 0x14, 3, 0x1e01, 0);
+ //pick a hat flicker.
+ _vm->_talk->loadAndDisplayDialogAroundPoint(_vm->getMiniGame3PickAHatDialog(), 0x14, 3, 0x1e01, 0);
while (_vm->isFlagSet(ENGINE_FLAG_8000)) {
_vm->waitForFrames(1);
}
More information about the Scummvm-git-logs
mailing list