Skip to content

Commit

Permalink
port: use system trig functions
Browse files Browse the repository at this point in the history
this might cause different behavior from the N64 version or it might fix some issues, who knows
  • Loading branch information
fgsfdsfgs committed Sep 23, 2023
1 parent 7d5f33d commit dad5b3c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile.port
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ JSON_FILES += $(wildcard $(A_DIR)/*.json)

JSON_HEADERS := $(patsubst $(A_DIR)/%.json, $(G_DIR)/%.h, $(JSON_FILES))

C_FILES := $(shell find src/game port -name '*.c')
C_FILES := $(shell find src/game port -name '*.c' ! -name 'atan2f.c' ! -name 'acosfasinf.c')
C_FILES := $(C_FILES) \
$(wildcard src/lib/mp3/*.c) \
$(wildcard src/lib/naudio/*.c) \
Expand Down
4 changes: 4 additions & 0 deletions src/lib/modelasm_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -1577,6 +1577,8 @@ static f32 modelasmAcosOrAsin(f32 f6)
return 0.000047937632189132f * t3;
}

#ifdef PLATFORM_N64

f32 cosf(f32 radians)
{
return sinf(radians + 1.570796251297f);
Expand Down Expand Up @@ -1650,3 +1652,5 @@ f32 sinf(f32 radians)

return ret;
}

#endif

0 comments on commit dad5b3c

Please sign in to comment.