aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/kernel/outputpersistenceblock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sword25/kernel/outputpersistenceblock.cpp')
-rw-r--r--engines/sword25/kernel/outputpersistenceblock.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/sword25/kernel/outputpersistenceblock.cpp b/engines/sword25/kernel/outputpersistenceblock.cpp
index cf28ea401f..e29d956e5f 100644
--- a/engines/sword25/kernel/outputpersistenceblock.cpp
+++ b/engines/sword25/kernel/outputpersistenceblock.cpp
@@ -43,19 +43,23 @@ OutputPersistenceBlock::OutputPersistenceBlock() {
void OutputPersistenceBlock::write(signed int value) {
writeMarker(SINT_MARKER);
- value = convertEndianessFromSystemToStorage(value);
+ value = TO_LE_32(value);
rawWrite(&value, sizeof(value));
}
void OutputPersistenceBlock::write(uint value) {
writeMarker(UINT_MARKER);
- value = convertEndianessFromSystemToStorage(value);
+ value = TO_LE_32(value);
rawWrite(&value, sizeof(value));
}
void OutputPersistenceBlock::write(float value) {
writeMarker(FLOAT_MARKER);
- value = convertEndianessFromSystemToStorage(value);
+ uint32 tmp[1];
+
+ ((float *)tmp)[0] = value;
+ tmp[0] = TO_LE_32(tmp[0]);
+
rawWrite(&value, sizeof(value));
}
@@ -63,7 +67,7 @@ void OutputPersistenceBlock::write(bool value) {
writeMarker(BOOL_MARKER);
uint uintBool = value ? 1 : 0;
- uintBool = convertEndianessFromSystemToStorage(uintBool);
+ uintBool = TO_LE_32(uintBool);
rawWrite(&uintBool, sizeof(uintBool));
}