[Scummvm-cvs-logs] SF.net SVN: scummvm: [30437] scummvm/trunk/engines/kyra

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sat Jan 12 08:59:39 CET 2008


Revision: 30437
          http://scummvm.svn.sourceforge.net/scummvm/?rev=30437&view=rev
Author:   lordhoto
Date:     2008-01-11 23:59:39 -0800 (Fri, 11 Jan 2008)

Log Message:
-----------
Commit patch #1869747 "KYRA: HoF sjis patch".

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/screen.cpp
    scummvm/trunk/engines/kyra/screen.h
    scummvm/trunk/engines/kyra/sequences_v2.cpp

Modified: scummvm/trunk/engines/kyra/screen.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen.cpp	2008-01-12 06:41:57 UTC (rev 30436)
+++ scummvm/trunk/engines/kyra/screen.cpp	2008-01-12 07:59:39 UTC (rev 30437)
@@ -2769,8 +2769,14 @@
 		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 @@
 	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;
+		}
 	}
 }
 

Modified: scummvm/trunk/engines/kyra/screen.h
===================================================================
--- scummvm/trunk/engines/kyra/screen.h	2008-01-12 06:41:57 UTC (rev 30436)
+++ scummvm/trunk/engines/kyra/screen.h	2008-01-12 07:59:39 UTC (rev 30437)
@@ -69,7 +69,7 @@
 		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 {

Modified: scummvm/trunk/engines/kyra/sequences_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sequences_v2.cpp	2008-01-12 06:41:57 UTC (rev 30436)
+++ scummvm/trunk/engines/kyra/sequences_v2.cpp	2008-01-12 07:59:39 UTC (rev 30437)
@@ -1550,7 +1550,7 @@
 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) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list