From cee44698b2e01a3b04e796e1ffcdc8dd8f6c3334 Mon Sep 17 00:00:00 2001 From: OmniBlade Date: Wed, 27 Nov 2019 00:21:18 +0000 Subject: [PATCH] Implements BrFloat* functions. (#15) --- src/BRSRC13/CORE/STD/brmath.c | 6 ++++++ src/DETHRACE/Makefile | 1 + test/Makefile | 1 + 3 files changed, 8 insertions(+) diff --git a/src/BRSRC13/CORE/STD/brmath.c b/src/BRSRC13/CORE/STD/brmath.c index 2e4f7ef7..0420dd71 100644 --- a/src/BRSRC13/CORE/STD/brmath.c +++ b/src/BRSRC13/CORE/STD/brmath.c @@ -1,29 +1,35 @@ #include "brmath.h" +#include char rscid[46]; // Offset: 13 // Size: 61 float BrFloatFloor(float f) { + return floorf(f); } // Offset: 86 // Size: 61 float BrFloatCeil(float f) { + return ceilf(f); } // Offset: 159 // Size: 61 float BrFloatSqrt(float f) { + return sqrtf(f); } // Offset: 231 // Size: 70 float BrFloatPow(float a, float b) { + return powf(a, b); } // Offset: 314 // Size: 70 float BrFloatAtan2(float x, float y) { + return atan2f(x, y); } diff --git a/src/DETHRACE/Makefile b/src/DETHRACE/Makefile index 31c9dcbe..8b1c3836 100644 --- a/src/DETHRACE/Makefile +++ b/src/DETHRACE/Makefile @@ -13,6 +13,7 @@ INC_DIRS := $(shell find $(SRC_DIR) -type d) $(BR_SRC_DIR) INC_FLAGS := $(addprefix -I,$(INC_DIRS)) CFLAGS ?= $(INC_FLAGS) -Wno-return-type -Wno-missing-declarations -Werror=implicit-function-declaration +LDFLAGS ?= -lm .PHONY: clean build test diff --git a/test/Makefile b/test/Makefile index 94899957..e47d38fd 100644 --- a/test/Makefile +++ b/test/Makefile @@ -17,6 +17,7 @@ INC_DIRS := $(shell find $(SRC_DIR) -type d) $(BR_SRC_DIR) $(DR_SRC_DIR) INC_FLAGS := $(addprefix -I,$(INC_DIRS)) CFLAGS ?= $(INC_FLAGS) +LDFLAGS ?= -lm .PHONY: clean build run