graphitemaster / gmqcc

An Improved Quake C Compiler
Other
160 stars 28 forks source link

FTEQCC vector initializers #147

Open graphitemaster opened 10 years ago

graphitemaster commented 10 years ago

FTEQCC has a clever vector initializer feature which is used by projects like Brood Hunter. Essentially it takes on the form [expr1, expr2, expr3] which constructs a vector with the values of expr1, expr2 and expr3 mapped to xyz respectfully. It should also be noted that y and z are optional in the expression. It just pads it off with zeros. So [a, b] will be a vector with z=0. Or [a] will be a vector with y=0 and z=0

Blub commented 10 years ago

I think this might even be used in hexen2. Not sure though.