[Scummvm-cvs-logs] scummvm master -> 3d4aa7ea327979804851e612c416f0ca037e4684
tramboi
bertrand_augereau at yahoo.fr
Sun Dec 4 21:38:13 CET 2011
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:
3d4aa7ea32 DREAMWEB: Cleanup in 'getNumber'
Commit: 3d4aa7ea327979804851e612c416f0ca037e4684
https://github.com/scummvm/scummvm/commit/3d4aa7ea327979804851e612c416f0ca037e4684
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-12-04T15:37:19-08:00
Commit Message:
DREAMWEB: Cleanup in 'getNumber'
Changed paths:
engines/dreamweb/print.cpp
diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp
index 0127161..3a6b69d 100644
--- a/engines/dreamweb/print.cpp
+++ b/engines/dreamweb/print.cpp
@@ -179,31 +179,30 @@ uint8 DreamGenContext::getNumber(const Frame *charSet, const uint8 *string, uint
uint8 done = getNextWord(charSet, string, &wordTotalWidth, &wordCharCount);
string += wordCharCount;
+ uint16 tmp = totalWidth + wordTotalWidth - 10;
if (done == 1) { //endoftext
- ax = totalWidth + wordTotalWidth - 10;
- if (ax < maxWidth) {
+ if (tmp < maxWidth) {
totalWidth += wordTotalWidth;
charCount += wordCharCount;
}
if (centered) {
- ax = (maxWidth & 0xfe) + 2 + 20 - totalWidth;
- ax /= 2;
+ tmp = (maxWidth & 0xfe) + 2 + 20 - totalWidth;
+ tmp /= 2;
} else {
- ax = 0;
+ tmp = 0;
}
- *offset += ax;
+ *offset += tmp;
return charCount;
}
- ax = totalWidth + wordTotalWidth - 10;
- if (ax >= maxWidth) { //gotoverend
+ if (tmp >= maxWidth) { //gotoverend
if (centered) {
- ax = (maxWidth & 0xfe) - totalWidth + 20;
- ax /= 2;
+ tmp = (maxWidth & 0xfe) - totalWidth + 20;
+ tmp /= 2;
} else {
- ax = 0;
+ tmp = 0;
}
- *offset += ax;
+ *offset += tmp;
return charCount;
}
totalWidth += wordTotalWidth;
More information about the Scummvm-git-logs
mailing list