summaryrefslogtreecommitdiff
path: root/apps/plugins/sdl/progs/quake/mathlib.h
diff options
context:
space:
mode:
authorFranklin Wei <franklin@rockbox.org>2019-08-09 20:08:10 -0400
committerFranklin Wei <franklin@rockbox.org>2019-08-09 21:27:42 -0400
commitee70dad305a94709c877e776d723aee64d023cb5 (patch)
tree4483d1bd7b96e080dcb496e0665252e970d8cdbf /apps/plugins/sdl/progs/quake/mathlib.h
parent3fffabf50d5597812ffa4381ac70dd6e2af6b392 (diff)
downloadrockbox-ee70dad305a94709c877e776d723aee64d023cb5.tar.gz
rockbox-ee70dad305a94709c877e776d723aee64d023cb5.zip
quake: merge some fixed-point optimizations from PocketQuake
The PocketQuake project, available below, has some nice fixed-point code: https://web.archive.org/web/20150412233306/http://quake.pocketmatrix.com/PocketQuake0062_src.zip I'd like to see most of them merged into our Quake port. This commit gives +0.9FPS on ipod6g. (A big change given that it was running at only 9.7FPS to begin with!) Change-Id: I91931bdd5c22f14fb28616de938a03b4e7d7b076
Diffstat (limited to 'apps/plugins/sdl/progs/quake/mathlib.h')
-rw-r--r--apps/plugins/sdl/progs/quake/mathlib.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/plugins/sdl/progs/quake/mathlib.h b/apps/plugins/sdl/progs/quake/mathlib.h
index b754966802..5f7ae430f1 100644
--- a/apps/plugins/sdl/progs/quake/mathlib.h
+++ b/apps/plugins/sdl/progs/quake/mathlib.h
@@ -19,6 +19,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19*/ 19*/
20// mathlib.h 20// mathlib.h
21 21
22//Dan East:
23#include "FixedPointMath.h"
24
25#ifdef USE_PQ_OPT
26typedef int fpvec3[3];
27#endif
28
29typedef fixedpoint_t vec3_FPM_t[3];
30typedef fixedpoint8_24_t vec3_8_24FPM_t[3];
31typedef fixedpoint_t vec5_FPM_t[5];
32
33//End Dan
34
22typedef float vec_t; 35typedef float vec_t;
23typedef vec_t vec3_t[3]; 36typedef vec_t vec3_t[3];
24typedef vec_t vec5_t[5]; 37typedef vec_t vec5_t[5];