Skip to content

Commit eb1e0c9

Browse files
committed
battle: func_800B3CD0, func_800B8268
1 parent f529e5e commit eb1e0c9

6 files changed

Lines changed: 36 additions & 8 deletions

File tree

config/sym_ovl_export.us.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,6 @@ func_800B3A04 = 0x800b3a04;
11011101
func_800B3AB8 = 0x800b3ab8;
11021102
func_800B3B84 = 0x800b3b84;
11031103
func_800B3C50 = 0x800b3c50;
1104-
func_800B3CD0 = 0x800b3cd0;
11051104
func_800B3E2C = 0x800b3e2c;
11061105
func_800B3FAC = 0x800b3fac;
11071106
func_800B3FFC = 0x800b3ffc;
@@ -1131,7 +1130,6 @@ func_800B7DB4 = 0x800b7db4;
11311130
func_800B7FB4 = 0x800b7fb4;
11321131
func_800B7FDC = 0x800b7fdc;
11331132
func_800B8234 = 0x800b8234;
1134-
func_800B8268 = 0x800b8268;
11351133
func_800B8360 = 0x800b8360;
11361134
func_800B8438 = 0x800b8438;
11371135
func_800B888C = 0x800b888c;

config/us.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ overlays:
5757
- [0x888, .rodata, battle2]
5858
- [0xDD4, .rodata, battle3]
5959
- [0x1158, c, battle]
60-
- [0x18360, c, battle1]
60+
- [0x18268, c, battle1]
6161
- [0x27B60, c, battle2]
6262
- [0x38A04, c, battle3]
6363
- [0x47A38, data]

src/battle/battle.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,8 +1042,16 @@ INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800B3B84);
10421042

10431043
INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800B3C50);
10441044

1045-
void func_800B3CD0(void);
1046-
INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800B3CD0);
1045+
static void func_800B3CD0(void) {
1046+
Yamada* y;
1047+
u_long* dst;
1048+
1049+
dst = (u_long*)0x801B0000;
1050+
func_800D2980(dst, 0, 0, 0);
1051+
y = &D_800E8068[D_800FA9C4];
1052+
DS_read(y->loc, *&D_800E8068[D_800FA9C4].len, dst, func_800B3AB8);
1053+
func_800B7FB4();
1054+
}
10471055

10481056
static void func_800B3D38(void) {
10491057
func_800C5E94();
@@ -1146,5 +1154,3 @@ void func_800B8234(s32 arg0) {
11461154
D_801517BC = 0;
11471155
}
11481156
}
1149-
1150-
INCLUDE_ASM("asm/us/battle/nonmatchings/battle", func_800B8268);

src/battle/battle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ typedef struct {
186186
/* 0x023 */ u8 D_80151907;
187187
/* 0x024 */ s8 D_80151908;
188188
/* 0x025 */ s8 D_80151909;
189-
/* 0x026 */ s8 D_8015190A;
189+
/* 0x026 */ u8 D_8015190A;
190190
/* 0x027 */ s8 D_8015190B;
191191
/* 0x028 */ s16 D_8015190C;
192192
/* 0x02A */ s8 D_8015190E;

src/battle/battle1.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,28 @@ static void func_800BB75C(Unk800BB75C* arg0, MATRIX* m, s16* arg2, s16* arg3);
66
static void func_800BB804(void);
77
static void func_800BB864(void);
88

9+
static void func_800B8268(void) {
10+
s32 i;
11+
u8* var_a1;
12+
s32 var_t1;
13+
14+
i = 0;
15+
var_t1 = 1;
16+
var_a1 = &D_80163784;
17+
while (i < 10) {
18+
*var_a1 = D_801636B8[i].D_801636B9;
19+
if (!(D_80151200[i].D_8015120C & 8) &&
20+
D_801518E4[i].D_801518E6 != *var_a1 &&
21+
D_801518E4[i].D_8015190A == var_t1) {
22+
D_801518E4[i].D_80151922 |= 1;
23+
D_801518E4[i].D_801518E6 = *var_a1;
24+
}
25+
var_a1++;
26+
i += 1;
27+
}
28+
D_80163787 = 0;
29+
}
30+
931
INCLUDE_ASM("asm/us/battle/nonmatchings/battle1", func_800B8360);
1032

1133
static void func_800B83C4() {

src/battle/battle_private.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,8 @@ extern Unk801636B8 D_801636B8[5];
304304
extern u16 D_80163758[]; // part of a struct
305305
extern u8 D_80163774[];
306306
extern u16 D_8016376E[];
307+
extern u8 D_80163784;
308+
extern s8 D_80163787;
307309
extern Unk800A2F4C D_80163798[0x40];
308310
extern s8 D_80163A98;
309311
extern u16 D_80163B80;

0 commit comments

Comments
 (0)