oot
oot copied to clipboard
Move libultra functions and variables to libultra headers
Not totally happy with this, since macros.h and the new stack.h are not libultra headers but are still used in some libultra files for now, however this is the bulk of the changes and further improvements will inevitably be found.
Not sure where to start reviewing but I noticed FLT_MAX -> MAXFLOAT, the former being C-standard (I think), the latter coming from where?
In the three MIPS cross compilers I have installed (mips-linux-gnu-, well-known, mips64-ultra-elf-, glank's toolchain, mips64-elf-, libdragon toolchain) I cannot find the definition FLT_MAX, only MAXFLOAT in math.h.
Supposedly FLT_MAX is in float.h, an ISO C99 header, however I can't find a physical copy of such a header (I'd love to know where it is)
It seems MAXFLOAT is not strictly ISO C, it's an "extension", but it seems sufficiently widely adopted?
Very interesting last set of changes! What is the future you envision for explicit-width "ultratypes" s32 & co ? What should use int & co "natives" instead, or not? (does that make sense)
So far I've only been removing the ultratypes from libc files/functions, since libc shouldn't know anything about libultra. Otherwise I have no current plans to start removing them elsewhere
idk what this entails but theres also the "modern n64 sdk" which includes the entirety of libultra. the legality is murky at best.
We'll eventually need at least part of this PR revived for header cleanup.
The goals with libultra should be clarified: align with ultralib? if not, which includes in .c files (IWYU ?) ?