[Scummvm-cvs-logs] SF.net SVN: scummvm:[43330] scummvm/branches/gsoc2009-mods

nolange at users.sourceforge.net nolange at users.sourceforge.net
Thu Aug 13 00:39:49 CEST 2009


Revision: 43330
          http://scummvm.svn.sourceforge.net/scummvm/?rev=43330&view=rev
Author:   nolange
Date:     2009-08-12 22:39:48 +0000 (Wed, 12 Aug 2009)

Log Message:
-----------
another merge from trunk

Modified Paths:
--------------
    scummvm/branches/gsoc2009-mods/NEWS
    scummvm/branches/gsoc2009-mods/README
    scummvm/branches/gsoc2009-mods/backends/platform/sdl/graphics.cpp
    scummvm/branches/gsoc2009-mods/configure
    scummvm/branches/gsoc2009-mods/dists/msvc8/ScummVM_Global.vsprops
    scummvm/branches/gsoc2009-mods/dists/msvc8/agos.vcproj
    scummvm/branches/gsoc2009-mods/dists/msvc9/agos.vcproj
    scummvm/branches/gsoc2009-mods/engines/agos/agos.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/agos.h
    scummvm/branches/gsoc2009-mods/engines/agos/animation.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/animation.h
    scummvm/branches/gsoc2009-mods/engines/agos/charset.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/cursor.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/detection.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/detection_tables.h
    scummvm/branches/gsoc2009-mods/engines/agos/event.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/feeble.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/gfx.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/icons.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/input.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/module.mk
    scummvm/branches/gsoc2009-mods/engines/agos/oracle.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/pn.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/res.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/saveload.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/script_ff.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/script_pn.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/script_pp.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/string.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/verb.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/vga_ff.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/vga_pn.cpp
    scummvm/branches/gsoc2009-mods/engines/engines.mk
    scummvm/branches/gsoc2009-mods/engines/kyra/kyra_lok.h
    scummvm/branches/gsoc2009-mods/engines/kyra/screen.cpp
    scummvm/branches/gsoc2009-mods/engines/kyra/sequences_lok.cpp
    scummvm/branches/gsoc2009-mods/engines/kyra/sound_amiga.cpp
    scummvm/branches/gsoc2009-mods/engines/kyra/text.cpp
    scummvm/branches/gsoc2009-mods/engines/saga/displayinfo.h
    scummvm/branches/gsoc2009-mods/engines/scumm/he/animation_he.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/he/animation_he.h
    scummvm/branches/gsoc2009-mods/engines/scumm/he/cup_player_he.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/he/floodfill_he.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/he/logic_he.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/he/logic_he.h
    scummvm/branches/gsoc2009-mods/engines/scumm/he/palette_he.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v100he.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v71he.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v72he.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v80he.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v90he.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/he/sound_he.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/he/sprite_he.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/he/wiz_he.cpp
    scummvm/branches/gsoc2009-mods/graphics/sjis.h

Added Paths:
-----------
    scummvm/branches/gsoc2009-mods/engines/agos/input_pn.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/string_pn.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/verb_pn.cpp

Property Changed:
----------------
    scummvm/branches/gsoc2009-mods/
    scummvm/branches/gsoc2009-mods/backends/platform/iphone/osys_main.cpp
    scummvm/branches/gsoc2009-mods/backends/platform/iphone/osys_main.h
    scummvm/branches/gsoc2009-mods/sound/iff_sound.cpp
    scummvm/branches/gsoc2009-mods/sound/iff_sound.h


Property changes on: scummvm/branches/gsoc2009-mods
___________________________________________________________________
Modified: svn:mergeinfo
   - /scummvm/trunk:41377-43289
   + /scummvm/trunk:41377-43329

Modified: scummvm/branches/gsoc2009-mods/NEWS
===================================================================
--- scummvm/branches/gsoc2009-mods/NEWS	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/NEWS	2009-08-12 22:39:48 UTC (rev 43330)
@@ -6,6 +6,7 @@
    - Added support for a custom SJIS font for FM-TOWNS and PC98 games.
 
  KYRA:
+   - Added support for the Amiga version of The Legend of Kyrandia.
    - Adapted KYRA to support the custom SJIS font.
 
 1.0.0 (2009-??-??)

Modified: scummvm/branches/gsoc2009-mods/README
===================================================================
--- scummvm/branches/gsoc2009-mods/README	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/README	2009-08-12 22:39:48 UTC (rev 43330)
@@ -769,7 +769,9 @@
       original game.
 
   The Legend of Kyrandia:
-    - Amiga versions aren't supported
+    - No music or sound effects in the Amiga and Macintosh floppy versions.
+    - Macintosh CD is using included DOS music and sound effects.
+    - PC-9821 version lacks support for sound effects.
 
   Humongous Entertainment games:
     - Only the original load and save interface can be used.


Property changes on: scummvm/branches/gsoc2009-mods/backends/platform/iphone/osys_main.cpp
___________________________________________________________________
Modified: svn:mergeinfo
   - /scummvm/trunk/backends/platform/iphone/osys_main.cpp:42569-43289
   + /scummvm/trunk/backends/platform/iphone/osys_main.cpp:42569-43329


Property changes on: scummvm/branches/gsoc2009-mods/backends/platform/iphone/osys_main.h
___________________________________________________________________
Modified: svn:mergeinfo
   - /scummvm/trunk/backends/platform/iphone/osys_main.h:42569-43289
   + /scummvm/trunk/backends/platform/iphone/osys_main.h:42569-43329

Modified: scummvm/branches/gsoc2009-mods/backends/platform/sdl/graphics.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/sdl/graphics.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/backends/platform/sdl/graphics.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -434,7 +434,7 @@
 	// Create the surface that contains the scaled graphics in 16 bit mode
 	//
 
-	if(_videoMode.fullscreen) {
+	if (_videoMode.fullscreen) {
 		fixupResolutionForAspectRatio(_videoMode.desiredAspectRatio, _videoMode.hardwareWidth, _videoMode.hardwareHeight);
 	}
 

Modified: scummvm/branches/gsoc2009-mods/configure
===================================================================
--- scummvm/branches/gsoc2009-mods/configure	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/configure	2009-08-12 22:39:48 UTC (rev 43330)
@@ -70,8 +70,7 @@
 add_engine scumm_7_8 "v7 & v8 games" yes
 add_engine he "HE71+ games" yes
 add_engine agi "AGI" yes
-add_engine agos "AGOS" yes "pn agos2"
-add_engine pn "Personal Nightmare" no
+add_engine agos "AGOS" yes "agos2"
 add_engine agos2 "AGOS 2 games" yes
 add_engine cine "Cinematique evo 1" yes
 add_engine cruise "Cinematique evo 2" yes

Modified: scummvm/branches/gsoc2009-mods/dists/msvc8/ScummVM_Global.vsprops
===================================================================
--- scummvm/branches/gsoc2009-mods/dists/msvc8/ScummVM_Global.vsprops	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/dists/msvc8/ScummVM_Global.vsprops	2009-08-12 22:39:48 UTC (rev 43330)
@@ -10,7 +10,7 @@
 		Name="VCCLCompilerTool"
 		DisableSpecificWarnings="4068;4100;4103;4121;4127;4189;4201;4221;4244;4250;4310;4351;4355;4510;4511;4512;4610;4701;4702;4706;4800;4996"
 		AdditionalIncludeDirectories="../..;../../engines"
-		PreprocessorDefinitions="USE_NASM;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_MT32EMU;ENABLE_AGI;ENABLE_AGOS;ENABLE_AGOS2;ENABLE_PN;ENABLE_CINE;ENABLE_CRUISE;ENABLE_DRASCULA;ENABLE_GOB;ENABLE_IGOR;ENABLE_KYRA;ENABLE_LOL;ENABLE_LURE;ENABLE_M4;ENABLE_MADE;ENABLE_PARALLACTION;ENABLE_QUEEN;ENABLE_SAGA;ENABLE_IHNM;ENABLE_SAGA2;ENABLE_SCI;ENABLE_SCUMM;ENABLE_SKY;ENABLE_SWORD1;ENABLE_SWORD2;ENABLE_TOUCHE;ENABLE_SCUMM_7_8;ENABLE_HE;ENABLE_TINSEL;ENABLE_TUCKER;ENABLE_GROOVIE"
+		PreprocessorDefinitions="USE_NASM;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_MT32EMU;ENABLE_AGI;ENABLE_AGOS;ENABLE_AGOS2;ENABLE_CINE;ENABLE_CRUISE;ENABLE_DRASCULA;ENABLE_GOB;ENABLE_IGOR;ENABLE_KYRA;ENABLE_LOL;ENABLE_LURE;ENABLE_M4;ENABLE_MADE;ENABLE_PARALLACTION;ENABLE_QUEEN;ENABLE_SAGA;ENABLE_IHNM;ENABLE_SAGA2;ENABLE_SCI;ENABLE_SCUMM;ENABLE_SKY;ENABLE_SWORD1;ENABLE_SWORD2;ENABLE_TOUCHE;ENABLE_SCUMM_7_8;ENABLE_HE;ENABLE_TINSEL;ENABLE_TUCKER;ENABLE_GROOVIE"
 		ExceptionHandling="0"
 		RuntimeTypeInfo="false"
 		WarningLevel="4"

Modified: scummvm/branches/gsoc2009-mods/dists/msvc8/agos.vcproj
===================================================================
--- scummvm/branches/gsoc2009-mods/dists/msvc8/agos.vcproj	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/dists/msvc8/agos.vcproj	2009-08-12 22:39:48 UTC (rev 43330)
@@ -35,6 +35,7 @@
 		<File RelativePath="..\..\engines\agos\gfx.cpp" />
 		<File RelativePath="..\..\engines\agos\icons.cpp" />
 		<File RelativePath="..\..\engines\agos\input.cpp" />
+		<File RelativePath="..\..\engines\agos\input_pn.cpp" />
 		<File RelativePath="..\..\engines\agos\intern.h" />
 		<File RelativePath="..\..\engines\agos\items.cpp" />
 		<File RelativePath="..\..\engines\agos\menus.cpp" />
@@ -60,8 +61,10 @@
 		<File RelativePath="..\..\engines\agos\sound.cpp" />
 		<File RelativePath="..\..\engines\agos\sound.h" />
 		<File RelativePath="..\..\engines\agos\string.cpp" />
+		<File RelativePath="..\..\engines\agos\string_pn.cpp" />
 		<File RelativePath="..\..\engines\agos\subroutine.cpp" />
 		<File RelativePath="..\..\engines\agos\verb.cpp" />
+		<File RelativePath="..\..\engines\agos\verb_pn.cpp" />
 		<File RelativePath="..\..\engines\agos\vga.cpp" />
 		<File RelativePath="..\..\engines\agos\vga.h" />
 		<File RelativePath="..\..\engines\agos\vga_e2.cpp" />

Modified: scummvm/branches/gsoc2009-mods/dists/msvc9/agos.vcproj
===================================================================
--- scummvm/branches/gsoc2009-mods/dists/msvc9/agos.vcproj	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/dists/msvc9/agos.vcproj	2009-08-12 22:39:48 UTC (rev 43330)
@@ -36,6 +36,7 @@
 		<File RelativePath="..\..\engines\agos\gfx.cpp" />
 		<File RelativePath="..\..\engines\agos\icons.cpp" />
 		<File RelativePath="..\..\engines\agos\input.cpp" />
+		<File RelativePath="..\..\engines\agos\input_pn.cpp" />
 		<File RelativePath="..\..\engines\agos\intern.h" />
 		<File RelativePath="..\..\engines\agos\items.cpp" />
 		<File RelativePath="..\..\engines\agos\menus.cpp" />
@@ -61,8 +62,10 @@
 		<File RelativePath="..\..\engines\agos\sound.cpp" />
 		<File RelativePath="..\..\engines\agos\sound.h" />
 		<File RelativePath="..\..\engines\agos\string.cpp" />
+		<File RelativePath="..\..\engines\agos\string_pn.cpp" />
 		<File RelativePath="..\..\engines\agos\subroutine.cpp" />
 		<File RelativePath="..\..\engines\agos\verb.cpp" />
+		<File RelativePath="..\..\engines\agos\verb_pn.cpp" />
 		<File RelativePath="..\..\engines\agos\vga.cpp" />
 		<File RelativePath="..\..\engines\agos\vga.h" />
 		<File RelativePath="..\..\engines\agos\vga_e2.cpp" />

Modified: scummvm/branches/gsoc2009-mods/engines/agos/agos.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/agos.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/agos.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -832,7 +832,6 @@
 	AGOSEngine::setupGame();
 }
 
-#ifdef ENABLE_PN
 void AGOSEngine_PN::setupGame() {
 	gss = &simon1_settings;
 	_numVideoOpcodes = 57;
@@ -844,7 +843,6 @@
 
 	AGOSEngine::setupGame();
 }
-#endif
 
 void AGOSEngine::setupGame() {
 	allocItemHeap();

Modified: scummvm/branches/gsoc2009-mods/engines/agos/agos.h
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/agos.h	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/agos.h	2009-08-12 22:39:48 UTC (rev 43330)
@@ -1262,7 +1262,6 @@
 	virtual char *genSaveName(int slot);
 };
 
-#ifdef ENABLE_PN
 class AGOSEngine_PN : public AGOSEngine {
 
 	virtual Common::Error go();
@@ -1510,7 +1509,6 @@
 
 	const OpcodeEntryPN *_opcodesPN;
 };
