Merge pull request #124 from SlyCooperReloadCoded/working

Matched InitGsb and IploFromStockOid
This commit is contained in:
Zac 2024-11-21 20:43:02 -05:00 committed by GitHub
commit 61e5cf7247
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 33 additions and 4 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

@ -8,7 +8,12 @@
#include "common.h"
// ...
struct GSB
{
int igsMin;
int igsMac;
int igsMax;
};
/**
*

View File

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

View File

@ -1,4 +1,5 @@
#include "common.h"
#include <gs.h>
INCLUDE_ASM(const s32, "P2/gs", BlendDisplayOnBufferMismatch__Fv);
@ -30,7 +31,12 @@ INCLUDE_ASM(const s32, "P2/gs", ResetGsMemory__Fv);
INCLUDE_ASM(const s32, "P2/gs", NLog2__FUi);
INCLUDE_ASM(const s32, "P2/gs", InitGsb__FP3GSBii);
void InitGsb(GSB *pgsb, int igsMin, int igsMax)
{
pgsb->igsMac = igsMin;
pgsb->igsMin = igsMin;
pgsb->igsMax = igsMax;
}
INCLUDE_ASM(const s32, "P2/gs", ResetGsb__FP3GSB);