Fix names and constant usage for union room classes

This commit is contained in:
GriffinR committed 2022-08-23 12:44:07 -04:00
1 parent 8a8ba92f21
commit 3771abbe08
7 files changed
+26 -20

No files matched your search

+3 -2
View File
@@ -24,7 +24,8 @@ static u32 IsUnionRoomPlayerInvisible(u32, u32);
static void SetUnionRoomObjectFacingDirection(s32, s32, u8);
// + 2 is just to match, those elements are empty and never read
static const u8 sUnionRoomObjGfxIds[GENDER_COUNT][MAX_UNION_ROOM_LEADERS + 2] = {
// Graphics ids should correspond with the classes in gUnionRoomFacilityClasses
static const u8 sUnionRoomObjGfxIds[GENDER_COUNT][NUM_UNION_ROOM_CLASSES + 2] = {
[MALE] = {
OBJ_EVENT_GFX_MAN_3,
OBJ_EVENT_GFX_BLACK_BELT,
@@ -132,7 +133,7 @@ static bool32 IsPlayerStandingStill(void)
// Gender and trainer id are used to determine which sprite a player appears as
static u8 GetUnionRoomPlayerGraphicsId(u32 gender, u32 id)
{
return sUnionRoomObjGfxIds[gender][id % MAX_UNION_ROOM_LEADERS];
return sUnionRoomObjGfxIds[gender][id % NUM_UNION_ROOM_CLASSES];
}
static void GetUnionRoomPlayerCoords(u32 leaderId, u32 memberId, s32 * x, s32 * y)