[Scummvm-cvs-logs] scummvm master -> 8b2f7360ca825587010ca2314f80cce62013c7fc
wjp
wjp at usecode.org
Sun Dec 4 20:50:17 CET 2011
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f154ff626b DREAMWEB: Fix kernChars
5871a6943f DREAMWEB: Cleanup
8b2f7360ca DREAMWEB: Fix loop
Commit: f154ff626bfab1493e7af19f58e650f10f28eff2
https://github.com/scummvm/scummvm/commit/f154ff626bfab1493e7af19f58e650f10f28eff2
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2011-12-04T11:48:10-08:00
Commit Message:
DREAMWEB: Fix kernChars
Changed paths:
engines/dreamweb/print.cpp
diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp
index 1057a85..dce5fc7 100644
--- a/engines/dreamweb/print.cpp
+++ b/engines/dreamweb/print.cpp
@@ -218,7 +218,7 @@ uint8 DreamGenContext::getNumber(const Frame *charSet, const uint8 *string, uint
}
uint8 DreamGenContext::kernChars(uint8 firstChar, uint8 secondChar, uint8 width) {
- if ((firstChar == 'a') || (al == 'u')) {
+ if ((firstChar == 'a') || (firstChar == 'u')) {
if ((secondChar == 'n') || (secondChar == 't') || (secondChar == 'r') || (secondChar == 'i') || (secondChar == 'l'))
return width-1;
}
Commit: 5871a6943fa0a07bae81482ed96448cd3763af08
https://github.com/scummvm/scummvm/commit/5871a6943fa0a07bae81482ed96448cd3763af08
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2011-12-04T11:48:10-08:00
Commit Message:
DREAMWEB: Cleanup
Changed paths:
engines/dreamweb/print.cpp
engines/dreamweb/stubs.h
diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp
index dce5fc7..528b897 100644
--- a/engines/dreamweb/print.cpp
+++ b/engines/dreamweb/print.cpp
@@ -171,12 +171,6 @@ uint8 DreamGenContext::printDirect(const uint8** string, uint16 x, uint16 *y, ui
}
}
-void DreamGenContext::getNumber() {
- uint16 offset = di;
- cl = getNumber((Frame *)ds.ptr(0, 0), es.ptr(si, 0), dl, (bool)(dl & 1), &offset);
- di = offset;
-}
-
uint8 DreamGenContext::getNumber(const Frame *charSet, const uint8 *string, uint16 maxWidth, bool centered, uint16* offset) {
uint8 totalWidth = 0;
uint8 charCount = 0;
@@ -185,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;
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;
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 082a94c..8f4d643 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -88,7 +88,6 @@
uint8 printSlow(const uint8 *string, uint16 x, uint16 y, uint8 maxWidth, bool centered);
void printSlow();
void dumpTextLine();
- void getNumber();
uint8 getNumber(const Frame *charSet, const uint8 *string, uint16 maxWidth, bool centered, uint16 *offset);
uint8 kernChars(uint8 firstChar, uint8 secondChar, uint8 width);
void oldToNames();
Commit: 8b2f7360ca825587010ca2314f80cce62013c7fc
https://github.com/scummvm/scummvm/commit/8b2f7360ca825587010ca2314f80cce62013c7fc
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2011-12-04T11:48:10-08:00
Commit Message:
DREAMWEB: Fix loop
Changed paths:
engines/dreamweb/pathfind.cpp
diff --git a/engines/dreamweb/pathfind.cpp b/engines/dreamweb/pathfind.cpp
index 66a0228..a8ac4ac 100644
--- a/engines/dreamweb/pathfind.cpp
+++ b/engines/dreamweb/pathfind.cpp
@@ -245,7 +245,7 @@ void DreamGenContext::bresenhams() {
remainder += data.word(kIncrement2);
++x;
}
- } while (delta1);
+ }
}
}
More information about the Scummvm-git-logs
mailing list