From 1b228a8400afdd8038d001cb2da60e53d14f5491 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Rzepecki?= Date: Tue, 16 Sep 2008 19:14:17 +0200 Subject: [PATCH] Fixed opcode to create frame correctly. --- engines/innocent/opcode_handlers.cpp | 2 +- engines/innocent/room.cpp | 5 +++++ engines/innocent/room.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/engines/innocent/opcode_handlers.cpp b/engines/innocent/opcode_handlers.cpp index abe7d6ea3..ecbb9ce48 100644 --- a/engines/innocent/opcode_handlers.cpp +++ b/engines/innocent/opcode_handlers.cpp @@ -565,7 +565,7 @@ OPCODE(0xdf) { const int16 left = a[0].signd(); const int16 top = a[1].signd(); debugC(3, kDebugLevelScript, "opcode 0xdf: add actor frame %d %d %d %d %d %d %d %d %d %d", left, top, nexts[0], nexts[1], nexts[2], nexts[3], nexts[4], nexts[5], nexts[6], nexts[7]); - Log.room()->addActorFrame(Actor::Frame(left, top, nexts)); + Log.room()->addActorFrame(Common::Point(left, top), nexts); return kThxBye; } diff --git a/engines/innocent/room.cpp b/engines/innocent/room.cpp index 56d994749..ffb3fa421 100644 --- a/engines/innocent/room.cpp +++ b/engines/innocent/room.cpp @@ -11,4 +11,9 @@ Room::Room(Logic *l) : _logic(l) { snprintf(_debugInfo, 50, "room %d in %s", l->roomNumber(), +*l->blockProgram()); } +void Room::addActorFrame(Common::Point pos, std::vector nexts) { + Actor::Frame f(pos, nexts, _actorFrames.size() + 1); + _actorFrames.push_back(f); +} + } diff --git a/engines/innocent/room.h b/engines/innocent/room.h index cbfab3cf4..3045a2832 100644 --- a/engines/innocent/room.h +++ b/engines/innocent/room.h @@ -30,7 +30,7 @@ public: const Common::List &exits() const { return _exits; } - void addActorFrame(const Actor::Frame &f) { _actorFrames.push_back(f); } + void addActorFrame(Common::Point p, std::vector nexts); Actor::Frame getFrame(uint16 index) const { if (index >= _actorFrames.size() || index == 0) return Actor::Frame(); -- 2.11.4.GIT