[Scummvm-git-logs] scummvm master -> a281b6cd8c2ed7ddb3a95033841af56a869a6faf

aquadran noreply at scummvm.org
Sun Jun 26 14:37:36 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:
a281b6cd8c WINTERMUTE: WME3D: Janitorial


Commit: a281b6cd8c2ed7ddb3a95033841af56a869a6faf
    https://github.com/scummvm/scummvm/commit/a281b6cd8c2ed7ddb3a95033841af56a869a6faf
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2022-06-26T16:37:31+02:00

Commit Message:
WINTERMUTE: WME3D: Janitorial

Changed paths:
    engines/wintermute/ad/ad_actor.h
    engines/wintermute/ad/ad_block.cpp
    engines/wintermute/ad/ad_entity.cpp
    engines/wintermute/ad/ad_game.cpp
    engines/wintermute/ad/ad_generic.cpp
    engines/wintermute/ad/ad_geom_ext.cpp
    engines/wintermute/ad/ad_geom_ext_node.cpp
    engines/wintermute/ad/ad_node_state.cpp
    engines/wintermute/ad/ad_object.cpp
    engines/wintermute/ad/ad_scene.cpp
    engines/wintermute/ad/ad_walkplane.cpp
    engines/wintermute/ad/ad_waypoint_group3d.cpp


diff --git a/engines/wintermute/ad/ad_actor.h b/engines/wintermute/ad/ad_actor.h
index 2a30c6af901..0e9168e6136 100644
--- a/engines/wintermute/ad/ad_actor.h
+++ b/engines/wintermute/ad/ad_actor.h
@@ -28,13 +28,13 @@
 #ifndef WINTERMUTE_ADACTOR_H
 #define WINTERMUTE_ADACTOR_H
 
-
 #include "engines/wintermute/dctypes.h"    // Added by ClassView
 #include "engines/wintermute/ad/ad_types.h"    // Added by ClassView
 #include "engines/wintermute/ad/ad_talk_holder.h"
 #include "engines/wintermute/coll_templ.h"
 #include "engines/wintermute/base/base_point.h" // Added by ClassView
 #include "engines/wintermute/persistent.h"
