From 39e4a9b180d37f2fef108391d5f04a3c7e3b2ea0 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sat, 25 Aug 2007 20:34:10 +0000 Subject: Added an abstract base class for representing multiple-frames for animations. Changed user code to rely on the new interface. Cnv has been turned into an implementation of the new interface, and it is now known as a concrete class only to Disk and Font code for Nippon Safes. svn-id: r28734 --- engines/parallaction/parser_ns.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'engines/parallaction/parser_ns.cpp') diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp index 1956e7cb03..e3ee3157fb 100644 --- a/engines/parallaction/parser_ns.cpp +++ b/engines/parallaction/parser_ns.cpp @@ -1234,7 +1234,10 @@ void Parallaction_ns::parseZoneTypeBlock(Script &script, Zone *z) { u->door->_cnv = _disk->loadFrames(vC8); uint16 _ax = (z->_flags & kFlagsClosed ? 0 : 1); - u->door->_background = (byte*)malloc(u->door->_cnv->_width * u->door->_cnv->_height); + Common::Rect r; + u->door->_cnv->getRect(0, r); + + u->door->_background = (byte*)malloc(r.width() * r.height()); _gfx->backupDoorBackground(u->door, z->_left, z->_top); _gfx->flatBlitCnv(u->door->_cnv, _ax, z->_left, z->_top, Gfx::kBitBack); -- cgit v1.2.3