misc work

This commit is contained in:
Jasper St. Pierre
2023-11-08 00:03:17 -08:00
parent 14d71dae68
commit 29573e69bb
14 changed files with 331 additions and 71 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ namespace JASystem {
/* 0x78 */ short field_0x78[4];
/* 0x80 */ short field_0x80[20];
/* 0xA8 */ short field_0xa8[4];
/* 0xB8 */ short field_0xb0[16];
/* 0xB8 */ u16 field_0xb0[16];
/* 0xD0 */ u8 field_0xd0[0x100 - 0xd0];
/* 0x100 */ u16 field_0x100;
/* 0x102 */ u16 field_0x102;
+34 -20
View File
@@ -22,30 +22,44 @@ class JPAFieldBlock;
class JPADataBlockLinkInfo {
public:
JPAFieldBlock * getField() { return mpFieldBlock; }
u8 getFieldNum() { return mFieldNum; }
JPADynamicsBlock * getDynamics() { return mpDynamicsBlock; }
JPASweepShape * getSweepShape() { return mpSweepShape; }
u8 getKeyNum() { return mKeyNum; }
JPAKeyBlock * getKey() { return mpKeyBlock; }
JPAExtraShape * getExtraShape() { return mpExtraShape; }
u32 * getTextureDataBase() { return mpTextureDataBase; }
JPAExTexShape * getExTexShape() { return mpExTexShape; }
JPABaseShape * getBaseShape() { return mpBaseShape; }
JPADataBlockLinkInfo() {
dynBlock = NULL;
bspBlock = NULL;
espBlock = NULL;
sspBlock = NULL;
etxBlock = NULL;
keyBlocks = NULL;
fldBlocks = NULL;
texDataBase = NULL;
fldNum = NULL;
mTextureNum = NULL;
keyNum = 0;
}
JPAFieldBlock ** getField() { return fldBlocks; }
u8 getFieldNum() { return fldNum; }
JPADynamicsBlock * getDynamics() { return dynBlock; }
JPASweepShape * getSweepShape() { return sspBlock; }
u8 getKeyNum() { return keyNum; }
JPAKeyBlock ** getKey() { return keyBlocks; }
JPAExtraShape * getExtraShape() { return espBlock; }
u32 * getTextureDataBase() { return texDataBase; }
JPAExTexShape * getExTexShape() { return etxBlock; }
JPABaseShape * getBaseShape() { return bspBlock; }
u8 getTextureNum() { return mTextureNum; }
public:
/* 0x00 */ JPADynamicsBlock * mpDynamicsBlock;
/* 0x04 */ JPABaseShape * mpBaseShape;
/* 0x08 */ JPAExtraShape * mpExtraShape;
/* 0x0C */ JPASweepShape * mpSweepShape;
/* 0x10 */ JPAExTexShape * mpExTexShape;
/* 0x14 */ JPAKeyBlock * mpKeyBlock;
/* 0x18 */ JPAFieldBlock * mpFieldBlock;
/* 0x1C */ u32 * mpTextureDataBase;
/* 0x20 */ u8 mFieldNum;
/* 0x00 */ JPADynamicsBlock * dynBlock;
/* 0x04 */ JPABaseShape * bspBlock;
/* 0x08 */ JPAExtraShape * espBlock;
/* 0x0C */ JPASweepShape * sspBlock;
/* 0x10 */ JPAExTexShape * etxBlock;
/* 0x14 */ JPAKeyBlock ** keyBlocks;
/* 0x18 */ JPAFieldBlock ** fldBlocks;
/* 0x1C */ u32 * texDataBase;
/* 0x20 */ u8 fldNum;
/* 0x21 */ u8 mTextureNum;
/* 0x22 */ u8 mKeyNum;
/* 0x22 */ u8 keyNum;
/* 0x23 */ u8 field_0x23;
};
@@ -0,0 +1,23 @@
#ifndef JPAEMITTERLOADER_H
#define JPAEMITTERLOADER_H
#include "dolphin/gx/GX.h"
class JPADataBlockLinkInfo;
class JPAEmitterResource;
class JPATextureResource;
class JKRHeap;
class JPAEmitterArchiveLoaderDataBase {
public:
static void load(const u8*, JKRHeap*, JPAEmitterResource**, JPATextureResource**);
};
struct JPAEmitterData {
JPAEmitterData() : pLinkInfoArray(NULL) {}
/* 0x00 */ JPADataBlockLinkInfo** pLinkInfoArray;
/* 0x04 */ u16 infoNum;
/* 0x06 */ u16 userIndex;
};
#endif /* JPAEMITTERLOADER_H */
@@ -0,0 +1,48 @@
#ifndef JPARESOURCEMANAGER_H
#define JPARESOURCEMANAGER_H
#include "dolphin/gx/GX.h"
#include "JSystem/JParticle/JPATexture.h"
class JKRHeap;
class JPATexture;
struct JPAEmitterData;
struct ResTIMG;
class JPATextureResource {
public:
JPATextureResource(u32, JKRHeap*);
void registration(JPATexture*);
public:
/* 0x00 */ JPADefaultTexture defaultTex;
/* 0x24 */ u32 registNum;
/* 0x28 */ u32 maxNum;
/* 0x2C */ JPATexture** pTexResArray;
};
class JPAEmitterResource {
public:
JPAEmitterResource(u32, JKRHeap*);
void registration(JPAEmitterData*, u16);
JPAEmitterData * getByUserIndex(u16);
BOOL checkUserIndexDuplication(u16);
public:
/* 0x00 */ u32 registNum;
/* 0x04 */ u32 maxNum;
/* 0x08 */ JPAEmitterData** pEmtrResArray;
};
class JPAResourceManager {
public:
JPAResourceManager(const void*, JKRHeap*);
const ResTIMG* swapTexture(const ResTIMG*, const char*);
public:
/* 0x00 */ JKRHeap * pHeap;
/* 0x04 */ JPAEmitterResource * pEmtrRes;
/* 0x08 */ JPATextureResource * pTexRes;
};
#endif /* JPARESOURCEMANAGER_H */
+1
View File
@@ -37,6 +37,7 @@ public:
};
struct JPADefaultTexture {
JPADefaultTexture() : imgBuf(NULL) {}
void initialize(JKRHeap *);
u8 * imgBuf;
GXTexObj mTexObj;