[Scummvm-git-logs] scummvm master -> 55e59d9e33ad1c696b2d364d1ac6dcab7ff1a742

aquadran noreply at scummvm.org
Sat Jun 25 22:18:28 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:
55e59d9e33 WINTERMUTE: WME3D: Rearrange code to match original


Commit: 55e59d9e33ad1c696b2d364d1ac6dcab7ff1a742
    https://github.com/scummvm/scummvm/commit/55e59d9e33ad1c696b2d364d1ac6dcab7ff1a742
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2022-06-26T00:18:23+02:00

Commit Message:
WINTERMUTE: WME3D: Rearrange code to match original

Changed paths:
    engines/wintermute/base/gfx/x/modelx.cpp


diff --git a/engines/wintermute/base/gfx/x/modelx.cpp b/engines/wintermute/base/gfx/x/modelx.cpp
index f8a3535f9f5..e320423aa6d 100644
--- a/engines/wintermute/base/gfx/x/modelx.cpp
+++ b/engines/wintermute/base/gfx/x/modelx.cpp
@@ -221,24 +221,24 @@ void ModelX::cleanup(bool complete) {
 bool ModelX::loadFromFile(const Common::String &filename, ModelX *parentModel) {
 	cleanup(false);
 
+	_parentModel = parentModel;
+
 	uint32 fileSize = 0;
 	byte *buffer = BaseFileManager::getEngineInstance()->getEngineInstance()->readWholeFile(filename, &fileSize);
 	XFileLexer lexer = createXFileLexer(buffer, fileSize);
 
-	bool res = true;
-
-	_parentModel = parentModel;
 	_rootFrame = new FrameNode(_gameRef);
-	res = _rootFrame->loadFromXAsRoot(filename, lexer, this, _materialReferences);
-	setFilename(filename.c_str());
+
+	bool res = _rootFrame->loadFromXAsRoot(filename, lexer, this, _materialReferences);
+	if (res) {
+		findBones(false, parentModel);
+	}
 
 	for (int i = 0; i < X_NUM_ANIMATION_CHANNELS; ++i) {
 		_channels[i] = new AnimationChannel(_gameRef, this);
 	}
 
-	if (res) {
-		findBones(false, parentModel);
-	}
+	setFilename(filename.c_str());
 
 	delete[] buffer;
 




More information about the Scummvm-git-logs mailing list