mirror of
https://github.com/zeldaret/ss
synced 2026-09-05 18:37:57 -04:00
wip
This commit is contained in:
+23
-23
@@ -500,23 +500,23 @@ void LytBase_c::setProperties(nw4r::lyt::Pane *pane, f32 posX, f32 posY, f32 sca
|
||||
|
||||
textBox->SetCharSpace(textBox->GetCharSpace() + dLyt_HIO_c::getFn800B2020() + f6);
|
||||
textBox->SetLineSpace(textBox->GetLineSpace() + dLyt_HIO_c::getFn800B2000() + f4);
|
||||
fn_800AB930(textBox);
|
||||
loadText(textBox);
|
||||
}
|
||||
|
||||
bool LytBase_c::fn_800AB930(dTextBox_c *box) {
|
||||
return fn_800AB9A0(box, -1);
|
||||
bool LytBase_c::loadText(dTextBox_c *box) {
|
||||
return loadTextVariant(box, -1);
|
||||
}
|
||||
|
||||
bool LytBase_c::fn_800AB940(const char *name, int arg) {
|
||||
bool LytBase_c::loadTextVariant(const char *name, int arg) {
|
||||
dTextBox_c *box = getTextBox(name);
|
||||
if (box == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return fn_800AB9A0(box, arg);
|
||||
return loadTextVariant(box, arg);
|
||||
}
|
||||
|
||||
bool LytBase_c::fn_800AB9A0(dTextBox_c *textbox, int arg) {
|
||||
bool LytBase_c::loadTextVariant(dTextBox_c *textbox, int arg) {
|
||||
if (getMsbtInfo() == nullptr) {
|
||||
return false;
|
||||
}
|
||||
@@ -551,21 +551,21 @@ bool LytBase_c::fn_800AB9A0(dTextBox_c *textbox, int arg) {
|
||||
if (ty == 1) {
|
||||
dTextBox_c *otherBox = getTextBox(list->GetString());
|
||||
if (otherBox != nullptr) {
|
||||
return fn_800ABB80(textbox, otherBox, arg);
|
||||
return loadTextVariantCopy(textbox, otherBox, arg);
|
||||
}
|
||||
} else {
|
||||
return fn_800ABCE0(list, textbox, textbox, arg);
|
||||
return setText(list, textbox, textbox, arg);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LytBase_c::fn_800ABB80(dTextBox_c *textbox1, dTextBox_c *textbox2, int arg) {
|
||||
u16 num = textbox2->GetExtUserDataNum();
|
||||
bool LytBase_c::loadTextVariantCopy(dTextBox_c *targetTextBox, dTextBox_c *sourceTextBox, int arg) {
|
||||
u16 num = sourceTextBox->GetExtUserDataNum();
|
||||
if (num == 0) {
|
||||
return false;
|
||||
}
|
||||
u32 found = 0;
|
||||
const nw4r::lyt::res::ExtUserData *list = textbox2->GetExtUserData();
|
||||
const nw4r::lyt::res::ExtUserData *list = sourceTextBox->GetExtUserData();
|
||||
for (int i = 0; i < num; i++) {
|
||||
SizedString<0x40> userDatName;
|
||||
userDatName = list->GetName();
|
||||
@@ -579,17 +579,17 @@ bool LytBase_c::fn_800ABB80(dTextBox_c *textbox1, dTextBox_c *textbox2, int arg)
|
||||
if (found != 1) {
|
||||
return false;
|
||||
}
|
||||
return fn_800ABCE0(list, textbox1, textbox2, arg);
|
||||
return setText(list, targetTextBox, sourceTextBox, arg);
|
||||
}
|
||||
|
||||
bool LytBase_c::fn_800ABCE0(
|
||||
const nw4r::lyt::res::ExtUserData *userDatum, dTextBox_c *textbox1, dTextBox_c *textbox2, int arg
|
||||
bool LytBase_c::setText(
|
||||
const nw4r::lyt::res::ExtUserData *userDatum, dTextBox_c *targetTextBox, dTextBox_c *sourceTextBox, int arg
|
||||
) {
|
||||
s32 userDatInt = userDatum->GetInt();
|
||||
SizedString<0x40> str1;
|
||||
SizedString<0x40> str2;
|
||||
|
||||
str1 = textbox2->GetName();
|
||||
str1 = sourceTextBox->GetName();
|
||||
if (userDatInt != 0) {
|
||||
userDatInt = 0;
|
||||
if (arg != -1) {
|
||||
@@ -605,7 +605,7 @@ bool LytBase_c::fn_800ABCE0(
|
||||
return false;
|
||||
}
|
||||
|
||||
textbox1->setTextWithGlobalTextProcessor(dMessage_c::formatText(text));
|
||||
targetTextBox->setTextWithGlobalTextProcessor(dMessage_c::formatText(text));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -652,13 +652,13 @@ bool LytBase_c::fn_800ABE50(dTextBox_c *textbox, wchar_t *destBuf, u32 maxLen) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LytBase_c::fn_800AC040(dTextBox_c *textbox1, dTextBox_c *textbox2, wchar_t *destBuf, u32 maxLen) {
|
||||
u16 num = textbox2->GetExtUserDataNum();
|
||||
bool LytBase_c::fn_800AC040(dTextBox_c *targetTextBox, dTextBox_c *sourceTextBox, wchar_t *destBuf, u32 maxLen) {
|
||||
u16 num = sourceTextBox->GetExtUserDataNum();
|
||||
if (num == 0) {
|
||||
return false;
|
||||
}
|
||||
u32 found = 0;
|
||||
const nw4r::lyt::res::ExtUserData *list = textbox2->GetExtUserData();
|
||||
const nw4r::lyt::res::ExtUserData *list = sourceTextBox->GetExtUserData();
|
||||
for (int i = 0; i < num; i++) {
|
||||
SizedString<0x40> userDatName;
|
||||
userDatName = list->GetName();
|
||||
@@ -672,24 +672,24 @@ bool LytBase_c::fn_800AC040(dTextBox_c *textbox1, dTextBox_c *textbox2, wchar_t
|
||||
if (found != 1) {
|
||||
return false;
|
||||
}
|
||||
return fn_800AC1AC(list, textbox1, textbox2, destBuf, maxLen);
|
||||
return fn_800AC1AC(list, targetTextBox, sourceTextBox, destBuf, maxLen);
|
||||
}
|
||||
|
||||
bool LytBase_c::fn_800AC1AC(
|
||||
const nw4r::lyt::res::ExtUserData *userDatum, dTextBox_c *textbox1, dTextBox_c *textbox2, wchar_t *destBuf, u32 maxLen
|
||||
const nw4r::lyt::res::ExtUserData *userDatum, dTextBox_c *targetTextBox, dTextBox_c *sourceTextBox, wchar_t *destBuf, u32 maxLen
|
||||
) {
|
||||
s32 userDatInt = userDatum->GetInt();
|
||||
SizedString<0x40> str1;
|
||||
SizedString<0x40> str2;
|
||||
|
||||
str1 = textbox2->GetName();
|
||||
str1 = sourceTextBox->GetName();
|
||||
if (userDatInt != 0) {
|
||||
SizedString<0x40> &fmt = str2;
|
||||
fmt.sprintf(":%02d", 0);
|
||||
str1.append(fmt);
|
||||
}
|
||||
|
||||
textbox1->setMessageWithGlobalTextProcessorAndMsbtInfo(getMsbtInfo(), str1, destBuf, maxLen);
|
||||
targetTextBox->setMessageWithGlobalTextProcessorAndMsbtInfo(getMsbtInfo(), str1, destBuf, maxLen);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+1629
-27
File diff suppressed because it is too large
Load Diff
@@ -226,7 +226,7 @@ void dLytPauseDisp01_c::initializeState_None() {
|
||||
mStep = 0;
|
||||
mPrevNavTarget = 0;
|
||||
mCurrentNavTarget = 0;
|
||||
mTimer = 0;
|
||||
mGetDemoTimer = 0;
|
||||
|
||||
for (int i = 0; i < PAUSE_DISP_01_NUM_SUBPANES; i++) {
|
||||
mIcons[i].reset();
|
||||
@@ -309,11 +309,9 @@ void dLytPauseDisp01_c::finalizeState_In() {
|
||||
mDoScrollAnim = false;
|
||||
if (pause->getField_0x083E()) {
|
||||
if (!pause->getField_0x0832()) {
|
||||
// TODO id
|
||||
mCurrentNavTarget = 34;
|
||||
mCurrentNavTarget = PAUSE_DISP_01_OFFSET_MY_PANES + PAUSE_DISP_01_PANE_RIGHT + 1;
|
||||
} else {
|
||||
// TODO id
|
||||
mCurrentNavTarget = 33;
|
||||
mCurrentNavTarget = PAUSE_DISP_01_OFFSET_MY_PANES + PAUSE_DISP_01_PANE_LEFT + 1;
|
||||
}
|
||||
mPrevNavTarget = mCurrentNavTarget;
|
||||
}
|
||||
@@ -363,16 +361,16 @@ void dLytPauseDisp01_c::finalizeState_Select() {
|
||||
void dLytPauseDisp01_c::initializeState_GetDemo() {
|
||||
field_0x98CE = true;
|
||||
mStep = 0;
|
||||
mTimer = 0;
|
||||
mGetDemoTimer = 0;
|
||||
}
|
||||
void dLytPauseDisp01_c::executeState_GetDemo() {
|
||||
switch (mStep) {
|
||||
case 0: {
|
||||
field_0x98CE = false;
|
||||
if (mTimer < 2) {
|
||||
mTimer++;
|
||||
if (mGetDemoTimer < 2) {
|
||||
mGetDemoTimer++;
|
||||
} else {
|
||||
mTimer = 0;
|
||||
mGetDemoTimer = 0;
|
||||
mStep = 1;
|
||||
}
|
||||
break;
|
||||
@@ -448,10 +446,10 @@ void dLytPauseDisp01_c::executeState_GetDemo() {
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
if (mTimer < 35) {
|
||||
mTimer++;
|
||||
if (mGetDemoTimer < 35) {
|
||||
mGetDemoTimer++;
|
||||
} else {
|
||||
mTimer = 0;
|
||||
mGetDemoTimer = 0;
|
||||
mStep = 3;
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MENU_ITEM_SET_COUNT_UP);
|
||||
u16 item = dLytControlGame_c::getInstance()->getItemForPauseDemo();
|
||||
@@ -502,10 +500,10 @@ void dLytPauseDisp01_c::executeState_GetDemo() {
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
if (mTimer < 37) {
|
||||
mTimer++;
|
||||
if (mGetDemoTimer < 37) {
|
||||
mGetDemoTimer++;
|
||||
} else {
|
||||
mTimer = 0;
|
||||
mGetDemoTimer = 0;
|
||||
mStateMgr.changeState(StateID_Wait);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -146,8 +146,9 @@ bool dLytMeter1Button_c::build(d2d::ResAccIf_c *resAcc) {
|
||||
mAnm[i].setAnimEnable(false);
|
||||
}
|
||||
|
||||
mLyt.fn_800AB9A0(mLyt.getTextBox("T_sabBtnS_00"), 0);
|
||||
mLyt.fn_800AB9A0(mLyt.getTextBox("T_sabBtn_00"), 0);
|
||||
// "Gear"
|
||||
mLyt.loadTextVariant(mLyt.getTextBox("T_sabBtnS_00"), 0);
|
||||
mLyt.loadTextVariant(mLyt.getTextBox("T_sabBtn_00"), 0);
|
||||
for (int i = 0; i < 1; i++) {
|
||||
mpWindow[i] = mLyt.getWindow(sWindowName1[i]);
|
||||
mpSizeBox[i] = mLyt.getSizeBoxInWindow(sWindowName1[i]);
|
||||
|
||||
@@ -25,11 +25,13 @@ void dLytMeterEventSkip_c::executeState_Invisible() {
|
||||
if (shouldPromptForSkip() || dLytMeter_c::GetInstance()->isHelpOpen()) {
|
||||
if (dLytMeter_c::GetInstance()->isHelpOpen()) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
mLyt.fn_800AB9A0(mpTextBoxes[i], 1);
|
||||
// "Close"
|
||||
mLyt.loadTextVariant(mpTextBoxes[i], 1);
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
mLyt.fn_800AB9A0(mpTextBoxes[i], 0);
|
||||
// "Skip"
|
||||
mLyt.loadTextVariant(mpTextBoxes[i], 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "d/lyt/d_lyt_control_game.h"
|
||||
#include "d/lyt/d_lyt_do_button.h"
|
||||
#include "d/lyt/d_lyt_unknowns.h"
|
||||
#include "d/lyt/d_lyt_util_items.h"
|
||||
#include "d/lyt/meter/d_lyt_meter.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "m/m_vec.h"
|
||||
@@ -719,9 +720,9 @@ void dLytMeterItemSelect_c::initializeState_SelectIn() {
|
||||
mAnm[ITEM_SELECT_ANIM_DECIDE].setFrame(0.0f);
|
||||
|
||||
for (int i = 0; i < ITEM_SELECT_NUM_ITEMS; i++) {
|
||||
if (fn_800F01B0(i)) {
|
||||
if (hasBWheelItem(i)) {
|
||||
mAnm[i + ITEM_SELECT_ANIM_HAVE_OFFSET].setFrame(0.0f);
|
||||
if (fn_800F01E0(i)) {
|
||||
if (isBocoburinLocked(i)) {
|
||||
mIsBocoburinLocked[i] = true;
|
||||
}
|
||||
} else {
|
||||
@@ -1345,7 +1346,7 @@ void dLytMeterItemSelect_c::initializeState_DemoMove() {
|
||||
} else {
|
||||
field_0x57A3[i] = true;
|
||||
}
|
||||
} else if ((i == 0 || i == 2 || i == 3) && fn_800F01B0(i)) {
|
||||
} else if ((i == 0 || i == 2 || i == 3) && hasBWheelItem(i)) {
|
||||
field_0x57A3[i] = false;
|
||||
field_0x575C++;
|
||||
} else {
|
||||
@@ -1355,8 +1356,8 @@ void dLytMeterItemSelect_c::initializeState_DemoMove() {
|
||||
}
|
||||
|
||||
for (int i = 0; i < ITEM_SELECT_NUM_ITEMS; i++) {
|
||||
if (fn_800F01B0(i)) {
|
||||
if (fn_800F01E0(i) || field_0x57A3[i] == 0) {
|
||||
if (hasBWheelItem(i)) {
|
||||
if (isBocoburinLocked(i) || field_0x57A3[i] == 0) {
|
||||
if (isSlotBocoburinLocked(i)) {
|
||||
mIsBocoburinLocked[i] = true;
|
||||
mAnm[i + ITEM_SELECT_ANIM_HAVE_OFFSET].setFrame(0.0f);
|
||||
@@ -1399,7 +1400,7 @@ void dLytMeterItemSelect_c::executeState_DemoMove() {
|
||||
mDemoMoveTimer++;
|
||||
if (mDemoMoveTimer == 15) {
|
||||
for (int i = 0; i < ITEM_SELECT_NUM_ITEMS; i++) {
|
||||
if (fn_800F01B0(i) && !field_0x57A3[i]) {
|
||||
if (hasBWheelItem(i) && !field_0x57A3[i]) {
|
||||
mAnm[i + ITEM_SELECT_ANIM_HAVE_OFFSET].setFrame(0.0f);
|
||||
field_0x57A3[i] = true;
|
||||
|
||||
@@ -2514,16 +2515,12 @@ u8 dLytMeterItemSelect_c::getInternalBaseItemForSlot(s32 slot) const {
|
||||
return sSlotToInternalItem[slot];
|
||||
}
|
||||
|
||||
extern "C" s32 fn_801673B0(s32);
|
||||
|
||||
bool dLytMeterItemSelect_c::fn_800F01B0(s32 arg) const {
|
||||
return fn_801673B0(arg) != 0;
|
||||
bool dLytMeterItemSelect_c::hasBWheelItem(s32 arg) const {
|
||||
return getItemLevelForBWheelIndex(arg) != 0;
|
||||
}
|
||||
|
||||
extern "C" bool fn_80167780(s32, bool);
|
||||
|
||||
bool dLytMeterItemSelect_c::fn_800F01E0(s32 arg) const {
|
||||
return fn_80167780(arg, true);
|
||||
bool dLytMeterItemSelect_c::isBocoburinLocked(s32 arg) const {
|
||||
return isBWheelIndexBocoburinLocked(arg, true);
|
||||
}
|
||||
|
||||
bool dLytMeterItemSelect_c::isSlotBocoburinLocked(s32 slot) {
|
||||
|
||||
@@ -217,7 +217,8 @@ void dLytMsgWindowSelectBtn_c::initializeState_In() {
|
||||
field_0x9A4 = 1;
|
||||
field_0x9B4 = -1;
|
||||
for (int i = 0; i < 2; i++) {
|
||||
mLyt.fn_800AB9A0(mpDecideTextBoxes[i], 1);
|
||||
// "Select"
|
||||
mLyt.loadTextVariant(mpDecideTextBoxes[i], 1);
|
||||
}
|
||||
|
||||
mpWindow->UpdateSize(mpSizeBox, 32.0f);
|
||||
@@ -317,7 +318,8 @@ void dLytMsgWindowSelectBtn_c::executeState_WaitSelect() {
|
||||
f32 f = mBtnHelper.fn_8011D690(mBtnHelper.field_0x50);
|
||||
// TODO
|
||||
for (int i = 0; i < 2; i++) {
|
||||
mLyt.fn_800AB9A0(mpDecideTextBoxes[i], 0);
|
||||
// "Confirm"
|
||||
mLyt.loadTextVariant(mpDecideTextBoxes[i], 0);
|
||||
}
|
||||
|
||||
mpWindow->UpdateSize(mpSizeBox, 32.0f);
|
||||
|
||||
Reference in New Issue
Block a user