[Scummvm-git-logs] scummvm master -> 55534437bf6a6471f0b1e6f8d8fb03036bdd709b
neuromancer
noreply at scummvm.org
Sat Mar 7 12:04:36 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
55534437bf FREESCAPE: Fix minor UI fixes in Darkside CGA and global palettes for EGA and CGA
Commit: 55534437bf6a6471f0b1e6f8d8fb03036bdd709b
https://github.com/scummvm/scummvm/commit/55534437bf6a6471f0b1e6f8d8fb03036bdd709b
Author: Armaan Singh Sandhu (sandhuc36 at gmail.com)
Date: 2026-03-07T13:04:31+01:00
Commit Message:
FREESCAPE: Fix minor UI fixes in Darkside CGA and global palettes for EGA and CGA
Changed paths:
engines/freescape/freescape.h
engines/freescape/games/castle/dos.cpp
engines/freescape/games/dark/dark.cpp
engines/freescape/games/dark/dos.cpp
engines/freescape/games/driller/dos.cpp
engines/freescape/games/eclipse/dos.cpp
diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index 4089b64173d..12c3788a2ed 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -138,6 +138,13 @@ enum GameStateControl {
kFreescapeGameStateRestart,
};
+extern byte kEGADefaultPalette[16][3];
+extern byte kCGAPaletteRedGreen[4][3];
+extern byte kCGAPalettePinkBlue[4][3];
+extern byte kCGAPalettePinkBlueBright[4][3];
+extern byte kCGAPaletteRedGreenBright[4][3];
+extern byte kHerculesPaletteGreen[2][3];
+
struct CGAPaletteEntry {
int areaId;
byte *palette;
diff --git a/engines/freescape/games/castle/dos.cpp b/engines/freescape/games/castle/dos.cpp
index 5579106ab21..19bccb8e23f 100644
--- a/engines/freescape/games/castle/dos.cpp
+++ b/engines/freescape/games/castle/dos.cpp
@@ -49,7 +49,6 @@ Common::SeekableReadStream *CastleEngine::decryptFile(const Common::Path &filena
return (new Common::MemoryReadStream(encryptedBuffer, size));
}
-extern byte kEGADefaultPalette[16][3];
extern Common::MemoryReadStream *unpackEXE(Common::File &ms);
byte kEGARiddleFontPalette[16][3] = {
diff --git a/engines/freescape/games/dark/dark.cpp b/engines/freescape/games/dark/dark.cpp
index 25198558757..591254ea2a8 100644
--- a/engines/freescape/games/dark/dark.cpp
+++ b/engines/freescape/games/dark/dark.cpp
@@ -861,8 +861,23 @@ void DarkEngine::drawVerticalCompass(Graphics::Surface *surface, int x, int y, f
void DarkEngine::drawHorizontalCompass(int x, int y, float angle, uint32 front, uint32 back, Graphics::Surface *surface) {
// TODO implement different compass styles for C64, Amiga and Atari ST
uint32 transparent = _gfx->_texturePixelFormat.ARGBToColor(0x00, 0x00, 0x00, 0x00);
+
+ uint32 green = _gfx->_texturePixelFormat.ARGBToColor(0xff, 0x00, 0xaa, 0x00);
+
int delta = (angle - 180) / 5.5;
- drawStringInSurface("-N-E-S-W-N-E-S", delta + x, y, front, back, surface);
+ Common::String compass = "-N-E-S-W-N-E-S";
+
+ for (uint i = 0; i < compass.size(); i++) {
+ int charX = delta + x + (i * 8);
+ uint32 color = green;
+
+ if (charX >= x + 52 && charX < x + 60) {
+ color = front;
+ }
+
+ drawStringInSurface(Common::String(compass[i]), charX, y, color, back, surface);
+ }
+
surface->fillRect(Common::Rect(x - 20, y - 5, x + 40, y + 10), transparent);
surface->fillRect(Common::Rect(x + 80, y - 5, 320, y + 10), transparent);
}
diff --git a/engines/freescape/games/dark/dos.cpp b/engines/freescape/games/dark/dos.cpp
index 8d13cd30122..e2e2496abf5 100644
--- a/engines/freescape/games/dark/dos.cpp
+++ b/engines/freescape/games/dark/dos.cpp
@@ -27,22 +27,6 @@
namespace Freescape {
-extern byte kEGADefaultPalette[16][3];
-
-byte kDarkCGAPalettePinkBlue[4][3] = {
- {0x00, 0x00, 0x00},
- {0x00, 0xaa, 0xaa},
- {0xaa, 0x00, 0xaa},
- {0xaa, 0xaa, 0xaa},
-};
-
-byte kDarkCGAPaletteRedGreen[4][3] = {
- {0x00, 0x00, 0x00},
- {0x00, 0xaa, 0x00},
- {0xaa, 0x00, 0x00},
- {0xaa, 0x55, 0x00},
-};
-
void DarkEngine::initDOS() {
if (_renderMode == Common::kRenderEGA)
_viewArea = Common::Rect(40, 24, 280, 125);
@@ -90,7 +74,7 @@ void DarkEngine::loadAssetsDOSDemo() {
file.open("SCN1C.DAT");
if (file.isOpen()) {
_title = load8bitBinImage(&file, 0x0);
- _title->setPalette((byte *)&kDarkCGAPalettePinkBlue, 0, 4);
+ _title->setPalette((byte *)&kCGAPalettePinkBlue, 0, 4);
}
file.close();
file.open("DSIDEC.EXE");
@@ -105,7 +89,7 @@ void DarkEngine::loadAssetsDOSDemo() {
loadGlobalObjects(&file, 0x2554, 23);
load8bitBinary(&file, 0x8a70, 4);
_border = load8bitBinImage(&file, 0x210);
- _border->setPalette((byte *)&kDarkCGAPalettePinkBlue, 0, 4);
+ _border->setPalette((byte *)&kCGAPalettePinkBlue, 0, 4);
swapPalette(1);
} else
@@ -146,7 +130,7 @@ void DarkEngine::loadAssetsDOSFullGame() {
file.open("SCN1C.DAT");
if (file.isOpen()) {
_title = load8bitBinImage(&file, 0x0);
- _title->setPalette((byte *)&kDarkCGAPalettePinkBlue, 0, 4);
+ _title->setPalette((byte *)&kCGAPalettePinkBlue, 0, 4);
}
file.close();
file.open("DSIDEC.EXE");
@@ -155,12 +139,12 @@ void DarkEngine::loadAssetsDOSFullGame() {
error("Failed to open DSIDEC.EXE");
loadSpeakerFxDOS(&file, 0x3077 + 0x200, 0x2f28 + 0x200, 20);
- loadFonts(&file, 0x8497);
+ loadFonts(&file, 0x8496);
loadMessagesFixedSize(&file, 0x2d65, 16, 27);
loadGlobalObjects(&file, 0x2554, 23);
load8bitBinary(&file, 0x8600, 16);
_border = load8bitBinImage(&file, 0x210);
- _border->setPalette((byte *)&kDarkCGAPalettePinkBlue, 0, 4);
+ _border->setPalette((byte *)&kCGAPalettePinkBlue, 0, 4);
swapPalette(1);
} else
@@ -223,23 +207,23 @@ void DarkEngine::drawDOSUI(Graphics::Surface *surface) {
if (shield >= 0) {
Common::Rect shieldBar;
shieldBar = Common::Rect(72, 140, 151 - (_maxShield - shield), 141); // Upper outer shieldBar
- surface->fillRect(shieldBar, front);
+ surface->fillRect(shieldBar, blue);
shieldBar = Common::Rect(72, 145, 151 - (_maxShield - shield), 146); // Lower outer shieldBar
- surface->fillRect(shieldBar, front);
+ surface->fillRect(shieldBar, blue);
shieldBar = Common::Rect(72, 142, 151 - (_maxShield - shield), 144); // Inner shieldBar
- surface->fillRect(shieldBar, blue);
+ surface->fillRect(shieldBar, front);
}
if (energy >= 0) {
Common::Rect energyBar;
energyBar = Common::Rect(72, 148, 151 - (_maxEnergy - energy), 149); // Upper outer energyBar
- surface->fillRect(energyBar, front);
+ surface->fillRect(energyBar, blue);
energyBar = Common::Rect(72, 153, 151 - (_maxEnergy - energy), 154); // Lower outer energyBar
- surface->fillRect(energyBar, front);
+ surface->fillRect(energyBar, blue);
energyBar = Common::Rect(72, 150, 151 - (_maxEnergy - energy), 152); // Inner energyBar
- surface->fillRect(energyBar, blue);
+ surface->fillRect(energyBar, front);
}
uint32 clockColor = _renderMode == Common::kRenderCGA ? front : _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xFF, 0xFF, 0xFF);
drawBinaryClock(surface, 300, 124, clockColor, back);
diff --git a/engines/freescape/games/driller/dos.cpp b/engines/freescape/games/driller/dos.cpp
index 45b91095b38..b3d4697b339 100644
--- a/engines/freescape/games/driller/dos.cpp
+++ b/engines/freescape/games/driller/dos.cpp
@@ -27,11 +27,6 @@
namespace Freescape {
-extern byte kEGADefaultPalette[16][3];
-extern byte kCGAPaletteRedGreen[4][3];
-extern byte kCGAPalettePinkBlue[4][3];
-extern byte kHerculesPaletteGreen[2][3];
-
void DrillerEngine::initDOS() {
if (_renderMode == Common::kRenderEGA)
_viewArea = Common::Rect(40, 16, 280, 117);
@@ -156,13 +151,6 @@ Graphics::ManagedSurface *DrillerEngine::load8bitTitleImage(Common::SeekableRead
return surface;
}
-byte kCGAPalettePinkBlueWhiteData[4][3] = {
- {0x00, 0x00, 0x00},
- {0x55, 0xff, 0xff},
- {0xff, 0x55, 0xff},
- {0xff, 0xff, 0xff},
-};
-
/*
The following function is only used for decoding images for
the Driller DOS demo
@@ -244,13 +232,13 @@ void DrillerEngine::loadAssetsDOSFullGame() {
file.open("SCN1C.DAT");
if (file.isOpen()) {
_title = load8bitBinImage(&file, 0x0);
- _title->setPalette((byte*)&kCGAPalettePinkBlueWhiteData, 0, 4);
+ _title->setPalette((byte*)&kCGAPalettePinkBlueBright, 0, 4);
}
file.close();
file.open("CGATITLE.RL");
if (file.isOpen()) {
_title = load8bitTitleImage(&file, 0x1b2);
- _title->setPalette((byte*)&kCGAPalettePinkBlueWhiteData, 0, 4);
+ _title->setPalette((byte*)&kCGAPalettePinkBlueBright, 0, 4);
}
file.close();
file.open("DRILLC.EXE");
@@ -265,7 +253,7 @@ void DrillerEngine::loadAssetsDOSFullGame() {
loadGlobalObjects(&file, 0x1fa2, 8);
load8bitBinary(&file, 0x7bb0, 4);
_border = load8bitBinImage(&file, 0x210);
- _border->setPalette((byte*)&kCGAPalettePinkBlueWhiteData, 0, 4);
+ _border->setPalette((byte*)&kCGAPalettePinkBlueBright, 0, 4);
swapPalette(1);
} else if (_renderMode == Common::kRenderHercG) {
file.open("SCN1H.DAT");
@@ -309,7 +297,7 @@ void DrillerEngine::loadAssetsDOSDemo() {
error("Failed to open 'd1' file");
_title = load8bitDemoImage(&file, 0x0);
- _title->setPalette((byte*)&kCGAPalettePinkBlueWhiteData, 0, 4);
+ _title->setPalette((byte*)&kCGAPalettePinkBlueBright, 0, 4);
file.close();
file.open("d2");
@@ -321,7 +309,7 @@ void DrillerEngine::loadAssetsDOSDemo() {
loadGlobalObjects(&file, 0x53, 8);
load8bitBinary(&file, 0x55b0, 4);
_border = load8bitDemoImage(&file, 0x6220);
- _border->setPalette((byte*)&kCGAPalettePinkBlueWhiteData, 0, 4);
+ _border->setPalette((byte*)&kCGAPalettePinkBlueBright, 0, 4);
// Fixes corrupted area names in the demo data
_areaMap[2]->_name = "LAPIS LAZULI";
diff --git a/engines/freescape/games/eclipse/dos.cpp b/engines/freescape/games/eclipse/dos.cpp
index b23b05a81b1..032e7706ada 100644
--- a/engines/freescape/games/eclipse/dos.cpp
+++ b/engines/freescape/games/eclipse/dos.cpp
@@ -28,12 +28,6 @@
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);
_soundIndexShoot = 18;
More information about the Scummvm-git-logs
mailing list