Destroy tex and tlut objects
This commit is contained in:
parent
05bae8b611
commit
d327c22bb5
31 changed files with 123 additions and 26 deletions
|
|
@ -1180,4 +1180,7 @@ static void ShadowDraw(ModelData *model, Mtx mtx)
|
|||
GXPosition3f32(2000.0f, 0, 2000.0f);
|
||||
GXPosition3f32(-2000.0f, 0, 2000.0f);
|
||||
GXEnd();
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&tex);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1308,6 +1308,9 @@ void fn_1_58E4(ModelData *modelData, Mtx arg1)
|
|||
GXSetTevColor(GX_TEVREG0, sp14);
|
||||
GXCallDisplayList(var_r31->unk_44, var_r31->unk_48);
|
||||
}
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&sp3C);
|
||||
#endif
|
||||
}
|
||||
|
||||
AnimData *fn_1_5D64(u16 sizeX, u16 sizeY, s32 arg2)
|
||||
|
|
|
|||
|
|
@ -1008,6 +1008,9 @@ void fn_1_37A4(ModelData *arg0, Mtx arg1)
|
|||
GXSetNumIndStages(0);
|
||||
GXSetTevDirect(GX_TEVSTAGE0);
|
||||
GXSetTevDirect(GX_TEVSTAGE1);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&spC);
|
||||
#endif
|
||||
}
|
||||
|
||||
void fn_1_3F1C(ModelData *arg0, Mtx arg1)
|
||||
|
|
@ -1077,6 +1080,9 @@ void fn_1_4024(ModelData *arg0, Mtx arg1)
|
|||
GXPosition3f32(600.0f, -2.0f, 1250.0f);
|
||||
GXPosition3f32(-600.0f, -2.0f, 1250.0f);
|
||||
GXEnd();
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&sp18);
|
||||
#endif
|
||||
}
|
||||
|
||||
void fn_1_4700(ModelData *arg0, Mtx arg1)
|
||||
|
|
|
|||
|
|
@ -1138,6 +1138,10 @@ void fn_1_10830(ModelData *arg0, HsfBitmap *arg1, HsfAttribute *arg2, s16 arg3)
|
|||
GXInitTexObjLOD(&sp1C, GX_LINEAR, GX_LINEAR, 0, 0, 0, GX_FALSE, GX_FALSE, GX_ANISO_1);
|
||||
}
|
||||
GXLoadTexObj(&sp1C, arg3);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&sp1C);
|
||||
GXDestroyTlutObj(&sp10);
|
||||
#endif
|
||||
}
|
||||
|
||||
#define SET_TEVCOLOR_ALPHA(reg, color_var, value) \
|
||||
|
|
|
|||
|
|
@ -1144,4 +1144,7 @@ void fn_1_B140(ModelData *arg0, Mtx arg1)
|
|||
GXSetNumIndStages(0);
|
||||
GXSetTevDirect(GX_TEVSTAGE0);
|
||||
}
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&sp14);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -278,6 +278,9 @@ void fn_1_89BC(ModelData *model, Mtx mtx)
|
|||
GXTexCoord2f32(0, 1);
|
||||
GXEnd();
|
||||
fn_1_8904(lbl_1_bss_1180, GX_FALSE);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&sp14);
|
||||
#endif
|
||||
}
|
||||
|
||||
void fn_1_8EA0(void)
|
||||
|
|
|
|||
|
|
@ -866,6 +866,9 @@ void fn_1_604C(ModelData *arg0, Mtx arg1)
|
|||
GXSetTevDirect(GX_TEVSTAGE1);
|
||||
GXSetTevDirect(GX_TEVSTAGE2);
|
||||
GXSetTevDirect(GX_TEVSTAGE3);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&sp18);
|
||||
#endif
|
||||
}
|
||||
|
||||
void fn_1_6B04(ModelData *model, Mtx arg1)
|
||||
|
|
|
|||
|
|
@ -323,6 +323,10 @@ void fn_1_AD0(s16 arg0)
|
|||
GXPosition3f32(lbl_1_bss_0[arg0].x, lbl_1_bss_0[arg0].y + 192.0f, 0.0f);
|
||||
GXTexCoord2f32(0.0f, 1.0f);
|
||||
GXEnd();
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&sp58);
|
||||
GXDestroyTexObj(&sp38);
|
||||
#endif
|
||||
}
|
||||
|
||||
void fn_1_F58(void)
|
||||
|
|
|
|||
|
|
@ -1825,4 +1825,7 @@ void fn_1_ABDC(ModelData *model, Mtx matrix)
|
|||
GXColor1x8(1);
|
||||
}
|
||||
}
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&sp8);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4497,6 +4497,9 @@ void fn_1_EF44(ModelData *arg0, Mtx arg1)
|
|||
}
|
||||
GXSetNumIndStages(0);
|
||||
GXSetTevDirect(GX_TEVSTAGE0);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&sp14);
|
||||
#endif
|
||||
}
|
||||
|
||||
s32 fn_1_F574(Vec arg0, float arg1, s32 arg2)
|
||||
|
|
@ -4911,6 +4914,9 @@ void fn_1_11008(StructBssD0Data *arg0, void *arg1, s16 arg2, GXTexWrapMode arg3,
|
|||
GXInitTexObjLOD(&sp18, GX_NEAR, GX_NEAR, 0.0f, 0.0f, 0.0f, GX_FALSE, GX_FALSE, GX_ANISO_1);
|
||||
}
|
||||
GXLoadTexObj(&sp18, arg2);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&sp18);
|
||||
#endif
|
||||
}
|
||||
|
||||
s16 fn_1_11114(AnimData *arg0, s16 arg1)
|
||||
|
|
|
|||
|
|
@ -1076,6 +1076,9 @@ void fn_1_618C(ModelData *arg0, Mtx arg1)
|
|||
GXSetNumIndStages(0);
|
||||
GXSetTevDirect(GX_TEVSTAGE0);
|
||||
GXSetTevDirect(GX_TEVSTAGE1);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&sp14);
|
||||
#endif
|
||||
}
|
||||
|
||||
s32 lbl_1_data_FC[0xC] = {
|
||||
|
|
@ -2443,6 +2446,9 @@ void fn_1_B3CC(ModelData *model, Mtx matrix)
|
|||
GXSetNumIndStages(0);
|
||||
GXSetTevDirect(GX_TEVSTAGE0);
|
||||
GXSetTevDirect(GX_TEVSTAGE1);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&sp44);
|
||||
#endif
|
||||
}
|
||||
|
||||
void fn_1_BD2C(ModelData *model, Mtx matrix)
|
||||
|
|
|
|||
|
|
@ -980,6 +980,9 @@ void fn_1_3B64(void)
|
|||
GXTexCoord2f32(0.0f, 1.0f);
|
||||
}
|
||||
}
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&sp14);
|
||||
#endif
|
||||
}
|
||||
|
||||
s32 lbl_1_data_EC[] = {
|
||||
|
|
|
|||
|
|
@ -1284,6 +1284,9 @@ void fn_1_8CE0(ModelData *model, Mtx matrix)
|
|||
GXSetNumIndStages(0);
|
||||
GXSetTevDirect(GX_TEVSTAGE0);
|
||||
GXSetTevDirect(GX_TEVSTAGE1);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&sp24);
|
||||
#endif
|
||||
}
|
||||
|
||||
Vec lbl_1_data_60[6] = {
|
||||
|
|
|
|||
|
|
@ -348,6 +348,9 @@ void fn_1_2978(ModelData *model, Mtx mtx)
|
|||
GXSetNumIndStages(0);
|
||||
GXSetTevDirect(GX_TEVSTAGE0);
|
||||
GXSetTevDirect(GX_TEVSTAGE1);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&spC);
|
||||
#endif
|
||||
}
|
||||
|
||||
void fn_1_3004(void)
|
||||
|
|
@ -468,6 +471,9 @@ void fn_1_3594(ModelData *model, Mtx mtx)
|
|||
GXPosition3f32(1000.0f, -5.000001f, 1000.0f);
|
||||
GXPosition3f32(-1000.0f, -5.000001f, 1000.0f);
|
||||
GXEnd();
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&sp10);
|
||||
#endif
|
||||
}
|
||||
|
||||
GXColor lbl_1_data_170 = { 255, 0, 0, 255 };
|
||||
|
|
|
|||
|
|
@ -1843,7 +1843,10 @@ void fn_1_7D60(unkStruct15 *arg0, unkStruct13 *arg1, s16 arg2)
|
|||
}
|
||||
GXInitTexObjLOD(&sp1C, GX_LINEAR, GX_LINEAR, 0.0f, 0.0f, 0.0f, 0, 0, GX_ANISO_1);
|
||||
GXLoadTexObj(&sp1C, arg2);
|
||||
return;
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&sp1C);
|
||||
GXDestroyTlutObj(&sp10);
|
||||
#endif
|
||||
}
|
||||
|
||||
void fn_1_806C(ModelData *arg0, Mtx arg1)
|
||||
|
|
@ -2132,6 +2135,9 @@ void fn_1_8D1C(void)
|
|||
GXSetTexCopyDst(0x280, 0x1E0, GX_TF_RGBA8, GX_FALSE);
|
||||
GXCopyTex(lbl_1_bss_28, 0);
|
||||
DCFlushRange(lbl_1_bss_28, lbl_1_bss_24);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&sp10);
|
||||
#endif
|
||||
}
|
||||
|
||||
void fn_1_91A4(Vec *arg0, Vec *arg1, Vec *arg2, f32 arg3[5])
|
||||
|
|
|
|||
|
|
@ -1630,6 +1630,9 @@ void fn_1_54C8(ModelData *model, Mtx mtx)
|
|||
GXSetNumIndStages(0);
|
||||
GXSetTevDirect(GX_TEVSTAGE0);
|
||||
GXSetTevDirect(GX_TEVSTAGE1);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&spC);
|
||||
#endif
|
||||
}
|
||||
|
||||
s16 fn_1_5918(Vec *arg0)
|
||||
|
|
|
|||
|
|
@ -301,6 +301,9 @@ void fn_1_4FC(ModelData *model, Mtx matrix)
|
|||
}
|
||||
}
|
||||
}
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&lbl_1_bss_40);
|
||||
#endif
|
||||
}
|
||||
|
||||
const Vec lbl_1_rodata_100 = { 0.0f, 0.0f, 0.0f };
|
||||
|
|
|
|||
|
|
@ -968,6 +968,9 @@ void fn_1_6144(Work347CUnk4 *fbWork, float x1, float y1, float scale)
|
|||
GXPosition3f32(x1, y2, 0);
|
||||
GXTexCoord2f32(0, 1);
|
||||
GXEnd();
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&texObj);
|
||||
#endif
|
||||
}
|
||||
|
||||
void fn_1_6594(s16 arg0, Work347CUnk4 *arg1, GXTexWrapMode arg2, s32 arg3, BOOL arg4)
|
||||
|
|
@ -980,6 +983,9 @@ void fn_1_6594(s16 arg0, Work347CUnk4 *arg1, GXTexWrapMode arg2, s32 arg3, BOOL
|
|||
GXInitTexObjLOD(&texObj, GX_NEAR, GX_NEAR, 0.0f, 0.0f, 0.0f, GX_FALSE, GX_FALSE, GX_ANISO_1);
|
||||
}
|
||||
GXLoadTexObj(&texObj, arg0);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&texObj);
|
||||
#endif
|
||||
}
|
||||
|
||||
s32 fn_1_6698(Vec *arg0, float arg1, float arg2, s32 arg3)
|
||||
|
|
|
|||
|
|
@ -857,6 +857,9 @@ void fn_1_5C74(Work2FACUnk4 *fbWork, float x1, float y1, float scale)
|
|||
GXPosition3f32(x1, y2, 0);
|
||||
GXTexCoord2f32(0, 1);
|
||||
GXEnd();
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&texObj);
|
||||
#endif
|
||||
}
|
||||
|
||||
void fn_1_60C4(s16 arg0, Work2FACUnk4 *arg1, GXTexWrapMode arg2, s32 arg3, BOOL arg4)
|
||||
|
|
@ -870,6 +873,9 @@ void fn_1_60C4(s16 arg0, Work2FACUnk4 *arg1, GXTexWrapMode arg2, s32 arg3, BOOL
|
|||
GXInitTexObjLOD(&texObj, GX_NEAR, GX_NEAR, 0.0f, 0.0f, 0.0f, GX_FALSE, GX_FALSE, GX_ANISO_1);
|
||||
}
|
||||
GXLoadTexObj(&texObj, arg0);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&texObj);
|
||||
#endif
|
||||
}
|
||||
|
||||
s32 fn_1_61C8(Vec *arg0, float arg1, float arg2, s32 arg3)
|
||||
|
|
|
|||
|
|
@ -398,6 +398,9 @@ void fn_1_7790(ModelData *model, Mtx mtx)
|
|||
GXPosition3f32(var_f31, var_f30, -var_f29);
|
||||
GXPosition3f32(var_f31, -var_f30, -var_f29);
|
||||
GXPosition3f32(-var_f31, -var_f30, -var_f29);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&spC);
|
||||
#endif
|
||||
}
|
||||
|
||||
void fn_1_7B94(s32 arg0)
|
||||
|
|
|
|||
|
|
@ -859,6 +859,9 @@ void fn_1_2B68(ModelData *mdl, Mtx arg1)
|
|||
GXSetNumIndStages(0U);
|
||||
GXSetTevDirect(GX_TEVSTAGE0);
|
||||
GXSetTevDirect(GX_TEVSTAGE1);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&sp30);
|
||||
#endif
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
|
|
|||
|
|
@ -676,4 +676,7 @@ static void ResultShadowDraw(struct model_data *model, Mtx matrix)
|
|||
GXPosition3f32(500.0f, 0, 500.0f);
|
||||
GXPosition3f32(-500.0f, 0, 500.0f);
|
||||
GXEnd();
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&tex);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1538,4 +1538,7 @@ void fn_1_7414(ModelData *model, Mtx matrix)
|
|||
GXPosition3f32(500.0f, 0.0f, -500.0f);
|
||||
GXPosition3f32(500.0f, 0.0f, 500.0f);
|
||||
GXPosition3f32(-500.0f, 0.0f, 500.0f);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&spC);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,6 +53,9 @@ void DEMOLoadFont(enum _GXTexMapID texMap, enum _GXTexMtx texMtx, DMTexFlt texFl
|
|||
GXLoadTexMtxImm(fontTMtx, texMtx, 1);
|
||||
GXSetNumTexGens(1);
|
||||
GXSetTexCoordGen(0, 1, 4, texMtx);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&fontTexObj);
|
||||
#endif
|
||||
}
|
||||
|
||||
void DEMOSetupScrnSpc(long width, long height, float depth)
|
||||
|
|
|
|||
|
|
@ -106,4 +106,9 @@ void THPGXYuv2RgbDraw(u32 *yImage, u32 *uImage, u32 *vImage, s16 x, s16 y, s16 t
|
|||
GXPosition3s16(x, y + polyHeight, 0);
|
||||
GXTexCoord2s16(0, 1);
|
||||
GXEnd();
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&sp54);
|
||||
GXDestroyTexObj(&sp34);
|
||||
GXDestroyTexObj(&sp14);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1095,6 +1095,10 @@ void BoardSpaceInit(s32 data_num)
|
|||
}
|
||||
}
|
||||
spaceDrawF = 1;
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&spaceHiliteTex);
|
||||
GXDestroyTexObj(&spaceTex);
|
||||
#endif
|
||||
}
|
||||
|
||||
void BoardSpaceDestroy(void)
|
||||
|
|
|
|||
|
|
@ -1604,6 +1604,9 @@ static s32 SetShadowTex(void) {
|
|||
GXInitTexObj(&sp8, Hu3DShadowData.unk_04, Hu3DShadowData.unk_02, Hu3DShadowData.unk_02, GX_TF_I8, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
GXInitTexObjLOD(&sp8, GX_LINEAR, GX_LINEAR, 0.0f, 0.0f, 0.0f, GX_FALSE, GX_FALSE, GX_ANISO_1);
|
||||
GXLoadTexObj(&sp8, shadowMapNo);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&sp8);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void SetShadow(HsfDrawObject *arg0, s16 arg1, s16 arg2) {
|
||||
|
|
@ -1837,6 +1840,10 @@ static s32 LoadTexture(ModelData *arg0, HsfBitmap *arg1, HsfAttribute *arg2, s16
|
|||
GXInitTexObjLOD(&sp1C, GX_LIN_MIP_LIN, GX_LINEAR, 0.0f, arg1->maxLod - 1, 0.0f, GX_TRUE, GX_TRUE, GX_ANISO_1);
|
||||
}
|
||||
GXLoadTexObj(&sp1C, arg3);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&sp1C);
|
||||
GXDestroyTlutObj(&sp10);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void objNull(ModelData *arg0, HsfObject *arg1) {
|
||||
|
|
|
|||
|
|
@ -288,6 +288,9 @@ void pfDrawFonts(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&font_tex);
|
||||
#endif
|
||||
}
|
||||
|
||||
#define SAFETY_W 16
|
||||
|
|
|
|||
|
|
@ -240,6 +240,10 @@ void HuSprTexLoad(AnimData *anim, short bmp, short slot, GXTexWrapMode wrap_s, G
|
|||
}
|
||||
GXInitTexObjLOD(&tex_obj, filter, filter, 0, 0, 0, GX_FALSE, GX_FALSE, GX_ANISO_1);
|
||||
GXLoadTexObj(&tex_obj, slot);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&tex_obj);
|
||||
GXDestroyTlutObj(&tlut_obj);
|
||||
#endif
|
||||
}
|
||||
|
||||
void HuSprExecLayerSet(short draw_no, short layer)
|
||||
|
|
|
|||
|
|
@ -332,4 +332,7 @@ static void WipeFrameStill(GXColor color)
|
|||
GXTexCoord2f32(0, 1);
|
||||
GXEnd();
|
||||
GXSetChanMatColor(GX_COLOR0A0, colorN);
|
||||
#ifdef TARGET_PC
|
||||
GXDestroyTexObj(&tex);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -478,30 +478,6 @@ void HuAudDllSndGrpSet(u16 ovl) {
|
|||
}
|
||||
|
||||
void HuAudSndGrpSetSet(s16 dataSize) {
|
||||
void *buf;
|
||||
OSTick osTick;
|
||||
s32 numPlay;
|
||||
s32 err;
|
||||
|
||||
if (sndGroupBak != dataSize) {
|
||||
// msmMusStopAll(1, 0);
|
||||
// msmSeStopAll(1, 0);
|
||||
osTick = OSGetTick();
|
||||
// while ((msmMusGetNumPlay(1) != 0 || msmSeGetNumPlay(1) != 0)
|
||||
// && OSTicksToMilliseconds(OSGetTick() - osTick) < 500);
|
||||
OSReport("%d\n", OSTicksToMilliseconds(OSGetTick() - osTick));
|
||||
if (OSTicksToMilliseconds(OSGetTick() - osTick) >= 500) {
|
||||
// numPlay = msmSeGetNumPlay(1);
|
||||
// OSReport("Timed Out! Mus %d:SE %d\n", msmMusGetNumPlay(1), numPlay);
|
||||
}
|
||||
OSReport("GroupSet %d\n", dataSize);
|
||||
sndGroupBak = dataSize;
|
||||
// err = msmSysDelGroupAll();
|
||||
// buf = HuMemDirectMalloc(HEAP_DATA, msmSysGetSampSize(1));
|
||||
// err = msmSysLoadGroupSet(dataSize, buf);
|
||||
OSReport("***********GroupSet Error %d\n", err);
|
||||
// HuMemDirectFree(buf);
|
||||
}
|
||||
}
|
||||
|
||||
void HuAudSndGrpSet(s16 grpId) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue