[Scummvm-git-logs] scummvm master -> 490620bfec5d3e3fea158c7260f6e4132a7267e9
neuromancer
noreply at scummvm.org
Wed Nov 13 22:21:15 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
490620bfec FREESCAPE: some small fixes for the driller UI
Commit: 490620bfec5d3e3fea158c7260f6e4132a7267e9
https://github.com/scummvm/scummvm/commit/490620bfec5d3e3fea158c7260f6e4132a7267e9
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-11-13T23:22:53+01:00
Commit Message:
FREESCAPE: some small fixes for the driller UI
Changed paths:
engines/freescape/games/driller/cpc.cpp
engines/freescape/games/driller/dos.cpp
engines/freescape/games/driller/driller.cpp
engines/freescape/games/driller/driller.h
engines/freescape/games/driller/zx.cpp
diff --git a/engines/freescape/games/driller/cpc.cpp b/engines/freescape/games/driller/cpc.cpp
index aae02badd89..3849509a429 100644
--- a/engines/freescape/games/driller/cpc.cpp
+++ b/engines/freescape/games/driller/cpc.cpp
@@ -236,8 +236,8 @@ void DrillerEngine::drawCPCUI(Graphics::Surface *surface) {
surface->fillRect(shieldBar, front);
}
- drawCompass(surface, 87, 156, _yaw, 10, front);
- drawCompass(surface, 230, 156, _pitch - 30, 10, front);
+ drawCompass(surface, 87, 156, _yaw - 30, 10, 75, front);
+ drawCompass(surface, 230, 156, _pitch - 30, 10, 60, front);
}
} // End of namespace Freescape
\ No newline at end of file
diff --git a/engines/freescape/games/driller/dos.cpp b/engines/freescape/games/driller/dos.cpp
index 89899f3789e..0e12d31f093 100644
--- a/engines/freescape/games/driller/dos.cpp
+++ b/engines/freescape/games/driller/dos.cpp
@@ -156,12 +156,12 @@ Graphics::ManagedSurface *DrillerEngine::load8bitTitleImage(Common::SeekableRead
file->seek(offset);
for (int y = 0; y < 200; ++y) {
if (file->eos ()) break;
-
+
// Start of line data (0x02) or [premature] end of data (0x00)
int sol = file->readByte();
if (sol == 0) break;
assert(sol == 2);
-
+
int x = 0;
while (x < 320) {
int command = file->readByte();
@@ -414,7 +414,7 @@ void DrillerEngine::drawDOSUI(Graphics::Surface *surface) {
drawStringInSurface(Common::String::format("%3d", _playerSteps[_playerStepIndex]), playerStepsPos.x, playerStepsPos.y, front, back, surface);
- Common::Point scorePos = _renderMode == Common::kRenderHercG ? Common::Point(522, 237) : Common::Point(238, 129);
+ Common::Point scorePos = _renderMode == Common::kRenderHercG ? Common::Point(522, 237) : Common::Point(239, 129);
drawStringInSurface(Common::String::format("%07d", score), scorePos.x, scorePos.y, front, back, surface);
int seconds, minutes, hours;
@@ -470,9 +470,9 @@ void DrillerEngine::drawDOSUI(Graphics::Surface *surface) {
if (_indicators.size() >= 2) {
if (!_flyMode)
- surface->copyRectToSurface(*_indicators[0], 132, 128, Common::Rect(_indicators[0]->w, _indicators[0]->h));
+ surface->copyRectToSurface(*_indicators[0], 132, 127, Common::Rect(_indicators[0]->w, _indicators[0]->h));
else
- surface->copyRectToSurface(*_indicators[1], 132, 128, Common::Rect(_indicators[1]->w, _indicators[1]->h));
+ surface->copyRectToSurface(*_indicators[1], 132, 127, Common::Rect(_indicators[1]->w, _indicators[1]->h));
}
color = _renderMode == Common::kRenderHercG ? 1 : 2;
@@ -480,9 +480,9 @@ void DrillerEngine::drawDOSUI(Graphics::Surface *surface) {
uint32 other = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
Common::Point compassYawPos = _renderMode == Common::kRenderHercG ? Common::Point(214, 264) : Common::Point(87, 156);
- drawCompass(surface, compassYawPos.x, compassYawPos.y, _yaw, 10, other);
+ drawCompass(surface, compassYawPos.x, compassYawPos.y, _yaw - 30, 10, 75, other);
Common::Point compassPitchPos = _renderMode == Common::kRenderHercG ? Common::Point(502, 264) : Common::Point(230, 156);
- drawCompass(surface, compassPitchPos.x, compassPitchPos.y, _pitch - 30, 10, other);
+ drawCompass(surface, compassPitchPos.x, compassPitchPos.y, _pitch - 30, 10, 60, other);
}
} // End of namespace Freescape
diff --git a/engines/freescape/games/driller/driller.cpp b/engines/freescape/games/driller/driller.cpp
index ede9f5cbf5a..92ca868e012 100644
--- a/engines/freescape/games/driller/driller.cpp
+++ b/engines/freescape/games/driller/driller.cpp
@@ -970,8 +970,7 @@ void DrillerEngine::updateTimeVariables() {
}
}
-void DrillerEngine::drawCompass(Graphics::Surface *surface, int x, int y, double degrees, double magnitude, uint32 color) {
- double fov = 60;
+void DrillerEngine::drawCompass(Graphics::Surface *surface, int x, int y, double degrees, double magnitude, double fov, uint32 color) {
degrees = degrees + fov;
if (degrees >= 360)
degrees = degrees - 360;
diff --git a/engines/freescape/games/driller/driller.h b/engines/freescape/games/driller/driller.h
index 149346cbfe9..bd190ed1911 100644
--- a/engines/freescape/games/driller/driller.h
+++ b/engines/freescape/games/driller/driller.h
@@ -47,7 +47,7 @@ public:
void drawInfoMenu() override;
void drawSensorShoot(Sensor *sensor) override;
- void drawCompass(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, double fov, uint32 color);
void pressedKey(const int keycode) override;
Common::Error saveGameStreamExtended(Common::WriteStream *stream, bool isAutosave = false) override;
diff --git a/engines/freescape/games/driller/zx.cpp b/engines/freescape/games/driller/zx.cpp
index 7faf72addbc..1a0deaac29e 100644
--- a/engines/freescape/games/driller/zx.cpp
+++ b/engines/freescape/games/driller/zx.cpp
@@ -153,8 +153,8 @@ void DrillerEngine::drawZXUI(Graphics::Surface *surface) {
surface->fillRect(shieldBar, front);
}
- drawCompass(surface, 103, 160, _yaw, 10, front);
- drawCompass(surface, 220 - 3, 160, _pitch - 30, 10, front);
+ drawCompass(surface, 103, 160, _yaw - 30, 10, 75, front);
+ drawCompass(surface, 220 - 3, 160, _pitch - 30, 10, 60, front);
}
} // End of namespace Freescape
\ No newline at end of file
More information about the Scummvm-git-logs
mailing list