diff options
author | Franklin Wei <franklin@rockbox.org> | 2019-08-09 20:08:10 -0400 |
---|---|---|
committer | Franklin Wei <franklin@rockbox.org> | 2019-08-09 21:27:42 -0400 |
commit | ee70dad305a94709c877e776d723aee64d023cb5 (patch) | |
tree | 4483d1bd7b96e080dcb496e0665252e970d8cdbf /apps/plugins/sdl/progs/quake/mathlib.h | |
parent | 3fffabf50d5597812ffa4381ac70dd6e2af6b392 (diff) | |
download | rockbox-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.h | 13 |
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 | ||
26 | typedef int fpvec3[3]; | ||
27 | #endif | ||
28 | |||
29 | typedef fixedpoint_t vec3_FPM_t[3]; | ||
30 | typedef fixedpoint8_24_t vec3_8_24FPM_t[3]; | ||
31 | typedef fixedpoint_t vec5_FPM_t[5]; | ||
32 | |||
33 | //End Dan | ||
34 | |||
22 | typedef float vec_t; | 35 | typedef float vec_t; |
23 | typedef vec_t vec3_t[3]; | 36 | typedef vec_t vec3_t[3]; |
24 | typedef vec_t vec5_t[5]; | 37 | typedef vec_t vec5_t[5]; |