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"
// ...
/**
* @brief Get the PLO index from a stock OID.
*/
uint IploFromStockOid(int oid);
#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);
uint IploFromStockOid(int oid) {
uint IploFromStockOid(int oid)
{
int iplo;
if (oid >= 0xC && oid <= 0x2a) {
iplo = oid - 0xC;
} else {
// Ensure oid is a stock object (between )
if (oid >= 12 && oid <= 42)
{
iplo = oid - 12;
}
else
{
iplo = -1;
}
return iplo;
}

View File

@ -31,12 +31,11 @@ INCLUDE_ASM(const s32, "P2/gs", ResetGsMemory__Fv);
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->igsMin = igsMin;
pgsb->igsMax = igsMax;
pgsb->igsMac = igsMin;
pgsb->igsMin = igsMin;
pgsb->igsMax = igsMax;
}
INCLUDE_ASM(const s32, "P2/gs", ResetGsb__FP3GSB);