[Scummvm-git-logs] scummvm master -> b9115e92868757faf84f4dc0e487e6f48f9c6a0a
aquadran
noreply at scummvm.org
Sat Nov 20 21:57:06 UTC 2021
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:
b9115e9286 STARK: BigEndian fixes
Commit: b9115e92868757faf84f4dc0e487e6f48f9c6a0a
https://github.com/scummvm/scummvm/commit/b9115e92868757faf84f4dc0e487e6f48f9c6a0a
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2021-11-20T22:57:01+01:00
Commit Message:
STARK: BigEndian fixes
Changed paths:
engines/stark/formats/biffmesh.cpp
engines/stark/model/model.cpp
diff --git a/engines/stark/formats/biffmesh.cpp b/engines/stark/formats/biffmesh.cpp
index 6b26d39683..58b6df1a90 100644
--- a/engines/stark/formats/biffmesh.cpp
+++ b/engines/stark/formats/biffmesh.cpp
@@ -121,7 +121,7 @@ public:
KeyFrame keyFrame;
keyFrame.time = stream->readUint32LE();
keyFrame.essentialRotation = stream->readQuaternion();
- keyFrame.determinant = stream->readFloat();
+ keyFrame.determinant = stream->readFloatLE();
keyFrame.stretchRotation = stream->readQuaternion();
keyFrame.scale = stream->readVector3();
keyFrame.translation = stream->readVector3();
@@ -141,8 +141,8 @@ public:
Vertex vertex;
vertex.animName1 = stream->readString16();
vertex.animName2 = stream->readString16();
- vertex.animInfluence1 = stream->readFloat();
- vertex.animInfluence2 = stream->readFloat();
+ vertex.animInfluence1 = stream->readFloatLE();
+ vertex.animInfluence2 = stream->readFloatLE();
vertex.position = stream->readVector3();
_rawVertices.push_back(vertex);
@@ -327,8 +327,8 @@ public:
_diffuse = stream->readVector3();
_specular = stream->readVector3();
- _shininess = stream->readFloat();
- _opacity = stream->readFloat();
+ _shininess = stream->readFloatLE();
+ _opacity = stream->readFloatLE();
_doubleSided = stream->readByte();
_textureTiling = stream->readUint32LE();
diff --git a/engines/stark/model/model.cpp b/engines/stark/model/model.cpp
index 7916cd3710..51ba2b2545 100644
--- a/engines/stark/model/model.cpp
+++ b/engines/stark/model/model.cpp
@@ -70,7 +70,7 @@ void Model::readFromStream(ArchiveReadStream *stream) {
error("Wrong magic 2 while reading actor '%d'", id2);
}
- _u2 = stream->readFloat();
+ _u2 = stream->readFloatLE();
uint32 numMaterials = stream->readUint32LE();
@@ -79,9 +79,9 @@ void Model::readFromStream(ArchiveReadStream *stream) {
node->name = stream->readString();
stream->readUint32LE(); // CHECKME: Unknown data
node->texture = stream->readString();
- node->r = stream->readFloat();
- node->g = stream->readFloat();
- node->b = stream->readFloat();
+ node->r = stream->readFloatLE();
+ node->g = stream->readFloatLE();
+ node->b = stream->readFloatLE();
_materials.push_back(node);
}
@@ -112,11 +112,11 @@ void Model::readFromStream(ArchiveReadStream *stream) {
vert->_pos1 = stream->readVector3();
vert->_pos2 = stream->readVector3();
vert->_normal = stream->readVector3();
- vert->_texS = stream->readFloat();
- vert->_texT = stream->readFloat();
+ vert->_texS = stream->readFloatLE();
+ vert->_texT = stream->readFloatLE();
vert->_bone1 = stream->readUint32LE();
vert->_bone2 = stream->readUint32LE();
- vert->_boneWeight = stream->readFloat();
+ vert->_boneWeight = stream->readFloatLE();
_vertices.push_back(vert);
}
@@ -139,7 +139,7 @@ void Model::readBones(ArchiveReadStream *stream) {
for (uint32 i = 0; i < numBones; ++i) {
BoneNode *node = new BoneNode();
node->_name = stream->readString();
- node->_u1 = stream->readFloat();
+ node->_u1 = stream->readFloatLE();
uint32 len = stream->readUint32LE();
for (uint32 j = 0; j < len; ++j)
More information about the Scummvm-git-logs
mailing list