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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
|
#include <ultra64.h>
#include <global.h>
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_8008E750.s")
s32 func_8008E8DC(GlobalContext* globalCtx, Player* player) {
return (player->stateFlags1 & 0x20000080 || player->action || globalCtx->sceneLoadFlag == 0x14 ||
player->stateFlags1 & 1 || player->unk_692 & 0x80 ||
(gSaveContext.unk_13F0 && func_8008F0D8(player, player->unk_154) >= 0));
}
s32 func_8008E988(GlobalContext* globalCtx) {
Player* player = PLAYER;
return func_8008E8DC(globalCtx, player) || player->unk_6AD == 4;
}
s32 func_8008E9C4(Player* player) {
return player->stateFlags1 & 0x10;
}
s32 func_8008E9D0(Player* player) {
return LINK_IS_CHILD && player->currentShield == 2;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_8008E9F8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_8008EA40.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_8008EB2C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_8008EC04.s")
void func_8008EC70(Player* player) {
player->unk_154 = player->unk_151;
func_8008EC04(player, func_8008E9F8(player, player->unk_151));
player->unk_6AD = 0;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_8008ECAC.s")
void func_8008ED9C(GlobalContext* globalCtx, Player* player, s32 item, s32 arg2) {
Inventory_UpdateBottleItem(globalCtx, item, player->unk_150);
if (item != ITEM_BOTTLE) {
player->unk_152 = item;
player->unk_151 = arg2;
}
player->unk_154 = arg2;
}
void func_8008EDF0(Player* player) {
player->unk_664 = NULL;
player->stateFlags2 &= ~0x2000;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_8008EE08.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_8008EEAC.s")
s32 func_8008EF44(GlobalContext* globalCtx, s32 arg1) {
globalCtx->unk_11E5C = (arg1 + 1);
return 1;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_8008EF5C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_8008F034.s")
u8 func_8008F080(GlobalContext* globalCtx) {
Player* player = PLAYER;
return player->currentMask;
}
void func_8008F08C(GlobalContext* globalCtx) {
Player* player = PLAYER;
player->currentMask = 0;
}
s32 func_8008F098(GlobalContext* globalCtx) {
Player* player = PLAYER;
return player->currentShield == 3;
}
s32 func_8008F0AC(GlobalContext* globalCtx) {
Player* player = PLAYER;
return player->unk_15D == 0xa && player->currentShield == 3;
}
s32 func_8008F0D8(Player* player, s32 arg1) {
s32 temp_v0 = arg1 - 0x15;
if (temp_v0 >= 0 && temp_v0 < 6) {
return temp_v0;
}
return -1;
}
s32 func_8008F104(Player* player) {
return player->unk_151 == 0x10 || player->unk_151 == 0x11;
}
s32 func_8008F128(Player* player) {
return func_8008F104(player) && player->heldActor == NULL;
}
s32 func_8008F158(s32 arg0) {
s32 temp_v0 = arg0 - 2;
if (temp_v0 > 0 && temp_v0 < 6) {
return temp_v0;
}
return 0;
}
void func_8008F180(Player* player) {
func_8008F158(player->unk_151);
}
s32 func_8008F1A0(Player* player) {
if (player->unk_151 >= 5 && player->unk_151 < 8) {
return 1;
}
return 0;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_8008F1CC.s")
s32 func_8008F224(Player* player, s32 arg1) {
s32 temp_v0 = arg1 - 0x1E;
if (temp_v0 >= 0 && temp_v0 < 0xD) {
return temp_v0;
}
return -1;
}
void func_8008F250(Player* player) {
func_8008F224(player, player->unk_151);
}
s32 func_8008F270(Player* player, s32 arg1) {
s32 temp_v0 = arg1 - 0x12;
if (temp_v0 >= 0 && temp_v0 < 2) {
return temp_v0;
}
return -1;
}
s32 func_8008F29C(Player* player) {
return func_8008F270(player, player->unk_151);
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_8008F2BC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_8008F2F8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_8008F470.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_8008F87C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_8008FCC8.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80090014.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_800902F0.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80090440.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80090480.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80090604.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_800906D4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_800907E4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_800909B4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80090A28.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80090AFC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80090D20.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80091738.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80091880.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80091A24.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_8009214C.s")
|