[Scummvm-git-logs] scummvm master -> c8078ba3f14c2306fff43365738c2eeb15ae8063
elasota
noreply at scummvm.org
Wed Mar 15 04:54:13 UTC 2023
This automated email contains information about 8 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0dd7d2308e VCRUISE: Stub out say1, fix gong beater not being removed from inventory.
5df36b2c1e VCRUISE: Add quirk to fix rotor puzzle graphics displaying incorrectly
e0494fa705 VCRUISE: Fix vertical gyro controls being inverted
2a7687ff8b VCRUISE: Fix incorrect wraparound gyro frame ranges.
b41ce482d5 VCRUISE: Add saveAs op stub. Add quirk to make the stone game work.
814ac065c1 VCRUISE: Stub some oasis ops
db67719b2b VCRUISE: Don't run facing animations if there are no rotations available. Fixes crash when entering forest.
c8078ba3f1 VCRUISE: Discard "allowedSave" opcode.
Commit: 0dd7d2308ebae208e46546e4286d51c7e3ef0d8e
https://github.com/scummvm/scummvm/commit/0dd7d2308ebae208e46546e4286d51c7e3ef0d8e
Author: elasota (ejlasota at gmail.com)
Date: 2023-03-15T00:53:51-04:00
Commit Message:
VCRUISE: Stub out say1, fix gong beater not being removed from inventory.
Changed paths:
engines/vcruise/runtime.cpp
engines/vcruise/runtime.h
engines/vcruise/script.cpp
engines/vcruise/script.h
diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index efd20aad458..0452f482085 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -76,7 +76,7 @@ const MapScreenDirectionDef *MapDef::getScreenDirection(uint screen, uint direct
return screenDirections[screen][direction].get();
}
-ScriptEnvironmentVars::ScriptEnvironmentVars() : lmb(false), lmbDrag(false), panInteractionID(0), fpsOverride(0) {
+ScriptEnvironmentVars::ScriptEnvironmentVars() : lmb(false), lmbDrag(false), panInteractionID(0), fpsOverride(0), lastHighlightedItem(0) {
}
void Runtime::RenderSection::init(const Common::Rect ¶mRect, const Graphics::PixelFormat &fmt) {
@@ -251,6 +251,22 @@ void SfxData::load(Common::SeekableReadStream &stream, Audio::Mixer *mixer) {
workKey = workKey.substr(spaceSpanEnd, workKey.size() - spaceSpanEnd);
}
+ // Strip leading and trailing spaces
+ while (tokens.size() > 0) {
+ if (tokens[0].empty()) {
+ tokens.remove_at(0);
+ continue;
+ }
+
+ uint lastIndex = tokens.size() - 1;
+ if (tokens[lastIndex].empty()) {
+ tokens.remove_at(lastIndex);
+ continue;
+ }
+
+ break;
+ }
+
if (tokens.size() != 4) {
warning("Found unusual playlist entry: %s", key.c_str());
continue;
@@ -1040,6 +1056,7 @@ bool Runtime::runScript() {
DISPATCH_OP(Random);
DISPATCH_OP(Drop);
DISPATCH_OP(Dup);
+ DISPATCH_OP(Say1);
DISPATCH_OP(Say3);
DISPATCH_OP(Say3Get);
DISPATCH_OP(SetTimer);
@@ -2251,6 +2268,19 @@ void Runtime::inventoryAddItem(uint item) {
drawInventory(firstOpenSlot);
}
+void Runtime::inventoryRemoveItem(uint itemID) {
+ for (uint slot = 0; slot < kNumInventorySlots; slot++) {
+ InventoryItem &item = _inventory[slot];
+
+ if (item.itemID == static_cast<uint>(itemID)) {
+ item.highlighted = false;
+ item.itemID = 0;
+ item.graphic.reset();
+ drawInventory(slot);
+ }
+ }
+}
+
void Runtime::drawInventory(uint slot) {
Common::Rect trayRect = _traySection.rect;
trayRect.translate(-trayRect.left, -trayRect.top);
@@ -2795,6 +2825,7 @@ void Runtime::scriptOpItemCheck(ScriptArg_t arg) {
for (const InventoryItem &item : _inventory) {
if (item.itemID == static_cast<uint>(stackArgs[0])) {
+ _scriptEnv.lastHighlightedItem = item.itemID;
_scriptStack.push_back(1);
return;
}
@@ -2806,18 +2837,7 @@ void Runtime::scriptOpItemCheck(ScriptArg_t arg) {
void Runtime::scriptOpItemRemove(ScriptArg_t arg) {
TAKE_STACK(1);
- for (uint slot = 0; slot < kNumInventorySlots; slot++) {
- InventoryItem &item = _inventory[slot];
-
- if (item.itemID == static_cast<uint>(stackArgs[0])) {
- item.highlighted = false;
- item.itemID = 0;
- item.graphic.reset();
- drawInventory(slot);
- }
- }
-
- _scriptStack.push_back(0);
+ inventoryRemoveItem(stackArgs[0]);
}
void Runtime::scriptOpItemHighlightSet(ScriptArg_t arg) {
@@ -2838,7 +2858,13 @@ void Runtime::scriptOpItemHighlightSet(ScriptArg_t arg) {
void Runtime::scriptOpItemAdd(ScriptArg_t arg) {
TAKE_STACK(1);
- inventoryAddItem(stackArgs[0]);
+ if (stackArgs[0] == 0) {
+ // Weird special case, happens in Reah when breaking the glass barrier, this is called with 0 as the parameter.
+ // This can't be an inventory clear because it will not clear the crutch, but it does take away the gong beater,
+ // so the only explanation I can think of is that it clears the previously-checked inventory item.
+ inventoryRemoveItem(_scriptEnv.lastHighlightedItem);
+ } else
+ inventoryAddItem(stackArgs[0]);
}
void Runtime::scriptOpItemHaveSpace(ScriptArg_t arg) {
@@ -3123,6 +3149,17 @@ void Runtime::scriptOpDup(ScriptArg_t arg) {
_scriptStack.push_back(stackArgs[0]);
}
+void Runtime::scriptOpSay1(ScriptArg_t arg) {
+ TAKE_STACK(3);
+
+ warning("Say1 cycles are not implemented yet, playing first sound in the cycle");
+
+ uint soundID = stackArgs[0];
+ // uint cycleLength = stackArgs[2];
+
+ triggerSound(false, soundID, 100, 0, false);
+}
+
void Runtime::scriptOpSay3(ScriptArg_t arg) {
TAKE_STACK(3);
diff --git a/engines/vcruise/runtime.h b/engines/vcruise/runtime.h
index 419b2ede1aa..6854098ddb9 100644
--- a/engines/vcruise/runtime.h
+++ b/engines/vcruise/runtime.h
@@ -137,6 +137,7 @@ struct ScriptEnvironmentVars {
bool lmbDrag;
uint panInteractionID;
uint fpsOverride;
+ uint lastHighlightedItem;
};
struct SfxSound {
@@ -504,6 +505,7 @@ private:
bool computeFaceDirectionAnimation(uint desiredDirection, const AnimationDef *&outAnimDef, uint &outInitialFrame, uint &outStopFrame);
void inventoryAddItem(uint item);
+ void inventoryRemoveItem(uint item);
void drawInventory(uint slot);
void resetInventoryHighlights();
@@ -571,6 +573,7 @@ private:
void scriptOpRandom(ScriptArg_t arg);
void scriptOpDrop(ScriptArg_t arg);
void scriptOpDup(ScriptArg_t arg);
+ void scriptOpSay1(ScriptArg_t arg);
void scriptOpSay3(ScriptArg_t arg);
void scriptOpSay3Get(ScriptArg_t arg);
void scriptOpSetTimer(ScriptArg_t arg);
diff --git a/engines/vcruise/script.cpp b/engines/vcruise/script.cpp
index b5dcb8dfa70..40b1442fddd 100644
--- a/engines/vcruise/script.cpp
+++ b/engines/vcruise/script.cpp
@@ -348,8 +348,8 @@ static ScriptNamedInstruction g_namedInstructions[] = {
{"rnd", ProtoOp::kProtoOpScript, ScriptOps::kRandom},
{"drop", ProtoOp::kProtoOpScript, ScriptOps::kDrop},
{"dup", ProtoOp::kProtoOpScript, ScriptOps::kDup},
- {"say1", ProtoOp::kProtoOpScript, ScriptOps::kSay3}, // FIXME: Figure out what the difference is between the say ops
- {"say2", ProtoOp::kProtoOpScript, ScriptOps::kSay3}, // FIXME: Figure out what the difference is between the say ops
+ {"say1", ProtoOp::kProtoOpScript, ScriptOps::kSay1},
+ {"say2", ProtoOp::kProtoOpScript, ScriptOps::kSay3}, // FIXME: Figure out what the difference is between say2 and say3. I think say2 is repeatable? Maybe works as say1 instead?
{"say3", ProtoOp::kProtoOpScript, ScriptOps::kSay3},
{"say3@", ProtoOp::kProtoOpScript, ScriptOps::kSay3Get},
{"setTimer", ProtoOp::kProtoOpScript, ScriptOps::kSetTimer},
diff --git a/engines/vcruise/script.h b/engines/vcruise/script.h
index 912a978492c..9c24058fd0d 100644
--- a/engines/vcruise/script.h
+++ b/engines/vcruise/script.h
@@ -99,6 +99,7 @@ enum ScriptOp {
kRandom,
kDrop,
kDup,
+ kSay1,
kSay3,
kSay3Get,
kSetTimer,
Commit: 5df36b2c1e8d7b4fafb685f4299f083dc5fcd91d
https://github.com/scummvm/scummvm/commit/5df36b2c1e8d7b4fafb685f4299f083dc5fcd91d
Author: elasota (ejlasota at gmail.com)
Date: 2023-03-15T00:53:51-04:00
Commit Message:
VCRUISE: Add quirk to fix rotor puzzle graphics displaying incorrectly
Changed paths:
engines/vcruise/runtime.cpp
engines/vcruise/runtime.h
diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index 0452f482085..7004d4d32e1 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -2784,6 +2784,7 @@ void Runtime::scriptOpStatic(ScriptArg_t arg) {
TAKE_STACK(kAnimDefStackArgs);
// QUIRK/BUG WORKAROUND: Static animations don't override other static animations!
+ //
// In Reah Room05, the script for 0b8 (NGONG) sets the static animation to :NNAWA_NGONG and then
// to :NSWIT_SGONG, but NNAWA_NGONG is the correct one, so we must ignore the second static animation
if (_haveIdleStaticAnimation)
@@ -2791,11 +2792,19 @@ void Runtime::scriptOpStatic(ScriptArg_t arg) {
AnimationDef animDef = stackArgsToAnimDef(stackArgs);
+ // QUIRK: In the Reah citadel rotor puzzle, all of the "BKOLO" screens execute :DKOLO1_BKOLO1 static but
+ // doing that would replace the transition animation's last frame with the new static animation frame,
+ // blanking out the puzzle, so we must detect if the new static animation is the same as the existing
+ // one and if so, ignore it.
+ if (animDef.animName == _idleCurrentStaticAnimation)
+ return;
+
changeAnimation(animDef, animDef.lastFrame, false);
_havePendingReturnToIdleState = true;
_havePanAnimations = false;
_haveIdleStaticAnimation = true;
+ _idleCurrentStaticAnimation = animDef.animName;
_gameState = kGameStateWaitingForAnimation;
}
diff --git a/engines/vcruise/runtime.h b/engines/vcruise/runtime.h
index 6854098ddb9..2d3c7267716 100644
--- a/engines/vcruise/runtime.h
+++ b/engines/vcruise/runtime.h
@@ -653,6 +653,7 @@ private:
StaticAnimation _idleAnimations[kNumDirections];
bool _haveIdleAnimations[kNumDirections];
bool _haveIdleStaticAnimation;
+ Common::String _idleCurrentStaticAnimation;
StaticAnimParams _pendingStaticAnimParams;
AnimationDef _postFacingAnimDef;
Commit: e0494fa70585dbb1c932cb7b02970f71e661629b
https://github.com/scummvm/scummvm/commit/e0494fa70585dbb1c932cb7b02970f71e661629b
Author: elasota (ejlasota at gmail.com)
Date: 2023-03-15T00:53:51-04:00
Commit Message:
VCRUISE: Fix vertical gyro controls being inverted
Changed paths:
engines/vcruise/runtime.cpp
diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index 7004d4d32e1..b005092651d 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -732,7 +732,7 @@ bool Runtime::runGyroIdle() {
int32 deltaCoordinate = 0;
if (_gyros.isVertical)
- deltaCoordinate = _mousePos.y - _gyros.dragBasePoint.y;
+ deltaCoordinate = _gyros.dragBasePoint.y - _mousePos.y;
else
deltaCoordinate = _gyros.dragBasePoint.x - _mousePos.x;
Commit: 2a7687ff8b51c7c56cbe2b120f929a693db1d33f
https://github.com/scummvm/scummvm/commit/2a7687ff8b51c7c56cbe2b120f929a693db1d33f
Author: elasota (ejlasota at gmail.com)
Date: 2023-03-15T00:53:51-04:00
Commit Message:
VCRUISE: Fix incorrect wraparound gyro frame ranges.
Changed paths:
engines/vcruise/runtime.cpp
diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index b005092651d..983799e91e5 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -763,7 +763,13 @@ bool Runtime::runGyroIdle() {
if (targetState < _gyros.dragCurrentState) {
AnimationDef animDef = _gyros.negAnim;
- uint initialFrame = animDef.firstFrame + ((_gyros.maxValue - gyro.currentState) * _gyros.frameSeparation);
+ uint initialFrame = 0;
+
+ if (gyro.wrapAround) {
+ uint maxValuePlusOne = _gyros.maxValue + 1;
+ initialFrame = animDef.firstFrame + ((maxValuePlusOne - gyro.currentState) % maxValuePlusOne * _gyros.frameSeparation);
+ } else
+ initialFrame = animDef.firstFrame + ((_gyros.maxValue - gyro.currentState) * _gyros.frameSeparation);
// This is intentional instead of setting the stop frame, V-Cruise can overrun the end of the animation.
// firstFrame is left alone so playlists are based correctly.
Commit: b41ce482d50c5aaefae2a94b608ba1c6c894a229
https://github.com/scummvm/scummvm/commit/b41ce482d50c5aaefae2a94b608ba1c6c894a229
Author: elasota (ejlasota at gmail.com)
Date: 2023-03-15T00:53:51-04:00
Commit Message:
VCRUISE: Add saveAs op stub. Add quirk to make the stone game work.
Changed paths:
engines/vcruise/runtime.cpp
engines/vcruise/runtime.h
engines/vcruise/script.cpp
engines/vcruise/script.h
diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index 983799e91e5..72b1d618e4d 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -1097,6 +1097,7 @@ bool Runtime::runScript() {
DISPATCH_OP(EscOff);
DISPATCH_OP(EscGet);
DISPATCH_OP(BackStart);
+ DISPATCH_OP(SaveAs);
DISPATCH_OP(AnimName);
DISPATCH_OP(ValueName);
@@ -1614,7 +1615,10 @@ void Runtime::loadMap(Common::SeekableReadStream *stream) {
idef.objectType = READ_LE_UINT16(interactionData + 10);
}
- _map.screenDirections[screen][direction] = screenDirectionDef;
+ // QUIRK: The stone game in the tower in Reah (Room 06) has two 0cb screens and the second one is damaged,
+ // so it must be ignored.
+ if (!_map.screenDirections[screen][direction])
+ _map.screenDirections[screen][direction] = screenDirectionDef;
}
}
}
@@ -3292,6 +3296,14 @@ void Runtime::scriptOpVerticalPanGet() {
_scriptStack.push_back(isInRadius ? 1 : 0);
}
+void Runtime::scriptOpSaveAs(ScriptArg_t arg) {
+ TAKE_STACK(4);
+
+ // Just ignore this op, it looks like it's for save room remapping of some sort but we allow
+ // saves at any idle screen.
+ (void)stackArgs;
+}
+
void Runtime::scriptOpNot(ScriptArg_t arg) {
TAKE_STACK(1);
diff --git a/engines/vcruise/runtime.h b/engines/vcruise/runtime.h
index 2d3c7267716..8780938ada0 100644
--- a/engines/vcruise/runtime.h
+++ b/engines/vcruise/runtime.h
@@ -608,6 +608,7 @@ private:
void scriptOpEscOff(ScriptArg_t arg);
void scriptOpEscGet(ScriptArg_t arg);
void scriptOpBackStart(ScriptArg_t arg);
+ void scriptOpSaveAs(ScriptArg_t arg);
void scriptOpAnimName(ScriptArg_t arg);
void scriptOpValueName(ScriptArg_t arg);
diff --git a/engines/vcruise/script.cpp b/engines/vcruise/script.cpp
index 40b1442fddd..602568d3b89 100644
--- a/engines/vcruise/script.cpp
+++ b/engines/vcruise/script.cpp
@@ -271,7 +271,9 @@ void ScriptCompiler::compileRoomScriptSet(RoomScriptSet *rss) {
Common::SharedPtr<ScreenScriptSet> sss(new ScreenScriptSet());
compileScreenScriptSet(sss.get());
- rss->screenScripts[screenNumber] = sss;
+ // QUIRK: The tower in Reah (Room 06) has two 0cb screens, the second one is bad and must be ignored
+ if (rss->screenScripts.find(screenNumber) == rss->screenScripts.end())
+ rss->screenScripts[screenNumber] = sss;
} else {
error("Error compiling script at line %i col %i: Expected ~EROOM or ~SCR and found '%s'", static_cast<int>(state._lineNum), static_cast<int>(state._col), token.c_str());
}
@@ -420,6 +422,7 @@ static ScriptNamedInstruction g_namedInstructions[] = {
{"esc_off", ProtoOp::kProtoOpScript, ScriptOps::kEscOff},
{"esc_get@", ProtoOp::kProtoOpScript, ScriptOps::kEscGet},
{"backStart", ProtoOp::kProtoOpScript, ScriptOps::kBackStart},
+ {"saveAs", ProtoOp::kProtoOpScript, ScriptOps::kSaveAs},
};
bool ScriptCompiler::compileInstructionToken(ProtoScript &script, const Common::String &token) {
diff --git a/engines/vcruise/script.h b/engines/vcruise/script.h
index 9c24058fd0d..3e3eb0cecae 100644
--- a/engines/vcruise/script.h
+++ b/engines/vcruise/script.h
@@ -134,6 +134,7 @@ enum ScriptOp {
kEscOff,
kEscGet,
kBackStart,
+ kSaveAs,
kAnimName,
kValueName,
Commit: 814ac065c10918b43854da9dd45c12247ebef2ba
https://github.com/scummvm/scummvm/commit/814ac065c10918b43854da9dd45c12247ebef2ba
Author: elasota (ejlasota at gmail.com)
Date: 2023-03-15T00:53:51-04:00
Commit Message:
VCRUISE: Stub some oasis ops
Changed paths:
engines/vcruise/runtime.cpp
engines/vcruise/runtime.h
engines/vcruise/script.cpp
engines/vcruise/script.h
diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index 72b1d618e4d..1c036db06de 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -1027,6 +1027,7 @@ bool Runtime::runScript() {
DISPATCH_OP(ItemHighlightSet);
DISPATCH_OP(ItemAdd);
DISPATCH_OP(ItemHaveSpace);
+ DISPATCH_OP(ItemClear);
DISPATCH_OP(SetCursor);
DISPATCH_OP(SetRoom);
DISPATCH_OP(LMB);
@@ -1057,6 +1058,8 @@ bool Runtime::runScript() {
DISPATCH_OP(SParmX);
DISPATCH_OP(SAnimX);
+ DISPATCH_OP(VolumeDn2);
+ DISPATCH_OP(VolumeDn3);
DISPATCH_OP(VolumeDn4);
DISPATCH_OP(VolumeUp3);
DISPATCH_OP(Random);
@@ -2886,6 +2889,19 @@ void Runtime::scriptOpItemAdd(ScriptArg_t arg) {
inventoryAddItem(stackArgs[0]);
}
+void Runtime::scriptOpItemClear(ScriptArg_t arg) {
+ for (uint slot = 0; slot < kNumInventorySlots; slot++) {
+ InventoryItem &item = _inventory[slot];
+
+ if (item.itemID != 0) {
+ item.highlighted = false;
+ item.itemID = 0;
+ item.graphic.reset();
+ drawInventory(slot);
+ }
+ }
+}
+
void Runtime::scriptOpItemHaveSpace(ScriptArg_t arg) {
for (const InventoryItem &item : _inventory) {
if (item.itemID == 0) {
@@ -3141,6 +3157,19 @@ void Runtime::scriptOpVolumeUp3(ScriptArg_t arg) {
triggerSoundRamp(stackArgs[0], stackArgs[1] * 100, stackArgs[2], false);
}
+void Runtime::scriptOpVolumeDn2(ScriptArg_t arg) {
+ TAKE_STACK(2);
+
+ // FIXME: Just do this instantly
+ triggerSoundRamp(stackArgs[0], 1, stackArgs[1], false);
+}
+
+void Runtime::scriptOpVolumeDn3(ScriptArg_t arg) {
+ TAKE_STACK(3);
+
+ triggerSoundRamp(stackArgs[0], stackArgs[1] * 100, stackArgs[2], false);
+}
+
void Runtime::scriptOpVolumeDn4(ScriptArg_t arg) {
TAKE_STACK(4);
diff --git a/engines/vcruise/runtime.h b/engines/vcruise/runtime.h
index 8780938ada0..a671b2cf2ef 100644
--- a/engines/vcruise/runtime.h
+++ b/engines/vcruise/runtime.h
@@ -537,6 +537,7 @@ private:
void scriptOpItemHighlightSet(ScriptArg_t arg);
void scriptOpItemAdd(ScriptArg_t arg);
void scriptOpItemHaveSpace(ScriptArg_t arg);
+ void scriptOpItemClear(ScriptArg_t arg);
void scriptOpSetCursor(ScriptArg_t arg);
void scriptOpSetRoom(ScriptArg_t arg);
@@ -568,6 +569,8 @@ private:
void scriptOpSParmX(ScriptArg_t arg);
void scriptOpSAnimX(ScriptArg_t arg);
+ void scriptOpVolumeDn2(ScriptArg_t arg);
+ void scriptOpVolumeDn3(ScriptArg_t arg);
void scriptOpVolumeDn4(ScriptArg_t arg);
void scriptOpVolumeUp3(ScriptArg_t arg);
void scriptOpRandom(ScriptArg_t arg);
diff --git a/engines/vcruise/script.cpp b/engines/vcruise/script.cpp
index 602568d3b89..6f498b35f09 100644
--- a/engines/vcruise/script.cpp
+++ b/engines/vcruise/script.cpp
@@ -341,10 +341,13 @@ static ScriptNamedInstruction g_namedInstructions[] = {
{"sr!", ProtoOp::kProtoOpScript, ScriptOps::kItemHighlightSet},
{"r?", ProtoOp::kProtoOpScript, ScriptOps::kItemHaveSpace},
{"r!", ProtoOp::kProtoOpScript, ScriptOps::kItemAdd},
+ {"clearPocket", ProtoOp::kProtoOpScript, ScriptOps::kItemClear},
{"cursor!", ProtoOp::kProtoOpScript, ScriptOps::kSetCursor},
{"room!", ProtoOp::kProtoOpScript, ScriptOps::kSetRoom},
{"lmb", ProtoOp::kProtoOpScript, ScriptOps::kLMB},
{"lmb1", ProtoOp::kProtoOpScript, ScriptOps::kLMB1},
+ {"volumeDn2", ProtoOp::kProtoOpScript, ScriptOps::kVolumeDn2},
+ {"volumeDn3", ProtoOp::kProtoOpScript, ScriptOps::kVolumeDn3},
{"volumeDn4", ProtoOp::kProtoOpScript, ScriptOps::kVolumeDn4},
{"volumeUp3", ProtoOp::kProtoOpScript, ScriptOps::kVolumeUp3},
{"rnd", ProtoOp::kProtoOpScript, ScriptOps::kRandom},
diff --git a/engines/vcruise/script.h b/engines/vcruise/script.h
index 3e3eb0cecae..ee8be24366d 100644
--- a/engines/vcruise/script.h
+++ b/engines/vcruise/script.h
@@ -66,6 +66,7 @@ enum ScriptOp {
kItemRemove,
kItemHighlightSet,
kItemAdd,
+ kItemClear,
kSetCursor,
kSetRoom,
kLMB,
@@ -94,6 +95,8 @@ enum ScriptOp {
kParmG,
kSParmX,
kSAnimX,
+ kVolumeDn2,
+ kVolumeDn3,
kVolumeDn4,
kVolumeUp3,
kRandom,
Commit: db67719b2bb6e50916eeafd051a80d22f7eb9ab0
https://github.com/scummvm/scummvm/commit/db67719b2bb6e50916eeafd051a80d22f7eb9ab0
Author: elasota (ejlasota at gmail.com)
Date: 2023-03-15T00:53:51-04:00
Commit Message:
VCRUISE: Don't run facing animations if there are no rotations available. Fixes crash when entering forest.
Changed paths:
engines/vcruise/runtime.cpp
diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index 1c036db06de..f43f037fb82 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -2230,7 +2230,7 @@ void Runtime::panoramaActivate() {
}
bool Runtime::computeFaceDirectionAnimation(uint desiredDirection, const AnimationDef *&outAnimDef, uint &outInitialFrame, uint &outStopFrame) {
- if (_direction == desiredDirection)
+ if (_direction == desiredDirection || !_havePanAnimations)
return false;
uint leftPanDistance = ((_direction + kNumDirections) - desiredDirection) % kNumDirections;
Commit: c8078ba3f14c2306fff43365738c2eeb15ae8063
https://github.com/scummvm/scummvm/commit/c8078ba3f14c2306fff43365738c2eeb15ae8063
Author: elasota (ejlasota at gmail.com)
Date: 2023-03-15T00:53:52-04:00
Commit Message:
VCRUISE: Discard "allowedSave" opcode.
Changed paths:
engines/vcruise/script.cpp
diff --git a/engines/vcruise/script.cpp b/engines/vcruise/script.cpp
index 6f498b35f09..f67060d46d9 100644
--- a/engines/vcruise/script.cpp
+++ b/engines/vcruise/script.cpp
@@ -88,6 +88,8 @@ Instruction::Instruction(ScriptOps::ScriptOp paramOp, int32 paramArg) : op(param
enum ProtoOp {
kProtoOpScript, // Use script opcode
+ kProtoOpNoop,
+
kProtoOpJumpToLabel,
kProtoOpLabel,
@@ -426,6 +428,7 @@ static ScriptNamedInstruction g_namedInstructions[] = {
{"esc_get@", ProtoOp::kProtoOpScript, ScriptOps::kEscGet},
{"backStart", ProtoOp::kProtoOpScript, ScriptOps::kBackStart},
{"saveAs", ProtoOp::kProtoOpScript, ScriptOps::kSaveAs},
+ {"allowedSave", ProtoOp::kProtoOpNoop, ScriptOps::kInvalid},
};
bool ScriptCompiler::compileInstructionToken(ProtoScript &script, const Common::String &token) {
@@ -557,7 +560,7 @@ void ScriptCompiler::codeGenScript(ProtoScript &protoScript, Script &script) {
int32 nextLabel = 0;
// Pass 1: Collect flow control constructs, make all flow control constructs point to the index of the construct,
- // replace Else, Case, EndIf, EndSwitch, and Default instructions with Label and JumpToLabel.
+ // replace Else, Case, EndIf, EndSwitch, and Default instructions with Label and JumpToLabel. Clear noops.
for (const ProtoInstruction &instr : protoScript.instrs) {
switch (instr.protoOp) {
case kProtoOpScript:
@@ -689,6 +692,8 @@ void ScriptCompiler::codeGenScript(ProtoScript &protoScript, Script &script) {
controlFlowStack.pop_back();
} break;
+ case kProtoOpNoop:
+ break;
default:
error("Internal error: Unhandled proto-op");
break;
More information about the Scummvm-git-logs
mailing list