[Scummvm-cvs-logs] scummvm master -> baacf0be61cf8f31a72b593d320c62393241e951
sev-
sev at scummvm.org
Sun Jan 4 22:17:52 CET 2015
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
17fe53a34c SWORD25: Hopefully fix compilation errors
baacf0be61 SWORD25: Commend unused and unportable functions
Commit: 17fe53a34c442da7ccf28721179a88ed2087f7b2
https://github.com/scummvm/scummvm/commit/17fe53a34c442da7ccf28721179a88ed2087f7b2
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-01-04T22:10:17+01:00
Commit Message:
SWORD25: Hopefully fix compilation errors
Changed paths:
engines/sword25/util/double_serialization.cpp
diff --git a/engines/sword25/util/double_serialization.cpp b/engines/sword25/util/double_serialization.cpp
index 48fd75c..0d41ddc 100644
--- a/engines/sword25/util/double_serialization.cpp
+++ b/engines/sword25/util/double_serialization.cpp
@@ -77,13 +77,13 @@ uint64 encodeDouble_64(double value) {
uint64 uintsignificand = (uint64)shiftedsignificand;
return ((uint64)(value < 0 ? 1 : 0) << 63) | // Sign
((uint64)(exponent + 1023) << 52) | // Exponent stored as an offset to 1023
- (uintsignificand & 0x000FFFFFFFFFFFFF); // significand with MSB inferred
+ (uintsignificand & 0x000FFFFFFFFFFFFFLL); // significand with MSB inferred
}
double decodeDouble_64(uint64 value) {
// Expand the exponent and significand
int exponent = (int)((value >> 52) & 0x7FF) - 1023;
- double expandedsignificand = (double)(0x10000000000000 /* Inferred MSB */ | (value & 0x000FFFFFFFFFFFFF));
+ double expandedsignificand = (double)(0x10000000000000LL /* Inferred MSB */ | (value & 0x000FFFFFFFFFFFFFLL));
// Deflate the significand
int temp;
@@ -93,7 +93,7 @@ double decodeDouble_64(uint64 value) {
double returnValue = ldexp(significand, exponent);
// Check the sign bit and return
- return ((value & 0x8000000000000000) == 0x8000000000000000) ? -returnValue : returnValue;
+ return ((value & 0x8000000000000000LL) == 0x8000000000000000LL) ? -returnValue : returnValue;
}
CompactSerializedDouble encodeDouble_Compact(double value) {
Commit: baacf0be61cf8f31a72b593d320c62393241e951
https://github.com/scummvm/scummvm/commit/baacf0be61cf8f31a72b593d320c62393241e951
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-01-04T22:16:50+01:00
Commit Message:
SWORD25: Commend unused and unportable functions
Changed paths:
engines/sword25/util/double_serialization.cpp
engines/sword25/util/double_serialization.h
diff --git a/engines/sword25/util/double_serialization.cpp b/engines/sword25/util/double_serialization.cpp
index 0d41ddc..a34eb0f 100644
--- a/engines/sword25/util/double_serialization.cpp
+++ b/engines/sword25/util/double_serialization.cpp
@@ -65,6 +65,10 @@ double decodeDouble(SerializedDouble value) {
return ((value.signAndSignificandTwo & 0x80000000) == 0x80000000) ? -returnValue : returnValue;
}
+#if 0
+
+// Why these are needed?
+
uint64 encodeDouble_64(double value) {
// Split the value into its significand and exponent
int exponent;
@@ -135,4 +139,6 @@ double decodeDouble_Compact(CompactSerializedDouble value) {
return ((value.signAndSignificandOne & 0x80000000) == 0x80000000) ? -returnValue : returnValue;
}
+#endif
+
} // End of namespace Sword25
diff --git a/engines/sword25/util/double_serialization.h b/engines/sword25/util/double_serialization.h
index e90338c..a910a66 100644
--- a/engines/sword25/util/double_serialization.h
+++ b/engines/sword25/util/double_serialization.h
@@ -56,6 +56,7 @@ SerializedDouble encodeDouble(double value);
*/
double decodeDouble(SerializedDouble value);
+#if 0
/**
* Encodes a double as a uint64
*
@@ -90,6 +91,8 @@ CompactSerializedDouble encodeDouble_Compact(double value);
*/
double decodeDouble_Compact(CompactSerializedDouble value);
+#endif
+
} // End of namespace Sword25
#endif
More information about the Scummvm-git-logs
mailing list