-#endif
 
 class AGOSEngine_Elvira1 : public AGOSEngine {
 public:

Modified: scummvm/branches/gsoc2009-mods/engines/agos/animation.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/animation.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/animation.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -25,6 +25,8 @@
 
 
 
+#ifdef ENABLE_AGOS2
+
 #include "common/endian.h"
 #include "common/events.h"
 #include "common/file.h"
@@ -542,3 +544,5 @@
 }
 
 } // End of namespace AGOS
+
+#endif // ENABLE_AGOS2

Modified: scummvm/branches/gsoc2009-mods/engines/agos/animation.h
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/animation.h	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/animation.h	2009-08-12 22:39:48 UTC (rev 43330)
@@ -23,6 +23,8 @@
  *
  */
 
+#ifdef ENABLE_AGOS2
+
 #ifndef AGOS_ANIMATION_H
 #define AGOS_ANIMATION_H
 
@@ -112,3 +114,5 @@
 } // End of namespace AGOS
 
 #endif
+
+#endif // ENABLE_AGOS2

Modified: scummvm/branches/gsoc2009-mods/engines/agos/charset.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/charset.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/charset.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -486,13 +486,11 @@
 		_textWindow = openWindow(8, 144, 24, 6, 1, 0, 15);
 }
 
-#ifdef ENABLE_PN
 void AGOSEngine_PN::windowPutChar(WindowBlock *window, byte c, byte b) {
 	if (_mousePrintFG || _wiped)
 		return;
 	AGOSEngine::windowPutChar(window, c, b);
 }
-#endif
 
 void AGOSEngine::windowPutChar(WindowBlock *window, byte c, byte b) {
 	byte width = 6;

Modified: scummvm/branches/gsoc2009-mods/engines/agos/cursor.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/cursor.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/cursor.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -476,7 +476,6 @@
 	_litBoxFlag = 0;
 }
 
-#ifdef ENABLE_PN
 void AGOSEngine_PN::handleMouseMoved() {
 	if (_mouseHideCount) {
 		CursorMan.showMouse(false);
@@ -541,7 +540,6 @@
 	_needHitAreaRecalc = 0;
 	_litBoxFlag = 0;
 }
-#endif
 
 void AGOSEngine::handleMouseMoved() {
 	uint x;

Modified: scummvm/branches/gsoc2009-mods/engines/agos/detection.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/detection.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/detection.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -66,9 +66,7 @@
 };
 
 static const PlainGameDescriptor simonGames[] = {
-#ifdef ENABLE_PN
 	{"pn", "Personal Nightmare"},
-#endif
 	{"elvira1", "Elvira - Mistress of the Dark"},
 	{"elvira2", "Elvira II - The Jaws of Cerberus"},
 	{"waxworks", "Waxworks"},
@@ -142,11 +140,9 @@
 	bool res = true;
 
 	switch (gd->gameType) {
-#ifdef ENABLE_PN
 	case AGOS::GType_PN:
 		*engine = new AGOS::AGOSEngine_PN(syst);
 		break;
-#endif
 	case AGOS::GType_ELVIRA1:
 		*engine = new AGOS::AGOSEngine_Elvira1(syst);
 		break;

Modified: scummvm/branches/gsoc2009-mods/engines/agos/detection_tables.h
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/detection_tables.h	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/detection_tables.h	2009-08-12 22:39:48 UTC (rev 43330)
@@ -32,7 +32,6 @@
 using Common::GUIO_NOSUBTITLES;
 
 static const AGOSGameDescription gameDescriptions[] = {
-#ifdef ENABLE_PN
 	// Personal Nightmare 1.1 - English Amiga
 	{
 		{
@@ -124,7 +123,6 @@
 		GID_PN,
 		GF_OLD_BUNDLE | GF_CRUNCHED | GF_EGA | GF_PLANAR
 	},
-#endif
 
 	// Elvira 1 - English Amiga Floppy Demo
 	{

Modified: scummvm/branches/gsoc2009-mods/engines/agos/event.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/event.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/event.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -557,7 +557,8 @@
 	_lastTickCount = _system->getMillis();
 
 	AGOSEngine_Feeble::timerProc();
-	dimpIdle();
+	if (getGameId() == GID_DIMP)
+		dimpIdle();
 }
 
 void AGOSEngine_Feeble::timerProc() {
@@ -612,7 +613,6 @@
 }
 #endif
 
-#ifdef ENABLE_PN
 void AGOSEngine_PN::timerProc() {
 	if (_videoLockOut & 0x80E9 || _videoLockOut & 2)
 		return;
@@ -651,7 +651,6 @@
 
 	_videoLockOut &= ~2;
 }
-#endif
 
 void AGOSEngine::timerProc() {
 	if (_videoLockOut & 0x80E9 || _videoLockOut & 2)

Modified: scummvm/branches/gsoc2009-mods/engines/agos/feeble.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/feeble.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/feeble.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -23,6 +23,10 @@
  *
  */
 
+
+
+#ifdef ENABLE_AGOS2
+
 #include "common/config-manager.h"
 
 #include "agos/intern.h"
@@ -383,3 +387,5 @@
 }
 
 } // End of namespace AGOS
+
+#endif // ENABLE_AGOS2

Modified: scummvm/branches/gsoc2009-mods/engines/agos/gfx.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/gfx.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/gfx.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -1262,7 +1262,6 @@
 	_vcPtr = vc_ptr_org;
 }
 
-#ifdef ENABLE_PN
 void AGOSEngine_PN::setWindowImageEx(uint16 mode, uint16 vga_res) {
 	if (!_initMouse) {
 		_initMouse = 1;
@@ -1270,7 +1269,6 @@
 	}
 	setWindowImage(mode, vga_res);
 }
-#endif
 
 void AGOSEngine::setWindowImageEx(uint16 mode, uint16 vgaSpriteId) {
 	_window3Flag = 0;

Modified: scummvm/branches/gsoc2009-mods/engines/agos/icons.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/icons.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/icons.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -1046,7 +1046,6 @@
 	0x3C, 0x89, 0xC3, 0x00, 0x88, 0x88, 0x18, 0x03, 0x86, 0x23, 0x0C, 0x00
 };
 
-#ifdef ENABLE_PN
 // Personal Nightmare specific
 void AGOSEngine_PN::drawIconHitBar() {
 	Graphics::Surface *screen = _system->lockScreen();
@@ -1126,6 +1125,5 @@
 		}
 	}
 }
-#endif
 
 } // End of namespace AGOS

Modified: scummvm/branches/gsoc2009-mods/engines/agos/input.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/input.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/input.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -624,143 +624,4 @@
 	return verbCode;
 }
 
-#ifdef ENABLE_PN
-// Personal Nightmare specific
-void AGOSEngine_PN::clearInputLine() {
-	_inputting = false;
-	_inputReady = false;
-	clearWindow(_windowArray[2]);
-}
-
-void AGOSEngine_PN::handleKeyboard() {
-	if (!_inputReady)
-		return;
-
-	if (_hitCalled != 0) {
-		mouseHit();
-	}
-
-	int16 chr = -1;
-	if (_mouseString) {
-		const char *strPtr = _mouseString;
-		while (*strPtr != 0 && *strPtr != 13)
-			addChar(*strPtr++);
-		_mouseString = 0;
-
-		chr = *strPtr;
-		if (chr == 13) {
-			addChar(13);
-		}
-	}
-	if (_mouseString1 && chr != 13) {
-		const char *strPtr = _mouseString1;
-		while (*strPtr != 13)
-			addChar(*strPtr++);
-		_mouseString1 = 0;
-
-		chr = *strPtr;
-		if (chr == 13) {
-			addChar(13);
-		}
-	}
-	if (chr == -1) {
-		if (_keyPressed.keycode == Common::KEYCODE_BACKSPACE || _keyPressed.keycode == Common::KEYCODE_RETURN) {
-			chr = _keyPressed.keycode;
-			addChar(chr);
-		} else if (!(_videoLockOut & 0x10)) {
-			chr = _keyPressed.ascii;
-			if (chr >= 32)
-				addChar(chr);
-		}
-	}
-
-	if (chr == 13) {
-		_mouseString = 0;
-		_mouseString1 = 0;
-		_mousePrintFG = 0;
-		_inputReady = false;
-	}
-
-	_keyPressed.reset();
-}
-
-void AGOSEngine_PN::interact(char *buffer, uint8 size) {
-	if (!_inputting) {
-		memset(_keyboardBuffer, 0, sizeof(_keyboardBuffer));
-		_intputCounter = 0;
-		_inputMax = size;
-		_inputWindow = _windowArray[_curWindow];
-		windowPutChar(_inputWindow, 128);
-		windowPutChar(_inputWindow, 8);
-		_inputting = true;
-		_inputReady = true;
-	}
-
-	while (!shouldQuit() && _inputReady) {
-		if (!_noScanFlag && _scanFlag) {
-			buffer[0] = 1;
-			buffer[1] = 0;
-			_scanFlag = 0;
-			break;
-		}
-		delay(1);
-	}
-
-	if (!_inputReady) {
-		memcpy(buffer, _keyboardBuffer, size);
-		_inputting = false;
-	}
-}
-
-void AGOSEngine_PN::addChar(uint8 chr) {
-	if (chr == 13) {
-		_keyboardBuffer[_intputCounter++] = chr;
-		windowPutChar(_inputWindow, 13);
-	} else if (chr == 8 && _intputCounter) {
-		clearCursor(_inputWindow);
-		windowPutChar(_inputWindow, 8);
-		windowPutChar(_inputWindow, 128);
-		windowPutChar(_inputWindow, 8);
-
-		_keyboardBuffer[--_intputCounter] = 0;
-	} else if (chr >= 32 && _intputCounter < _inputMax) {
-		_keyboardBuffer[_intputCounter++] = chr;
-
-		clearCursor(_inputWindow);
-		windowPutChar(_inputWindow, chr);
-		windowPutChar(_inputWindow, 128);
-		windowPutChar(_inputWindow, 8);
-	}
-}
-
-void AGOSEngine_PN::clearCursor(WindowBlock *window) {
-	byte oldTextColor = window->textColor;
-
-	window->textColor = window->fillColor;
-	windowPutChar(window, 128);
-	window->textColor = oldTextColor;
-
-	windowPutChar(window, 8);
-}
-
-bool AGOSEngine_PN::processSpecialKeys() {
-	if (shouldQuit())
-		_exitCutscene = true;
-
-	switch (_keyPressed.keycode) {
-	case Common::KEYCODE_ESCAPE:
-		_exitCutscene = true;
-		break;
-	case Common::KEYCODE_PAUSE:
-		pause();
-		break;
-	default:
-		break;
-	}
-
-	_keyPressed.reset();
-	return false;
-}
-#endif
-
 } // End of namespace AGOS

Copied: scummvm/branches/gsoc2009-mods/engines/agos/input_pn.cpp (from rev 43329, scummvm/trunk/engines/agos/input_pn.cpp)
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/input_pn.cpp	                        (rev 0)
+++ scummvm/branches/gsoc2009-mods/engines/agos/input_pn.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -0,0 +1,169 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+
+
+#include "agos/agos.h"
+#include "agos/intern.h"
+
+namespace AGOS {
+
+void AGOSEngine_PN::clearInputLine() {
+	_inputting = false;
+	_inputReady = false;
+	clearWindow(_windowArray[2]);
+}
+
+void AGOSEngine_PN::handleKeyboard() {
+	if (!_inputReady)
+		return;
+
+	if (_hitCalled != 0) {
+		mouseHit();
+	}
+
+	int16 chr = -1;
+	if (_mouseString) {
+		const char *strPtr = _mouseString;
+		while (*strPtr != 0 && *strPtr != 13)
+			addChar(*strPtr++);
+		_mouseString = 0;
+
+		chr = *strPtr;
+		if (chr == 13) {
+			addChar(13);
+		}
+	}
+	if (_mouseString1 && chr != 13) {
+		const char *strPtr = _mouseString1;
+		while (*strPtr != 13)
+			addChar(*strPtr++);
+		_mouseString1 = 0;
+
+		chr = *strPtr;
+		if (chr == 13) {
+			addChar(13);
+		}
+	}
+	if (chr == -1) {
+		if (_keyPressed.keycode == Common::KEYCODE_BACKSPACE || _keyPressed.keycode == Common::KEYCODE_RETURN) {
+			chr = _keyPressed.keycode;
+			addChar(chr);
+		} else if (!(_videoLockOut & 0x10)) {
+			chr = _keyPressed.ascii;
+			if (chr >= 32)
+				addChar(chr);
+		}
+	}
+
+	if (chr == 13) {
+		_mouseString = 0;
+		_mouseString1 = 0;
+		_mousePrintFG = 0;
+		_inputReady = false;
+	}
+
+	_keyPressed.reset();
+}
+
+void AGOSEngine_PN::interact(char *buffer, uint8 size) {
+	if (!_inputting) {
+		memset(_keyboardBuffer, 0, sizeof(_keyboardBuffer));
+		_intputCounter = 0;
+		_inputMax = size;
+		_inputWindow = _windowArray[_curWindow];
+		windowPutChar(_inputWindow, 128);
+		windowPutChar(_inputWindow, 8);
+		_inputting = true;
+		_inputReady = true;
+	}
+
+	while (!shouldQuit() && _inputReady) {
+		if (!_noScanFlag && _scanFlag) {
+			buffer[0] = 1;
+			buffer[1] = 0;
+			_scanFlag = 0;
+			break;
+		}
+		delay(1);
+	}
+
+	if (!_inputReady) {
+		memcpy(buffer, _keyboardBuffer, size);
+		_inputting = false;
+	}
+}
+
+void AGOSEngine_PN::addChar(uint8 chr) {
+	if (chr == 13) {
+		_keyboardBuffer[_intputCounter++] = chr;
+		windowPutChar(_inputWindow, 13);
+	} else if (chr == 8 && _intputCounter) {
+		clearCursor(_inputWindow);
+		windowPutChar(_inputWindow, 8);
+		windowPutChar(_inputWindow, 128);
+		windowPutChar(_inputWindow, 8);
+
+		_keyboardBuffer[--_intputCounter] = 0;
+	} else if (chr >= 32 && _intputCounter < _inputMax) {
+		_keyboardBuffer[_intputCounter++] = chr;
+
+		clearCursor(_inputWindow);
+		windowPutChar(_inputWindow, chr);
+		windowPutChar(_inputWindow, 128);
+		windowPutChar(_inputWindow, 8);
+	}
+}
+
+void AGOSEngine_PN::clearCursor(WindowBlock *window) {
+	byte oldTextColor = window->textColor;
+
+	window->textColor = window->fillColor;
+	windowPutChar(window, 128);
+	window->textColor = oldTextColor;
+
+	windowPutChar(window, 8);
+}
+
+bool AGOSEngine_PN::processSpecialKeys() {
+	if (shouldQuit())
+		_exitCutscene = true;
+
+	switch (_keyPressed.keycode) {
+	case Common::KEYCODE_ESCAPE:
+		_exitCutscene = true;
+		break;
+	case Common::KEYCODE_PAUSE:
+		pause();
+		break;
+	default:
+		break;
+	}
+
+	_keyPressed.reset();
+	return false;
+}
+
+} // End of namespace AGOS

