diff options
author | Willem Jan Palenstijn | 2011-07-28 21:10:35 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-07-28 21:13:02 +0200 |
commit | c626394f2b6566bc310f7fb02b9449acc2e8f00f (patch) | |
tree | 0344d4d590d7424c8f6980e873f5a7479f65f0e6 | |
parent | 7e88112ad2a27ad50f54fb84b92ec97c2262939a (diff) | |
download | scummvm-rg350-c626394f2b6566bc310f7fb02b9449acc2e8f00f.tar.gz scummvm-rg350-c626394f2b6566bc310f7fb02b9449acc2e8f00f.tar.bz2 scummvm-rg350-c626394f2b6566bc310f7fb02b9449acc2e8f00f.zip |
DREAMWEB: Fix rendering underlined characters
The frame number argument to showframe is 9 bits of ax in the
original asm, but was passed in a uint8.
-rw-r--r-- | engines/dreamweb/stubs.cpp | 11 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 2ac3751313..3c058259a8 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -914,13 +914,16 @@ Sprite *DreamGenContext::spritetable() { return sprite; } -void DreamGenContext::showframe(uint16 dst, uint16 src, uint16 x, uint16 y, uint8 frameNumber, uint8 effectsFlag, uint8 *width, uint8 *height) { +void DreamGenContext::showframe(uint16 dst, uint16 src, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag, uint8 *width, uint8 *height) { + // frameNumber takes up 9 bits of ax, and effectsFlag 7. + assert(!(effectsFlag & 1)); + es = dst; ds = src; di = x; bx = y; - al = frameNumber; - ah = effectsFlag; + ax = frameNumber | (effectsFlag << 8); + si = (ax & 0x1ff) * 6; if (ds.word(si) == 0) { @@ -983,7 +986,7 @@ void DreamGenContext::showframe(uint16 dst, uint16 src, uint16 x, uint16 y, uint void DreamGenContext::showframe() { uint8 width, height; - showframe(es, ds, di, bx, al, ah, &width, &height); + showframe(es, ds, di, bx, ax & 0x1ff, ah & 0xfe, &width, &height); cl = width; ch = height; } diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 20d987d374..b633684f4d 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -58,7 +58,7 @@ uint8 kernchars(uint8 firstChar, uint8 secondChar, uint8 width); Sprite *spritetable(); void showframe(); - void showframe(uint16 dst, uint16 src, uint16 x, uint16 y, uint8 frameNumber, uint8 effectsFlag, uint8 *width, uint8 *height); + void showframe(uint16 dst, uint16 src, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag, uint8 *width, uint8 *height); void printasprite(const Sprite *sprite); void width160(); void multiput(uint16 x, uint16 y, uint8 width, uint8 height); |