diff options
Diffstat (limited to 'maths.c')
-rw-r--r-- | maths.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -180,6 +180,12 @@ void mtx_push_rot_z(int a) { mtx_push(m); } +void mtx_push_scale(int s) { + int m[0x10]; + mtx_scale(m, s); + mtx_push(m); +} + int* mtx_pop(void) { assert(mtx_stack_top > 0); return mtx_stack[--mtx_stack_top]; @@ -234,6 +240,14 @@ int* mtx_rot_z(int* d, int a) { return d; } +int* mtx_scale(int* d, int s) { + mtx_iden(d); + d[0] = s; + d[5] = s; + d[10] = s; + return d; +} + int* mtx_apply(const int* m, int* v) { int s[4]; vec_cpy(s, v, 4); |