[Scummvm-git-logs] scummvm master -> 155f55075428abd29ede6447a0071c59af64b0ce
aquadran
noreply at scummvm.org
Sat Jul 2 20:46:45 UTC 2022
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:
155f550754 WINTERMUTE: WEM3D: Janitorial
Commit: 155f55075428abd29ede6447a0071c59af64b0ce
https://github.com/scummvm/scummvm/commit/155f55075428abd29ede6447a0071c59af64b0ce
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2022-07-02T22:46:41+02:00
Commit Message:
WINTERMUTE: WEM3D: Janitorial
Changed paths:
engines/wintermute/ad/ad_game.cpp
engines/wintermute/base/base_game.cpp
diff --git a/engines/wintermute/ad/ad_game.cpp b/engines/wintermute/ad/ad_game.cpp
index f87720782c5..886f1e49704 100644
--- a/engines/wintermute/ad/ad_game.cpp
+++ b/engines/wintermute/ad/ad_game.cpp
@@ -1835,32 +1835,6 @@ AdSceneState *AdGame::getSceneState(const char *filename, bool saving) {
}
}
-#ifdef ENABLE_WME3D
-//////////////////////////////////////////////////////////////////////////
-uint32 Wintermute::AdGame::getAmbientLightColor() {
- if (_scene) {
- return _scene->_ambientLightColor;
- } else {
- return BaseGame::getAmbientLightColor();
- }
-}
-
-Wintermute::TShadowType Wintermute::AdGame::getMaxShadowType(Wintermute::BaseObject *object) {
- TShadowType ret = BaseGame::getMaxShadowType(object);
-
- return MIN(ret, _scene->_maxShadowType);
-}
-
-bool Wintermute::AdGame::getFogParams(FogParameters &fogParameters) {
- if (_scene) {
- fogParameters = _scene->_fogParameters;
- return true;
- } else {
- return BaseGame::getFogParams(fogParameters);
- }
-}
-#endif
-
//////////////////////////////////////////////////////////////////////////
bool AdGame::windowLoadHook(UIWindow *win, char **buffer, char **params) {
@@ -2518,6 +2492,38 @@ bool AdGame::displayDebugInfo() {
}
+#ifdef ENABLE_WME3D
+//////////////////////////////////////////////////////////////////////////
+Wintermute::TShadowType Wintermute::AdGame::getMaxShadowType(Wintermute::BaseObject *object) {
+ TShadowType ret = BaseGame::getMaxShadowType(object);
+
+ return MIN(ret, _scene->_maxShadowType);
+}
+
+//////////////////////////////////////////////////////////////////////////
+uint32 Wintermute::AdGame::getAmbientLightColor() {
+ if (_scene) {
+ return _scene->_ambientLightColor;
+ } else {
+ return BaseGame::getAmbientLightColor();
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////
+bool Wintermute::AdGame::getFogParams(bool *fogEnabled, uint32 *fogColor, float *start, float *end) {
+ if (_scene) {
+ *fogEnabled = _scene->_fogEnabled;
+ *fogColor = _scene->_fogColor;
+ *start = _scene->_fogStart;
+ *end = _scene->_fogEnd;
+ return true;
+ } else {
+ return BaseGame::getFogParams(fogEnabled, fogColor, start, end);
+ }
+}
+#endif
+
+
//////////////////////////////////////////////////////////////////////////
bool AdGame::onScriptShutdown(ScScript *script) {
if (_responseBox && _responseBox->_waitingScript == script) {
diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp
index d92445fed7a..b083db99312 100644
--- a/engines/wintermute/base/base_game.cpp
+++ b/engines/wintermute/base/base_game.cpp
@@ -637,43 +637,6 @@ void BaseGame::LOG(bool res, const char *fmt, ...) {
//QuickMessage(buff);
}
-#ifdef ENABLE_WME3D
-bool BaseGame::setMaxShadowType(TShadowType maxShadowType) {
- if (maxShadowType > SHADOW_STENCIL) {
- maxShadowType = SHADOW_STENCIL;
- }
-
- if (maxShadowType < 0) {
- maxShadowType = SHADOW_NONE;
- }
-
- if (maxShadowType == SHADOW_FLAT && !_supportsRealTimeShadows) {
- maxShadowType = SHADOW_SIMPLE;
- }
-
- _maxShadowType = maxShadowType;
-
- return STATUS_OK;
-}
-
-TShadowType BaseGame::getMaxShadowType(BaseObject *object) {
- if (object) {
- return MIN(_maxShadowType, object->_shadowType);
- } else {
- return _maxShadowType;
- }
-}
-
-uint32 BaseGame::getAmbientLightColor() {
- return 0x00000000;
-}
-
-bool BaseGame::getFogParams(FogParameters &fogParameters) {
- fogParameters._enabled = false;
- return true;
-}
-#endif
-
//////////////////////////////////////////////////////////////////////////
void BaseGame::setEngineLogCallback(ENGINE_LOG_CALLBACK callback, void *data) {
_engineLogCallback = callback;
@@ -4612,6 +4575,42 @@ bool BaseGame::displayDebugInfo() {
return STATUS_OK;
}
+#ifdef ENABLE_WME3D
+//////////////////////////////////////////////////////////////////////////
+bool BaseGame::setMaxShadowType(TShadowType maxShadowType) {
+ if (maxShadowType > SHADOW_STENCIL) {
+ maxShadowType = SHADOW_STENCIL;
+ }
+
+ if (maxShadowType < 0) {
+ maxShadowType = SHADOW_NONE;
+ }
+
+ if (maxShadowType == SHADOW_FLAT && !_supportsRealTimeShadows) {
+ maxShadowType = SHADOW_SIMPLE;
+ }
+
+ _maxShadowType = maxShadowType;
+
+ return STATUS_OK;
+}
+
+//////////////////////////////////////////////////////////////////////////
+TShadowType BaseGame::getMaxShadowType(BaseObject *object) {
+ if (object) {
+ return MIN(_maxShadowType, object->_shadowType);
+ } else {
+ return _maxShadowType;
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////
+uint32 BaseGame::getAmbientLightColor() {
+ return 0x00000000;
+}
+
+#endif
+
//////////////////////////////////////////////////////////////////////////
void BaseGame::getMousePos(Point32 *pos) {
BasePlatform::getCursorPos(pos);
@@ -4650,6 +4649,14 @@ void BaseGame::getMousePos(Point32 *pos) {
}
}
+#ifdef ENABLE_WME3D
+//////////////////////////////////////////////////////////////////////////
+bool BaseGame::getFogParams(bool *fogEnabled, uint32 *, float *, float *) {
+ *fogEnabled = false;
+ return true;
+}
+#endif
+
//////////////////////////////////////////////////////////////////////////
void BaseGame::miniUpdate() { // TODO: Is this really necessary, it used to update sound, but the mixer does that now.
if (!_miniUpdateEnabled) {
More information about the Scummvm-git-logs
mailing list