From c2089be66063515821b8aea6a7a815a8d1d7dbef Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Mon, 18 Aug 2008 07:12:05 +0000 Subject: * Split up blt routine (there is room for a ton of improvements) * Added scaling as a new blt option * Activated scaling for the main character in BRA svn-id: r33985 --- engines/parallaction/exec_ns.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'engines/parallaction/exec_ns.cpp') diff --git a/engines/parallaction/exec_ns.cpp b/engines/parallaction/exec_ns.cpp index 0ee362e50b..e63efbbeec 100644 --- a/engines/parallaction/exec_ns.cpp +++ b/engines/parallaction/exec_ns.cpp @@ -321,7 +321,7 @@ DECLARE_COMMAND_OPCODE(stop) { void Parallaction_ns::drawAnimations() { debugC(9, kDebugExec, "Parallaction_ns::drawAnimations()\n"); - uint16 layer = 0; + uint16 layer = 0, scale = 100; for (AnimationList::iterator it = _location._animations.begin(); it != _location._animations.end(); it++) { @@ -350,6 +350,18 @@ void Parallaction_ns::drawAnimations() { } } + if (getGameType() == GType_BRA) { + if (anim->_flags & (kFlagsScaled | kFlagsCharacter)) { + if (anim->getZ() <= _location._zeta0) { + if (anim->getZ() >= _location._zeta1) { + scale = ((anim->getZ() - _location._zeta1) * (100 - _location._zeta2)) / (_location._zeta0 - _location._zeta1) + _location._zeta2; + } else { + scale = _location._zeta2; + } + } + } + } + if (obj) { _gfx->showGfxObj(obj, true); obj->frame = anim->getF(); @@ -357,6 +369,7 @@ void Parallaction_ns::drawAnimations() { obj->y = anim->getY(); obj->z = anim->getZ(); obj->layer = layer; + obj->scale = scale; } } -- cgit v1.2.3