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

Robert Špalek rspalek at gmail.com
Mon Jul 6 22:18:36 CEST 2009


hi Denis,

On Mon, Jul 6, 2009 at 11:49 AM, <dkasak13 at users.sourceforge.net> wrote:

> Revision: 42188
>          http://scummvm.svn.sourceforge.net/scummvm/?rev=42188&view=rev
> Author:   dkasak13
> Date:     2009-07-06 18:49:51 +0000 (Mon, 06 Jul 2009)
>
> Log Message:
> -----------
> Set up GPL functions properly (the math evaluator now calls the handler if
> its implemented).
>
> Modified Paths:
> --------------
>    scummvm/branches/gsoc2009-draci/engines/draci/script.cpp
>    scummvm/branches/gsoc2009-draci/engines/draci/script.h
>
> Modified: scummvm/branches/gsoc2009-draci/engines/draci/script.cpp
> ===================================================================
> --- scummvm/branches/gsoc2009-draci/engines/draci/script.cpp    2009-07-06
> 18:15:50 UTC (rev 42187)
> +++ scummvm/branches/gsoc2009-draci/engines/draci/script.cpp    2009-07-06
> 18:49:51 UTC (rev 42188)
> @@ -114,31 +114,32 @@
> +       int visiblethingy = obj->_visible ? 1 << 7 : 0x00;
> +       int thingy = (obj->_location + 1) | visiblethingy;


why do you compute these variables?


> +       if ( ((objID == 0) || (obj->_visible)) && (obj->_location ==
> _vm->_game->_currentRoom._roomNum))
> +               _vm->_anims->play(animID);


what is the purpose of this test?  is objID==0 the dragon?



> Modified: scummvm/branches/gsoc2009-draci/engines/draci/script.h
> ===================================================================
> --- scummvm/branches/gsoc2009-draci/engines/draci/script.h      2009-07-06
> 18:15:50 UTC (rev 42187)
> +++ scummvm/branches/gsoc2009-draci/engines/draci/script.h      2009-07-06
> 18:49:51 UTC (rev 42188)
> @@ -44,6 +44,7 @@
>
>  typedef void (Script::* GPLHandler)(Common::Queue<int> &);
>  typedef int  (Script::* GPLOperatorHandler)(int, int);
> +typedef int  (Script::* GPLFunctionHandler)(int);
>

just to avoid a possible confusion: while in my previous comment I suggested
to not make GPLOperatorHandler a pointer to a regular method of Script (but
to a static method), I think it's perfectly all right to keep it this way
for GPLFunctionHandler, because these functions are not mathematical
functions, but they have by definition access to the game data structures.
 so this way is good :-)

-- 
Robert Špalek <rspalek at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20090706/84002dab/attachment.html>


More information about the Scummvm-devel mailing list