[Scummvm-git-logs] scummvm master -> 83bbb1860140caca97295d9a016665f9c8429426
neuromancer
noreply at scummvm.org
Thu Dec 1 20:03:48 UTC 2022
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
e9ec4c3fc6 FREESCAPE: do not show the main menu in save thumbnail
ae02a3a642 FREESCAPE: make sure background is black for driller in amiga/atari
82510e7ca6 FREESCAPE: show energy bar in amiga/atari driller
83bbb18601 FREESCAPE: simplify code to make sure background is black for driller in amiga/atari
Commit: e9ec4c3fc64c866c9790ec1cda3de1396a5596a8
https://github.com/scummvm/scummvm/commit/e9ec4c3fc64c866c9790ec1cda3de1396a5596a8
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-12-01T21:03:48+01:00
Commit Message:
FREESCAPE: do not show the main menu in save thumbnail
Changed paths:
engines/freescape/freescape.cpp
engines/freescape/freescape.h
engines/freescape/gfx_opengl.cpp
engines/freescape/metaengine.cpp
diff --git a/engines/freescape/freescape.cpp b/engines/freescape/freescape.cpp
index 960d2e44e22..9dd88362cef 100644
--- a/engines/freescape/freescape.cpp
+++ b/engines/freescape/freescape.cpp
@@ -122,6 +122,7 @@ FreescapeEngine::FreescapeEngine(OSystem *syst, const ADGameDescription *gd)
_viewArea = _fullscreenViewArea;
_rnd = new Common::RandomSource("freescape");
_gfx = nullptr;
+ _savedScreen = nullptr;
_timerStarted = false;
_initialCountdown = 0;
@@ -387,11 +388,14 @@ void FreescapeEngine::processInput() {
_flyMode = _noClipMode;
break;
case Common::KEYCODE_ESCAPE:
+ _savedScreen = _gfx->getScreenshot();
_gfx->setViewport(_fullscreenViewArea);
_system->lockMouse(false);
openMainMenuDialog();
_system->lockMouse(true);
_gfx->setViewport(_viewArea);
+ _savedScreen->free();
+ delete _savedScreen;
break;
case Common::KEYCODE_SPACE:
_shootMode = !_shootMode;
diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index 83850d439bd..7236877ccef 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -313,6 +313,7 @@ public:
Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave = false) override;
virtual Common::Error saveGameStreamExtended(Common::WriteStream *stream, bool isAutosave = false);
virtual Common::Error loadGameStreamExtended(Common::SeekableReadStream *stream);
+ Graphics::Surface *_savedScreen;
// Timers
bool startCountdown(uint32 delay);
diff --git a/engines/freescape/gfx_opengl.cpp b/engines/freescape/gfx_opengl.cpp
index 488b1dab103..8e080ba6e1e 100644
--- a/engines/freescape/gfx_opengl.cpp
+++ b/engines/freescape/gfx_opengl.cpp
@@ -300,16 +300,11 @@ void OpenGLRenderer::flipBuffer() {}
Graphics::Surface *OpenGLRenderer::getScreenshot() {
Common::Rect screen = viewport();
-
Graphics::Surface *s = new Graphics::Surface();
s->create(screen.width(), screen.height(), OpenGLTexture::getRGBAPixelFormat());
-
glReadPixels(screen.left, screen.top, screen.width(), screen.height(), GL_RGBA, GL_UNSIGNED_BYTE, s->getPixels());
-
flipVertical(s);
-
return s;
}
-
} // End of namespace Freescape
diff --git a/engines/freescape/metaengine.cpp b/engines/freescape/metaengine.cpp
index a21b3eeb93d..4a57fb9ae49 100644
--- a/engines/freescape/metaengine.cpp
+++ b/engines/freescape/metaengine.cpp
@@ -108,17 +108,13 @@ Common::Error FreescapeMetaEngine::createInstance(OSystem *syst, Engine **engine
void FreescapeMetaEngine::getSavegameThumbnail(Graphics::Surface &thumb) {
Freescape::FreescapeEngine *engine = (Freescape::FreescapeEngine *)g_engine;
- Graphics::Surface *savedScreen = engine->_gfx->getScreenshot();
- assert(savedScreen);
- Graphics::Surface *scaledSavedScreen = scale(*savedScreen, kThumbnailWidth, kThumbnailHeight2);
+ assert(engine->_savedScreen);
+ Graphics::Surface *scaledSavedScreen = scale(*engine->_savedScreen, kThumbnailWidth, kThumbnailHeight2);
assert(scaledSavedScreen);
thumb.copyFrom(*scaledSavedScreen);
scaledSavedScreen->free();
delete scaledSavedScreen;
-
- savedScreen->free();
- delete savedScreen;
}
namespace Freescape {
Commit: ae02a3a64275febb0aeb3f83f7d602b699f1fba4
https://github.com/scummvm/scummvm/commit/ae02a3a64275febb0aeb3f83f7d602b699f1fba4
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-12-01T21:03:48+01:00
Commit Message:
FREESCAPE: make sure background is black for driller in amiga/atari
Changed paths:
engines/freescape/freescape.cpp
engines/freescape/games/driller.cpp
engines/freescape/gfx_opengl.cpp
engines/freescape/gfx_tinygl.cpp
diff --git a/engines/freescape/freescape.cpp b/engines/freescape/freescape.cpp
index 9dd88362cef..208275f5c48 100644
--- a/engines/freescape/freescape.cpp
+++ b/engines/freescape/freescape.cpp
@@ -298,7 +298,7 @@ void FreescapeEngine::takeDamageFromSensor() {
void FreescapeEngine::drawBackground() {
_gfx->setViewport(_fullscreenViewArea);
- _gfx->clear(isAmiga() || isAtariST() ? 0 : _currentArea->_usualBackgroundColor);
+ _gfx->clear(_currentArea->_usualBackgroundColor);
_gfx->setViewport(_viewArea);
_gfx->clear(_currentArea->_skyColor);
}
diff --git a/engines/freescape/games/driller.cpp b/engines/freescape/games/driller.cpp
index d61d3716739..0145b6bdba0 100644
--- a/engines/freescape/games/driller.cpp
+++ b/engines/freescape/games/driller.cpp
@@ -117,8 +117,11 @@ void DrillerEngine::gotoArea(uint16 areaID, int entranceID) {
_gfx->_keyColor = 0;
_gfx->setColorRemaps(&_currentArea->_colorRemaps);
- if (isAmiga() || isAtariST())
+ if (isAmiga() || isAtariST()) {
swapPalette(areaID);
+ _currentArea->_skyColor = 255;
+ _currentArea->_usualBackgroundColor = 255;
+ }
if (areaID != _startArea || entranceID != _startEntrance) {
g_system->warpMouse(_crossairPosition.x, _crossairPosition.y);
diff --git a/engines/freescape/gfx_opengl.cpp b/engines/freescape/gfx_opengl.cpp
index 8e080ba6e1e..bc6ddb8fa79 100644
--- a/engines/freescape/gfx_opengl.cpp
+++ b/engines/freescape/gfx_opengl.cpp
@@ -276,7 +276,10 @@ void OpenGLRenderer::clear(uint8 color) {
color = (*_colorRemaps)[color];
}
- readFromPalette(color, r, g, b);
+ if (color == 255)
+ r = g = b = 0;
+ else
+ readFromPalette(color, r, g, b);
glClearColor(r / 255., g / 255., b / 255., 1.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}
diff --git a/engines/freescape/gfx_tinygl.cpp b/engines/freescape/gfx_tinygl.cpp
index 0af00934fa3..43558860d97 100644
--- a/engines/freescape/gfx_tinygl.cpp
+++ b/engines/freescape/gfx_tinygl.cpp
@@ -220,7 +220,10 @@ void TinyGLRenderer::clear(uint8 color) {
color = (*_colorRemaps)[color];
}
- readFromPalette(color, r, g, b);
+ if (color == 255)
+ r = g = b = 0;
+ else
+ readFromPalette(color, r, g, b);
tglClearColor(r / 255., g / 255., b / 255., 1.0);
tglClear(TGL_COLOR_BUFFER_BIT | TGL_DEPTH_BUFFER_BIT);
}
Commit: 82510e7ca64ccfb89a6dff59b04f4c2ccdf16c23
https://github.com/scummvm/scummvm/commit/82510e7ca64ccfb89a6dff59b04f4c2ccdf16c23
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-12-01T21:03:48+01:00
Commit Message:
FREESCAPE: show energy bar in amiga/atari driller
Changed paths:
engines/freescape/games/driller.cpp
diff --git a/engines/freescape/games/driller.cpp b/engines/freescape/games/driller.cpp
index 0145b6bdba0..a043764be1f 100644
--- a/engines/freescape/games/driller.cpp
+++ b/engines/freescape/games/driller.cpp
@@ -474,6 +474,8 @@ void DrillerEngine::drawDOSUI(Graphics::Surface *surface) {
void DrillerEngine::drawAmigaAtariSTUI(Graphics::Surface *surface) {
uint32 yellow = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xFF, 0xFF, 0x55);
+ uint32 brownish = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x9E, 0x80, 0x20);
+ uint32 brown = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x7E, 0x60, 0x19);
uint32 black = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x00, 0x00, 0x00);
int score = _gameStateVars[k8bitVariableScore];
@@ -504,6 +506,21 @@ void DrillerEngine::drawAmigaAtariSTUI(Graphics::Surface *surface) {
drawStringInSurface(message, 188, 177, yellow, black, surface);
}
+
+ //int energy = _gameStateVars[k8bitVariableEnergy];
+ int shield = _gameStateVars[k8bitVariableShield];
+
+ if (shield >= 0) {
+ Common::Rect shieldBar;
+ shieldBar = Common::Rect(11, 178, 76 - (k8bitMaxShield - shield), 184);
+ surface->fillRect(shieldBar, brown);
+
+ shieldBar = Common::Rect(11, 179, 76 - (k8bitMaxShield - shield), 183);
+ surface->fillRect(shieldBar, brownish);
+
+ shieldBar = Common::Rect(11, 180, 76 - (k8bitMaxShield - shield), 182);
+ surface->fillRect(shieldBar, yellow);
+ }
}
Math::Vector3d getProjectionToPlane(const Math::Vector3d &vect, const Math::Vector3d normal) {
Commit: 83bbb1860140caca97295d9a016665f9c8429426
https://github.com/scummvm/scummvm/commit/83bbb1860140caca97295d9a016665f9c8429426
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-12-01T21:03:48+01:00
Commit Message:
FREESCAPE: simplify code to make sure background is black for driller in amiga/atari
Changed paths:
engines/freescape/games/driller.cpp
engines/freescape/gfx_opengl.cpp
engines/freescape/gfx_tinygl.cpp
diff --git a/engines/freescape/games/driller.cpp b/engines/freescape/games/driller.cpp
index a043764be1f..63ba1681fb5 100644
--- a/engines/freescape/games/driller.cpp
+++ b/engines/freescape/games/driller.cpp
@@ -119,8 +119,8 @@ void DrillerEngine::gotoArea(uint16 areaID, int entranceID) {
if (isAmiga() || isAtariST()) {
swapPalette(areaID);
- _currentArea->_skyColor = 255;
- _currentArea->_usualBackgroundColor = 255;
+ _currentArea->_skyColor = 0;
+ _currentArea->_usualBackgroundColor = 0;
}
if (areaID != _startArea || entranceID != _startEntrance) {
diff --git a/engines/freescape/gfx_opengl.cpp b/engines/freescape/gfx_opengl.cpp
index bc6ddb8fa79..8e080ba6e1e 100644
--- a/engines/freescape/gfx_opengl.cpp
+++ b/engines/freescape/gfx_opengl.cpp
@@ -276,10 +276,7 @@ void OpenGLRenderer::clear(uint8 color) {
color = (*_colorRemaps)[color];
}
- if (color == 255)
- r = g = b = 0;
- else
- readFromPalette(color, r, g, b);
+ readFromPalette(color, r, g, b);
glClearColor(r / 255., g / 255., b / 255., 1.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}
diff --git a/engines/freescape/gfx_tinygl.cpp b/engines/freescape/gfx_tinygl.cpp
index 43558860d97..0af00934fa3 100644
--- a/engines/freescape/gfx_tinygl.cpp
+++ b/engines/freescape/gfx_tinygl.cpp
@@ -220,10 +220,7 @@ void TinyGLRenderer::clear(uint8 color) {
color = (*_colorRemaps)[color];
}
- if (color == 255)
- r = g = b = 0;
- else
- readFromPalette(color, r, g, b);
+ readFromPalette(color, r, g, b);
tglClearColor(r / 255., g / 255., b / 255., 1.0);
tglClear(TGL_COLOR_BUFFER_BIT | TGL_DEPTH_BUFFER_BIT);
}
More information about the Scummvm-git-logs
mailing list