mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-09 14:05:28 -04:00
f_pc_manager work
This commit is contained in:
+1
-1
@@ -474,7 +474,7 @@ config.libs = [
|
||||
Object(Matching, "d/d_metronome.cpp"),
|
||||
Object(Matching, "d/d_ovlp_fade.cpp"),
|
||||
Object(NonMatching, "d/d_ovlp_fade2.cpp"),
|
||||
Object(NonMatching, "d/d_ovlp_fade3.cpp"),
|
||||
Object(Matching, "d/d_ovlp_fade3.cpp"),
|
||||
Object(NonMatching, "d/d_ovlp_fade4.cpp"),
|
||||
Object(NonMatching, "d/d_picture_box.cpp"),
|
||||
Object(NonMatching, "d/d_s_logo.cpp"),
|
||||
|
||||
@@ -31,6 +31,29 @@ public:
|
||||
|
||||
void initiate(const ResFONT*, const char*, J2DTextBoxHBinding, J2DTextBoxVBinding);
|
||||
void setFont(JUTFont*);
|
||||
void setFontSize(f32 sizeX, f32 sizeY) {
|
||||
f32 x;
|
||||
if (sizeX > 0.0f) {
|
||||
x = sizeX;
|
||||
} else {
|
||||
x = 0.0f;
|
||||
}
|
||||
mFontSizeX = x;
|
||||
|
||||
f32 y;
|
||||
if (sizeY > 0.0f) {
|
||||
y = sizeY;
|
||||
} else {
|
||||
y = 0.0f;
|
||||
}
|
||||
mFontSizeY = y;
|
||||
}
|
||||
void setCharColor(JUtility::TColor c) { mCharColor = c; }
|
||||
void setGradColor(JUtility::TColor c) { mGradColor = c; }
|
||||
void setBlack(JUtility::TColor c) { mBlack = c; }
|
||||
void setWhite(JUtility::TColor c) { mBlack = c; }
|
||||
void setLineSpace(f32 x) { mLineSpace = x; }
|
||||
void setCharSpace(f32 x) { mCharSpace = x; }
|
||||
void draw(f32, f32, f32, J2DTextBoxHBinding);
|
||||
char* getStringPtr() const;
|
||||
s32 setString(const char*, ...);
|
||||
@@ -44,17 +67,17 @@ public:
|
||||
|
||||
private:
|
||||
/* 0xCC */ JUTResFont* mpFont;
|
||||
/* 0xD0 */ JUtility::TColor mGradientFirst;
|
||||
/* 0xD4 */ JUtility::TColor mGradientSecond;
|
||||
/* 0xD0 */ JUtility::TColor mCharColor;
|
||||
/* 0xD4 */ JUtility::TColor mGradColor;
|
||||
/* 0xD8 */ f32 field_0xd8;
|
||||
/* 0xDC */ f32 field_0xdc;
|
||||
/* 0xD0 */ f32 field_0xe0;
|
||||
/* 0xE4 */ f32 mFontLeading;
|
||||
/* 0xE8 */ f32 mFontWidth;
|
||||
/* 0xEC */ f32 mFontHeight;
|
||||
/* 0xE0 */ f32 mCharSpace;
|
||||
/* 0xE4 */ f32 mLineSpace;
|
||||
/* 0xE8 */ f32 mFontSizeX;
|
||||
/* 0xEC */ f32 mFontSizeY;
|
||||
/* 0xF0 */ char* mStringPtr;
|
||||
/* 0xF4 */ JUtility::TColor mTextColor;
|
||||
/* 0xF8 */ JUtility::TColor mTextBGColor;
|
||||
/* 0xF4 */ JUtility::TColor mWhite;
|
||||
/* 0xF8 */ JUtility::TColor mBlack;
|
||||
/* 0xFC */ u8 mBindingH;
|
||||
/* 0xFD */ u8 mBindingV;
|
||||
/* 0xFE */ bool mTextFontOwned;
|
||||
|
||||
@@ -99,6 +99,12 @@ public:
|
||||
virtual void draw();
|
||||
};
|
||||
|
||||
class dDlst_snapShot_c : public dDlst_base_c {
|
||||
public:
|
||||
~dDlst_snapShot_c() {};
|
||||
void draw();
|
||||
};
|
||||
|
||||
class dDlst_window_c {
|
||||
public:
|
||||
dDlst_window_c() {}
|
||||
|
||||
@@ -3,11 +3,15 @@
|
||||
// Translation Unit: d_ovlp_fade3.cpp
|
||||
//
|
||||
|
||||
#include "d_ovlp_fade3.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "d/d_drawlist.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include "dolphin/gx/GX.h"
|
||||
|
||||
/* 8022433C-80224390 .text draw__16dDlst_snapShot_cFv */
|
||||
void dDlst_snapShot_c::draw() {
|
||||
/* Nonmatching */
|
||||
GXSetTexCopySrc(0, 0, 640, 480);
|
||||
GXSetTexCopyDst(320, 240, GX_TF_RGBA8, GX_TRUE);
|
||||
GXCopyTex(mDoGph_gInf_c::getFrameBufferTex(), GX_FALSE);
|
||||
GXPixModeSync();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,11 +18,15 @@
|
||||
#include "SSystem/SComponent/c_lib.h"
|
||||
#include "SSystem/SComponent/c_API_graphic.h"
|
||||
#include "JSystem/J2DGraph/J2DOrthoGraph.h"
|
||||
#include "JSystem/J2DGraph/J2DPicture.h"
|
||||
#include "JSystem/J2DGraph/J2DTextBox.h"
|
||||
#include "JSystem/J3DGraphBase/J3DSys.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "dolphin/dvd/DVD.h"
|
||||
#include "dolphin/gx/GX.h"
|
||||
|
||||
#include "src/f_pc/f_pc_manager_data.inc"
|
||||
|
||||
/* 8003E318-8003E338 .text fpcM_Draw__FPv */
|
||||
void fpcM_Draw(void* i_proc) {
|
||||
fpcDw_Execute((base_process_class*)i_proc);
|
||||
@@ -50,7 +54,70 @@ BOOL fpcM_IsCreating(unsigned int pID) {
|
||||
|
||||
/* 8003E3D0-8003E9F0 .text messageSet__FUl */
|
||||
void messageSet(unsigned long status) {
|
||||
/* Nonmatching */
|
||||
const u32 * inf1_tbl = (u32*)&msg_data[0x30];
|
||||
const char * msg = (const char*)((&msg_data[0x68]) + inf1_tbl[status]);
|
||||
|
||||
J2DTextBox * tpane = new J2DTextBox('TXT1', JGeometry::TBox2<f32>(0.0f, 0.0f, 660.0f, 200.0f), (ResFONT*)font_data, msg, HBIND_CENTER, VBIND_CENTER);
|
||||
JUT_ASSERT(0x141, tpane != 0);
|
||||
|
||||
J2DTextBox * spane = new J2DTextBox('TXT2', JGeometry::TBox2<f32>(0.0f, 0.0f, 660.0f, 200.0f), (ResFONT*)font_data, msg, HBIND_CENTER, VBIND_CENTER);
|
||||
JUT_ASSERT(0x149, spane != 0);
|
||||
|
||||
J2DPicture * ppane = new J2DPicture('PIC1', JGeometry::TBox2<f32>(0.0f, 0.0f, 665.0f, 530.0f), (ResTIMG*)black_tex, NULL);
|
||||
JUT_ASSERT(0x14e, ppane != 0);
|
||||
|
||||
tpane->setFontSize(27.0f, 27.0f);
|
||||
tpane->setCharColor(JUtility::TColor(0xFFC800FF));
|
||||
tpane->setGradColor(JUtility::TColor(0xFFB400FF));
|
||||
tpane->setCharSpace(0.0f);
|
||||
tpane->setLineSpace(27.0f);
|
||||
tpane->setBlack(JUtility::TColor(0xFFFFFF00));
|
||||
|
||||
spane->setFontSize(27.0f, 27.0f);
|
||||
spane->setCharColor(JUtility::TColor(0x000000FF));
|
||||
spane->setGradColor(JUtility::TColor(0x000000FF));
|
||||
spane->setCharSpace(0.0f);
|
||||
spane->setLineSpace(27.0f);
|
||||
|
||||
ppane->setAlpha(130);
|
||||
|
||||
JUTResFont * font = new JUTResFont((ResFONT*)font_data, NULL);
|
||||
|
||||
s32 height = 27;
|
||||
s32 curLine = 0;
|
||||
u8 ch;
|
||||
f32 maxWidth = 0.0f;
|
||||
f32 lineWidth[6] = {};
|
||||
for (; ch = *msg, ch != '\0'; msg++) {
|
||||
if (ch == '\n') {
|
||||
height += 27;
|
||||
curLine++;
|
||||
continue;
|
||||
}
|
||||
|
||||
JUTFont::TWidth wid;
|
||||
font->getWidthEntry(ch, &wid);
|
||||
lineWidth[curLine] += wid.field_0x0;
|
||||
}
|
||||
|
||||
for (s32 i = 0; i < (s32)ARRAY_SIZE(lineWidth); i++) {
|
||||
f32 width = lineWidth[curLine];
|
||||
if (width > maxWidth)
|
||||
maxWidth = width;
|
||||
}
|
||||
|
||||
f32 x = (659.0f - maxWidth) / 2.0f + -21.0f;
|
||||
f32 y = (524 - height) / 2.0f + -21.0f;
|
||||
|
||||
ppane->draw(-12.0f, -24.0f, 665.0f, 530.0f, false, false, false);
|
||||
y += 10.0f;
|
||||
spane->draw(x + 2.0f, y + 2.0f, 660.0f, HBIND_LEFT);
|
||||
tpane->draw(x, y, 660.0f, HBIND_LEFT);
|
||||
|
||||
delete font;
|
||||
delete ppane;
|
||||
delete tpane;
|
||||
delete spane;
|
||||
}
|
||||
|
||||
namespace JAInter {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user