Files
tp/src/d/msg/d_msg_string.cpp
T

103 lines
3.5 KiB
C++
Raw Normal View History

2021-04-01 02:07:58 +02:00
//
2021-03-28 22:49:05 +02:00
// Generated By: dol2asm
// Translation Unit: d/msg/d_msg_string
2021-04-01 02:07:58 +02:00
//
2021-03-28 22:49:05 +02:00
2021-04-01 02:07:58 +02:00
#include "d/msg/d_msg_string.h"
2021-03-28 22:49:05 +02:00
#include "dol2asm.h"
#include "dolphin/types.h"
#include "JSystem/JGeometry.h"
2021-03-28 22:49:05 +02:00
2021-04-01 02:07:58 +02:00
//
2021-03-28 22:49:05 +02:00
// Forward References:
2021-04-01 02:07:58 +02:00
//
2021-03-28 22:49:05 +02:00
extern "C" void __ct__12dMsgString_cFv();
extern "C" void __ct__12dMsgString_cFUc();
extern "C" void __dt__12dMsgString_cFv();
extern "C" void resetStringLocal__12dMsgString_cFP10J2DTextBox();
extern "C" void drawOutFontLocal__12dMsgString_cFP10J2DTextBoxf();
extern "C" void drawFontLocal__12dMsgString_cFP10J2DTextBoxUcffffUlUc();
2021-04-01 02:07:58 +02:00
//
2021-03-28 22:49:05 +02:00
// External References:
2021-04-01 02:07:58 +02:00
//
2021-03-28 22:49:05 +02:00
extern "C" void getString__12dMsgString_cFUlP10J2DTextBoxP10J2DTextBoxP7JUTFontP10COutFont_cUc();
2021-04-01 02:07:58 +02:00
extern "C" void
getStringPage__12dMsgString_cFUlUcUcP10J2DTextBoxP10J2DTextBoxP7JUTFontP10COutFont_cUc();
2021-03-28 22:49:05 +02:00
extern "C" void __ct__10COutFont_cFUc();
extern "C" void __ct__16dMsgStringBase_cFv();
extern "C" void __dt__16dMsgStringBase_cFv();
extern "C" void getResource__16dMsgStringBase_cFv();
extern "C" void getMessage__16dMsgStringBase_cFUlPc();
extern "C" void* __nw__FUl();
extern "C" void __dl__FPv();
extern "C" void getGlbVtx__7J2DPaneCFUc();
2021-04-01 02:07:58 +02:00
//
2021-03-28 22:49:05 +02:00
// Declarations:
2021-04-01 02:07:58 +02:00
//
2021-03-28 22:49:05 +02:00
/* ############################################################################################## */
2021-04-06 18:00:35 +02:00
/* 803C1498-803C14B8 01E5B8 0020+00 3/3 0/0 0/0 .data __vt__12dMsgString_c */
SECTION_DATA extern void* __vt__12dMsgString_c[8] = {
2021-04-01 02:07:58 +02:00
(void*)NULL /* RTTI */,
(void*)NULL,
(void*)getString__12dMsgString_cFUlP10J2DTextBoxP10J2DTextBoxP7JUTFontP10COutFont_cUc,
(void*)getStringPage__12dMsgString_cFUlUcUcP10J2DTextBoxP10J2DTextBoxP7JUTFontP10COutFont_cUc,
(void*)getMessage__16dMsgStringBase_cFUlPc,
(void*)resetStringLocal__12dMsgString_cFP10J2DTextBox,
(void*)drawOutFontLocal__12dMsgString_cFP10J2DTextBoxf,
(void*)drawFontLocal__12dMsgString_cFP10J2DTextBoxUcffffUlUc,
2021-03-28 22:49:05 +02:00
};
2021-04-06 18:00:35 +02:00
/* 80249C20-80249CA0 244560 0080+00 0/0 15/15 0/0 .text __ct__12dMsgString_cFv */
dMsgString_c::dMsgString_c() {
field_0x28 = 0;
mpOutFont = new COutFont_c(field_0x28);
mpOutFont->createPane();
getResource();
2021-03-28 22:49:05 +02:00
}
2021-04-06 18:00:35 +02:00
/* 80249CA0-80249D28 2445E0 0088+00 0/0 1/1 0/0 .text __ct__12dMsgString_cFUc */
dMsgString_c::dMsgString_c(u8 param_0) {
field_0x28 = param_0;
mpOutFont = new COutFont_c(field_0x28);
mpOutFont->createPane();
getResource();
2021-03-28 22:49:05 +02:00
}
2021-04-06 18:00:35 +02:00
/* 80249D28-80249DB4 244668 008C+00 0/0 17/17 0/0 .text __dt__12dMsgString_cFv */
dMsgString_c::~dMsgString_c() {
delete mpOutFont;
mpOutFont = NULL;
2021-03-28 22:49:05 +02:00
}
2021-04-06 18:00:35 +02:00
/* 80249DB4-80249DE4 2446F4 0030+00 1/0 0/0 0/0 .text
2021-04-01 02:07:58 +02:00
* resetStringLocal__12dMsgString_cFP10J2DTextBox */
void dMsgString_c::resetStringLocal(J2DTextBox* p_textBox) {
mpOutFont->reset(p_textBox);
2021-03-28 22:49:05 +02:00
}
2021-04-06 18:00:35 +02:00
/* 80249DE4-80249ED0 244724 00EC+00 1/0 0/0 0/0 .text
2021-04-01 02:07:58 +02:00
* drawOutFontLocal__12dMsgString_cFP10J2DTextBoxf */
void dMsgString_c::drawOutFontLocal(J2DTextBox* p_textBox, f32 i_alpha) {
JGeometry::TVec3<f32> pos = p_textBox->getGlbVtx(0);
f32 y = pos.y;
if (i_alpha == -1.0f) {
i_alpha = p_textBox->getAlpha() / 255.0f;
}
mpOutFont->setAlphaRatio(i_alpha);
mpOutFont->draw(p_textBox, pos.x, y, 1.0f);
2021-03-28 22:49:05 +02:00
}
2021-04-06 18:00:35 +02:00
/* 80249ED0-80249F00 244810 0030+00 1/0 0/0 0/0 .text
2021-04-01 02:07:58 +02:00
* drawFontLocal__12dMsgString_cFP10J2DTextBoxUcffffUlUc */
void dMsgString_c::drawFontLocal(J2DTextBox* p_textBox, u8 type, f32 posX, f32 posY,
f32 sizeX, f32 sizeY, u32 color, u8 alpha) {
mpOutFont->drawFont(p_textBox, type, posX, posY, sizeX, sizeY, color, alpha);
2021-03-28 22:49:05 +02:00
}