[Scummvm-git-logs] scummvm master -> 6c4c8139124cfec316eb9c93bf63b097f4cc75d2
neuromancer
noreply at scummvm.org
Mon Apr 28 21:27:32 UTC 2025
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
f1b305a05b FREESCAPE: drilling fixes for driller
b599161ef5 FREESCAPE: fixes for c64 releases of driller and dark
6c4c813912 FREESCAPE: use glscissor in tinygl
Commit: f1b305a05b6d82e9d6fa73999f16ed15975810dd
https://github.com/scummvm/scummvm/commit/f1b305a05b6d82e9d6fa73999f16ed15975810dd
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-04-28T23:24:24+02:00
Commit Message:
FREESCAPE: drilling fixes for driller
Changed paths:
engines/freescape/games/driller/dos.cpp
engines/freescape/games/driller/driller.cpp
diff --git a/engines/freescape/games/driller/dos.cpp b/engines/freescape/games/driller/dos.cpp
index 191751d6ab3..e743a5be8ce 100644
--- a/engines/freescape/games/driller/dos.cpp
+++ b/engines/freescape/games/driller/dos.cpp
@@ -302,7 +302,7 @@ void DrillerEngine::loadAssetsDOSDemo() {
loadFonts(&file, 0x4eb0);
loadMessagesFixedSize(&file, 0x636, 14, 20);
load8bitBinary(&file, 0x55b0, 4);
- loadGlobalObjects(&file, 0x8c, 5);
+ loadGlobalObjects(&file, 0x53, 8);
_border = load8bitDemoImage(&file, 0x6220);
_border->setPalette((byte*)&kCGAPalettePinkBlueWhiteData, 0, 4);
diff --git a/engines/freescape/games/driller/driller.cpp b/engines/freescape/games/driller/driller.cpp
index 11e92ba5b70..3c9dd8f3bf4 100644
--- a/engines/freescape/games/driller/driller.cpp
+++ b/engines/freescape/games/driller/driller.cpp
@@ -530,8 +530,6 @@ void DrillerEngine::pressedKey(const int keycode) {
} else if (keycode == kActionRollLeft) {
rotate(0, 0, _angleRotations[_angleRotationIndex]);
} else if (keycode == kActionDeployDrillingRig) {
- if (isDOS() && isDemo()) // No support for drilling here yet
- return;
clearTemporalMessages();
Common::Point gasPocket = _currentArea->_gasPocketPosition;
uint32 gasPocketRadius = _currentArea->_gasPocketRadius;
@@ -568,6 +566,9 @@ void DrillerEngine::pressedKey(const int keycode) {
_gameStateVars[k8bitVariableEnergy] = _gameStateVars[k8bitVariableEnergy] - 5;
const Math::Vector3d gasPocket3D(gasPocket.x, drill.y(), gasPocket.y);
float distanceToPocket = (gasPocket3D - drill).length();
+ debugC(1, kFreescapeDebugMove, "Gas pocket position: %f %f %f", gasPocket3D.x(), gasPocket3D.y(), gasPocket3D.z());
+ debugC(1, kFreescapeDebugMove, "Distance to gas pocket: %f", distanceToPocket);
+
float success = _useAutomaticDrilling ? 100.0 : 100.0 * (1.0 - distanceToPocket / _currentArea->_gasPocketRadius);
insertTemporaryMessage(_messagesList[3], _countdown - 2);
addDrill(drill, success > 0);
@@ -645,7 +646,6 @@ Math::Vector3d DrillerEngine::drillPosition() {
Object *obj = (GeometricObject *)_areaMap[255]->objectWithID(255); // Drill base
assert(obj);
- position.setValue(0, position.x() - 128);
position.setValue(2, position.z() - 128);
return position;
}
@@ -774,6 +774,7 @@ void DrillerEngine::addDrill(const Math::Vector3d position, bool gasFound) {
// int drillObjectIDs[8] = {255, 254, 253, 252, 251, 250, 248, 247};
GeometricObject *obj = nullptr;
Math::Vector3d origin = position;
+ origin.setValue(0, origin.x() - 128);
int16 id;
int heightLastObject;
Commit: b599161ef50c77a8cc2cc52e4f883659191243f6
https://github.com/scummvm/scummvm/commit/b599161ef50c77a8cc2cc52e4f883659191243f6
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-04-28T23:24:24+02:00
Commit Message:
FREESCAPE: fixes for c64 releases of driller and dark
Changed paths:
engines/freescape/detection.cpp
engines/freescape/games/dark/c64.cpp
engines/freescape/games/dark/dark.cpp
engines/freescape/games/driller/c64.cpp
engines/freescape/gfx.cpp
diff --git a/engines/freescape/detection.cpp b/engines/freescape/detection.cpp
index caed4d62ee7..3b60f85ce1c 100644
--- a/engines/freescape/detection.cpp
+++ b/engines/freescape/detection.cpp
@@ -113,6 +113,15 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE | GF_C64_TAPE,
GUIO2(GUIO_NOMIDI, GAMEOPTION_AUTOMATIC_DRILLING)
},
+ {
+ "driller", // Disc release
+ "",
+ AD_ENTRY1s("DRILLER.C64.DATA", "055b261bf28f313041bc4c23ff03c8da", 55556),
+ Common::EN_ANY,
+ Common::kPlatformC64,
+ ADGF_UNSTABLE | GF_C64_DISC,
+ GUIO2(GUIO_NOMIDI, GAMEOPTION_AUTOMATIC_DRILLING)
+ },
{
"driller",
"",
@@ -527,9 +536,8 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE | GF_C64_TAPE,
GUIO2(GUIO_NOMIDI, GAMEOPTION_AUTOMATIC_DRILLING)
},
-
{
- "darkside", // Disk release
+ "darkside", // Disk release PAL?
"",
AD_ENTRY1s("DARKSIDE.C64.DATA", "1d8e42c71d6a9ae0e682396824dd12ba", 53780),
Common::EN_ANY,
@@ -537,6 +545,15 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE | GF_C64_DISC,
GUIO2(GUIO_NOMIDI, GAMEOPTION_AUTOMATIC_DRILLING)
},
+ {
+ "darkside", // Disk release NTSC?
+ "",
+ {"DARKSIDE.C64.DATA", 0, "0d4edbc562ac5a9e6b3cf8a2b763dc08", 53780},
+ Common::EN_ANY,
+ Common::kPlatformC64,
+ ADGF_UNSTABLE | GF_C64_DISC,
+ GUIO2(GUIO_NOMIDI, GAMEOPTION_AUTOMATIC_DRILLING)
+ },
// Total Eclipse
{
diff --git a/engines/freescape/games/dark/c64.cpp b/engines/freescape/games/dark/c64.cpp
index fec46d90c90..53278a19081 100644
--- a/engines/freescape/games/dark/c64.cpp
+++ b/engines/freescape/games/dark/c64.cpp
@@ -132,10 +132,10 @@ void DarkEngine::loadAssetsC64FullGame() {
_colorMap[13][3] = 0xdd;
// TODO
- _colorMap[14][0] = 0x00;
- _colorMap[14][1] = 0x00;
- _colorMap[14][2] = 0x00;
- _colorMap[14][3] = 0x00;
+ _colorMap[14][0] = 0xcc;
+ _colorMap[14][1] = 0xcc;
+ _colorMap[14][2] = 0xcc;
+ _colorMap[14][3] = 0xcc;
Graphics::Surface *surf = loadBundledImage("dark_border");
surf->convertToInPlace(_gfx->_texturePixelFormat);
diff --git a/engines/freescape/games/dark/dark.cpp b/engines/freescape/games/dark/dark.cpp
index ed29e196bfc..0a45f032cfc 100644
--- a/engines/freescape/games/dark/dark.cpp
+++ b/engines/freescape/games/dark/dark.cpp
@@ -318,6 +318,7 @@ void DarkEngine::loadAssets() {
_noEnergyMessage = _messagesList[16];
_fallenMessage = _messagesList[17];
_crushedMessage = _messagesList[10];
+ _forceEndGameMessage = _messagesList[18];
}
bool DarkEngine::tryDestroyECDFullGame(int index) {
diff --git a/engines/freescape/games/driller/c64.cpp b/engines/freescape/games/driller/c64.cpp
index 104f7a39f8f..8ee9e5751f0 100644
--- a/engines/freescape/games/driller/c64.cpp
+++ b/engines/freescape/games/driller/c64.cpp
@@ -44,7 +44,7 @@ void DrillerEngine::loadAssetsC64FullGame() {
} else if (_targetName.hasPrefix("driller")) {
file.open("driller.c64.data");
- if (_variant & GF_C64_TAPE) {
+ if (_variant) {
loadFonts(&file, 0x402);
load8bitBinary(&file, 0x8b04, 16);
loadMessagesFixedSize(&file, 0x167a, 14, 20);
@@ -117,16 +117,21 @@ void DrillerEngine::loadAssetsC64FullGame() {
_colorMap[10][2] = 0x5a;
_colorMap[10][3] = 0xa5;
- // TODO
- _colorMap[12][0] = 0xee;
- _colorMap[12][1] = 0x77;
- _colorMap[12][2] = 0x9e;
- _colorMap[12][3] = 0xd5;
-
- _colorMap[13][0] = 0xaf;
- _colorMap[13][1] = 0xfa;
- _colorMap[13][2] = 0xaf;
- _colorMap[13][3] = 0xfa;
+ _colorMap[11][0] = 0xaf;
+ _colorMap[11][1] = 0xfa;
+ _colorMap[11][2] = 0xaf;
+ _colorMap[11][3] = 0xfa;
+
+
+ _colorMap[12][0] = 0x77;
+ _colorMap[12][1] = 0xdd;
+ _colorMap[12][2] = 0x77;
+ _colorMap[12][3] = 0xdd;
+
+ _colorMap[13][0] = 0xcc;
+ _colorMap[13][1] = 0xcc;
+ _colorMap[13][2] = 0xcc;
+ _colorMap[13][3] = 0xcc;
// TODO
_colorMap[14][0] = 0x77;
diff --git a/engines/freescape/gfx.cpp b/engines/freescape/gfx.cpp
index fcfb8218d88..c9427cdbfca 100644
--- a/engines/freescape/gfx.cpp
+++ b/engines/freescape/gfx.cpp
@@ -151,13 +151,13 @@ byte getCGAStipple(byte x, int back, int fore) {
}
byte getC64Stipple(byte x, int back, int fore) {
- int c0 = x & 1 ? fore : back; //getC64Pixel(x, 0);
+ int c0 = getCGAPixel(x, 0);
assert(c0 == back || c0 == fore || back == fore);
- int c1 = (x >> 1) & 1 ? fore : back; //getC64Pixel(x, 1);
+ int c1 = getCGAPixel(x, 1);
assert(c1 == back || c1 == fore || back == fore);
- int c2 = (x >> 2) & 1 ? fore : back; //getC64Pixel(x, 2);
+ int c2 = getCGAPixel(x, 2);
assert(c2 == back || c2 == fore || back == fore);
- int c3 = (x >> 3) & 1 ? fore : back; //getC64Pixel(x, 3);
+ int c3 = getCGAPixel(x, 3);
assert(c3 == back || c3 == fore || back == fore);
byte st = 0;
Commit: 6c4c8139124cfec316eb9c93bf63b097f4cc75d2
https://github.com/scummvm/scummvm/commit/6c4c8139124cfec316eb9c93bf63b097f4cc75d2
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-04-28T23:30:15+02:00
Commit Message:
FREESCAPE: use glscissor in tinygl
Changed paths:
engines/freescape/gfx_tinygl.cpp
diff --git a/engines/freescape/gfx_tinygl.cpp b/engines/freescape/gfx_tinygl.cpp
index a6042e95711..5033c494fc7 100644
--- a/engines/freescape/gfx_tinygl.cpp
+++ b/engines/freescape/gfx_tinygl.cpp
@@ -90,6 +90,7 @@ void TinyGLRenderer::init() {
void TinyGLRenderer::setViewport(const Common::Rect &rect) {
_viewport = rect;
tglViewport(rect.left, g_system->getHeight() - rect.bottom, rect.width(), rect.height());
+ tglScissor(rect.left, g_system->getHeight() - rect.bottom, rect.width(), rect.height());
}
void TinyGLRenderer::drawTexturedRect2D(const Common::Rect &screenRect, const Common::Rect &textureRect, Texture *texture) {
@@ -538,46 +539,12 @@ void TinyGLRenderer::useColor(uint8 r, uint8 g, uint8 b) {
}
void TinyGLRenderer::clear(uint8 r, uint8 g, uint8 b, bool ignoreViewport) {
- tglClear(TGL_DEPTH_BUFFER_BIT | TGL_STENCIL_BITS);
- if (ignoreViewport) {
- tglClearColor(r / 255., g / 255., b / 255., 1.0);
- tglClear(TGL_COLOR_BUFFER_BIT);
- } else {
- // Create a viewport sized quad and color it
- useColor(r, g, b);
-
- tglMatrixMode(TGL_PROJECTION);
- tglPushMatrix();
- tglLoadIdentity();
-
- tglOrtho(0, _viewport.width(), _viewport.height(), 0, 0, 1);
- tglMatrixMode(TGL_MODELVIEW);
- tglPushMatrix();
- tglLoadIdentity();
-
- tglDisable(TGL_DEPTH_TEST);
- tglDepthMask(TGL_FALSE);
-
- tglEnableClientState(TGL_VERTEX_ARRAY);
- copyToVertexArray(0, Math::Vector3d(0, 0, 0));
- copyToVertexArray(1, Math::Vector3d(0, _viewport.height(), 0));
- copyToVertexArray(2, Math::Vector3d(_viewport.width(), _viewport.height(), 0));
-
- copyToVertexArray(3, Math::Vector3d(0, 0, 0));
- copyToVertexArray(4, Math::Vector3d(_viewport.width(), 0, 0));
- copyToVertexArray(5, Math::Vector3d(_viewport.width(), _viewport.height(), 0));
-
- tglVertexPointer(3, TGL_FLOAT, 0, _verts);
- tglDrawArrays(TGL_TRIANGLES, 0, 6);
- tglDisableClientState(TGL_VERTEX_ARRAY);
-
- tglEnable(TGL_DEPTH_TEST);
- tglDepthMask(TGL_TRUE);
-
- tglPopMatrix();
- tglMatrixMode(TGL_PROJECTION);
- tglPopMatrix();
- }
+ if (ignoreViewport)
+ tglDisable(TGL_SCISSOR_TEST);
+ tglClearColor(r / 255., g / 255., b / 255., 1.0);
+ tglClear(TGL_COLOR_BUFFER_BIT | TGL_DEPTH_BUFFER_BIT | TGL_STENCIL_BUFFER_BIT);
+ if (ignoreViewport)
+ tglEnable(TGL_SCISSOR_TEST);
}
void TinyGLRenderer::drawFloor(uint8 color) {
More information about the Scummvm-git-logs
mailing list