Modified: scummvm/branches/gsoc2009-mods/engines/agos/module.mk
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/module.mk	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/module.mk	2009-08-12 22:39:48 UTC (rev 43330)
@@ -14,16 +14,19 @@
 	gfx.o \
 	icons.o \
 	input.o \
+	input_pn.o \
 	items.o \
 	menus.o \
 	midi.o \
 	midiparser_s1d.o \
+	pn.o \
 	res.o \
 	res_ami.o \
 	res_snd.o \
 	rooms.o \
 	saveload.o \
 	script.o \
+	script_pn.o \
 	script_e1.o \
 	script_e2.o \
 	script_ww.o \
@@ -31,9 +34,12 @@
 	script_s2.o \
 	sound.o \
 	string.o \
+	string_pn.o \
 	subroutine.o \
 	verb.o \
+	verb_pn.o \
 	vga.o \
+	vga_pn.o \
 	vga_e2.o \
 	vga_ww.o \
 	vga_s1.o \
@@ -41,13 +47,6 @@
 	window.o \
 	zones.o
 
-ifdef ENABLE_PN
-MODULE_OBJS += \
-	pn.o \
-	script_pn.o \
-	vga_pn.o
-endif
-
 ifdef ENABLE_AGOS2
 MODULE_OBJS += \
 	animation.o \

Modified: scummvm/branches/gsoc2009-mods/engines/agos/oracle.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/oracle.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/oracle.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -25,6 +25,8 @@
 
 
 
+#ifdef ENABLE_AGOS2
+
 #include "common/savefile.h"
 #include "common/system.h"
 
@@ -520,3 +522,5 @@
 }
 
 } // End of namespace AGOS
+
+#endif // ENABLE_AGOS2

Modified: scummvm/branches/gsoc2009-mods/engines/agos/pn.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/pn.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/pn.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -23,8 +23,6 @@
  *
  */
 
-#ifdef ENABLE_PN
-
 #include "common/config-manager.h"
 
 #include "agos/intern.h"
@@ -297,5 +295,3 @@
 }
 
 } // End of namespace AGOS
-
-#endif

Modified: scummvm/branches/gsoc2009-mods/engines/agos/res.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/res.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/res.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -152,7 +152,6 @@
 	return itemArrayInited;
 }
 
-#ifdef ENABLE_PN
 void AGOSEngine_PN::loadGamePcFile() {
 	Common::File in;
 
@@ -192,7 +191,6 @@
 			error("Unknown compression format");
 	}
 }
-#endif
 
 void AGOSEngine::loadGamePcFile() {
 	Common::File in;

Modified: scummvm/branches/gsoc2009-mods/engines/agos/saveload.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/saveload.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/saveload.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -1551,7 +1551,6 @@
 	return result;
 }
 
-#ifdef ENABLE_PN
 // Personal Nightmare specific
 bool AGOSEngine_PN::badload(int8 errorNum) {
 	if (errorNum == -2)
@@ -1675,6 +1674,5 @@
 		ct++;
 	}
 }
-#endif
 
 } // End of namespace AGOS

Modified: scummvm/branches/gsoc2009-mods/engines/agos/script_ff.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/script_ff.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/script_ff.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -25,6 +25,8 @@
 
 
 
+#ifdef ENABLE_AGOS2
+
 #include "common/system.h"
 
 #include "agos/animation.h"
@@ -675,3 +677,5 @@
 }
 
 } // End of namespace AGOS
+
+#endif // ENABLE_AGOS2

Modified: scummvm/branches/gsoc2009-mods/engines/agos/script_pn.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/script_pn.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/script_pn.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -23,8 +23,6 @@
  *
  */
 
-#ifdef ENABLE_PN
-
 #include "agos/agos.h"
 #include "agos/vga.h"
 
@@ -1119,5 +1117,3 @@
 }
 
 } // End of namespace AGOS
-
-#endif

Modified: scummvm/branches/gsoc2009-mods/engines/agos/script_pp.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/script_pp.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/script_pp.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -25,6 +25,8 @@
 
 
 
+#ifdef ENABLE_AGOS2
+
 #include "common/system.h"
 
 #include "agos/agos.h"
@@ -457,3 +459,5 @@
 }
 
 } // End of namespace AGOS
+
+#endif // ENABLE_AGOS2

Modified: scummvm/branches/gsoc2009-mods/engines/agos/string.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/string.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/string.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -955,648 +955,4 @@
 	changeWindow(0);
 }
 
