Fixed typing of `__GLOBAL_CONTROLLER_DATA_COPY`

This commit is contained in:
gijs 2023-10-18 15:37:45 +02:00
parent 0ab5a65328
commit 8afad0eccf
2 changed files with 7 additions and 7 deletions

View File

@ -161,7 +161,9 @@ extern OSContStatus __GLOBAL_CONT_STATUS[MAXCONTROLLERS];
extern OSMesgQueue MQ_CONTROLLER;
extern void (*D_800A9FE0)(s16);
extern OSMesgQueue MQ_800C4A00;
extern OSContPad __GLOBAL_CONTROLLER_DATA;
extern OSContPad __GLOBAL_CONTROLLER_DATA[MAXCONTROLLERS];
extern OSContPad __GLOBAL_CONTROLLER_DATA_COPY[MAXCONTROLLERS];
extern u8 D_800AA040;
extern void (*SWAP_BUFFER_FUNC_800A9E8C)(void** buffers);
@ -610,6 +612,5 @@ extern s8 D_800A8213;
extern s16 D_800AEE90;
extern s16 D_800AEF10;
extern s32 __GLOBAL_CONTROLLER_DATA_COPY[];
#endif

View File

@ -81,12 +81,11 @@ loop_2:
var_t0 += 1;
var_a2 += 0x10;
} while (var_t0 < 4);
bzero(&__GLOBAL_CONTROLLER_DATA_COPY, 0x18);
bzero(__GLOBAL_CONTROLLER_DATA_COPY, sizeof(__GLOBAL_CONTROLLER_DATA_COPY));
}
extern u8 D_800AEF9A;
extern OSContPad __GLOBAL_CONTROLLER_DATA;
void func_8007284C(u16 __unused) {
const u16 pattern_a = CONT_A | CONT_B | CONT_L | CONT_START;
@ -94,11 +93,11 @@ void func_8007284C(u16 __unused) {
if ((D_800AEF9A & 1) && !(D_800AEF9A & 4)) {
if (D_800AEF9A & 2) {
if (__GLOBAL_CONTROLLER_DATA.button == 0) {
if (__GLOBAL_CONTROLLER_DATA[0].button == 0) {
D_800AEF9A = D_800AEF9A & 0xFD;
}
} else if (__GLOBAL_CONTROLLER_DATA.button == pattern_a ||
__GLOBAL_CONTROLLER_DATA.button == pattern_b) {
} else if (__GLOBAL_CONTROLLER_DATA[0].button == pattern_a ||
__GLOBAL_CONTROLLER_DATA[0].button == pattern_b) {
D_800AEF9A = D_800AEF9A | 6;
}
}