From 5aaa9870b19d055d7124f70c88f366e3660a6f1f Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 16 Mar 2009 14:35:18 +0000 Subject: Add talk position adjustment to loadTalk for Amiga version of BRA too. svn-id: r39446 --- engines/parallaction/disk_br.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'engines/parallaction') diff --git a/engines/parallaction/disk_br.cpp b/engines/parallaction/disk_br.cpp index 9fa3e7a701..21e73a8f09 100644 --- a/engines/parallaction/disk_br.cpp +++ b/engines/parallaction/disk_br.cpp @@ -602,10 +602,20 @@ Frames* AmigaDisk_br::loadFrames(const char* name) { 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) { -- cgit v1.2.3