FBA The Creator

The True Multiplatform PC / PocketPC Opensource Development Tool - Read Only Mode - Kept only for historical purposes - Thank you all ;)
It is currently Thu Jun 04, 2026 4:57 am

All times are UTC




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Wed Aug 20, 2008 1:43 pm 
Offline

Joined: Thu Aug 14, 2008 11:10 am
Posts: 8
I have found bug in function poly and the same bug in fillpoly

fillpoly(red, green, blue [,px, py][,px, py][,px, py]....)

red, green - changes color but somehow olso became first coordinates px and py
then forth coordinates and left does't work it all.

for ex. please try to use this function instead of fillrect and see what you get :)

ARNOLD


Top
   
PostPosted: Wed Aug 20, 2008 8:12 pm 
Offline
FBA Administrator
FBA Administrator
User avatar

Joined: Fri Mar 21, 2008 11:19 pm
Posts: 238
Location: Rome - Italy
Yes, i found the bug, interested functions are poly and fillpoly (not fillrect).
This will be fixed in next release.


Top
   
PostPosted: Wed Aug 20, 2008 9:59 pm 
Offline
FBA Administrator
FBA Administrator
User avatar

Joined: Fri Mar 21, 2008 11:19 pm
Posts: 238
Location: Rome - Italy
Ok, it should be fixed in current available release (0.2.0.135) ;)


Top
   
PostPosted: Thu Aug 21, 2008 5:42 am 
Offline

Joined: Thu Aug 14, 2008 11:10 am
Posts: 8
O, Thanks a lot in last version 0.2.0.135
Poly and fillpoly now works properly.

But i have something like suggestion or may be question
is it possible to use fillpoly or poly function with arrays.
I mean
can i use this functions like this:
local part={}
local maxparts=200
for c=0, maxparts do
part[c]={}
part[c]["x"]=math.random(0, screenwidth())
part[c]["y"]=math.random(-screenheight(), -20)
end

Poly (r ,g, b, part[c]["x"], XStart,part[c]["y"], YStart, Count)

instead of sample:

poly(r, g, b,
math.random(0, screenwidth()), math.random(0, screenheight()),
math.random(0, screenwidth()), math.random(0, screenheight()),
math.random(0, screenwidth()), math.random(0, screenheight()),
math.random(0, screenwidth()), math.random(0, screenheight()),
math.random(0, screenwidth()), math.random(0, screenheight()),
math.random(0, screenwidth()), math.random(0, screenheight())
)



Thanks

ARNOLD


Top
   
PostPosted: Thu Aug 21, 2008 9:39 am 
Offline
FBA Administrator
FBA Administrator
User avatar

Joined: Fri Mar 21, 2008 11:19 pm
Posts: 238
Location: Rome - Italy
You can obtain that (or similar) using the unpack LUA function:

Code:
        
local myarr={}
myarr[1]=10
myarr[2]=10
myarr[3]=40
myarr[4]=10
myarr[5]=40
myarr[6]=40
myarr[7]=10
myarr[8]=40
fillpoly(255, 0, 0, unpack(myarr))


Look here and here for more info


Top
   
PostPosted: Thu Aug 21, 2008 5:26 pm 
Offline

Joined: Thu Aug 14, 2008 11:10 am
Posts: 8
O! so easy
Thanks for answer.
I'll try.
I think it must be usefull put this information (about using unpack function of LUA and may be another interesting functions of LUA) somewere in help of FBA on visible place?



ARNOLD


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited