mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 22:41:14 +00:00
Add GCC compiler option. (#1056)
* GCC support. * Add note about gcc-mips-linux-gnu requirement to README.md. * changes * changes based on Tharo's suggestion * Cant reproduce file_choose.h error. Removing unnecessary -I * changes * wording based on Fig's suggestion * add AVOID_UB for eyes/mouth reordering issue. * remove unneeded flags and deprecate ZAPDFLAGS. * some changes, waiting on prs for the rest * fixes * discard header sections * change section handling in mkldscript * avoid_ub in DmaMgr_GetFileNameImpl * move asm to inline asm (consolidate gcc functions) * change prefix back * remove space * fix warnings * Revert "remove space" This reverts commit94af6977b3
. * Revert "fix warnings" This reverts commitd729ddf457
. * finish up missing_gcc_functions * revert unwanted mkldscript change * temporary workaround. TODO: Stop the asm processor from choking * fix ido build * Revert "temporary workaround. TODO: Stop the asm processor from choking" This reverts commit9df892b7ac
. * review * remove unused line in mkldscript * remove tabs * clarify zf comment * review2 * review * remove duplicate cc_check * vanilla code always come first * std_dma avoid ub * add compiler_gcc to cflags * only use two blocks when necessary * clarify zf comment Co-authored-by: fig02 <fig02srl@gmail.com>
This commit is contained in:
parent
67f294774b
commit
c3533052ca
11 changed files with 420 additions and 42 deletions
|
@ -452,9 +452,14 @@ s16 EnZf_FindNextPlatformAwayFromPlayer(Vec3f* pos, s16 curPlatform, s16 arg2, G
|
|||
}
|
||||
}
|
||||
|
||||
// These functions have no side effects, so these two calls do nothing
|
||||
//! @bug `altNextPlatform` can be -1 in certain conditions and cause an out of bounds access.
|
||||
//! Under normal conditions, this doesn't cause problems because the data before `sPlatformPositions`
|
||||
//! is section padding between .text and .data, so 0 gets read as a float.
|
||||
// These two function calls do nothing. Their return values aren't used and they have no side effects.
|
||||
#ifndef AVOID_UB
|
||||
Math_Vec3f_DistXYZ(&player->actor.world.pos, &sPlatformPositions[nextPlatform]);
|
||||
Math_Vec3f_DistXYZ(&player->actor.world.pos, &sPlatformPositions[altNextPlatform]);
|
||||
#endif
|
||||
|
||||
if (altNextPlatform > 0) {
|
||||
s16 nextPlatformToPlayerYaw =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue