[Scummvm-git-logs] scummvm master -> d0e38b604c69611a41a7f6349e18301838396c3a
neuromancer
noreply at scummvm.org
Thu Sep 12 18:47:18 UTC 2024
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d4b7d794a3 FREESCAPE: fixed spirit metter background in castle dos ega
308ba211da FREESCAPE: deallocate and delete surfaces created for castle
d0e38b604c FREESCAPE: avoid leaving two copies of the same bit array in castle
Commit: d4b7d794a317a9736acb66da8718e8316bd89f5f
https://github.com/scummvm/scummvm/commit/d4b7d794a317a9736acb66da8718e8316bd89f5f
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-09-12T20:48:20+02:00
Commit Message:
FREESCAPE: fixed spirit metter background in castle dos ega
Changed paths:
engines/freescape/games/castle/dos.cpp
diff --git a/engines/freescape/games/castle/dos.cpp b/engines/freescape/games/castle/dos.cpp
index 1c15d213b07..f555acb5660 100644
--- a/engines/freescape/games/castle/dos.cpp
+++ b/engines/freescape/games/castle/dos.cpp
@@ -386,6 +386,7 @@ void CastleEngine::loadAssetsDOSDemo() {
void CastleEngine::drawDOSUI(Graphics::Surface *surface) {
uint32 color = 10;
+ uint32 black = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x00, 0x00, 0x00);
uint8 r, g, b;
_gfx->readFromPalette(color, r, g, b);
@@ -410,13 +411,15 @@ void CastleEngine::drawDOSUI(Graphics::Surface *surface) {
drawStringInSurface(_currentArea->_name, 97, 182, front, back, surface);
for (int k = 0; k < _numberKeys; k++) {
- surface->copyRectToSurfaceWithKey((const Graphics::Surface)*_keysBorderFrames[k], 76 - k * 4, 179, Common::Rect(0, 0, 6, 14), _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x00, 0x00, 0x00));
+ surface->copyRectToSurfaceWithKey((const Graphics::Surface)*_keysBorderFrames[k], 76 - k * 4, 179, Common::Rect(0, 0, 6, 14), black);
}
drawEnergyMeter(surface, Common::Point(39, 157));
int flagFrameIndex = (_ticks / 10) % 4;
surface->copyRectToSurface(*_flagFrames[flagFrameIndex], 285, 5, Common::Rect(0, 0, _flagFrames[flagFrameIndex]->w, _flagFrames[flagFrameIndex]->h));
- surface->copyRectToSurface((const Graphics::Surface)*_spiritsMeterIndicatorFrame, 140 + _spiritsMeterPosition, 156, Common::Rect(0, 0, _spiritsMeterIndicatorFrame->w, _spiritsMeterIndicatorFrame->h));
+
+ surface->copyRectToSurface((const Graphics::Surface)*_spiritsMeterIndicatorBackgroundFrame, 136, 162, Common::Rect(0, 0, _spiritsMeterIndicatorBackgroundFrame->w, _spiritsMeterIndicatorBackgroundFrame->h));
+ surface->copyRectToSurfaceWithKey((const Graphics::Surface)*_spiritsMeterIndicatorFrame, 125 + _spiritsMeterPosition, 161, Common::Rect(0, 0, _spiritsMeterIndicatorFrame->w, _spiritsMeterIndicatorFrame->h), black);
//surface->copyRectToSurface(*_spiritsMeterIndicatorFrame, 100, 50, Common::Rect(0, 0, _spiritsMeterIndicatorFrame->w, _spiritsMeterIndicatorFrame->h));
}
Commit: 308ba211da75df58c4413b505bf0128ec790f200
https://github.com/scummvm/scummvm/commit/308ba211da75df58c4413b505bf0128ec790f200
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-09-12T20:48:20+02:00
Commit Message:
FREESCAPE: deallocate and delete surfaces created for castle
Changed paths:
engines/freescape/games/castle/castle.cpp
diff --git a/engines/freescape/games/castle/castle.cpp b/engines/freescape/games/castle/castle.cpp
index ae755a0114e..6de2361e4b6 100644
--- a/engines/freescape/games/castle/castle.cpp
+++ b/engines/freescape/games/castle/castle.cpp
@@ -90,12 +90,118 @@ CastleEngine::~CastleEngine() {
delete _option;
}
+ for (int i = 0; i < int(_keysBorderFrames.size()); i++) {
+ if (_keysBorderFrames[i]) {
+ _keysBorderFrames[i]->free();
+ delete _keysBorderFrames[i];
+ }
+ }
+
+ for (int i = 0; i < int(_keysMenuFrames.size()); i++) {
+ if (_keysMenuFrames[i]) {
+ _keysMenuFrames[i]->free();
+ delete _keysMenuFrames[i];
+ }
+ }
+
+ if (_spiritsMeterIndicatorBackgroundFrame) {
+ _spiritsMeterIndicatorBackgroundFrame->free();
+ delete _spiritsMeterIndicatorBackgroundFrame;
+ }
+
+ if (_spiritsMeterIndicatorFrame) {
+ _spiritsMeterIndicatorFrame->free();
+ delete _spiritsMeterIndicatorFrame;
+ }
+
+ if (_strenghtBackgroundFrame) {
+ _strenghtBackgroundFrame->free();
+ delete _strenghtBackgroundFrame;
+ }
+
+ if (_strenghtBarFrame) {
+ _strenghtBarFrame->free();
+ delete _strenghtBarFrame;
+ }
+
for (int i = 0; i < int(_strenghtWeightsFrames.size()); i++) {
if (_strenghtWeightsFrames[i]) {
_strenghtWeightsFrames[i]->free();
delete _strenghtWeightsFrames[i];
}
}
+
+ for (int i = 0; i < int(_flagFrames.size()); i++) {
+ if (_flagFrames[i]) {
+ _flagFrames[i]->free();
+ delete _flagFrames[i];
+ }
+ }
+
+ if (_thunderFrame) {
+ _thunderFrame->free();
+ delete _thunderFrame;
+ }
+
+ if (_riddleTopFrame) {
+ _riddleTopFrame->free();
+ delete _riddleTopFrame;
+ }
+
+ if (_riddleBackgroundFrame) {
+ _riddleBackgroundFrame->free();
+ delete _riddleBackgroundFrame;
+ }
+
+ if (_riddleBottomFrame) {
+ _riddleBottomFrame->free();
+ delete _riddleBottomFrame;
+ }
+
+ if (_endGameThroneFrame) {
+ _endGameThroneFrame->free();
+ delete _endGameThroneFrame;
+ }
+
+ if (_endGameBackgroundFrame) {
+ _endGameBackgroundFrame->free();
+ delete _endGameBackgroundFrame;
+ }
+
+ if (_menu) {
+ _menu->free();
+ delete _menu;
+ }
+
+ if (_menuButtons) {
+ _menuButtons->free();
+ delete _menuButtons;
+ }
+
+ if (_menuCrawlIndicator) {
+ _menuCrawlIndicator->free();
+ delete _menuCrawlIndicator;
+ }
+
+ if (_menuWalkIndicator) {
+ _menuWalkIndicator->free();
+ delete _menuWalkIndicator;
+ }
+
+ if (_menuRunIndicator) {
+ _menuRunIndicator->free();
+ delete _menuRunIndicator;
+ }
+
+ if (_menuFxOnIndicator) {
+ _menuFxOnIndicator->free();
+ delete _menuFxOnIndicator;
+ }
+
+ if (_menuFxOffIndicator) {
+ _menuFxOffIndicator->free();
+ delete _menuFxOffIndicator;
+ }
}
void CastleEngine::initKeymaps(Common::Keymap *engineKeyMap, Common::Keymap *infoScreenKeyMap, const char *target) {
Commit: d0e38b604c69611a41a7f6349e18301838396c3a
https://github.com/scummvm/scummvm/commit/d0e38b604c69611a41a7f6349e18301838396c3a
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-09-12T20:48:20+02:00
Commit Message:
FREESCAPE: avoid leaving two copies of the same bit array in castle
Changed paths:
engines/freescape/games/castle/castle.cpp
diff --git a/engines/freescape/games/castle/castle.cpp b/engines/freescape/games/castle/castle.cpp
index 6de2361e4b6..2502399f306 100644
--- a/engines/freescape/games/castle/castle.cpp
+++ b/engines/freescape/games/castle/castle.cpp
@@ -752,6 +752,7 @@ void CastleEngine::drawStringInSurface(const Common::String &str, int x, int y,
_font = _fontPlane2;
FreescapeEngine::drawStringInSurface(str, x, y, yellow, transparent, surface, offset);
+ _font = Common::BitArray();
//_font = _fontPlane3;
//FreescapeEngine::drawStringInSurface(str, x, y, transparent, green, surface, offset);
}
More information about the Scummvm-git-logs
mailing list