decompile rtc

This commit is contained in:
DizzyEggg
2017-09-02 23:28:44 +02:00
parent b5fea95a46
commit 048700fe57
20 changed files with 396 additions and 870 deletions

View File

@@ -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;

View File

@@ -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);
u8 pokemon_species_get_gender_info(u16 species, u32 personality);
#endif // GUARD_POKEMON_H

View File

@@ -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);