Commit Graph

4 Commits

Author SHA1 Message Date
Bill Currie 9c8e13aa4c [qfcc] Implement automatic casting between same-width vectors
This allows all the tests to build and pass. I'll need to add tests to
ensure warnings happen when they should and that all vec operations are
correct (ouch, that'll be a lot of work), but vectors and quaternions
are working again.
2022-04-29 18:12:47 +09:00
Bill Currie 1eb8b61b83 [qfcc] Clean up handling of value expressions
I'd created new_value_expr some time ago, but never used it...
Also, replace convert_* with cast_expr to the appropriate type (removes
a pile of value check and create code).
2022-04-29 16:59:55 +09:00
Bill Currie 04f60e5ff1 [qfcc] Rework vector expression handling
Use with quaternions and vectors is a little broken in that
vec4/quaternion and vec3/vector are not the same types (by design) and
thus a cast is needed (not what I want, though). However, creating
vectors (that happen to be int due to int constants) does seem to be
working nicely otherwise.
2022-04-29 16:59:55 +09:00
Bill Currie 67bdbc6f7a [qfcc] Split out vector expression code
I plan on extending it for the new vector types and expr.c is just too
big to work in nicely.
2022-04-29 16:59:15 +09:00