Thread: ARGB
View Single Post
Old 08-05-2008, 11:48 PM   #9
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:
struct argb
integer a
integer r
integer g
integer b
endstruct
* 8191 limit.
* Extra code, arrays and overhead if you want to go above.
* You have to use .destroy.
* Can't let people assign stuff like this:
* Uses 4x more memory.

Collapse JASS:
globals
    private constant ARGB x=0xFFFF0000
endglobals

Config stuff was the first thing these functions were made for.

The only 'advantage' whatsoever with using instance structs here would be the ability to do member assignments, however that's utterly lame, assignments are useless for this sort of thing, the only assigment you'll ever need is x=0xFFFF0000.

And the calculations might worry you only if you like speed, unless we begin to care about the overhead things like create and destroy add or the fact that the applications for this are not really speed intensive.

Quote:
Those static [] and []= are becoming a common request btw...
Request? how come if they are already implemented?
__________________
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