From ee70dad305a94709c877e776d723aee64d023cb5 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Fri, 9 Aug 2019 20:08:10 -0400 Subject: 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 --- apps/plugins/sdl/progs/quake/mathlib.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'apps/plugins/sdl/progs/quake/mathlib.h') 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. */ // mathlib.h +//Dan East: +#include "FixedPointMath.h" + +#ifdef USE_PQ_OPT +typedef int fpvec3[3]; +#endif + +typedef fixedpoint_t vec3_FPM_t[3]; +typedef fixedpoint8_24_t vec3_8_24FPM_t[3]; +typedef fixedpoint_t vec5_FPM_t[5]; + +//End Dan + typedef float vec_t; typedef vec_t vec3_t[3]; typedef vec_t vec5_t[5]; -- cgit v1.2.3