[Scummvm-git-logs] scummvm master -> 9afa18c133fffc18a22d0f71cc2552a423d0031e
neuromancer
noreply at scummvm.org
Sun Sep 10 06:32:36 UTC 2023
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:
76b72df577 FREESCAPE: added indicators for cpc release of dark
9afa18c133 FREESCAPE: improved color handling in cpc
Commit: 76b72df577e2adba45b0fca42ef3596f9181e34b
https://github.com/scummvm/scummvm/commit/76b72df577e2adba45b0fca42ef3596f9181e34b
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-09-10T08:31:49+02:00
Commit Message:
FREESCAPE: added indicators for cpc release of dark
Changed paths:
A devtools/create_freescape/dark_crouch_indicator_Amstrad CPC.bmp
A devtools/create_freescape/dark_fallen_indicator_Amstrad CPC.bmp
A devtools/create_freescape/dark_jet_indicator_Amstrad CPC.bmp
A devtools/create_freescape/dark_walk_indicator_Amstrad CPC.bmp
dists/engine-data/freescape.dat
engines/freescape/games/dark/cpc.cpp
diff --git a/devtools/create_freescape/dark_crouch_indicator_Amstrad CPC.bmp b/devtools/create_freescape/dark_crouch_indicator_Amstrad CPC.bmp
new file mode 100644
index 00000000000..ac7cce50fd0
Binary files /dev/null and b/devtools/create_freescape/dark_crouch_indicator_Amstrad CPC.bmp differ
diff --git a/devtools/create_freescape/dark_fallen_indicator_Amstrad CPC.bmp b/devtools/create_freescape/dark_fallen_indicator_Amstrad CPC.bmp
new file mode 100644
index 00000000000..bfa6dee5b6d
Binary files /dev/null and b/devtools/create_freescape/dark_fallen_indicator_Amstrad CPC.bmp differ
diff --git a/devtools/create_freescape/dark_jet_indicator_Amstrad CPC.bmp b/devtools/create_freescape/dark_jet_indicator_Amstrad CPC.bmp
new file mode 100644
index 00000000000..f6068c8563a
Binary files /dev/null and b/devtools/create_freescape/dark_jet_indicator_Amstrad CPC.bmp differ
diff --git a/devtools/create_freescape/dark_walk_indicator_Amstrad CPC.bmp b/devtools/create_freescape/dark_walk_indicator_Amstrad CPC.bmp
new file mode 100644
index 00000000000..1325c82823a
Binary files /dev/null and b/devtools/create_freescape/dark_walk_indicator_Amstrad CPC.bmp differ
diff --git a/dists/engine-data/freescape.dat b/dists/engine-data/freescape.dat
index 9685127f0c7..b2ec93d3552 100644
Binary files a/dists/engine-data/freescape.dat and b/dists/engine-data/freescape.dat differ
diff --git a/engines/freescape/games/dark/cpc.cpp b/engines/freescape/games/dark/cpc.cpp
index d5a282bfc57..cddee0588ad 100644
--- a/engines/freescape/games/dark/cpc.cpp
+++ b/engines/freescape/games/dark/cpc.cpp
@@ -71,6 +71,13 @@ void DarkEngine::loadAssetsCPCFullGame() {
addECDs(it._value);
addSkanner(it._value);
}
+ _indicators.push_back(loadBundledImage("dark_fallen_indicator"));
+ _indicators.push_back(loadBundledImage("dark_crouch_indicator"));
+ _indicators.push_back(loadBundledImage("dark_walk_indicator"));
+ _indicators.push_back(loadBundledImage("dark_jet_indicator"));
+
+ for (auto &it : _indicators)
+ it->convertToInPlace(_gfx->_texturePixelFormat, nullptr);
}
void DarkEngine::drawCPCUI(Graphics::Surface *surface) {
@@ -90,9 +97,9 @@ void DarkEngine::drawCPCUI(Graphics::Surface *surface) {
int score = _gameStateVars[k8bitVariableScore];
int ecds = _gameStateVars[kVariableActiveECDs];
- drawStringInSurface(Common::String::format("%04d", int(2 * _position.x())), 200, 137, front, back, surface);
- drawStringInSurface(Common::String::format("%04d", int(2 * _position.z())), 200, 137 + 9, front, back, surface);
- drawStringInSurface(Common::String::format("%04d", int(2 * _position.y())), 200, 137 + 9, front, back, surface);
+ drawStringInSurface(Common::String::format("%04d", int(2 * _position.x())), 199, 137, front, back, surface);
+ drawStringInSurface(Common::String::format("%04d", int(2 * _position.z())), 199, 145, front, back, surface);
+ drawStringInSurface(Common::String::format("%04d", int(2 * _position.y())), 199, 153, front, back, surface);
drawStringInSurface(Common::String::format("%02d", int(_angleRotations[_angleRotationIndex])), 72, 168, front, back, surface);
drawStringInSurface(Common::String::format("%3d", _playerSteps[_playerStepIndex]), 72, 177, front, back, surface);
@@ -133,7 +140,7 @@ void DarkEngine::drawCPCUI(Graphics::Surface *surface) {
surface->fillRect(energyBar, front);
}
drawBinaryClock(surface, 300, 124, front, back);
- //drawIndicator(surface, 152, 140);
+ drawIndicator(surface, 160, 136);
}
} // End of namespace Freescape
\ No newline at end of file
Commit: 9afa18c133fffc18a22d0f71cc2552a423d0031e
https://github.com/scummvm/scummvm/commit/9afa18c133fffc18a22d0f71cc2552a423d0031e
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-09-10T08:31:49+02:00
Commit Message:
FREESCAPE: improved color handling in cpc
Changed paths:
engines/freescape/games/dark/dark.cpp
engines/freescape/games/driller/driller.cpp
engines/freescape/games/palettes.cpp
engines/freescape/gfx.cpp
diff --git a/engines/freescape/games/dark/dark.cpp b/engines/freescape/games/dark/dark.cpp
index 5863ae28bf3..bb8cb9a9720 100644
--- a/engines/freescape/games/dark/dark.cpp
+++ b/engines/freescape/games/dark/dark.cpp
@@ -495,8 +495,8 @@ void DarkEngine::gotoArea(uint16 areaID, int entranceID) {
_gfx->setColorRemaps(&_currentArea->_colorRemaps);
swapPalette(areaID);
- _currentArea->_skyColor = 0;
- _currentArea->_usualBackgroundColor = 0;
+ _currentArea->_skyColor = isCPC() ? 1 : 0;
+ _currentArea->_usualBackgroundColor = isCPC() ? 1 : 0;
resetInput();
}
diff --git a/engines/freescape/games/driller/driller.cpp b/engines/freescape/games/driller/driller.cpp
index bc7cef6f942..6d6cdcd9b47 100644
--- a/engines/freescape/games/driller/driller.cpp
+++ b/engines/freescape/games/driller/driller.cpp
@@ -166,7 +166,8 @@ void DrillerEngine::gotoArea(uint16 areaID, int entranceID) {
_currentArea->_skyColor = 0;
_currentArea->_usualBackgroundColor = 0;
} else if (isCPC()) {
- _currentArea->_skyColor = _currentArea->_usualBackgroundColor;
+ _currentArea->_usualBackgroundColor = 1;
+ _currentArea->_skyColor = 1;
}
resetInput();
diff --git a/engines/freescape/games/palettes.cpp b/engines/freescape/games/palettes.cpp
index 5bd981108cb..7fdd7a61591 100644
--- a/engines/freescape/games/palettes.cpp
+++ b/engines/freescape/games/palettes.cpp
@@ -74,8 +74,8 @@ byte kDrillerZXPalette[9][3] = {
};
byte kDrillerCPCPalette[32][3] = {
- {0x00, 0x00, 0x00}, // 0: special case?
- {0x11, 0x22, 0x33},
+ {0x80, 0x80, 0x80}, // 0: special case?
+ {0x00, 0x00, 0x00}, // 1: used in dark only?
{0x80, 0xff, 0x80}, // 2
{0xff, 0xff, 0x80}, // 3
{0x11, 0x22, 0x33},
diff --git a/engines/freescape/gfx.cpp b/engines/freescape/gfx.cpp
index df2f16c427b..9d37a2dea9b 100644
--- a/engines/freescape/gfx.cpp
+++ b/engines/freescape/gfx.cpp
@@ -361,6 +361,18 @@ bool Renderer::getRGBAtCPC(uint8 index, uint8 &r1, uint8 &g1, uint8 &b1, uint8 &
if (_colorRemaps && _colorRemaps->contains(index)) {
index = (*_colorRemaps)[index];
+ if (index == 0) {
+ r1 = g1 = b1 = 0;
+ r2 = r1;
+ g2 = g1;
+ b2 = b1;
+ return true;
+ }
+ readFromPalette(index, r1, g1, b1);
+ r2 = r1;
+ g2 = g1;
+ b2 = b1;
+ return true;
}
assert (_renderMode == Common::kRenderCPC);
More information about the Scummvm-git-logs
mailing list