mirror of
https://github.com/zeldaret/tww.git
synced 2026-09-29 10:41:39 -04:00
demo d_file_error OK, fmap/fmap2 work, misc (#1208)
* d_file_error OK, use J2DPane inlines everywhere * d_menu_fmap demo work * fmap and fmap2 work * fix demo regression with ternary fakematch * inline cleanup, f_pc_profile OK for demo * fix min/max bss order * lstair almost for demo
This commit is contained in:
+29
-45
@@ -84,33 +84,17 @@ void dDlst_2DMSG_c::draw() {
|
||||
mpMsg->mMsgDataProc.selectArrow(arrowPane);
|
||||
} else if (msg->mStatus == fopMsgStts_INPUT_e) {
|
||||
if ((mpMsg->mMesgEntry.mTextboxType == 0) || (mpMsg->mMesgEntry.mTextboxType == 10)) {
|
||||
f32 dVar3 = (numberPane[0]->mBounds.getWidth() + numberPane[0]->getCharSpace());
|
||||
f32 f3;
|
||||
f32 f4;
|
||||
f32 dVar3 = (numberPane[0]->getWidth() + numberPane[0]->getCharSpace());
|
||||
if (msg->mMsgNo == 0x1cfa) {
|
||||
f4 = maskPane->mBounds.getHeight();
|
||||
f3 = maskPane->mBounds.getWidth();
|
||||
maskPane->draw(mpMsg->m10EC + (dVar3 * (2 - msg->mSelectNum)), mpMsg->m10F0, f3, f4, false, false, false);
|
||||
f4 = numberPane[2]->mBounds.getWidth();
|
||||
f3 = numberPane[2]->mBounds.getHeight();
|
||||
numberPane[2]->draw(mpMsg->m10EC, mpMsg->m10F0 + f3, f4, HBIND_CENTER);
|
||||
f4 = numberPane[1]->mBounds.getWidth();
|
||||
f3 = numberPane[1]->mBounds.getHeight();
|
||||
numberPane[1]->draw((mpMsg->m10EC + dVar3), mpMsg->m10F0 + f3, f4, HBIND_CENTER);
|
||||
f4 = numberPane[0]->mBounds.getWidth();
|
||||
f3 = numberPane[0]->mBounds.getHeight();
|
||||
numberPane[0]->draw(mpMsg->m10EC + (dVar3 * 2.0f), mpMsg->m10F0 + f3, f4, HBIND_CENTER);
|
||||
maskPane->draw(mpMsg->m10EC + (dVar3 * (2 - msg->mSelectNum)), mpMsg->m10F0, maskPane->getWidth(), maskPane->getHeight(), false, false, false);
|
||||
numberPane[2]->draw(mpMsg->m10EC, mpMsg->m10F0 + numberPane[2]->getHeight(), numberPane[2]->getWidth(), HBIND_CENTER);
|
||||
numberPane[1]->draw((mpMsg->m10EC + dVar3), mpMsg->m10F0 + numberPane[1]->getHeight(), numberPane[1]->getWidth(), HBIND_CENTER);
|
||||
numberPane[0]->draw(mpMsg->m10EC + (dVar3 * 2.0f), mpMsg->m10F0 + numberPane[0]->getHeight(), numberPane[0]->getWidth(), HBIND_CENTER);
|
||||
} else {
|
||||
numberPane[2]->hide();
|
||||
f4 = maskPane->mBounds.getHeight();
|
||||
f3 = maskPane->mBounds.getWidth();
|
||||
maskPane->draw(mpMsg->m10EC + (dVar3 * (1 - msg->mSelectNum)), mpMsg->m10F0, f3, f4, false, false, false);
|
||||
f4 = numberPane[1]->mBounds.getWidth();
|
||||
f3 = numberPane[1]->mBounds.getHeight();
|
||||
numberPane[1]->draw(mpMsg->m10EC, mpMsg->m10F0 + f3, f4, HBIND_CENTER);
|
||||
f4 = numberPane[0]->mBounds.getWidth();
|
||||
f3 = numberPane[0]->mBounds.getHeight();
|
||||
numberPane[0]->draw((mpMsg->m10EC + dVar3), mpMsg->m10F0 + f3, f4, HBIND_CENTER);
|
||||
maskPane->draw(mpMsg->m10EC + (dVar3 * (1 - msg->mSelectNum)), mpMsg->m10F0, maskPane->getWidth(), maskPane->getHeight(), false, false, false);
|
||||
numberPane[1]->draw(mpMsg->m10EC, mpMsg->m10F0 + numberPane[1]->getHeight(), numberPane[1]->getWidth(), HBIND_CENTER);
|
||||
numberPane[0]->draw((mpMsg->m10EC + dVar3), mpMsg->m10F0 + numberPane[0]->getHeight(), numberPane[0]->getWidth(), HBIND_CENTER);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -131,31 +115,31 @@ void dDlst_2DMSG_c::outFontDraw() {
|
||||
iconNum != fopMsgM_Icon_INPUT_e
|
||||
) {
|
||||
J2DScreen* scrn = (J2DScreen*)mpMsg->m0544[0].pane;
|
||||
int r5 = posX + scrn->mBounds.i.x;
|
||||
int r5 = posX + scrn->getBounds().i.x;
|
||||
int r6;
|
||||
u8 alpha;
|
||||
if (mpMsg->mMesgEntry.mTextboxType == 5) {
|
||||
f32 local_30 = g_msgHIO.field_0x5e * posY;
|
||||
f32 local_38 = mpMsg->m1104 * (2 - mpMsg->m1108);
|
||||
r6 = (int)(local_38 + scrn->mBounds.i.y + local_30);
|
||||
r6 = (int)(local_38 + scrn->getBounds().i.y + local_30);
|
||||
alpha = mpMsg->m0544[0].mNowAlpha;
|
||||
} else if (mpMsg->mMesgEntry.mTextboxType == 0xe) {
|
||||
f32 local_28 = g_msgHIO.field_0x5e * posY;
|
||||
f32 local_30 = mpMsg->m1104;
|
||||
r6 = (int)(local_30 + scrn->mBounds.i.y + local_28);
|
||||
r6 = (int)(local_30 + scrn->getBounds().i.y + local_28);
|
||||
alpha = mpMsg->m0544[0].mNowAlpha;
|
||||
} else {
|
||||
if (scale > mpMsg->m110C) {
|
||||
if (mpMsg->m1108 > 1) {
|
||||
int temp1 = (mpMsg->m1104 * ((3 - posY) - (mpMsg->m1108 + -2)));
|
||||
r6 = ((scale - mpMsg->m110C) / 2) + (int)((temp1 + scrn->mBounds.i.y) - (f32)(int)(scale / 2));
|
||||
r6 = ((scale - mpMsg->m110C) / 2) + (int)((temp1 + scrn->getBounds().i.y) - (f32)(int)(scale / 2));
|
||||
} else {
|
||||
r6 = (int)(((mpMsg->m1104 << 2) + scrn->mBounds.i.y) - (f32)(int)(scale / 2));
|
||||
r6 = (int)(((mpMsg->m1104 << 2) + scrn->getBounds().i.y) - (f32)(int)(scale / 2));
|
||||
}
|
||||
} else {
|
||||
f32 local_28 = g_msgHIO.field_0x5e * posY;
|
||||
f32 local_30 = mpMsg->m1104 * (3 - mpMsg->m1108);
|
||||
r6 = (int)(local_30 + scrn->mBounds.i.y + local_28);
|
||||
r6 = (int)(local_30 + scrn->getBounds().i.y + local_28);
|
||||
}
|
||||
alpha = mpMsg->m0544[0].mNowAlpha;
|
||||
}
|
||||
@@ -1499,8 +1483,8 @@ void dMsg_numberInput(sub_msg_class* i_Msg) {
|
||||
|
||||
for (s32 i = 0; i < 8; i++) {
|
||||
if (i_Msg->mMsgDataProc.getIconNum(i) == fopMsgM_Icon_INPUT_e) {
|
||||
i_Msg->m10EC = ((i_Msg->m0544[0].pane)->mBounds.i.x + i_Msg->mMsgDataProc.getIconPosX(i));
|
||||
i_Msg->m10F0 = ((i_Msg->m0544[0].pane)->mBounds.i.y + (i_Msg->m1104 * (s32)((3 - i_Msg->m1108) + (i_Msg->mMsgDataProc.getIconPosY(i)) * 2)));
|
||||
i_Msg->m10EC = ((i_Msg->m0544[0].pane)->getBounds().i.x + i_Msg->mMsgDataProc.getIconPosX(i));
|
||||
i_Msg->m10F0 = ((i_Msg->m0544[0].pane)->getBounds().i.y + (i_Msg->m1104 * (s32)((3 - i_Msg->m1108) + (i_Msg->mMsgDataProc.getIconPosY(i)) * 2)));
|
||||
}
|
||||
}
|
||||
if (i_Msg->mMsgNo == 0x1cfa) {
|
||||
@@ -1954,8 +1938,8 @@ s32 dMsg_selectProc(sub_msg_class* i_Msg) {
|
||||
J2DPicture* pJVar14;
|
||||
|
||||
pJVar8 = (J2DTextBox*)i_Msg->m0544[0].pane;
|
||||
iVar10 = (int)pJVar8->mBounds.i.x;
|
||||
iVar11 = (int)pJVar8->mBounds.i.y;
|
||||
iVar10 = (int)pJVar8->getBounds().i.x;
|
||||
iVar11 = (int)pJVar8->getBounds().i.y;
|
||||
uVar1 = pJVar8->getLineSpace();
|
||||
sVar3 = i_Msg->m026C[0].mUserArea;
|
||||
if (sVar3 == 0) {
|
||||
@@ -2048,10 +2032,10 @@ s32 dMsg_selectProc(sub_msg_class* i_Msg) {
|
||||
for (s32 i = 0; i < 8; i++) {
|
||||
u8 iconNum = i_Msg->mMsgDataProc.getIconNum(i);
|
||||
if (iconNum == fopMsgM_Icon_SELECT_YOKO_LEFT_e) {
|
||||
var_r5 = i_Msg->m0544[0].pane->mBounds.i.x + i_Msg->mMsgDataProc.getIconPosX(i);
|
||||
var_r6 = i_Msg->m0544[0].pane->mBounds.i.y + i_Msg->m1104 * ((2 - i_Msg->m1108) + (i_Msg->mMsgDataProc.getIconPosY(i) * 2));
|
||||
var_r5 = i_Msg->m0544[0].pane->getBounds().i.x + i_Msg->mMsgDataProc.getIconPosX(i);
|
||||
var_r6 = i_Msg->m0544[0].pane->getBounds().i.y + i_Msg->m1104 * ((2 - i_Msg->m1108) + (i_Msg->mMsgDataProc.getIconPosY(i) * 2));
|
||||
} else if (iconNum == fopMsgM_Icon_SELECT_YOKO_RIGHT_e) {
|
||||
var_r11 = (i_Msg->m0544[0].pane->mBounds.i.x + (i_Msg->mMsgDataProc.getIconPosX(i)));
|
||||
var_r11 = (i_Msg->m0544[0].pane->getBounds().i.x + (i_Msg->mMsgDataProc.getIconPosX(i)));
|
||||
}
|
||||
}
|
||||
i_Msg->mSelectNum = i_Msg->mMsgDataProc.selectCheckYoko(arrowPane, var_r5, var_r6, var_r11 - var_r5);
|
||||
@@ -2893,15 +2877,15 @@ static BOOL dMsg_Execute(sub_msg_class* i_Msg) {
|
||||
GVar7 = g_msgHIO.field_0x5;
|
||||
bVar1 = i_Msg->mMesgEntry.mTextboxType;
|
||||
if (bVar1 == 5) {
|
||||
static s32 posY0 = (i_Msg->m0544[0].pane)->mBounds.i.y;
|
||||
static s32 posY1 = (i_Msg->m0544[1].pane)->mBounds.i.y;
|
||||
static s32 posY2 = (i_Msg->m0544[2].pane)->mBounds.i.y;
|
||||
static s32 posY3 = (i_Msg->m0544[3].pane)->mBounds.i.y;
|
||||
static s32 posY0 = (i_Msg->m0544[0].pane)->getBounds().i.y;
|
||||
static s32 posY1 = (i_Msg->m0544[1].pane)->getBounds().i.y;
|
||||
static s32 posY2 = (i_Msg->m0544[2].pane)->getBounds().i.y;
|
||||
static s32 posY3 = (i_Msg->m0544[3].pane)->getBounds().i.y;
|
||||
pJVar12 = (MyScreen*)i_Msg->m0544[0].pane;
|
||||
s32 fVar1 = pJVar12->mBounds.i.x;
|
||||
fVar2 = i_Msg->m0544[1].pane->mBounds.i.x;
|
||||
fVar3 = i_Msg->m0544[2].pane->mBounds.i.x;
|
||||
fVar4 = i_Msg->m0544[3].pane->mBounds.i.x;
|
||||
s32 fVar1 = pJVar12->getBounds().i.x;
|
||||
fVar2 = i_Msg->m0544[1].pane->getBounds().i.x;
|
||||
fVar3 = i_Msg->m0544[2].pane->getBounds().i.x;
|
||||
fVar4 = i_Msg->m0544[3].pane->getBounds().i.x;
|
||||
pJVar12->move(fVar1, posY0);
|
||||
i_Msg->m0544[1].pane->move(fVar2, posY1);
|
||||
i_Msg->m0544[2].pane->move(fVar3, posY2);
|
||||
|
||||
Reference in New Issue
Block a user