Skip to content

Commit 91868eb

Browse files
committed
battle: func_800AD324 + D_800F5BB8 struct
1 parent 44efea7 commit 91868eb

5 files changed

Lines changed: 60 additions & 32 deletions

File tree

config/sym_ovl_export.us.txt

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -218,32 +218,7 @@ D_800F5B72 = 0x800f5b72;
218218
D_800F5B73 = 0x800f5b73;
219219
D_800F5B74 = 0x800f5b74;
220220
D_800F5BB8 = 0x800f5bb8;
221-
D_800F5BBA = 0x800f5bba;
222-
D_800F5BBC = 0x800f5bbc;
223-
D_800F5BBE = 0x800f5bbe;
224-
D_800F5BC0 = 0x800f5bc0;
225-
D_800F5BC2 = 0x800f5bc2;
226-
D_800F5BC4 = 0x800f5bc4;
227-
D_800F5BC5 = 0x800f5bc5;
228-
D_800F5BC6 = 0x800f5bc6;
229-
D_800F5BC7 = 0x800f5bc7;
230-
D_800F5BC8 = 0x800f5bc8;
231-
D_800F5BCC = 0x800f5bcc;
232-
D_800F5BCD = 0x800f5bcd;
233-
D_800F5BCE = 0x800f5bce;
234-
D_800F5BD7 = 0x800f5bd7;
235-
D_800F5BD8 = 0x800f5bd8;
236-
D_800F5BDF = 0x800f5bdf;
237-
D_800F5BE0 = 0x800f5be0;
238-
D_800F5BE1 = 0x800f5be1;
239-
D_800F5BE2 = 0x800f5be2;
240-
D_800F5BE3 = 0x800f5be3;
241-
D_800F5BE4 = 0x800f5be4;
242-
D_800F5BE8 = 0x800f5be8;
243-
D_800F5BEC = 0x800f5bec;
244-
D_800F5BF0 = 0x800f5bf0;
245-
D_800F5BF4 = 0x800f5bf4;
246-
D_800F5BF6 = 0x800f5bf6;
221+
D_800F5C84 = 0x800f5c84;
247222
D_800F5E60 = 0x800f5e60;
248223
D_800F5E64 = 0x800f5e64;
249224
D_800F5E65 = 0x800f5e65;

config/symbols.battle.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
BATTLE_EnqueueLoadImage = 0x800D2538;
22
BATTLE_FlushImageQueue = 0x800D25E8;
3+
D_800F5BB8 = 0x800F5BB8; // size:0xCC
34
D_800F5F44 = 0x800F5F44; // size:0x1E88
45
D_800F83E4 = 0x800F83E4; // size:0x138
56
D_800FA63C = 0x800FA63C; // size:0x38
@@ -12,4 +13,4 @@ D_80162978 = 0x80162978; // size:0xC80
1213
D_8016360C = 0x8016360C; // size:0xAC
1314
D_801636B8 = 0x801636B8; // size:0xA0
1415
D_80163798 = 0x80163798; // size:0x300
15-
D_80163C80 = 0x80163C80; // size:0xC
16+
D_80163C80 = 0x80163C80; // size:0xC

include/game.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,12 @@ typedef struct {
258258
s32 unk23C;
259259
s32 unk240;
260260
s32 unk244;
261+
s32 unk248;
262+
s32 unk24C;
263+
s32 unk250;
264+
s32 unk254;
265+
s32 unk258;
266+
s32 unk25C;
261267
} Unk800A8D04; // size: ???
262268

263269
// seems to be related to a party member during battle

src/battle/battle.c

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A6858);
442442

443443
INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A68FC);
444444

445-
void func_800A6A3C(s32 arg0, s32 arg1) { D_800F5BB8[arg0].raw[6] |= arg1; }
445+
void func_800A6A3C(s32 arg0, s32 arg1) { D_800F5BB8[arg0].unkE |= arg1; }
446446

447447
INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800A6A70);
448448

@@ -695,7 +695,35 @@ INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800AD088);
695695

696696
INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800AD0FC);
697697

698-
INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800AD324);
698+
void func_800AD324(s32 arg0, s32 arg1, s32 arg2, s32 arg3) {
699+
s32 temp_t0;
700+
s32 var_a2;
701+
702+
var_a2 = arg2;
703+
temp_t0 = D_80063014->unk220 & 1;
704+
if (arg3 & 1) {
705+
if (arg1 == D_80063014->unk208) {
706+
if (D_80063014->unk25C < var_a2) {
707+
var_a2 = D_80063014->unk25C;
708+
}
709+
}
710+
if (temp_t0) {
711+
var_a2 = -var_a2;
712+
}
713+
D_800F5BB8[arg0].unk30 -= var_a2;
714+
}
715+
if (arg3 & 2) {
716+
if (arg1 == D_80063014->unk208) {
717+
if (D_80063014->unk258 < var_a2) {
718+
var_a2 = D_80063014->unk258;
719+
}
720+
}
721+
if (temp_t0) {
722+
var_a2 = -var_a2;
723+
}
724+
D_800F5BB8[arg0].unk2C -= var_a2;
725+
}
726+
}
699727

700728
INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800AD420);
701729

@@ -836,7 +864,7 @@ void func_800AF380(s32 arg0) { func_800A7254(2, arg0, 0x15, 0xF); }
836864

837865
INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800AF3AC);
838866

839-
void func_800AF470(s32 arg0) { D_800F5BB8[arg0].raw[0x20] = 3; }
867+
void func_800AF470(s32 arg0) { D_800F5BB8[arg0].unk28 = 3; }
840868

841869
INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800AF494);
842870

src/battle/battle_private.h

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,26 @@ typedef struct {
1818
s16 unk2;
1919
s16 unk4;
2020
s16 unk6;
21-
u8 raw[0x3C];
22-
} Unk800AF470;
21+
s32 unk8;
22+
s16 unkC;
23+
u8 unkE;
24+
u8 unkF;
25+
s32 unk10;
26+
s32 unk14;
27+
s32 unk18;
28+
s32 unk1C;
29+
s32 unk20;
30+
s32 unk24;
31+
s8 unk28;
32+
s8 unk29;
33+
s16 unk2A;
34+
s32 unk2C;
35+
s32 unk30;
36+
s32 unk34;
37+
s32 unk38;
38+
s32 unk3C;
39+
s32 unk40;
40+
} Unk800AF470; // 0x44
2341

2442
typedef struct {
2543
s8 unk0;

0 commit comments

Comments
 (0)