[ruamoko] Move older math functions

The old math functions from quake and quakeworld don't belong with the
newer ones as their presence in the same object file causes invalid
builtin warnings when pr_cmds isn't present.
This commit is contained in:
Bill Currie 2021-12-22 14:00:31 +09:00
parent 0c41c11f1d
commit 241785e952
3 changed files with 17 additions and 14 deletions

View File

@ -40,7 +40,9 @@ r_depfiles_remade += $(ruamoko_lib_libr_a_dep)
ruamoko_lib_common_src= \
ruamoko/lib/debug.r \
ruamoko/lib/system.r \
ruamoko/lib/legacy_math.r \
ruamoko/lib/legacy_string.r
ruamoko_lib_server_src= \
ruamoko/lib/crudefile.r \
ruamoko/lib/entities.r \

15
ruamoko/lib/legacy_math.r Normal file
View File

@ -0,0 +1,15 @@
#include <math.h>
vector v_forward, v_up, v_right;
float () random = #7;
int (float f) ftoi = #0x000f0000 + 110;
float (int i) itof = #0x000f0000 + 111;
vector (vector v) normalize = #9;
float (vector v) vlen = #12;
float (vector v) vectoyaw = #13;
float (float v) rint = #36;
float (float v) floor = #37;
float (float v) ceil = #38;
float (float f) fabs = #43;
vector (vector v) vectoangles = #51;

View File

@ -1,19 +1,5 @@
#include <math.h>
vector v_forward, v_up, v_right;
float () random = #7;
int (float f) ftoi = #0x000f0000 + 110;
float (int i) itof = #0x000f0000 + 111;
vector (vector v) normalize = #9;
float (vector v) vlen = #12;
float (vector v) vectoyaw = #13;
float (float v) rint = #36;
float (float v) floor = #37;
float (float v) ceil = #38;
float (float f) fabs = #43;
vector (vector v) vectoangles = #51;
float (float x) sin = #0;
float (float x) cos = #0;
float (float x) tan = #0;