[Scummvm-git-logs] scummvm master -> b9891b42189d0ef6a4597a66e1b8972590418fbd
neuromancer
noreply at scummvm.org
Sat Feb 14 16:53:10 UTC 2026
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
84d0c46ae7 FREESCAPE : Implementing Color Palettes for Total Eclipse CGA/Dos.
b9891b4218 FREESCAPE: Basic UI fixes in Total Eclipse DOS/CGA.
Commit: 84d0c46ae76ba01d16b7c4d0627ca6c79a51f721
https://github.com/scummvm/scummvm/commit/84d0c46ae76ba01d16b7c4d0627ca6c79a51f721
Author: Armaan Singh Sandhu (sandhuc36 at gmail.com)
Date: 2026-02-14T17:53:06+01:00
Commit Message:
FREESCAPE : Implementing Color Palettes for Total Eclipse CGA/Dos.
Changed paths:
engines/freescape/freescape.cpp
engines/freescape/freescape.h
engines/freescape/games/palettes.cpp
engines/freescape/loaders/8bitBinaryLoader.cpp
diff --git a/engines/freescape/freescape.cpp b/engines/freescape/freescape.cpp
index 610d4f98cdb..43ddb380192 100644
--- a/engines/freescape/freescape.cpp
+++ b/engines/freescape/freescape.cpp
@@ -473,6 +473,8 @@ void FreescapeEngine::drawBackground() {
}
void FreescapeEngine::drawFrame() {
+
+
int farClipPlane = _farClipPlane;
if (_currentArea->isOutside())
farClipPlane *= 100;
diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index 4e44f39eabd..cadd305bb71 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -418,7 +418,6 @@ public:
uint16 _playerWidth;
uint16 _playerDepth;
uint16 _stepUpDistance;
-
int _playerStepIndex;
Common::Array<int> _playerSteps;
diff --git a/engines/freescape/games/palettes.cpp b/engines/freescape/games/palettes.cpp
index 207fe154153..8249dc952c7 100644
--- a/engines/freescape/games/palettes.cpp
+++ b/engines/freescape/games/palettes.cpp
@@ -56,6 +56,20 @@ byte kCGAPaletteRedGreen[4][3] = {
{0xaa, 0x55, 0x00},
};
+byte kCGAPalettePinkBlueBright[4][3] = {
+ {0x00, 0x00, 0x00},
+ {0x55, 0xff, 0xff},
+ {0xff, 0x55, 0xff},
+ {0xff, 0xff, 0xff},
+};
+
+byte kCGAPaletteRedGreenBright[4][3] = {
+ {0x00, 0x00, 0x00},
+ {0x55, 0xff, 0x55},
+ {0xff, 0x55, 0x55},
+ {0xff, 0xff, 0x55},
+};
+
byte kHerculesPaletteGreen[2][3] = {
{0x00, 0x00, 0x00},
{0x00, 0xff, 0x00},
@@ -256,10 +270,22 @@ void FreescapeEngine::swapPalette(uint16 levelID) {
}
byte *FreescapeEngine::findCGAPalette(uint16 levelID) {
- if (levelID % 2 == 0)
- return (byte *)&kCGAPalettePinkBlue;
- else
- return (byte *)&kCGAPaletteRedGreen;
+ if (isDriller() || isDark() || isCastle()) {
+ if (levelID % 2 == 0)
+ return (byte *)&kCGAPalettePinkBlue;
+ else
+ return (byte *)&kCGAPaletteRedGreen;
+ }
+ if (isEclipse()) {
+ if (_areaMap.contains(levelID)) {
+ if (_areaMap[levelID]->_extraColor[0] & 0x01) {
+ return (byte *)&kCGAPaletteRedGreenBright;
+ } else {
+ return (byte *)&kCGAPalettePinkBlueBright;
+ }
+ }
+ }
+ return (byte *)&kCGAPaletteRedGreenBright;
}
} // End of namespace Freescape
diff --git a/engines/freescape/loaders/8bitBinaryLoader.cpp b/engines/freescape/loaders/8bitBinaryLoader.cpp
index 66fa75f0e93..4ea9d48ec11 100644
--- a/engines/freescape/loaders/8bitBinaryLoader.cpp
+++ b/engines/freescape/loaders/8bitBinaryLoader.cpp
@@ -678,6 +678,10 @@ Area *FreescapeEngine::load8bitArea(Common::SeekableReadStream *file, uint16 nco
uint8 extraColor[4] = {};
if (isEclipse()) {
byte idx = readField(file, 8);
+ if (isDOS()) {
+ extraColor[0] = idx;
+ }
+
if (isEclipse2()) {
name = idx < 8 ? eclipse2RoomName[idx] : eclipse2RoomName[8];
} else
Commit: b9891b42189d0ef6a4597a66e1b8972590418fbd
https://github.com/scummvm/scummvm/commit/b9891b42189d0ef6a4597a66e1b8972590418fbd
Author: Armaan Singh Sandhu (sandhuc36 at gmail.com)
Date: 2026-02-14T17:53:06+01:00
Commit Message:
FREESCAPE: Basic UI fixes in Total Eclipse DOS/CGA.
Changed paths:
A engines/freescape/stv6qO4e
engines/freescape/freescape.cpp
engines/freescape/freescape.h
engines/freescape/games/eclipse/dos.cpp
engines/freescape/games/eclipse/eclipse.cpp
engines/freescape/games/eclipse/eclipse.h
engines/freescape/games/palettes.cpp
engines/freescape/loaders/8bitBinaryLoader.cpp
diff --git a/engines/freescape/freescape.cpp b/engines/freescape/freescape.cpp
index 43ddb380192..610d4f98cdb 100644
--- a/engines/freescape/freescape.cpp
+++ b/engines/freescape/freescape.cpp
@@ -473,8 +473,6 @@ void FreescapeEngine::drawBackground() {
}
void FreescapeEngine::drawFrame() {
-
-
int farClipPlane = _farClipPlane;
if (_currentArea->isOutside())
farClipPlane *= 100;
diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index cadd305bb71..4e44f39eabd 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -418,6 +418,7 @@ public:
uint16 _playerWidth;
uint16 _playerDepth;
uint16 _stepUpDistance;
+
int _playerStepIndex;
Common::Array<int> _playerSteps;
diff --git a/engines/freescape/games/eclipse/dos.cpp b/engines/freescape/games/eclipse/dos.cpp
index c77c05a58e9..ae61e2fc5eb 100644
--- a/engines/freescape/games/eclipse/dos.cpp
+++ b/engines/freescape/games/eclipse/dos.cpp
@@ -31,6 +31,8 @@ namespace Freescape {
extern byte kEGADefaultPalette[16][3];
extern byte kCGAPaletteRedGreen[4][3];
extern byte kCGAPalettePinkBlue[4][3];
+extern byte kCGAPaletteRedGreenBright[4][3];
+extern byte kCGAPalettePinkBlueBright[4][3];
void EclipseEngine::initDOS() {
_viewArea = Common::Rect(40, 33, 280, 133);
@@ -75,7 +77,7 @@ void EclipseEngine::loadAssetsDOSFullGame() {
file.open("SCN1C.DAT");
if (file.isOpen()) {
_title = load8bitBinImage(&file, 0x0);
- _title->setPalette((byte *)&kCGAPaletteRedGreen, 0, 4);
+ _title->setPalette((byte *)&kCGAPaletteRedGreenBright, 0, 4);
}
file.close();
file.open("TOTEC.EXE");
@@ -102,22 +104,37 @@ void EclipseEngine::drawDOSUI(Graphics::Surface *surface) {
uint32 yellow = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xFF, 0xFF, 0x55);
uint32 black = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x00, 0x00, 0x00);
uint32 white = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xFF, 0xFF, 0xFF);
- uint32 red = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xFF, 0x00, 0x00);
- uint32 blue = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x55, 0x55, 0xFF);
+ //uint32 red = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xFF, 0x00, 0x00);
+ //uint32 blue = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x55, 0x55, 0xFF);
uint32 green = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x55, 0xFF, 0x55);
uint32 redish = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xFF, 0x55, 0x55);
+ //uint32 transparent = _gfx->_texturePixelFormat.ARGBToColor(0x00, 0x00, 0x00, 0x00);
+ uint32 pink = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xFF, 0x55, 0xFF);
+ uint32 cyan = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x55, 0xFF, 0xFF);
+
+ uint32 color1 = cyan;
+ uint32 color2 = pink;
+ uint32 color3 = white;
+
+ if (_renderMode == Common::kRenderCGA) {
+ if (_currentArea && (_currentArea->_extraColor[0] & 0x01)) {
+ color1 = green;
+ color2 = redish;
+ color3 = yellow;
+ }
+ }
Common::String message;
int deadline;
getLatestMessages(message, deadline);
if (deadline <= _countdown) {
- drawStringInSurface(message, 102, 135, black, yellow, surface);
+ drawStringInSurface(message, 102, 135, black, color3, surface);
_temporaryMessages.push_back(message);
_temporaryMessageDeadlines.push_back(deadline);
} else if (!_currentAreaMessages.empty())
- drawStringInSurface(_currentArea->_name, 102, 135, black, yellow, surface);
+ drawStringInSurface(_currentArea->_name, 102, 135, black, color3, surface);
- drawScoreString(score, 136, 6, black, white, surface);
+ drawScoreString(score, 136, 6, black, color2, surface);
int x = 171;
if (shield < 10)
@@ -126,27 +143,28 @@ void EclipseEngine::drawDOSUI(Graphics::Surface *surface) {
x = 175;
Common::String shieldStr = Common::String::format("%d", shield);
- drawStringInSurface(shieldStr, x, 162, black, redish, surface);
+ drawStringInSurface(shieldStr, x, 162, black, color2, surface);
- 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);
+ drawStringInSurface(shiftStr("0", 'Z' - '$' + 1 - _angleRotationIndex), 79, 135, black, color3, surface);
+ drawStringInSurface(shiftStr("3", 'Z' - '$' + 1 - _playerStepIndex), 63, 135, black, color3, surface);
+ drawStringInSurface(shiftStr("7", 'Z' - '$' + 1 - _playerHeightNumber), 240, 135, black, color3, surface);
if (_shootingFrames > 0) {
- drawStringInSurface(shiftStr("4", 'Z' - '$' + 1), 232, 135, black, yellow, surface);
- drawStringInSurface(shiftStr("<", 'Z' - '$' + 1), 240, 135, black, yellow, surface);
+ drawStringInSurface(shiftStr("4", 'Z' - '$' + 1), 232, 135, black, color3, surface);
+ drawStringInSurface(shiftStr("<", 'Z' - '$' + 1), 240, 135, black, color3, surface);
}
- drawAnalogClock(surface, 90, 172, black, red, white);
+ drawAnalogClock(surface, 90, 172, black, redish, white);
Common::Rect jarBackground(124, 165, 148, 192);
surface->fillRect(jarBackground, black);
+
Common::Rect jarWater(124, 192 - _gameStateVars[k8bitVariableEnergy], 148, 192);
- surface->fillRect(jarWater, blue);
+ surface->fillRect(jarWater, color1);
drawIndicator(surface, 41, 4, 16);
- drawEclipseIndicator(surface, 228, 0, yellow, green);
- surface->fillRect(Common::Rect(225, 168, 235, 187), white);
+ drawEclipseIndicator(surface, 228, 0, color3, color2, color1);
+ surface->fillRect(Common::Rect(225, 168, 235, 187), color3);
drawCompass(surface, 229, 177, _yaw, 10, black);
}
diff --git a/engines/freescape/games/eclipse/eclipse.cpp b/engines/freescape/games/eclipse/eclipse.cpp
index 75b4448fe79..ee4001655ba 100644
--- a/engines/freescape/games/eclipse/eclipse.cpp
+++ b/engines/freescape/games/eclipse/eclipse.cpp
@@ -356,6 +356,9 @@ void EclipseEngine::drawBackground() {
} else if (isAmiga() || isAtariST()) {
color1 = 8;
color2 = 14;
+ } else if (isDOS() && _renderMode == Common::kRenderCGA) {
+ color1 = 2;
+ color2 = 8;
}
_gfx->drawEclipse(color1, color2, progress);
@@ -627,20 +630,36 @@ void fillCircle(Graphics::Surface *surface, int x, int y, int radius, int color)
} while (cx <= cy);
}
-void EclipseEngine::drawEclipseIndicator(Graphics::Surface *surface, int x, int y, uint32 color1, uint32 color2) {
+void EclipseEngine::drawEclipseIndicator(Graphics::Surface *surface, int x, int y, uint32 color1, uint32 color2, uint32 color3) {
uint32 black = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x00, 0x00, 0x00);
-
- // These calls will cover the pixels of the hardcoded eclipse image
surface->fillRect(Common::Rect(x, y, x + 50, y + 20), black);
-
float progress = 0;
if (_countdown >= 0)
progress = float(_countdown) / _initialCountdown;
-
int difference = 14 * progress;
-
- fillCircle(surface, x + 7, y + 10, 7, color1); // Sun
- fillCircle(surface, x + 7 + difference, y + 10, 7, color2); // Moon
+ int radius = 7;
+ int sunX = x + 7;
+ int sunY = y + 10;
+ int moonX = x + 7 + difference;
+ int moonY = y + 10;
+ fillCircle(surface, sunX, sunY, radius, color1);
+ if (color3 != 0) {
+ for (int dy = -radius; dy <= radius; ++dy) {
+ for (int dx = -radius; dx <= radius; ++dx) {
+ if (dx * dx + dy * dy <= radius * radius) {
+ int px = moonX + dx;
+ int py = moonY + dy;
+ if ((px + py) % 2 == 0) {
+ surface->setPixel(px, py, color2);
+ } else {
+ surface->setPixel(px, py, color3);
+ }
+ }
+ }
+ }
+ } else {
+ fillCircle(surface, moonX, moonY, radius, color2);
+ }
}
void EclipseEngine::drawIndicator(Graphics::Surface *surface, int xPosition, int yPosition, int separation) {
diff --git a/engines/freescape/games/eclipse/eclipse.h b/engines/freescape/games/eclipse/eclipse.h
index 0532dea216e..b74d53fa470 100644
--- a/engines/freescape/games/eclipse/eclipse.h
+++ b/engines/freescape/games/eclipse/eclipse.h
@@ -90,7 +90,7 @@ public:
void drawAnalogClock(Graphics::Surface *surface, int x, int y, uint32 colorHand1, uint32 colorHand2, uint32 colorBack);
void drawAnalogClockHand(Graphics::Surface *surface, int x, int y, double degrees, double magnitude, uint32 color);
void drawCompass(Graphics::Surface *surface, int x, int y, double degrees, double magnitude, uint32 color);
- void drawEclipseIndicator(Graphics::Surface *surface, int x, int y, uint32 color1, uint32 color2);
+ void drawEclipseIndicator(Graphics::Surface *surface, int x, int y, uint32 color1, uint32 color2, uint32 color3 = 0);
Common::String getScoreString(int score);
void drawScoreString(int score, int x, int y, uint32 front, uint32 back, Graphics::Surface *surface);
diff --git a/engines/freescape/games/palettes.cpp b/engines/freescape/games/palettes.cpp
index 8249dc952c7..7786d96fd0a 100644
--- a/engines/freescape/games/palettes.cpp
+++ b/engines/freescape/games/palettes.cpp
@@ -277,15 +277,15 @@ byte *FreescapeEngine::findCGAPalette(uint16 levelID) {
return (byte *)&kCGAPaletteRedGreen;
}
if (isEclipse()) {
- if (_areaMap.contains(levelID)) {
- if (_areaMap[levelID]->_extraColor[0] & 0x01) {
- return (byte *)&kCGAPaletteRedGreenBright;
- } else {
- return (byte *)&kCGAPalettePinkBlueBright;
- }
- }
- }
- return (byte *)&kCGAPaletteRedGreenBright;
+ if (_areaMap.contains(levelID)) {
+ if (_areaMap[levelID]->_extraColor[0] & 0x01) {
+ return (byte *)&kCGAPaletteRedGreenBright;
+ } else {
+ return (byte *)&kCGAPalettePinkBlueBright;
+ }
+ }
+ }
+ return (byte *)&kCGAPaletteRedGreenBright;
}
} // End of namespace Freescape
diff --git a/engines/freescape/loaders/8bitBinaryLoader.cpp b/engines/freescape/loaders/8bitBinaryLoader.cpp
index 4ea9d48ec11..ccd8cbb2215 100644
--- a/engines/freescape/loaders/8bitBinaryLoader.cpp
+++ b/engines/freescape/loaders/8bitBinaryLoader.cpp
@@ -679,8 +679,8 @@ Area *FreescapeEngine::load8bitArea(Common::SeekableReadStream *file, uint16 nco
if (isEclipse()) {
byte idx = readField(file, 8);
if (isDOS()) {
- extraColor[0] = idx;
- }
+ extraColor[0] = idx;
+ }
if (isEclipse2()) {
name = idx < 8 ? eclipse2RoomName[idx] : eclipse2RoomName[8];
diff --git a/engines/freescape/stv6qO4e b/engines/freescape/stv6qO4e
new file mode 100644
index 00000000000..65fdb788dd5
Binary files /dev/null and b/engines/freescape/stv6qO4e differ
More information about the Scummvm-git-logs
mailing list