From 07839f3744ece311bc3c27337e593ecfca4bb80d Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sun, 29 Mar 2020 14:08:51 +1000 Subject: [PATCH] Fix player->unk1580 bitfield --- src/game/game_0fd660.c | 2 +- src/include/types.h | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/game/game_0fd660.c b/src/game/game_0fd660.c index de2246b14..ec3e50aea 100644 --- a/src/game/game_0fd660.c +++ b/src/game/game_0fd660.c @@ -1200,7 +1200,7 @@ glabel func0f0fecd4 void activemenuOpen(void) { - if ((g_Vars.currentplayer->unk1580_s32 & 1) == 0) { + if (g_Vars.currentplayer->unk1583_07 == 0) { g_ActiveMenuIndex = g_Vars.currentplayernum; g_Vars.currentplayer->activemenumode = 1; g_PlayersWithControl[g_Vars.currentplayernum] = false; diff --git a/src/include/types.h b/src/include/types.h index e674ff4ab..0dd15218e 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -2447,12 +2447,11 @@ struct player { /*0x1574*/ u32 unk1574; /*0x1578*/ u32 unk1578; /*0x157c*/ u32 unk157c; - - union { - s8 unk1580; - s32 unk1580_s32; - }; - + /*0x1580*/ s8 unk1580; + /*0x1581*/ u8 unk1581; + /*0x1582*/ u8 unk1582; + /*0x1583*/ u8 unk1583_00 : 7; + /*0x1583*/ u8 unk1583_07 : 1; /*0x1584*/ u32 unk1584; /*0x1588*/ u32 unk1588; /*0x158c*/ u32 unk158c;