mirror of
https://github.com/zeldaret/ss
synced 2026-09-02 17:53:15 -04:00
LightTextureManager OK
This commit is contained in:
@@ -13,12 +13,18 @@ public:
|
||||
return sAllocator;
|
||||
}
|
||||
|
||||
static u16 SetTexture(
|
||||
nw4r::g3d::ResMat resMat, nw4r::g3d::ScnMdl::CopiedMatAccess param_2, char *name, GXTexObj *texObj, bool copy,
|
||||
void *param_6, int param_7, int param_8
|
||||
struct SetTextureResult {
|
||||
/* 0x00 */ u8 _0x00[2];
|
||||
/* 0x02 */ s8 texMapId;
|
||||
/* 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
|
||||
);
|
||||
|
||||
static void setUpLightSet(nw4r::g3d::LightSetting&, nw4r::g3d::ResAnmScn, int);
|
||||
static void setUpLightSet(nw4r::g3d::LightSetting &, nw4r::g3d::ResAnmScn, int);
|
||||
|
||||
private:
|
||||
static MEMAllocator *sAllocator;
|
||||
|
||||
@@ -85,11 +85,11 @@ public:
|
||||
return num < 8 ? num : 8;
|
||||
}
|
||||
|
||||
const LightObject *GetLightObject(int i) const {
|
||||
const LightObject *GetLightObject(u16 i) const {
|
||||
return &mpLightData[i].mLightObject;
|
||||
}
|
||||
|
||||
LightObject *GetLightObject(int i) {
|
||||
LightObject *GetLightObject(u16 i) {
|
||||
return &mpLightData[i].mLightObject;
|
||||
}
|
||||
|
||||
@@ -97,6 +97,15 @@ public:
|
||||
return &mpAmbientObjects[i];
|
||||
}
|
||||
|
||||
u8 GetNumLightData() const {
|
||||
return mCounts.mNumEggLightObjects;
|
||||
}
|
||||
|
||||
u8 GetField0x1D() const {
|
||||
return field_0x1D;
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x04 */ Counts mCounts;
|
||||
/* 0x06 */ Counts mSavedCounts;
|
||||
/* 0x08 */ LightData *mpLightData;
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
|
||||
void fn_804AC0E0(int, const GXColor&, bool);
|
||||
void draw(int);
|
||||
void beginDebugDraw();
|
||||
static void beginDebugDraw();
|
||||
void debugDraw(int);
|
||||
|
||||
const char *getName() const {
|
||||
@@ -69,6 +69,7 @@ public:
|
||||
return mpFloatData[idx];
|
||||
}
|
||||
|
||||
static void getTexDimensions(u16*, u16*, u16*, u16*, u16);
|
||||
|
||||
private:
|
||||
|
||||
@@ -77,7 +78,6 @@ private:
|
||||
static void fn_804AB440();
|
||||
static void fn_804AB600();
|
||||
|
||||
static void getTexDimensions(u16*, u16*, u16*, u16*, u16);
|
||||
static void fn_804AC0A0(int, int*, int*);
|
||||
static void loadTextureData(int index, void *data, GXTexFmt fmt);
|
||||
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
#define EGG_LIGHT_TEXTURE_MGR_H
|
||||
|
||||
#include "common.h"
|
||||
#include "egg/gfx/eggLightTexture.h"
|
||||
#include "egg/gfx/eggLightManager.h"
|
||||
#include "egg/gfx/eggLightTexture.h"
|
||||
#include "egg/prim/eggBinary.h"
|
||||
#include "nw4r/g3d/res/g3d_resmat.h"
|
||||
#include "nw4r/g3d/res/g3d_resmdl.h"
|
||||
|
||||
namespace EGG {
|
||||
@@ -30,9 +31,10 @@ public:
|
||||
bool deleteTexture(int idx);
|
||||
|
||||
int replaceModelTextures(nw4r::g3d::ResMdl) const;
|
||||
int replaceModelTexture(u16, nw4r::g3d::ResMdl) const;
|
||||
int replaceModelTexture(int, nw4r::g3d::ResMdl) const;
|
||||
void drawAndCaptureTexture(f32, f32, f32, f32);
|
||||
void frameReset();
|
||||
void correctLightObject();
|
||||
|
||||
// Inofficial
|
||||
static const void *getLtexFromLmap(const void *lmap, u16 index);
|
||||
@@ -64,23 +66,26 @@ public:
|
||||
return mpObjects[i];
|
||||
}
|
||||
|
||||
LightObject *GetLightObject(u16 i) {
|
||||
const LightObject *GetLightObject(u16 i) {
|
||||
return mpObjects[i];
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
|
||||
static void fn_804AE340(nw4r::g3d::ResMat, GXTexCoordID);
|
||||
int getTextureIndex(const char *name) const;
|
||||
|
||||
/* 0x04 */ u8 field_0x04;
|
||||
bool getSomeTfRelatedBool() const {
|
||||
return (mFlags >> 5) & 1;
|
||||
}
|
||||
|
||||
/* 0x04 */ u8 mFlags;
|
||||
/* 0x06 */ u16 mTextureCount;
|
||||
/* 0x08 */ LightTexture **mpTextures;
|
||||
/* 0x0C */ const LightManager *mpLightMgr;
|
||||
/* 0x10 */ u32 field_0x10;
|
||||
/* 0x14 */ u16 mMaxNumTextures;
|
||||
/* 0x16 */ u8 field_0x16;
|
||||
/* 0x18 */ LightObject **mpObjects;
|
||||
/* 0x18 */ const LightObject **mpObjects;
|
||||
};
|
||||
|
||||
} // namespace EGG
|
||||
|
||||
Reference in New Issue
Block a user