mirror of
https://github.com/zeldaret/oot
synced 2026-06-07 12:07:25 -04:00
proposal for link age macros (#1119)
* proposal for link age macros * apply @Dragorn421 suggestions * also annotate the slinkage variable
This commit is contained in:
+2
-2
@@ -31,8 +31,8 @@
|
||||
|
||||
#define GET_ACTIVE_CAM(globalCtx) ((globalCtx)->cameraPtrs[(globalCtx)->activeCamera])
|
||||
|
||||
#define LINK_IS_ADULT (gSaveContext.linkAge == 0)
|
||||
#define LINK_IS_CHILD (gSaveContext.linkAge == 1)
|
||||
#define LINK_IS_ADULT (gSaveContext.linkAge == LINK_AGE_ADULT)
|
||||
#define LINK_IS_CHILD (gSaveContext.linkAge == LINK_AGE_CHILD)
|
||||
|
||||
#define YEARS_CHILD 5
|
||||
#define YEARS_ADULT 17
|
||||
|
||||
+6
-1
@@ -62,7 +62,7 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ s32 entranceIndex; // start of `save` substruct, originally called "memory"
|
||||
/* 0x0004 */ s32 linkAge; // 0: Adult; 1: Child
|
||||
/* 0x0004 */ s32 linkAge;
|
||||
/* 0x0008 */ s32 cutsceneIndex;
|
||||
/* 0x000C */ u16 dayTime; // "zelda_time"
|
||||
/* 0x0010 */ s32 nightFlag;
|
||||
@@ -212,4 +212,9 @@ typedef enum {
|
||||
/* 3 */ SUNSSONG_SPECIAL // time does not advance, but signals the song was played. used for freezing redeads
|
||||
} SunsSongState;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ LINK_AGE_ADULT,
|
||||
/* 1 */ LINK_AGE_CHILD
|
||||
} LinkAge;
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user