More symbols from NSMBW

This commit is contained in:
robojumper
2026-01-18 12:27:37 +01:00
parent df5bd1a7b5
commit 679541bee2
13 changed files with 84 additions and 81 deletions
+10 -10
View File
@@ -17719,7 +17719,7 @@ __dt__Q24mDvd41TUncompressInfo_c<Q23EGG14StreamDecompLZ>Fv = .text:0x802EEBE0; /
__dt__Q24mDvd41TUncompressInfo_c<Q23EGG14StreamDecompLH>Fv = .text:0x802EEC20; // type:function size:0x40 scope:weak
__dt__Q24mDvd42TUncompressInfo_c<Q23EGG15StreamDecompLRC>Fv = .text:0x802EEC60; // type:function size:0x40 scope:weak
__dt__Q24mDvd41TUncompressInfo_c<Q23EGG14StreamDecompRL>Fv = .text:0x802EECA0; // type:function size:0x40 scope:weak
unk_setDecompressorPtrs__4mDvdFPPQ24mDvd22TUncompressInfo_Base_cPPQ24mDvd22TUncompressInfo_Base_c = .text:0x802EECE0; // type:function size:0xC scope:local
unk_setDecompressorPtrs__4mDvdFPPQ24mDvd16UncompressInfo_cPPQ24mDvd16UncompressInfo_c = .text:0x802EECE0; // type:function size:0xC scope:local
unk_initDecompressors__4mDvdFv = .text:0x802EECF0; // type:function size:0x40
findUncompressInfo__4mDvdFUc = .text:0x802EED30; // type:function size:0x3C scope:local
newUncompressObj__4mDvdFUc = .text:0x802EED70; // type:function size:0x40 scope:local
@@ -26493,12 +26493,12 @@ FUN_804a2960 = .text:0x804A2960; // type:function size:0x28
__ct__Q23EGG11DrawPathDOFFv = .text:0x804A29C0; // type:function size:0x164
__dt__Q23EGG11DrawPathDOFFv = .text:0x804A2B30; // type:function size:0x104
__dt__Q23EGG17PostEffectMaskDOFFv = .text:0x804A2C40; // type:function size:0x40
execute__Q23EGG11DrawPathDOFFv = .text:0x804A2C80; // type:function size:0x9C
updateShimmer__Q23EGG11DrawPathDOFFv = .text:0x804A2C80; // type:function size:0x9C
internalResetForDraw__Q23EGG11DrawPathDOFFv = .text:0x804A2D20; // type:function size:0x324
internalDraw__Q23EGG11DrawPathDOFFUs = .text:0x804A3050; // type:function size:0xCC
internalDrawStandard__Q23EGG11DrawPathDOFFUs = .text:0x804A3120; // type:function size:0x9A4
internalDrawLite__Q23EGG11DrawPathDOFFUs = .text:0x804A3AD0; // type:function size:0x648
FUN_804a4120 = .text:0x804A4120; // type:function size:0x224
setTevShimmer__Q23EGG11DrawPathDOFFv = .text:0x804A4120; // type:function size:0x224
FUN_804a4350 = .text:0x804A4350; // type:function size:0xDC
SetBinaryInner__Q23EGG11DrawPathDOFFRCQ33EGG28IBinary<Q23EGG11DrawPathDOF>3Bin = .text:0x804A4430; // type:function size:0x238
GetBinaryInner__Q23EGG11DrawPathDOFCFPQ33EGG28IBinary<Q23EGG11DrawPathDOF>3Bin = .text:0x804A4670; // type:function size:0xD8
@@ -26608,7 +26608,7 @@ __ct__Q23EGG11LightObjectFv = .text:0x804A9830; // type:function size:0xB8
Reset__Q23EGG11LightObjectFv = .text:0x804A98F0; // type:function size:0x110
Calc__Q23EGG11LightObjectFv = .text:0x804A9A00; // type:function size:0x3C
CalcView__Q23EGG11LightObjectFRCQ34nw4r4math5MTX34 = .text:0x804A9A40; // type:function size:0x1E8
fn_804A9C30__Q23EGG11LightObjectCFPCQ23EGG12LightTexturePQ34nw4r4math4VEC3P8_GXColor = .text:0x804A9C30; // type:function size:0x104
CalcFinalDirColor__Q23EGG11LightObjectCFRCQ23EGG12LightTexturePQ34nw4r4math4VEC3P8_GXColor = .text:0x804A9C30; // type:function size:0x104
InitGX__Q23EGG11LightObjectCFP11_GXLightObj = .text:0x804A9D40; // type:function size:0x200
CopyToG3D_World__Q23EGG11LightObjectCFRQ34nw4r3g3d8LightObj = .text:0x804A9F40; // type:function size:0x150
CopyToG3D_View__Q23EGG11LightObjectCFRQ34nw4r3g3d8LightObjRCQ34nw4r4math5MTX34 = .text:0x804AA090; // type:function size:0x144
@@ -26638,7 +26638,7 @@ configure__Q23EGG12LightTextureFv = .text:0x804ABD10; // type:function size:0x6C
loadTextureData__Q23EGG12LightTextureFiPv9_GXTexFmt = .text:0x804ABD80; // type:function size:0x10C
loadTextureFromResTimg__Q23EGG12LightTextureFiPQ23EGG7ResTIMG = .text:0x804ABE90; // type:function size:0xC
initDrawSetting__Q23EGG12LightTextureFUsUsUsUs = .text:0x804ABEA0; // type:function size:0x1A4
getTexDimensions__Q23EGG12LightTextureFPUsPUsPUsPUsUs = .text:0x804AC050; // type:function size:0x4C
getRequiredPosAndSize__Q23EGG12LightTextureFPUsPUsPUsPUsUs = .text:0x804AC050; // type:function size:0x4C
fn_804AC0A0__Q23EGG12LightTextureFiPiPi = .text:0x804AC0A0; // type:function size:0x34
fn_804AC0E0__Q23EGG12LightTextureFiRC8_GXColorb = .text:0x804AC0E0; // type:function size:0x490
draw__Q23EGG12LightTextureFi = .text:0x804AC570; // type:function size:0x3E8
@@ -26751,9 +26751,9 @@ GetBinarySize__Q23EGG33IBinary<Q23EGG16ScreenEffectBlur>CFv = .text:0x804B3D50;
Clean__Q23EGG8StateEfbFv = .text:0x804B3DA0; // type:function size:0x78
captureEfb__Q23EGG8StateEfbFQ33EGG8StateEfb10BufferTypebUl = .text:0x804B3E20; // type:function size:0x3C8
releaseEfb__Q23EGG8StateEfbFQ33EGG8StateEfb10BufferTypeUl = .text:0x804B41F0; // type:function size:0x7C
fn_804B4270__Q23EGG8StateEfbFQ33EGG8StateEfb10BufferTypeUl = .text:0x804B4270; // type:function size:0x98
pushWorkBuffer__Q23EGG8StateEfbFQ33EGG8StateEfb10WorkBufferUl = .text:0x804B4270; // type:function size:0x98
popWorkBuffer__Q23EGG8StateEfbFbUl = .text:0x804B4310; // type:function size:0x23C
fn_804B4550__Q23EGG8StateEfbFv = .text:0x804B4550; // type:function size:0xA0
shiftWorkSpaceViewportGX__Q23EGG8StateEfbFv = .text:0x804B4550; // type:function size:0xA0
isEnableDirtyBufferMode__Q23EGG8StateEfbFv = .text:0x804B45F0; // type:function size:0xC
GetUseTfRgb565__Q23EGG8StateEfbFv = .text:0x804B4600; // type:function size:0xC
texRegionCallback__24@unnamed@eggStateGX_cpp@FPC9_GXTexObj11_GXTexMapID = .text:0x804B4610; // type:function size:0x28 scope:local
@@ -42563,8 +42563,8 @@ lbl_80575BF8 = .sbss:0x80575BF8; // type:object size:0x4 data:4byte
Zero__7mAng3_c = .sbss:0x80575C08; // type:object size:0x6 data:2byte
somePtr__4mDvd = .sbss:0x80575C10; // type:object size:0x4 data:4byte
someNumber__4mDvd = .sbss:0x80575C14; // type:object size:0x4 data:4byte
compressors_ptr__4mDvd = .sbss:0x80575C18; // type:object size:0x4 data:4byte
compressors_last__4mDvd = .sbss:0x80575C1C; // type:object size:0x4 data:4byte
s_UncompressInfoTable_begin__4mDvd = .sbss:0x80575C18; // type:object size:0x4 data:4byte
s_UncompressInfoTable_end__4mDvd = .sbss:0x80575C1C; // type:object size:0x4 data:4byte
l_OSThread__4mDvd = .sbss:0x80575C20; // type:object size:0x4 data:4byte
l_MyThread__4mDvd = .sbss:0x80575C24; // type:object size:0x4 data:4byte
l_CommandHeap__4mDvd = .sbss:0x80575C28; // type:object size:0x4 data:4byte
@@ -50632,7 +50632,7 @@ lbl_8057F488 = .sdata2:0x8057F488; // type:object size:0x4 align:4 data:float
@LOCAL@SetVtxState__Q23EGG6DrawGXFQ33EGG6DrawGX7VtxType@QUAD_NRM@5 = .sdata2:0x8057F4E0; // type:object size:0x6 align:32
@LOCAL@SetVtxState__Q23EGG6DrawGXFQ33EGG6DrawGX7VtxType@SCREEN_VTX@6 = .sdata2:0x8057F500; // type:object size:0x8 align:32
@LOCAL@SetVtxState__Q23EGG6DrawGXFQ33EGG6DrawGX7VtxType@SCREEN_VTX_LU@7 = .sdata2:0x8057F520; // type:object size:0x8 align:32
lbl_8057F528 = .sdata2:0x8057F528; // type:object size:0x4
@LOCAL@CreateDisplayList__Q23EGG6DrawGXFPQ23EGG4Heap@POS_NUM = .sdata2:0x8057F528; // type:object size:0x4
lbl_8057F52C = .sdata2:0x8057F52C; // type:object size:0x4 align:4 data:float
lbl_8057F530 = .sdata2:0x8057F530; // type:object size:0x4 align:4 data:float
lbl_8057F534 = .sdata2:0x8057F534; // type:object size:0x4 align:4 data:float
+1 -1
View File
@@ -27,7 +27,7 @@ public:
virtual void SetBinaryInner(const Bin &, const Bin &, f32) override;
void execute();
void updateShimmer();
private:
void internalDrawStandard(u16);
+1 -1
View File
@@ -45,7 +45,7 @@ public:
void Calc();
void CalcView(nw4r::math::MTX34 const &);
void fn_804A9C30(const LightTexture *, nw4r::math::VEC3 *, GXColor *) const;
void CalcFinalDirColor(const LightTexture &, nw4r::math::VEC3 *, GXColor *) const;
void InitGX(GXLightObj *obj) const;
void CopyToG3D_World(nw4r::g3d::LightObj &) const;
+1 -1
View File
@@ -89,7 +89,7 @@ public:
mpByteData2[idx] = val;
}
static void getTexDimensions(u16 *, u16 *, u16 *, u16 *, u16);
static void getRequiredPosAndSize(u16 *, u16 *, u16 *, u16 *, u16);
private:
static void fn_804AC0A0(int, int *, int *);
+13 -10
View File
@@ -9,12 +9,17 @@ namespace EGG {
class StateEfb {
public:
enum BufferType {
BUFFER_0,
BUFFER_1,
BUFFER_2,
BUFFER_3,
BUFFER_TYPE_0,
BUFFER_TYPE_1,
BUFFER_TYPE_2,
BUFFER_TYPE_3,
BUFFER_MAX,
BUFFER_TYPE_MAX,
};
enum WorkBuffer {
WORK_BUFFER_0,
WORK_BUFFER_1,
};
struct Buffer {
@@ -24,7 +29,7 @@ public:
};
private:
static Buffer spBufferSet[BUFFER_MAX];
static Buffer spBufferSet[BUFFER_TYPE_MAX];
static f32 sWorkSpaceV[6];
static f32 sWorkSpaceHideV[6];
static f32 sShiftViewPort[6]; // unk name
@@ -43,11 +48,9 @@ public:
static void Clean();
static TextureBuffer *captureEfb(BufferType type, bool, u32 userData);
static bool releaseEfb(BufferType type, u32 userData);
// Unknown names
static void fn_804B4270(BufferType type, u32 userData);
static void pushWorkBuffer(WorkBuffer work, u32 userData);
static void popWorkBuffer(bool b, u32 userData);
static f32 *fn_804B4550();
static f32 *shiftWorkSpaceViewportGX();
};
} // namespace EGG
+5 -5
View File
@@ -15,10 +15,10 @@ namespace mDvd {
extern void *somePtr;
class TUncompressInfo_Base_c {
class UncompressInfo_c {
public:
TUncompressInfo_Base_c(u8 type, const char *extension) : mType(type), mExtension(extension) {}
virtual ~TUncompressInfo_Base_c() {}
UncompressInfo_c(u8 type, const char *extension) : mType(type), mExtension(extension) {}
virtual ~UncompressInfo_c() {}
virtual EGG::StreamDecomp *Construct() const {
return nullptr;
}
@@ -29,9 +29,9 @@ public:
};
template <typename T>
class TUncompressInfo_c : public TUncompressInfo_Base_c {
class TUncompressInfo_c : public UncompressInfo_c {
public:
TUncompressInfo_c(u8 type, const char *extension) : TUncompressInfo_Base_c(type, extension) {}
TUncompressInfo_c(u8 type, const char *extension) : UncompressInfo_c(type, extension) {}
virtual T *Construct() const {
return new (somePtr) T();
}
+9 -9
View File
@@ -523,9 +523,9 @@ void DrawGX::SetVtxState(EGG::DrawGX::VtxType type) {
}
}
const u8 sDetailLevels[] = {0x10, 0x20};
void DrawGX::CreateDisplayList(EGG::Heap *pHeap) {
static const u8 POS_NUM[] = {0x10, 0x20};
u8 ALIGN_DECL(32) tmpDisplayList[16 * 1024];
OSInitFastCast();
@@ -567,7 +567,7 @@ void DrawGX::CreateDisplayList(EGG::Heap *pHeap) {
case DL_4: GXDrawSphere(8, 16); break;
case DL_5:
case DL_6: {
u16 numSegments = sDetailLevels[i - DL_5] + 1;
u16 numSegments = POS_NUM[i - DL_5] + 1;
f32 radPerSegment = 2.0f * M_PI / (numSegments - 1);
GXBegin(GX_LINESTRIP, GX_VTXFMT0, numSegments);
for (int i = 0; i < numSegments; i++) {
@@ -579,7 +579,7 @@ void DrawGX::CreateDisplayList(EGG::Heap *pHeap) {
}
case DL_9:
case DL_10: {
u16 numSegments = sDetailLevels[i - DL_9] + 1;
u16 numSegments = POS_NUM[i - DL_9] + 1;
f32 radPerSegment = 2.0f * M_PI / (numSegments - 1);
GXBegin(GX_TRIANGLESTRIP, GX_VTXFMT0, numSegments * 2);
for (int i = 0; i < numSegments; i++) {
@@ -592,21 +592,21 @@ void DrawGX::CreateDisplayList(EGG::Heap *pHeap) {
}
nw4r::math::MTX34 mtx;
PSMTXTrans(mtx, 0.0f, 0.5f, 0.0f);
DrawCircleYPolygonFan(mtx, 0.0f, sDetailLevels[i - DL_9]);
DrawCircleYPolygonFan(mtx, 0.0f, POS_NUM[i - DL_9]);
PSMTXIdentity(mtx);
PSMTXRotRad(mtx, M_PI, 0x7A);
PSMTXTransApply(mtx, mtx, 0.0f, -0.5f, 0.0f);
DrawCircleYPolygonFan(mtx, 0.0f, sDetailLevels[i - DL_9]);
DrawCircleYPolygonFan(mtx, 0.0f, POS_NUM[i - DL_9]);
break;
}
case DL_11:
case DL_12: {
nw4r::math::MTX34 mtx;
PSMTXIdentity(mtx);
DrawCircleYPolygonFan(mtx, 1.0f, sDetailLevels[i - DL_11]);
DrawCircleYPolygonFan(mtx, 1.0f, POS_NUM[i - DL_11]);
PSMTXRotRad(mtx, M_PI, 0x7A);
DrawCircleYPolygonFan(mtx, 0.0f, sDetailLevels[i - DL_11]);
DrawCircleYPolygonFan(mtx, 0.0f, POS_NUM[i - DL_11]);
break;
}
case DL_7:
@@ -614,7 +614,7 @@ void DrawGX::CreateDisplayList(EGG::Heap *pHeap) {
nw4r::math::MTX34 mtx;
PSMTXIdentity(mtx);
PSMTXRotRad(mtx, M_PI / 2.0f, 0x78);
DrawCircleYPolygonFan(mtx, 0.0f, sDetailLevels[i - DL_7]);
DrawCircleYPolygonFan(mtx, 0.0f, POS_NUM[i - DL_7]);
break;
}
+7 -7
View File
@@ -61,7 +61,7 @@ DrawPathDOF::~DrawPathDOF() {
mpMask = nullptr;
}
void DrawPathDOF::execute() {
void DrawPathDOF::updateShimmer() {
field_0x5C += field_0x6C * field_0x7C;
field_0x60 += field_0x70 * field_0x7C;
@@ -115,8 +115,8 @@ void DrawPathDOF::internalResetForDraw() {
void DrawPathDOF::internalDraw(u16 idx) {
if (idx == 0) {
if (StateEfb::CheckFlag0x2() == 0) {
StateEfb::fn_804B4270(
static_cast<StateEfb::BufferType>((field_0x1C >> 2) & 1), reinterpret_cast<u32>(this)
StateEfb::pushWorkBuffer(
static_cast<StateEfb::WorkBuffer>((field_0x1C >> 2) & 1), reinterpret_cast<u32>(this)
);
}
StateGX::invalidateTexAllGX();
@@ -130,8 +130,8 @@ void DrawPathDOF::internalDraw(u16 idx) {
switch (idx) {
case 1:
StateEfb::popWorkBuffer(StateEfb::BUFFER_0, reinterpret_cast<u32>(this));
StateEfb::releaseEfb(StateEfb::BUFFER_3, reinterpret_cast<u32>(this));
StateEfb::popWorkBuffer(false, reinterpret_cast<u32>(this));
StateEfb::releaseEfb(StateEfb::BUFFER_TYPE_3, reinterpret_cast<u32>(this));
break;
case 2:
if (mpTextureBuffer != nullptr) {
@@ -148,13 +148,13 @@ void DrawPathDOF::internalDrawLite(u16 idx) {
const Screen::DataEfb &efb = screen.GetDataEfb();
switch (idx) {
case 0: {
TextureBuffer *capturedBuf = StateEfb::captureEfb(StateEfb::BUFFER_3, false, reinterpret_cast<u32>(this));
TextureBuffer *capturedBuf = StateEfb::captureEfb(StateEfb::BUFFER_TYPE_3, false, reinterpret_cast<u32>(this));
StateGX::setPixelFormatGX(GX_PF_RGB8_Z24, GX_ZC_LINEAR);
StateGX::ScopedColor colorGuard(true);
StateGX::ScopedAlpha alphaGuard(false);
StateGX::ScopedDither ditherGuard(false);
PostEffectBase::setProjection(screen);
f32 *floats = StateEfb::fn_804B4550();
f32 *floats = StateEfb::shiftWorkSpaceViewportGX();
f32 scale = (field_0x1C & 4) != 0 ? 0.25f : 0.5f;
f32 width1 = screen.GetWidth() * scale;
f32 height1 = screen.GetHeight() * scale;
+2 -2
View File
@@ -130,10 +130,10 @@ void LightObject::CalcView(nw4r::math::MTX34 const &viewMtx) {
}
}
void LightObject::fn_804A9C30(const LightTexture *tex, nw4r::math::VEC3 *pVec, GXColor *color) const {
void LightObject::CalcFinalDirColor(const LightTexture &tex, nw4r::math::VEC3 *pVec, GXColor *color) const {
*pVec = field_0x94;
*color = mLightColor;
f32 f = tex->getFloat(mIndex);
f32 f = tex.getFloat(mIndex);
if (f < 1.0f) {
color->r = color->r * f;
color->g = color->g * f;
+2 -2
View File
@@ -308,7 +308,7 @@ void LightTexture::initDrawSetting(u16 u1, u16 u2, u16 u3, u16 u4) {
GXSetTevSwapModeTable(GX_TEV_SWAP0, GX_CH_RED, GX_CH_GREEN, GX_CH_BLUE, GX_CH_ALPHA);
}
void LightTexture::getTexDimensions(u16 *x, u16 *y, u16 *w, u16 *h, u16 count) {
void LightTexture::getRequiredPosAndSize(u16 *x, u16 *y, u16 *w, u16 *h, u16 count) {
*x = sDrawPosX;
*y = sDrawPosY;
@@ -550,7 +550,7 @@ void LightTexture::addLight(const EGG::LightObject &obj) {
nw4r::math::VEC3 vec;
GXColor color;
obj.fn_804A9C30(this, &vec, &color);
obj.CalcFinalDirColor(*this, &vec, &color);
int remainder = field_0x9F % field_0x9D;
if (field_0x9F == field_0x9D) {
GXSetBlendMode(GX_BM_BLEND, GX_BL_ONE, GX_BL_ONE, GX_LO_CLEAR);
+1 -1
View File
@@ -204,7 +204,7 @@ void LightTextureManager::drawAndCaptureTexture(f32 ox, f32 oy, f32 sx, f32 sy)
u16 x1, y1, x2, y2;
TextureBuffer *buf = nullptr;
LightTexture::getTexDimensions(&x1, &y1, &x2, &y2, mTextureCount);
LightTexture::getRequiredPosAndSize(&x1, &y1, &x2, &y2, mTextureCount);
x2 += x2 & 3;
y2 += y2 & 3;
+19 -19
View File
@@ -12,7 +12,7 @@
namespace EGG {
StateEfb::Buffer StateEfb::spBufferSet[BUFFER_MAX];
StateEfb::Buffer StateEfb::spBufferSet[BUFFER_TYPE_MAX];
f32 StateEfb::sWorkSpaceV[6];
f32 StateEfb::sWorkSpaceHideV[6];
f32 StateEfb::sShiftViewPort[6];
@@ -49,9 +49,9 @@ TextureBuffer *StateEfb::captureEfb(BufferType type, bool noTransparencyMaybe, u
bool doCapture = true;
switch (type) {
case BUFFER_0:
case BUFFER_1: {
f32 arg = type == BUFFER_0 ? 0.25f : 0.5f;
case BUFFER_TYPE_0:
case BUFFER_TYPE_1: {
f32 arg = type == BUFFER_TYPE_0 ? 0.25f : 0.5f;
sWorkSpaceV[2] = efb.vp.x2 * arg;
sWorkSpaceV[3] = efb.vp.y2 * arg;
@@ -92,11 +92,11 @@ TextureBuffer *StateEfb::captureEfb(BufferType type, bool noTransparencyMaybe, u
break;
}
case BUFFER_2:
case BUFFER_TYPE_2:
spBufferSet[type].buf = TextureBuffer::alloc(efb.vp.x2, efb.vp.y2, GX_TF_RGBA8);
spBufferSet[type].buf->setPixModeSync(false);
break;
case BUFFER_3:
case BUFFER_TYPE_3:
spBufferSet[type].buf = TextureBuffer::alloc(
efb.vp.x2 / 2.0f, efb.vp.y2 / 2.0f, GetUseTfRgb565() ? GX_TF_RGB565 : GX_TF_RGBA8
);
@@ -138,16 +138,16 @@ bool StateEfb::releaseEfb(BufferType type, u32 userData) {
}
}
void StateEfb::fn_804B4270(BufferType type, u32 userData) {
if (type == BUFFER_0) {
if (sWorkBuffer == 1) {
StateEfb::releaseEfb(BUFFER_0, spBufferSet[0].userData);
void StateEfb::pushWorkBuffer(WorkBuffer buffer, u32 userData) {
if (buffer == WORK_BUFFER_0) {
if (sWorkBuffer == WORK_BUFFER_1) {
StateEfb::releaseEfb(BUFFER_TYPE_0, spBufferSet[BUFFER_TYPE_0].userData);
}
captureEfb(BUFFER_1, false, userData);
sWorkBuffer = 0;
} else if (type == BUFFER_1 && sWorkBuffer != 0) {
captureEfb(BUFFER_0, false, userData);
sWorkBuffer = 1;
captureEfb(BUFFER_TYPE_1, false, userData);
sWorkBuffer = WORK_BUFFER_0;
} else if (buffer == WORK_BUFFER_1 && sWorkBuffer != WORK_BUFFER_0) {
captureEfb(BUFFER_TYPE_0, false, userData);
sWorkBuffer = WORK_BUFFER_1;
}
}
@@ -155,9 +155,9 @@ void StateEfb::popWorkBuffer(bool b, u32 userData) {
if (sWorkBuffer != -1) {
BufferType i = static_cast<BufferType>(-1);
if (sWorkBuffer == 0) {
i = BUFFER_1;
i = BUFFER_TYPE_1;
} else if (sWorkBuffer == 1) {
i = BUFFER_0;
i = BUFFER_TYPE_0;
}
if (spBufferSet[i].userData == userData) {
@@ -195,14 +195,14 @@ void StateEfb::popWorkBuffer(bool b, u32 userData) {
DrawGX::DrawDL(DrawGX::DL_16, mtx, DrawGX::WHITE);
}
}
releaseEfb((i), spBufferSet[i].userData);
releaseEfb(i, spBufferSet[i].userData);
sWorkBuffer = -1;
sPushCount += 1;
}
}
}
f32 *StateEfb::fn_804B4550() {
f32 *StateEfb::shiftWorkSpaceViewportGX() {
const Screen::DataEfb &efb = GlobalDrawState::getScreen().GetDataEfb();
sShiftViewPort[0] = sWorkSpaceV[0];
sShiftViewPort[1] = sWorkSpaceV[1];
+13 -13
View File
@@ -29,7 +29,7 @@ char decompressor_alloc_space[0x9930];
mDvd_param_c l_param;
// unofficial
TUncompressInfo_Base_c *decompressorPtrs[1] = {
UncompressInfo_c *decompressorPtrs[1] = {
&s_UncompressInfoLZ,
};
@@ -38,18 +38,18 @@ int maxChunkSize = 0x10000;
void *somePtr;
u32 someNumber;
TUncompressInfo_Base_c **compressors_ptr;
TUncompressInfo_Base_c **compressors_last;
// official
UncompressInfo_c **s_UncompressInfoTable_begin;
UncompressInfo_c **s_UncompressInfoTable_end;
OSThread *l_OSThread;
mDvd::MyThread_c *l_MyThread;
EGG::Heap *l_CommandHeap;
EGG::Heap *l_ArchiveHeap;
bool l_IsAutoStreamDecomp;
static void unk_setDecompressorPtrs(TUncompressInfo_Base_c **ptr, TUncompressInfo_Base_c **last) {
compressors_ptr = ptr;
compressors_last = last;
static void unk_setDecompressorPtrs(UncompressInfo_c **ptr, UncompressInfo_c **last) {
s_UncompressInfoTable_begin = ptr;
s_UncompressInfoTable_end = last;
}
void unk_initDecompressors() {
@@ -58,9 +58,9 @@ void unk_initDecompressors() {
someNumber = 0x24;
}
static TUncompressInfo_Base_c *findUncompressInfo(u8 type) {
TUncompressInfo_Base_c **ptr = compressors_ptr;
while (ptr != compressors_last) {
static UncompressInfo_c *findUncompressInfo(u8 type) {
UncompressInfo_c **ptr = s_UncompressInfoTable_begin;
while (ptr != s_UncompressInfoTable_end) {
if ((*ptr)->mType == type) {
return *ptr;
}
@@ -70,7 +70,7 @@ static TUncompressInfo_Base_c *findUncompressInfo(u8 type) {
}
static EGG::StreamDecomp *newUncompressObj(u8 type) {
TUncompressInfo_Base_c *factory = findUncompressInfo(type);
UncompressInfo_c *factory = findUncompressInfo(type);
if (factory != nullptr) {
return factory->Construct();
} else {
@@ -79,7 +79,7 @@ static EGG::StreamDecomp *newUncompressObj(u8 type) {
}
static void deleteUncompressObj(u8 type) {
TUncompressInfo_Base_c *factory = findUncompressInfo(type);
UncompressInfo_c *factory = findUncompressInfo(type);
if (factory != nullptr) {
factory->Destruct();
}
@@ -362,7 +362,7 @@ static int ConvertPathToEntrynumASD_(const char *name, u8 *outType) {
end = buf + strlen(buf);
size = sizeof(buf) - (end - buf);
// Append the compressor extension and try to find a compressed version
for (mDvd::TUncompressInfo_Base_c **ptr = mDvd::compressors_ptr; ptr != mDvd::compressors_last; ptr++) {
for (mDvd::UncompressInfo_c **ptr = mDvd::s_UncompressInfoTable_begin; ptr != mDvd::s_UncompressInfoTable_end; ptr++) {
strncpy(end, (*ptr)->mExtension, size);
num = DVDConvertPathToEntrynum(buf);
if (num != -1) {
@@ -380,7 +380,7 @@ static int ConvertPathToEntrynumASD_(const char *name, u8 *outType) {
if (end != nullptr) {
size = sizeof(buf) - (end - buf);
// Append the compressor extension and try to find a compressed version
for (mDvd::TUncompressInfo_Base_c **ptr = mDvd::compressors_ptr; ptr != mDvd::compressors_last; ptr++) {
for (mDvd::UncompressInfo_c **ptr = mDvd::s_UncompressInfoTable_begin; ptr != mDvd::s_UncompressInfoTable_end; ptr++) {
strncpy(end, (*ptr)->mExtension, size);
num = DVDConvertPathToEntrynum(buf);
if (num != -1) {