summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/global.h11
-rw-r--r--include/pokemon.h7
-rw-r--r--include/rtc.h2
3 files changed, 18 insertions, 2 deletions
diff --git a/include/global.h b/include/global.h
index 25fe47635..c201b554f 100644
--- a/include/global.h
+++ b/include/global.h
@@ -87,6 +87,14 @@ struct UCoords16
u16 y;
};
+struct Time
+{
+ /*0x00*/ s16 days;
+ /*0x02*/ s8 hours;
+ /*0x03*/ s8 minutes;
+ /*0x04*/ s8 seconds;
+};
+
struct Pokedex
{
/*0x00*/ u8 order;
@@ -118,6 +126,9 @@ struct SaveBlock2
u16 optionsBattleSceneOff:1; // whether battle animations are disabled
u16 regionMapZoom:1; // whether the map is zoomed in
/*0x18*/ struct Pokedex pokedex;
+ /*0x90*/ u8 filler_90[0x8];
+ /*0x98*/ struct Time localTimeOffset;
+ /*0xA0*/ struct Time lastBerryTreeUpdate;
};
extern struct SaveBlock2 *gSaveBlock2Ptr;
diff --git a/include/pokemon.h b/include/pokemon.h
index b3381a4b0..299a25391 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -1,3 +1,6 @@
+#ifndef GUARD_POKEMON_H
+#define GUARD_POKEMON_H
+
#define MON_DATA_PERSONALITY 0
#define MON_DATA_OT_ID 1
#define MON_DATA_NICKNAME 2
@@ -308,4 +311,6 @@ struct BattleMove
// u32 GetMonData(struct Pokemon *mon, s32 field, u8 *data);
u32 GetMonData();
-u8 pokemon_species_get_gender_info(u16 species, u32 personality); \ No newline at end of file
+u8 pokemon_species_get_gender_info(u16 species, u32 personality);
+
+#endif // GUARD_POKEMON_H
diff --git a/include/rtc.h b/include/rtc.h
index fdc5ad709..5ee6a5316 100644
--- a/include/rtc.h
+++ b/include/rtc.h
@@ -22,7 +22,7 @@ extern struct Time gLocalTime;
void RtcDisableInterrupts(void);
void RtcRestoreInterrupts(void);
u32 ConvertBcdToBinary(u8 bcd);
-bool8 IsLeapYear(u8 year);
+bool8 IsLeapYear(u32 year);
u16 ConvertDateToDayCount(u8 year, u8 month, u8 day);
u16 RtcGetDayCount(struct SiiRtcInfo *rtc);
void RtcInit(void);