diff options
author | Johannes Schickel | 2008-01-12 07:59:39 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-01-12 07:59:39 +0000 |
commit | afd8743465ced91b0dae6544b169bdcab848745b (patch) | |
tree | 0a388702f72daf9eb24e3dba52fb1df87aa48a91 /engines | |
parent | a5a4a6fde53a233cec068fb4c44cc2e62353cb7b (diff) | |
download | scummvm-rg350-afd8743465ced91b0dae6544b169bdcab848745b.tar.gz scummvm-rg350-afd8743465ced91b0dae6544b169bdcab848745b.tar.bz2 scummvm-rg350-afd8743465ced91b0dae6544b169bdcab848745b.zip |
Commit patch #1869747 "KYRA: HoF sjis patch".
svn-id: r30437
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/screen.cpp | 28 | ||||
-rw-r--r-- | engines/kyra/screen.h | 2 | ||||
-rw-r--r-- | engines/kyra/sequences_v2.cpp | 2 |
3 files changed, 21 insertions, 11 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index e5eaa62b72..ff22520006 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -2769,8 +2769,14 @@ byte *Screen::getOverlayPtr(int page) { return _sjisOverlayPtrs[1]; else if (page == 2 || page == 3) return _sjisOverlayPtrs[2]; - else - return 0; + + if (_vm->gameFlags().gameID == GI_KYRA2) { + if (page == 12 || page == 13) + return _sjisOverlayPtrs[3]; + } + + warning("Trying to access unimplemented SJIS overlay page %d", page); + return 0; } void Screen::clearOverlayPage(int page) { @@ -2812,14 +2818,18 @@ void Screen::copyOverlayRegion(int x, int y, int x2, int y2, int w, int h, int s y <<= 1; y2 <<= 1; w <<= 1; h <<= 1; - dst += y2 * 640 + x2; - src += y * 640 + x; + if (w == 640 && h == 400) { + memcpy(dst, src, SCREEN_OVL_SJIS_SIZE); + } else { + dst += y2 * 640 + x2; + src += y * 640 + x; - while (h--) { - for (x = 0; x < w; ++x) - memcpy(dst, src, w); - dst += 640; - src += 640; + while (h--) { + for (x = 0; x < w; ++x) + memcpy(dst, src, w); + dst += 640; + src += 640; + } } } diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h index 27d74427bc..3808087a4b 100644 --- a/engines/kyra/screen.h +++ b/engines/kyra/screen.h @@ -69,7 +69,7 @@ public: SCREEN_PAGE_SIZE = 320 * 200 + 1024, SCREEN_OVL_SJIS_SIZE = 640 * 400, SCREEN_PAGE_NUM = 16, - SCREEN_OVLS_NUM = 3 + SCREEN_OVLS_NUM = 4 }; enum CopyRegionFlags { diff --git a/engines/kyra/sequences_v2.cpp b/engines/kyra/sequences_v2.cpp index 2ea4cce59b..5b4a7ababd 100644 --- a/engines/kyra/sequences_v2.cpp +++ b/engines/kyra/sequences_v2.cpp @@ -1550,7 +1550,7 @@ void KyraEngine_v2::seq_processWSAs() { void KyraEngine_v2::seq_processText() { Screen::FontId curFont = _screen->setFont(Screen::FID_GOLDFONT_FNT); int curPage = _screen->setCurPage(2); - char outputStr[60]; + char outputStr[70]; for (int i = 0; i < 10; i++) { if (_activeText[i].startTime + _activeText[i].duration > _system->getMillis() && _activeText[i].duration != -1) { |