hi Denis,<br><br><div class="gmail_quote">On Mon, Jul 6, 2009 at 11:49 AM, <span dir="ltr"><<a href="mailto:dkasak13@users.sourceforge.net">dkasak13@users.sourceforge.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Revision: 42188<br>
<a href="http://scummvm.svn.sourceforge.net/scummvm/?rev=42188&view=rev" target="_blank">http://scummvm.svn.sourceforge.net/scummvm/?rev=42188&view=rev</a><br>
Author: dkasak13<br>
Date: 2009-07-06 18:49:51 +0000 (Mon, 06 Jul 2009)<br>
<br>
Log Message:<br>
-----------<br>
Set up GPL functions properly (the math evaluator now calls the handler if its implemented).<br>
<br>
Modified Paths:<br>
--------------<br>
scummvm/branches/gsoc2009-draci/engines/draci/script.cpp<br>
scummvm/branches/gsoc2009-draci/engines/draci/script.h<br>
<br>
Modified: scummvm/branches/gsoc2009-draci/engines/draci/script.cpp<br>
===================================================================<br>
--- scummvm/branches/gsoc2009-draci/engines/draci/script.cpp 2009-07-06 18:15:50 UTC (rev 42187)<br>
+++ scummvm/branches/gsoc2009-draci/engines/draci/script.cpp 2009-07-06 18:49:51 UTC (rev 42188)<br>
@@ -114,31 +114,32 @@<br>+ int visiblethingy = obj->_visible ? 1 << 7 : 0x00;<br>
+ int thingy = (obj->_location + 1) | visiblethingy;</blockquote><div><br></div><div>why do you compute these variables?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
+ if ( ((objID == 0) || (obj->_visible)) && (obj->_location == _vm->_game->_currentRoom._roomNum))<br>
+ _vm->_anims->play(animID);</blockquote><div><br></div><div>what is the purpose of this test? is objID==0 the dragon?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Modified: scummvm/branches/gsoc2009-draci/engines/draci/script.h<br>
===================================================================<br>
--- scummvm/branches/gsoc2009-draci/engines/draci/script.h 2009-07-06 18:15:50 UTC (rev 42187)<br>
+++ scummvm/branches/gsoc2009-draci/engines/draci/script.h 2009-07-06 18:49:51 UTC (rev 42188)<br>
@@ -44,6 +44,7 @@<br>
<br>
typedef void (Script::* GPLHandler)(Common::Queue<int> &);<br>
typedef int (Script::* GPLOperatorHandler)(int, int);<br>
+typedef int (Script::* GPLFunctionHandler)(int);<br></blockquote><div><br></div><div>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 :-)</div>
<div><br></div></div>-- <br>Robert Špalek <<a href="mailto:rspalek@gmail.com">rspalek@gmail.com</a>><br>