[Scummvm-cvs-logs] SF.net SVN: scummvm:[39446] scummvm/trunk/engines/parallaction/disk_br.cpp

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Mon Mar 16 15:35:21 CET 2009


Revision: 39446
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39446&view=rev
Author:   Kirben
Date:     2009-03-16 14:35:18 +0000 (Mon, 16 Mar 2009)

Log Message:
-----------
Add talk position adjustment to loadTalk for Amiga version of BRA too.

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/disk_br.cpp

Modified: scummvm/trunk/engines/parallaction/disk_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/disk_br.cpp	2009-03-16 09:45:37 UTC (rev 39445)
+++ scummvm/trunk/engines/parallaction/disk_br.cpp	2009-03-16 14:35:18 UTC (rev 39446)
@@ -602,10 +602,20 @@
 
 GfxObj* AmigaDisk_br::loadTalk(const char *name) {
 	debugC(1, kDebugDisk, "AmigaDisk_br::loadTalk '%s'", name);
+
 	Common::SeekableReadStream *stream = openFile("talks/" + Common::String(name), ".tal");
-	GfxObj* obj = new GfxObj(0, createSprites(*stream));
+
+	// talk position is set to (0,0), because talks are always displayed at
+	// absolute coordinates, set in the dialogue manager. The original used
+	// to null out coordinates every time they were needed. We do it better!
+	Sprites *spr = createSprites(*stream);
+	for (int i = 0; i < spr->getNum(); i++) {
+		spr->_sprites[i].x = 0;
+		spr->_sprites[i].y = 0;
+	}
+
 	delete stream;
-	return obj;
+	return new GfxObj(0, spr, name);
 }
 
 Font* AmigaDisk_br::loadFont(const char* name) {


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