Split and Label gamework.c

This commit is contained in:
gamemasterplc 2023-11-30 16:44:13 -06:00
parent eb0cad89f0
commit d759d991f7
9 changed files with 65 additions and 59 deletions

View file

@ -61,7 +61,7 @@ static void SubchrMain()
int ext_character[4];
int i, cursor_pos;
for(i=0; i<4; i++) {
character[i] = gPlayerConfig[i].character;
character[i] = GWPlayerCfg[i].character;
ext_character[i] = 0;
cur_direction[i] = 0;
}
@ -90,7 +90,7 @@ static void SubchrMain()
if(GetBtns() & 0x1000) {
for(i=0; i<4; i++) {
if(ext_character[i] != 0) {
gPlayerConfig[i].character = ext_character[i]+7;
GWPlayerCfg[i].character = ext_character[i]+7;
}
}
fn_80032A58(30);

View file

@ -64,7 +64,7 @@ const double _three = 3.0;
// function is probably global. only inlined in rels?
inline s32 get_current_board(void) {
return lbl_8018FCF8.unk08 & 0x1F;
return GWSystem.unk08 & 0x1F;
}
void fn_1_E0(void) {
@ -78,7 +78,7 @@ void fn_1_E0(void) {
s32 temp2;
temp2 = get_current_board();
lbl_1_bss_0 = &lbl_8018FCF8.unk10;
lbl_1_bss_0 = &GWSystem.unk10;
lbl_1_bss_0->unk0 = 0;
lbl_1_bss_0->unk4 = 0;
lbl_1_bss_0->unk6 = 0;

View file

@ -174,7 +174,7 @@ void fn_1_13A4(void) {
fn_1_BA0(0x2E0023);
for (i = 0; i < 4; i++) {
gPlayerData[i].flags.unk0 = 1;
GWPlayer[i].flags.unk0 = 1;
}
fn_800A4C88();
fn_800884F4(0);

View file

@ -84,21 +84,21 @@ void fn_1_176C(void) {
void fn_1_179C(void) {
fn_1_BA0(0x2E0025);
gPlayerData[1].flags.unk0 = 2;
gPlayerData[3].flags.unk0 = 2;
GWPlayer[1].flags.unk0 = 2;
GWPlayer[3].flags.unk0 = 2;
}
void fn_1_17F4(void) {
fn_1_BA0(0x2E0026);
gPlayerData[0].flags.unk0 = 2;
GWPlayer[0].flags.unk0 = 2;
}
void fn_1_1834(void) {
fn_1_BA0(0x2E0027);
gPlayerData[0].flags.unk0 = 1;
gPlayerData[1].flags.unk0 = 1;
gPlayerData[2].flags.unk0 = 1;
gPlayerData[3].flags.unk0 = 2;
GWPlayer[0].flags.unk0 = 1;
GWPlayer[1].flags.unk0 = 1;
GWPlayer[2].flags.unk0 = 1;
GWPlayer[3].flags.unk0 = 2;
}
void fn_1_18BC(void) {
@ -137,8 +137,8 @@ void fn_1_1984(void) {
if (fn_8005B6A8() != 0) {
return;
}
for (i = 0; i < ARRAY_COUNT(gPlayerData); i++) {
contPortIndex = gPlayerData[i].controllerPort;
for (i = 0; i < ARRAY_COUNT(GWPlayer); i++) {
contPortIndex = GWPlayer[i].controllerPort;
if (contPortIndex == -1) {
continue;
}
@ -166,8 +166,8 @@ int fn_1_1AAC(s16 arg0, s32 arg1) {
HuWinDispOn(lbl_1_bss_E);
if (fn_8005B6A8() == 0) {
s32 contPortIndex;
for (i = 0; i < ARRAY_COUNT(gPlayerData); i++) {
contPortIndex = gPlayerData[i].controllerPort;
for (i = 0; i < ARRAY_COUNT(GWPlayer); i++) {
contPortIndex = GWPlayer[i].controllerPort;
if (contPortIndex == -1) {
continue;
}
@ -189,8 +189,8 @@ int fn_1_1AAC(s16 arg0, s32 arg1) {
}
if (arg0 != 0x1D) {
OSReport(lbl_1_data_258,
(gPlayerData[0].characterID >> 5) & 1, (gPlayerData[1].characterID >> 5) & 1,
(gPlayerData[2].characterID >> 5) & 1, (gPlayerData[3].characterID >> 5) & 1,
(GWPlayer[0].characterID >> 5) & 1, (GWPlayer[1].characterID >> 5) & 1,
(GWPlayer[2].characterID >> 5) & 1, (GWPlayer[3].characterID >> 5) & 1,
lbl_1_bss_0->unk0, arg0, arg1, lbl_1_bss_0->unk4, lbl_1_bss_0->unk6);
if (lbl_1_data_108[lbl_1_bss_0->unk0].unk0 != -1) {
if (arg0 == 5) {