mirror of
https://github.com/zeldaret/tp
synced 2026-07-08 14:36:36 -04:00
d_a_tag_shop_camera OK, d_a_tag_watchge OK, JUTFader OK, JUtility work from Pikmin 2 (#292)
This commit is contained in:
@@ -1,40 +1,10 @@
|
||||
//
|
||||
// Generated By: dol2asm
|
||||
// Translation Unit: JUTFader
|
||||
//
|
||||
/**
|
||||
* JUTFader.cpp
|
||||
* JUtility - Color Fader
|
||||
*/
|
||||
|
||||
#include "JSystem/JUtility/JUTFader.h"
|
||||
#include "JSystem/J2DGraph/J2DOrthoGraph.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void __ct__8JUTFaderFiiiiQ28JUtility6TColor();
|
||||
extern "C" void control__8JUTFaderFv();
|
||||
extern "C" void draw__8JUTFaderFv();
|
||||
extern "C" void startFadeIn__8JUTFaderFi();
|
||||
extern "C" void startFadeOut__8JUTFaderFi();
|
||||
extern "C" void setStatus__8JUTFaderFQ28JUTFader7EStatusi();
|
||||
extern "C" void __dt__8JUTFaderFv();
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void
|
||||
setColor__14J2DGrafContextFQ28JUtility6TColorQ28JUtility6TColorQ28JUtility6TColorQ28JUtility6TColor();
|
||||
extern "C" void func_802E9260();
|
||||
extern "C" void __ct__13J2DOrthoGraphFv();
|
||||
extern "C" extern void* __vt__14J2DGrafContext[10];
|
||||
extern "C" extern void* __vt__13J2DOrthoGraph[10];
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* 802E5530-802E55DC 2DFE70 00AC+00 0/0 1/1 0/0 .text __ct__8JUTFaderFiiiiQ28JUtility6TColor */
|
||||
JUTFader::JUTFader(int x, int y, int width, int height, JUtility::TColor pColor)
|
||||
@@ -47,101 +17,103 @@ JUTFader::JUTFader(int x, int y, int width, int height, JUtility::TColor pColor)
|
||||
}
|
||||
|
||||
/* 802E55DC-802E56DC 2DFF1C 0100+00 0/0 1/1 0/0 .text control__8JUTFaderFv */
|
||||
#ifdef NONMATCHING
|
||||
void JUTFader::control() {
|
||||
s32 tmp = mEStatus;
|
||||
if (mEStatus >= 0) {
|
||||
mEStatus--;
|
||||
if (tmp == 0) {
|
||||
mStatus = field_0x24;
|
||||
}
|
||||
}
|
||||
switch (mStatus) {
|
||||
if (0 <= mEStatus && mEStatus-- == 0) {
|
||||
mStatus = field_0x24;
|
||||
}
|
||||
|
||||
if (mStatus == 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (mStatus) {
|
||||
case 0:
|
||||
mColor.a = -1;
|
||||
case 1:
|
||||
mColor.a = 0xFF;
|
||||
break;
|
||||
case 2:
|
||||
field_0xa++;
|
||||
mColor.a = (255 - (255 / field_0x8));
|
||||
mColor.a = 0xFF - ((++field_0xa * 0xFF) / field_0x8);
|
||||
|
||||
if (field_0xa >= field_0x8) {
|
||||
mStatus = 1;
|
||||
}
|
||||
|
||||
break;
|
||||
case 3:
|
||||
field_0xa++;
|
||||
mColor.a = (255 / field_0x8);
|
||||
mColor.a = ((++field_0xa * 0xFF) / field_0x8);
|
||||
|
||||
if (field_0xa >= field_0x8) {
|
||||
mStatus = 0;
|
||||
}
|
||||
default:
|
||||
draw();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
draw();
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTFader::control() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTFader/control__8JUTFaderFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 802E56DC-802E576C 2E001C 0090+00 1/0 0/0 0/0 .text draw__8JUTFaderFv */
|
||||
#ifdef NONMATCHING
|
||||
void JUTFader::draw() {
|
||||
if (mColor.a != 0) {
|
||||
J2DOrthoGraph ortho;
|
||||
JUtility::TColor tmp = mColor;
|
||||
ortho.setColor(tmp, tmp, tmp, tmp);
|
||||
ortho.fillBox(mBox);
|
||||
}
|
||||
if (mColor.a == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
J2DOrthoGraph orthograph;
|
||||
orthograph.setColor(mColor);
|
||||
orthograph.fillBox(mBox);
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTFader::draw() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTFader/draw__8JUTFaderFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 802E576C-802E579C 2E00AC 0030+00 1/0 0/0 0/0 .text startFadeIn__8JUTFaderFi */
|
||||
bool JUTFader::startFadeIn(int param_0) {
|
||||
bool statusCheck = mStatus == 0;
|
||||
|
||||
if (statusCheck) {
|
||||
mStatus = 2;
|
||||
field_0xa = 0;
|
||||
field_0x8 = param_0;
|
||||
}
|
||||
|
||||
return statusCheck;
|
||||
}
|
||||
|
||||
/* 802E579C-802E57D0 2E00DC 0034+00 1/0 0/0 0/0 .text startFadeOut__8JUTFaderFi */
|
||||
bool JUTFader::startFadeOut(int param_0) {
|
||||
bool statusCheck = mStatus == 1;
|
||||
|
||||
if (statusCheck) {
|
||||
mStatus = 3;
|
||||
field_0xa = 0;
|
||||
field_0x8 = param_0;
|
||||
}
|
||||
|
||||
return statusCheck;
|
||||
}
|
||||
|
||||
/* 802E57D0-802E5840 2E0110 0070+00 0/0 1/1 0/0 .text setStatus__8JUTFaderFQ28JUTFader7EStatusi */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTFader::setStatus(JUTFader::EStatus param_0, int param_1) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTFader/setStatus__8JUTFaderFQ28JUTFader7EStatusi.s"
|
||||
void JUTFader::setStatus(JUTFader::EStatus i_status, int param_1) {
|
||||
switch (i_status) {
|
||||
case 0:
|
||||
if (param_1 != 0) {
|
||||
field_0x24 = 0;
|
||||
mEStatus = param_1;
|
||||
break;
|
||||
}
|
||||
|
||||
mStatus = 0;
|
||||
field_0x24 = 0;
|
||||
mEStatus = 0;
|
||||
break;
|
||||
case 1:
|
||||
if (param_1 != 0) {
|
||||
field_0x24 = 1;
|
||||
mEStatus = param_1;
|
||||
break;
|
||||
}
|
||||
|
||||
mStatus = 1;
|
||||
field_0x24 = 1;
|
||||
mEStatus = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802E5840-802E5888 2E0180 0048+00 1/0 0/0 0/0 .text __dt__8JUTFaderFv */
|
||||
JUTFader::~JUTFader() {}
|
||||
|
||||
Reference in New Issue
Block a user