[Scummvm-git-logs] scummvm master -> 1cb5e2bc1e5d1f639a8b3bc809a63940e82c2796
neuromancer
noreply at scummvm.org
Sat Jan 25 16:36:03 UTC 2025
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
04c29001d7 FREESCAPE: fix symbol handling for eclipse in several platforms
7af929823b FREESCAPE: fix symbol handling for eclipse in cpc
1cb5e2bc1e FREESCAPE: use correct sound for shooting in eclipse for dos
Commit: 04c29001d7e2f61cbfdf11a977b2c87f13f4f0b0
https://github.com/scummvm/scummvm/commit/04c29001d7e2f61cbfdf11a977b2c87f13f4f0b0
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-01-25T17:33:22+01:00
Commit Message:
FREESCAPE: fix symbol handling for eclipse in several platforms
Changed paths:
engines/freescape/font.cpp
engines/freescape/freescape.h
engines/freescape/games/eclipse/dos.cpp
engines/freescape/games/eclipse/zx.cpp
diff --git a/engines/freescape/font.cpp b/engines/freescape/font.cpp
index 0487cc678f7..c1f496f7761 100644
--- a/engines/freescape/font.cpp
+++ b/engines/freescape/font.cpp
@@ -24,6 +24,16 @@
namespace Freescape {
+Common::String shiftStr(const Common::String &str, int shift) {
+ Common::String result;
+ for (int i = 0; i < int(str.size()); i++) {
+ int c = shift + str[i];
+ assert(c < 256);
+ result += char(c);
+ }
+ return result;
+}
+
Font::Font() {
_backgroundColor = 0;
_secondaryColor = 0;
@@ -174,7 +184,8 @@ Common::Array<Graphics::ManagedSurface *> FreescapeEngine::getCharsAmigaAtari(Co
void FreescapeEngine::drawStringInSurface(const Common::String &str, int x, int y, uint32 fontColor, uint32 backColor, Graphics::Surface *surface, int offset) {
Common::String ustr = str;
- ustr.toUppercase();
+ if (!isEclipse())
+ ustr.toUppercase();
_font.setBackground(backColor);
_font.drawString(surface, ustr, x, y, _screenW, fontColor);
}
diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index 09181333334..0aa4ec38a66 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -129,6 +129,8 @@ struct CGAPaletteEntry {
byte *palette;
};
+extern Common::String shiftStr(const Common::String &str, int shift);
+
class EventManagerWrapper {
public:
EventManagerWrapper(Common::EventManager *delegate);
diff --git a/engines/freescape/games/eclipse/dos.cpp b/engines/freescape/games/eclipse/dos.cpp
index 53beb5e5279..7e2d4bf51d1 100644
--- a/engines/freescape/games/eclipse/dos.cpp
+++ b/engines/freescape/games/eclipse/dos.cpp
@@ -120,7 +120,8 @@ void EclipseEngine::drawDOSUI(Graphics::Surface *surface) {
drawStringInSurface(_currentArea->_name, 102, 135, black, yellow, surface);
Common::String scoreStr = Common::String::format("%07d", score);
- drawStringInSurface(scoreStr, 136, 6, black, white, surface, 'Z' - '0' + 1);
+ Common::String encodedScoreStr = shiftStr(scoreStr, 'Z' - '0' + 1);
+ drawStringInSurface(encodedScoreStr, 136, 6, black, white, surface);
int x = 171;
if (shield < 10)
@@ -131,13 +132,13 @@ void EclipseEngine::drawDOSUI(Graphics::Surface *surface) {
Common::String shieldStr = Common::String::format("%d", shield);
drawStringInSurface(shieldStr, x, 162, black, redish, surface);
- drawStringInSurface(Common::String('0' - _angleRotationIndex), 79, 135, black, yellow, surface, 'Z' - '$' + 1);
- drawStringInSurface(Common::String('3' - _playerStepIndex), 63, 135, black, yellow, surface, 'Z' - '$' + 1);
- drawStringInSurface(Common::String('7' - _playerHeightNumber), 240, 135, black, yellow, surface, 'Z' - '$' + 1);
+ drawStringInSurface(shiftStr("0", 'Z' - '$' + 1 - _angleRotationIndex), 79, 135, black, yellow, surface);
+ drawStringInSurface(shiftStr("3", 'Z' - '$' + 1 - _playerStepIndex), 63, 135, black, yellow, surface);
+ drawStringInSurface(shiftStr("7", 'Z' - '$' + 1 - _playerHeightNumber), 240, 135, black, yellow, surface);
if (_shootingFrames > 0) {
- drawStringInSurface("4", 232, 135, black, yellow, surface, 'Z' - '$' + 1);
- drawStringInSurface("<", 240, 135, black, yellow, surface, 'Z' - '$' + 1);
+ drawStringInSurface(shiftStr("4", 'Z' - '$' + 1), 232, 135, black, yellow, surface);
+ drawStringInSurface(shiftStr("<", 'Z' - '$' + 1), 240, 135, black, yellow, surface);
}
drawAnalogClock(surface, 90, 172, black, red, white);
diff --git a/engines/freescape/games/eclipse/zx.cpp b/engines/freescape/games/eclipse/zx.cpp
index 640c95f8674..d7c1d3c3b3b 100644
--- a/engines/freescape/games/eclipse/zx.cpp
+++ b/engines/freescape/games/eclipse/zx.cpp
@@ -200,7 +200,8 @@ void EclipseEngine::drawZXUI(Graphics::Surface *surface) {
drawStringInSurface(_currentArea->_name, 102, 141, back, yellow, surface);
Common::String scoreStr = Common::String::format("%07d", score);
- drawStringInSurface(scoreStr, 133, 11, back, gray, surface, 'Z' - '0' + 1);
+ Common::String encodedScoreStr = shiftStr(scoreStr, 'Z' - '0' + 1);
+ drawStringInSurface(encodedScoreStr, 133, 11, back, gray, surface, 'Z' - '0' + 1);
Common::String shieldStr = Common::String::format("%d", shield);
@@ -221,13 +222,13 @@ void EclipseEngine::drawZXUI(Graphics::Surface *surface) {
Common::Rect jarWater(120, 192 - energy - 4, 144, 192 - 4);
surface->fillRect(jarWater, blue);
- drawStringInSurface(Common::String('0' + _angleRotationIndex - 3), 79, 141, back, yellow, surface, 'Z' - '$' + 1);
- drawStringInSurface(Common::String('3' - _playerStepIndex), 63, 141, back, yellow, surface, 'Z' - '$' + 1);
- drawStringInSurface(Common::String('7' - _playerHeightNumber), 240, 141, back, yellow, surface, 'Z' - '$' + 1);
+ drawStringInSurface(shiftStr("0", 'Z' - '$' + 1 - _angleRotationIndex), 79, 141, back, yellow, surface);
+ drawStringInSurface(shiftStr("3", 'Z' - '$' + 1 - _playerStepIndex), 63, 141, back, yellow, surface);
+ drawStringInSurface(shiftStr("7", 'Z' - '$' + 1 - _playerHeightNumber), 240, 141, back, yellow, surface);
if (_shootingFrames > 0) {
- drawStringInSurface("4", 232, 141, back, yellow, surface, 'Z' - '$' + 1);
- drawStringInSurface("<", 240, 141, back, yellow, surface, 'Z' - '$' + 1);
+ drawStringInSurface(shiftStr("4", 'Z' - '$' + 1), 232, 141, back, yellow, surface);
+ drawStringInSurface(shiftStr("<", 'Z' - '$' + 1) , 240, 141, back, yellow, surface);
}
drawAnalogClock(surface, 89, 172, back, back, gray);
Commit: 7af929823bbae2b2ef1a1fc2974b20e0f20ac3d5
https://github.com/scummvm/scummvm/commit/7af929823bbae2b2ef1a1fc2974b20e0f20ac3d5
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-01-25T17:33:22+01:00
Commit Message:
FREESCAPE: fix symbol handling for eclipse in cpc
Changed paths:
engines/freescape/games/eclipse/cpc.cpp
diff --git a/engines/freescape/games/eclipse/cpc.cpp b/engines/freescape/games/eclipse/cpc.cpp
index 7e36f6b003f..3f9fa11b480 100644
--- a/engines/freescape/games/eclipse/cpc.cpp
+++ b/engines/freescape/games/eclipse/cpc.cpp
@@ -185,7 +185,8 @@ void EclipseEngine::drawCPCUI(Graphics::Surface *surface) {
drawStringInSurface(_currentArea->_name, 102, 135, back, front, surface);
Common::String scoreStr = Common::String::format("%07d", score);
- drawStringInSurface(scoreStr, 136, 6, back, other, surface, 'Z' - '0' + 1);
+ Common::String encodedScoreStr = shiftStr(scoreStr, 'Z' - '0' + 1);
+ drawStringInSurface(encodedScoreStr, 136, 6, back, other, surface);
int x = 171;
if (shield < 10)
@@ -196,13 +197,13 @@ void EclipseEngine::drawCPCUI(Graphics::Surface *surface) {
Common::String shieldStr = Common::String::format("%d", shield);
drawStringInSurface(shieldStr, x, 162, back, other, surface);
- drawStringInSurface(Common::String('0' + _angleRotationIndex - 3), 79, 135, back, front, surface, 'Z' - '$' + 1);
- drawStringInSurface(Common::String('3' - _playerStepIndex), 63, 135, back, front, surface, 'Z' - '$' + 1);
- drawStringInSurface(Common::String('7' - _playerHeightNumber), 240, 135, back, front, surface, 'Z' - '$' + 1);
+ drawStringInSurface(shiftStr("0", 'Z' - '$' + 1 - _angleRotationIndex), 79, 135, back, front, surface);
+ drawStringInSurface(shiftStr("3", 'Z' - '$' + 1 - _playerStepIndex), 63, 135, back, front, surface);
+ drawStringInSurface(shiftStr("7", 'Z' - '$' + 1 - _playerHeightNumber), 240, 135, back, front, surface);
if (_shootingFrames > 0) {
- drawStringInSurface("4", 232, 135, back, front, surface, 'Z' - '$' + 1);
- drawStringInSurface("<", 240, 135, back, front, surface, 'Z' - '$' + 1);
+ drawStringInSurface(shiftStr("4", 'Z' - '$' + 1), 232, 135, back, front, surface);
+ drawStringInSurface(shiftStr("<", 'Z' - '$' + 1), 240, 135, back, front, surface);
}
drawAnalogClock(surface, 90, 172, back, other, front);
drawIndicator(surface, 45, 4, 12);
Commit: 1cb5e2bc1e5d1f639a8b3bc809a63940e82c2796
https://github.com/scummvm/scummvm/commit/1cb5e2bc1e5d1f639a8b3bc809a63940e82c2796
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-01-25T17:33:22+01:00
Commit Message:
FREESCAPE: use correct sound for shooting in eclipse for dos
Changed paths:
engines/freescape/games/eclipse/dos.cpp
diff --git a/engines/freescape/games/eclipse/dos.cpp b/engines/freescape/games/eclipse/dos.cpp
index 7e2d4bf51d1..f75fdc6a3e4 100644
--- a/engines/freescape/games/eclipse/dos.cpp
+++ b/engines/freescape/games/eclipse/dos.cpp
@@ -34,6 +34,7 @@ extern byte kCGAPalettePinkBlue[4][3];
void EclipseEngine::initDOS() {
_viewArea = Common::Rect(40, 33, 280, 133);
+ _soundIndexShoot = 18;
}
void EclipseEngine::loadAssetsDOSFullGame() {
More information about the Scummvm-git-logs
mailing list