SDK Questions

Posted By: LazyDog

SDK Questions - 06/22/08 17:38

for the following matrix functions, what is the actual type that float* (for the matrix)
is pointing to in your c++ code? is it an array of 16 items (4x4) defined as float?

// float 4x4 matrix math
EXT float* F(mat_identity)(float*);
EXT float* F(mat_inverse)(float*,float*);
EXT float* F(mat_multiply)(float*,float*);
EXT float* F(mat_scale)(float*,var,var,var);
EXT float* F(mat_set)(float*,float*);
EXT float* F(mat_transpose)(float*,float*);

should VECTOR* xy be defined as COLOR* color instead for the following?
EXT var F(draw_text)(char* text,var,var,VECTOR* xy);
(the manual defines the above as VECTOR* color, should it also be COLOR* color)?
Posted By: jcl

Re: SDK Questions - 06/23/08 08:36

Correct, a matrix is an array of 16 floats.

Also correct were a COLOR* for draw_text. It does not matter technically because a VECTOR* is the same as a COLOR*, but it's misleading and I'll change that.
© 2023 lite-C Forums