Thread: ARGB
View Single Post
Old 08-05-2008, 04:42 PM   #4
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

Quote:
Originally Posted by d07.RiV
How about assignment operators? One might want to do set color.red = 128
And -(-c+0x80000000) is the same as c-0x80000000 isnt it?
Well, right now you can do set color= ARGB.create(color.red, color.green, color.blue)

Can't do assignment stuff without making the structs by-ref again then you would need destroy and all sorts of things like that.

Edit; I think assignment operators would work if I changed jasshelper to allow:
Collapse JASS:
set x.r = 2
To be converted to:
Collapse JASS:
set x= assign_r(x,2)

Instead of
Collapse JASS:
   call assign_r(x,2)
Perhaps if []= and .= return the struct's type do that? There is really no use right now for the return value of the = operator methods anyway.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote