[Scummvm-cvs-logs] SF.net SVN: scummvm:[43486] scummvm/branches/gsoc2009-draci/engines/draci

Robert Špalek rspalek at gmail.com
Mon Aug 17 21:10:06 CEST 2009


On Mon, Aug 17, 2009 at 11:47 AM, <dkasak13 at users.sourceforge.net> wrote:

> +Animation *AnimationManager::addText(int id, bool playing) {
> +
> +       Animation *anim = new Animation(_vm, kIgnoreIndex);
> +
> +       anim->setID(id);
> +       anim->setZ(257);


add constants for all Z coordinates now set manually (255, 256, 257, ...)


> +void AnimationManager::pauseAnimations() {
> +
> +       Common::List<Animation *>::iterator it;
> +
> +       for (it = _animations.begin(); it != _animations.end(); ++it) {
> +               if ((*it)->getID() > 0 || (*it)->getID() == kTitleText) {
> +                       // Clean up the last frame that was drawn before
> stopping
> +                       (*it)->markDirtyRect(_vm->_screen->getSurface());
> +
> +                       (*it)->setPaused(true);
> +               }
> +       }
> +}
> +
> +void AnimationManager::unpauseAnimations() {
>

these methods have the same code except for setting true/false.  maybe unify
them and add a parameter denoting which value to set.

Modified: scummvm/branches/gsoc2009-draci/engines/draci/animation.h
> ===================================================================
> --- scummvm/branches/gsoc2009-draci/engines/draci/animation.h   2009-08-17
> 18:25:51 UTC (rev 43485)
> +++ scummvm/branches/gsoc2009-draci/engines/draci/animation.h   2009-08-17
> 18:47:17 UTC (rev 43486)
> @@ -38,7 +38,10 @@
>           kWalkingMapOverlay = -2,
>           kTitleText = -3,
>           kSpeechText = -4,
> -          kUnused = -5 };
> +          kInventorySprite = -5,
> +          kDialogueLinesID = -6,


add a comment saying that 4 ID's are allocated below this one, or instead of
using the number 4 directly, refer to a constant whose value is this very 4

-- 
Robert Špalek <rspalek at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-git-logs/attachments/20090817/f58e7ce7/attachment.html>


More information about the Scummvm-git-logs mailing list