mirror of
https://github.com/zeldaret/ss
synced 2026-05-23 15:01:38 -04:00
d_lyt_area_caption OK
This commit is contained in:
@@ -654,6 +654,7 @@ d/lyt/d_lyt_area_caption.cpp:
|
||||
.data start:0x80522B00 end:0x80522E80
|
||||
.sdata start:0x80572878 end:0x80572880
|
||||
.sbss start:0x805754C0 end:0x805754C8
|
||||
.sdata2 start:0x80579FD0 end:0x80579FE0
|
||||
.bss start:0x805B0A70 end:0x805B0B30
|
||||
|
||||
d/lyt/d_lyt_wipe.cpp:
|
||||
|
||||
+34
-34
@@ -2359,15 +2359,15 @@ fn_80059650 = .text:0x80059650; // type:function size:0x4
|
||||
checkInputManagerPressedMask = .text:0x80059660; // type:function size:0x18
|
||||
checkButtonAPressed__4dPadFv = .text:0x80059680; // type:function size:0x18
|
||||
checkButtonBPressed__4dPadFv = .text:0x800596A0; // type:function size:0x18
|
||||
checkButtonCPressed = .text:0x800596C0; // type:function size:0x18
|
||||
checkButtonCPressed__4dPadFv = .text:0x800596C0; // type:function size:0x18
|
||||
checkButtonZPressed__4dPadFv = .text:0x800596E0; // type:function size:0x18
|
||||
checkButtonDpadUpPressed = .text:0x80059700; // type:function size:0x18
|
||||
checkButtonDpadUpPressed__4dPadFv = .text:0x80059700; // type:function size:0x18
|
||||
checkButtonDpadDownPressed__4dPadFv = .text:0x80059720; // type:function size:0x18
|
||||
checkButtonDpadLeftPressed = .text:0x80059740; // type:function size:0x18
|
||||
checkButtonDpadRightPressed = .text:0x80059760; // type:function size:0x18
|
||||
checkButton1Pressed = .text:0x80059780; // type:function size:0x18
|
||||
checkButton2Pressed = .text:0x800597A0; // type:function size:0x18
|
||||
checkButtonMinusPressed = .text:0x800597C0; // type:function size:0x18
|
||||
checkButtonDpadLeftPressed__4dPadFv = .text:0x80059740; // type:function size:0x18
|
||||
checkButtonDpadRightPressed__4dPadFv = .text:0x80059760; // type:function size:0x18
|
||||
checkButton1Pressed__4dPadFv = .text:0x80059780; // type:function size:0x18
|
||||
checkButton2Pressed__4dPadFv = .text:0x800597A0; // type:function size:0x18
|
||||
checkButtonMinusPressed__4dPadFv = .text:0x800597C0; // type:function size:0x18
|
||||
checkButtonPlusPressed__4dPadFv = .text:0x800597E0; // type:function size:0x18
|
||||
checkInputManagerHeldMask = .text:0x80059800; // type:function size:0x18
|
||||
down__Q23EGG14CoreControllerCFUl = .text:0x80059820; // type:function size:0x18
|
||||
@@ -3595,7 +3595,7 @@ fn_800A08F0__12EventManagerFQ27fBase_c12GROUP_TYPE_e = .text:0x800A08F0; // type
|
||||
checkButton2HeldForCutscenes = .text:0x800A0950; // type:function size:0x60
|
||||
canSkipCurrentEvent__12EventManagerFv = .text:0x800A09B0; // type:function size:0x1D0
|
||||
fn_800A0B80 = .text:0x800A0B80; // type:function size:0x10
|
||||
eventRelatedStateFlags_shift0x11_1 = .text:0x800A0B90; // type:function size:0x10
|
||||
eventRelatedStateFlags_shift0x11_1__12EventManagerFv = .text:0x800A0B90; // type:function size:0x10
|
||||
fn_800A0BA0 = .text:0x800A0BA0; // type:function size:0x94
|
||||
__ct__5EventFPCcUlUlPvPv = .text:0x800A0C40; // type:function size:0xEC
|
||||
__ct__5EventFPCcPvUlUlPvPv = .text:0x800A0D30; // type:function size:0xEC
|
||||
@@ -8266,7 +8266,7 @@ finalizeState_Start__22dLytAreaCaptionParts_cFv = .text:0x8014B600; // type:func
|
||||
initializeState_Out__22dLytAreaCaptionParts_cFv = .text:0x8014B610; // type:function size:0x4
|
||||
executeState_Out__22dLytAreaCaptionParts_cFv = .text:0x8014B620; // type:function size:0x98
|
||||
finalizeState_Out__22dLytAreaCaptionParts_cFv = .text:0x8014B6C0; // type:function size:0x4
|
||||
fn_8014B6D0 = .text:0x8014B6D0; // type:function size:0x1CC
|
||||
shouldImmediatelyDismiss__22dLytAreaCaptionParts_cCFv = .text:0x8014B6D0; // type:function size:0x1CC
|
||||
create__17dLytAreaCaption_cFv = .text:0x8014B8A0; // type:function size:0x74
|
||||
__ct__22dLytAreaCaptionParts_cFv = .text:0x8014B920; // type:function size:0x10C
|
||||
__dt__35sFState_c<22dLytAreaCaptionParts_c>Fv = .text:0x8014BA30; // type:function size:0x58
|
||||
@@ -10578,10 +10578,10 @@ isAreaTypeSky__11dStageMgr_cCFv = .text:0x80199970; // type:function size:0x2C
|
||||
isAreaTypeOverworldOrSkyloft__11dStageMgr_cCFv = .text:0x801999A0; // type:function size:0x3C
|
||||
isAreaTypeDungeonOrBoss__11dStageMgr_cCFv = .text:0x801999E0; // type:function size:0x3C
|
||||
getMapNameId__11dStageMgr_cCFv = .text:0x80199A20; // type:function size:0x20
|
||||
StageManager__getSTIFbyte4 = .text:0x80199A40; // type:function size:0x20
|
||||
fn_80199A60 = .text:0x80199A60; // type:function size:0x3C
|
||||
isSTIFbyte4_5or6 = .text:0x80199AA0; // type:function size:0x3C
|
||||
fn_80199AE0 = .text:0x80199AE0; // type:function size:0x3C
|
||||
getSTIFbyte4__11dStageMgr_cCFv = .text:0x80199A40; // type:function size:0x20
|
||||
isSTIFbyte4_2or3or4__11dStageMgr_cCFv = .text:0x80199A60; // type:function size:0x3C
|
||||
isSTIFbyte4_5or6__11dStageMgr_cCFv = .text:0x80199AA0; // type:function size:0x3C
|
||||
isSTIFbyte4_7or8or9or10or11__11dStageMgr_cCFv = .text:0x80199AE0; // type:function size:0x3C
|
||||
getSTIFunk1__11dStageMgr_cCFv = .text:0x80199B20; // type:function size:0x20
|
||||
StageManager__getSTIFunk3 = .text:0x80199B40; // type:function size:0x1C
|
||||
fn_80199B60 = .text:0x80199B60; // type:function size:0xC
|
||||
@@ -32791,27 +32791,27 @@ __vt__26sFState_c<13dLytBattery_c> = .data:0x80522928; // type:object size:0x18
|
||||
@8279 = .data:0x80522A90; // type:object size:0x1C scope:local data:string
|
||||
@8280 = .data:0x80522AAC; // type:object size:0x1B scope:local data:string
|
||||
__vt__28sFStateID_c<13dLytBattery_c> = .data:0x80522AC8; // type:object size:0x34 scope:weak
|
||||
lbl_80522B00 = .data:0x80522B00; // type:object size:0x1C
|
||||
lbl_80522B00 = .data:0x80522B00; // type:object size:0x1B data:string
|
||||
lbl_80522B1C = .data:0x80522B1C; // type:object size:0xC data:string
|
||||
lbl_80522B28 = .data:0x80522B28; // type:object size:0x1C
|
||||
lbl_80522B44 = .data:0x80522B44; // type:object size:0xC
|
||||
lbl_80522B50 = .data:0x80522B50; // type:object size:0x20
|
||||
lbl_80522B70 = .data:0x80522B70; // type:object size:0x10
|
||||
lbl_80522B80 = .data:0x80522B80; // type:object size:0x1C
|
||||
lbl_80522B9C = .data:0x80522B9C; // type:object size:0x1C
|
||||
lbl_80522BB8 = .data:0x80522BB8; // type:object size:0x20
|
||||
lbl_80522BD8 = .data:0x80522BD8; // type:object size:0x1C
|
||||
lbl_80522BF4 = .data:0x80522BF4; // type:object size:0xC
|
||||
lbl_80522C00 = .data:0x80522C00; // type:object size:0x10
|
||||
lbl_80522C10 = .data:0x80522C10; // type:object size:0x10
|
||||
lbl_80522C20 = .data:0x80522C20; // type:object size:0x58
|
||||
lbl_80522C78 = .data:0x80522C78; // type:object size:0xC
|
||||
lbl_80522C84 = .data:0x80522C84; // type:object size:0xC
|
||||
lbl_80522B28 = .data:0x80522B28; // type:object size:0x1A data:string
|
||||
lbl_80522B44 = .data:0x80522B44; // type:object size:0xA data:string
|
||||
lbl_80522B50 = .data:0x80522B50; // type:object size:0x1E data:string
|
||||
lbl_80522B70 = .data:0x80522B70; // type:object size:0xE data:string
|
||||
lbl_80522B80 = .data:0x80522B80; // type:object size:0x1B data:string
|
||||
lbl_80522B9C = .data:0x80522B9C; // type:object size:0x1A data:string
|
||||
lbl_80522BB8 = .data:0x80522BB8; // type:object size:0x1E data:string
|
||||
lbl_80522BD8 = .data:0x80522BD8; // type:object size:0x19 data:string
|
||||
lbl_80522BF4 = .data:0x80522BF4; // type:object size:0xB data:string
|
||||
lbl_80522C00 = .data:0x80522C00; // type:object size:0xD data:string
|
||||
lbl_80522C10 = .data:0x80522C10; // type:object size:0xE data:string
|
||||
lbl_80522C20 = .data:0x80522C20; // type:object size:0xE data:string
|
||||
lbl_80522C78 = .data:0x80522C78; // type:object size:0xB data:string
|
||||
lbl_80522C84 = .data:0x80522C84; // type:object size:0x9 data:string
|
||||
lbl_80522C90 = .data:0x80522C90; // type:object size:0x30
|
||||
lbl_80522CC0 = .data:0x80522CC0; // type:object size:0x30
|
||||
lbl_80522CF0 = .data:0x80522CF0; // type:object size:0x18
|
||||
lbl_80522D08 = .data:0x80522D08; // type:object size:0x140
|
||||
lbl_80522E48 = .data:0x80522E48; // type:object size:0x38
|
||||
lbl_80522CF0 = .data:0x80522CF0; // type:object size:0x14
|
||||
lbl_80522D08 = .data:0x80522D08; // type:object size:0x18
|
||||
lbl_80522E48 = .data:0x80522E48; // type:object size:0x34
|
||||
lbl_80522E80 = .data:0x80522E80; // type:object size:0x14 data:string
|
||||
lbl_80522E94 = .data:0x80522E94; // type:object size:0xC
|
||||
lbl_80522EA0 = .data:0x80522EA0; // type:object size:0x10
|
||||
@@ -38292,8 +38292,8 @@ lbl_80572854 = .sdata:0x80572854; // type:object size:0x8
|
||||
lbl_8057285C = .sdata:0x8057285C; // type:object size:0xC
|
||||
lbl_80572868 = .sdata:0x80572868; // type:object size:0x4 data:4byte
|
||||
@8144 = .sdata:0x80572870; // type:object size:0x1 scope:local data:string
|
||||
lbl_80572878 = .sdata:0x80572878; // type:object size:0x4
|
||||
lbl_8057287C = .sdata:0x8057287C; // type:object size:0x4
|
||||
lbl_80572878 = .sdata:0x80572878; // type:object size:0x1
|
||||
lbl_8057287C = .sdata:0x8057287C; // type:object size:0x1
|
||||
lbl_80572880 = .sdata:0x80572880; // type:object size:0x8
|
||||
lbl_80572888 = .sdata:0x80572888; // type:object size:0x8 data:string
|
||||
lbl_80572890 = .sdata:0x80572890; // type:object size:0x8
|
||||
@@ -48987,7 +48987,7 @@ StateID_On__13dLytBattery_c = .bss:0x805B09C0; // type:object size:0x30 data:4by
|
||||
StateID_None__13dLytBattery_c = .bss:0x805B0A00; // type:object size:0x30 data:4byte
|
||||
@7518 = .bss:0x805B0A30; // type:object size:0xC scope:local
|
||||
StateID_Out__13dLytBattery_c = .bss:0x805B0A40; // type:object size:0x30 data:4byte
|
||||
lbl_805B0A70 = .bss:0x805B0A70; // type:object size:0x10
|
||||
lbl_805B0A70 = .bss:0x805B0A70; // type:object size:0xC
|
||||
StateID_Wait__22dLytAreaCaptionParts_c = .bss:0x805B0A80; // type:object size:0x30 data:4byte
|
||||
StateID_Start__22dLytAreaCaptionParts_c = .bss:0x805B0AC0; // type:object size:0x30 data:4byte
|
||||
StateID_Out__22dLytAreaCaptionParts_c = .bss:0x805B0B00; // type:object size:0x30 data:4byte
|
||||
|
||||
+1
-1
@@ -426,7 +426,7 @@ config.libs = [
|
||||
Object(NonMatching, "d/lyt/d_lyt_map.cpp"),
|
||||
Object(Matching, "d/lyt/d_lyt_note.cpp"),
|
||||
Object(Matching, "d/lyt/d_lyt_battery.cpp"),
|
||||
Object(NonMatching, "d/lyt/d_lyt_area_caption.cpp"),
|
||||
Object(Matching, "d/lyt/d_lyt_area_caption.cpp"),
|
||||
Object(NonMatching, "d/lyt/d_lyt_wipe.cpp"),
|
||||
Object(NonMatching, "d/lyt/d_lyt_help.cpp"),
|
||||
Object(Matching, "d/lyt/d_lyt_bird_gauge.cpp"),
|
||||
|
||||
@@ -6,9 +6,16 @@ public:
|
||||
static bool checkButtonAPressed();
|
||||
static bool checkButtonBPressed();
|
||||
static bool checkButtonZPressed();
|
||||
static bool checkButtonCPressed();
|
||||
static bool checkButtonMinusPressed();
|
||||
static bool checkButtonPlusPressed();
|
||||
static bool checkButton1Pressed();
|
||||
static bool checkButton2Pressed();
|
||||
|
||||
static bool checkButtonDpadUpPressed();
|
||||
static bool checkButtonDpadDownPressed();
|
||||
static bool checkButtonDpadLeftPressed();
|
||||
static bool checkButtonDpadRightPressed();
|
||||
|
||||
static bool checkButtonAHeld();
|
||||
static bool checkButtonZHeld();
|
||||
|
||||
@@ -54,6 +54,17 @@ public:
|
||||
bool isAreaTypeOverworldOrSkyloft() const;
|
||||
s32 getSTIFunk1() const;
|
||||
|
||||
s32 getSTIFbyte4() const;
|
||||
bool isSTIFbyte4_2or3or4() const;
|
||||
bool isSTIFbyte4_5or6() const;
|
||||
bool isSTIFbyte4_7or8or9or10or11() const;
|
||||
bool isSTIFbyte4_1() const {
|
||||
return getSTIFbyte4() == 1;
|
||||
}
|
||||
bool isSTIFbyte4_0() const {
|
||||
return getSTIFbyte4() == 0;
|
||||
}
|
||||
|
||||
s32 getAreaType() const;
|
||||
s32 getMapNameId() const;
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "s/s_State.hpp"
|
||||
#include "s/s_StateMgr.hpp"
|
||||
|
||||
class dLytAreaCaptionParts_c {
|
||||
public:
|
||||
@@ -23,13 +22,15 @@ public:
|
||||
STATE_FUNC_DECLARE(dLytAreaCaptionParts_c, Out);
|
||||
|
||||
private:
|
||||
bool shouldImmediatelyDismiss() const;
|
||||
|
||||
/* 0x000 */ UI_STATE_MGR_DECLARE(dLytAreaCaptionParts_c);
|
||||
/* 0x040 */ d2d::ResAccIf_c mResAcc;
|
||||
/* 0x0EB */ d2d::dLytSub mLyt;
|
||||
/* 0x110 */ d2d::AnmGroup_c mAnmGroups[4];
|
||||
/* 0x540 */ dTextBox_c *mTextBoxes[3];
|
||||
/* 0x54C */ u8 field_0x54C;
|
||||
/* 0x54D */ u8 field_0x54D;
|
||||
/* 0x54C */ bool field_0x54C;
|
||||
/* 0x54D */ bool field_0x54D;
|
||||
/* 0x54E */ u8 mFirst;
|
||||
/* 0x54F */ bool mAnmCtrlInUse[4];
|
||||
};
|
||||
@@ -63,10 +64,10 @@ private:
|
||||
void doSetTextIfWaiting(const char *);
|
||||
void doSetArea(int id);
|
||||
void doCheck();
|
||||
dLytAreaCaptionParts_c mParts[2];
|
||||
|
||||
s32 mPartToDraw;
|
||||
bool mVisible;
|
||||
/* 0x000 */ dLytAreaCaptionParts_c mParts[2];
|
||||
/* 0xAA8 */ s32 mPartToDraw;
|
||||
/* 0xAAC */ bool mVisible;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -109,6 +109,10 @@ public:
|
||||
return mPanesNotHiddenByAreaCaption[8];
|
||||
}
|
||||
|
||||
void setGanbariGaugeHiddenByAreaCaption(bool visible) {
|
||||
mPanesNotHiddenByAreaCaption[15] = visible;
|
||||
}
|
||||
|
||||
bool getField_0x1377E() const {
|
||||
return field_0x1377E;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ public:
|
||||
return strequals(getCurrentEventName(), name);
|
||||
}
|
||||
|
||||
static bool eventRelatedStateFlags_shift0x11_1();
|
||||
|
||||
// Something like isActorInEvent maybe?
|
||||
static bool FUN_800a0570(dAcBase_c *actor);
|
||||
static bool FUN_800a0ba0();
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
#include "d/lyt/d_lyt_area_caption.h"
|
||||
|
||||
#include "d/d_message.h"
|
||||
#include "d/d_pad.h"
|
||||
#include "d/d_sc_game.h"
|
||||
#include "d/d_stage_mgr.h"
|
||||
#include "d/lyt/d_textbox.h"
|
||||
#include "d/lyt/meter/d_lyt_meter.h"
|
||||
#include "toBeSorted/arc_managers/layout_arc_manager.h"
|
||||
|
||||
#include "toBeSorted/event_manager.h"
|
||||
|
||||
STATE_DEFINE(dLytAreaCaptionParts_c, Wait);
|
||||
STATE_DEFINE(dLytAreaCaptionParts_c, Start);
|
||||
@@ -22,6 +27,13 @@ static const d2d::LytBrlanMapping brlanMap2[] = {
|
||||
{ "areaCaption_01_out.brlan", "G_inOut_00"},
|
||||
};
|
||||
|
||||
#define AREA_CAPTION_ANIM_START 0
|
||||
#define AREA_CAPTION_ANIM_TYPE 1
|
||||
#define AREA_CAPTION_ANIM_TEXTLINE 2
|
||||
#define AREA_CAPTION_ANIM_OUT 3
|
||||
|
||||
#define AREA_CAPTION_NUM_ANIMS 4
|
||||
|
||||
static const char *captionBoxes[] = {
|
||||
"T_caption_00",
|
||||
"T_captionS_00",
|
||||
@@ -38,7 +50,7 @@ bool dLytAreaCaptionParts_c::init(int first) {
|
||||
mFirst = first;
|
||||
if (mFirst != 0) {
|
||||
mLyt.build("areaCaption_00.brlyt", nullptr);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
for (int i = 0; i < AREA_CAPTION_NUM_ANIMS; i++) {
|
||||
if (brlanMap1[i].mFile[0] == '\0') {
|
||||
mAnmCtrlInUse[i] = false;
|
||||
} else {
|
||||
@@ -51,7 +63,7 @@ bool dLytAreaCaptionParts_c::init(int first) {
|
||||
} else {
|
||||
mLyt.build("areaCaption_01.brlyt", nullptr);
|
||||
mLyt.setPriority(0x8A);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
for (int i = 0; i < AREA_CAPTION_NUM_ANIMS; i++) {
|
||||
if (brlanMap2[i].mFile[0] == '\0') {
|
||||
mAnmCtrlInUse[i] = false;
|
||||
} else {
|
||||
@@ -67,15 +79,15 @@ bool dLytAreaCaptionParts_c::init(int first) {
|
||||
mTextBoxes[i] = mLyt.getTextBox(captionBoxes[i]);
|
||||
}
|
||||
|
||||
field_0x54C = 0;
|
||||
field_0x54D = 0;
|
||||
field_0x54C = false;
|
||||
field_0x54D = false;
|
||||
mStateMgr.changeState(StateID_Wait);
|
||||
mLyt.calc();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool dLytAreaCaptionParts_c::remove() {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
for (int i = 0; i < AREA_CAPTION_NUM_ANIMS; i++) {
|
||||
if (mAnmCtrlInUse[i]) {
|
||||
mAnmGroups[i].unbind();
|
||||
mAnmGroups[i].remove();
|
||||
@@ -88,7 +100,7 @@ bool dLytAreaCaptionParts_c::remove() {
|
||||
bool dLytAreaCaptionParts_c::update() {
|
||||
mStateMgr.executeState();
|
||||
if (*mStateMgr.getStateID() != StateID_Wait) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
for (int i = 0; i < AREA_CAPTION_NUM_ANIMS; i++) {
|
||||
if (mAnmCtrlInUse[i] && mAnmGroups[i].isEnabled()) {
|
||||
mAnmGroups[i].play();
|
||||
}
|
||||
@@ -108,30 +120,165 @@ void dLytAreaCaptionParts_c::setTextIfWaiting(const char *text) {
|
||||
mTextBoxes[0]->setMessageWithGlobalTextProcessor2(text, nullptr);
|
||||
mTextBoxes[1]->setMessageWithGlobalTextProcessor2(text, nullptr);
|
||||
mTextBoxes[2]->setMessageWithGlobalTextProcessor2(text, nullptr);
|
||||
field_0x54C = 1;
|
||||
field_0x54C = true;
|
||||
}
|
||||
}
|
||||
|
||||
void dLytAreaCaptionParts_c::check() {
|
||||
if (*mStateMgr.getStateID() == StateID_Start) {
|
||||
field_0x54D = 1;
|
||||
field_0x54D = true;
|
||||
}
|
||||
}
|
||||
|
||||
void dLytAreaCaptionParts_c::initializeState_Wait() {}
|
||||
void dLytAreaCaptionParts_c::executeState_Wait() {
|
||||
mTextBoxes[0]->setMessageWithGlobalTextProcessor2("N_inOut_00", nullptr);
|
||||
if (field_0x54C) {
|
||||
field_0x54C = false;
|
||||
s32 typeFrame = 0;
|
||||
if (dStageMgr_c::GetInstance()->isSTIFbyte4_2or3or4()) {
|
||||
typeFrame = 1;
|
||||
} else if (dStageMgr_c::GetInstance()->isSTIFbyte4_5or6()) {
|
||||
typeFrame = 2;
|
||||
} else if (dStageMgr_c::GetInstance()->isSTIFbyte4_7or8or9or10or11()) {
|
||||
typeFrame = 3;
|
||||
} else if (dStageMgr_c::GetInstance()->isSTIFbyte4_1()) {
|
||||
typeFrame = 4;
|
||||
} else if (dStageMgr_c::GetInstance()->isSTIFbyte4_0()) {
|
||||
typeFrame = 5;
|
||||
}
|
||||
|
||||
if (!mFirst && dScGame_c::currentSpawnInfo.getTrial() == SpawnInfo::TRIAL) {
|
||||
typeFrame = 6;
|
||||
}
|
||||
|
||||
s32 numLines = mTextBoxes[0]->calcTextLines(mTextBoxes[0]->GetString(), dMessage_c::getGlobalTagProcessor());
|
||||
f32 textFrame = 0.0f;
|
||||
if (numLines > 1) {
|
||||
textFrame = 1.0f;
|
||||
}
|
||||
|
||||
if (!mFirst) {
|
||||
mLyt.findPane("N_inOut_00")->SetVisible(true);
|
||||
}
|
||||
|
||||
mAnmGroups[AREA_CAPTION_ANIM_TYPE].setFrame(typeFrame);
|
||||
mAnmGroups[AREA_CAPTION_ANIM_TYPE].setAnimEnable(true);
|
||||
mAnmGroups[AREA_CAPTION_ANIM_TEXTLINE].setAnimEnable(true);
|
||||
mAnmGroups[AREA_CAPTION_ANIM_TEXTLINE].setFrame(textFrame);
|
||||
mLyt.calc();
|
||||
mAnmGroups[AREA_CAPTION_ANIM_TYPE].setAnimEnable(false);
|
||||
mAnmGroups[AREA_CAPTION_ANIM_TEXTLINE].setAnimEnable(false);
|
||||
mAnmGroups[AREA_CAPTION_ANIM_START].setAnimEnable(true);
|
||||
mAnmGroups[AREA_CAPTION_ANIM_START].setFrame(0.0f);
|
||||
mStateMgr.changeState(StateID_Start);
|
||||
}
|
||||
}
|
||||
void dLytAreaCaptionParts_c::finalizeState_Wait() {}
|
||||
|
||||
void dLytAreaCaptionParts_c::initializeState_Start() {}
|
||||
void dLytAreaCaptionParts_c::executeState_Start() {}
|
||||
void dLytAreaCaptionParts_c::initializeState_Start() {
|
||||
if (mFirst == 0) {
|
||||
dLytAreaCaption_c::setVisible(true);
|
||||
dLytMeterContainer_c::GetInstance()->setAreaCaptionOverrideVisibility(false);
|
||||
dLytMeterContainer_c::GetMeter()->setGanbariGaugeHiddenByAreaCaption(true);
|
||||
}
|
||||
}
|
||||
void dLytAreaCaptionParts_c::executeState_Start() {
|
||||
if (mAnmGroups[AREA_CAPTION_ANIM_START].isEndReached()) {
|
||||
mAnmGroups[AREA_CAPTION_ANIM_START].setAnimEnable(false);
|
||||
if (!mFirst) {
|
||||
dLytAreaCaption_c::setVisible(false);
|
||||
dLytMeterContainer_c::GetInstance()->setAreaCaptionOverrideVisibility(true);
|
||||
}
|
||||
mStateMgr.changeState(StateID_Wait);
|
||||
} else {
|
||||
if (shouldImmediatelyDismiss()) {
|
||||
field_0x54D = false;
|
||||
if (mFirst) {
|
||||
mAnmGroups[AREA_CAPTION_ANIM_START].setFrame(0.0f);
|
||||
mLyt.calc();
|
||||
mAnmGroups[AREA_CAPTION_ANIM_START].setAnimEnable(false);
|
||||
mStateMgr.changeState(StateID_Wait);
|
||||
} else {
|
||||
mAnmGroups[AREA_CAPTION_ANIM_OUT].setAnimEnable(true);
|
||||
mAnmGroups[AREA_CAPTION_ANIM_OUT].setFrame(0.0f);
|
||||
mStateMgr.changeState(StateID_Out);
|
||||
dLytAreaCaption_c::setVisible(false);
|
||||
dLytMeterContainer_c::GetInstance()->setAreaCaptionOverrideVisibility(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
void dLytAreaCaptionParts_c::finalizeState_Start() {}
|
||||
|
||||
void dLytAreaCaptionParts_c::initializeState_Out() {}
|
||||
void dLytAreaCaptionParts_c::executeState_Out() {}
|
||||
void dLytAreaCaptionParts_c::executeState_Out() {
|
||||
if (mAnmGroups[AREA_CAPTION_ANIM_OUT].isEndReached()) {
|
||||
mAnmGroups[AREA_CAPTION_ANIM_OUT].setAnimEnable(false);
|
||||
if (!mFirst) {
|
||||
dLytAreaCaption_c::setVisible(false);
|
||||
dLytMeterContainer_c::GetInstance()->setAreaCaptionOverrideVisibility(true);
|
||||
}
|
||||
mStateMgr.changeState(StateID_Wait);
|
||||
}
|
||||
}
|
||||
void dLytAreaCaptionParts_c::finalizeState_Out() {}
|
||||
|
||||
bool dLytAreaCaptionParts_c::shouldImmediatelyDismiss() const {
|
||||
if (mFirst) {
|
||||
return field_0x54D;
|
||||
}
|
||||
|
||||
if (field_0x54D) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (dPad::checkButtonBPressed()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (dLytMeterContainer_c::GetInstance()->checkAllFlags(0x400) && dPad::checkButtonCPressed()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (dLytMeterContainer_c::GetInstance()->checkAllFlags(0x20) && dPad::checkButtonPlusPressed()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (dPad::checkButtonMinusPressed()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (dLytMeterContainer_c::GetInstance()->checkAllFlags(0x80) && dPad::checkButton1Pressed()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (dLytMeterContainer_c::GetInstance()->checkAllFlags(0x100) && dPad::checkButton2Pressed()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (dPad::checkButtonDpadUpPressed()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (dLytMeterContainer_c::GetInstance()->checkAllFlags(0x2) && dPad::checkButtonDpadDownPressed()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (dLytMeterContainer_c::GetInstance()->checkAllFlags(0x4) && dPad::checkButtonDpadLeftPressed()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (dLytMeterContainer_c::GetInstance()->checkAllFlags(0x8) && dPad::checkButtonDpadRightPressed()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (EventManager::eventRelatedStateFlags_shift0x11_1()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool dLytAreaCaption_c::create() {
|
||||
new dLytAreaCaption_c();
|
||||
if (dLytAreaCaption_c::sInstance == nullptr) {
|
||||
|
||||
@@ -547,19 +547,6 @@ bool dLytMeter_c::fn_800CA040() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void floats() {
|
||||
32.0f;
|
||||
1.0f;
|
||||
0.0f;
|
||||
int x = 0;
|
||||
f32 f = x;
|
||||
}
|
||||
|
||||
void floats2() {
|
||||
5.0f;
|
||||
3.0f;
|
||||
}
|
||||
|
||||
void dLytMeter_c::setUiMode(u16 value) const {
|
||||
StoryflagManager::sInstance->setFlagOrCounterToValue(840, value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user