Add `Gender` enum
This commit is contained in:
parent
d745065d67
commit
9088c3c2b6
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
#include "assert.h"
|
#include "assert.h"
|
||||||
#include "element.h"
|
#include "element.h"
|
||||||
|
#include "gender.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
// Possible data still undiscovered:
|
// Possible data still undiscovered:
|
||||||
|
|
@ -16,7 +17,7 @@ typedef struct {
|
||||||
/* 0x11 */ u8 portrait;
|
/* 0x11 */ u8 portrait;
|
||||||
/* 0x12 */ u8 class;
|
/* 0x12 */ u8 class;
|
||||||
/* 0x13 */ u8 level;
|
/* 0x13 */ u8 level;
|
||||||
/* 0x14 */ u8 gender;
|
/* 0x14 */ Gender gender;
|
||||||
/* 0x15 */ u8 field_0x15;
|
/* 0x15 */ u8 field_0x15;
|
||||||
/* 0x16 */ u16 max_hp;
|
/* 0x16 */ u16 max_hp;
|
||||||
/* 0x18 */ u16 cur_hp;
|
/* 0x18 */ u16 cur_hp;
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,12 @@
|
||||||
|
|
||||||
#include "assert.h"
|
#include "assert.h"
|
||||||
#include "equipment.h"
|
#include "equipment.h"
|
||||||
|
#include "gender.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* 0x00 */ char* name;
|
/* 0x00 */ char* name;
|
||||||
/* 0x04 */ u8 field_0x4;
|
/* 0x04 */ u8 field_0x4;
|
||||||
/* 0x05 */ u8 gender;
|
/* 0x05 */ Gender gender;
|
||||||
/* 0x06 */ u8 leadership_rank;
|
/* 0x06 */ u8 leadership_rank;
|
||||||
/* 0x07 */ u8 field_0x7;
|
/* 0x07 */ u8 field_0x7;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
#ifndef __GENDER_H__
|
||||||
|
#define __GENDER_H__
|
||||||
|
|
||||||
|
#include <ultra64.h>
|
||||||
|
|
||||||
|
#include "assert.h"
|
||||||
|
|
||||||
|
typedef u8 Gender;
|
||||||
|
|
||||||
|
enum {
|
||||||
|
/* 00 */ GENDER_MALE,
|
||||||
|
/* 01 */ GENDER_FEMALE,
|
||||||
|
// The gender is based on the gender of the leader.
|
||||||
|
/* 02 */ GENDER_LEADER,
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
ASSERT_SIZE(Gender, 1);
|
||||||
|
|
||||||
|
#endif // __GENDER_H__
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include "class.h"
|
#include "class.h"
|
||||||
#include "ability.h"
|
#include "ability.h"
|
||||||
|
#include "gender.h"
|
||||||
|
|
||||||
INCLUDE_ASM(const s32, "segment_obdata/_ob_fierce_selection", func_8016D200);
|
INCLUDE_ASM(const s32, "segment_obdata/_ob_fierce_selection", func_8016D200);
|
||||||
|
|
||||||
|
|
@ -132,7 +133,7 @@ u8 class_get_field_0x4(u8 portrait, u8 class) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 43D70 8016DE70 */
|
/* 43D70 8016DE70 */
|
||||||
u8 obClassGetGender(u8 portrait, u8 class) {
|
Gender obClassGetGender(u8 portrait, u8 class) {
|
||||||
if (obClassData[portrait].field_0x45 == class)
|
if (obClassData[portrait].field_0x45 == class)
|
||||||
return obClassData[portrait].gender;
|
return obClassData[portrait].gender;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue