Tweak formatting and add comments

This commit is contained in:
Zac 2024-11-22 01:41:30 +00:00 committed by GitHub
parent 9d53eff8d4
commit 5bd0bc3c46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 10 deletions

View File

@ -8,6 +8,9 @@
#include "common.h" #include "common.h"
// ... /**
* @brief Get the PLO index from a stock OID.
*/
uint IploFromStockOid(int oid);
#endif // BRX_H #endif // BRX_H

View File

@ -12,14 +12,20 @@ INCLUDE_ASM(const s32, "P2/brx", snd_SendIOPCommandNoWait);
INCLUDE_ASM(const s32, "P2/brx", LoadOptionsFromBrx__FPvP18CBinaryInputStream); INCLUDE_ASM(const s32, "P2/brx", LoadOptionsFromBrx__FPvP18CBinaryInputStream);
uint IploFromStockOid(int oid) { uint IploFromStockOid(int oid)
{
int iplo; int iplo;
if (oid >= 0xC && oid <= 0x2a) { // Ensure oid is a stock object (between )
iplo = oid - 0xC; if (oid >= 12 && oid <= 42)
} else { {
iplo = oid - 12;
}
else
{
iplo = -1; iplo = -1;
} }
return iplo; return iplo;
} }

View File

@ -31,12 +31,11 @@ INCLUDE_ASM(const s32, "P2/gs", ResetGsMemory__Fv);
INCLUDE_ASM(const s32, "P2/gs", NLog2__FUi); INCLUDE_ASM(const s32, "P2/gs", NLog2__FUi);
void igsMin(GSB *pgsb,int igsMin,int igsMax) void InitGsb(GSB *pgsb, int igsMin, int igsMax)
{ {
pgsb->igsMac = igsMin; pgsb->igsMac = igsMin;
pgsb->igsMin = igsMin; pgsb->igsMin = igsMin;
pgsb->igsMax = igsMax; pgsb->igsMax = igsMax;
} }
INCLUDE_ASM(const s32, "P2/gs", ResetGsb__FP3GSB); INCLUDE_ASM(const s32, "P2/gs", ResetGsb__FP3GSB);