-#ifdef ENABLE_PN
-// Personal Nightmare specific
-uint32 AGOSEngine_PN::ftext(uint32 base, int n) {
-	uint32 b = base;
-	int ct = n;
-	while (ct) {
-		while(_textBase[b++])
-			;
-		ct--;
-	}
-	return b;
-}
-
-char *AGOSEngine_PN::unctok(char *c, int n) {
-	int x;
-	uint8 *tokbase;
-	tokbase = _textBase + getlong(30);
-	x = n;
-	while (x-=(*tokbase++ > 127))
-		;
-	while (*tokbase < 128)
-		*c++=*tokbase++;
-	*c++ = *tokbase & 127;
-	*c = 0;
-	return c;
-}
-
-void AGOSEngine_PN::uncomstr(char *c, uint32 x) {
-	if (x > _textBaseSize)
-		error("UNCOMSTR: TBASE over-run");
-	while (_textBase[x]) {
-		if (_textBase[x] < 244) {
-			c = unctok(c, _textBase[x]);
-		} else {
-			c = unctok(c, (_textBase[x] - 244) * 254 + _textBase[x + 1] - 1);
-			x++;
-		}
-		x++;
-	}
-	*c++ = 13;
-	*c = 0;
-}
-
-static const char *objectNames[30] = {
-	"\0",
-	"Take \0",
-	"Inventory\r",
-	"Open \0",
-	"Close \0",
-	"Lock \0",
-	"Unlock \0",
-	"Examine \0",
-	"Look in \0",
-	"Exits \r",
-	"Look\r",
-	"Wait\r",
-	"Pause\r",
-	"\0",
-	"Save\r",
-	"Restore\r",
-	"\0",
-	"N\r",
-	"NE\r",
-	"E\r",
-	"SE\r",
-	"S\r",
-	"SW\r",
-	"W\r",
-	"NW\r",
-	"INVENTORY\r",
-	"ROOM DESCRIPTION\r",
-	"x\r",
-	"MORE\r",
-	"CLOSE\r"
-};
-
-void AGOSEngine_PN::getObjectName(char *v, uint16 x) {
-	if (x & 0x8000) {
-		x &= ~0x8000;
-		if (x > getptr(51))
-			error("getObjectName: Object %d out of range", x);
-		uncomstr(v, ftext(getlong(27), x * _dataBase[47]));
-	} else {
-		assert(x < 30);
-		strcpy(v, objectNames[x]);
-	}
-}
-
-void AGOSEngine_PN::pcl(const char *s) {
-	strcat(_sb, s);
-	if (strchr(s, '\n') == 0) {
-		for (char *str = _sb; *str; str++)
-			windowPutChar(_windowArray[_curWindow], *str);
-		strcpy(_sb, "");
-	}
-}
-
-void AGOSEngine_PN::pcf(uint8 ch) {
-	int ct = 0;
-	if (ch == '[')
-		ch = '\n';
-	if (ch == 0)
-		return;	/* Trap any C EOS chrs */
-	if (ch == 255) {
-		_bp = 0;
-		_xofs = 0;
-		return;		/* pcf(255) initialises the routine */
-	}			/* pcf(254) flushes its working _buffer */
-	if (ch != 254) {
-		if ((ch != 32) || (_bp + _xofs != 50))
-			_buffer[_bp++] = ch;
-	}
-	if ((ch != 254) && (!isspace(ch)) && (_bp < 60))
-		return;
-	/* We know have a case of needing to print the text */
-	if (_bp + _xofs > 50) {
-		pcl("\n");
-		if (_buffer[0] == ' ')
-			ct = 1;	/* Skip initial space */
-		/* Note '  ' will give a single start of line space */
-		_xofs = 0;
-	}
-	_buffer[_bp] = 0;
-	pcl(_buffer + ct);
-	_xofs += _bp;
-	_bp = 0;
-	if (ch == '\n')
-		_xofs = 0;	/* At Newline! */
-}
-
-void AGOSEngine_PN::patok(int n) {
-	int x;
-	uint8 *tokbase;
-	tokbase = _textBase + getlong(30);
-	x = n;
-	while (x -= (*tokbase++ > 127))
-		;
-	while (*tokbase < 128)
-		pcf(*tokbase++);
-	pcf((uint8)(*tokbase & 127));
-}
-
-void AGOSEngine_PN::pmesd(int n) {
-	ptext(ftext(getlong(24), n));
-}
-
-void AGOSEngine_PN::plocd(int n, int m) {
-	if (n > getptr(53))
-		error("Location out of range");
-	ptext(ftext(getlong(21), n * _dataBase[48] + m));
-}
-
-void AGOSEngine_PN::pobjd(int n, int m) {
-	if (n > getptr(51))
-		error("Object out of range");
-	ptext(ftext(getlong(27), n * _dataBase[47] + m));
-}
-
-void AGOSEngine_PN::ptext(uint32 tptr) {
-	if (tptr > _textBaseSize)
-		error("ptext: attempt to print beyond end of TBASE");
-
-	while (_textBase[tptr]) {
-		if (_textBase[tptr] < 244) {
-			patok(_textBase[tptr++]);
-		} else {
-			patok((_textBase[tptr] - 244) * 254 + _textBase[tptr + 1] - 1);
-			tptr += 2;
-		}
-	}
-}
-
-const uint8 characters[11][80] = {
-// PETERMASON
-	{
-		118, 225,
-		 91, 118,
-		 94, 124,
-		236, 161,
-		241, 166,
-		168,   4,
-		138,  46,
-		139,  46,
-		249,  50,
-		 38,  56,
-		 80,  59,
-		149,  69,
-		 37,  77,
-		 93,  93,
-		 86,  95,
-		  0,
-		  0,
-		 58, 130,
-		 62, 178,
-		 83,  95,
-		  0,
-		121,  58,
-		122,  59,
-		126,  60,
-		124,  61,
-		240,  62,
-		123,  63,
-		0
-	},
-// JBLANDFORD
-	{
-		0,
-		0,
-		0,
-		0
-	},
-// SBLANDFORD
-	{
-		120, 223,
-		 94, 126,
-		112, 134,
-		 45, 152,
-		241, 166,
-		168,   3,
-		150,  26,
-		220,  29,
-		138,  42,
-		139,  47,
-		249,  50,
-		 38,  56,
-		230,  64,
-		 37,  77,
-		 93,  94,
-		 86,  96,
-		  0,
-		  0,
-		 58, 129,
-		 59, 112,
-		 83,  96,
-		 81, 106,
-		 62, 169,
-		  0,
-		121,  54,
-		122,  55,
-		119,  56,
-		118,  57,
-		  0
-	},
-// MRJONES
-	{
-		121, 218,
-		 91, 118,
-		253, 121,
-		154, 138,
-		235, 173,
-		236, 161,
-		241, 165,
-		168,   0,
-		150,  21,
-		 36,  33,
-		138,  42,
-		249,  50,
-		 80,  60,
-		  4,  60,
-		 37,  78,
-		 68,  33,
-		 93,  92,
-		101, 109,
-		  0,
-		 36,  35,
-		 68,  90,
-		  0,
-		 58, 128,
-		 59, 111,
-		 62, 182,
-		  0,
-		122,  13,
-		126,  14,
-		124,  15,
-		240,  16,
-		120,  17,
-		119,  18,
-		118,  19,
-		 52,  20,
-		125,  21,
-		127,  22,
-		123,  23,
-		117,  24,
-		  0
-	},
-// MRSJONES
-	{
-		122, 219,
-		 91, 119,
-		253, 123,
-		112, 136,
-		154, 137,
-		 95, 142,
-		 45, 152,
-		109, 155,
-		235, 160,
-		168,   1,
-		151,  13,
-		145,  15,
-		150,  22,
-		220,  28,
-		 36,  33,
-		138,  43,
-		 13,  51,
-		 80,  59,
-		230,  64,
-		149,  69,
-		 86, 100,
-		  0,
-		 36,  36,
-		  0,
-		 58, 127,
-		 62, 179,
-		 83, 100,
-		 81, 102,
-		  0,
-		121,  25,
-		126,  26,
-		124,  27,
-		120,  28,
-		119,  29,
-		118,  30,
-		 52,  31,
-		125,  32,
-		127,  33,
-		123,  34,
-		117,  35,
-		0
-	},
-// MRROBERTS
-	{
-		123, 229,
-		 91, 117,
-		253, 120,
-		 94, 125,
-		112, 134,
-		109, 156,
-		235, 172,
-		236, 162,
-		241, 165,
-		168,   3,
-		 36,  33,
-		249,  50,
-		 38,  56,
-		 80,  58,
-		 37,  75,
-		 34,  81,
-		 68,  33,
-		101, 109,
-		  0,
-		 36,  40,
-		 68,  88,
-		  0,
-		 59, 111,
-		 62, 181,
-		  0,
-		  0
-	},
-// POSTMISTRESS
-	{
-		124, 221,
-		 91, 119,
-		253, 122,
-		112, 136,
-		 95, 142,
-		130, 149,
-		109, 155,
-		235, 176,
-		220,  29,
-		 36,  33,
-		138,  43,
-		 13,  51,
-		 80,  57,
-		149,  68,
-		 37,  73,
-		 34,  33,
-		 68,  33,
-		 86, 100,
-		  0,
-		 36,  39,
-		 34,  80,
-		 68,  86,
-		  0,
-		 58, 130,
-		 62, 181,
-		 83, 100,
-		 81, 103,
-		  0,
-		121,  41,
-		122,  42,
-		126,  43,
-		240,  44,
-		120,  45,
-		119,  46,
-		118,  47,
-		 52,  48,
-		123,  49,
-		 83,  50,
-		117,  51,
-		  0
-	},
-// MWILLIAMS
-	{
-		125, 227,
-		 94, 124,
-		 95, 141,
-		241, 166,
-		168,   4,
-		150,  26,
-		 38,  54,
-		  4,  60,
-		230,  65,
-		149,  68,
-		 37,  76,
-		101, 109,
-		  0,
-		230,  63,
-		  0,
-		 59, 112,
-		 62, 183,
-		  0,
-		240,  71,
-		120,  72,
-		118,  73,
-		 52,  74,
-		117,  75,
-		  0
-	},
-// TONY
-	{
-		126, 220,
-		 95, 143,
-		130, 149,
-		 45, 153,
-		109, 154,
-		235, 158,
-		241, 166,
-		168,   2,
-		145,  15,
-		150,  24,
-		220,  20,
-		 36,  20,
-		  4,  60,
-		 37,  79,
-		 86,  97,
-		  0,
-		150,  23,
-		220,  27,
-		 36,  34,
-		  0,
-		 83,  97,
-		  0,
-		121,  36,
-		122,  37,
-		124,  38,
-		240,  39,
-		 52,  40,
-		  0
-	},
-// PIG
-	{
-		127, 228,
-		112, 133,
-		 45, 153,
-		235, 157,
-		236, 163,
-		241, 165,
-		 36,  33,
-		 80,  58,
-		 34,  81,
-		 68,  33,
-		 86,  98,
-		  0,
-		 36,  37,
-		 68,  90,
-		  0,
-		 62, 184,
-		 83,  98,
-		  0,
-		121,  76,
-		122,  77,
-		126,  78,
-		124,  79,
-		240,  80,
-		120,  81,
-		118,  82,
-		 52,  83,
-		125,  84,
-		123,  85,
-		 83,  86,
-		117,  87,
-		  0
-	},
-// JUDY
-	{
-			  0,
-			  0,
-			  0,
-			240, 52,
-			117, 53,
-			  0
-	}
-};
-
-void AGOSEngine_PN::getResponse(uint16 charNum, uint16 objNum, uint16 &msgNum1, uint16 &msgNum2) {
-	const uint8 *ptr;
-	uint16 num;
-
-	msgNum1 = 0;
-	msgNum2 = 0;
-
-	if (charNum == 83)
-		charNum += 45;
-
-	if (charNum < 118 || charNum > 128) {
-		return;
-	}
-
-	ptr = characters[charNum - 118];
-
-	while ((num = *ptr++) != 0) {
-		if (num == objNum) {
-			msgNum1 = *ptr++;
-			msgNum1 += 400;
-
-			while ((num = *ptr++) != 0)
-				ptr++;
-			break;
-		}
-		ptr++;
-	}
-
-	while ((num = *ptr++) != 0) {
-		if (num == objNum) {
-			msgNum2 = *ptr++;
-			msgNum2 += 400;
-
-			if (msgNum1 == 569)
-				msgNum1 += 400;
-			if (msgNum2 == 0)
-				msgNum2 = msgNum1;
-			return;
-		}
-		ptr++;
-	}
-
-	if (objNum >= 200)
-		msgNum1 = 0;
-
-	objNum -= 200;
-	while ((num = *ptr++) != 0) {
-		if (num == objNum) {
-			msgNum1 = *ptr++;
-			msgNum1 += 400;
-
-			if (msgNum1 == 569)
-				msgNum1 += 400;
-			if (msgNum2 == 0)
-				msgNum2 = msgNum1;
-			return;
-		}
-		ptr++;
-	}
-
-	objNum += 200;
-	while ((num = *ptr++) != 0) {
-		if (num == objNum) {
-			msgNum1 = *ptr++;
-			msgNum1 += 200;
-
-			if (msgNum1 == 569)
-				msgNum1 += 400;
-			if (msgNum2 == 0)
-				msgNum2 = msgNum1;
-			return;
-		}
-		ptr++;
-	}
-
-	if (msgNum1 == 569)
-		msgNum1 += 400;
-	if (msgNum2 == 0)
-		msgNum2 = msgNum1;
-}
-
-char *AGOSEngine_PN::getMessage(char *msg, uint16 num) {
-	char *origPtr, *strPtr1 = msg;
-	uint8 count;
-
-	getObjectName(strPtr1, num);
-	if (!(num & 0x8000)) {
-		return msg;
-	}
-
-	if (strPtr1[0] == 0x41 || strPtr1[0] == 0x61) {
-		if (strPtr1[1] != 0x20)
-			strPtr1 += 2;
-	} else if (strPtr1[0] == 0x54 || strPtr1[0] == 0x74) {
-		if (strPtr1[1] == 0x68 &&
-		    strPtr1[2] == 0x65 &&
-		    strPtr1[3] == 0x20)
-			strPtr1 += 4;
-	}
-
-	origPtr = strPtr1;
-	while (*strPtr1 != 13)
-		strPtr1++;
-
-	strPtr1[0] = 32;
-	strPtr1[1] = 13;
-	strPtr1[2] = 0;
-
-	if (_videoLockOut & 0x10) {
-		strPtr1 = origPtr;
-		count = 6;
-		while (*strPtr1) {
-			if (*strPtr1 == 32) {
-				count = 6;
-			} else {
-				count--;
-				if (count == 0) {
-					char *tmpPtr = strPtr1;
-					char *strPtr2 = strPtr1;
-
-					while (*strPtr2 != 0 && *strPtr2 != 32)
-						strPtr2++;
-
-					while (*strPtr2) {
-						*strPtr1++ = *strPtr2++;
-					}
-					*strPtr1++ = *strPtr2++;
-
-					strPtr1 = tmpPtr;
-					count = 6;
-				}
-			}
-			strPtr1++;
-		}
-	}
-
-	return origPtr;
-}
-#endif
-
 } // End of namespace AGOS

