wild encounter, fix merge conflicts
This commit is contained in:
1315
include/data/pokemon/egg_moves.h
Normal file
1315
include/data/pokemon/egg_moves.h
Normal file
File diff suppressed because it is too large
Load Diff
27
include/daycare.h
Normal file
27
include/daycare.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef GUARD_DAYCARE_H
|
||||
#define GUARD_DAYCARE_H
|
||||
|
||||
#define EGG_HATCH_LEVEL 5
|
||||
|
||||
u8 *GetMonNick(struct Pokemon *mon, u8 *dest);
|
||||
u8 *GetBoxMonNick(struct BoxPokemon *mon, u8 *dest);
|
||||
u8 CountPokemonInDaycare(struct DayCare *daycare);
|
||||
void InitDaycareMailRecordMixing(struct DayCare *daycare, struct RecordMixingDayCareMail *daycareMail);
|
||||
void StoreSelectedPokemonInDaycare(void);
|
||||
u16 TakePokemonFromDaycare(void);
|
||||
void GetDaycareCost(void);
|
||||
u8 GetNumLevelsGainedFromDaycare(void);
|
||||
void TriggerPendingDaycareEgg(void);
|
||||
void RejectEggFromDayCare(void);
|
||||
void CreateEgg(struct Pokemon *mon, u16 species, bool8 setHotSpringsLocation);
|
||||
void GiveEggFromDaycare(void);
|
||||
bool8 DoEggActions_CheckHatch(void);
|
||||
u16 GetSelectedMonNickAndSpecies(void);
|
||||
void GetDaycareMonNicknames(void);
|
||||
u8 GetDaycareState(void);
|
||||
void SetDaycareCompatibilityString(void);
|
||||
bool8 NameHasGenderSymbol(const u8 *name, u8 genderRatio);
|
||||
void ShowDaycareLevelMenu(void);
|
||||
void ChooseSendDaycareMon(void);
|
||||
|
||||
#endif // GUARD_DAYCARE_H
|
||||
10
include/egg_hatch.h
Normal file
10
include/egg_hatch.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef GUARD_EGG_HATCH_H
|
||||
#define GUARD_EGG_HATCH_H
|
||||
|
||||
void ScriptHatchMon(void);
|
||||
bool8 sub_8071614(void);
|
||||
void EggHatch(void);
|
||||
u8 GetEggStepsToSubtract(void);
|
||||
u16 sub_80722E0(void);
|
||||
|
||||
#endif // GUARD_EGG_HATCH_H
|
||||
@@ -1,9 +1,11 @@
|
||||
#ifndef GUARD_FLAGS_H
|
||||
#define GUARD_FLAGS_H
|
||||
|
||||
#define FLAG_LEGENDARIES_IN_SOOTOPOLIS 0x53
|
||||
#define FLAG_LEGENDARIES_IN_SOOTOPOLIS 0x53
|
||||
#define FLAG_PENDING_DAYCARE_EGG 0x86
|
||||
|
||||
#define FLAG_TRAINER_FLAG_START 0x500
|
||||
|
||||
#define TRAINERS_FLAG_NO 0x356
|
||||
#define CODE_FLAGS (FLAG_TRAINER_FLAG_START + TRAINERS_FLAG_NO + 0xA) // 0x860
|
||||
|
||||
|
||||
@@ -167,9 +167,31 @@ struct BerryCrush
|
||||
u32 unk;
|
||||
};
|
||||
|
||||
#define PLAYER_NAME_LENGTH 8
|
||||
|
||||
struct UnknownSaveBlock2Struct
|
||||
{
|
||||
u8 field_0;
|
||||
u8 field_1;
|
||||
u8 field_2[2];
|
||||
u8 field_4[8];
|
||||
u8 field_C[16];
|
||||
u16 field_1C[6];
|
||||
u16 field_28[6];
|
||||
u8 field_34[176];
|
||||
u8 field_E4;
|
||||
u8 field_E5;
|
||||
u8 field_E6;
|
||||
u8 field_E7;
|
||||
u8 field_E8;
|
||||
u8 field_E9;
|
||||
u8 field_EA;
|
||||
u8 field_EB;
|
||||
}; // sizeof = 0xEC
|
||||
|
||||
struct SaveBlock2
|
||||
{
|
||||
/*0x00*/ u8 playerName[8];
|
||||
/*0x00*/ u8 playerName[PLAYER_NAME_LENGTH];
|
||||
/*0x08*/ u8 playerGender; // MALE, FEMALE
|
||||
/*0x09*/ u8 specialSaveWarp;
|
||||
/*0x0A*/ u8 playerTrainerId[4];
|
||||
@@ -201,7 +223,8 @@ struct SaveBlock2
|
||||
|
||||
// All below could be a one giant struct
|
||||
|
||||
/*0x64C*/ u8 field_64C[0x588];
|
||||
/*0x64C*/ u8 field_64C[236];
|
||||
/*0x738*/ struct UnknownSaveBlock2Struct field_738[5]; // No idea here, it's probably wrong, no clue.
|
||||
/*0xBD4*/ u16 field_BD4;
|
||||
/*0xBD6*/ u16 field_BD6;
|
||||
/*0xBD8*/ u8 field_BD8[11];
|
||||
@@ -428,30 +451,52 @@ struct ContestWinner
|
||||
u8 contestRank;
|
||||
};
|
||||
|
||||
struct DaycareMiscMon
|
||||
{
|
||||
struct MailStruct mail;
|
||||
u8 OT_name[OT_NAME_LENGTH + 1];
|
||||
u8 monName[POKEMON_NAME_LENGTH + 1];
|
||||
u8 gameLanguage:4;
|
||||
u8 monLanguage:4;
|
||||
};
|
||||
|
||||
struct DaycareMon
|
||||
{
|
||||
struct BoxPokemon mon;
|
||||
struct MailStruct mail;
|
||||
u8 OT_name[OT_NAME_LENGTH + 1];
|
||||
u8 monName[11];
|
||||
u8 language_maybe : 4;
|
||||
u8 unknown : 4;
|
||||
u32 stepsTaken;
|
||||
struct DaycareMiscMon misc;
|
||||
u32 steps;
|
||||
};
|
||||
|
||||
struct DaycareData
|
||||
#define DAYCARE_MON_COUNT 2
|
||||
|
||||
struct DayCare
|
||||
{
|
||||
struct DaycareMon mons[2];
|
||||
struct DaycareMon mons[DAYCARE_MON_COUNT];
|
||||
u32 offspringPersonality;
|
||||
u8 stepCounter;
|
||||
};
|
||||
|
||||
struct DayCareMail
|
||||
{
|
||||
/*0x00*/ struct MailStruct message;
|
||||
/*0x24*/ u8 names[19];
|
||||
};
|
||||
|
||||
struct RecordMixingDayCareMail
|
||||
{
|
||||
struct DayCareMail mail[DAYCARE_MON_COUNT];
|
||||
u32 numDaycareMons;
|
||||
bool16 holdsItem[DAYCARE_MON_COUNT];
|
||||
};
|
||||
|
||||
#define MAP_OBJECTS_COUNT 16
|
||||
#define BERRY_TREES_COUNT 128
|
||||
#define FLAGS_COUNT 300
|
||||
#define VARS_COUNT 256
|
||||
#define MAIL_COUNT 16
|
||||
|
||||
enum {
|
||||
enum
|
||||
{
|
||||
LILYCOVE_LADY_QUIZ,
|
||||
LILYCOVE_LADY_FAVOUR,
|
||||
LILYCOVE_LADY_CONTEST
|
||||
@@ -582,13 +627,13 @@ struct SaveBlock1
|
||||
/*0x2BBC*/ u16 unk2BBC[6];
|
||||
/*0x2BC8*/ u16 unk2BC8[6];
|
||||
/*0x2BD4*/ u16 unk2BD4[6];
|
||||
/*0x2BE0*/ struct MailStruct mail[16];
|
||||
/*0x2BE0*/ struct MailStruct mail[MAIL_COUNT];
|
||||
/*0x2E20*/ u8 additionalPhrases[5]; // bitfield for 33 additional phrases in easy chat system
|
||||
/*0x2E25*/ u8 unk2E25[3]; // possibly padding?
|
||||
/*0x2E28*/ OldMan oldMan;
|
||||
/*0x2e64*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff
|
||||
/*0x2e90*/ struct ContestWinner contestWinners[13]; // 0 - 5 used in contest hall, 6 - 7 unused?, 8 - 12 museum
|
||||
/*0x3030*/ struct DaycareData daycare;
|
||||
/*0x3030*/ struct DayCare daycare;
|
||||
/*0x3150*/ struct LinkBattleRecord linkBattleRecords[5];
|
||||
/*0x31A0*/ u8 unk_31A0;
|
||||
/*0x31A1*/ u8 filler_31A1[7];
|
||||
|
||||
@@ -386,4 +386,7 @@ enum
|
||||
ITEM_OLD_SEA_MAP, // 0x178
|
||||
};
|
||||
|
||||
#define NUM_TECHNICAL_MACHINES 50
|
||||
#define NUM_HIDDEN_MACHINES 8
|
||||
|
||||
#endif // GUARD_ITEMS_H
|
||||
|
||||
@@ -68,7 +68,7 @@ struct LinkPlayer
|
||||
/* 0x08 */ u8 name[11];
|
||||
/* 0x13 */ u8 gender;
|
||||
/* 0x14 */ u32 linkType;
|
||||
/* 0x18 */ u16 lp_field_18;
|
||||
/* 0x18 */ u16 lp_field_18; // battle bank in battles
|
||||
/* 0x1A */ u16 language;
|
||||
};
|
||||
|
||||
|
||||
@@ -5,31 +5,33 @@
|
||||
|
||||
// Exported RAM declarations
|
||||
|
||||
struct ListMenuItem {
|
||||
struct ListMenuItem
|
||||
{
|
||||
const u8 *unk_00;
|
||||
s32 unk_04;
|
||||
};
|
||||
|
||||
struct ListMenu;
|
||||
|
||||
struct ListMenuTemplate {
|
||||
struct ListMenuItem *unk_00;
|
||||
struct ListMenuTemplate
|
||||
{
|
||||
const struct ListMenuItem *items;
|
||||
void (* unk_04)(u32, bool8, struct ListMenu *);
|
||||
void (* unk_08)(u8, s32, u8);
|
||||
u16 unk_0c;
|
||||
u16 unk_0e;
|
||||
u16 totalItems;
|
||||
u16 maxShowed;
|
||||
u8 unk_10;
|
||||
u8 unk_11;
|
||||
u8 unk_12;
|
||||
u8 unk_13;
|
||||
u32 unk_14_0:4;
|
||||
u32 unk_14_4:4;
|
||||
u32 unk_15_0:4;
|
||||
u32 unk_15_4:4;
|
||||
u32 unk_16_0:1;
|
||||
u32 unk_16_1:6;
|
||||
u32 unk_16_7:1;
|
||||
u32 unk_17_0:6;
|
||||
u8 cursor_Y;
|
||||
u32 upText_Y:4; // x1, x2, x4, x8 = xF
|
||||
u32 cursorColor:4; // x10, x20, x40, x80 = xF0
|
||||
u32 fillColor:4; // x100, x200, x400, x800 = xF00
|
||||
u32 cursorShadowColor:4; // x1000, x2000, x4000, x8000 = xF000
|
||||
u32 unk_16_0:1; // x10000
|
||||
u32 spaceBetweenItems:6; // x20000, x40000, x80000, x100000, x200000, x400000 = x7E0000
|
||||
u32 unk_16_7:1; // x800000
|
||||
u32 unk_17_0:6; // x1000000, x2000000, x4000000, x8000000, x10000000, x20000000 = x3F000000
|
||||
};
|
||||
|
||||
struct ListMenu {
|
||||
|
||||
@@ -16,4 +16,10 @@
|
||||
|| itemId == ITEM_FAB_MAIL \
|
||||
|| itemId == ITEM_RETRO_MAIL))
|
||||
|
||||
|
||||
bool8 MonHasMail(struct Pokemon *mon);
|
||||
void TakeMailFromMon(struct Pokemon *mon);
|
||||
u8 GiveMailToMon2(struct Pokemon *mon, struct MailStruct *mail);
|
||||
void ClearMailStruct(struct MailStruct *mail);
|
||||
|
||||
#endif // GUARD_MAIL_H
|
||||
|
||||
@@ -509,9 +509,11 @@ struct Evolution
|
||||
u16 targetSpecies;
|
||||
};
|
||||
|
||||
#define EVOS_PER_MON 5
|
||||
|
||||
struct EvolutionData
|
||||
{
|
||||
struct Evolution evolutions[5];
|
||||
struct Evolution evolutions[EVOS_PER_MON];
|
||||
};
|
||||
|
||||
extern u8 gPlayerPartyCount;
|
||||
@@ -648,6 +650,9 @@ u16 PlayerGenderToFrontTrainerPicId(u8 playerGender);
|
||||
void sub_806A1C0(u16 arg0, u8 bankIdentity);
|
||||
void sub_806A12C(u16 trainerSpriteId, u8 bankIdentity);
|
||||
u8 GetSecretBaseTrainerPicIndex(void);
|
||||
bool8 TryIncrementMonLevel(struct Pokemon *mon);
|
||||
void BoxMonToMon(struct BoxPokemon *srcMon, struct Pokemon *dstMon);
|
||||
u8 GetLevelUpMovesBySpecies(u16 species, u16 *moves);
|
||||
|
||||
#include "sprite.h"
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
u8* GetBoxNamePtr(u8 boxNumber);
|
||||
struct BoxPokemon *GetBoxedMonPtr(u8, u8);
|
||||
void SetBoxMonNickFromAnyBox(u8, u8, u8 *);
|
||||
void CompactPartySlots(void);
|
||||
u32 GetBoxMonDataFromAnyBox(u8 boxId, u8 monPosition, u32 request);
|
||||
|
||||
#endif // GUARD_POKEMON_STORAGE_SYSTEM_H
|
||||
|
||||
@@ -2,23 +2,40 @@
|
||||
#define GUARD_RECORDED_BATTLE_H
|
||||
|
||||
extern u32 gRecordedBattleRngSeed;
|
||||
extern u32 gBattlePalaceMoveSelectionRngValue;
|
||||
extern u8 gUnknown_0203C7B4;
|
||||
|
||||
void sub_8184DA4(u8 arg0);
|
||||
void sub_8185F84(void);
|
||||
void sub_8184E58(void);
|
||||
u8 RecordedBattle_ReadBankAction(u8 bank);
|
||||
void RecordedBattle_SetBankAction(u8 bank, u8 action);
|
||||
void RecordedBattle_ClearBankAction(u8 bank, u8 bytesToClear);
|
||||
void sub_8185F90(u16 arg0);
|
||||
bool8 sub_8186450(void);
|
||||
u8 sub_8185FAC(void);
|
||||
u8 sub_8185FB8(void);
|
||||
u8 MoveRecordedBattleToSaveData(void);
|
||||
void sub_818603C(u8);
|
||||
void sub_8185FD0(void);
|
||||
void sub_8186444(void);
|
||||
void sub_8185EB8(void);
|
||||
u8 RecordedBattle_ReadBankAction(u8 bank);
|
||||
u8 sub_81850D0(void);
|
||||
u8 sub_81850DC(u8 *arg0);
|
||||
u8 sub_8185F40(void);
|
||||
void sub_81851A8(u8 *arg0);
|
||||
bool32 CanCopyRecordedBattleSaveData(void);
|
||||
u32 MoveRecordedBattleToSaveData(void);
|
||||
void PlayRecordedBattle(void (*CB2_After)(void));
|
||||
u8 sub_8185EA0(void);
|
||||
u8 sub_8185EAC(void);
|
||||
void RecordedBattle_SaveParties(void);
|
||||
u8 GetActiveBankLinkPlayerGender(void);
|
||||
void sub_8185F84(void);
|
||||
void sub_8185F90(u16 arg0);
|
||||
u8 sub_8185FAC(void);
|
||||
u8 GetBattleStyleInRecordedBattle(void);
|
||||
u8 GetTextSpeedInRecordedBattle(void);
|
||||
void RecordedBattle_CopyBankMoves(void);
|
||||
void sub_818603C(u8 arg0);
|
||||
u32 GetAiScriptsInRecordedBattle(void);
|
||||
void sub_8186444(void);
|
||||
bool8 sub_8186450(void);
|
||||
void sub_8186468(u8 *dst);
|
||||
u8 sub_818649C(void);
|
||||
u8 sub_81864A8(void);
|
||||
u8 sub_81864B4(void);
|
||||
u8 sub_81864C0(void);
|
||||
void sub_81864CC(void);
|
||||
u16 *sub_81864E0(void);
|
||||
|
||||
#endif // GUARD_RECORDED_BATTLE_H
|
||||
|
||||
@@ -56,41 +56,42 @@ enum
|
||||
HOF_DELETE_SAVE // unused
|
||||
};
|
||||
|
||||
#define SECTION_ID_RECORDED_BATTLE 31
|
||||
|
||||
void ClearSaveData(void);
|
||||
void ResetSaveCounters(void);
|
||||
//bool32 ManipulateSectorBits(u8 op, u8 bit);
|
||||
//u8 save_write_to_flash(u16 a1, const struct SaveSectionLocation *a2);
|
||||
u8 HandleWriteSector(u16, const struct SaveSectionLocation *);
|
||||
//u8 HandleWriteSectorNBytes(u8 sector, u8 *data, u16 size);
|
||||
u8 TryWriteSector(u8, u8 *);
|
||||
//u32 RestoreSaveBackupVarsAndIncrement(const struct SaveSectionLocation *location);
|
||||
//u32 RestoreSaveBackupVars(const struct SaveSectionLocation *location);
|
||||
//u8 sub_812550C(u16 a1, const struct SaveSectionLocation *location);
|
||||
bool32 SetDamagedSectorBits(u8 op, u8 bit);
|
||||
u8 save_write_to_flash(u16 a1, const struct SaveSectionLocation *location);
|
||||
u8 HandleWriteSector(u16 a1, const struct SaveSectionLocation *location);
|
||||
u8 HandleWriteSectorNBytes(u8 sector, u8 *data, u16 size);
|
||||
u8 TryWriteSector(u8 sector, u8 *data);
|
||||
u32 RestoreSaveBackupVarsAndIncrement(const struct SaveSectionLocation *location);
|
||||
u32 RestoreSaveBackupVars(const struct SaveSectionLocation *location);
|
||||
u8 sub_81529D4(u16 a1, const struct SaveSectionLocation *location);
|
||||
u8 sub_8152A34(u16 a1, const struct SaveSectionLocation *location);
|
||||
u8 ClearSaveData_2(u16, const struct SaveSectionLocation *location);
|
||||
//u8 sub_8125758(u16 a1, const struct SaveSectionLocation *location);
|
||||
//u8 sub_81257F0(u16 a1, const struct SaveSectionLocation *location);
|
||||
//u8 sub_812587C(u16 a1, const struct SaveSectionLocation *location);
|
||||
u8 sub_8152E10(u16, const struct SaveSectionLocation *location);
|
||||
u8 ClearSaveData_2(u16 a1, const struct SaveSectionLocation *location);
|
||||
u8 sav12_xor_get(u16 a1, const struct SaveSectionLocation *location);
|
||||
u8 sub_8152CAC(u16 a1, const struct SaveSectionLocation *location);
|
||||
u8 sub_8152D44(u16 a1, const struct SaveSectionLocation *location);
|
||||
u8 sub_8152DD0(u16 a1, const struct SaveSectionLocation *location);
|
||||
u8 sub_8152E10(u16 a1, const struct SaveSectionLocation *location);
|
||||
u8 GetSaveValidStatus(const struct SaveSectionLocation *location);
|
||||
//u8 sub_8125B88(u8 a1, u8 *data, u16 size);
|
||||
u8 DoReadFlashWholeSection(u8, struct SaveSection *);
|
||||
u16 CalculateChecksum(void *, u16);
|
||||
u8 sub_81530DC(u8 a1, u8 *data, u16 size);
|
||||
u8 DoReadFlashWholeSection(u8 sector, struct SaveSection *section);
|
||||
u16 CalculateChecksum(void *data, u16 size);
|
||||
void UpdateSaveAddresses(void);
|
||||
u8 HandleSavingData(u8 saveType);
|
||||
//u8 TrySavingData(u8 saveType);
|
||||
//u8 sub_8125D80(void);
|
||||
//bool8 sub_8125DA8(void);
|
||||
//u8 sub_8125DDC(void);
|
||||
//u8 sub_8125E04(void);
|
||||
//u8 sub_8125E2C(void);
|
||||
//bool8 sub_8125E6C(void);
|
||||
//u8 sub_8125EC8(u8 a1);
|
||||
//bool8 unref_sub_8125F4C(struct UnkSaveSection *a1);
|
||||
//u8 unref_sub_8125FA0(void);
|
||||
//u8 unref_sub_8125FF0(u8 *data, u16 size);
|
||||
//u8 unref_sub_8126068(u8 sector, u8 *data, u32 size);
|
||||
//u8 unref_sub_8126080(u8 sector, u8 *data);
|
||||
u8 TrySavingData(u8 saveType);
|
||||
u8 sub_8153380(void);
|
||||
bool8 sub_81533AC(void);
|
||||
u8 sub_81533E0(void);
|
||||
u8 sub_8153408(void);
|
||||
u8 sub_8153430(void);
|
||||
bool8 sub_8153474(void);
|
||||
u8 sub_81534D0(u8 a1);
|
||||
u16 sub_815355C(void);
|
||||
u8 sub_81534D0(u8);
|
||||
u32 TryCopySpecialSaveSection(u8 sector, u8* dst);
|
||||
u32 sub_8153634(u8 sector, u8* src);
|
||||
void sub_8153688(u8 taskId);
|
||||
|
||||
#endif // GUARD_SAVE_H
|
||||
|
||||
Reference in New Issue
Block a user