+
 #include "common/str.h"
 
 namespace Wintermute {
diff --git a/engines/wintermute/ad/ad_block.cpp b/engines/wintermute/ad/ad_block.cpp
index 54b334bf87a..7982089fd43 100644
--- a/engines/wintermute/ad/ad_block.cpp
+++ b/engines/wintermute/ad/ad_block.cpp
@@ -32,9 +32,10 @@
 namespace Wintermute {
 
 //////////////////////////////////////////////////////////////////////////
-AdBlock::AdBlock(BaseGame *inGame) : BaseScriptable(inGame, false, false),
-									 _receiveShadows(false), _active(true),
-									 _mesh(nullptr) {
+AdBlock::AdBlock(BaseGame *inGame) : BaseScriptable(inGame, false, false) {
+	_mesh = nullptr;
+	_active = true;
+	_receiveShadows = false;
 }
 
 //////////////////////////////////////////////////////////////////////////
diff --git a/engines/wintermute/ad/ad_entity.cpp b/engines/wintermute/ad/ad_entity.cpp
index f3612723fe7..5d5a42e2cbd 100644
--- a/engines/wintermute/ad/ad_entity.cpp
+++ b/engines/wintermute/ad/ad_entity.cpp
@@ -53,6 +53,7 @@
 #include "engines/wintermute/video/video_theora_player.h"
 #include "engines/wintermute/utils/utils.h"
 #include "engines/wintermute/platform_osystem.h"
+
 #include "common/str.h"
 
 namespace Wintermute {
diff --git a/engines/wintermute/ad/ad_game.cpp b/engines/wintermute/ad/ad_game.cpp
index 3749d23a601..591b4a5ee74 100644
--- a/engines/wintermute/ad/ad_game.cpp
+++ b/engines/wintermute/ad/ad_game.cpp
@@ -65,6 +65,7 @@
 #include "engines/wintermute/video/video_player.h"
 #include "engines/wintermute/video/video_theora_player.h"
 #include "engines/wintermute/platform_osystem.h"
+
 #include "common/config-manager.h"
 #include "common/str.h"
 
diff --git a/engines/wintermute/ad/ad_generic.cpp b/engines/wintermute/ad/ad_generic.cpp
index 174e6284f39..0e93a2d0311 100644
--- a/engines/wintermute/ad/ad_generic.cpp
+++ b/engines/wintermute/ad/ad_generic.cpp
@@ -32,8 +32,10 @@
 namespace Wintermute {
 
 //////////////////////////////////////////////////////////////////////////
-AdGeneric::AdGeneric(BaseGame *inGame) : BaseScriptable(inGame, false, false),
-										 _receiveShadows(false), _active(true), _mesh(nullptr) {
+AdGeneric::AdGeneric(BaseGame *inGame) : BaseScriptable(inGame, false, false) {
+	_mesh = nullptr;
+	_active = true;
+	_receiveShadows = false;
 }
 
 //////////////////////////////////////////////////////////////////////////
diff --git a/engines/wintermute/ad/ad_geom_ext.cpp b/engines/wintermute/ad/ad_geom_ext.cpp
index c2713cc2590..746f0187157 100644
--- a/engines/wintermute/ad/ad_geom_ext.cpp
+++ b/engines/wintermute/ad/ad_geom_ext.cpp
@@ -100,8 +100,9 @@ bool AdGeomExt::loadBuffer(byte *buffer) {
 				}
 
 				cmd = PARSERR_GENERIC;
+				}
 			}
-			} break;
+			break;
 		}
 	}
 
diff --git a/engines/wintermute/ad/ad_geom_ext_node.cpp b/engines/wintermute/ad/ad_geom_ext_node.cpp
index d93538068e0..58873ec749c 100644
--- a/engines/wintermute/ad/ad_geom_ext_node.cpp
+++ b/engines/wintermute/ad/ad_geom_ext_node.cpp
@@ -26,6 +26,7 @@
  */
 
 #include "common/str.h"
+
 #include "engines/wintermute/ad/ad_geom_ext_node.h"
 #include "engines/wintermute/base/base_game.h"
 #include "engines/wintermute/base/base_parser.h"
@@ -34,8 +35,10 @@
 namespace Wintermute {
 
 //////////////////////////////////////////////////////////////////////////
-AdGeomExtNode::AdGeomExtNode(BaseGame *inGame) : BaseClass(inGame),
-												 _receiveShadows(false), _type(GEOM_GENERIC), _namePattern(nullptr) {
+AdGeomExtNode::AdGeomExtNode(BaseGame *inGame) : BaseClass(inGame) {
+	_namePattern = nullptr;
+	_receiveShadows = false;
+	_type = GEOM_GENERIC;
 }
 
 //////////////////////////////////////////////////////////////////////////
diff --git a/engines/wintermute/ad/ad_node_state.cpp b/engines/wintermute/ad/ad_node_state.cpp
index e9da384d50a..2ebe79bea2e 100644
--- a/engines/wintermute/ad/ad_node_state.cpp
+++ b/engines/wintermute/ad/ad_node_state.cpp
@@ -31,6 +31,7 @@
 #include "engines/wintermute/base/base_sprite.h"
 #include "engines/wintermute/utils/utils.h"
 #include "engines/wintermute/platform_osystem.h"
+
 #include "common/str.h"
 
 namespace Wintermute {
diff --git a/engines/wintermute/ad/ad_object.cpp b/engines/wintermute/ad/ad_object.cpp
index f44802826af..cf7557f6da3 100644
--- a/engines/wintermute/ad/ad_object.cpp
+++ b/engines/wintermute/ad/ad_object.cpp
@@ -48,6 +48,7 @@
 #include "engines/wintermute/base/scriptables/script_stack.h"
 #include "engines/wintermute/base/scriptables/script_value.h"
 #include "engines/wintermute/base/sound/base_sound.h"
+
 #include "common/str.h"
 #include "common/util.h"
 
diff --git a/engines/wintermute/ad/ad_scene.cpp b/engines/wintermute/ad/ad_scene.cpp
index 0c1f3d889c6..7979ff20908 100644
--- a/engines/wintermute/ad/ad_scene.cpp
+++ b/engines/wintermute/ad/ad_scene.cpp
@@ -146,15 +146,19 @@ void AdScene::setDefaults() {
 	_gameRef->registerObject(_fader);
 
 #ifdef ENABLE_WME3D
-	_ambientLightColor = 0x00000000;
-	_maxShadowType = SHADOW_FLAT;
-
-	_2DPathfinding = false;
-
 	_fov = -1.0f;
+#endif
+	_viewport = nullptr;
+
+#ifdef ENABLE_WME3D
 	_nearPlane = -1.0f;
 	_farPlane = -1.0f;
 
+	_2DPathfinding = false;
+	_maxShadowType = SHADOW_FLAT;
+
+	_ambientLightColor = 0x00000000;
+
 	_fogParameters._enabled = false;
 	_fogParameters._color = 0x00FFFFFF;
 	_fogParameters._start = 0.0f;
@@ -2102,16 +2106,15 @@ bool AdScene::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
 
 		const char *cameraName = stack->pop()->getString();
 
-		if (_sceneGeometry) {
+		if (!_sceneGeometry) {
+			script->runtimeError("Scene.SetActiveCamera: Scene doesn't contain any geometry");
+			stack->pushBool(false);
+		} else {
 			bool res = _sceneGeometry->setActiveCamera(cameraName, _fov, _nearPlane, _farPlane);
-
 			if (!res) {
 				script->runtimeError("Scene.SetActiveCamera failed");
-				stack->pushBool(res);
 			}
-		} else {
-			script->runtimeError("Scene.SetActiveCamera: Scene doesn't contain any geometry");
-			stack->pushBool(false);
+			stack->pushBool(res);
 		}
 
 		return STATUS_OK;
diff --git a/engines/wintermute/ad/ad_walkplane.cpp b/engines/wintermute/ad/ad_walkplane.cpp
index fbb08895204..84db01314d2 100644
--- a/engines/wintermute/ad/ad_walkplane.cpp
+++ b/engines/wintermute/ad/ad_walkplane.cpp
@@ -32,8 +32,10 @@
 namespace Wintermute {
 
 //////////////////////////////////////////////////////////////////////////
-AdWalkplane::AdWalkplane(BaseGame *inGame) : BaseScriptable(inGame, false, false),
-											 _receiveShadows(false), _active(true), _mesh(nullptr) {
+AdWalkplane::AdWalkplane(BaseGame *inGame) : BaseScriptable(inGame, false, false) {
+	_mesh = nullptr;
+	_active = true;
+	_receiveShadows = false;
 }
 
 //////////////////////////////////////////////////////////////////////////
diff --git a/engines/wintermute/ad/ad_waypoint_group3d.cpp b/engines/wintermute/ad/ad_waypoint_group3d.cpp
index e84bb6a37ac..8dafcf26dff 100644
--- a/engines/wintermute/ad/ad_waypoint_group3d.cpp
+++ b/engines/wintermute/ad/ad_waypoint_group3d.cpp
@@ -32,8 +32,6 @@
 
 namespace Wintermute {
 
-//IMPLEMENT_PERSISTENT(AdWaypointGroup3D, false);
-
 //////////////////////////////////////////////////////////////////////////
 AdWaypointGroup3D::AdWaypointGroup3D(BaseGame *inGame) : BaseClass(inGame) {
 	_active = true;
@@ -76,16 +74,4 @@ bool AdWaypointGroup3D::addFromMesh(Mesh3DS *mesh) {
 	return true;
 }
 
-/*
-//////////////////////////////////////////////////////////////////////////
-HRESULT AdWaypointGroup3D::Persist(CBPersistMgr* PersistMgr){
-
-	PersistMgr->Transfer(TMEMBER(Game));
-	PersistMgr->Transfer(TMEMBER(m_Active));
-	//_points.Persist(PersistMgr);
-
-	return S_OK;
-}
-*/
-
 } // namespace Wintermute




More information about the Scummvm-git-logs mailing list