Copied: scummvm/branches/gsoc2009-mods/engines/agos/string_pn.cpp (from rev 43329, scummvm/trunk/engines/agos/string_pn.cpp)
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/string_pn.cpp	                        (rev 0)
+++ scummvm/branches/gsoc2009-mods/engines/agos/string_pn.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -0,0 +1,674 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+
+
+#include "agos/agos.h"
+#include "agos/intern.h"
+
+namespace AGOS {
+
+uint32 AGOSEngine_PN::ftext(uint32 base, int n) {
+	uint32 b = base;
+	int ct = n;
+	while (ct) {
+		while(_textBase[b++])
+			;
+		ct--;
+	}
+	return b;
+}
+
+char *AGOSEngine_PN::unctok(char *c, int n) {
+	int x;
+	uint8 *tokbase;
+	tokbase = _textBase + getlong(30);
+	x = n;
+	while (x-=(*tokbase++ > 127))
+		;
+	while (*tokbase < 128)
+		*c++=*tokbase++;
+	*c++ = *tokbase & 127;
+	*c = 0;
+	return c;
+}
+
+void AGOSEngine_PN::uncomstr(char *c, uint32 x) {
+	if (x > _textBaseSize)
+		error("UNCOMSTR: TBASE over-run");
+	while (_textBase[x]) {
+		if (_textBase[x] < 244) {
+			c = unctok(c, _textBase[x]);
+		} else {
+			c = unctok(c, (_textBase[x] - 244) * 254 + _textBase[x + 1] - 1);
+			x++;
+		}
+		x++;
+	}
+	*c++ = 13;
+	*c = 0;
+}
+
+static const char *objectNames[30] = {
+	"\0",
+	"Take \0",
+	"Inventory\r",
+	"Open \0",
+	"Close \0",
+	"Lock \0",
+	"Unlock \0",
+	"Examine \0",
+	"Look in \0",
+	"Exits \r",
+	"Look\r",
+	"Wait\r",
+	"Pause\r",
+	"\0",
+	"Save\r",
+	"Restore\r",
+	"\0",
+	"N\r",
+	"NE\r",
+	"E\r",
+	"SE\r",
+	"S\r",
+	"SW\r",
+	"W\r",
+	"NW\r",
+	"INVENTORY\r",
+	"ROOM DESCRIPTION\r",
+	"x\r",
+	"MORE\r",
+	"CLOSE\r"
+};
+
+void AGOSEngine_PN::getObjectName(char *v, uint16 x) {
+	if (x & 0x8000) {
+		x &= ~0x8000;
+		if (x > getptr(51))
+			error("getObjectName: Object %d out of range", x);
+		uncomstr(v, ftext(getlong(27), x * _dataBase[47]));
+	} else {
+		assert(x < 30);
+		strcpy(v, objectNames[x]);
+	}
+}
+
+void AGOSEngine_PN::pcl(const char *s) {
+	strcat(_sb, s);
+	if (strchr(s, '\n') == 0) {
+		for (char *str = _sb; *str; str++)
+			windowPutChar(_windowArray[_curWindow], *str);
+		strcpy(_sb, "");
+	}
+}
+
+void AGOSEngine_PN::pcf(uint8 ch) {
+	int ct = 0;
+	if (ch == '[')
+		ch = '\n';
+	if (ch == 0)
+		return;	/* Trap any C EOS chrs */
+	if (ch == 255) {
+		_bp = 0;
+		_xofs = 0;
+		return;		/* pcf(255) initialises the routine */
+	}			/* pcf(254) flushes its working _buffer */
+	if (ch != 254) {
+		if ((ch != 32) || (_bp + _xofs != 50))
+			_buffer[_bp++] = ch;
+	}
+	if ((ch != 254) && (!isspace(ch)) && (_bp < 60))
+		return;
+	/* We know have a case of needing to print the text */
+	if (_bp + _xofs > 50) {
+		pcl("\n");
+		if (_buffer[0] == ' ')
+			ct = 1;	/* Skip initial space */
+		/* Note '  ' will give a single start of line space */
+		_xofs = 0;
+	}
+	_buffer[_bp] = 0;
+	pcl(_buffer + ct);
+	_xofs += _bp;
+	_bp = 0;
+	if (ch == '\n')
+		_xofs = 0;	/* At Newline! */
+}
+
+void AGOSEngine_PN::patok(int n) {
+	int x;
+	uint8 *tokbase;
+	tokbase = _textBase + getlong(30);
+	x = n;
+	while (x -= (*tokbase++ > 127))
+		;
+	while (*tokbase < 128)
+		pcf(*tokbase++);
+	pcf((uint8)(*tokbase & 127));
+}
+
+void AGOSEngine_PN::pmesd(int n) {
+	ptext(ftext(getlong(24), n));
+}
+
+void AGOSEngine_PN::plocd(int n, int m) {
+	if (n > getptr(53))
+		error("Location out of range");
+	ptext(ftext(getlong(21), n * _dataBase[48] + m));
+}
+
+void AGOSEngine_PN::pobjd(int n, int m) {
+	if (n > getptr(51))
+		error("Object out of range");
+	ptext(ftext(getlong(27), n * _dataBase[47] + m));
+}
+
+void AGOSEngine_PN::ptext(uint32 tptr) {
+	if (tptr > _textBaseSize)
+		error("ptext: attempt to print beyond end of TBASE");
+
+	while (_textBase[tptr]) {
+		if (_textBase[tptr] < 244) {
+			patok(_textBase[tptr++]);
+		} else {
+			patok((_textBase[tptr] - 244) * 254 + _textBase[tptr + 1] - 1);
+			tptr += 2;
+		}
+	}
+}
+
+const uint8 characters[11][80] = {
+// PETERMASON
+	{
+		118, 225,
+		 91, 118,
+		 94, 124,
+		236, 161,
+		241, 166,
+		168,   4,
+		138,  46,
+		139,  46,
+		249,  50,
+		 38,  56,
+		 80,  59,
+		149,  69,
+		 37,  77,
+		 93,  93,
+		 86,  95,
+		  0,
+		  0,
+		 58, 130,
+		 62, 178,
+		 83,  95,
+		  0,
+		121,  58,
+		122,  59,
+		126,  60,
+		124,  61,
+		240,  62,
+		123,  63,
+		0
+	},
+// JBLANDFORD
+	{
+		0,
+		0,
+		0,
+		0
+	},
+// SBLANDFORD
+	{
+		120, 223,
+		 94, 126,
+		112, 134,
+		 45, 152,
+		241, 166,
+		168,   3,
+		150,  26,
+		220,  29,
+		138,  42,
+		139,  47,
+		249,  50,
+		 38,  56,
+		230,  64,
+		 37,  77,
+		 93,  94,
+		 86,  96,
+		  0,
+		  0,
+		 58, 129,
+		 59, 112,
+		 83,  96,
+		 81, 106,
+		 62, 169,
+		  0,
+		121,  54,
+		122,  55,
+		119,  56,
+		118,  57,
+		  0
+	},
+// MRJONES
+	{
+		121, 218,
+		 91, 118,
+		253, 121,
+		154, 138,
+		235, 173,
+		236, 161,
+		241, 165,
+		168,   0,
+		150,  21,
+		 36,  33,
+		138,  42,
+		249,  50,
+		 80,  60,
+		  4,  60,
+		 37,  78,
+		 68,  33,
+		 93,  92,
+		101, 109,
+		  0,
+		 36,  35,
+		 68,  90,
+		  0,
+		 58, 128,
+		 59, 111,
+		 62, 182,
+		  0,
+		122,  13,
+		126,  14,
+		124,  15,
+		240,  16,
+		120,  17,
+		119,  18,
+		118,  19,
+		 52,  20,
+		125,  21,
+		127,  22,
+		123,  23,
+		117,  24,
+		  0
+	},
+// MRSJONES
+	{
+		122, 219,
+		 91, 119,
+		253, 123,
+		112, 136,
+		154, 137,
+		 95, 142,
+		 45, 152,
+		109, 155,
+		235, 160,
+		168,   1,
+		151,  13,
+		145,  15,
+		150,  22,
+		220,  28,
+		 36,  33,
+		138,  43,
+		 13,  51,
+		 80,  59,
+		230,  64,
+		149,  69,
+		 86, 100,
+		  0,
+		 36,  36,
+		  0,
+		 58, 127,
+		 62, 179,
+		 83, 100,
+		 81, 102,
+		  0,
+		121,  25,
+		126,  26,
+		124,  27,
+		120,  28,
+		119,  29,
+		118,  30,
+		 52,  31,
+		125,  32,
+		127,  33,
+		123,  34,
+		117,  35,
+		0
+	},
+// MRROBERTS
+	{
+		123, 229,
+		 91, 117,
+		253, 120,
+		 94, 125,
+		112, 134,
+		109, 156,
+		235, 172,
+		236, 162,
+		241, 165,
+		168,   3,
+		 36,  33,
+		249,  50,
+		 38,  56,
+		 80,  58,
+		 37,  75,
+		 34,  81,
+		 68,  33,
+		101, 109,
+		  0,
+		 36,  40,
+		 68,  88,
+		  0,
+		 59, 111,
+		 62, 181,
+		  0,
+		  0
+	},
+// POSTMISTRESS
+	{
+		124, 221,
+		 91, 119,
+		253, 122,
+		112, 136,
+		 95, 142,
+		130, 149,
+		109, 155,
+		235, 176,
+		220,  29,
+		 36,  33,
+		138,  43,
+		 13,  51,
+		 80,  57,
+		149,  68,
+		 37,  73,
+		 34,  33,
+		 68,  33,
+		 86, 100,
+		  0,
+		 36,  39,
+		 34,  80,
+		 68,  86,
+		  0,
+		 58, 130,
+		 62, 181,
+		 83, 100,
+		 81, 103,
+		  0,
+		121,  41,
+		122,  42,
+		126,  43,
+		240,  44,
+		120,  45,
+		119,  46,
+		118,  47,
+		 52,  48,
+		123,  49,
+		 83,  50,
+		117,  51,
+		  0
+	},
+// MWILLIAMS
+	{
+		125, 227,
+		 94, 124,
+		 95, 141,
+		241, 166,
+		168,   4,
+		150,  26,
+		 38,  54,
+		  4,  60,
+		230,  65,
+		149,  68,
+		 37,  76,
+		101, 109,
+		  0,
+		230,  63,
+		  0,
+		 59, 112,
+		 62, 183,
+		  0,
+		240,  71,
+		120,  72,
+		118,  73,
+		 52,  74,
+		117,  75,
+		  0
+	},
+// TONY
+	{
+		126, 220,
+		 95, 143,
+		130, 149,
+		 45, 153,
+		109, 154,
+		235, 158,
+		241, 166,
+		168,   2,
+		145,  15,
+		150,  24,
+		220,  20,
+		 36,  20,
+		  4,  60,
+		 37,  79,
+		 86,  97,
+		  0,
+		150,  23,
+		220,  27,
+		 36,  34,
+		  0,
+		 83,  97,
+		  0,
+		121,  36,
+		122,  37,
+		124,  38,
+		240,  39,
+		 52,  40,
+		  0
+	},
+// PIG
+	{
+		127, 228,
+		112, 133,
+		 45, 153,
+		235, 157,
+		236, 163,
+		241, 165,
+		 36,  33,
+		 80,  58,
+		 34,  81,
+		 68,  33,
+		 86,  98,
+		  0,
+		 36,  37,
+		 68,  90,
+		  0,
+		 62, 184,
+		 83,  98,
+		  0,
+		121,  76,
+		122,  77,
+		126,  78,
+		124,  79,
+		240,  80,
+		120,  81,
+		118,  82,
+		 52,  83,
+		125,  84,
+		123,  85,
+		 83,  86,
+		117,  87,
+		  0
+	},
+// JUDY
+	{
+			  0,
+			  0,
+			  0,
+			240, 52,
+			117, 53,
+			  0
+	}
+};
+
+void AGOSEngine_PN::getResponse(uint16 charNum, uint16 objNum, uint16 &msgNum1, uint16 &msgNum2) {
+	const uint8 *ptr;
+	uint16 num;
+
+	msgNum1 = 0;
+	msgNum2 = 0;
+
+	if (charNum == 83)
+		charNum += 45;
+
+	if (charNum < 118 || charNum > 128) {
+		return;
+	}
+
+	ptr = characters[charNum - 118];
+
+	while ((num = *ptr++) != 0) {
+		if (num == objNum) {
+			msgNum1 = *ptr++;
+			msgNum1 += 400;
+
+			while ((num = *ptr++) != 0)
+				ptr++;
+			break;
+		}
+		ptr++;
+	}
+
+	while ((num = *ptr++) != 0) {
+		if (num == objNum) {
+			msgNum2 = *ptr++;
+			msgNum2 += 400;
+
+			if (msgNum1 == 569)
+				msgNum1 += 400;
+			if (msgNum2 == 0)
+				msgNum2 = msgNum1;
+			return;
+		}
+		ptr++;
+	}
+
+	if (objNum >= 200)
+		msgNum1 = 0;
+
+	objNum -= 200;
+	while ((num = *ptr++) != 0) {
+		if (num == objNum) {
+			msgNum1 = *ptr++;
+			msgNum1 += 400;
+
+			if (msgNum1 == 569)
+				msgNum1 += 400;
+			if (msgNum2 == 0)
+				msgNum2 = msgNum1;
+			return;
+		}
+		ptr++;
+	}
+
+	objNum += 200;
+	while ((num = *ptr++) != 0) {
+		if (num == objNum) {
+			msgNum1 = *ptr++;
+			msgNum1 += 200;
+
+			if (msgNum1 == 569)
+				msgNum1 += 400;
+			if (msgNum2 == 0)
+				msgNum2 = msgNum1;
+			return;
+		}
+		ptr++;
+	}
+
+	if (msgNum1 == 569)
+		msgNum1 += 400;
+	if (msgNum2 == 0)
+		msgNum2 = msgNum1;
+}
+
+char *AGOSEngine_PN::getMessage(char *msg, uint16 num) {
+	char *origPtr, *strPtr1 = msg;
+	uint8 count;
+
+	getObjectName(strPtr1, num);
+	if (!(num & 0x8000)) {
+		return msg;
+	}
+
+	if (strPtr1[0] == 0x41 || strPtr1[0] == 0x61) {
+		if (strPtr1[1] != 0x20)
+			strPtr1 += 2;
+	} else if (strPtr1[0] == 0x54 || strPtr1[0] == 0x74) {
+		if (strPtr1[1] == 0x68 &&
+		    strPtr1[2] == 0x65 &&
+		    strPtr1[3] == 0x20)
+			strPtr1 += 4;
+	}
+
+	origPtr = strPtr1;
+	while (*strPtr1 != 13)
+		strPtr1++;
+
+	strPtr1[0] = 32;
+	strPtr1[1] = 13;
+	strPtr1[2] = 0;
+
+	if (_videoLockOut & 0x10) {
+		strPtr1 = origPtr;
+		count = 6;
+		while (*strPtr1) {
+			if (*strPtr1 == 32) {
+				count = 6;
+			} else {
+				count--;
+				if (count == 0) {
+					char *tmpPtr = strPtr1;
+					char *strPtr2 = strPtr1;
+
+					while (*strPtr2 != 0 && *strPtr2 != 32)
+						strPtr2++;
+
+					while (*strPtr2) {
+						*strPtr1++ = *strPtr2++;
+					}
+					*strPtr1++ = *strPtr2++;
+
+					strPtr1 = tmpPtr;
+					count = 6;
+				}
+			}
+			strPtr1++;
+		}
+	}
+
+	return origPtr;
+}
+
+} // End of namespace AGOS

Modified: scummvm/branches/gsoc2009-mods/engines/agos/verb.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/verb.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/verb.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -1037,257 +1037,4 @@
 	_videoLockOut &= ~0x8000;
 }
 
