enigma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Enigma-devel] Annother patch


From: Tacvek
Subject: Re: [Enigma-devel] Annother patch
Date: Fri, 26 May 2006 13:48:15 -0400

"Ronald Lamprecht" wrote:



Hi Tacvek,

Tacvek wrote:
Much of the code is simply a copy and paste from the next function in the file.


Index: models.lua
===================================================================
--- models.lua (revision 135)
+++ models.lua (working copy)
@@ -297,7 +297,12 @@

function def_anim_images(name, frames, opt)
    opt = opt or {}
-    display.DefineAnim(name, opt.loop)
+    if loop then
+        if opt.loop==0 then loopbool=false else loopbool=true end
+    else
+        loopbool=false
+    end
+    display.DefineAnim(name, loopbool)
    for i=1,getn(frames) do
 local frame=frames[i]
 opt.filename = frame[1]


The "if loop then" is an obviously copy error. It causes bug report #7585 "laser and laserswitch".

Index: models.lua
===================================================================
--- models.lua (revision 135)
+++ models.lua (working copy)
@@ -297,7 +297,12 @@

function def_anim_images(name, frames, opt)
    opt = opt or {}
-    display.DefineAnim(name, opt.loop)
+    if loop then
+        if opt.loop==0 then loopbool=false else loopbool=true end
+    else
+        loopbool=false
+    end
+    display.DefineAnim(name, loopbool)
    for i=1,getn(frames) do
 local frame=frames[i]
 opt.filename = frame[1]


The "if loop then" is an obviously copy error. It causes bug report #7585 "laser and laserswitch".

Hmm... yes, it must have been a copy error.

"if loop.opt then" must be what was meant. Does that not work?
Also, I failed to define loopbool as a local variable in that patch.
I did so in the function I copied my code from, but not this one.
Please fix that.
Tacvek




reply via email to

[Prev in Thread] Current Thread [Next in Thread]