"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
_______________________________________________
Enigma-devel mailing list
Enigma-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/enigma-devel