-#ifdef ENABLE_PN
-// Personal Nightmare specific
-void AGOSEngine_PN::boxController(uint x, uint y, uint mode) {
-	HitArea *best_ha;
-	HitArea *ha = _hitAreaList;
-
-	best_ha = NULL;
-
-	do {
-		if (!(ha->flags & kOBFBoxDisabled)) {
-			if (x >= ha->x && y >= ha->y && x - ha->x < ha->width && y - ha->y < ha->height &&
-				best_ha == NULL) {
-				best_ha = ha;
-			} else {
-				if (ha->flags & kOBFBoxSelected) {
-					hitarea_leave(ha , true);
-					ha->flags &= ~kOBFBoxSelected;
-				}
-			}
-		} else {
-			ha->flags &= ~kOBFBoxSelected;
-		}
-	} while (ha++, ha->id != 0xFFFF);
-
-	if (mode != 0) {
-		_lastHitArea = best_ha;
-	}
-
-	if (best_ha == NULL) {
-		return;
-	}
-
-	if (best_ha->flags & kOBFInvertTouch && !(best_ha->flags & kOBFBoxSelected)) {
-		hitarea_leave(best_ha, false);
-		best_ha->flags |= kOBFBoxSelected;
-	}
-}
-
-void AGOSEngine_PN::mouseHit() {
-	if (_hitCalled == 5) {
-		execMouseHit(NULL);
-	} else {
-		boxController(_mouse.x, _mouse.y, 1);
-		if (_hitCalled == 4 || _lastHitArea != 0) {
-			execMouseHit(_lastHitArea);
-		}
-	}
-	_hitCalled = 0;
-	_oneClick = 0;
-}
-
-void AGOSEngine_PN::execMouseHit(HitArea *ha) {
-	if (_hitCalled == 1) {
-		if (ha->flags & kOBFUseMessageList)
-			hitBox11(ha);
-		else if (ha->flags & kOBFMoreBox)
-			hitBox9(ha);
-		else if (ha->flags & kOBFExit)
-			hitBox7(ha);
-		else if (ha->flags & kOBFUseEmptyLine)
-			hitBox2(ha);
-		else
-			hitBox1(ha);
-	} else if (_hitCalled == 2) {
-		if (ha->flags & (kOBFObject | kOBFInventoryBox | kOBFRoomBox))
-			hitBox3(ha);
-		else if (ha->flags & kOBFUseMessageList)
-			hitBox11(ha);
-		else if (ha->flags & kOBFMoreBox)
-			hitBox9(ha);
-		else if (ha->flags & kOBFExit)
-			hitBox7(ha);
-		else if (ha->flags & kOBFUseEmptyLine)
-			hitBox2(ha);
-		else
-			hitBox1(ha);
-	} else if (_hitCalled == 3) {
-		if ((ha->flags & kOBFDraggable) && !_dragFlag) {
-			_dragFlag = true;
-			_dragStore = ha;
-			_needHitAreaRecalc++;
-		}
-	} else if (_hitCalled == 4) {
-		_dragFlag = false;
-		_hitCalled = 0;
-		_oneClick = 0;
-		_dragCount = 0;
-		_needHitAreaRecalc++;
-		if (ha != 0) {
-			if (ha->flags & kOBFInventoryBox)
-				hitBox5(ha);
-			else if (ha->flags & kOBFRoomBox)
-				hitBox6(ha);
-			else if (_videoLockOut & 10)
-				hitBox8(ha);
-		}
-	} else {
-		_hitCalled = 0;
-		if (_mouseString == 0) {
-			_mouseString = (const char *)"\r";
-		}
-	}
-}
-
-void AGOSEngine_PN::hitBox1(HitArea *ha) {
-	if (_mouseString)
-		return;
-
-	_mouseString = getMessage(_objectName1, ha->msg1);
-	if (_intputCounter) {
-		char *msgPtr = getMessage(_objectName1, ha->msg1);
-		while (*msgPtr != 13)
-			msgPtr++;
-		*msgPtr = 0;
-	} else if (!(ha->flags & kOBFNoShowName)) {
-		_mousePrintFG++;
-		_mouseString1 = _mouseString;
-		_mouseString = (const char*)"showname \0";
-
-	}
-}
-
-void AGOSEngine_PN::hitBox2(HitArea *ha) {
-	if (!_intputCounter)
-		hitBox1(ha);
-}
-
-void AGOSEngine_PN::hitBox3(HitArea *ha) {
-	if (!_intputCounter)
-		hitBox4(ha);
-}
-
-void AGOSEngine_PN::hitBox4(HitArea *ha) {
-	if (_mouseString)
-		return;
-
-	uint16 num = ha->msg1 & ~0x8000;
-	if ((_videoLockOut & 0x10) && !(ha->flags & (kOBFInventoryBox | kOBFRoomBox)) &&
-		!testContainer(num)) {
-		return;
-	}
-
-	_mouseString = getMessage(_objectName2, ha->msg2);
-	_mouseString1 = getMessage(_objectName1, ha->msg1);
-	_mousePrintFG++;
-}
-
-void AGOSEngine_PN::hitBox5(HitArea *ha) {
-	if (_intputCounter || _mouseString)
-		return;
-
-	if (_dragStore && (_dragStore->flags & kOBFInventoryBox))
-		return;
-
-	_mousePrintFG++;
-	_mouseString = (const char *)"take \0";
-	_mouseString1 = getMessage(_objectName1, _dragStore->msg1);
-
-	if (_dragStore->flags & kOBFRoomBox)
-		_mouseString1 = (const char *)"all\r";
-}
-
-void AGOSEngine_PN::hitBox6(HitArea *ha) {
-	if (_intputCounter || _mouseString)
-		return;
-
-	if (_dragStore->flags & kOBFRoomBox)
-		return;
-
-	_mousePrintFG++;
-	_mouseString = (const char *)"drop \0";
-	_mouseString1 = getMessage(_objectName1, _dragStore->msg1);
-
-	if (_dragStore->flags & kOBFInventoryBox)
-		_mouseString1 = (const char *)"all\r";
-}
-
-void AGOSEngine_PN::hitBox7(HitArea *ha) {
-	if (_intputCounter) {
-		if (!(ha->flags & kOBFUseEmptyLine)) {
-			hitBox1(ha);
-		}
-		return;
-	}
-
-	if (_mouseString)
-		return;
-
-	_mousePrintFG++;
-	_mouseString1 = getMessage(_objectName1, ha->msg1);
-
-	uint16 num = ha->msg1 & ~0x8000;
-	uint16 state = getptr(_quickptr[0] + num * _quickshort[0] + 2);
-	if (state == 3) {
-		_mouseString = (const char *)"unlock \0";
-	} else if (state == 2) {
-		_mouseString = (const char *)"open \0";
-	} else {
-		_mouseString = (const char *)"go through \0";
-	}
-}
-
-void AGOSEngine_PN::hitBox8(HitArea *ha) {
-	char *msgPtr, *tmpPtr;
-
-	if (_intputCounter || _mouseString)
-		return;
-
-	if (_dragStore == ha)
-		return;
-
-	uint16 num = ha->msg1 & ~0x8000;
-	if (!testSeen(num))
-		return;
-
-	msgPtr = getMessage(_objectName1, ha->msg1);
-	sprintf(_inMessage, " in %s", msgPtr);
-	_mouseString1 = _inMessage;
-
-	msgPtr = getMessage(_objectName1, _dragStore->msg1);
-	*(tmpPtr = strchr(msgPtr, 13)) = 0;
-	sprintf(_placeMessage, "put %s", msgPtr);
-	_mouseString = _placeMessage;
-}
-
-void AGOSEngine_PN::hitBox9(HitArea *ha) {
-	if (_objectCountS == _objects) {
-		_objectCountS = -1;
-	}
-	iconPage();
-}
-
-static const char *messageList[9] = {
-	"North\r",
-	"East\r",
-	"South\r",
-	"West\r",
-	"Up\r",
-	"Down\r",
-	"Push grey button\r",
-	"Push red button\r",
-	"Go under car\r"
-};
-
-void AGOSEngine_PN::hitBox11(HitArea *ha) {
-	if (_intputCounter || _mouseString)
-		return;
-
-	_mouseString = messageList[ha->msg1];
-	_mousePrintFG++;
-}
-#endif
-
 } // End of namespace AGOS

Copied: scummvm/branches/gsoc2009-mods/engines/agos/verb_pn.cpp (from rev 43329, scummvm/trunk/engines/agos/verb_pn.cpp)
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/verb_pn.cpp	                        (rev 0)
+++ scummvm/branches/gsoc2009-mods/engines/agos/verb_pn.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -0,0 +1,284 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+// Verb and hitarea handling
+
+
+#include "agos/agos.h"
+#include "agos/intern.h"
+
+namespace AGOS {
+
+void AGOSEngine_PN::boxController(uint x, uint y, uint mode) {
+	HitArea *best_ha;
+	HitArea *ha = _hitAreaList;
+
+	best_ha = NULL;
+
+	do {
+		if (!(ha->flags & kOBFBoxDisabled)) {
+			if (x >= ha->x && y >= ha->y && x - ha->x < ha->width && y - ha->y < ha->height &&
+				best_ha == NULL) {
+				best_ha = ha;
+			} else {
+				if (ha->flags & kOBFBoxSelected) {
+					hitarea_leave(ha , true);
+					ha->flags &= ~kOBFBoxSelected;
+				}
+			}
+		} else {
+			ha->flags &= ~kOBFBoxSelected;
+		}
+	} while (ha++, ha->id != 0xFFFF);
+
+	if (mode != 0) {
+		_lastHitArea = best_ha;
+	}
+
+	if (best_ha == NULL) {
+		return;
+	}
+
+	if (best_ha->flags & kOBFInvertTouch && !(best_ha->flags & kOBFBoxSelected)) {
+		hitarea_leave(best_ha, false);
+		best_ha->flags |= kOBFBoxSelected;
+	}
+}
+
+void AGOSEngine_PN::mouseHit() {
+	if (_hitCalled == 5) {
+		execMouseHit(NULL);
+	} else {
+		boxController(_mouse.x, _mouse.y, 1);
+		if (_hitCalled == 4 || _lastHitArea != 0) {
+			execMouseHit(_lastHitArea);
+		}
+	}
+	_hitCalled = 0;
+	_oneClick = 0;
+}
+
+void AGOSEngine_PN::execMouseHit(HitArea *ha) {
+	if (_hitCalled == 1) {
+		if (ha->flags & kOBFUseMessageList)
+			hitBox11(ha);
+		else if (ha->flags & kOBFMoreBox)
+			hitBox9(ha);
+		else if (ha->flags & kOBFExit)
+			hitBox7(ha);
+		else if (ha->flags & kOBFUseEmptyLine)
+			hitBox2(ha);
+		else
+			hitBox1(ha);
+	} else if (_hitCalled == 2) {
+		if (ha->flags & (kOBFObject | kOBFInventoryBox | kOBFRoomBox))
+			hitBox3(ha);
+		else if (ha->flags & kOBFUseMessageList)
+			hitBox11(ha);
+		else if (ha->flags & kOBFMoreBox)
+			hitBox9(ha);
+		else if (ha->flags & kOBFExit)
+			hitBox7(ha);
+		else if (ha->flags & kOBFUseEmptyLine)
+			hitBox2(ha);
+		else
+			hitBox1(ha);
+	} else if (_hitCalled == 3) {
+		if ((ha->flags & kOBFDraggable) && !_dragFlag) {
+			_dragFlag = true;
+			_dragStore = ha;
+			_needHitAreaRecalc++;
+		}
+	} else if (_hitCalled == 4) {
+		_dragFlag = false;
+		_hitCalled = 0;
+		_oneClick = 0;
+		_dragCount = 0;
+		_needHitAreaRecalc++;
+		if (ha != 0) {
+			if (ha->flags & kOBFInventoryBox)
+				hitBox5(ha);
+			else if (ha->flags & kOBFRoomBox)
+				hitBox6(ha);
+			else if (_videoLockOut & 10)
+				hitBox8(ha);
+		}
+	} else {
+		_hitCalled = 0;
+		if (_mouseString == 0) {
+			_mouseString = (const char *)"\r";
+		}
+	}
+}
+
+void AGOSEngine_PN::hitBox1(HitArea *ha) {
+	if (_mouseString)
+		return;
+
+	_mouseString = getMessage(_objectName1, ha->msg1);
+	if (_intputCounter) {
+		char *msgPtr = getMessage(_objectName1, ha->msg1);
+		while (*msgPtr != 13)
+			msgPtr++;
+		*msgPtr = 0;
+	} else if (!(ha->flags & kOBFNoShowName)) {
+		_mousePrintFG++;
+		_mouseString1 = _mouseString;
+		_mouseString = (const char*)"showname \0";
+
+	}
+}
+
+void AGOSEngine_PN::hitBox2(HitArea *ha) {
+	if (!_intputCounter)
+		hitBox1(ha);
+}
+
+void AGOSEngine_PN::hitBox3(HitArea *ha) {
+	if (!_intputCounter)
+		hitBox4(ha);
+}
+
+void AGOSEngine_PN::hitBox4(HitArea *ha) {
+	if (_mouseString)
+		return;
+
+	uint16 num = ha->msg1 & ~0x8000;
+	if ((_videoLockOut & 0x10) && !(ha->flags & (kOBFInventoryBox | kOBFRoomBox)) &&
+		!testContainer(num)) {
+		return;
+	}
+
+	_mouseString = getMessage(_objectName2, ha->msg2);
+	_mouseString1 = getMessage(_objectName1, ha->msg1);
+	_mousePrintFG++;
+}
+
+void AGOSEngine_PN::hitBox5(HitArea *ha) {
+	if (_intputCounter || _mouseString)
+		return;
+
+	if (_dragStore && (_dragStore->flags & kOBFInventoryBox))
+		return;
+
+	_mousePrintFG++;
+	_mouseString = (const char *)"take \0";
+	_mouseString1 = getMessage(_objectName1, _dragStore->msg1);
+
+	if (_dragStore->flags & kOBFRoomBox)
+		_mouseString1 = (const char *)"all\r";
+}
+
+void AGOSEngine_PN::hitBox6(HitArea *ha) {
+	if (_intputCounter || _mouseString)
+		return;
+
+	if (_dragStore->flags & kOBFRoomBox)
+		return;
+
+	_mousePrintFG++;
+	_mouseString = (const char *)"drop \0";
+	_mouseString1 = getMessage(_objectName1, _dragStore->msg1);
+
+	if (_dragStore->flags & kOBFInventoryBox)
+		_mouseString1 = (const char *)"all\r";
+}
+
+void AGOSEngine_PN::hitBox7(HitArea *ha) {
+	if (_intputCounter) {
+		if (!(ha->flags & kOBFUseEmptyLine)) {
+			hitBox1(ha);
+		}
+		return;
+	}
+
+	if (_mouseString)
+		return;
+
+	_mousePrintFG++;
+	_mouseString1 = getMessage(_objectName1, ha->msg1);
+
+	uint16 num = ha->msg1 & ~0x8000;
+	uint16 state = getptr(_quickptr[0] + num * _quickshort[0] + 2);
+	if (state == 3) {
+		_mouseString = (const char *)"unlock \0";
+	} else if (state == 2) {
+		_mouseString = (const char *)"open \0";
+	} else {
+		_mouseString = (const char *)"go through \0";
+	}
+}
+
+void AGOSEngine_PN::hitBox8(HitArea *ha) {
+	char *msgPtr, *tmpPtr;
+
+	if (_intputCounter || _mouseString)
+		return;
+
+	if (_dragStore == ha)
+		return;
+
+	uint16 num = ha->msg1 & ~0x8000;
+	if (!testSeen(num))
+		return;
+
+	msgPtr = getMessage(_objectName1, ha->msg1);
+	sprintf(_inMessage, " in %s", msgPtr);
+	_mouseString1 = _inMessage;
+
+	msgPtr = getMessage(_objectName1, _dragStore->msg1);
+	*(tmpPtr = strchr(msgPtr, 13)) = 0;
+	sprintf(_placeMessage, "put %s", msgPtr);
+	_mouseString = _placeMessage;
+}
+
+void AGOSEngine_PN::hitBox9(HitArea *ha) {
+	if (_objectCountS == _objects) {
+		_objectCountS = -1;
+	}
+	iconPage();
+}
+
+static const char *messageList[9] = {
+	"North\r",
+	"East\r",
+	"South\r",
+	"West\r",
+	"Up\r",
+	"Down\r",
+	"Push grey button\r",
+	"Push red button\r",
+	"Go under car\r"
+};
+
+void AGOSEngine_PN::hitBox11(HitArea *ha) {
+	if (_intputCounter || _mouseString)
+		return;
+
+	_mouseString = messageList[ha->msg1];
+	_mousePrintFG++;
+}
+
+} // End of namespace AGOS

