[Scummvm-git-logs] scummvm master -> 9d869f6c38a4fccd1cf1cad4a9094b2ed3590035
neuromancer
noreply at scummvm.org
Wed Aug 9 17:00:44 UTC 2023
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:
9d869f6c38 FREESCAPE: added more indicators for dark (zx)
Commit: 9d869f6c38a4fccd1cf1cad4a9094b2ed3590035
https://github.com/scummvm/scummvm/commit/9d869f6c38a4fccd1cf1cad4a9094b2ed3590035
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-08-09T18:58:32+02:00
Commit Message:
FREESCAPE: added more indicators for dark (zx)
Changed paths:
A devtools/create_freescape/dark_crouch_indicator_ZX Spectrum.bmp
A devtools/create_freescape/dark_fallen_indicator_ZX Spectrum.bmp
A devtools/create_freescape/dark_jet_indicator_ZX Spectrum.bmp
A devtools/create_freescape/dark_walk_indicator_ZX Spectrum.bmp
R devtools/create_freescape/dark_jet_indicator_zx.bmp
R devtools/create_freescape/dark_walk_indicator_zx.bmp
dists/engine-data/freescape.dat
engines/freescape/freescape.h
engines/freescape/games/dark/dark.cpp
engines/freescape/games/dark/dos.cpp
engines/freescape/games/dark/zx.cpp
diff --git a/devtools/create_freescape/dark_crouch_indicator_ZX Spectrum.bmp b/devtools/create_freescape/dark_crouch_indicator_ZX Spectrum.bmp
new file mode 100644
index 00000000000..d515692debe
Binary files /dev/null and b/devtools/create_freescape/dark_crouch_indicator_ZX Spectrum.bmp differ
diff --git a/devtools/create_freescape/dark_fallen_indicator_ZX Spectrum.bmp b/devtools/create_freescape/dark_fallen_indicator_ZX Spectrum.bmp
new file mode 100644
index 00000000000..f87bf99736a
Binary files /dev/null and b/devtools/create_freescape/dark_fallen_indicator_ZX Spectrum.bmp differ
diff --git a/devtools/create_freescape/dark_jet_indicator_zx.bmp b/devtools/create_freescape/dark_jet_indicator_ZX Spectrum.bmp
similarity index 100%
rename from devtools/create_freescape/dark_jet_indicator_zx.bmp
rename to devtools/create_freescape/dark_jet_indicator_ZX Spectrum.bmp
diff --git a/devtools/create_freescape/dark_walk_indicator_zx.bmp b/devtools/create_freescape/dark_walk_indicator_ZX Spectrum.bmp
similarity index 100%
rename from devtools/create_freescape/dark_walk_indicator_zx.bmp
rename to devtools/create_freescape/dark_walk_indicator_ZX Spectrum.bmp
diff --git a/dists/engine-data/freescape.dat b/dists/engine-data/freescape.dat
index dbb19a2f134..9685127f0c7 100644
Binary files a/dists/engine-data/freescape.dat and b/dists/engine-data/freescape.dat differ
diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index d3bfa06692d..35ae836079e 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -562,6 +562,8 @@ public:
void updateTimeVariables() override;
void drawBinaryClock(Graphics::Surface *surface, int xPosition, int yPosition, uint32 front, uint32 back);
+ void drawIndicator(Graphics::Surface *surface, int xPosition, int yPosition);
+
void drawSensorShoot(Sensor *sensor) override;
void drawDOSUI(Graphics::Surface *surface) override;
void drawZXUI(Graphics::Surface *surface) override;
diff --git a/engines/freescape/games/dark/dark.cpp b/engines/freescape/games/dark/dark.cpp
index e2e2cbb16de..a80ae57ce1b 100644
--- a/engines/freescape/games/dark/dark.cpp
+++ b/engines/freescape/games/dark/dark.cpp
@@ -663,6 +663,17 @@ void DarkEngine::drawBinaryClock(Graphics::Surface *surface, int xPosition, int
}
}
+void DarkEngine::drawIndicator(Graphics::Surface *surface, int xPosition, int yPosition) {
+ if (_hasFallen)
+ surface->copyRectToSurface(*_indicators[0], xPosition, yPosition, Common::Rect(_indicators[0]->w, _indicators[0]->h));
+ else if (_flyMode)
+ surface->copyRectToSurface(*_indicators[3], xPosition, yPosition, Common::Rect(_indicators[3]->w, _indicators[3]->h));
+ else if (_playerHeightNumber == 0)
+ surface->copyRectToSurface(*_indicators[1], xPosition, yPosition, Common::Rect(_indicators[1]->w, _indicators[1]->h));
+ else
+ surface->copyRectToSurface(*_indicators[2], xPosition, yPosition, Common::Rect(_indicators[2]->w, _indicators[2]->h));
+}
+
void DarkEngine::drawSensorShoot(Sensor *sensor) {
Math::Vector3d target;
target = _position;
diff --git a/engines/freescape/games/dark/dos.cpp b/engines/freescape/games/dark/dos.cpp
index 2e55a3cebcb..b3057d07baa 100644
--- a/engines/freescape/games/dark/dos.cpp
+++ b/engines/freescape/games/dark/dos.cpp
@@ -191,15 +191,7 @@ void DarkEngine::drawDOSUI(Graphics::Surface *surface) {
}
uint32 clockColor = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xFF, 0xFF, 0xFF);
drawBinaryClock(surface, 300, 124, clockColor, back);
-
- if (_hasFallen)
- surface->copyRectToSurface(*_indicators[0], 160, 136, Common::Rect(_indicators[0]->w, _indicators[0]->h));
- else if (_flyMode)
- surface->copyRectToSurface(*_indicators[3], 160, 136, Common::Rect(_indicators[3]->w, _indicators[3]->h));
- else if (_playerHeightNumber == 0)
- surface->copyRectToSurface(*_indicators[1], 160, 136, Common::Rect(_indicators[1]->w, _indicators[1]->h));
- else
- surface->copyRectToSurface(*_indicators[2], 160, 136, Common::Rect(_indicators[2]->w, _indicators[2]->h));
+ drawIndicator(surface, 160, 136);
}
} // End of namespace Freescape
\ No newline at end of file
diff --git a/engines/freescape/games/dark/zx.cpp b/engines/freescape/games/dark/zx.cpp
index 51d6ae87000..94c36c72f32 100644
--- a/engines/freescape/games/dark/zx.cpp
+++ b/engines/freescape/games/dark/zx.cpp
@@ -65,6 +65,14 @@ void DarkEngine::loadAssetsZXDemo() {
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::drawZXUI(Graphics::Surface *surface) {
@@ -129,6 +137,7 @@ void DarkEngine::drawZXUI(Graphics::Surface *surface) {
}
uint32 clockColor = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xFF, 0x00, 0x00);
drawBinaryClock(surface, 273, 128, clockColor, back);
+ drawIndicator(surface, 152, 140);
}
} // End of namespace Freescape
\ No newline at end of file
More information about the Scummvm-git-logs
mailing list