diff options
| author | robojumper <robojumper@gmail.com> | 2025-03-28 18:42:09 +0100 |
|---|---|---|
| committer | robojumper <robojumper@gmail.com> | 2025-03-28 18:42:09 +0100 |
| commit | d35c4adeeffc0629f705518aedd9e8d4b4570364 (patch) | |
| tree | d005df9c3ec37e9bdb48824efc880b830a0a4c1b /include/egg | |
| parent | 0766801142a25efcad59e98b77bca43b1c02bae0 (diff) | |
Running out of ideas for G3DUtility
Diffstat (limited to 'include/egg')
| -rw-r--r-- | include/egg/gfx/eggG3DUtility.h | 37 | ||||
| -rw-r--r-- | include/egg/gfx/eggLightTextureMgr.h | 4 |
2 files changed, 30 insertions, 11 deletions
diff --git a/include/egg/gfx/eggG3DUtility.h b/include/egg/gfx/eggG3DUtility.h index 7ad5a736..df570020 100644 --- a/include/egg/gfx/eggG3DUtility.h +++ b/include/egg/gfx/eggG3DUtility.h @@ -1,6 +1,7 @@ #ifndef EGG_G3D_UTILITY_H #define EGG_G3D_UTILITY_H +#include "egg/egg_types.h" #include "nw4r/g3d/g3d_scnmdl.h" #include "nw4r/g3d/res/g3d_resmat.h" #include "nw4r/math/math_types.h" @@ -20,23 +21,41 @@ public: /* 0x03 */ s8 texCoordId; }; - static u32 SetTexture( - nw4r::g3d::ResMat resMat, nw4r::g3d::ScnMdl::CopiedMatAccess *param_2, const char *name, GXTexObj *texObj, - bool copy, SetTextureResult *pResult, int param_7, int param_8 + struct SearchResult { + /* 0x00 */ u16 nodeIdx; + /* 0x04 */ const char *name; + }; + + static u16 SetTexture( + nw4r::g3d::ResMat resMat, nw4r::g3d::ScnMdl::CopiedMatAccess *param_2, const char *name, const GXTexObj *texObj, + bool copy, SetTextureResult *pResult, int maxNumResults, int param_8 ); - static void setUpLightSet(nw4r::g3d::LightSetting &, nw4r::g3d::ResAnmScn, int); + static int ApplyLightMat(nw4r::g3d::ResMdl mdl, const char *prefix); + + static bool setUpLightSet(nw4r::g3d::LightSetting &, nw4r::g3d::ResAnmScn, int); - static nw4r::math::MTX34 *GetWorldMtxArray(int, int); + static void *BumpAlloc(u32 size, u32 align); + static void ResetBumpAlloc() { + sOffset = 0; + } + + static void create(u32 size, Heap *pHeap); - static int searchStringResNode(nw4r::g3d::ResMdl, const char *, u16 *, u32); - static int searchStringResMat(nw4r::g3d::ResMdl, const char *, u16 *, u32); - static int searchStringResTexPlttInfo(nw4r::g3d::ResMdl, const char *, u16 *, u32); + static int searchStringResNode(nw4r::g3d::ResMdl mdl, const char * name, bool exactMatch, SearchResult *pResults, int maxNumResults); + static int searchStringResMat(nw4r::g3d::ResMdl mdl, const char * name, bool exactMatch, SearchResult *pResults, int maxNumResults); + static int searchStringResTexPlttInfo(nw4r::g3d::ResMdl mdl, const char * name, bool exactMatch, SearchResult *pResults, int maxNumResults); - typedef int (*MdlSearch)(nw4r::g3d::ResMdl, const char *, u16 *, u32); + typedef int (*MdlSearch)(nw4r::g3d::ResMdl mdl, const char * name, bool exactMatch, SearchResult *pResults, int maxNumResults); private: + static void defaultTexMtxFunc(nw4r::math::MTX34 *pMtx, s8 camRef, s8 lightRef); + static MEMAllocator *sAllocator; + static void *sBuf; + static u32 sSize; + static u32 sOffset; + static u8 sId; }; } // namespace EGG diff --git a/include/egg/gfx/eggLightTextureMgr.h b/include/egg/gfx/eggLightTextureMgr.h index 86400aa1..c12fc011 100644 --- a/include/egg/gfx/eggLightTextureMgr.h +++ b/include/egg/gfx/eggLightTextureMgr.h @@ -30,8 +30,8 @@ public: bool setBinaryToTexture(const void *data); bool deleteTexture(int idx); - int replaceModelTextures(nw4r::g3d::ResMdl) const; - int replaceModelTexture(int, nw4r::g3d::ResMdl) const; + u16 replaceModelTextures(nw4r::g3d::ResMdl) const; + u16 replaceModelTexture(int, nw4r::g3d::ResMdl) const; void drawAndCaptureTexture(f32, f32, f32, f32); void frameReset(); void correctLightObject(); |
