mirror of
https://github.com/zeldaret/ss
synced 2026-07-11 06:45:20 -04:00
LightTexture close
This commit is contained in:
@@ -27,13 +27,13 @@ class LightManager : public IBinary<LightManager> {
|
||||
};
|
||||
};
|
||||
|
||||
public:
|
||||
struct AmbientObject {
|
||||
/* 0x00 */ nw4r::g3d::AmbLightObj mLightObj;
|
||||
/* 0x04 */ const char *mLightName;
|
||||
/* 0x08 */ u8 field_0x08;
|
||||
};
|
||||
|
||||
public:
|
||||
struct BinAmbient {
|
||||
/* 0x00 */ u8 field_0x00;
|
||||
/* 0x01 */ u8 field_0x01;
|
||||
@@ -93,6 +93,10 @@ public:
|
||||
return &mpLightData[i].mLightObject;
|
||||
}
|
||||
|
||||
const AmbientObject *GetAmbientObject(int i) const {
|
||||
return &mpAmbientObjects[i];
|
||||
}
|
||||
|
||||
/* 0x04 */ Counts mCounts;
|
||||
/* 0x06 */ Counts mSavedCounts;
|
||||
/* 0x08 */ LightData *mpLightData;
|
||||
|
||||
@@ -56,6 +56,7 @@ public:
|
||||
static void initDrawSetting(u16, u16, u16, u16);
|
||||
void addLight(const EGG::LightObject&);
|
||||
|
||||
void fn_804AC0E0(int, const GXColor&, bool);
|
||||
void draw(int);
|
||||
void beginDebugDraw();
|
||||
void debugDraw(int);
|
||||
@@ -72,6 +73,11 @@ public:
|
||||
private:
|
||||
|
||||
static void fn_804AB270();
|
||||
static void fn_804AB310(const GXColor &color);
|
||||
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);
|
||||
|
||||
@@ -118,6 +124,9 @@ private:
|
||||
static u16 sDrawNumX;
|
||||
static u16 sDrawNumY;
|
||||
static CpuTexture *spNormalEnvironment;
|
||||
|
||||
// unsure
|
||||
static bool sUseDebug;
|
||||
};
|
||||
|
||||
} // namespace EGG
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#ifndef EGG_LIGHT_TEXTURE_MGR_H
|
||||
#define EGG_LIGHT_TEXTURE_MGR_H
|
||||
|
||||
#include "common.h"
|
||||
#include "egg/gfx/eggLightTexture.h"
|
||||
#include "egg/gfx/eggLightManager.h"
|
||||
#include "egg/prim/eggBinary.h"
|
||||
#include "nw4r/g3d/res/g3d_resmdl.h"
|
||||
|
||||
@@ -45,7 +47,32 @@ public:
|
||||
return mTextureCount;
|
||||
}
|
||||
|
||||
LightTexture *getTextureByName(const char *name) const {
|
||||
int idx = getTextureIndex(name);
|
||||
if (idx != -1) {
|
||||
return mpTextures[idx];
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
const nw4r::g3d::AmbLightObj &GetAmbientObj(int idx) const {
|
||||
return mpLightMgr->GetAmbientObject(idx)->mLightObj;
|
||||
}
|
||||
|
||||
const LightObject *GetLightObject(u16 i) const {
|
||||
return mpObjects[i];
|
||||
}
|
||||
|
||||
LightObject *GetLightObject(u16 i) {
|
||||
return mpObjects[i];
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
|
||||
int getTextureIndex(const char *name) const;
|
||||
|
||||
/* 0x04 */ u8 field_0x04;
|
||||
/* 0x06 */ u16 mTextureCount;
|
||||
/* 0x08 */ LightTexture **mpTextures;
|
||||
|
||||
Reference in New Issue
Block a user