mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-05 10:47:27 -04:00
178194ccb2
* switch to dtk setup * some cleanup / fixes * cleanup d_a_alink literals * Restore doxygen, update CI & README.md (#1) * Fix build image ref (#2) --------- Co-authored-by: Luke Street <luke@street.dev>
258 lines
8.4 KiB
C++
258 lines
8.4 KiB
C++
/**
|
|
* This should match once the padding for dDlst_FileWarn_c's vtable can be figured out
|
|
*/
|
|
|
|
//
|
|
// Generated By: dol2asm
|
|
// Translation Unit: d/file/d_file_sel_warning
|
|
//
|
|
|
|
#include "d/d_file_sel_warning.h"
|
|
#include "d/d_msg_string.h"
|
|
#include "d/d_pane_class.h"
|
|
#include "JSystem/J2DGraph/J2DScreen.h"
|
|
#include "JSystem/J2DGraph/J2DAnmLoader.h"
|
|
#include "JSystem/J2DGraph/J2DTextBox.h"
|
|
#include "d/d_com_inf_game.h"
|
|
#include "dol2asm.h"
|
|
|
|
//
|
|
// Forward References:
|
|
//
|
|
|
|
extern "C" void __ct__15dFile_warning_cFP10JKRArchiveUc();
|
|
extern "C" void __dt__15dFile_warning_cFv();
|
|
extern "C" void screenSet__15dFile_warning_cFv();
|
|
extern "C" void _move__15dFile_warning_cFv();
|
|
extern "C" void modeWait__15dFile_warning_cFv();
|
|
extern "C" void modeMove__15dFile_warning_cFv();
|
|
extern "C" void baseMoveAnm__15dFile_warning_cFv();
|
|
extern "C" void openInit__15dFile_warning_cFv();
|
|
extern "C" void closeInit__15dFile_warning_cFv();
|
|
extern "C" void init__15dFile_warning_cFv();
|
|
extern "C" void _draw__15dFile_warning_cFv();
|
|
extern "C" void drawSelf__15dFile_warning_cFv();
|
|
extern "C" void setText__15dFile_warning_cFUl();
|
|
extern "C" void setFontColor__15dFile_warning_cFQ28JUtility6TColorQ28JUtility6TColor();
|
|
extern "C" void setBlackWhite__10J2DTextBoxFQ28JUtility6TColorQ28JUtility6TColor();
|
|
extern "C" void draw__16dDlst_FileWarn_cFv();
|
|
extern "C" void __sinit_d_file_sel_warning_cpp();
|
|
extern "C" void __dt__16dDlst_FileWarn_cFv();
|
|
extern "C" void setAnimation__9J2DScreenFP15J2DAnmTransform();
|
|
extern "C" extern char const* const d_file_d_file_sel_warning__stringBase0;
|
|
|
|
//
|
|
// External References:
|
|
//
|
|
|
|
extern "C" void mDoExt_getMesgFont__Fv();
|
|
extern "C" void mDoExt_removeMesgFont__Fv();
|
|
extern "C" void set__12dDlst_list_cFRPP12dDlst_base_cRPP12dDlst_base_cP12dDlst_base_c();
|
|
extern "C" void __ct__12dMsgString_cFv();
|
|
extern "C" void __dt__12dMsgString_cFv();
|
|
extern "C" void __ct__8CPaneMgrFP9J2DScreenUxUcP10JKRExpHeap();
|
|
extern "C" void* __nw__FUl();
|
|
extern "C" void __dl__FPv();
|
|
extern "C" void getGlbResource__13JKRFileLoaderFPCcP13JKRFileLoader();
|
|
extern "C" void setAnimation__7J2DPaneFP15J2DAnmTransform();
|
|
extern "C" void __ct__9J2DScreenFv();
|
|
extern "C" void setPriority__9J2DScreenFPCcUlP10JKRArchive();
|
|
extern "C" void draw__9J2DScreenFffPC14J2DGrafContext();
|
|
extern "C" void animation__9J2DScreenFv();
|
|
extern "C" void setString__10J2DTextBoxFsPCce();
|
|
extern "C" void load__20J2DAnmLoaderDataBaseFPCv();
|
|
extern "C" void __ptmf_scall();
|
|
extern "C" extern void* __vt__12dDlst_base_c[3];
|
|
|
|
//
|
|
// Declarations:
|
|
//
|
|
|
|
/* ############################################################################################## */
|
|
/* 803BB410-803BB41C 018530 000C+00 1/1 0/0 0/0 .data cNullVec__6Z2Calc */
|
|
SECTION_DATA static u8 cNullVec__6Z2Calc[12] = {
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
};
|
|
|
|
/* 803BB434-803BB44C 018554 0018+00 1/2 0/0 0/0 .data fileWarningProc */
|
|
typedef void (dFile_warning_c::*procFunc)();
|
|
static procFunc fileWarningProc[] = {&dFile_warning_c::modeWait, &dFile_warning_c::modeMove};
|
|
|
|
/* 80191BAC-80191C18 18C4EC 006C+00 0/0 3/3 0/0 .text __ct__15dFile_warning_cFP10JKRArchiveUc */
|
|
dFile_warning_c::dFile_warning_c(JKRArchive* i_archive, u8 param_1) {
|
|
mpArchive = i_archive;
|
|
field_0x3e = param_1;
|
|
|
|
screenSet();
|
|
field_0x18 = 0;
|
|
mPosY = 0.0f;
|
|
}
|
|
|
|
/* 80191C18-80191CF4 18C558 00DC+00 1/0 0/0 0/0 .text __dt__15dFile_warning_cFv */
|
|
dFile_warning_c::~dFile_warning_c() {
|
|
delete mFileWarn.mMsgString;
|
|
delete mFileWarn.Scr;
|
|
delete field_0x24;
|
|
delete mpRootPane;
|
|
|
|
mDoExt_removeMesgFont();
|
|
}
|
|
|
|
/* 80191CF4-80191F18 18C634 0224+00 1/1 0/0 0/0 .text screenSet__15dFile_warning_cFv */
|
|
void dFile_warning_c::screenSet() {
|
|
const char* blo_name[] = {
|
|
"zelda_file_select_warning_window.blo",
|
|
"zelda_option_set_up_window.blo",
|
|
};
|
|
|
|
const char* bck_name[] = {
|
|
"zelda_file_select_warning_window.bck",
|
|
"zelda_option_set_up_window.bck",
|
|
};
|
|
|
|
mFileWarn.Scr = new J2DScreen();
|
|
JUT_ASSERT(mFileWarn.Scr != 0);
|
|
|
|
mFileWarn.mMsgString = new dMsgString_c();
|
|
JUT_ASSERT(mFileWarn.mMsgString != 0);
|
|
|
|
mFileWarn.Scr->setPriority(blo_name[field_0x3e], 0x100000, mpArchive);
|
|
|
|
field_0x24 = (J2DAnmTransform*)J2DAnmLoaderDataBase::load(
|
|
JKRGetNameResource(bck_name[field_0x3e], mpArchive));
|
|
mFileWarn.Scr->setAnimation(field_0x24);
|
|
field_0x24->setFrame(2849.0f);
|
|
mFileWarn.Scr->animation();
|
|
|
|
mFileWarn.mFont = mDoExt_getMesgFont();
|
|
mpRootPane = new CPaneMgr(mFileWarn.Scr, 'Nm_02', 0, NULL);
|
|
JUT_ASSERT(mpRootPane != 0);
|
|
field_0x34 = mpRootPane->getTranslateY();
|
|
|
|
mFileWarn.Scr->search('w_msg_jp')->hide();
|
|
mFileWarn.Scr->search('ms_for_2')->hide();
|
|
|
|
field_0x20 = static_cast<J2DTextBox*>(mFileWarn.Scr->search('ms_for_3'));
|
|
field_0x20->show();
|
|
field_0x20->setFont(mFileWarn.mFont);
|
|
field_0x20->setString(0x200, "");
|
|
mFileWarn.mMsgString->getString(0x53, field_0x20, NULL, mFileWarn.mFont, NULL, 0);
|
|
}
|
|
|
|
/* 80191F18-80191F90 18C858 0078+00 0/0 6/6 0/0 .text _move__15dFile_warning_cFv */
|
|
void dFile_warning_c::_move() {
|
|
(this->*fileWarningProc[field_0x18])();
|
|
|
|
if (mPosY != 0.0f) {
|
|
mpRootPane->translate(mpRootPane->getTranslateX(), mPosY - field_0x34);
|
|
}
|
|
}
|
|
|
|
/* 80191F90-80191F94 18C8D0 0004+00 1/0 0/0 0/0 .text modeWait__15dFile_warning_cFv */
|
|
void dFile_warning_c::modeWait() {}
|
|
|
|
/* 80191F94-80191FD4 18C8D4 0040+00 1/0 0/0 0/0 .text modeMove__15dFile_warning_cFv */
|
|
void dFile_warning_c::modeMove() {
|
|
if (baseMoveAnm() == true) {
|
|
field_0x18 = 0;
|
|
}
|
|
}
|
|
|
|
/* 80191FD4-801920B8 18C914 00E4+00 1/1 0/0 0/0 .text baseMoveAnm__15dFile_warning_cFv */
|
|
bool dFile_warning_c::baseMoveAnm() {
|
|
bool rt;
|
|
|
|
if (field_0x28 != field_0x2c) {
|
|
if (field_0x28 < field_0x2c) {
|
|
field_0x28 += 2;
|
|
|
|
if (field_0x28 > field_0x2c) {
|
|
field_0x28 = field_0x2c;
|
|
}
|
|
} else {
|
|
field_0x28 -= 2;
|
|
|
|
if (field_0x28 < field_0x2c) {
|
|
field_0x28 = field_0x2c;
|
|
}
|
|
}
|
|
|
|
field_0x24->setFrame(field_0x28);
|
|
mFileWarn.Scr->animation();
|
|
rt = false;
|
|
}
|
|
|
|
if (field_0x28 == field_0x2c) {
|
|
if (field_0x28 == 2859) {
|
|
field_0x3c = 1;
|
|
} else {
|
|
field_0x3c = 0;
|
|
}
|
|
|
|
mStatus = 1;
|
|
rt = true;
|
|
}
|
|
|
|
return rt;
|
|
}
|
|
|
|
/* 801920B8-8019210C 18C9F8 0054+00 0/0 5/5 0/0 .text openInit__15dFile_warning_cFv */
|
|
void dFile_warning_c::openInit() {
|
|
field_0x28 = 2849;
|
|
field_0x2c = 2859;
|
|
field_0x24->setFrame(field_0x28);
|
|
|
|
mStatus = 0;
|
|
field_0x18 = 1;
|
|
}
|
|
|
|
/* 8019210C-80192160 18CA4C 0054+00 0/0 6/6 0/0 .text closeInit__15dFile_warning_cFv */
|
|
void dFile_warning_c::closeInit() {
|
|
field_0x28 = 2859;
|
|
field_0x2c = 2849;
|
|
field_0x24->setFrame(field_0x28);
|
|
|
|
mStatus = 0;
|
|
field_0x18 = 1;
|
|
}
|
|
|
|
/* 80192160-80192190 18CAA0 0030+00 0/0 4/4 0/0 .text init__15dFile_warning_cFv */
|
|
void dFile_warning_c::init() {
|
|
field_0x24->setFrame(2849.0f);
|
|
mFileWarn.Scr->animation();
|
|
}
|
|
|
|
/* 80192190-801921CC 18CAD0 003C+00 0/0 2/2 0/0 .text _draw__15dFile_warning_cFv */
|
|
void dFile_warning_c::_draw() {
|
|
dComIfGd_set2DOpa(&mFileWarn);
|
|
}
|
|
|
|
/* 801921CC-801921F8 18CB0C 002C+00 0/0 1/1 0/0 .text drawSelf__15dFile_warning_cFv */
|
|
void dFile_warning_c::drawSelf() {
|
|
mFileWarn.draw();
|
|
}
|
|
|
|
/* 801921F8-80192240 18CB38 0048+00 0/0 1/1 0/0 .text setText__15dFile_warning_cFUl */
|
|
void dFile_warning_c::setText(u32 param_0) {
|
|
mFileWarn.mMsgString->getString(param_0, field_0x20, NULL, mFileWarn.mFont, NULL, 0);
|
|
}
|
|
|
|
/* 80192240-8019230C 18CB80 00CC+00 0/0 1/1 0/0 .text
|
|
* setFontColor__15dFile_warning_cFQ28JUtility6TColorQ28JUtility6TColor */
|
|
void dFile_warning_c::setFontColor(JUtility::TColor param_0, JUtility::TColor param_1) {
|
|
field_0x20->setBlackWhite(param_0, param_1);
|
|
field_0x20->setFontColor(JUtility::TColor(255, 255, 255, 255),
|
|
JUtility::TColor(255, 255, 255, 255));
|
|
}
|
|
|
|
/* 8019230C-80192354 18CC4C 0048+00 0/0 1/0 0/0 .text
|
|
* setBlackWhite__10J2DTextBoxFQ28JUtility6TColorQ28JUtility6TColor */
|
|
bool J2DTextBox::setBlackWhite(JUtility::TColor param_0, JUtility::TColor param_1) {
|
|
// NONMATCHING
|
|
}
|
|
|
|
/* 80192354-8019238C 18CC94 0038+00 1/0 0/0 0/0 .text draw__16dDlst_FileWarn_cFv */
|
|
void dDlst_FileWarn_c::draw() {
|
|
J2DGrafContext* graf_ctx = dComIfGp_getCurrentGrafPort();
|
|
Scr->draw(0.0f, 0.0f, graf_ctx);
|
|
} |