summaryrefslogtreecommitdiff
path: root/include/d/lyt/d_lyt_pause_disp_00.h
blob: d0892bb4e4653800e18fdecc01b8703ce3fd805d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#ifndef LYT_PAUSE_DISP_00_H
#define LYT_PAUSE_DISP_00_H

#include "d/d_cursor_hit_check.h"
#include "d/lyt/d2d.h"
#include "d/lyt/d_lyt_common_icon_item.h"
#include "nw4r/lyt/lyt_bounding.h"
#include "s/s_State.hpp"

class dLytPauseDisp00_c {
public:
    dLytPauseDisp00_c();
    virtual ~dLytPauseDisp00_c() {}

    bool build();
    bool remove();
    bool execute();
    bool draw();

    void drawDirectly();
    void requestIn(bool scroll);
    void requestOut(bool scroll);
    void requestSelect();
    void requestRingToggle();
    void requestUnselect();

    bool requestSelectGuide();
    bool requestSelectMpls();

    STATE_FUNC_DECLARE(dLytPauseDisp00_c, None);
    STATE_FUNC_DECLARE(dLytPauseDisp00_c, In);
    STATE_FUNC_DECLARE(dLytPauseDisp00_c, Wait);
    STATE_FUNC_DECLARE(dLytPauseDisp00_c, Select);
    STATE_FUNC_DECLARE(dLytPauseDisp00_c, Ring);
    STATE_FUNC_DECLARE(dLytPauseDisp00_c, GetDemo);
    STATE_FUNC_DECLARE(dLytPauseDisp00_c, Out);

    bool isChangingState() const {
        return mIsChangingState;
    }

    bool hasSelection() const {
        return mHasSelection;
    }

private:
    void setAnm(int idx, f32 value);
    void stopAnm(int idx);
    void playBackwards(d2d::AnmGroup_c &anm);

    // Initial setup
    void setupDisp();
    void setupInventoryWheel();
    void setupHeartPieces();
    void setupWallets();
    void setupMitts();
    void setupSailcloth();
    void setupWaterDragonScale();
    void setupFireshieldEarrings();
    void setupSongsAndLifeTree();
    void setupTabletTriforce();
    void setupSword();
    void setupStoneOfTrials();

    // Dynamic setup
    void setupRingIcons(s32 tab);

    s32 updateSelection();
    s32 getPointerPane() const;
    bool isPointingAtRingIcon();

    void hideItemIcons();
    u16 getPointedItemSpecial(s32 paneIdx, bool *pLocked);

    enum LoadRingTextCmd_e {
        RING_TEXT_RELEASE_TO_CONFIRM = 0,
        RING_TEXT_INITIAL_TAB = 1,
        RING_TEXT_CURRENT_TAB = 2,
    };

    void executeCall();
    void playOnOffTabAnim();
    void loadRingText(u32 cmd);

    /* 0x0004 */ STATE_MGR_DECLARE(dLytPauseDisp00_c);
    /* 0x0040 */ d2d::LytBase_c mLyt;
    /* 0x00D0 */ d2d::AnmGroup_c mAnm[126];
    /* 0x2050 */ dLytCommonIconItem_c mIcons[24];
    /* 0xE110 */ d2d::SubPaneList mSubpaneList;
    /* 0xE11C */ d2d::SubPaneListNode mSubpanes[24];
    /* 0xE29C */ dCursorHitCheckLyt_c mCsHitCheck;
    /* 0xE2C4 */ nw4r::lyt::Bounding *mpBoundings[37];

    /* 0xE358 */ s32 mStep;
    /* 0xE35C */ s32 mPrevNavTarget;
    /* 0xE360 */ s32 mCurrentNavTarget;
    /* 0xE364 */ s32 mCallTimerMaybe;
    /* 0xE368 */ s32 mGetDemoTimer;
    /* 0xE36C */ bool mInRequest;
    /* 0xE36D */ bool mOutRequest;
    /* 0xE36E */ bool mIsChangingState;
    /* 0xE36F */ bool mIsVisible;
    /* 0xE370 */ bool mDoScrollAnim;
    /* 0xE371 */ bool mHasSelection;
    /* 0xE372 */ bool mSelectToggleRequest;
    /* 0xE373 */ bool mSelectGuideRequest;
    /* 0xE374 */ bool mStopCallRequest;
    /* 0xE375 */ bool mSelectMplsRequest;
    /* 0xE376 */ bool mReverseTabChangeAnim;
    /* 0xE377 */ bool mRingToggleRequest;
};

#endif