mirror of
https://github.com/TheOnlyZac/sly1.git
synced 2025-02-17 05:38:37 +00:00
Tweak formatting and add comments
This commit is contained in:
parent
9d53eff8d4
commit
5bd0bc3c46
@ -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
|
||||||
|
14
src/P2/brx.c
14
src/P2/brx.c
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user