Modified: scummvm/branches/gsoc2009-mods/engines/agos/vga_ff.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/vga_ff.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/vga_ff.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -25,6 +25,8 @@
 
 
 
+#ifdef ENABLE_AGOS2
+
 #include "agos/agos.h"
 #include "agos/intern.h"
 
@@ -486,3 +488,5 @@
 }
 
 } // End of namespace AGOS
+
+#endif // ENABLE_AGOS2

Modified: scummvm/branches/gsoc2009-mods/engines/agos/vga_pn.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/agos/vga_pn.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/agos/vga_pn.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -23,8 +23,6 @@
  *
  */
 
-#ifdef ENABLE_PN
-
 #include "agos/agos.h"
 #include "agos/intern.h"
 #include "agos/vga.h"
@@ -57,8 +55,6 @@
 	op[20] = &AGOSEngine::vc19_loop;
 	op[21] = &AGOSEngine::vc20_setRepeat;
 	op[22] = &AGOSEngine::vc21_endRepeat;
-	// FIXME: This has been "vc22_setPaletteOld" before, but that does not seem to exist.
-	// Please check whether "vc22_setPalette" is fine to be used here.
 	op[23] = &AGOSEngine::vc22_setPalette;
 	op[24] = &AGOSEngine::vc23_setPriority;
 	op[25] = &AGOSEngine::vc24_setSpriteXY;
@@ -221,5 +217,3 @@
 }
 
 } // End of namespace AGOS
-
-#endif

Modified: scummvm/branches/gsoc2009-mods/engines/engines.mk
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/engines.mk	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/engines.mk	2009-08-12 22:39:48 UTC (rev 43330)
@@ -21,10 +21,6 @@
 DEFINES += -DENABLE_AGOS=$(ENABLE_AGOS)
 MODULES += engines/agos
 
-ifdef ENABLE_PN
-DEFINES += -DENABLE_PN
-endif
-
 ifdef ENABLE_AGOS2
 DEFINES += -DENABLE_AGOS2
 endif

Modified: scummvm/branches/gsoc2009-mods/engines/kyra/kyra_lok.h
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/kyra/kyra_lok.h	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/kyra/kyra_lok.h	2009-08-12 22:39:48 UTC (rev 43330)
@@ -192,6 +192,7 @@
 
 	// -> credits
 	void seq_playCredits();
+	void seq_playCreditsAmiga();
 
 public:
 	// delay

Modified: scummvm/branches/gsoc2009-mods/engines/kyra/screen.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/kyra/screen.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/kyra/screen.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -1190,6 +1190,8 @@
 	const int charWidth = fnt->getCharWidth(c);
 	const int charHeight = fnt->getHeight();
 
+	if (x < 0 || y < 0)
+		return;
 	if (x + charWidth > SCREEN_W || y + charHeight > SCREEN_H)
 		return;
 

Modified: scummvm/branches/gsoc2009-mods/engines/kyra/sequences_lok.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/kyra/sequences_lok.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/kyra/sequences_lok.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -36,6 +36,7 @@
 
 #include "common/system.h"
 #include "common/savefile.h"
+#include "common/list.h"
 
 namespace Kyra {
 
@@ -1133,30 +1134,37 @@
 	_seqPlayerFlag = false;
 
 	_screen->showMouse();
-	seq_playCredits();
+	if (_flags.platform == Common::kPlatformAmiga) {
+		while (!shouldQuit())
+			seq_playCreditsAmiga();
+	} else {
+		seq_playCredits();
+	}
 }
 
+namespace {
+struct CreditsLine {
+	int16 x, y;
+	Screen::FontId font;
+	uint8 *str;
+};
+} // end of anonymous namespace
+
 void KyraEngine_LoK::seq_playCredits() {
 	static const uint8 colorMap[] = { 0, 0, 0xC, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
 	static const char stringTerms[] = { 0x5, 0xd, 0x0};
-	static const int numStrings = 250;
 
-	struct {
-		int16 x, y;
-		uint8 code;
-		uint8 unk1;
-		Screen::FontId font;
-		uint8 *str;
-	} strings[numStrings];
+	typedef Common::List<CreditsLine> CreditsLineList;
+	CreditsLineList lines;
 
-	memset(strings, 0, sizeof(strings));
-
 	_screen->enableInterfacePalette(false);
 
 	_screen->hideMouse();
 	if (!_flags.isTalkie && _flags.platform != Common::kPlatformAmiga) {
 		_screen->loadFont(Screen::FID_CRED6_FNT, "CREDIT6.FNT");
 		_screen->loadFont(Screen::FID_CRED8_FNT, "CREDIT8.FNT");
+
+		_screen->setFont(Screen::FID_CRED8_FNT);
 	} else
 		_screen->setFont(Screen::FID_8_FNT);
 
@@ -1174,8 +1182,7 @@
 	uint8 *buffer = 0;
 	uint32 size = 0;
 
-	if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98
-			|| _flags.platform == Common::kPlatformAmiga) {
+	if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) {
 		int sizeTmp = 0;
 		const uint8 *bufferTmp = _staticres->loadRawData(k1CreditsStrings, sizeTmp);
 		buffer = new uint8[sizeTmp];
@@ -1192,97 +1199,96 @@
 	uint8 *currentString = buffer;
 	int currentY = 200;
 
-	for (int i = 0; i < numStrings; i++) {
-		if (*nextString == 0)
-			break;
-
+	do {
 		currentString = nextString;
 		nextString = (uint8 *)strpbrk((const char *)currentString, stringTerms);
 		if (!nextString)
 			nextString = (uint8 *)strchr((const char *)currentString, 0);
 
-		strings[i].code = nextString[0];
+		CreditsLine line;
+
+		int lineEndCode = nextString[0];
 		*nextString = 0;
-		if (strings[i].code != 0)
+		if (lineEndCode != 0)
 			nextString++;
 
+		int alignment = 0;
 		if (*currentString == 3 || *currentString == 4) {
-			strings[i].unk1 = *currentString;
+			alignment = *currentString;
 			currentString++;
 		}
 
 		if (*currentString == 1) {
 			currentString++;
+
 			if (!_flags.isTalkie && _flags.platform != Common::kPlatformAmiga)
 				_screen->setFont(Screen::FID_CRED6_FNT);
-		} else {
-			if (*currentString == 2)
-				currentString++;
+		} else if (*currentString == 2) {
+			currentString++;
+
 			if (!_flags.isTalkie && _flags.platform != Common::kPlatformAmiga)
 				_screen->setFont(Screen::FID_CRED8_FNT);
 		}
-		strings[i].font = _screen->_currentFont;
 
-		if (strings[i].unk1 == 3)
-			strings[i].x = 157 - _screen->getTextWidth((const char *)currentString);
-		else if (strings[i].unk1 == 4)
-			strings[i].x = 161;
+		line.font = _screen->_currentFont;
+
+		if (alignment == 3)
+			line.x = 157 - _screen->getTextWidth((const char *)currentString);
+		else if (alignment == 4)
+			line.x = 161;
 		else
-			strings[i].x = (320  - _screen->getTextWidth((const char *)currentString)) / 2 + 1;
+			line.x = (320  - _screen->getTextWidth((const char *)currentString)) / 2 + 1;
 
-		strings[i].y = currentY;
-		if (strings[i].code != 5)
+		line.y = currentY;
+		if (lineEndCode != 5)
 			currentY += 10;
 
-		strings[i].str = currentString;
-	}
+		line.str = currentString;
 
+		lines.push_back(line);
+	} while (*nextString);
+
 	_screen->setCurPage(2);
 
 	_screen->getPalette(2).clear();
 	_screen->setScreenPalette(_screen->getPalette(2));
-	if (_flags.platform == Common::kPlatformAmiga)
-		_screen->setPaletteIndex(16, 63, 63, 63);
 
-	_screen->copyRegion(8, 32, 8, 32, 312, 128, 4, 0, Screen::CR_NO_P_CHECK);
+	_screen->copyRegion(0, 32, 0, 32, 320, 128, 4, 0, Screen::CR_NO_P_CHECK);
 	_screen->fadePalette(_screen->getPalette(0), 0x5A);
 
-	Common::Event event;
 	bool finished = false;
 	int bottom = 201;
-	while (!finished) {
+	while (!finished && !shouldQuit()) {
 		uint32 startLoop = _system->getMillis();
+
 		if (bottom > 175) {
-			_screen->copyRegion(8, 32, 8, 32, 312, 128, 4, 2, Screen::CR_NO_P_CHECK);
+			_screen->copyRegion(0, 32, 0, 32, 320, 128, 4, 2, Screen::CR_NO_P_CHECK);
 			bottom = 0;
 
-			for (int i = 0; i < numStrings; i++) {
-				if (strings[i].y < 200 && strings[i].y > 0) {
-					if (strings[i].font != _screen->_currentFont)
-						_screen->setFont(strings[i].font);
-					_screen->printText((const char *)strings[i].str, strings[i].x, strings[i].y, 15, 0);
+			for (CreditsLineList::iterator it = lines.begin(); it != lines.end(); ++it) {
+				if (it->y < 0) {
+					it = lines.erase(it);
+					continue;
 				}
-				strings[i].y--;
-				if (strings[i].y > bottom)
-					bottom = strings[i].y;
+
+				if (it->y < 200) {
+					if (it->font != _screen->_currentFont)
+						_screen->setFont(it->font);
+
+					_screen->printText((const char *)it->str, it->x, it->y, 15, 0);
+				}
+
+				it->y--;
+				if (it->y > bottom)
+					bottom = it->y;
 			}
-			_screen->copyRegion(8, 32, 8, 32, 312, 128, 2, 0, Screen::CR_NO_P_CHECK);
+
+			_screen->copyRegion(0, 32, 0, 32, 320, 128, 2, 0, Screen::CR_NO_P_CHECK);
 			_screen->updateScreen();
 		}
 
-		while (_eventMan->pollEvent(event)) {
-			switch (event.type) {
-			case Common::EVENT_KEYDOWN:
-				finished = true;
-				break;
-			case Common::EVENT_RTL:
-			case Common::EVENT_QUIT:
-				finished = true;
-				break;
-			default:
-				break;
-			}
-		}
+		if (checkInput(0, false))
+			finished = true;
 
 		uint32 now = _system->getMillis();
 		uint32 nextLoop = startLoop + _tickLength * 5;
@@ -1298,6 +1304,123 @@
 	_screen->showMouse();
 }
 
+void KyraEngine_LoK::seq_playCreditsAmiga() {
+	_screen->setFont(Screen::FID_8_FNT);
+
+	_screen->loadBitmap("CHALET.CPS", 4, 2, &_screen->getPalette(0));
+	_screen->copyPage(2, 0);
+	_screen->setCurPage(2);
+
+	_screen->getPalette(2).clear();
+	_screen->setScreenPalette(_screen->getPalette(2));
+
+	_screen->getPalette(0).fill(16, 1, 63);
+	_screen->fadePalette(_screen->getPalette(0), 0x5A);
+
+	const char *theEnd = "THE END";
+
+	const int width = _screen->getTextWidth(theEnd);
+	int x = (320 - width) / 2 + 1;
+
+	_screen->copyRegion(x, 8, x, 8, width, 56, 0, 2, Screen::CR_NO_P_CHECK);
+	_screen->copyRegion(x, 8, 0, 8, width, 11, 0, 2, Screen::CR_NO_P_CHECK);
+	_screen->printText(theEnd, 0, 10, 31, 0);
+
+	for (int y = 18, h = 1; y >= 10 && !shouldQuit(); --y, ++h) {
+		uint32 endTime = _system->getMillis() + 3 * _tickLength;
+
+		_screen->copyRegion(0, y, x, 8, width, h, 2, 0, Screen::CR_NO_P_CHECK);
+		_screen->updateScreen();
+
+		delayUntil(endTime);
+	}
+
+	for (int y = 8; y <= 62 && !shouldQuit(); ++y) {
+		uint32 endTime = _system->getMillis() + 3 * _tickLength;
+
+		_screen->copyRegion(x, y, 0, 8, width, 11, 2, 2, Screen::CR_NO_P_CHECK);
+		_screen->printText(theEnd, 0, 9, 31, 0);
+		_screen->copyRegion(0, 8, x, y, width, 11, 2, 0, Screen::CR_NO_P_CHECK);
+		_screen->updateScreen();
+
+		delayUntil(endTime);
+	}
+
+	int size = 0;
+	const uint8 *bufferTmp = _staticres->loadRawData(k1CreditsStrings, size);
+	char *buffer = new char[size];
+	assert(buffer);
+	memcpy(buffer, bufferTmp, size);
+	_staticres->unloadId(k1CreditsStrings);
+
+	char stringBuffer[81];
+	memset(stringBuffer, 0, sizeof(stringBuffer));
+
+	char *cur = buffer;
+	char *specialString = stringBuffer;
+	bool fillRectFlag = false, subWidth = false, centerFlag = false;
+	x = 0;
+	int specialX = 0;
+
+	const int fontHeight = _screen->getFontHeight();
+
+	do {
+		char code = *cur;
+
+		if (code == 3) {
+			fillRectFlag = subWidth = true;
+		} else if (code == 5) {
+			centerFlag = true;
+		} else if (code == 4) {
+			if (fillRectFlag) {
+				_screen->fillRect(0, 0, 319, 20, 0);
+
+				if (subWidth)
+					specialX = 157 - _screen->getTextWidth(stringBuffer);
+
+				_screen->printText(stringBuffer, specialX + 8, 0, 31, 0);
+			}
+
+			specialString = stringBuffer;
+			*specialString = 0;
+
+			x = 161;
+		} else if (code == 13) {
+			if (!fillRectFlag)
+				_screen->fillRect(0, 0, 319, 20, 0);
+
+			uint32 nextTime = _system->getMillis() + 8 * _tickLength;
+
+			if (centerFlag)
+				x = (320 - _screen->getTextWidth(stringBuffer)) / 2 - 8;
+
+			_screen->printText(stringBuffer, x + 8, 0, 31, 0);
+
+			for (int i = 0; i < fontHeight; ++i) {
+				_screen->copyRegion(0, 141, 0, 140, 320, 59, 0, 0, Screen::CR_NO_P_CHECK);
+				_screen->copyRegion(0, i, 0, 198, 320, 3, 2, 0, Screen::CR_NO_P_CHECK);
+				_screen->updateScreen();
+
+				delayUntil(nextTime);
+				nextTime = _system->getMillis() + 8 * _tickLength;
+			}
+
+			specialString = stringBuffer;
+			*specialString = 0;
+
+			centerFlag = fillRectFlag = false;
+		} else {
+			*specialString++ = code;
+			*specialString = 0;
+		}
+
+		if (checkInput(0, false))
+			break;
+	} while (++cur != buffer + size && !shouldQuit());
+
+	delete[] buffer;
+}
+
 bool KyraEngine_LoK::seq_skipSequence() const {
 	return shouldQuit() || _abortIntroFlag;
 }

Modified: scummvm/branches/gsoc2009-mods/engines/kyra/sound_amiga.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/kyra/sound_amiga.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/kyra/sound_amiga.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -213,7 +213,7 @@
 			playTrack(track - 0x4F);
 
 		assert(track < 120);
-		// variable(0x1BFE2) && tableEffectsGame[track].note, which gets set for ingame and unset for finale
+		// variable(0x1BFE4) && tableEffectsGame[track].note, which gets set for ingame and unset for finale
 		// (and some function reverses its state)
 		if (sfxTableGetNote(&_tableSfxGame[track * 8])) { 
 			tableEntry = &_tableSfxGame[track * 8];

Modified: scummvm/branches/gsoc2009-mods/engines/kyra/text.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/kyra/text.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/kyra/text.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -226,19 +226,25 @@
 }
 
 void TextDisplayer::printCharacterText(const char *text, int8 charNum, int charX) {
-	uint8 colorTable[] = {0x0F, 0x09, 0xC9, 0x80, 0x5, 0x81, 0x0E, 0xD8, 0x55, 0x3A, 0x3a};
 	int top, left, x1, x2, w, x;
 	char *msg;
 
-	uint8 color = colorTable[charNum];
 	text = preprocessString(text);
 	int lineCount = buildMessageSubstrings(text);
 	w = getWidestLineWidth(lineCount);
 	x = charX;
 	calcWidestLineBounds(x1, x2, w, x);
 
-	if (_vm->gameFlags().platform == Common::kPlatformAmiga)
+	uint8 color = 0;
+	if (_vm->gameFlags().platform == Common::kPlatformAmiga) {
+		const uint8 colorTable[] = { 0x1F, 0x1B, 0xC9, 0x80, 0x1E, 0x81, 0x11, 0xD8, 0x55, 0x3A, 0x3A };
+		color = colorTable[charNum];
+
 		setTextColor(color);
+	} else {
+		const uint8 colorTable[] = { 0x0F, 0x09, 0xC9, 0x80, 0x05, 0x81, 0x0E, 0xD8, 0x55, 0x3A, 0x3A };
+		color = colorTable[charNum];
+	}
 
 	for (int i = 0; i < lineCount; ++i) {
 		top = i * 10 + _talkMessageY;

Modified: scummvm/branches/gsoc2009-mods/engines/saga/displayinfo.h
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/saga/displayinfo.h	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/saga/displayinfo.h	2009-08-12 22:39:48 UTC (rev 43330)
@@ -281,6 +281,8 @@
 };
 
 
+#if defined(ENABLE_IHNM) || defined(ENABLE_SAGA2)
+
 // IHNM
 #define IHNM_CONVERSE_MAX_TEXT_WIDTH (485 - 8)
 #define IHNM_CONVERSE_TEXT_HEIGHT       10
@@ -361,7 +363,10 @@
 	{kPanelButtonSaveText, -1,30, 0,0, kTextEnterSaveGameName,'-',0, 0,0,0},
 };
 
+#endif
+
 #ifdef ENABLE_IHNM
+
 static const GameDisplayInfo IHNM_DisplayInfo = {
 	640, 480,	// logical width&height
 

Modified: scummvm/branches/gsoc2009-mods/engines/scumm/he/animation_he.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/scumm/he/animation_he.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/scumm/he/animation_he.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -23,8 +23,8 @@
  *
  */
 
+#ifdef ENABLE_HE
 
-
 #include "scumm/he/animation_he.h"
 #include "scumm/he/intern_he.h"
 
@@ -103,3 +103,5 @@
 }
 
 } // End of namespace Scumm
+
+#endif // ENABLE_HE

Modified: scummvm/branches/gsoc2009-mods/engines/scumm/he/animation_he.h
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/scumm/he/animation_he.h	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/scumm/he/animation_he.h	2009-08-12 22:39:48 UTC (rev 43330)
@@ -23,7 +23,7 @@
  *
  */
 
-#ifndef SCUMM_HE_ANIMATION_H
+#if !defined(SCUMM_HE_ANIMATION_H) && defined(ENABLE_HE)
 #define SCUMM_HE_ANIMATION_H
 
 #include "common/file.h"

Modified: scummvm/branches/gsoc2009-mods/engines/scumm/he/cup_player_he.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/scumm/he/cup_player_he.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/scumm/he/cup_player_he.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -23,6 +23,7 @@
  *
  */
 
+#ifdef ENABLE_HE
 
 #include "common/system.h"
 #include "sound/audiostream.h"
@@ -521,3 +522,5 @@
 }
 
 } // End of namespace Scumm
+
+#endif // ENABLE_HE

Modified: scummvm/branches/gsoc2009-mods/engines/scumm/he/floodfill_he.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/scumm/he/floodfill_he.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/scumm/he/floodfill_he.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -23,8 +23,8 @@
  *
  */
 
+#ifdef ENABLE_HE
 
-
 #include "scumm/he/floodfill_he.h"
 #include "scumm/he/intern_he.h"
 #include "scumm/resource.h"
@@ -293,3 +293,5 @@
 }
 
 } // End of namespace Scumm
