[Scummvm-git-logs] scummvm master -> bc6a657aea134f5fe4cfd5172ccebffda7794f32
neuromancer
noreply at scummvm.org
Sun Jun 22 07:20:19 UTC 2025
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
c7ff1d43de FREESCAPE: workaround for bug introduced during refactoring of unpack_data
ffe6a48198 FREESCAPE: use default stipple array if there is no stipple data set in TinyGL
044e2111d2 FREESCAPE: added missing fonts for driller amiga
bc6a657aea FREESCAPE: reimplement the demo replaying
Commit: c7ff1d43deffb5219b7ebaa23652557c742c3c4a
https://github.com/scummvm/scummvm/commit/c7ff1d43deffb5219b7ebaa23652557c742c3c4a
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-06-22T08:53:16+02:00
Commit Message:
FREESCAPE: workaround for bug introduced during refactoring of unpack_data
Changed paths:
engines/freescape/unpack.cpp
diff --git a/engines/freescape/unpack.cpp b/engines/freescape/unpack.cpp
index 7997e3c5a3d..31c177e8bbb 100644
--- a/engines/freescape/unpack.cpp
+++ b/engines/freescape/unpack.cpp
@@ -142,11 +142,11 @@ void unpack_data(unsigned char *unpacked_data, unsigned char *buf, unsigned int
if ((opcode & 1) == 1) {
break;
}
- cur_index = (unsigned int)(buf - save_buf);
- if (cur_index >= packed_data_len) {
+ if ((unsigned int)(buf - save_buf) >= packed_data_len) {
break;
}
}
+ cur_index = (unsigned int)(buf - save_buf);
if (cur_index < packed_data_len) {
if ((packed_data_len - cur_index) > (*unpacked_data_size - (unpacked_data - save_unp))) {
debug("Data left are too large!");
Commit: ffe6a481986127031b41d62d262fb93939e03ed5
https://github.com/scummvm/scummvm/commit/ffe6a481986127031b41d62d262fb93939e03ed5
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-06-22T08:53:16+02:00
Commit Message:
FREESCAPE: use default stipple array if there is no stipple data set in TinyGL
Changed paths:
engines/freescape/gfx_tinygl.cpp
diff --git a/engines/freescape/gfx_tinygl.cpp b/engines/freescape/gfx_tinygl.cpp
index 972c3798f38..9b08986d199 100644
--- a/engines/freescape/gfx_tinygl.cpp
+++ b/engines/freescape/gfx_tinygl.cpp
@@ -335,7 +335,8 @@ void TinyGLRenderer::useStipple(bool enabled) {
_stippleEnabled = enabled;
if (enabled) {
- assert(_variableStippleArray);
+ if (!_variableStippleArray)
+ _variableStippleArray = _defaultStippleArray;
} else {
_stippleTexture = nullptr;
}
Commit: 044e2111d275123cef0eb50e09f6cc9535217c6f
https://github.com/scummvm/scummvm/commit/044e2111d275123cef0eb50e09f6cc9535217c6f
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-06-22T08:53:16+02:00
Commit Message:
FREESCAPE: added missing fonts for driller amiga
Changed paths:
engines/freescape/games/driller/amiga.cpp
diff --git a/engines/freescape/games/driller/amiga.cpp b/engines/freescape/games/driller/amiga.cpp
index e3407445b38..a2568accf83 100644
--- a/engines/freescape/games/driller/amiga.cpp
+++ b/engines/freescape/games/driller/amiga.cpp
@@ -38,7 +38,6 @@ void DrillerEngine::loadAssetsAmigaFullGame() {
_title = loadAndConvertNeoImage(&file, 0xce);
loadFonts(&file, 0x8940);
-
Common::Array<Graphics::ManagedSurface *> chars;
chars = getCharsAmigaAtariInternal(8, 8, -3, 33, 32, &file, 0x8940 + 112 * 33 + 1, 100);
_fontSmall = Font(chars);
@@ -69,6 +68,11 @@ void DrillerEngine::loadAssetsAmigaFullGame() {
error("Failed to open 'driller' executable for Amiga");
loadFonts(&file, 0xa62);
+ Common::Array<Graphics::ManagedSurface *> chars;
+ chars = getCharsAmigaAtariInternal(8, 8, -3, 33, 32, &file, 0xa62 + 112 * 33 + 1, 100);
+ _fontSmall = Font(chars);
+ _fontSmall.setCharWidth(5);
+
loadMessagesFixedSize(&file, 0x499a, 14, 20);
loadGlobalObjects(&file, 0x4098, 8);
load8bitBinary(&file, 0x21a3e, 16);
@@ -127,10 +131,15 @@ void DrillerEngine::loadAssetsAmigaDemo() {
error("Failed to open 'driller' file");
if (_variant & GF_AMIGA_MAGAZINE_DEMO) {
- loadFonts(&file, 0xa62);
loadMessagesFixedSize(&file, 0x3df0, 14, 20);
loadGlobalObjects(&file, 0x3ba6, 8);
_demoMode = false;
+
+ loadFonts(&file, 0xa62);
+ Common::Array<Graphics::ManagedSurface *> chars;
+ chars = getCharsAmigaAtariInternal(8, 8, -3, 33, 32, &file, 0xa62 + 112 * 33 + 1, 100);
+ _fontSmall = Font(chars);
+ _fontSmall.setCharWidth(5);
} else {
loadFonts(&file, 0xa30);
loadMessagesFixedSize(&file, 0x3960, 14, 20);
Commit: bc6a657aea134f5fe4cfd5172ccebffda7794f32
https://github.com/scummvm/scummvm/commit/bc6a657aea134f5fe4cfd5172ccebffda7794f32
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-06-22T08:53:16+02:00
Commit Message:
FREESCAPE: reimplement the demo replaying
Changed paths:
engines/freescape/demo.cpp
engines/freescape/freescape.cpp
engines/freescape/freescape.h
diff --git a/engines/freescape/demo.cpp b/engines/freescape/demo.cpp
index 396042c26e7..98105ad0608 100644
--- a/engines/freescape/demo.cpp
+++ b/engines/freescape/demo.cpp
@@ -76,19 +76,21 @@ void FreescapeEngine::generateDemoInput() {
event.type = Common::EVENT_MOUSEMOVE;
event.mouse = Common::Point(mouseX, mouseY);
- event.customType = 0xde00;
+ //event.mouse.x = float(event.mouse.x) * g_system->getWidth() / _screenW ;
+ //event.mouse.y = float(event.mouse.y) * g_system->getHeight() / _screenH ;
byte nextKeyCode = _demoData[_demoIndex++];
if (nextKeyCode == 0x30) {
Common::Event spaceEvent;
- spaceEvent.type = Common::EVENT_KEYDOWN;
- spaceEvent.kbd.keycode = Common::KEYCODE_SPACE;
- spaceEvent.customType = 0xde00;
+ spaceEvent.type = Common::EVENT_CUSTOM_ENGINE_ACTION_START;
+ spaceEvent.customType = kActionChangeMode;
_demoEvents.push_back(spaceEvent);
_demoEvents.push_back(event); // Mouse pointer is moved
+
event.type = Common::EVENT_LBUTTONDOWN; // Keep same event fields
+ event.customType = 0;
_demoEvents.push_back(event); // Mouse is clicked
_demoEvents.push_back(spaceEvent);
nextKeyCode = _demoData[_demoIndex++];
@@ -96,10 +98,10 @@ void FreescapeEngine::generateDemoInput() {
while (nextKeyCode != 0) {
event = Common::Event();
- event.type = Common::EVENT_KEYDOWN;
- event.kbd.keycode = (Common::KeyCode)decodeAmigaAtariKey(nextKeyCode);
+ event.type = Common::EVENT_CUSTOM_ENGINE_ACTION_START;
+ event.customType = decodeAmigaAtariKey(nextKeyCode);
debugC(1, kFreescapeDebugMove, "Pushing key: %x", event.kbd.keycode);
- event.customType = 0xde00;
+
_demoEvents.push_back(event);
nextKeyCode = _demoData[_demoIndex++];
}
@@ -138,37 +140,37 @@ Common::Event FreescapeEngine::decodeDOSMouseEvent(int index, int repetition) {
int FreescapeEngine::decodeAmigaAtariKey(int index) {
switch (index) {
case 0x41:
- return Common::KEYCODE_a;
+ return kActionIncreaseAngle;
case 0x44:
- return Common::KEYCODE_d;
+ return kActionDeployDrillingRig;
case 0x46:
- return Common::KEYCODE_f;
+ return kActionLowerOrFlyDown;
case 0x4c:
- return Common::KEYCODE_l;
+ return kActionRotateDown;
case 0x4e:
- return Common::KEYCODE_n;
+ return kActionRollLeft;
case 0x50:
- return Common::KEYCODE_p;
+ return kActionRotateUp;
case 0x52:
- return Common::KEYCODE_r;
+ return kActionRiseOrFlyUp;
case 0x53:
- return Common::KEYCODE_s;
+ return kActionIncreaseStepSize;
case 0x55:
- return Common::KEYCODE_u;
+ return kActionTurnBack;
case 0x58:
- return Common::KEYCODE_x;
+ return kActionRotateRight;
case 0x5a:
- return Common::KEYCODE_z;
+ return kActionDecreaseAngle;
case 0x5f:
- return Common::KEYCODE_UNDERSCORE;
+ return kActionUnknownKey;
case 0x96:
- return Common::KEYCODE_UP;
+ return kActionMoveUp;
case 0x97:
- return Common::KEYCODE_DOWN;
+ return kActionMoveDown;
case 0x98:
- return Common::KEYCODE_w; // Right
+ return kActionRotateRight; // Right
case 0x99:
- return Common::KEYCODE_q; // Left
+ return kActionRotateLeft; // Left
default:
error("Invalid key index: %x", index);
}
diff --git a/engines/freescape/freescape.cpp b/engines/freescape/freescape.cpp
index e9417ac488d..a3aa4e9953d 100644
--- a/engines/freescape/freescape.cpp
+++ b/engines/freescape/freescape.cpp
@@ -646,7 +646,7 @@ void FreescapeEngine::processInput() {
g_system->warpMouse(mousePos.x, mousePos.y);
if (_shootMode) {
- _crossairPosition = mousePosToCrossairPos(mousePos);
+ _crossairPosition = _demoMode ? mousePos : mousePosToCrossairPos(mousePos);
} else {
// Mouse pointer is locked into the the middle of the screen
// since we only need the relative movements. This will not affect any touchscreen device
diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index 228ce703780..e7c6b21d5da 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -105,6 +105,9 @@ enum FreescapeAction {
kActionSelectPrince,
kActionSelectPrincess,
kActionQuit,
+ // Demo actions
+ kActionUnknownKey,
+ kActionWait
};
typedef Common::HashMap<uint16, Area *> AreaMap;
More information about the Scummvm-git-logs
mailing list