summaryrefslogtreecommitdiff
path: root/include/d/lyt/d_lyt_util_items.h
blob: 00ea2d3ef1ee594fd500a26bf3e2dfcd70cef2ac (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
114
115
#ifndef D_LYT_UTIL_ITEMS_H
#define D_LYT_UTIL_ITEMS_H

#include "common.h"
#include "sized_string.h"
#include "toBeSorted/dowsing_target.h"

enum LytItemNumberColor_e {
    LYT_ITEM_COLOR_GOLD = 0,
    LYT_ITEM_COLOR_RED = 1,
    LYT_ITEM_COLOR_GREEN = 2,
    LYT_ITEM_COLOR_NONE = 3,
};

enum SongLifeTreeSeedStatus_e {
    SONG_LIFETREE_NONE = 0,
    SONG_LIFETREE_HAS_SOTH_PARTS_OR_SEED = 1,
    SONG_LIFETREE_HAS_SOTH = 2,
};

s32 convertLytPouchSlot2(s32 fileSlot);

u8 getSongLifeTreeStatus();

/** 0: no sword, 6: TMS */
s32 getCurrentSwordLevel();
u16 getCurrentSwordItemId();
bool isSwordRestrictedBokoBase();

u16 getCurrentGoddessHarpItemId();
bool isHarpRestrictedBokoBase();

u16 getCurrentEarringsItemId();

u16 getTabletItemIdForIndex(s32 index);

u16 getTriforceItemIdForIndex(s32 index);

u16 getSongItemIdForIndex(s32 index);

bool hasGoddessHarp();

bool hasSong(s32 index);

bool hasWaterDragonScale();
u16 getCurrentWaterDragonScaleItemId();
bool isWaterDragonScaleRestricted();

bool hasSailcloth();

s32 getCurrentMittsLevel();
u16 getCurrentMittsItemId();
bool isMittsRestricted();

u16 getCurrentSailclothItemId();

u16 getCurrentWalletItemId();

u16 getCurrentHeartPieceItemId();

void getItemLabel(s32 itemId, SizedString<32> &buf);
void getCaptionItemLabel(s32 itemId, SizedString<32> &buf);
void getDowsingLabel(s32 itemId, SizedString<32> &buf);
void getPauseCategoryLabel(s32 itemId, SizedString<32> &buf);

// TODO these could be u16
const wchar_t *getItemText(s32 itemId);
const wchar_t *getCaptionItemText(s32 itemId);
const wchar_t *getDowsingText(s32 itemId);
const wchar_t *getPauseCategoryText(s32 itemId);

bool isPouchBocoburinLocked();

// TODO - these return types may require some work

u8 getPouchItemForSlot(s32 slot, bool unk);
bool hasPouchSlot(s32 slot, bool unk);
s32 getPouchItemAmount(s32 slot, bool unk);
u8 getPouchItemNumberColor(s32 slot, bool unk);
// not sure about this one
f32 getPouchShieldDurability(s32 slot, bool unk);
u32 getPouchItemIdForIndex(s32 slot, bool unk);
// not sure about this one
f32 getPouchShieldDurability2(s32 slot, bool unk);
// not sure about this one
s32 getEvenMoreShieldStuff(s32 slot, bool unk);

u8 getDepositItemForSlot(s32 slot);
s32 getDepositItemAmount(s32 slot);
u8 getDepositItemNumberColor(s32 slot);
f32 getDepositShieldDurability(s32 slot);

// TODO - rename and make sense of these
DowsingTarget::DowsingSlot dowsingSlotForIndex(s32 index);
u8 getLytIndexForDowsingIndex(s32 index);
u16 getDowsingItemIdForIndex(s32 index);
bool hasDowsingInIndex(s32 index);

// B-Wheel
s32 getBWheelSlotForIndex(s32 index);
bool isBWheelIndexWithNumber(s32 index);
s32 getNumberForBWheelIndex(s32 index);
s32 getItemLevelForBWheelIndex(s32 index);
u8 getLytItemIdForBWheelIndex(s32 index);
bool isBWheelIndexBocoburinLocked(s32 index, bool unk);
u8 getNumberColorForBWheelIndex(s32 index);
u16 getBWheelItemIdForIndex(s32 index);

/**
 * FR: -1, 0, 1 singular, else plural
 * Otherwise: -1, 1 singular, else plural
 */
bool shouldUseSingular(s32 amount);

#endif