+
+#endif // ENABLE_HE

Modified: scummvm/branches/gsoc2009-mods/engines/scumm/he/logic_he.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/scumm/he/logic_he.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/scumm/he/logic_he.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -23,8 +23,8 @@
  *
  */
 
+#ifdef ENABLE_HE
 
-
 #include "scumm/he/intern_he.h"
 #include "scumm/he/logic_he.h"
 
@@ -1058,3 +1058,5 @@
 }
 
 } // End of namespace Scumm
+
+#endif // ENABLE_HE

Modified: scummvm/branches/gsoc2009-mods/engines/scumm/he/logic_he.h
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/scumm/he/logic_he.h	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/scumm/he/logic_he.h	2009-08-12 22:39:48 UTC (rev 43330)
@@ -26,8 +26,6 @@
 #if !defined(SCUMM_HE_LOGIC_HE_H) && defined(ENABLE_HE)
 #define SCUMM_HE_LOGIC_HE_H
 
-
-
 namespace Scumm {
 
 class ScummEngine_v90he;

Modified: scummvm/branches/gsoc2009-mods/engines/scumm/he/palette_he.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/scumm/he/palette_he.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/scumm/he/palette_he.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -8,6 +8,7 @@
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
+
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -22,6 +23,7 @@
  *
  */
 
+#ifdef ENABLE_HE
 
 #include "common/system.h"
 #include "scumm/scumm.h"
@@ -317,3 +319,5 @@
 }
 
 } // End of namespace Scumm
+
+#endif // ENABLE_HE

Modified: scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v100he.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v100he.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v100he.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -23,6 +23,8 @@
  *
  */
 
+#ifdef ENABLE_HE
+
 #include "common/system.h"
 
 #include "scumm/actor.h"
@@ -3014,3 +3016,5 @@
 }
 
 } // End of namespace Scumm
+
+#endif // ENABLE_HE

Modified: scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v71he.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v71he.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v71he.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -23,6 +23,8 @@
  *
  */
 
+#ifdef ENABLE_HE
+
 #include "scumm/actor.h"
 #include "scumm/he/intern_he.h"
 #include "scumm/scumm.h"
@@ -446,3 +448,5 @@
 }
 
 } // End of namespace Scumm
+
+#endif // ENABLE_HE

Modified: scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v72he.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v72he.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v72he.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -23,6 +23,8 @@
  *
  */
 
+#ifdef ENABLE_HE
+
 #include "common/config-manager.h"
 #include "common/savefile.h"
 #include "common/system.h"
@@ -2043,3 +2045,5 @@
 }
 
 } // End of namespace Scumm
+
+#endif // ENABLE_HE

Modified: scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v80he.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v80he.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v80he.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -23,6 +23,8 @@
  *
  */
 
+#ifdef ENABLE_HE
+
 #include "common/config-file.h"
 #include "common/config-manager.h"
 #include "common/savefile.h"
@@ -529,3 +531,5 @@
 }
 
 } // End of namespace Scumm
+
+#endif // ENABLE_HE

Modified: scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v90he.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v90he.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v90he.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -23,6 +23,8 @@
  *
  */
 
+#ifdef ENABLE_HE
+
 #include "scumm/actor.h"
 #include "scumm/charset.h"
 #include "scumm/he/animation_he.h"
@@ -2353,3 +2355,5 @@
 }
 
 } // End of namespace Scumm
+
+#endif // ENABLE_HE

Modified: scummvm/branches/gsoc2009-mods/engines/scumm/he/sound_he.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/scumm/he/sound_he.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/scumm/he/sound_he.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -23,7 +23,6 @@
  *
  */
 
-
 #include "scumm/actor.h"
 #include "scumm/file.h"
 #include "scumm/imuse/imuse.h"

Modified: scummvm/branches/gsoc2009-mods/engines/scumm/he/sprite_he.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/scumm/he/sprite_he.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/scumm/he/sprite_he.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -23,8 +23,8 @@
  *
  */
 
+#ifdef ENABLE_HE
 
-
 #include "scumm/he/intern_he.h"
 #include "scumm/resource.h"
 #include "scumm/saveload.h"
@@ -1442,3 +1442,5 @@
 }
 
 } // End of namespace Scumm
+
+#endif // ENABLE_HE

Modified: scummvm/branches/gsoc2009-mods/engines/scumm/he/wiz_he.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/scumm/he/wiz_he.cpp	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/engines/scumm/he/wiz_he.cpp	2009-08-12 22:39:48 UTC (rev 43330)
@@ -23,8 +23,8 @@
  *
  */
 
+#ifdef ENABLE_HE
 
-
 #include "common/system.h"
 #include "graphics/cursorman.h"
 #include "graphics/primitives.h"
@@ -2405,3 +2405,5 @@
 }
 
 } // End of namespace Scumm
+
+#endif // ENABLE_HE

Modified: scummvm/branches/gsoc2009-mods/graphics/sjis.h
===================================================================
--- scummvm/branches/gsoc2009-mods/graphics/sjis.h	2009-08-12 22:05:09 UTC (rev 43329)
+++ scummvm/branches/gsoc2009-mods/graphics/sjis.h	2009-08-12 22:39:48 UTC (rev 43330)
@@ -24,12 +24,16 @@
 
 // The code in this file is currently only used in KYRA and SCI.
 // So if neither of those is enabled, we will skip compiling it.
+// We also enable this code for ScummVM builds including support
+// for dynamic engine plugins.
 // If you plan to use this code in another engine, you will have
 // to add the proper define check here.
-// Also please add the define check at the comment after the
-// matching #endif further down this file.
-#if defined(ENABLE_KYRA) || defined(ENABLE_SCI)
+#if !(defined(ENABLE_KYRA) || defined(ENABLE_SCI) || defined(DYNAMIC_MODULES))
 
+// If neither of the above mentioned is enabled, do not include the SJIS code.
+
+#else
+
 #ifndef GRAPHICS_SJIS_H
 #define GRAPHICS_SJIS_H
 
@@ -184,5 +188,5 @@
 
 #endif
 
-#endif // defined(ENABLE_KYRA) || defined(ENABLE_SCI)
+#endif // engine and dynamic plugins guard
 


Property changes on: scummvm/branches/gsoc2009-mods/sound/iff_sound.cpp
___________________________________________________________________
Modified: svn:mergeinfo
   - /scummvm/trunk/sound/iff_sound.cpp:42569-43289
   + /scummvm/trunk/sound/iff_sound.cpp:42569-43329


Property changes on: scummvm/branches/gsoc2009-mods/sound/iff_sound.h
___________________________________________________________________
Modified: svn:mergeinfo
   - /scummvm/trunk/sound/iff_sound.h:42569-43289
   + /scummvm/trunk/sound/iff_sound.h:42569-43329


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