mirror of https://github.com/zeldaret/tp.git
1221 lines
42 KiB
C++
1221 lines
42 KiB
C++
//
|
|
// Generated By: dol2asm
|
|
// Translation Unit: J2DWindowEx
|
|
//
|
|
|
|
#include "JSystem/J2DGraph/J2DWindowEx.h"
|
|
#include "JSystem/JUtility/JUTTexture.h"
|
|
#include "JSystem/JSupport/JSURandomInputStream.h"
|
|
#include "dol2asm.h"
|
|
|
|
//
|
|
// Forward References:
|
|
//
|
|
|
|
extern "C" void __ct__11J2DWindowExFP7J2DPaneP20JSURandomInputStreamUlP11J2DMaterial();
|
|
extern "C" void setMinSize__11J2DWindowExFv();
|
|
extern "C" void __dt__11J2DWindowExFv();
|
|
extern "C" void drawSelf__11J2DWindowExFffPA3_A4_f();
|
|
extern "C" void func_803012CC();
|
|
extern "C" void func_80301994();
|
|
extern "C" void drawFrameTexture__11J2DWindowExFffffUsUsUsUsP11J2DMaterialb();
|
|
extern "C" void func_80301FC8();
|
|
extern "C" void func_80302164();
|
|
extern "C" void setTevOrder__11J2DWindowExFb();
|
|
extern "C" void setTevStage__11J2DWindowExFb();
|
|
extern "C" void setStage__11J2DWindowExFP11J2DTevStageQ211J2DWindowEx10stage_enum();
|
|
extern "C" void setBlack__11J2DWindowExFQ28JUtility6TColor();
|
|
extern "C" void setWhite__11J2DWindowExFQ28JUtility6TColor();
|
|
extern "C" void setBlackWhite__11J2DWindowExFQ28JUtility6TColorQ28JUtility6TColor();
|
|
extern "C" void getBlackWhite__11J2DWindowExCFPQ28JUtility6TColorPQ28JUtility6TColor();
|
|
extern "C" void isSetBlackWhite__11J2DWindowExCFQ28JUtility6TColorQ28JUtility6TColor();
|
|
extern "C" void getBlack__11J2DWindowExCFv();
|
|
extern "C" void getWhite__11J2DWindowExCFv();
|
|
extern "C" void setAlpha__11J2DWindowExFUc();
|
|
extern "C" void setCullBack__11J2DWindowExF11_GXCullMode();
|
|
extern "C" void rewriteAlpha__11J2DWindowExFv();
|
|
extern "C" void getFrameTexture__11J2DWindowExCFUcUc();
|
|
extern "C" void getContentsTexture__11J2DWindowExCFUc();
|
|
extern "C" void isUsed__11J2DWindowExFPC7ResTIMG();
|
|
extern "C" void setAnimation__11J2DWindowExFP11J2DAnmColor();
|
|
extern "C" void setAnimation__11J2DWindowExFP19J2DAnmTextureSRTKey();
|
|
extern "C" void setAnimation__11J2DWindowExFP16J2DAnmTexPattern();
|
|
extern "C" void setAnimation__11J2DWindowExFP15J2DAnmTevRegKey();
|
|
extern "C" void isNeedSetAnm__11J2DWindowExFUc();
|
|
extern "C" void setAnimation__11J2DWindowExFP20J2DAnmVisibilityFull();
|
|
extern "C" void setAnimation__11J2DWindowExFP14J2DAnmVtxColor();
|
|
extern "C" void animationPane__11J2DWindowExFPC15J2DAnmTransform();
|
|
extern "C" void getFrameMaterial__11J2DWindowExCFUc();
|
|
extern "C" void getContentsMaterial__11J2DWindowExCFv();
|
|
extern "C" void getMaterial__11J2DWindowExCFRQ29J2DWindow9TMaterial();
|
|
extern "C" void draw__11J2DWindowExFffff();
|
|
extern "C" void setCullBack__11J2DWindowExFb();
|
|
extern "C" void isUsed__11J2DWindowExFPC7ResFONT();
|
|
extern "C" void setAnimation__11J2DWindowExFP10J2DAnmBase();
|
|
extern "C" void getColor__14J2DAnmVtxColorCFUcUsP8_GXColor();
|
|
|
|
//
|
|
// External References:
|
|
//
|
|
|
|
extern "C" void calcMtx__7J2DPaneFv();
|
|
extern "C" void makeMatrix__7J2DPaneFff();
|
|
extern "C" void setAnimation__11J2DWindowExFP15J2DAnmTransform();
|
|
extern "C" void __dl__FPv();
|
|
extern "C" void read__14JSUInputStreamFPvl();
|
|
extern "C" void peek__20JSURandomInputStreamFPvl();
|
|
extern "C" void seek__20JSURandomInputStreamFl17JSUStreamSeekFrom();
|
|
extern "C" void setGX__11J2DMaterialFv();
|
|
extern "C" void setAnimation__11J2DMaterialFP11J2DAnmColor();
|
|
extern "C" void setAnimation__11J2DMaterialFP19J2DAnmTextureSRTKey();
|
|
extern "C" void setAnimation__11J2DMaterialFP16J2DAnmTexPattern();
|
|
extern "C" void setAnimation__11J2DMaterialFP15J2DAnmTevRegKey();
|
|
extern "C" void move__7J2DPaneFff();
|
|
extern "C" void add__7J2DPaneFff();
|
|
extern "C" void func_802F7264();
|
|
extern "C" void search__7J2DPaneFUx();
|
|
extern "C" void searchUserInfo__7J2DPaneFUx();
|
|
extern "C" void isUsed__7J2DPaneFPC7ResTIMG();
|
|
extern "C" void isUsed__7J2DPaneFPC7ResFONT();
|
|
extern "C" void makeMatrix__7J2DPaneFffff();
|
|
extern "C" void setCullBack__7J2DPaneF11_GXCullMode();
|
|
extern "C" void getParentPane__7J2DPaneFv();
|
|
extern "C" void makePaneExStream__7J2DPaneFP7J2DPaneP20JSURandomInputStream();
|
|
extern "C" void setAnimation__7J2DPaneFP10J2DAnmBase();
|
|
extern "C" void clearAnmTransform__7J2DPaneFv();
|
|
extern "C" void animationTransform__7J2DPaneFPC15J2DAnmTransform();
|
|
extern "C" void setVisibileAnimation__7J2DPaneFP20J2DAnmVisibilityFull();
|
|
extern "C" void setVtxColorAnimation__7J2DPaneFP14J2DAnmVtxColor();
|
|
extern "C" void animationPane__7J2DPaneFPC15J2DAnmTransform();
|
|
extern "C" void setAnimationVF__7J2DPaneFP20J2DAnmVisibilityFull();
|
|
extern "C" void setAnimationVC__7J2DPaneFP14J2DAnmVtxColor();
|
|
extern "C" void setConnectParent__7J2DPaneFb();
|
|
extern "C" void update__7J2DPaneFv();
|
|
extern "C" void __ct__9J2DWindowFv();
|
|
extern "C" void __dt__9J2DWindowFv();
|
|
extern "C" void resize__9J2DWindowFff();
|
|
extern "C" void drawSelf__9J2DWindowFff();
|
|
extern "C" s32 getTypeID__9J2DWindowCFv();
|
|
extern "C" void getVisibility__20J2DAnmVisibilityFullCFUsPUc();
|
|
extern "C" void _savegpr_20();
|
|
extern "C" void _savegpr_25();
|
|
extern "C" void _savegpr_26();
|
|
extern "C" void _savegpr_27();
|
|
extern "C" void _savegpr_28();
|
|
extern "C" void _savegpr_29();
|
|
extern "C" void _restgpr_20();
|
|
extern "C" void _restgpr_25();
|
|
extern "C" void _restgpr_26();
|
|
extern "C" void _restgpr_27();
|
|
extern "C" void _restgpr_28();
|
|
extern "C" void _restgpr_29();
|
|
|
|
//
|
|
// Declarations:
|
|
//
|
|
|
|
/* ############################################################################################## */
|
|
/* 803A1C60-803A1C70 02E2C0 0010+00 2/2 0/0 0/0 .rodata @1508 */
|
|
SECTION_RODATA static u8 const lit_1508[16] = {
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
};
|
|
COMPILER_STRIP_GATE(0x803A1C60, &lit_1508);
|
|
|
|
/* 803CD3E8-803CD4B8 02A508 00CC+04 2/2 0/0 0/0 .data __vt__11J2DWindowEx */
|
|
SECTION_DATA extern void* __vt__11J2DWindowEx[51 + 1 /* padding */] = {
|
|
(void*)NULL /* RTTI */,
|
|
(void*)NULL,
|
|
(void*)__dt__11J2DWindowExFv,
|
|
(void*)getTypeID__9J2DWindowCFv,
|
|
(void*)move__7J2DPaneFff,
|
|
(void*)add__7J2DPaneFff,
|
|
(void*)resize__9J2DWindowFff,
|
|
(void*)setCullBack__11J2DWindowExFb,
|
|
(void*)setCullBack__11J2DWindowExF11_GXCullMode,
|
|
(void*)setAlpha__11J2DWindowExFUc,
|
|
(void*)setConnectParent__7J2DPaneFb,
|
|
(void*)calcMtx__7J2DPaneFv,
|
|
(void*)update__7J2DPaneFv,
|
|
(void*)drawSelf__9J2DWindowFff,
|
|
(void*)drawSelf__11J2DWindowExFffPA3_A4_f,
|
|
(void*)search__7J2DPaneFUx,
|
|
(void*)searchUserInfo__7J2DPaneFUx,
|
|
(void*)makeMatrix__7J2DPaneFff,
|
|
(void*)makeMatrix__7J2DPaneFffff,
|
|
(void*)isUsed__11J2DWindowExFPC7ResTIMG,
|
|
(void*)isUsed__11J2DWindowExFPC7ResFONT,
|
|
(void*)clearAnmTransform__7J2DPaneFv,
|
|
(void*)rewriteAlpha__11J2DWindowExFv,
|
|
(void*)setAnimation__11J2DWindowExFP10J2DAnmBase,
|
|
(void*)setAnimation__11J2DWindowExFP15J2DAnmTransform,
|
|
(void*)setAnimation__11J2DWindowExFP11J2DAnmColor,
|
|
(void*)setAnimation__11J2DWindowExFP16J2DAnmTexPattern,
|
|
(void*)setAnimation__11J2DWindowExFP19J2DAnmTextureSRTKey,
|
|
(void*)setAnimation__11J2DWindowExFP15J2DAnmTevRegKey,
|
|
(void*)setAnimation__11J2DWindowExFP20J2DAnmVisibilityFull,
|
|
(void*)setAnimation__11J2DWindowExFP14J2DAnmVtxColor,
|
|
(void*)animationTransform__7J2DPaneFPC15J2DAnmTransform,
|
|
(void*)setVisibileAnimation__7J2DPaneFP20J2DAnmVisibilityFull,
|
|
(void*)setAnimationVF__7J2DPaneFP20J2DAnmVisibilityFull,
|
|
(void*)setVtxColorAnimation__7J2DPaneFP14J2DAnmVtxColor,
|
|
(void*)setAnimationVC__7J2DPaneFP14J2DAnmVtxColor,
|
|
(void*)animationPane__11J2DWindowExFPC15J2DAnmTransform,
|
|
(void*)func_80301FC8,
|
|
(void*)func_80302164,
|
|
(void*)draw__11J2DWindowExFffff,
|
|
(void*)setBlack__11J2DWindowExFQ28JUtility6TColor,
|
|
(void*)setWhite__11J2DWindowExFQ28JUtility6TColor,
|
|
(void*)setBlackWhite__11J2DWindowExFQ28JUtility6TColorQ28JUtility6TColor,
|
|
(void*)getBlack__11J2DWindowExCFv,
|
|
(void*)getWhite__11J2DWindowExCFv,
|
|
(void*)getFrameTexture__11J2DWindowExCFUcUc,
|
|
(void*)getContentsTexture__11J2DWindowExCFUc,
|
|
(void*)getMaterial__11J2DWindowExCFRQ29J2DWindow9TMaterial,
|
|
(void*)getFrameMaterial__11J2DWindowExCFUc,
|
|
(void*)getContentsMaterial__11J2DWindowExCFv,
|
|
(void*)func_80301994,
|
|
/* padding */
|
|
NULL,
|
|
};
|
|
|
|
/* 804562A0-804562A8 0048A0 0008+00 4/4 0/0 0/0 .sdata2 @1549 */
|
|
SECTION_SDATA2 static f64 lit_1549 = 4503601774854144.0 /* cast s32 to float */;
|
|
|
|
/* 804562A8-804562B0 0048A8 0008+00 1/1 0/0 0/0 .sdata2 @1552 */
|
|
SECTION_SDATA2 static f64 lit_1552 = 4503599627370496.0 /* cast u32 to float */;
|
|
|
|
struct J2DWindowExDef {
|
|
u32 field_0x0[4];
|
|
u16 field_0x10[4];
|
|
u8 field_0x18;
|
|
u8 field_0x19;
|
|
u16 field_0x1A;
|
|
u16 field_0x1C;
|
|
u16 field_0x1E;
|
|
u16 field_0x20;
|
|
u16 field_0x22;
|
|
u16 field_0x24;
|
|
u16 field_0x26;
|
|
u16 field_0x28[4];
|
|
u32 field_0x30[4];
|
|
};
|
|
|
|
STATIC_ASSERT(sizeof(J2DWindowExDef) == 0x40);
|
|
|
|
/* 80300C94-80300F80 2FB5D4 02EC+00 0/0 1/1 0/0 .text
|
|
* __ct__11J2DWindowExFP7J2DPaneP20JSURandomInputStreamUlP11J2DMaterial */
|
|
// Matches with literals
|
|
#ifdef NONMATCHING
|
|
J2DWindowEx::J2DWindowEx(J2DPane* param_0, JSURandomInputStream* param_1, u32 param_2,
|
|
J2DMaterial* param_3) : J2DWindow() {
|
|
mAnmVisibilityFull = NULL;
|
|
mAnmVtxColor = NULL;
|
|
s32 position = param_1->getPosition();
|
|
int uStack_88[2];
|
|
param_1->read(uStack_88, 8);
|
|
mKind = uStack_88[0];
|
|
s32 iVar2 = param_1->getPosition();
|
|
int auStack_90[2];
|
|
param_1->peek(auStack_90, 8);
|
|
makePaneExStream(param_0, param_1);
|
|
param_1->seek(iVar2 + auStack_90[1], JSUStreamSeekFrom_SET);
|
|
J2DWindowExDef auStack_70;
|
|
param_1->read(&auStack_70, sizeof(J2DWindowExDef));
|
|
|
|
JUtility::TColor* colors[4] = {NULL};
|
|
colors[0] = &field_0x128;
|
|
colors[1] = &field_0x12C;
|
|
colors[2] = &field_0x130;
|
|
colors[3] = &field_0x134;
|
|
|
|
for (int i = 0; i < 4; i++) {
|
|
field_0x158[i] = auStack_70.field_0x10[i];
|
|
mFrameMaterial[i] = 0;
|
|
if (field_0x158[i] != 0xffff) {
|
|
mFrameMaterial[i] = param_3 + field_0x158[i];
|
|
(param_3 + field_0x158[i])->field_0x4 = this;
|
|
}
|
|
field_0x168[i] = auStack_70.field_0x28[i];
|
|
*(colors[i]) = JUtility::TColor(auStack_70.field_0x30[i]);
|
|
}
|
|
|
|
field_0x144 = auStack_70.field_0x18;
|
|
field_0x114.set(auStack_70.field_0x1A, auStack_70.field_0x1C,
|
|
auStack_70.field_0x1A + auStack_70.field_0x1E,
|
|
auStack_70.field_0x1C + auStack_70.field_0x20);
|
|
field_0x166 = auStack_70.field_0x22;
|
|
field_0x164 = auStack_70.field_0x24;
|
|
mContentsMaterial = NULL;
|
|
|
|
if (field_0x164 != 0xffff) {
|
|
mContentsMaterial = ¶m_3[field_0x164];
|
|
param_3[field_0x164].field_0x4 = this;
|
|
}
|
|
|
|
param_1->seek(position + uStack_88[1], JSUStreamSeekFrom_SET);
|
|
rewriteAlpha();
|
|
field_0x100 = NULL;
|
|
field_0x104 = NULL;
|
|
field_0x108 = NULL;
|
|
field_0x10c = NULL;
|
|
mPalette = NULL;
|
|
field_0x110 = NULL;
|
|
field_0x170 = 0;
|
|
setMinSize();
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm J2DWindowEx::J2DWindowEx(J2DPane* param_0, JSURandomInputStream* param_1, u32 param_2,
|
|
J2DMaterial* param_3) {
|
|
nofralloc
|
|
#include "asm/JSystem/J2DGraph/J2DWindowEx/__ct__11J2DWindowExFP7J2DPaneP20JSURandomInputStreamUlP11J2DMaterial.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* 80300F80-80301144 2FB8C0 01C4+00 1/1 0/0 0/0 .text setMinSize__11J2DWindowExFv */
|
|
void J2DWindowEx::setMinSize() {
|
|
field_0x140 = 1;
|
|
field_0x142 = 1;
|
|
|
|
if (mFrameMaterial[0] == NULL) return;
|
|
if (mFrameMaterial[1] == NULL) return;
|
|
if (mFrameMaterial[2] == NULL) return;
|
|
if (mFrameMaterial[3] == NULL) return;
|
|
if (mFrameMaterial[0]->getTevBlock() == NULL) return;
|
|
if (mFrameMaterial[1]->getTevBlock() == NULL) return;
|
|
if (mFrameMaterial[2]->getTevBlock() == NULL) return;
|
|
if (mFrameMaterial[3]->getTevBlock() == NULL) return;
|
|
if (mFrameMaterial[0]->getTevBlock()->getTexture(0) == NULL) return;
|
|
if (mFrameMaterial[1]->getTevBlock()->getTexture(0) == NULL) return;
|
|
if (mFrameMaterial[2]->getTevBlock()->getTexture(0) == NULL) return;
|
|
if (mFrameMaterial[3]->getTevBlock()->getTexture(0) == NULL) return;
|
|
|
|
field_0x140 = mFrameMaterial[0]->getTevBlock()->getTexture(0)->getWidth() + mFrameMaterial[1]->getTevBlock()->getTexture(0)->getWidth();
|
|
field_0x142 = mFrameMaterial[0]->getTevBlock()->getTexture(0)->getHeight() + mFrameMaterial[2]->getTevBlock()->getTexture(0)->getHeight();
|
|
}
|
|
|
|
/* 80301144-8030122C 2FBA84 00E8+00 1/0 0/0 0/0 .text __dt__11J2DWindowExFv */
|
|
J2DWindowEx::~J2DWindowEx() {
|
|
for (u8 i = 0; i < 4; i++) {
|
|
if (field_0x170 & (1 << i)) {
|
|
delete mFrameMaterial[i];
|
|
}
|
|
}
|
|
|
|
if (field_0x170 & 0x10) {
|
|
delete mContentsMaterial;
|
|
}
|
|
}
|
|
|
|
/* 8030122C-803012CC 2FBB6C 00A0+00 1/0 0/0 0/0 .text drawSelf__11J2DWindowExFffPA3_A4_f
|
|
*/
|
|
void J2DWindowEx::drawSelf(f32 param_0, f32 param_1, f32 (*param_2)[3][4]) {
|
|
JGeometry::TBox2<f32> aTStack_50(mBounds);
|
|
Mtx auStack_40;
|
|
aTStack_50.addPos(JGeometry::TVec2<f32>(param_0, param_1));
|
|
MTXConcat(*param_2, mGlobalMtx, auStack_40);
|
|
GXLoadPosMtxImm(auStack_40, 0);
|
|
draw_private(aTStack_50, field_0x114);
|
|
clip(field_0x114);
|
|
}
|
|
|
|
/* 803012CC-80301994 2FBC0C 06C8+00 2/2 0/0 0/0 .text
|
|
* draw_private__11J2DWindowExFRCQ29JGeometry8TBox2<f>RCQ29JGeometry8TBox2<f> */
|
|
// Matches with literals
|
|
#ifdef NONMATCHING
|
|
void J2DWindowEx::draw_private(JGeometry::TBox2<f32> const& param_0,
|
|
JGeometry::TBox2<f32> const& param_1) {
|
|
if (param_0.getWidth() >= field_0x140 && param_0.getHeight() >= field_0x142) {
|
|
JUTTexture* textures[4];
|
|
bool anyFrameMaterialNull = false;
|
|
for (int i = 0; i < 4; i++) {
|
|
if (mFrameMaterial[i] == NULL) {
|
|
return;
|
|
}
|
|
J2DTevBlock* block = mFrameMaterial[i]->getTevBlock();
|
|
if (block == NULL) {
|
|
return;
|
|
}
|
|
|
|
textures[i] = block->getTexture(0);
|
|
if (textures[i] == NULL) {
|
|
anyFrameMaterialNull = true;
|
|
}
|
|
}
|
|
|
|
JGeometry::TBox2<f32> aTStack_b8(param_1);
|
|
aTStack_b8.addPos(param_0.i);
|
|
drawContents(aTStack_b8);
|
|
GXClearVtxDesc();
|
|
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
|
GXSetVtxDesc(GX_VA_CLR0, GX_DIRECT);
|
|
GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
|
|
|
|
if (!anyFrameMaterialNull) {
|
|
f32 dVar16 = param_0.i.x;
|
|
f32 dVar15 = param_0.i.y;
|
|
f32 dVar18 = param_0.f.x - textures[3]->getWidth();
|
|
f32 dVar17 = param_0.f.y - textures[3]->getHeight();
|
|
f32 dVar14 = dVar16 + textures[0]->getWidth();
|
|
f32 dVar12 = dVar15 + textures[0]->getHeight();
|
|
u16 local_c4;
|
|
if (field_0x144 & 0x80) {
|
|
local_c4 = 0;
|
|
} else {
|
|
local_c4 = 0x8000;
|
|
}
|
|
u16 local_c6;
|
|
if (field_0x144 & 0x40) {
|
|
local_c6 = 0;
|
|
} else {
|
|
local_c6 = 0x8000;
|
|
}
|
|
|
|
drawFrameTexture(dVar16, dVar15, textures[0]->getWidth(), textures[0]->getHeight(),
|
|
local_c4, local_c6, 0x8000 - local_c4, 0x8000 - local_c6,
|
|
mFrameMaterial[0], true);
|
|
bool r9 = mFrameMaterial[1] != mFrameMaterial[0];
|
|
u16 local_c8;
|
|
if (field_0x144 & 0x20) {
|
|
local_c8 = 0;
|
|
} else {
|
|
local_c8 = 0x8000;
|
|
}
|
|
u16 local_ca;
|
|
if (field_0x144 & 0x10) {
|
|
local_ca = 0;
|
|
} else {
|
|
local_ca = 0x8000;
|
|
}
|
|
drawFrameTexture(dVar18, dVar15, textures[3]->getWidth(), textures[0]->getHeight(),
|
|
local_c8, local_ca, 0x8000 - local_c8, 0x8000 - local_ca,
|
|
mFrameMaterial[1], r9);
|
|
|
|
u16 local_cc;
|
|
if (field_0x144 & 0x20) {
|
|
local_cc = 0x8000;
|
|
} else {
|
|
local_cc = 0;
|
|
}
|
|
|
|
u16 local_ce;
|
|
if (field_0x144 & 0x10) {
|
|
local_ce = 0;
|
|
} else {
|
|
local_ce = 0x8000;
|
|
}
|
|
drawFrameTexture(dVar14, dVar15, dVar18 - dVar14, textures[0]->getHeight(), local_cc,
|
|
local_ce, local_cc, local_ce ^ 0x8000, mFrameMaterial[1], false);
|
|
|
|
r9 = mFrameMaterial[3] != mFrameMaterial[1];
|
|
u16 local_d0;
|
|
if (field_0x144 & 2) {
|
|
local_d0 = 0;
|
|
} else {
|
|
local_d0 = 0x8000;
|
|
}
|
|
u16 local_d2;
|
|
if (field_0x144 & 1) {
|
|
local_d2 = 0;
|
|
} else {
|
|
local_d2 = 0x8000;
|
|
}
|
|
|
|
drawFrameTexture(dVar18, dVar17, textures[3]->getWidth(), textures[3]->getHeight(),
|
|
local_d0, local_d2, 0x8000 - local_d0, 0x8000 - local_d2,
|
|
mFrameMaterial[3], r9);
|
|
|
|
u16 local_d4;
|
|
if (field_0x144 & 2) {
|
|
local_d4 = 0x8000;
|
|
} else {
|
|
local_d4 = 0;
|
|
}
|
|
|
|
u16 local_d6;
|
|
if (field_0x144 & 1) {
|
|
local_d6 = 0;
|
|
} else {
|
|
local_d6 = 0x8000;
|
|
}
|
|
drawFrameTexture(dVar14, dVar17, dVar18 - dVar14, textures[3]->getHeight(), local_d4,
|
|
local_d6, local_d4, local_d6 ^ 0x8000, mFrameMaterial[3], false);
|
|
|
|
u16 local_d8;
|
|
if (field_0x144 & 2) {
|
|
local_d8 = 0;
|
|
} else {
|
|
local_d8 = 0x8000;
|
|
}
|
|
|
|
u16 local_da;
|
|
if (field_0x144 & 1) {
|
|
local_da = 0x8000;
|
|
} else {
|
|
local_da = 0;
|
|
}
|
|
drawFrameTexture(dVar18, dVar12, textures[3]->getWidth(), dVar17 - dVar12, local_d8,
|
|
local_da, local_d8 ^ 0x8000, local_da, mFrameMaterial[3], false);
|
|
|
|
r9 = mFrameMaterial[2] != mFrameMaterial[3];
|
|
u16 local_dc;
|
|
if (field_0x144 & 8) {
|
|
local_dc = 0;
|
|
} else {
|
|
local_dc = 0x8000;
|
|
}
|
|
|
|
u16 local_de;
|
|
if (field_0x144 & 4) {
|
|
local_de = 0;
|
|
} else {
|
|
local_de = 0x8000;
|
|
}
|
|
drawFrameTexture(dVar16, dVar17, textures[0]->getWidth(), textures[3]->getHeight(),
|
|
local_dc, local_de, 0x8000 - local_dc, 0x8000 - local_de,
|
|
mFrameMaterial[2], r9);
|
|
|
|
u16 local_e0;
|
|
if (field_0x144 & 8) {
|
|
local_e0 = 0;
|
|
} else {
|
|
local_e0 = 0x8000;
|
|
}
|
|
|
|
u16 local_e2;
|
|
if (field_0x144 & 4) {
|
|
local_e2 = 0x8000;
|
|
} else {
|
|
local_e2 = 0;
|
|
}
|
|
drawFrameTexture(dVar16, dVar12, textures[0]->getWidth(), dVar17 - dVar12, local_e0,
|
|
local_e2, local_e0 ^ 0x8000, local_e2, mFrameMaterial[2], false);
|
|
}
|
|
|
|
GXSetTevOp(GX_TEVSTAGE0, GX_PASSCLR);
|
|
GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR0A0);
|
|
GXSetNumTexGens(0);
|
|
GXSetVtxDesc(GX_VA_TEX0, GX_NONE);
|
|
}
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void J2DWindowEx::draw_private(JGeometry::TBox2<f32> const& param_0,
|
|
JGeometry::TBox2<f32> const& param_1) {
|
|
nofralloc
|
|
#include "asm/JSystem/J2DGraph/J2DWindowEx/func_803012CC.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* ############################################################################################## */
|
|
/* 804562B0-804562B4 0048B0 0004+00 4/4 0/0 0/0 .sdata2 @1827 */
|
|
SECTION_SDATA2 static u8 lit_1827[4] = {
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
};
|
|
|
|
/* 804562B4-804562B8 0048B4 0004+00 1/1 0/0 0/0 .sdata2 @2256 */
|
|
SECTION_SDATA2 static f32 lit_2256 = 1.0f;
|
|
|
|
/* 804562B8-804562C0 0048B8 0004+04 1/1 0/0 0/0 .sdata2 @2257 */
|
|
SECTION_SDATA2 static f32 lit_2257[1 + 1 /* padding */] = {
|
|
0.5f,
|
|
/* padding */
|
|
0.0f,
|
|
};
|
|
|
|
/* 80301994-80301D74 2FC2D4 03E0+00 1/0 0/0 0/0 .text
|
|
* drawContents__11J2DWindowExFRCQ29JGeometry8TBox2<f> */
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void J2DWindowEx::drawContents(JGeometry::TBox2<f32> const& param_0) {
|
|
nofralloc
|
|
#include "asm/JSystem/J2DGraph/J2DWindowEx/func_80301994.s"
|
|
}
|
|
#pragma pop
|
|
|
|
/* 80301D74-80301FC8 2FC6B4 0254+00 1/1 0/0 0/0 .text
|
|
* drawFrameTexture__11J2DWindowExFffffUsUsUsUsP11J2DMaterialb */
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void J2DWindowEx::drawFrameTexture(f32 param_0, f32 param_1, f32 param_2, f32 param_3,
|
|
u16 param_4, u16 param_5, u16 param_6, u16 param_7,
|
|
J2DMaterial* param_8, bool param_9) {
|
|
nofralloc
|
|
#include "asm/JSystem/J2DGraph/J2DWindowEx/drawFrameTexture__11J2DWindowExFffffUsUsUsUsP11J2DMaterialb.s"
|
|
}
|
|
#pragma pop
|
|
|
|
/* 80301FC8-80302164 2FC908 019C+00 1/0 0/0 0/0 .text draw__11J2DWindowExFRCQ29JGeometry8TBox2<f>
|
|
*/
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void J2DWindowEx::draw(JGeometry::TBox2<f32> const& param_0) {
|
|
nofralloc
|
|
#include "asm/JSystem/J2DGraph/J2DWindowEx/func_80301FC8.s"
|
|
}
|
|
#pragma pop
|
|
|
|
/* 80302164-80302284 2FCAA4 0120+00 1/0 0/0 0/0 .text
|
|
* draw__11J2DWindowExFRCQ29JGeometry8TBox2<f>RCQ29JGeometry8TBox2<f> */
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void J2DWindowEx::draw(JGeometry::TBox2<f32> const& param_0,
|
|
JGeometry::TBox2<f32> const& param_1) {
|
|
nofralloc
|
|
#include "asm/JSystem/J2DGraph/J2DWindowEx/func_80302164.s"
|
|
}
|
|
#pragma pop
|
|
|
|
/* 80302284-80302388 2FCBC4 0104+00 1/1 0/0 0/0 .text setTevOrder__11J2DWindowExFb */
|
|
void J2DWindowEx::setTevOrder(bool param_0) {
|
|
u16 local_28[2];
|
|
if (!param_0) {
|
|
local_28[0] = 4;
|
|
local_28[1] = 0xffff;
|
|
} else {
|
|
local_28[0] = 0xff;
|
|
local_28[1] = 0xff04;
|
|
}
|
|
for (u8 i = 0; i < 2; i++) {
|
|
s32 uVar1 = local_28[i];
|
|
J2DTevOrderInfo info;
|
|
info.mTexCoord = uVar1 >> 8;
|
|
info.mTexMap = uVar1 >> 8;
|
|
info.mColor = uVar1;
|
|
J2DTevOrder local_30(info);
|
|
for (int j = 0; j < 4; j++) {
|
|
if (mFrameMaterial[j]->getTevBlock()->getMaxStage() > i) {
|
|
mFrameMaterial[j]->getTevBlock()->setTevOrder(i, local_30);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/* 80302388-803024B4 2FCCC8 012C+00 1/1 0/0 0/0 .text setTevStage__11J2DWindowExFb */
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void J2DWindowEx::setTevStage(bool param_0) {
|
|
nofralloc
|
|
#include "asm/JSystem/J2DGraph/J2DWindowEx/setTevStage__11J2DWindowExFb.s"
|
|
}
|
|
#pragma pop
|
|
|
|
/* 803024B4-80302764 2FCDF4 02B0+00 1/1 0/0 0/0 .text
|
|
* setStage__11J2DWindowExFP11J2DTevStageQ211J2DWindowEx10stage_enum */
|
|
// rlwinm/slwi diffs + regalloc. Need to verify data arrays.
|
|
#ifdef NONMATCHING
|
|
void J2DWindowEx::setStage(J2DTevStage* param_0, J2DWindowEx::stage_enum param_1) {
|
|
u8 local_30[6][4] = {
|
|
{0x0f, 0x08, 0x0a, 0x0f}, {0x0f, 0x08, 0x0a, 0x0f}, {0x0f, 0x0a, 0x00, 0x0f},
|
|
{0x02, 0x04, 0x08, 0x0f}, {0x02, 0x04, 0x08, 0x0f}, {0x0f, 0x0f, 0x0f, 0x0a},
|
|
};
|
|
u8 local_48[6][4] = {
|
|
{0x07, 0x04, 0x05, 0x07}, {0x05, 0x07, 0x07, 0x07}, {0x07, 0x05, 0x00, 0x07},
|
|
{0x01, 0x02, 0x04, 0x07}, {0x07, 0x07, 0x07, 0x02}, {0x07, 0x07, 0x07, 0x05},
|
|
};
|
|
u8 local_68[6][5] = {
|
|
{1, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 1, 0, 0, 1},
|
|
{0, 0, 1, 0, 0}, {1, 0, 0, 0, 0}, {0, 0, 0, 0, 1},
|
|
};
|
|
|
|
param_0->setTevColorAB(local_30[param_1][0], local_30[param_1][1]);
|
|
param_0->setTevColorCD(local_30[param_1][2], local_30[param_1][3]);
|
|
param_0->setTevColorOp(local_68[param_1][0], local_68[param_1][1], local_68[param_1][2],
|
|
local_68[param_1][3], local_68[param_1][4]);
|
|
param_0->setAlphaABCD(local_48[param_1][0], local_48[param_1][1], local_48[param_1][2],
|
|
local_48[param_1][3]);
|
|
param_0->setTevAlphaOp(local_68[param_1][0], local_68[param_1][1], local_68[param_1][2],
|
|
local_68[param_1][3], local_68[param_1][4]);
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void J2DWindowEx::setStage(J2DTevStage* param_0, J2DWindowEx::stage_enum param_1) {
|
|
nofralloc
|
|
#include "asm/JSystem/J2DGraph/J2DWindowEx/setStage__11J2DWindowExFP11J2DTevStageQ211J2DWindowEx10stage_enum.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* 80302764-803027EC 2FD0A4 0088+00 1/0 0/0 0/0 .text setBlack__11J2DWindowExFQ28JUtility6TColor
|
|
*/
|
|
bool J2DWindowEx::setBlack(JUtility::TColor black) {
|
|
JUtility::TColor dummy,white;
|
|
|
|
if (!getBlackWhite(&dummy, &white)) {
|
|
return false;
|
|
}
|
|
|
|
return setBlackWhite(black, white);
|
|
}
|
|
|
|
/* 803027EC-80302874 2FD12C 0088+00 1/0 0/0 0/0 .text setWhite__11J2DWindowExFQ28JUtility6TColor
|
|
*/
|
|
bool J2DWindowEx::setWhite(JUtility::TColor white) {
|
|
JUtility::TColor black,dummy;
|
|
|
|
if (!getBlackWhite(&black, &dummy)) {
|
|
return false;
|
|
}
|
|
|
|
return setBlackWhite(black, white);
|
|
}
|
|
|
|
/* 80302874-80302A4C 2FD1B4 01D8+00 1/0 0/0 0/0 .text
|
|
* setBlackWhite__11J2DWindowExFQ28JUtility6TColorQ28JUtility6TColor */
|
|
// J2DGXColorS10 issue
|
|
#ifdef NONMATCHING
|
|
bool J2DWindowEx::setBlackWhite(JUtility::TColor black, JUtility::TColor white) {
|
|
for (int i = 0; i < 4; i++) {
|
|
if (mFrameMaterial[i] == NULL) {
|
|
return false;
|
|
}
|
|
|
|
if (mFrameMaterial[i]->getTevBlock() == NULL) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
if (!isSetBlackWhite(black, white)) {
|
|
return false;
|
|
}
|
|
|
|
bool bVar1 = false;
|
|
if ((u32)black != 0 || (u32)white != 0xffffffff) {
|
|
bVar1 = true;
|
|
}
|
|
u8 uVar3 = bVar1 ? 2 : 1;
|
|
for (int i = 0; i < 4; i++) {
|
|
mFrameMaterial[i]->getTevBlock()->setTevStageNum(uVar3);
|
|
}
|
|
setTevOrder(bVar1);
|
|
setTevStage(bVar1);
|
|
if (bVar1) {
|
|
J2DGXColorS10 color0;
|
|
J2DGXColorS10 color1;
|
|
color0.r = black.r;
|
|
color0.g = black.g;
|
|
color0.b = black.b;
|
|
color0.a = black.a;
|
|
color1.r = white.r;
|
|
color1.g = white.g;
|
|
color1.b = white.b;
|
|
color1.a = white.a;
|
|
|
|
for (int i = 0; i < 4; i++) {
|
|
mFrameMaterial[i]->getTevBlock()->setTevColor(0, color0);
|
|
mFrameMaterial[i]->getTevBlock()->setTevColor(1, color1);
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm bool J2DWindowEx::setBlackWhite(JUtility::TColor param_0, JUtility::TColor param_1) {
|
|
nofralloc
|
|
#include "asm/JSystem/J2DGraph/J2DWindowEx/setBlackWhite__11J2DWindowExFQ28JUtility6TColorQ28JUtility6TColor.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* 80302A4C-80302BE8 2FD38C 019C+00 4/4 0/0 0/0 .text
|
|
* getBlackWhite__11J2DWindowExCFPQ28JUtility6TColorPQ28JUtility6TColor */
|
|
bool J2DWindowEx::getBlackWhite(JUtility::TColor* param_0, JUtility::TColor* param_1) const {
|
|
if (mFrameMaterial[0] == NULL) {
|
|
return false;
|
|
}
|
|
|
|
if (mFrameMaterial[0]->getTevBlock() == NULL) {
|
|
return false;
|
|
}
|
|
|
|
bool cVar6 = mFrameMaterial[0]->getTevBlock()->getTevStageNum() != 1;
|
|
*param_0 = JUtility::TColor(0);
|
|
*param_1 = JUtility::TColor(0xffffffff);
|
|
if (cVar6) {
|
|
J2DGXColorS10* color0p = mFrameMaterial[0]->getTevBlock()->getTevColor(0);
|
|
GXColorS10 color0;
|
|
color0.r = color0p->r;
|
|
color0.g = color0p->g;
|
|
color0.b = color0p->b;
|
|
color0.a = color0p->a;
|
|
J2DGXColorS10* color1p = mFrameMaterial[0]->getTevBlock()->getTevColor(1);
|
|
GXColorS10 color1;
|
|
color1.r = color1p->r;
|
|
color1.g = color1p->g;
|
|
color1.b = color1p->b;
|
|
color1.a = color1p->a;
|
|
*param_0 = JUtility::TColor((((u8)color0.r) << 0x18) | (((u8)color0.g) << 0x10) | (((u8)color0.b) << 0x8) | (((u8)color0.a)));
|
|
*param_1 = JUtility::TColor((((u8)color1.r) << 0x18) | (((u8)color1.g) << 0x10) | (((u8)color1.b) << 0x8) | (((u8)color1.a)));
|
|
}
|
|
return true;
|
|
}
|
|
|
|
/* 80302BE8-80302C88 2FD528 00A0+00 1/1 0/0 0/0 .text
|
|
* isSetBlackWhite__11J2DWindowExCFQ28JUtility6TColorQ28JUtility6TColor */
|
|
bool J2DWindowEx::isSetBlackWhite(JUtility::TColor param_0, JUtility::TColor param_1) const {
|
|
if ((u32)param_0 == 0 && (u32)param_1 == 0xffffffff) {
|
|
return true;
|
|
}
|
|
for (int i = 0; i < 4; i++) {
|
|
if (mFrameMaterial[i]->getTevBlock()->getMaxStage() == 1) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
/* 80302C88-80302CE8 2FD5C8 0060+00 1/0 0/0 0/0 .text getBlack__11J2DWindowExCFv */
|
|
JUtility::TColor J2DWindowEx::getBlack() const {
|
|
JUtility::TColor black, white;
|
|
if (!getBlackWhite(&black, &white)) {
|
|
return JUtility::TColor(0);
|
|
}
|
|
|
|
return black;
|
|
}
|
|
|
|
/* 80302CE8-80302D48 2FD628 0060+00 1/0 0/0 0/0 .text getWhite__11J2DWindowExCFv */
|
|
JUtility::TColor J2DWindowEx::getWhite() const {
|
|
JUtility::TColor black, white;
|
|
if (!getBlackWhite(&black, &white)) {
|
|
return JUtility::TColor(0xffffffff);
|
|
}
|
|
|
|
return white;
|
|
}
|
|
|
|
/* 80302D48-80302D98 2FD688 0050+00 1/0 0/0 0/0 .text setAlpha__11J2DWindowExFUc */
|
|
void J2DWindowEx::setAlpha(u8 param_0) {
|
|
mAlpha = param_0;
|
|
|
|
for (int i = 0; i < 4; i++) {
|
|
if (mFrameMaterial[i] != NULL) {
|
|
if (mFrameMaterial[i]->getColorBlock()->getMatColor(0) != NULL) {
|
|
mFrameMaterial[i]->getColorBlock()->getMatColor(0)->a = param_0;
|
|
}
|
|
}
|
|
}
|
|
|
|
if (mContentsMaterial != NULL) {
|
|
if (mContentsMaterial->getColorBlock()->getMatColor(0) != 0) {
|
|
mContentsMaterial->getColorBlock()->getMatColor(0)->a = param_0;
|
|
}
|
|
}
|
|
}
|
|
|
|
/* 80302D98-80302DF4 2FD6D8 005C+00 1/0 0/0 0/0 .text setCullBack__11J2DWindowExF11_GXCullMode */
|
|
void J2DWindowEx::setCullBack(_GXCullMode param_0) {
|
|
mCullMode = param_0;
|
|
|
|
for (int i = 0; i < 4; i++) {
|
|
if (mFrameMaterial[i] != NULL) {
|
|
mFrameMaterial[i]->getColorBlock()->setCullMode(param_0);
|
|
}
|
|
}
|
|
|
|
if (mContentsMaterial != NULL) {
|
|
mContentsMaterial->getColorBlock()->setCullMode(param_0);
|
|
}
|
|
J2DPane::setCullBack(param_0);
|
|
}
|
|
|
|
/* 80302DF4-80302E0C 2FD734 0018+00 1/0 0/0 0/0 .text rewriteAlpha__11J2DWindowExFv */
|
|
void J2DWindowEx::rewriteAlpha() {
|
|
if (mContentsMaterial != NULL) {
|
|
mAlpha = mContentsMaterial->getColorBlock()->getMatColor(0)->a;
|
|
}
|
|
}
|
|
|
|
/* 80302E0C-80302E74 2FD74C 0068+00 1/0 0/0 0/0 .text getFrameTexture__11J2DWindowExCFUcUc */
|
|
JUTTexture* J2DWindowEx::getFrameTexture(u8 param_0, u8 param_1) const {
|
|
J2DMaterial* frameMaterial = getFrameMaterial(param_0);
|
|
if (frameMaterial != NULL && frameMaterial->getTevBlock() != NULL) {
|
|
return frameMaterial->getTevBlock()->getTexture(param_1);
|
|
}
|
|
return NULL;
|
|
}
|
|
|
|
/* 80302E74-80302EDC 2FD7B4 0068+00 1/0 0/0 0/0 .text getContentsTexture__11J2DWindowExCFUc */
|
|
JUTTexture* J2DWindowEx::getContentsTexture(u8 param_0) const {
|
|
J2DMaterial* frameMaterial = getContentsMaterial();
|
|
if (frameMaterial != NULL && frameMaterial->getTevBlock() != NULL) {
|
|
return frameMaterial->getTevBlock()->getTexture(param_0);
|
|
}
|
|
return NULL;
|
|
}
|
|
|
|
/* 80302EDC-80302FFC 2FD81C 0120+00 1/0 0/0 0/0 .text isUsed__11J2DWindowExFPC7ResTIMG */
|
|
bool J2DWindowEx::isUsed(ResTIMG const* timg) {
|
|
for (u8 i = 0; i < 4; i++) {
|
|
if (mFrameMaterial[i] != NULL && mFrameMaterial[i]->getTevBlock() != NULL) {
|
|
for (u32 j = 0; j < 8; j++) {
|
|
JUTTexture* texture = mFrameMaterial[i]->getTevBlock()->getTexture(j);
|
|
if (texture != NULL && texture->getTexInfo() == timg) {
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if (mContentsMaterial != NULL && mContentsMaterial->getTevBlock() != NULL) {
|
|
for (u32 j = 0; j < 8; j++) {
|
|
JUTTexture* texture = mContentsMaterial->getTevBlock()->getTexture(j);
|
|
if (texture != NULL && texture->getTexInfo() == timg) {
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
|
|
return J2DPane::isUsed(timg);
|
|
}
|
|
|
|
/* 80302FFC-80303084 2FD93C 0088+00 1/0 0/0 0/0 .text setAnimation__11J2DWindowExFP11J2DAnmColor
|
|
*/
|
|
void J2DWindowEx::setAnimation(J2DAnmColor* anmColor) {
|
|
for (u8 i = 0; i < 4; i++) {
|
|
if (isNeedSetAnm(i)) {
|
|
mFrameMaterial[i]->setAnimation(anmColor);
|
|
}
|
|
}
|
|
if (mContentsMaterial != NULL) {
|
|
mContentsMaterial->setAnimation(anmColor);
|
|
}
|
|
}
|
|
|
|
/* 80303084-8030310C 2FD9C4 0088+00 1/0 0/0 0/0 .text
|
|
* setAnimation__11J2DWindowExFP19J2DAnmTextureSRTKey */
|
|
void J2DWindowEx::setAnimation(J2DAnmTextureSRTKey* param_0) {
|
|
for (u8 i = 0; i < 4; i++) {
|
|
if (isNeedSetAnm(i)) {
|
|
mFrameMaterial[i]->setAnimation(param_0);
|
|
}
|
|
}
|
|
if (mContentsMaterial != NULL) {
|
|
mContentsMaterial->setAnimation(param_0);
|
|
}
|
|
}
|
|
|
|
/* 8030310C-80303194 2FDA4C 0088+00 1/0 0/0 0/0 .text
|
|
* setAnimation__11J2DWindowExFP16J2DAnmTexPattern */
|
|
void J2DWindowEx::setAnimation(J2DAnmTexPattern* param_0) {
|
|
for (u8 i = 0; i < 4; i++) {
|
|
if (isNeedSetAnm(i)) {
|
|
mFrameMaterial[i]->setAnimation(param_0);
|
|
}
|
|
}
|
|
if (mContentsMaterial != NULL) {
|
|
mContentsMaterial->setAnimation(param_0);
|
|
}
|
|
}
|
|
|
|
/* 80303194-8030321C 2FDAD4 0088+00 1/0 0/0 0/0 .text
|
|
* setAnimation__11J2DWindowExFP15J2DAnmTevRegKey */
|
|
void J2DWindowEx::setAnimation(J2DAnmTevRegKey* param_0) {
|
|
for (u8 i = 0; i < 4; i++) {
|
|
if (isNeedSetAnm(i)) {
|
|
mFrameMaterial[i]->setAnimation(param_0);
|
|
}
|
|
}
|
|
if (mContentsMaterial != NULL) {
|
|
mContentsMaterial->setAnimation(param_0);
|
|
}
|
|
}
|
|
|
|
/* 8030321C-80303274 2FDB5C 0058+00 4/4 0/0 0/0 .text isNeedSetAnm__11J2DWindowExFUc */
|
|
bool J2DWindowEx::isNeedSetAnm(u8 param_0) {
|
|
for (u8 i = 0; i < param_0; i++) {
|
|
if (mFrameMaterial[i] == mFrameMaterial[param_0]) {
|
|
return false;
|
|
}
|
|
}
|
|
return mFrameMaterial[param_0] != NULL;
|
|
}
|
|
|
|
/* 80303274-8030327C -00001 0008+00 0/0 0/0 0/0 .text
|
|
* setAnimation__11J2DWindowExFP20J2DAnmVisibilityFull */
|
|
void J2DWindowEx::setAnimation(J2DAnmVisibilityFull* param_0) {
|
|
mAnmVisibilityFull = param_0;
|
|
}
|
|
|
|
/* 8030327C-80303370 2FDBBC 00F4+00 1/0 0/0 0/0 .text
|
|
* setAnimation__11J2DWindowExFP14J2DAnmVtxColor */
|
|
void J2DWindowEx::setAnimation(J2DAnmVtxColor* param_0) {
|
|
mAnmVtxColor = param_0;
|
|
field_0x17c = 0;
|
|
if (param_0 != NULL) {
|
|
u16 uVar3 = param_0->getAnmTableNum(0);
|
|
for (u8 i = 0; i < 4; i++) {
|
|
if (field_0x168[i] != 0xffff) {
|
|
for (u16 j = 0; j < uVar3; j++) {
|
|
J3DAnmVtxColorIndexDataItem* puVar1 = param_0->getAnmVtxColorIndexData(0, j);
|
|
u16* indexPointer = param_0->getVtxColorIndexPointer(0);
|
|
u16* indexPointer2 = indexPointer + puVar1->offset;
|
|
for (u16 k = 0; k < puVar1->count; k++) {
|
|
if (indexPointer2[k] == field_0x168[i]) {
|
|
mAnmVtxColor = param_0;
|
|
field_0x17c |= 1 << i;
|
|
goto nexti;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
nexti:;
|
|
}
|
|
}
|
|
|
|
if (field_0x17c == 0) {
|
|
mAnmVtxColor = NULL;
|
|
}
|
|
}
|
|
|
|
/* ############################################################################################## */
|
|
/* 803A1C70-803A1C80 02E2D0 0010+00 0/0 0/0 0/0 .rodata @1557 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_RODATA static u8 const lit_1557[16] = {
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
};
|
|
COMPILER_STRIP_GATE(0x803A1C70, &lit_1557);
|
|
#pragma pop
|
|
|
|
/* 803A1C80-803A1C90 02E2E0 0010+00 0/0 0/0 0/0 .rodata @1566 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_RODATA static u8 const lit_1566[16] = {
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
};
|
|
COMPILER_STRIP_GATE(0x803A1C80, &lit_1566);
|
|
#pragma pop
|
|
|
|
/* 803A1C90-803A1CA0 02E2F0 0010+00 0/0 0/0 0/0 .rodata @1575 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_RODATA static u8 const lit_1575[16] = {
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
};
|
|
COMPILER_STRIP_GATE(0x803A1C90, &lit_1575);
|
|
#pragma pop
|
|
|
|
/* 803A1CA0-803A1CB0 02E300 0010+00 0/0 0/0 0/0 .rodata @1581 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_RODATA static u8 const lit_1581[16] = {
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
};
|
|
COMPILER_STRIP_GATE(0x803A1CA0, &lit_1581);
|
|
#pragma pop
|
|
|
|
/* 803A1CB0-803A1CC0 02E310 0010+00 0/0 0/0 0/0 .rodata @1587 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_RODATA static u8 const lit_1587[16] = {
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
};
|
|
COMPILER_STRIP_GATE(0x803A1CB0, &lit_1587);
|
|
#pragma pop
|
|
|
|
/* 803A1CC0-803A1CD0 02E320 0010+00 0/0 0/0 0/0 .rodata @1596 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_RODATA static u8 const lit_1596[16] = {
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
};
|
|
COMPILER_STRIP_GATE(0x803A1CC0, &lit_1596);
|
|
#pragma pop
|
|
|
|
/* 803A1CD0-803A1CE0 02E330 0010+00 0/0 0/0 0/0 .rodata @1605 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_RODATA static u8 const lit_1605[16] = {
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
};
|
|
COMPILER_STRIP_GATE(0x803A1CD0, &lit_1605);
|
|
#pragma pop
|
|
|
|
/* 803A1CE0-803A1CF0 02E340 0010+00 0/0 0/0 0/0 .rodata @1612 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_RODATA static u8 const lit_1612[16] = {
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
};
|
|
COMPILER_STRIP_GATE(0x803A1CE0, &lit_1612);
|
|
#pragma pop
|
|
|
|
/* 803A1CF0-803A1D08 02E350 0018+00 0/0 0/0 0/0 .rodata @2530 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_RODATA static u8 const lit_2530[24] = {
|
|
0x0F, 0x08, 0x0A, 0x0F, 0x0F, 0x08, 0x0A, 0x0F, 0x0F, 0x0A, 0x00, 0x0F,
|
|
0x02, 0x04, 0x08, 0x0F, 0x02, 0x04, 0x08, 0x0F, 0x0F, 0x0F, 0x0F, 0x0A,
|
|
};
|
|
COMPILER_STRIP_GATE(0x803A1CF0, &lit_2530);
|
|
#pragma pop
|
|
|
|
/* 803A1D08-803A1D20 02E368 0018+00 0/0 0/0 0/0 .rodata @2531 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_RODATA static u8 const lit_2531[24] = {
|
|
0x07, 0x04, 0x05, 0x07, 0x05, 0x07, 0x07, 0x07, 0x07, 0x05, 0x00, 0x07,
|
|
0x01, 0x02, 0x04, 0x07, 0x07, 0x07, 0x07, 0x02, 0x07, 0x07, 0x07, 0x05,
|
|
};
|
|
COMPILER_STRIP_GATE(0x803A1D08, &lit_2531);
|
|
#pragma pop
|
|
|
|
/* 803A1D20-803A1D40 02E380 001E+02 0/0 0/0 0/0 .rodata @2532 */
|
|
#pragma push
|
|
#pragma force_active on
|
|
SECTION_RODATA static u8 const lit_2532[30 + 2 /* padding */] = {
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x01,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x01,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x01,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x01,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x01,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x01,
|
|
0x00,
|
|
/* padding */
|
|
0x00,
|
|
0x00,
|
|
};
|
|
COMPILER_STRIP_GATE(0x803A1D20, &lit_2532);
|
|
#pragma pop
|
|
|
|
/* 80303370-80303510 2FDCB0 01A0+00 1/0 0/0 0/0 .text
|
|
* animationPane__11J2DWindowExFPC15J2DAnmTransform */
|
|
const J2DAnmTransform* J2DWindowEx::animationPane(J2DAnmTransform const* param_0) {
|
|
if (mAnmVisibilityFull != 0 && field_0x166 != 0xffff) {
|
|
u8 visibility;
|
|
mAnmVisibilityFull->getVisibility(field_0x166, &visibility);
|
|
if (visibility) {
|
|
J2DPane::show();
|
|
} else {
|
|
J2DPane::hide();
|
|
}
|
|
}
|
|
|
|
JUtility::TColor* local_38[4] = {NULL};
|
|
local_38[0] = &field_0x128;
|
|
local_38[1] = &field_0x12C;
|
|
local_38[2] = &field_0x130;
|
|
local_38[3] = &field_0x134;
|
|
if (mAnmVtxColor != NULL) {
|
|
u16 uVar3 = mAnmVtxColor->getAnmTableNum(0);
|
|
for (u8 i = 0; i < 4; i++) {
|
|
if ((field_0x17c & (1 << i))) {
|
|
for (u16 j = 0; j < uVar3; j++) {
|
|
J3DAnmVtxColorIndexDataItem* puVar1 = mAnmVtxColor->getAnmVtxColorIndexData(0, j);
|
|
u16* indexPointer = mAnmVtxColor->getVtxColorIndexPointer(0);
|
|
u16* indexPointer2 = indexPointer + puVar1->offset;
|
|
for (u16 k = 0; k < puVar1->count; k++) {
|
|
if (indexPointer2[k] == field_0x168[i]) {
|
|
mAnmVtxColor->getColor(0, j, local_38[i]);
|
|
goto nexti;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
nexti:;
|
|
}
|
|
}
|
|
return J2DPane::animationPane(param_0);
|
|
}
|
|
|
|
/* 80303510-80303534 2FDE50 0024+00 1/0 0/0 0/0 .text getFrameMaterial__11J2DWindowExCFUc
|
|
*/
|
|
J2DMaterial* J2DWindowEx::getFrameMaterial(u8 index) const {
|
|
if (index >= 4) {
|
|
return NULL;
|
|
}
|
|
|
|
return mFrameMaterial[index];
|
|
}
|
|
|
|
/* 80303534-8030353C 2FDE74 0008+00 1/0 0/0 0/0 .text getContentsMaterial__11J2DWindowExCFv */
|
|
J2DMaterial* J2DWindowEx::getContentsMaterial() const {
|
|
return mContentsMaterial;
|
|
}
|
|
|
|
/* 8030353C-80303568 2FDE7C 002C+00 1/0 0/0 0/0 .text
|
|
* getMaterial__11J2DWindowExCFRQ29J2DWindow9TMaterial */
|
|
void J2DWindowEx::getMaterial(J2DWindow::TMaterial& param_0) const {
|
|
param_0.field_0x0 = mFrameMaterial[0];
|
|
param_0.field_0x4 = mFrameMaterial[1];
|
|
param_0.field_0x8 = mFrameMaterial[2];
|
|
param_0.field_0xc = mFrameMaterial[3];
|
|
param_0.field_0x10 = mContentsMaterial;
|
|
}
|
|
|
|
/* 80303568-803035C0 2FDEA8 0058+00 1/0 0/0 0/0 .text draw__11J2DWindowExFffff */
|
|
void J2DWindowEx::draw(f32 param_0, f32 param_1, f32 param_2, f32 param_3) {
|
|
draw(JGeometry::TBox2<f32>(JGeometry::TVec2<f32>(param_0, param_1),
|
|
JGeometry::TVec2<f32>(param_0 + param_2, param_1 + param_3)));
|
|
}
|
|
|
|
/* 803035C0-803035FC 2FDF00 003C+00 1/0 0/0 0/0 .text setCullBack__11J2DWindowExFb */
|
|
void J2DWindowEx::setCullBack(bool param_0) {
|
|
_GXCullMode mode;
|
|
if (param_0) {
|
|
mode = GX_CULL_BACK;
|
|
} else {
|
|
mode = GX_CULL_NONE;
|
|
}
|
|
setCullBack(mode);
|
|
}
|
|
|
|
/* 803035FC-8030361C 2FDF3C 0020+00 1/0 0/0 0/0 .text isUsed__11J2DWindowExFPC7ResFONT */
|
|
bool J2DWindowEx::isUsed(ResFONT const* param_0) {
|
|
return J2DPane::isUsed(param_0);
|
|
}
|
|
|
|
/* 8030361C-8030363C 2FDF5C 0020+00 1/0 0/0 0/0 .text setAnimation__11J2DWindowExFP10J2DAnmBase */
|
|
void J2DWindowEx::setAnimation(J2DAnmBase* param_0) {
|
|
J2DPane::setAnimation(param_0);
|
|
}
|
|
|
|
/* 8030363C-80303640 2FDF7C 0004+00 0/0 1/0 0/0 .text getColor__14J2DAnmVtxColorCFUcUsP8_GXColor
|
|
*/
|
|
// void J2DAnmVtxColor::getColor(u8 param_0, u16 param_1, _GXColor* param_2) const {
|
|
extern "C" void getColor__14J2DAnmVtxColorCFUcUsP8_GXColor() {
|
|
/* empty function */
|
|
}
|