mirror of
https://github.com/TheOnlyZac/sly1.git
synced 2024-11-26 23:20:43 +00:00
Merge pull request #124 from SlyCooperReloadCoded/working
Matched InitGsb and IploFromStockOid
This commit is contained in:
commit
61e5cf7247
@ -8,6 +8,9 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
// ...
|
||||
/**
|
||||
* @brief Get the PLO index from a stock OID.
|
||||
*/
|
||||
uint IploFromStockOid(int oid);
|
||||
|
||||
#endif // BRX_H
|
||||
|
@ -8,7 +8,12 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
// ...
|
||||
struct GSB
|
||||
{
|
||||
int igsMin;
|
||||
int igsMac;
|
||||
int igsMax;
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
|
17
src/P2/brx.c
17
src/P2/brx.c
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user