diff options
Diffstat (limited to 'include')
99 files changed, 3762 insertions, 804 deletions
diff --git a/include/bard_music.h b/include/bard_music.h new file mode 100644 index 000000000..529fd50f8 --- /dev/null +++ b/include/bard_music.h @@ -0,0 +1,31 @@ +#ifndef GUARD_BARD_MUSIC_H +#define GUARD_BARD_MUSIC_H + +struct BardSound; + +struct BardPhoneme +{ + /*0x00*/ u16 sound; + /*0x02*/ u16 length; + /*0x04*/ s16 pitch; + /*0x06*/ u16 volume; +}; + +struct BardSong +{ + /*0x00*/ u8 currWord; + /*0x01*/ u8 currPhoneme; + /*0x02*/ u8 phonemeTimer; + /*0x03*/ u8 state; + /*0x04*/ s16 var04; + /*0x06*/ u16 volume; + /*0x08*/ s16 pitch; + /*0x0A*/ s16 voiceInflection; + /*0x0C*/ u16 lyrics[6]; + /*0x18*/ struct BardPhoneme phonemes[6]; +}; + +const struct BardSound *GetWordSounds(u16 arg0, u16 arg1); +s32 GetWordPhonemes(struct BardSong *dest, const struct BardSound *src, u16 arg2); + +#endif // GUARD_BARD_MUSIC_H diff --git a/include/battle.h b/include/battle.h index d4cb53689..7850a9dd6 100644 --- a/include/battle.h +++ b/include/battle.h @@ -19,103 +19,177 @@ #define BATTLE_TYPE_LEGENDARY 0x2000 #define BATTLE_TYPE_REGI 0x4000 +#define BATTLE_WON 0x1 +#define BATTLE_LOST 0x2 +#define BATTLE_DREW 0x3 +#define BATTLE_RAN 0x4 +#define BATTLE_PLAYER_TELEPORTED 0x5 +#define BATTLE_POKE_FLED 0x6 +#define BATTLE_CAUGHT 0x7 +#define BATTLE_OPPONENT_TELEPORTED 0xA + #define AI_ACTION_DONE 0x0001 #define AI_ACTION_FLEE 0x0002 -#define AI_ACTION_WATCH 0x0004 -#define AI_ACTION_DO_NOT_ATTACK 0x0008 +#define AI_ACTION_WATCH 0x0004 +#define AI_ACTION_DO_NOT_ATTACK 0x0008 #define AI_ACTION_UNK5 0x0010 #define AI_ACTION_UNK6 0x0020 #define AI_ACTION_UNK7 0x0040 #define AI_ACTION_UNK8 0x0080 -#define STATUS_SLEEP 0x7 -#define STATUS_POISON 0x8 -#define STATUS_BURN 0x10 -#define STATUS_FREEZE 0x20 -#define STATUS_PARALYSIS 0x40 -#define STATUS_TOXIC_POISON 0x80 +#define STATUS_SLEEP 0x7 +#define STATUS_POISON 0x8 +#define STATUS_BURN 0x10 +#define STATUS_FREEZE 0x20 +#define STATUS_PARALYSIS 0x40 +#define STATUS_TOXIC_POISON 0x80 +#define STATUS_TOXIC_COUNTER 0xF00 + +#define STATUS_PSN_ANY ((STATUS_POISON | STATUS_TOXIC_POISON)) +#define STATUS_ANY ((STATUS_SLEEP | STATUS_POISON | STATUS_BURN | STATUS_FREEZE | STATUS_PARALYSIS | STATUS_TOXIC_POISON)) #define STATUS2_CONFUSION 0x00000007 +#define STATUS2_FLINCHED 0x00000008 #define STATUS2_UPROAR 0x00000070 +#define STATUS2_BIDE 0x00000300 //two bits 0x100 0x200 #define STATUS2_LOCK_CONFUSE 0x00000C00 #define STATUS2_MULTIPLETURNS 0x00001000 #define STATUS2_WRAPPED 0x0000E000 +#define STATUS2_INFATUATION 0x000F0000 #define STATUS2_FOCUS_ENERGY 0x00100000 #define STATUS2_TRANSFORMED 0x00200000 #define STATUS2_RECHARGE 0x00400000 #define STATUS2_RAGE 0x00800000 #define STATUS2_SUBSTITUTE 0x01000000 +#define STATUS2_DESTINY_BOND 0x02000000 #define STATUS2_ESCAPE_PREVENTION 0x04000000 #define STATUS2_NIGHTMARE 0x08000000 #define STATUS2_CURSED 0x10000000 #define STATUS2_FORESIGHT 0x20000000 +#define STATUS2_DEFENSE_CURL 0x40000000 +#define STATUS2_TORMENT 0x80000000 -#define STATUS3_LEECHSEED_RECEIVER 0x3 //two bits for the bank that gets hp +#define STATUS3_LEECHSEED_BANK 0x3 #define STATUS3_LEECHSEED 0x4 #define STATUS3_ALWAYS_HITS 0x18 //two bits #define STATUS3_PERISH_SONG 0x20 #define STATUS3_ON_AIR 0x40 #define STATUS3_UNDERGROUND 0x80 #define STATUS3_MINIMIZED 0x100 -#define STATUS3_CHARGED_UP 0x200 #define STATUS3_ROOTED 0x400 +#define STATUS3_CHARGED_UP 0x200 +#define STATUS3_YAWN 0x1800 //two bits +#define STATUS3_IMPRISIONED 0x2000 #define STATUS3_GRUDGE 0x4000 #define STATUS3_CANT_SCORE_A_CRIT 0x8000 #define STATUS3_MUDSPORT 0x10000 #define STATUS3_WATERSPORT 0x20000 #define STATUS3_UNDERWATER 0x40000 - -#define HITMARKER_x20 0x0000020 -#define HITMARKER_DESTINYBOND 0x0000040 -#define HITMARKER_NO_ANIMATIONS 0x0000080 -#define HITMARKER_IGNORE_SUBSTITUTE 0x0000100 -#define HITMARKER_NO_ATTACKSTRING 0x0000200 -#define HITMARKER_ATTACKSTRING_PRINTED 0x0000400 -#define HITMARKER_NO_PPDEDUCT 0x0000800 -#define HITMARKER_IGNORE_SAFEGUARD 0x0002000 -#define HITMARKER_SYNCHRONISE_EFFECT 0x0004000 -#define HITMARKER_IGNORE_ON_AIR 0x0010000 -#define HITMARKER_IGNORE_UNDERGROUND 0x0020000 -#define HITMARKER_IGNORE_UNDERWATER 0x0040000 -#define HITMARKER_x80000 0x0080000 -#define HITMARKER_x100000 0x0100000 -#define HITMARKER_x400000 0x0400000 -#define HITMARKER_x800000 0x0800000 -#define HITMARKER_GRUDGE 0x1000000 -#define HITMARKER_OBEYS 0x2000000 +#define STATUS3_INTIMIDATE_POKES 0x80000 +#define STATUS3_TRACE 0x100000 + +#define STATUS3_SEMI_INVULNERABLE ((STATUS3_UNDERGROUND | STATUS3_ON_AIR | STATUS3_UNDERWATER)) + +#define HITMARKER_x20 0x00000020 +#define HITMARKER_DESTINYBOND 0x00000040 +#define HITMARKER_NO_ANIMATIONS 0x00000080 +#define HITMARKER_IGNORE_SUBSTITUTE 0x00000100 +#define HITMARKER_NO_ATTACKSTRING 0x00000200 +#define HITMARKER_ATTACKSTRING_PRINTED 0x00000400 +#define HITMARKER_NO_PPDEDUCT 0x00000800 +#define HITMARKER_PURSUIT_TRAP 0x00001000 +#define HITMARKER_IGNORE_SAFEGUARD 0x00002000 +#define HITMARKER_SYNCHRONISE_EFFECT 0x00004000 +#define HITMARKER_IGNORE_ON_AIR 0x00010000 +#define HITMARKER_IGNORE_UNDERGROUND 0x00020000 +#define HITMARKER_IGNORE_UNDERWATER 0x00040000 +#define HITMARKER_UNABLE_TO_USE_MOVE 0x00080000 +#define HITMARKER_x100000 0x00100000 +#define HITMARKER_x200000 0x00200000 +#define HITMARKER_x400000 0x00400000 +#define HITMARKER_x800000 0x00800000 +#define HITMARKER_GRUDGE 0x01000000 +#define HITMARKER_OBEYS 0x02000000 +#define HITMARKER_x8000000 0x08000000 #define HITMARKER_FAINTED(bank) ((gBitTable[bank] << 0x1C)) #define HITMARKER_UNK(bank) ((0x10000000 << bank)) +#define SIDE_STATUS_REFLECT (1 << 0) +#define SIDE_STATUS_LIGHTSCREEN (1 << 1) +#define SIDE_STATUS_X4 (1 << 2) +#define SIDE_STATUS_SPIKES (1 << 4) +#define SIDE_STATUS_SAFEGUARD (1 << 5) +#define SIDE_STATUS_FUTUREATTACK (1 << 6) +#define SIDE_STATUS_MIST (1 << 8) +#define SIDE_STATUS_SPIKES_DAMAGED (1 << 9) + +#define ABILITYEFFECT_ON_SWITCHIN 0x0 +#define ABILITYEFFECT_ENDTURN 0x1 +#define ABILITYEFFECT_MOVES_BLOCK 0x2 +#define ABILITYEFFECT_ABSORBING 0x3 +#define ABILITYEFFECT_CONTACT 0x4 +#define ABILITYEFFECT_IMMUNITY 0x5 +#define ABILITYEFFECT_FORECAST 0x6 +#define ABILITYEFFECT_SYNCHRONIZE 0x7 +#define ABILITYEFFECT_ATK_SYNCHRONIZE 0x8 +#define ABILITYEFFECT_INTIMIDATE1 0x9 +#define ABILITYEFFECT_INTIMIDATE2 0xA +#define ABILITYEFFECT_TRACE 0xB +#define ABILITYEFFECT_CHECK_OTHER_SIDE 0xC +#define ABILITYEFFECT_CHECK_BANK_SIDE 0xD +#define ABILITYEFFECT_FIELD_SPORT 0xE +#define ABILITYEFFECT_CHECK_FIELD_EXCEPT_BANK 0xF +#define ABILITYEFFECT_COUNT_OTHER_SIZE 0x10 +#define ABILITYEFFECT_COUNT_BANK_SIDE 0x11 +#define ABILITYEFFECT_COUNT_ON_FIELD 0x12 +#define ABILITYEFFECT_CHECK_ON_FIELD 0x13 + +#define WEATHER_HAS_EFFECT ((!AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_CLOUD_NINE, 0, 0) && !AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_AIR_LOCK, 0, 0))) + +#define MOVESTATUS_MISSED (1 << 0) +#define MOVESTATUS_SUPEREFFECTIVE (1 << 1) +#define MOVESTATUS_NOTVERYEFFECTIVE (1 << 2) +#define MOVESTATUS_NOTAFFECTED (1 << 3) +#define MOVESTATUS_ONEHITKO (1 << 4) +#define MOVESTATUS_FAILED (1 << 5) +#define MOVESTATUS_ENDURED (1 << 6) +#define MOVESTATUS_HUNGON (1 << 7) + +#define MOVESTATUS_NOEFFECT ((MOVESTATUS_MISSED | MOVESTATUS_NOTAFFECTED | MOVESTATUS_FAILED)) + #define MAX_TRAINER_ITEMS 4 #define MAX_MON_MOVES 4 #define MAX_BANKS_BATTLE 4 -#define weather_rain 1 -#define weather_downpour 2 -#define weather_permament_rain 4 -#define WEATHER_RAINY ((weather_rain | weather_downpour | weather_permament_rain)) - -#define weather_sandstorm 8 -#define weather_permament_sandstorm 0x10 -#define WEATHER_SANDSTORMY ((weather_sandstorm | weather_permament_sandstorm)) - -#define weather_sun 0x20 -#define weather_permament_sun 0x40 -#define WEATHER_SUNNY ((weather_sun | weather_permament_sun)) - -#define weather_hail 0x80 - -// needed to match the hack that is get_item, thanks cam, someone else clean this up later. -extern u8 unk_2000000[]; +#define WEATHER_RAIN_TEMPORARY (1 << 0) +#define WEATHER_RAIN_DOWNPOUR (1 << 1) +#define WEATHER_RAIN_PERMANENT (1 << 2) +#define WEATHER_RAIN_ANY ((WEATHER_RAIN_TEMPORARY | WEATHER_RAIN_DOWNPOUR | WEATHER_RAIN_PERMANENT)) +#define WEATHER_SANDSTORM_TEMPORARY (1 << 3) +#define WEATHER_SANDSTORM_PERMANENT (1 << 4) +#define WEATHER_SANDSTORM_ANY ((WEATHER_SANDSTORM_TEMPORARY | WEATHER_SANDSTORM_PERMANENT)) +#define WEATHER_SUN_TEMPORARY (1 << 5) +#define WEATHER_SUN_PERMANENT (1 << 6) +#define WEATHER_SUN_ANY ((WEATHER_SUN_TEMPORARY | WEATHER_SUN_PERMANENT)) +#define WEATHER_HAIL (1 << 7) enum { - WEATHER_SUN, - WEATHER_RAIN, - WEATHER_SANDSTORM, - WEATHER_HAIL, + BATTLE_TERRAIN_GRASS, + BATTLE_TERRAIN_LONG_GRASS, + BATTLE_TERRAIN_SAND, + BATTLE_TERRAIN_UNDERWATER, + BATTLE_TERRAIN_WATER, + BATTLE_TERRAIN_POND, + BATTLE_TERRAIN_MOUNTAIN, + BATTLE_TERRAIN_CAVE, + BATTLE_TERRAIN_BUILDING, + BATTLE_TERRAIN_PLAIN, }; +// needed to match the hack that is get_item, thanks cam, someone else clean this up later. +extern u8 unk_2000000[]; + struct Trainer { /*0x00*/ u8 partyFlags; @@ -164,32 +238,30 @@ struct BattleStruct /* 0x2000000 */ u8 filler0[0x15DDE]; /*0x15DDE*/ u8 unk15DDE; /*0x15DDF*/ u8 unk15DDF; - /*0x15DE0*/ u8 filler15DE0[0x222]; - /*0x16002*/ u8 AnimTurn; - /*0x16003*/ u8 ScriptingActive; - /*0x16004*/ u8 WrappedMove1[4]; - /*0x16008*/ u8 WrappedMove2[4]; + /*0x15DE0*/ u8 filler15DE0[0x220]; + /*0x16000*/ u8 turnEffectsTracker; + /*0x16001*/ u8 turnEffectsBank; + /*0x16002*/ u8 animTurn; + /*0x16003*/ u8 scriptingActive; + /*0x16004*/ u8 wrappedMove[8]; /*0x1600C*/ u8 cmd49StateTracker; /*0x1600D*/ u8 unk1600D; - /*0x1600E*/ u8 unk1600E; + /*0x1600E*/ u8 turncountersTracker; /*0x1600F*/ u8 atk23StateTracker; - /*0x16010*/ u8 unk16010; - /*0x16011*/ u8 unk16011; - /*0x16012*/ u8 unk16012; - /*0x16013*/ u8 unk16013; + /*0x16010*/ u8 moveTarget[4]; /*0x16014*/ u8 unk16014; /*0x16015*/ u8 unk16015; /*0x16016*/ u8 unk16016; /*0x16017*/ u8 unk16017; /*0x16018*/ u8 expGetterID; /*0x16019*/ u8 unk16019; - /*0x1601A*/ u8 unk1601A; + /*0x1601A*/ u8 atk5A_StateTracker; //also atk5B, statetracker /*0x1601B*/ u8 wildVictorySong; - /*0x1601C*/ u8 DynamicMoveType; + /*0x1601C*/ u8 dynamicMoveType; /*0x1601D*/ u8 unk1601D; /*0x1601E*/ u8 statChanger; - /*0x1601F*/ u8 DmgMultiplier; - /*0x16020*/ u8 WrappedBy[4]; + /*0x1601F*/ u8 dmgMultiplier; + /*0x16020*/ u8 wrappedBy[4]; /*0x16024*/ u8 unk16024; /*0x16025*/ u8 unk16025; /*0x16026*/ u8 unk16026; @@ -240,48 +312,21 @@ struct BattleStruct /* 0x2000000 */ /*0x16053*/ u8 unk16053; /*0x16054*/ u8 unk16054; /*0x16055*/ u8 unk16055; - /*0x16056*/ u8 unk16056; + /*0x16056*/ u8 moneyMultiplier; /*0x16057*/ u8 unk16057; /*0x16058*/ u8 unk16058; - /*0x16059*/ u8 unk16059; + /*0x16059*/ u8 sub80173A4_Tracker; /*0x1605A*/ u8 unk1605A; /*0x1605B*/ u8 unk1605B; /*0x1605C*/ u16 exp; /*0x1605E*/ u8 unk1605E; /*0x1605F*/ u8 sentInPokes; /*0x16060*/ u8 unk16060[4]; - /*0x16064*/ u8 unk16064; - /*0x16065*/ u8 unk16065; - /*0x16066*/ u8 unk16066; - /*0x16067*/ u8 unk16067; - /*0x16068*/ u8 unk16068; - /*0x16069*/ u8 unk16069; - /*0x1606A*/ u8 unk1606A; - /*0x1606B*/ u8 unk1606B; - /*0x1606C*/ u8 unk1606C; - /*0x1606D*/ u8 unk1606D; - /*0x1606E*/ u8 unk1606E; - /*0x1606F*/ u8 unk1606F; - /*0x16070*/ u8 unk16070; - /*0x16071*/ u8 unk16071; - /*0x16072*/ u8 unk16072; - /*0x16073*/ u8 unk16073; - /*0x16074*/ u8 unk16074; - /*0x16075*/ u8 unk16075; - /*0x16076*/ u8 unk16076; - /*0x16077*/ u8 unk16077; + /*0x16064*/ u8 unk16064[4]; + /*0x16068*/ u8 unk16068[4]; + /*0x1606C*/ u8 unk1606C[4][3]; /*0x16078*/ u8 unk16078; - /*0x16079*/ u8 unk16079; - /*0x1607A*/ u8 unk1607A; - /*0x1607B*/ u8 unk1607B; - /*0x1607C*/ u8 unk1607C; - /*0x1607D*/ u8 unk1607D; - /*0x1607E*/ u8 unk1607E; - /*0x1607F*/ u8 unk1607F; - /*0x16080*/ u8 unk16080; - /*0x16081*/ u8 unk16081; - /*0x16082*/ u8 unk16082; - /*0x16083*/ u8 unk16083; + /*0x16079*/ u8 caughtNick[11]; /*0x16084*/ u8 unk16084; /*0x16085*/ u8 unk16085; /*0x16086*/ u8 unk16086; @@ -291,10 +336,7 @@ struct BattleStruct /* 0x2000000 */ /*0x1608A*/ u8 unk1608A; /*0x1608B*/ u8 unk1608B; /*0x1608C*/ u8 ChosenMoveID[4]; - /*0x16090*/ u8 unk16090; - /*0x16091*/ u8 unk16091; - /*0x16092*/ u8 unk16092; - /*0x16093*/ u8 unk16093; + /*0x16090*/ s32 bideDmg; /*0x16094*/ u8 unk16094; /*0x16095*/ u8 unk16095; /*0x16096*/ u8 unk16096; @@ -302,17 +344,17 @@ struct BattleStruct /* 0x2000000 */ /*0x16098*/ u8 unk16098; /*0x16099*/ u8 unk16099; /*0x1609A*/ u8 unk1609a; - /*0x1609B*/ u8 unk1609b; - /*0x1609C*/ u8 unk1609C; + /*0x1609B*/ u8 castformToChangeInto; + /*0x1609C*/ u8 atk6C_statetracker; /*0x1609D*/ u8 unk1609D; /*0x1609E*/ u8 unk1609E; /*0x1609F*/ u8 unk1609F; - /*0x160A0*/ u8 unk160a0; - /*0x160A1*/ u8 AnimTargetsHit; + /*0x160A0*/ u8 stringMoveType; + /*0x160A1*/ u8 animTargetsHit; /*0x160A2*/ u8 expGetterBank; /*0x160A3*/ u8 unk160A3; - /*0x160A4*/ u8 AnimArg1; - /*0x160A5*/ u8 AnimArg2; + /*0x160A4*/ u8 animArg1; + /*0x160A5*/ u8 animArg2; /*0x160A6*/ u8 unk160A6; /*0x160A7*/ u8 unk160A7; /*0x160A8*/ u8 unk160A8; @@ -335,12 +377,9 @@ struct BattleStruct /* 0x2000000 */ /*0x160B9*/ u8 unk160B9; /*0x160BA*/ u8 unk160Ba; /*0x160BB*/ u8 unk160Bb; - /*0x160BC*/ u8 unk160BC; - /*0x160BD*/ u8 unk160BD; - /*0x160BE*/ u8 unk160BE; - /*0x160BF*/ u8 unk160BF; + /*0x160BC*/ u16 HP_OnSwitchout[2]; /*0x160C0*/ u8 unk160C0; - /*0x160C1*/ u8 unk160C1; + /*0x160C1*/ u8 hpScale; /*0x160C2*/ u8 unk160C2; /*0x160C3*/ u8 unk160C3; /*0x160C4*/ u8 unk160C4; @@ -349,69 +388,157 @@ struct BattleStruct /* 0x2000000 */ /*0x160C7*/ u8 unk160C7; /*0x160C8*/ u8 unk160C8; /*0x160C9*/ u8 unk160C9; - /*0x160CA*/ u8 SynchroniseEffect; + /*0x160CA*/ u8 synchroniseEffect; /*0x160CB*/ u8 linkPlayerIndex; - /*0x160CC*/ u16 UsedHeldItems[4]; - u8 filler2[0x72E]; + /*0x160CC*/ u16 usedHeldItems[4]; + /*0x160D4*/ u8 unk160D4; + /*0x160D5*/ u8 unk160D5; + /*0x160D6*/ u8 unk160D6; + /*0x160D7*/ u8 unk160D7; + /*0x160D8*/ u8 unk160D8; + /*0x160D9*/ u8 unk160D9; + /*0x160DA*/ u8 unk160DA; + /*0x160DB*/ u8 unk160DB; + /*0x160DC*/ u8 unk160DC; + /*0x160DD*/ u8 intimidateBank; + /*0x160DE*/ u8 unk160DE; + /*0x160DF*/ u8 unk160DF; + /*0x160E0*/ u8 unk160E0; + /*0x160E1*/ u8 unk160E1; + /*0x160E2*/ u8 unk160E2; + /*0x160E3*/ u8 unk160E3; + /*0x160E4*/ u8 unk160E4; + /*0x160E5*/ u8 unk160E5; + /*0x160E6*/ u8 unk160E6; + /*0x160E7*/ u8 atkCancellerTracker; + /*0x160E8*/ u8 unk160E8; + /*0x160E9*/ u8 unk160E9; + /*0x160EA*/ u8 unk160EA; + /*0x160EB*/ u8 unk160EB; + /*0x160EC*/ u8 unk160EC; + /*0x160ED*/ u8 unk160ED; + /*0x160EE*/ u8 unk160EE; + /*0x160EF*/ u8 unk160EF; + /*0x160F0*/ u8 unk160F0; + /*0x160F1*/ u8 unk160F1; + /*0x160F2*/ u8 unk160F2; + /*0x160F3*/ u8 unk160F3; + /*0x160F4*/ u8 unk160F4; + /*0x160F5*/ u8 unk160F5; + /*0x160F6*/ u8 unk160F6; + /*0x160F7*/ u8 unk160F7; + /*0x160F8*/ u8 unk160F8; + /*0x160F9*/ u8 unk160F9; + /*0x160FA*/ u8 unk160FA; + /*0x160FB*/ u8 unk160FB; + /*0x160FC*/ u8 turnSideTracker; + /*0x160FD*/ u8 unk160FD; + /*0x160FE*/ u8 unk160FE; + /*0x160FF*/ u8 unk160FF; + /*0x16100*/ u8 unk16100; + /*0x16101*/ u8 unk16101; + /*0x16102*/ u8 unk16102; + /*0x16103*/ u8 unk16103; + /*0x16104*/ u8 unk16104; + /*0x16105*/ u8 unk16105; + /*0x16106*/ u8 unk16106; + /*0x16107*/ u8 unk16107; + /*0x16108*/ u8 unk16108; + /*0x16109*/ u8 unk16109; + /*0x1610A*/ u8 unk1610A; + /*0x1610B*/ u8 unk1610B; + /*0x1610C*/ u8 unk1610C; + /*0x1610D*/ u8 unk1610D; + /*0x1610E*/ u8 unk1610E; + /*0x1610F*/ u8 unk1610F; + /*0x16110*/ u8 sub80170DC_Tracker; + /*0x16111*/ u8 sub80170DC_Bank; + /*0x16112*/ u8 unk16112; + /*0x16113*/ u8 unk16113; + /*0x16114*/ u8 unk16114; + /*0x16115*/ u8 unk16115; + /*0x16116*/ u8 unk16116; + /*0x16117*/ u8 unk16117; + /*0x16118*/ u8 unk16118; + /*0x16119*/ u8 unk16119; + /*0x1611A*/ u8 unk1611A; + /*0x1611B*/ u8 unk1611B; + /*0x1611C*/ u8 unk1611C; + /*0x1611D*/ u8 unk1611D; + /*0x1611E*/ u8 unk1611E; + /*0x1611F*/ u8 unk1611F; + + //u8 filler2[0x72E]; /* 0x16A00 */ struct UnkBattleStruct1 unk_2016A00_2; }; struct DisableStruct { - /*0x00*/ u8 filler0[0x3]; - /*0x04*/ u16 DisabledMove; - /*0x06*/ u16 EncoredMove; - /*0x08*/ u8 ProtectUses; - /*0x09*/ u8 StockpileCounter; - /*0x0A*/ u8 SubstituteHP; - u8 fillerB[4]; - u8 unkF_0:4; - u8 unkF_4:4; - u8 filler10[3]; - /*0x13*/ u8 taunt:4; - /*0x13*/ u8 unkC:4; - /*0x14*/ u8 BankPreventingEscape; - /*0x15*/ u8 BankWithSureHit; - /*0x16*/ u8 IsFirstTurn; + /*0x00*/ u32 unk0; + /*0x04*/ u16 disabledMove; + /*0x06*/ u16 encoredMove; + /*0x08*/ u8 protectUses; + /*0x09*/ u8 stockpileCounter; + /*0x0A*/ u8 substituteHP; + /*0x0B*/ u8 disableTimer1 : 4; + /*0x0B*/ u8 disableTimer2 : 4; + /*0x0C*/ u8 encoredMovePos; + /*0x0D*/ u8 unkD; + /*0x0E*/ u8 encoreTimer1 : 4; + /*0x0E*/ u8 encoreTimer2 : 4; + /*0x0F*/ u8 perishSong1 : 4; + /*0x0F*/ u8 perishSong2 : 4; + /*0x10*/ u8 furyCutterCounter; + /*0x11*/ u8 rolloutTimer1 : 4; + /*0x11*/ u8 rolloutTimer2 : 4; + /*0x12*/ u8 chargeTimer1 : 4; + /*0x12*/ u8 chargeTimer2 : 4; + /*0x13*/ u8 tauntTimer1:4; + /*0x13*/ u8 tauntTimer2:4; + /*0x14*/ u8 bankPreventingEscape; + /*0x15*/ u8 bankWithSureHit; + /*0x16*/ u8 isFirstTurn; /*0x17*/ u8 unk17; - /*0x18*/ u8 TruantCounter; - /*0x19*/ u8 RechargeCounter; + /*0x18*/ u8 truantCounter : 1; + /*0x18*/ u8 unk18_a : 3; + /*0x18*/ u8 unk18_b : 4; + /*0x19*/ u8 rechargeCounter; /*0x1A*/ u8 unk1A[2]; }; struct BattleResults { - u8 PlayerFaintCounter; // 0x0 - u8 OpponentFaintCounter; // 0x1 + u8 playerFaintCounter; // 0x0 + u8 opponentFaintCounter; // 0x1 u8 unk2; // 0x2 u8 unk3; // 0x3 u8 unk4; // 0x4 u8 unk5_0:1; // 0x5 u8 unk5_1:1; // 0x5 - u16 Poke1Species; // 0x6 - u8 PokeString1[10]; // 0x8 + u16 poke1Species; // 0x6 + u8 pokeString1[10]; // 0x8 u8 unk12; - u8 BattleTurnCounter; // 0x13 - u8 PokeString2[10]; // 0x14 + u8 battleTurnCounter; // 0x13 + u8 pokeString2[10]; // 0x14 u8 filler1E[2]; - u16 LastOpponentSpecies; // 0x20 - u16 LastUsedMove; // 0x22 - u16 OpponentMove; // 0x24 - u16 OpponentSpecies; // 0x26 - u16 CaughtPoke; // 0x28 - u8 CaughtNick[10]; // 0x2A + u16 lastOpponentSpecies; // 0x20 + u16 lastUsedMove; // 0x22 + u16 opponentMove; // 0x24 + u16 opponentSpecies; // 0x26 + u16 caughtPoke; // 0x28 + u8 caughtNick[10]; // 0x2A u8 filler34[2]; - u8 unk36[10]; + u8 unk36[10]; // usedBalls? }; struct Struct2017800 { - u8 unk0_0:1; + u8 invisible:1; u8 unk0_1:1; - u8 unk0_2:1; + u8 substituteSprite:1; u8 unk0_3:1; u8 unk0_4:1; - u16 unk2; + u16 transformedSpecies; }; struct Struct2017810 @@ -454,34 +581,34 @@ struct Struct20238C8 struct ProtectStruct { /*field0*/ - u32 Protected:1; - u32 Endured:1; - u32 OnlyStruggle:1; - u32 HelpingHand:1; - u32 BounceMove:1; - u32 StealMove:1; - u32 Flag0Unknown:1; - u32 PrlzImmobility:1; + u32 protected:1; + u32 endured:1; + u32 onlyStruggle:1; + u32 helpingHand:1; + u32 bounceMove:1; + u32 stealMove:1; + u32 flag0Unknown:1; + u32 prlzImmobility:1; /*field1*/ - u32 ConfusionSelfDmg:1; - u32 NotEffective:1; - u32 ChargingTurn:1; - u32 FleeFlag:2; //for RunAway and Smoke Ball - u32 UsedImprisionedMove:1; - u32 LoveImmobility:1; - u32 UsedDisabledMove:1; + u32 confusionSelfDmg:1; + u32 notEffective:1; + u32 chargingTurn:1; + u32 fleeFlag:2; //for RunAway and Smoke Ball + u32 usedImprisionedMove:1; + u32 loveImmobility:1; + u32 usedDisabledMove:1; /*field2*/ - u32 UsedTauntedMove:1; - u32 Flag2Unknown:1; - u32 FlinchImmobility:1; - u32 NotFirstStrike:1; - u32 Free : 4; + u32 usedTauntedMove:1; + u32 flag2Unknown:1; + u32 flinchImmobility:1; + u32 notFirstStrike:1; + u32 free : 4; /*field3*/ u32 field3 : 8; - u32 PhysicalDmg; - u32 SpecialDmg; - u8 PhysicalBank; - u8 SpecialBank; + u32 physicalDmg; + u32 specialDmg; + u8 physicalBank; + u8 specialBank; u16 fieldE; }; @@ -496,9 +623,9 @@ struct SpecialStatus u8 flag40 : 1; u8 focusBanded : 1; u8 field1[3]; - u32 moveturnLostHP; - u32 moveturnlostHP_physical; - u32 moveturnLostHP_special; + s32 moveturnLostHP; + s32 moveturnLostHP_physical; + s32 moveturnLostHP_special; u8 moveturnPhysicalBank; u8 moveturnSpecialBank; u8 field12; @@ -507,18 +634,17 @@ struct SpecialStatus struct sideTimer { - u8 reflectTimer; - u8 reflectBank; - u8 lightscreenTimer; - u8 lightscreenBank; - u8 mistTimer; - u8 mistBank; - u8 safeguardTimer; - u8 safeguardBank; - u8 followmeTimer; - u8 followmeTarget; - u8 spikesAmount; - u8 fieldB; + u8 reflectTimer; //0x0 + u8 lightscreenTimer; //0x1 + u8 mistTimer; //0x2 + u8 field3; //0x3 + u16 field4; //0x4 + u8 spikesAmount; //0x6 + u8 safeguardTimer; //0x7 + u8 followmeTimer; //0x8 + u8 followmeTarget; //0x9 + u8 fieldA; //0xA + u8 fieldB; //0xB }; struct WishFutureKnock @@ -528,9 +654,9 @@ struct WishFutureKnock s32 futureSightDmg[MAX_BANKS_BATTLE]; u16 futureSightMove[MAX_BANKS_BATTLE]; u8 wishCounter[MAX_BANKS_BATTLE]; - u8 wishUserBank[MAX_BANKS_BATTLE]; + u8 wishUserID[MAX_BANKS_BATTLE]; u8 weatherDuration; - u8 knockedOffPokes[2]; + u16 knockedOffPokes; }; extern struct UnkBattleStruct1 unk_2016A00; @@ -546,14 +672,76 @@ extern struct Struct20238C8 gUnknown_020238C8; // TODO: move ewram to global.h extern u8 ewram[]; -#define BATTLE_STRUCT ((struct BattleStruct *) (ewram + 0x00000)) -#define AI_THINKING_STRUCT ((struct AI_ThinkingStruct *)(ewram + 0x16800)) -#define UNK_2016A00_STRUCT ((struct UnkBattleStruct1 *) (ewram + 0x16A00)) -#define AI_STACK ((struct AI_Stack *) (ewram + 0x16C00)) -#define AI_ARRAY_160CC ((struct SmallItemStruct *) (ewram + 0x160CC)) -#define ewram17800 ((struct Struct2017800 *) (ewram + 0x17800)) -#define ewram17810 ((struct Struct2017810 *) (ewram + 0x17810)) -#define ewram17840 (*(struct Struct2017840 *) (ewram + 0x17840)) +#define BATTLE_STRUCT ((struct BattleStruct *) (ewram + 0x00000)) +#define AI_THINKING_STRUCT ((struct AI_ThinkingStruct *)(ewram + 0x16800)) +#define UNK_2016A00_STRUCT ((struct UnkBattleStruct1 *) (ewram + 0x16A00)) +#define AI_STACK ((struct AI_Stack *) (ewram + 0x16C00)) +#define AI_ARRAY_160CC ((struct SmallItemStruct *) (ewram + 0x160CC)) +#define B_BATTLESCRIPTS_STACK ((struct scriptsStack *) (ewram + 0x17110)) +#define B_FUNCTION_STACK ((struct funcStack *) (ewram + 0x17140)) +#define ewram17800 ((struct Struct2017800 *) (ewram + 0x17800)) +#define ewram17810 ((struct Struct2017810 *) (ewram + 0x17810)) +#define ewram17840 (*(struct Struct2017840 *) (ewram + 0x17840)) +#define ewram17000 ((u32 *) (ewram + 0x17100)) + +typedef void (*BattleCmdFunc)(void); + +struct funcStack +{ + void* ptr[8]; + u8 size; +}; + +struct scriptsStack +{ + u8* ptr[8]; + u8 size; +}; + +extern u8 gBattleTextBuff1[]; + +//function declarations of buffer emits +void EmitGetAttributes(u8 buffID, u8 request, u8 c); //0x0 +void Emitcmd1(u8 a, u8 b, u8 c); //0x1 +void EmitSetAttributes(u8 a, u8 request, u8 c, u8 bytes, void *data); //0x2 +void EmitSendOutPoke(u8 a, u8 b, u8 c); //0x5 +void EmitReturnPokeToBall(u8 a, u8 b); //0x6 +void EmitTrainerSlide(u8 a); //0x8 +void Emitcmd10(u8 a); //0xA +void EmitBallThrow(u8 a, u8 shakes); //0xD +//void EmitMoveAnimation(u8 a, u16 move, u8 turn, u16 power, s32 dmg, u8 happiness, void *disable_struct); //0xF +void EmitPrintString(u8 a, u16 stringID); //0x10 +//void EmitPrintStringPlayerOnly(u8 a, u16 stringID); //0x11 +void EmitChoosePokemon(u8 a, u8 b, u8 c, u8 d, u8 *e); //0x16 +//void EmitHealthBarUpdate(u8 a, u16 b); //0x18; Had to declare the second arg as u16 because s16 wont match in atk0b +//void EmitExpBarUpdate(u8 a, u8 b, u16 c); //0x19 +void EmitStatusIconUpdate(u8 a, u32 b, u32 c); //0x1A +void EmitStatusAnimation(u8 a, u8 b, u32 c); //0x1B +void EmitStatusXor(u8 a, u8 b); //0x1C +void EmitHitAnimation(u8 a); //0x29 +void EmitEffectivenessSound(u8 a, u16 sound); //0x2B +void Emitcmd44(u8 a, u16 sound); //0x2C +void EmitFaintingCry(u8 a); //0x2D +void EmitIntroSlide(u8 a, u8 b); //0x2E +void Emitcmd48(u8 a, u8 *b, u8 c); //0x30 +void Emitcmd49(u8 a); //0x31 +void EmitSpriteInvisibility(u8 a, u8 b); //0x33 +void EmitBattleAnimation(u8 a, u8 b, u16 c); //0x34 +void EmitResetActionMoveSelection(u8 a, u8 b); //0x36 +void Emitcmd55(u8 a, u8 b); //0x37 + +#define REQUEST_ALL_BATTLE 0x0 +#define REQUEST_SPECIES_BATTLE 0x1 +#define REQUEST_HELDITEM_BATTLE 0x2 +#define REQUEST_MOVES_PP_BATTLE 0x3 +#define REQUEST_PPMOVE1_BATTLE 0x9 +#define REQUEST_PPMOVE2_BATTLE 0xA +#define REQUEST_PPMOVE3_BATTLE 0xB +#define REQUEST_PPMOVE4_BATTLE 0xC +#define REQUEST_STATUS_BATTLE 0x28 +#define REQUEST_HP_BATTLE 0x2A + +void MarkBufferBankForExecution(u8 bank); extern u8 gBattleTextBuff1[]; @@ -607,29 +795,28 @@ void BattleTurnPassed(void); // asm/battle_2.o void sub_8012324(void); void sub_8012FBC(u8, u8); -u8 b_first_side(u8, u8, u8); +u8 GetWhoStrikesFirst(u8, u8, u8); void TurnValuesCleanUp(u8); void SpecialStatusesClear(void); void sub_80138F0(void); -void MarkBufferBankForExecution(); void sub_80155A4(); -void CancelMultiTurnMoves(u8); +void CancelMultiTurnMoves(u8 bank); void PrepareStringBattle(); void sub_80156DC(); void sub_80157C4(u8 index); // asm/battle_3.o -u8 sub_8015A98(u8, u8, u8); -u8 UpdateTurnCounters(); -u8 TurnBasedEffects(); +u8 CheckMoveLimitations(u8 bank, u8 unusableMoves, u8 check); +u8 UpdateTurnCounters(void); +u8 TurnBasedEffects(void); u8 sub_80170DC(); u8 sub_80173A4(); -u8 AbilityBattleEffects(u8, u8, u8, u8, u16); -u8 sub_801A02C(); +u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 move); +u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn); // asm/battle_4.o void AI_CalcDmg(u8, u8); -void TypeCalc(u16, u8, u8); +u8 TypeCalc(u16 move, u8 bank_atk, u8 bank_def); // asm/battle_5.o void nullsub_91(void); diff --git a/include/battle_anim.h b/include/battle_anim.h index 48ceece21..2386c515c 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -53,14 +53,14 @@ struct UnknownStruct3 }; void DoMoveAnim(const u8 *const moveAnims[], u16 b, u8 c); -bool8 b_side_obj__get_some_boolean(u8 a); +bool8 IsAnimBankSpriteVisible(u8 a); void sub_8076034(u8, u8); bool8 IsContest(void); void battle_anim_clear_some_data(void); void move_anim_8072740(struct Sprite *sprite); void DestroyAnimVisualTask(u8 task); void DestroyAnimVisualTask(u8 task); -bool8 b_side_obj__get_some_boolean(u8); +bool8 IsAnimBankSpriteVisible(u8); u8 IsContest(); diff --git a/include/battle_message.h b/include/battle_message.h index da57333a5..3e37a1ccd 100644 --- a/include/battle_message.h +++ b/include/battle_message.h @@ -1,7 +1,23 @@ #ifndef GUARD_BATTLE_MESSAGE_H #define GUARD_BATTLE_MESSAGE_H -void StrCpyDecodeToDisplayedStringBattle(const u8 *); -void StrCpyDecodeBattle(const u8 *, u8 *); +struct StringInfoBattle +{ + u16 currentMove; + u16 lastMove; + u16 lastItem; + u8 lastAbility; + u8 scrActive; + u8 unk1605E; + u8 hpScale; + u8 StringBank; + u8 moveType; + u8 abilities[4]; + u8 textBuffs[3][0x10]; +}; + +void BufferStringBattle(u16 stringID); +u32 StrCpyDecodeToDisplayedStringBattle(const u8* src); +u32 StrCpyDecodeBattle(const u8* src, u8* dst); #endif // GUARD_BATTLE_MESSAGE_H diff --git a/include/battle_setup.h b/include/battle_setup.h index c8c463f6d..444ab5467 100644 --- a/include/battle_setup.h +++ b/include/battle_setup.h @@ -40,72 +40,38 @@ struct TrainerPartyMember3 u16 moves[4]; }; -struct TrainerBattleSpec -{ - void *ptr; - u8 ptrType; -}; - struct TrainerEyeTrainer { - u16 trainerNums[5]; + u16 opponentIDs[5]; // Each of these trainers has 5 increasingly stronger teams. u16 mapGroup; u16 mapNum; }; -//void task01_battle_start(u8 taskId); -//void task_add_01_battle_start(u8 transition, u16 song); -void CheckForSafariZoneAndProceed(void); -void StartBattle_StandardWild(void); -void StartBattle_Roamer(void); -void StartBattle_Safari(void); -//void task_add_01_battle_start_with_music_and_stats(void); -//void StartBattle_WallyTutorial(void); -void StartBattle_ScriptedWild(void); -//void StartBattle_SouthernIsland(void); -//void StartBattle_Rayquaza(void); -//void StartBattle_GroudonKyogre(void); -//void StartBattle_Regi(void); -void HandleWildBattleEnd(void); -void HandleScriptedWildBattleEnd(void); -s8 GetBattleTerrain(void); -//s8 GetBattleTransitionTypeByMap(void); -//u16 GetSumOfPartyMonLevel(u8 numMons); -//u8 GetSumOfEnemyPartyLevel(u16 trainerNum, u8 numMons); -u8 GetWildBattleTransition(void); -u8 GetTrainerBattleTransition(void); -u8 GetBattleTowerBattleTransition(void); -//void ChooseStarter(void); -void CB2_GiveStarter(void); -void CB2_StartFirstBattle(void); -void HandleFirstBattleEnd(void); -//u32 TrainerBattleLoadArg32(u8 *ptr); -//u16 TrainerBattleLoadArg16(u8 *ptr); -//u8 TrainerBattleLoadArg8(u8 *ptr); -//u16 trainerflag_opponent(void); -bool32 battle_exit_is_player_defeat(u32 a1); -//void sub_80822BC(void); -//void TrainerBattleLoadArgs(const struct TrainerBattleSpec *specs, u8 *data); -//void battle_80801F0(void); -u8 *TrainerBattleConfigure(const u8 *data); +void BattleSetup_StartWildBattle(void); +void BattleSetup_StartRoamerBattle(void); +void BattleSetup_StartScriptedWildBattle(void); +s8 BattleSetup_GetTerrain(void); +u8 BattleSetup_GetBattleTowerBattleTransition(void); +u8 *BattleSetup_ConfigureTrainerBattle(const u8 *data); void TrainerWantsBattle(u8, u8 *); + bool32 GetTrainerFlagFromScriptPointer(u8 *data); //void sub_8082524(void); -//u8 sub_8082558(void); -//u8 sub_8082564(void); +//u8 ScrSpecial_GetTrainerBattleMode(void); +//u8 ScrSpecial_HasTrainerBeenFought(void); //void sub_808257C(void); //void unref_sub_8082590(void); // unused -u8 trainer_flag_check(u16); +u8 HasTrainerAlreadyBeenFought(u16); void trainer_flag_set(u16); void trainer_flag_clear(u16); -void sub_80825E4(void); +void BattleSetup_StartTrainerBattle(void); void sub_808260C(void); void do_choose_name_or_words_screen(void); -//void sub_80826B0(void); -//void sub_80826D8(void); -u8 *sub_80826E8(void); -u8 *sub_8082700(void); -//void sub_8082718(void); +//void ScrSpecial_StartTrainerEyeRematch(void); +//void ScrSpecial_ShowTrainerIntroSpeech(void); +u8 *BattleSetup_GetScriptAddrAfterBattle(void); +u8 *BattleSetup_GetTrainerPostBattleScript(void); +//void ScrSpecial_ShowTrainerNonBattlingSpeech(void); //void PlayTrainerEncounterMusic(void); //u8 *SanitizeString(u8 *str); u8 *sub_808281C(void); @@ -118,7 +84,7 @@ u8 *sub_8082880(void); //s32 sub_80829A8(const struct TrainerEyeTrainer *trainers, u16 mapGroup, u16 mapNum); //s32 sub_80829E8(const struct TrainerEyeTrainer *trainers, u16 mapGroup, u16 mapNum); //bool8 sub_8082A18(const struct TrainerEyeTrainer *trainers, u16 trainerNum); -//bool8 sub_8082A54(const struct TrainerEyeTrainer *trainers, u16 trainerNum); +//bool8 DoesTrainerEyeTrainerWantRematch(const struct TrainerEyeTrainer *trainers, u16 trainerNum); //u16 sub_8082A90(const struct TrainerEyeTrainer *trainers, u16 trainerNum); //void sub_8082AE4(const struct TrainerEyeTrainer *trainers, u16 trainerNum); //bool8 sub_8082B10(const struct TrainerEyeTrainer *trainers, u16 trainerNum); @@ -130,7 +96,7 @@ s32 sub_8082C0C(u16 mapGroup, u16 mapNum); s32 unref_sub_8082C2C(u16 mapGroup, u16 mapNum); u16 sub_8082C4C(u16 a1); //s32 sub_8082C68(void); -//u8 sub_8082C9C(void); +//u8 ScrSpecial_GetTrainerEyeRematchFlag(void); void sub_8082CB8(void); #endif // GUARD_BATTLE_SETUP_H diff --git a/include/battle_transition.h b/include/battle_transition.h index b01378505..0b8766e87 100644 --- a/include/battle_transition.h +++ b/include/battle_transition.h @@ -1,8 +1,42 @@ #ifndef GUARD_BATTLE_TRANSITION_H #define GUARD_BATTLE_TRANSITION_H -void sub_811AABC(u8); -void sub_811AAD8(u8); -u8 sub_811AAE8(void); +void BattleTransition_StartOnField(u8 transitionID); +void BattleTransition_Start(u8 transitionID); +bool8 IsBattleTransitionDone(void); + +#define TRANSITIONS_NO 17 + +enum // TRANSITION_MUGSHOT +{ + MUGSHOT_SYDNEY, + MUGSHOT_PHOEBE, + MUGSHOT_GLACIA, + MUGSHOT_DRAKE, + MUGSHOT_STEVEN, +}; + +#define MUGSHOTS_NO 5 + +// credits for the names go to Dyskinesia and Tetrable +// names are naturally subject to change + +#define B_TRANSITION_BLUR 0 +#define B_TRANSITION_SWIRL 1 +#define B_TRANSITION_SHUFFLE 2 +#define B_TRANSITION_BIG_POKEBALL 3 +#define B_TRANSITION_POKEBALLS_TRAIL 4 +#define B_TRANSITION_CLOCKWISE_BLACKFADE 5 +#define B_TRANSITION_RIPPLE 6 +#define B_TRANSITION_WAVE 7 +#define B_TRANSITION_SLICE 8 +#define B_TRANSITION_WHITEFADE 9 +#define B_TRANSITION_GRID_SQUARES 10 +#define B_TRANSITION_SHARDS 11 +#define B_TRANSITION_SYDNEY 12 +#define B_TRANSITION_PHOEBE 13 +#define B_TRANSITION_GLACIA 14 +#define B_TRANSITION_DRAKE 15 +#define B_TRANSITION_STEVEN 16 #endif // GUARD_BATTLE_TRANSITION_H diff --git a/include/berry_blender.h b/include/berry_blender.h deleted file mode 100644 index 924b24b00..000000000 --- a/include/berry_blender.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef GUARD_BERRY_BLENDER_H -#define GUARD_BERRY_BLENDER_H - -void sub_80516C4(u8, u16); - -#endif // GUARD_BERRY_BLENDER_H diff --git a/include/braille_puzzles.h b/include/braille_puzzles.h index 2b0e2bb96..e9d1f5d7c 100644 --- a/include/braille_puzzles.h +++ b/include/braille_puzzles.h @@ -2,6 +2,7 @@ #define GUARD_BRAILLEPUZZLES_H bool8 ShouldDoBrailleStrengthEffect(void); +bool8 ShouldDoBrailleFlyEffect(void); void DoBrailleStrengthEffect(void); void UseFlyAncientTomb_Callback(void); void UseFlyAncientTomb_Finish(void); @@ -10,5 +11,6 @@ bool32 BrailleWait_CheckButtonPress(void); void SealedChamberShakingEffect(u8 taskId); bool8 ShouldDoBrailleDigEffect(void); void DoBrailleDigEffect(void); +void DoBrailleFlyEffect(void); #endif diff --git a/include/cable_club.h b/include/cable_club.h index 9e6a703e3..a2fe46b30 100644 --- a/include/cable_club.h +++ b/include/cable_club.h @@ -3,20 +3,22 @@ #include "task.h" -void sub_8082D4C(); -void sub_8082D60(u8, u8); -u16 sub_8082D9C(u8, u8); -u32 sub_8082DF4(u8); -u32 sub_8082E28(u8); -u32 sub_8082EB8(u8); -void sub_8082FEC(u8 taskId); -void sub_80833C4(u8 taskId); -void sub_8083418(u8 taskId); -u8 sub_8083444(u8 taskId); +void sub_808347C(u8 arg0); +void sub_80834E4(void); +void sub_808350C(void); +void sub_80835D8(void); +void sub_8083614(void); +void sub_808363C(void); u8 sub_8083664(void); -void sub_8083A84(TaskFunc); -s32 sub_8083BF4(u8 id); -void sub_8083C50(u8); -void sub_8083188(u8 taskId); +void sub_8083820(void); +void sub_80839A4(void); +void sub_80839D0(void); +void sub_8083A84(TaskFunc followupFunc); +void sub_8083B5C(void); +void sub_8083B80(void); +void sub_8083B90(void); +void sub_8083BDC(void); +bool32 sub_8083BF4(u8 linkPlayerIndex); +void sub_8083C50(u8 taskId); #endif // GUARD_CABLE_CLUB_H diff --git a/include/data/field_map_obj/anim_func_ptrs.h b/include/data/field_map_obj/anim_func_ptrs.h index 63575727d..1d1fac71e 100644 --- a/include/data/field_map_obj/anim_func_ptrs.h +++ b/include/data/field_map_obj/anim_func_ptrs.h @@ -1,5 +1,5 @@ // -// Created by scott on 6/18/2017. + // #ifndef POKERUBY_ANIM_FUNC_PTRS_H diff --git a/include/data/field_map_obj/base_oam.h b/include/data/field_map_obj/base_oam.h index 8595f97e7..49c14e8c2 100644 --- a/include/data/field_map_obj/base_oam.h +++ b/include/data/field_map_obj/base_oam.h @@ -1,5 +1,5 @@ // -// Created by scott on 6/17/2017. + // #ifndef POKERUBY_BASE_OAM_H diff --git a/include/data/field_map_obj/berry_tree_graphics_tables.h b/include/data/field_map_obj/berry_tree_graphics_tables.h index 53a0fd482..5b60fee6f 100644 --- a/include/data/field_map_obj/berry_tree_graphics_tables.h +++ b/include/data/field_map_obj/berry_tree_graphics_tables.h @@ -1,5 +1,5 @@ // -// Created by scott on 6/17/2017. + // #ifndef POKERUBY_BERRY_TREE_GRAPHICS_TABLES_H diff --git a/include/data/field_map_obj/callback_subroutine_pointers.h b/include/data/field_map_obj/callback_subroutine_pointers.h index d24a47184..a324066b7 100644 --- a/include/data/field_map_obj/callback_subroutine_pointers.h +++ b/include/data/field_map_obj/callback_subroutine_pointers.h @@ -1,5 +1,5 @@ // -// Created by scott on 6/18/2017. + // #ifndef POKERUBY_CALLBACK_SUBROUTINE_POINTERS_H @@ -394,7 +394,7 @@ u8 (*const gUnknown_08375588[])(struct MapObject *, struct Sprite *) = { sub_805F3C4 }; -u8 (*const gUnknown_08375594[])(struct MapObject *, struct Sprite *, u8, bool8 (*const)(u8)) = { +u8 (*const gUnknown_08375594[])(struct MapObject *, struct Sprite *, u8, bool8(u8)) = { sub_805F3EC, sub_805F3F0, sub_805F438, diff --git a/include/data/field_map_obj/field_effect_object_template_pointers.h b/include/data/field_map_obj/field_effect_object_template_pointers.h index 8e19747ce..320af1ff8 100644 --- a/include/data/field_map_obj/field_effect_object_template_pointers.h +++ b/include/data/field_map_obj/field_effect_object_template_pointers.h @@ -1,5 +1,5 @@ // -// Created by scott on 6/17/2017. + // #ifndef POKERUBY_FIELD_EFFECT_OBJECT_TEMPLATE_POINTERS_H diff --git a/include/data/field_map_obj/field_effect_objects.h b/include/data/field_map_obj/field_effect_objects.h index dc8a38542..9d3ae343d 100644 --- a/include/data/field_map_obj/field_effect_objects.h +++ b/include/data/field_map_obj/field_effect_objects.h @@ -1,5 +1,5 @@ // -// Created by scott on 6/17/2017. + // #ifndef POKERUBY_FIELD_EFFECT_OBJECTS_H diff --git a/include/data/field_map_obj/map_object_anims.h b/include/data/field_map_obj/map_object_anims.h index 0d6e299ee..0993f3efd 100644 --- a/include/data/field_map_obj/map_object_anims.h +++ b/include/data/field_map_obj/map_object_anims.h @@ -1,5 +1,5 @@ // -// Created by scott on 6/17/2017. + // #ifndef POKERUBY_MAP_OBJECT_ANIMS_H diff --git a/include/data/field_map_obj/map_object_graphics_info.h b/include/data/field_map_obj/map_object_graphics_info.h index 818c5b90c..7b021b66d 100644 --- a/include/data/field_map_obj/map_object_graphics_info.h +++ b/include/data/field_map_obj/map_object_graphics_info.h @@ -1,5 +1,5 @@ // -// Created by scott on 6/17/2017. + // #ifndef POKERUBY_MAP_OBJECT_GRAPHICS_INFO_H diff --git a/include/data/field_map_obj/map_object_graphics_info_pointers.h b/include/data/field_map_obj/map_object_graphics_info_pointers.h index c36827709..22a052b0d 100644 --- a/include/data/field_map_obj/map_object_graphics_info_pointers.h +++ b/include/data/field_map_obj/map_object_graphics_info_pointers.h @@ -1,5 +1,5 @@ // -// Created by scott on 6/17/2017. + // #ifndef POKERUBY_MAP_OBJECT_GRAPHICS_INFO_POINTERS_H diff --git a/include/data/field_map_obj/map_object_pic_tables.h b/include/data/field_map_obj/map_object_pic_tables.h index 37d579512..ecb5c8836 100644 --- a/include/data/field_map_obj/map_object_pic_tables.h +++ b/include/data/field_map_obj/map_object_pic_tables.h @@ -1,5 +1,5 @@ // -// Created by scott on 6/17/2017. + // #ifndef POKERUBY_MAP_OBJECT_PIC_TABLES_H diff --git a/include/data/field_map_obj/map_object_subsprites.h b/include/data/field_map_obj/map_object_subsprites.h index f928db88a..951d71e99 100644 --- a/include/data/field_map_obj/map_object_subsprites.h +++ b/include/data/field_map_obj/map_object_subsprites.h @@ -1,5 +1,5 @@ // -// Created by scott on 6/17/2017. + // #ifndef POKERUBY_MAP_OBJECT_SUBSPRITES_H diff --git a/include/data/pokemon/base_stats.h b/include/data/pokemon/base_stats.h index eadfbfe30..37f59e1c6 100644 --- a/include/data/pokemon/base_stats.h +++ b/include/data/pokemon/base_stats.h @@ -1,5 +1,5 @@ // -// Created by Scott Norton on 6/27/17. + // #ifndef POKERUBY_BASE_STATS_H diff --git a/include/data/pokemon/cry_ids.h b/include/data/pokemon/cry_ids.h index d965a41cf..6207a92f0 100644 --- a/include/data/pokemon/cry_ids.h +++ b/include/data/pokemon/cry_ids.h @@ -1,5 +1,5 @@ // -// Created by Scott Norton on 6/27/17. + // #ifndef POKERUBY_CRY_IDS_H diff --git a/include/data/pokemon/dex_order.h b/include/data/pokemon/dex_order.h index 6f8582533..cbb7182ed 100644 --- a/include/data/pokemon/dex_order.h +++ b/include/data/pokemon/dex_order.h @@ -1,5 +1,5 @@ // -// Created by Scott Norton on 6/27/17. + // #ifndef POKERUBY_DEX_ORDER_H diff --git a/include/data/pokemon/egg_moves.h b/include/data/pokemon/egg_moves.h new file mode 100644 index 000000000..ab1b1dd33 --- /dev/null +++ b/include/data/pokemon/egg_moves.h @@ -0,0 +1,1318 @@ +// + +// + +#ifndef POKERUBY_DAYCARE_H +#define POKERUBY_DAYCARE_H + +#define EGG_MOVES_SPECIES_OFFSET 20000 +#define egg_moves(species, moves...) (SPECIES_##species + EGG_MOVES_SPECIES_OFFSET), moves + +#endif //POKERUBY_DAYCARE_H + +const u16 gEggMoves[] = { + egg_moves(BULBASAUR, + MOVE_LIGHT_SCREEN, + MOVE_SKULL_BASH, + MOVE_SAFEGUARD, + MOVE_CHARM, + MOVE_PETAL_DANCE, + MOVE_MAGICAL_LEAF, + MOVE_GRASS_WHISTLE, + MOVE_CURSE), + + egg_moves(CHARMANDER, + MOVE_BELLY_DRUM, + MOVE_ANCIENT_POWER, + MOVE_ROCK_SLIDE, + MOVE_BITE, + MOVE_OUTRAGE, + MOVE_BEAT_UP, + MOVE_SWORDS_DANCE, + MOVE_DRAGON_DANCE), + + egg_moves(SQUIRTLE, + MOVE_MIRROR_COAT, + MOVE_HAZE, + MOVE_MIST, + MOVE_FORESIGHT, + MOVE_FLAIL, + MOVE_REFRESH, + MOVE_MUD_SPORT, + MOVE_YAWN), + + egg_moves(PIDGEY, + MOVE_PURSUIT, + MOVE_FAINT_ATTACK, + MOVE_FORESIGHT, + MOVE_STEEL_WING, + MOVE_AIR_CUTTER), + + egg_moves(RATTATA, + MOVE_SCREECH, + MOVE_FLAME_WHEEL, + MOVE_FURY_SWIPES, + MOVE_BITE, + MOVE_COUNTER, + MOVE_REVERSAL, + MOVE_UPROAR, + MOVE_SWAGGER), + + egg_moves(SPEAROW, + MOVE_FAINT_ATTACK, + MOVE_FALSE_SWIPE, + MOVE_SCARY_FACE, + MOVE_QUICK_ATTACK, + MOVE_TRI_ATTACK, + MOVE_ASTONISH, + MOVE_SKY_ATTACK), + + egg_moves(EKANS, + MOVE_PURSUIT, + MOVE_SLAM, + MOVE_SPITE, + MOVE_BEAT_UP, + MOVE_POISON_FANG), + + egg_moves(SANDSHREW, + MOVE_FLAIL, + MOVE_SAFEGUARD, + MOVE_COUNTER, + MOVE_RAPID_SPIN, + MOVE_ROCK_SLIDE, + MOVE_METAL_CLAW, + MOVE_SWORDS_DANCE, + MOVE_CRUSH_CLAW), + + egg_moves(NIDORAN_F, + MOVE_SUPERSONIC, + MOVE_DISABLE, + MOVE_TAKE_DOWN, + MOVE_FOCUS_ENERGY, + MOVE_CHARM, + MOVE_COUNTER, + MOVE_BEAT_UP), + + egg_moves(NIDORAN_M, + MOVE_COUNTER, + MOVE_DISABLE, + MOVE_SUPERSONIC, + MOVE_TAKE_DOWN, + MOVE_AMNESIA, + MOVE_CONFUSION, + MOVE_BEAT_UP), + + egg_moves(VULPIX, + MOVE_FAINT_ATTACK, + MOVE_HYPNOSIS, + MOVE_FLAIL, + MOVE_SPITE, + MOVE_DISABLE, + MOVE_HOWL, + MOVE_PSYCH_UP, + MOVE_HEAT_WAVE), + + egg_moves(ZUBAT, + MOVE_QUICK_ATTACK, + MOVE_PURSUIT, + MOVE_FAINT_ATTACK, + MOVE_GUST, + MOVE_WHIRLWIND, + MOVE_CURSE), + + egg_moves(ODDISH, + MOVE_SWORDS_DANCE, + MOVE_RAZOR_LEAF, + MOVE_FLAIL, + MOVE_SYNTHESIS, + MOVE_CHARM, + MOVE_INGRAIN), + + egg_moves(PARAS, + MOVE_FALSE_SWIPE, + MOVE_SCREECH, + MOVE_COUNTER, + MOVE_PSYBEAM, + MOVE_FLAIL, + MOVE_SWEET_SCENT, + MOVE_LIGHT_SCREEN, + MOVE_PURSUIT), + + egg_moves(VENONAT, + MOVE_BATON_PASS, + MOVE_SCREECH, + MOVE_GIGA_DRAIN, + MOVE_SIGNAL_BEAM), + + egg_moves(DIGLETT, + MOVE_FAINT_ATTACK, + MOVE_SCREECH, + MOVE_ANCIENT_POWER, + MOVE_PURSUIT, + MOVE_BEAT_UP, + MOVE_UPROAR, + MOVE_ROCK_SLIDE), + + egg_moves(MEOWTH, + MOVE_SPITE, + MOVE_CHARM, + MOVE_HYPNOSIS, + MOVE_AMNESIA, + MOVE_PSYCH_UP, + MOVE_ASSIST), + + egg_moves(PSYDUCK, + MOVE_HYPNOSIS, + MOVE_PSYBEAM, + MOVE_FORESIGHT, + MOVE_LIGHT_SCREEN, + MOVE_FUTURE_SIGHT, + MOVE_PSYCHIC, + MOVE_CROSS_CHOP, + MOVE_REFRESH), + + egg_moves(MANKEY, + MOVE_ROCK_SLIDE, + MOVE_FORESIGHT, + MOVE_MEDITATE, + MOVE_COUNTER, + MOVE_REVERSAL, + MOVE_BEAT_UP, + MOVE_REVENGE, + MOVE_SMELLING_SALT), + + egg_moves(GROWLITHE, + MOVE_BODY_SLAM, + MOVE_SAFEGUARD, + MOVE_CRUNCH, + MOVE_THRASH, + MOVE_FIRE_SPIN, + MOVE_HOWL, + MOVE_HEAT_WAVE), + + egg_moves(POLIWAG, + MOVE_MIST, + MOVE_SPLASH, + MOVE_BUBBLE_BEAM, + MOVE_HAZE, + MOVE_MIND_READER, + MOVE_WATER_SPORT, + MOVE_ICE_BALL), + + egg_moves(ABRA, + MOVE_ENCORE, + MOVE_BARRIER, + MOVE_KNOCK_OFF, + MOVE_FIRE_PUNCH, + MOVE_THUNDER_PUNCH, + MOVE_ICE_PUNCH), + + egg_moves(MACHOP, + MOVE_LIGHT_SCREEN, + MOVE_MEDITATE, + MOVE_ROLLING_KICK, + MOVE_ENCORE, + MOVE_SMELLING_SALT, + MOVE_COUNTER, + MOVE_ROCK_SLIDE), + + egg_moves(BELLSPROUT, + MOVE_SWORDS_DANCE, + MOVE_ENCORE, + MOVE_REFLECT, + MOVE_SYNTHESIS, + MOVE_LEECH_LIFE, + MOVE_INGRAIN, + MOVE_MAGICAL_LEAF), + + egg_moves(TENTACOOL, + MOVE_AURORA_BEAM, + MOVE_MIRROR_COAT, + MOVE_RAPID_SPIN, + MOVE_HAZE, + MOVE_SAFEGUARD, + MOVE_CONFUSE_RAY), + + egg_moves(GEODUDE, + MOVE_MEGA_PUNCH, + MOVE_ROCK_SLIDE, + MOVE_BLOCK), + + egg_moves(PONYTA, + MOVE_FLAME_WHEEL, + MOVE_THRASH, + MOVE_DOUBLE_KICK, + MOVE_HYPNOSIS, + MOVE_CHARM, + MOVE_DOUBLE_EDGE), + + egg_moves(SLOWPOKE, + MOVE_SAFEGUARD, + MOVE_BELLY_DRUM, + MOVE_FUTURE_SIGHT, + MOVE_STOMP, + MOVE_MUD_SPORT, + MOVE_SLEEP_TALK, + MOVE_SNORE), + + egg_moves(FARFETCHD, + MOVE_STEEL_WING, + MOVE_FORESIGHT, + MOVE_MIRROR_MOVE, + MOVE_GUST, + MOVE_QUICK_ATTACK, + MOVE_FLAIL, + MOVE_FEATHER_DANCE, + MOVE_CURSE), + + egg_moves(DODUO, + MOVE_QUICK_ATTACK, + MOVE_SUPERSONIC, + MOVE_HAZE, + MOVE_FAINT_ATTACK, + MOVE_FLAIL, + MOVE_ENDEAVOR), + + egg_moves(SEEL, + MOVE_LICK, + MOVE_PERISH_SONG, + MOVE_DISABLE, + MOVE_HORN_DRILL, + MOVE_SLAM, + MOVE_ENCORE, + MOVE_FAKE_OUT, + MOVE_ICICLE_SPEAR), + + egg_moves(GRIMER, + MOVE_HAZE, + MOVE_MEAN_LOOK, + MOVE_LICK, + MOVE_IMPRISON, + MOVE_CURSE, + MOVE_SHADOW_PUNCH, + MOVE_EXPLOSION), + + egg_moves(SHELLDER, + MOVE_BUBBLE_BEAM, + MOVE_TAKE_DOWN, + MOVE_BARRIER, + MOVE_RAPID_SPIN, + MOVE_SCREECH, + MOVE_ICICLE_SPEAR), + + egg_moves(GASTLY, + MOVE_PSYWAVE, + MOVE_PERISH_SONG, + MOVE_HAZE, + MOVE_ASTONISH, + MOVE_WILL_O_WISP, + MOVE_GRUDGE, + MOVE_EXPLOSION), + + egg_moves(ONIX, + MOVE_ROCK_SLIDE, + MOVE_FLAIL, + MOVE_EXPLOSION, + MOVE_BLOCK), + + egg_moves(DROWZEE, + MOVE_BARRIER, + MOVE_ASSIST, + MOVE_ROLE_PLAY, + MOVE_FIRE_PUNCH, + MOVE_THUNDER_PUNCH, + MOVE_ICE_PUNCH), + + egg_moves(KRABBY, + MOVE_DIG, + MOVE_HAZE, + MOVE_AMNESIA, + MOVE_FLAIL, + MOVE_SLAM, + MOVE_KNOCK_OFF, + MOVE_SWORDS_DANCE), + + egg_moves(EXEGGCUTE, + MOVE_SYNTHESIS, + MOVE_MOONLIGHT, + MOVE_REFLECT, + MOVE_ANCIENT_POWER, + MOVE_PSYCH_UP, + MOVE_INGRAIN, + MOVE_CURSE), + + egg_moves(CUBONE, + MOVE_ROCK_SLIDE, + MOVE_ANCIENT_POWER, + MOVE_BELLY_DRUM, + MOVE_SCREECH, + MOVE_SKULL_BASH, + MOVE_PERISH_SONG, + MOVE_SWORDS_DANCE), + + egg_moves(LICKITUNG, + MOVE_BELLY_DRUM, + MOVE_MAGNITUDE, + MOVE_BODY_SLAM, + MOVE_CURSE, + MOVE_SMELLING_SALT, + MOVE_SLEEP_TALK, + MOVE_SNORE, + MOVE_SUBSTITUTE), + + egg_moves(KOFFING, + MOVE_SCREECH, + MOVE_PSYWAVE, + MOVE_PSYBEAM, + MOVE_DESTINY_BOND, + MOVE_PAIN_SPLIT, + MOVE_WILL_O_WISP), + + egg_moves(RHYHORN, + MOVE_CRUNCH, + MOVE_REVERSAL, + MOVE_ROCK_SLIDE, + MOVE_COUNTER, + MOVE_MAGNITUDE, + MOVE_SWORDS_DANCE, + MOVE_CURSE, + MOVE_CRUSH_CLAW), + + egg_moves(CHANSEY, + MOVE_PRESENT, + MOVE_METRONOME, + MOVE_HEAL_BELL, + MOVE_AROMATHERAPY, + MOVE_SUBSTITUTE), + + egg_moves(TANGELA, + MOVE_FLAIL, + MOVE_CONFUSION, + MOVE_MEGA_DRAIN, + MOVE_REFLECT, + MOVE_AMNESIA, + MOVE_LEECH_SEED, + MOVE_NATURE_POWER), + + egg_moves(KANGASKHAN, + MOVE_STOMP, + MOVE_FORESIGHT, + MOVE_FOCUS_ENERGY, + MOVE_SAFEGUARD, + MOVE_DISABLE, + MOVE_COUNTER, + MOVE_CRUSH_CLAW, + MOVE_SUBSTITUTE), + + egg_moves(HORSEA, + MOVE_FLAIL, + MOVE_AURORA_BEAM, + MOVE_OCTAZOOKA, + MOVE_DISABLE, + MOVE_SPLASH, + MOVE_DRAGON_RAGE, + MOVE_DRAGON_BREATH), + + egg_moves(GOLDEEN, + MOVE_PSYBEAM, + MOVE_HAZE, + MOVE_HYDRO_PUMP, + MOVE_SLEEP_TALK, + MOVE_MUD_SPORT), + + egg_moves(MR_MIME, + MOVE_FUTURE_SIGHT, + MOVE_HYPNOSIS, + MOVE_MIMIC, + MOVE_PSYCH_UP, + MOVE_FAKE_OUT, + MOVE_TRICK), + + egg_moves(SCYTHER, + MOVE_COUNTER, + MOVE_SAFEGUARD, + MOVE_BATON_PASS, + MOVE_RAZOR_WIND, + MOVE_REVERSAL, + MOVE_LIGHT_SCREEN, + MOVE_ENDURE, + MOVE_SILVER_WIND), + + egg_moves(PINSIR, + MOVE_FURY_ATTACK, + MOVE_FLAIL, + MOVE_FALSE_SWIPE, + MOVE_FAINT_ATTACK), + + egg_moves(LAPRAS, + MOVE_FORESIGHT, + MOVE_SUBSTITUTE, + MOVE_TICKLE, + MOVE_REFRESH, + MOVE_DRAGON_DANCE, + MOVE_CURSE, + MOVE_SLEEP_TALK, + MOVE_HORN_DRILL), + + egg_moves(EEVEE, + MOVE_CHARM, + MOVE_FLAIL, + MOVE_ENDURE, + MOVE_CURSE, + MOVE_TICKLE, + MOVE_WISH), + + egg_moves(OMANYTE, + MOVE_BUBBLE_BEAM, + MOVE_AURORA_BEAM, + MOVE_SLAM, + MOVE_SUPERSONIC, + MOVE_HAZE, + MOVE_ROCK_SLIDE, + MOVE_SPIKES), + + egg_moves(KABUTO, + MOVE_BUBBLE_BEAM, + MOVE_AURORA_BEAM, + MOVE_RAPID_SPIN, + MOVE_DIG, + MOVE_FLAIL, + MOVE_KNOCK_OFF, + MOVE_CONFUSE_RAY), + + egg_moves(AERODACTYL, + MOVE_WHIRLWIND, + MOVE_PURSUIT, + MOVE_FORESIGHT, + MOVE_STEEL_WING, + MOVE_DRAGON_BREATH, + MOVE_CURSE), + + egg_moves(SNORLAX, + MOVE_LICK, + MOVE_CHARM, + MOVE_DOUBLE_EDGE, + MOVE_CURSE, + MOVE_FISSURE, + MOVE_SUBSTITUTE), + + egg_moves(DRATINI, + MOVE_LIGHT_SCREEN, + MOVE_MIST, + MOVE_HAZE, + MOVE_SUPERSONIC, + MOVE_DRAGON_BREATH, + MOVE_DRAGON_DANCE), + + egg_moves(CHIKORITA, + MOVE_VINE_WHIP, + MOVE_LEECH_SEED, + MOVE_COUNTER, + MOVE_ANCIENT_POWER, + MOVE_FLAIL, + MOVE_NATURE_POWER, + MOVE_INGRAIN, + MOVE_GRASS_WHISTLE), + + egg_moves(CYNDAQUIL, + MOVE_FURY_SWIPES, + MOVE_QUICK_ATTACK, + MOVE_REVERSAL, + MOVE_THRASH, + MOVE_FORESIGHT, + MOVE_COVET, + MOVE_HOWL, + MOVE_CRUSH_CLAW), + + egg_moves(TOTODILE, + MOVE_CRUNCH, + MOVE_THRASH, + MOVE_HYDRO_PUMP, + MOVE_ANCIENT_POWER, + MOVE_ROCK_SLIDE, + MOVE_MUD_SPORT, + MOVE_WATER_SPORT, + MOVE_DRAGON_CLAW), + + egg_moves(SENTRET, + MOVE_DOUBLE_EDGE, + MOVE_PURSUIT, + MOVE_SLASH, + MOVE_FOCUS_ENERGY, + MOVE_REVERSAL, + MOVE_SUBSTITUTE, + MOVE_TRICK, + MOVE_ASSIST), + + egg_moves(HOOTHOOT, + MOVE_MIRROR_MOVE, + MOVE_SUPERSONIC, + MOVE_FAINT_ATTACK, + MOVE_WING_ATTACK, + MOVE_WHIRLWIND, + MOVE_SKY_ATTACK, + MOVE_FEATHER_DANCE), + + egg_moves(LEDYBA, + MOVE_PSYBEAM, + MOVE_BIDE, + MOVE_SILVER_WIND), + + egg_moves(SPINARAK, + MOVE_PSYBEAM, + MOVE_DISABLE, + MOVE_SONIC_BOOM, + MOVE_BATON_PASS, + MOVE_PURSUIT, + MOVE_SIGNAL_BEAM), + + egg_moves(CHINCHOU, + MOVE_FLAIL, + MOVE_SCREECH, + MOVE_AMNESIA), + + egg_moves(PICHU, + MOVE_REVERSAL, + MOVE_BIDE, + MOVE_PRESENT, + MOVE_ENCORE, + MOVE_DOUBLE_SLAP, + MOVE_WISH, + MOVE_CHARGE), + + egg_moves(CLEFFA, + MOVE_PRESENT, + MOVE_METRONOME, + MOVE_AMNESIA, + MOVE_BELLY_DRUM, + MOVE_SPLASH, + MOVE_MIMIC, + MOVE_WISH, + MOVE_SUBSTITUTE), + + egg_moves(IGGLYBUFF, + MOVE_PERISH_SONG, + MOVE_PRESENT, + MOVE_FAINT_ATTACK, + MOVE_WISH, + MOVE_FAKE_TEARS), + + egg_moves(TOGEPI, + MOVE_PRESENT, + MOVE_MIRROR_MOVE, + MOVE_PECK, + MOVE_FORESIGHT, + MOVE_FUTURE_SIGHT, + MOVE_SUBSTITUTE, + MOVE_PSYCH_UP), + + egg_moves(NATU, + MOVE_HAZE, + MOVE_DRILL_PECK, + MOVE_QUICK_ATTACK, + MOVE_FAINT_ATTACK, + MOVE_STEEL_WING, + MOVE_PSYCH_UP, + MOVE_FEATHER_DANCE, + MOVE_REFRESH), + + egg_moves(MAREEP, + MOVE_TAKE_DOWN, + MOVE_BODY_SLAM, + MOVE_SAFEGUARD, + MOVE_SCREECH, + MOVE_REFLECT, + MOVE_ODOR_SLEUTH, + MOVE_CHARGE), + + egg_moves(MARILL, + MOVE_LIGHT_SCREEN, + MOVE_PRESENT, + MOVE_AMNESIA, + MOVE_FUTURE_SIGHT, + MOVE_BELLY_DRUM, + MOVE_PERISH_SONG, + MOVE_SUPERSONIC, + MOVE_SUBSTITUTE), + + egg_moves(SUDOWOODO, + MOVE_SELF_DESTRUCT), + + egg_moves(HOPPIP, + MOVE_CONFUSION, + MOVE_ENCORE, + MOVE_DOUBLE_EDGE, + MOVE_REFLECT, + MOVE_AMNESIA, + MOVE_HELPING_HAND, + MOVE_PSYCH_UP), + + egg_moves(AIPOM, + MOVE_COUNTER, + MOVE_SCREECH, + MOVE_PURSUIT, + MOVE_AGILITY, + MOVE_SPITE, + MOVE_SLAM, + MOVE_DOUBLE_SLAP, + MOVE_BEAT_UP), + + egg_moves(SUNKERN, + MOVE_GRASS_WHISTLE, + MOVE_ENCORE, + MOVE_LEECH_SEED, + MOVE_NATURE_POWER, + MOVE_CURSE, + MOVE_HELPING_HAND), + + egg_moves(YANMA, + MOVE_WHIRLWIND, + MOVE_REVERSAL, + MOVE_LEECH_LIFE, + MOVE_SIGNAL_BEAM, + MOVE_SILVER_WIND), + + egg_moves(WOOPER, + MOVE_BODY_SLAM, + MOVE_ANCIENT_POWER, + MOVE_SAFEGUARD, + MOVE_CURSE, + MOVE_MUD_SPORT, + MOVE_STOCKPILE, + MOVE_SWALLOW, + MOVE_SPIT_UP), + + egg_moves(MURKROW, + MOVE_WHIRLWIND, + MOVE_DRILL_PECK, + MOVE_MIRROR_MOVE, + MOVE_WING_ATTACK, + MOVE_SKY_ATTACK, + MOVE_CONFUSE_RAY, + MOVE_FEATHER_DANCE, + MOVE_PERISH_SONG), + + egg_moves(MISDREAVUS, + MOVE_SCREECH, + MOVE_DESTINY_BOND, + MOVE_PSYCH_UP, + MOVE_IMPRISON), + + egg_moves(GIRAFARIG, + MOVE_TAKE_DOWN, + MOVE_AMNESIA, + MOVE_FORESIGHT, + MOVE_FUTURE_SIGHT, + MOVE_BEAT_UP, + MOVE_PSYCH_UP, + MOVE_WISH, + MOVE_MAGIC_COAT), + + egg_moves(PINECO, + MOVE_REFLECT, + MOVE_PIN_MISSILE, + MOVE_FLAIL, + MOVE_SWIFT, + MOVE_COUNTER, + MOVE_SAND_TOMB), + + egg_moves(DUNSPARCE, + MOVE_BIDE, + MOVE_ANCIENT_POWER, + MOVE_ROCK_SLIDE, + MOVE_BITE, + MOVE_HEADBUTT, + MOVE_ASTONISH, + MOVE_CURSE), + + egg_moves(GLIGAR, + MOVE_METAL_CLAW, + MOVE_WING_ATTACK, + MOVE_RAZOR_WIND, + MOVE_COUNTER, + MOVE_SAND_TOMB), + + egg_moves(SNUBBULL, + MOVE_METRONOME, + MOVE_FAINT_ATTACK, + MOVE_REFLECT, + MOVE_PRESENT, + MOVE_CRUNCH, + MOVE_HEAL_BELL, + MOVE_SNORE, + MOVE_SMELLING_SALT), + + egg_moves(QWILFISH, + MOVE_FLAIL, + MOVE_HAZE, + MOVE_BUBBLE_BEAM, + MOVE_SUPERSONIC, + MOVE_ASTONISH), + + egg_moves(SHUCKLE, + MOVE_SWEET_SCENT), + + egg_moves(HERACROSS, + MOVE_HARDEN, + MOVE_BIDE, + MOVE_FLAIL, + MOVE_FALSE_SWIPE), + + egg_moves(SNEASEL, + MOVE_COUNTER, + MOVE_SPITE, + MOVE_FORESIGHT, + MOVE_REFLECT, + MOVE_BITE, + MOVE_CRUSH_CLAW, + MOVE_FAKE_OUT), + + egg_moves(TEDDIURSA, + MOVE_CRUNCH, + MOVE_TAKE_DOWN, + MOVE_SEISMIC_TOSS, + MOVE_COUNTER, + MOVE_METAL_CLAW, + MOVE_FAKE_TEARS, + MOVE_YAWN, + MOVE_SLEEP_TALK), + + egg_moves(SLUGMA, + MOVE_ACID_ARMOR, + MOVE_HEAT_WAVE), + + egg_moves(SWINUB, + MOVE_TAKE_DOWN, + MOVE_BITE, + MOVE_BODY_SLAM, + MOVE_ROCK_SLIDE, + MOVE_ANCIENT_POWER, + MOVE_MUD_SHOT, + MOVE_ICICLE_SPEAR, + MOVE_DOUBLE_EDGE), + + egg_moves(CORSOLA, + MOVE_ROCK_SLIDE, + MOVE_SCREECH, + MOVE_MIST, + MOVE_AMNESIA, + MOVE_BARRIER, + MOVE_INGRAIN, + MOVE_CONFUSE_RAY, + MOVE_ICICLE_SPEAR), + + egg_moves(REMORAID, + MOVE_AURORA_BEAM, + MOVE_OCTAZOOKA, + MOVE_SUPERSONIC, + MOVE_HAZE, + MOVE_SCREECH, + MOVE_THUNDER_WAVE, + MOVE_ROCK_BLAST), + + egg_moves(DELIBIRD, + MOVE_AURORA_BEAM, + MOVE_QUICK_ATTACK, + MOVE_FUTURE_SIGHT, + MOVE_SPLASH, + MOVE_RAPID_SPIN, + MOVE_ICE_BALL), + + egg_moves(MANTINE, + MOVE_TWISTER, + MOVE_HYDRO_PUMP, + MOVE_HAZE, + MOVE_SLAM, + MOVE_MUD_SPORT, + MOVE_ROCK_SLIDE), + + egg_moves(SKARMORY, + MOVE_DRILL_PECK, + MOVE_PURSUIT, + MOVE_WHIRLWIND, + MOVE_SKY_ATTACK, + MOVE_CURSE), + + egg_moves(HOUNDOUR, + MOVE_FIRE_SPIN, + MOVE_RAGE, + MOVE_PURSUIT, + MOVE_COUNTER, + MOVE_SPITE, + MOVE_REVERSAL, + MOVE_BEAT_UP, + MOVE_WILL_O_WISP), + + egg_moves(PHANPY, + MOVE_FOCUS_ENERGY, + MOVE_BODY_SLAM, + MOVE_ANCIENT_POWER, + MOVE_SNORE, + MOVE_COUNTER, + MOVE_FISSURE), + + egg_moves(STANTLER, + MOVE_SPITE, + MOVE_DISABLE, + MOVE_BITE, + MOVE_SWAGGER, + MOVE_PSYCH_UP, + MOVE_EXTRASENSORY), + + egg_moves(TYROGUE, + MOVE_RAPID_SPIN, + MOVE_HI_JUMP_KICK, + MOVE_MACH_PUNCH, + MOVE_MIND_READER, + MOVE_HELPING_HAND), + + egg_moves(SMOOCHUM, + MOVE_MEDITATE, + MOVE_PSYCH_UP, + MOVE_FAKE_OUT, + MOVE_WISH, + MOVE_ICE_PUNCH), + + egg_moves(ELEKID, + MOVE_KARATE_CHOP, + MOVE_BARRIER, + MOVE_ROLLING_KICK, + MOVE_MEDITATE, + MOVE_CROSS_CHOP, + MOVE_FIRE_PUNCH, + MOVE_ICE_PUNCH), + + egg_moves(MAGBY, + MOVE_KARATE_CHOP, + MOVE_MEGA_PUNCH, + MOVE_BARRIER, + MOVE_SCREECH, + MOVE_CROSS_CHOP, + MOVE_THUNDER_PUNCH), + + egg_moves(MILTANK, + MOVE_PRESENT, + MOVE_REVERSAL, + MOVE_SEISMIC_TOSS, + MOVE_ENDURE, + MOVE_PSYCH_UP, + MOVE_CURSE, + MOVE_HELPING_HAND, + MOVE_SLEEP_TALK), + + egg_moves(LARVITAR, + MOVE_PURSUIT, + MOVE_STOMP, + MOVE_OUTRAGE, + MOVE_FOCUS_ENERGY, + MOVE_ANCIENT_POWER, + MOVE_DRAGON_DANCE, + MOVE_CURSE), + + egg_moves(TREECKO, + MOVE_CRUNCH, + MOVE_MUD_SPORT, + MOVE_ENDEAVOR, + MOVE_LEECH_SEED, + MOVE_DRAGON_BREATH, + MOVE_CRUSH_CLAW), + + egg_moves(TORCHIC, + MOVE_COUNTER, + MOVE_REVERSAL, + MOVE_ENDURE, + MOVE_SWAGGER, + MOVE_ROCK_SLIDE, + MOVE_SMELLING_SALT), + + egg_moves(MUDKIP, + MOVE_REFRESH, + MOVE_UPROAR, + MOVE_CURSE, + MOVE_STOMP, + MOVE_ICE_BALL, + MOVE_MIRROR_COAT), + + egg_moves(POOCHYENA, + MOVE_ASTONISH, + MOVE_POISON_FANG, + MOVE_COVET, + MOVE_LEER, + MOVE_YAWN), + + egg_moves(ZIGZAGOON, + MOVE_CHARM, + MOVE_PURSUIT, + MOVE_SUBSTITUTE, + MOVE_TICKLE, + MOVE_TRICK), + + egg_moves(LOTAD, + MOVE_SYNTHESIS, + MOVE_RAZOR_LEAF, + MOVE_SWEET_SCENT, + MOVE_LEECH_SEED, + MOVE_FLAIL, + MOVE_WATER_GUN), + + egg_moves(SEEDOT, + MOVE_LEECH_SEED, + MOVE_AMNESIA, + MOVE_QUICK_ATTACK, + MOVE_RAZOR_WIND, + MOVE_TAKE_DOWN, + MOVE_FALSE_SWIPE), + + egg_moves(NINCADA, + MOVE_ENDURE, + MOVE_FAINT_ATTACK, + MOVE_GUST, + MOVE_SILVER_WIND), + + egg_moves(TAILLOW, + MOVE_PURSUIT, + MOVE_SUPERSONIC, + MOVE_REFRESH, + MOVE_MIRROR_MOVE, + MOVE_RAGE, + MOVE_SKY_ATTACK), + + egg_moves(SHROOMISH, + MOVE_FAKE_TEARS, + MOVE_SWAGGER, + MOVE_CHARM, + MOVE_FALSE_SWIPE, + MOVE_HELPING_HAND), + + egg_moves(SPINDA, + MOVE_ENCORE, + MOVE_ROCK_SLIDE, + MOVE_ASSIST, + MOVE_DISABLE, + MOVE_BATON_PASS, + MOVE_WISH, + MOVE_TRICK, + MOVE_SMELLING_SALT), + + egg_moves(WINGULL, + MOVE_MIST, + MOVE_TWISTER, + MOVE_AGILITY, + MOVE_GUST, + MOVE_WATER_SPORT), + + egg_moves(SURSKIT, + MOVE_FORESIGHT, + MOVE_MUD_SHOT, + MOVE_PSYBEAM, + MOVE_HYDRO_PUMP, + MOVE_MIND_READER), + + egg_moves(WAILMER, + MOVE_DOUBLE_EDGE, + MOVE_THRASH, + MOVE_SWAGGER, + MOVE_SNORE, + MOVE_SLEEP_TALK, + MOVE_CURSE, + MOVE_FISSURE, + MOVE_TICKLE), + + egg_moves(SKITTY, + MOVE_HELPING_HAND, + MOVE_PSYCH_UP, + MOVE_UPROAR, + MOVE_FAKE_TEARS, + MOVE_WISH, + MOVE_BATON_PASS, + MOVE_SUBSTITUTE, + MOVE_TICKLE), + + egg_moves(KECLEON, + MOVE_DISABLE, + MOVE_MAGIC_COAT, + MOVE_TRICK), + + egg_moves(NOSEPASS, + MOVE_MAGNITUDE, + MOVE_ROLLOUT, + MOVE_EXPLOSION), + + egg_moves(TORKOAL, + MOVE_ERUPTION, + MOVE_ENDURE, + MOVE_SLEEP_TALK, + MOVE_YAWN), + + egg_moves(SABLEYE, + MOVE_PSYCH_UP, + MOVE_RECOVER, + MOVE_MOONLIGHT), + + egg_moves(BARBOACH, + MOVE_THRASH, + MOVE_WHIRLPOOL, + MOVE_SPARK), + + egg_moves(LUVDISC, + MOVE_SPLASH, + MOVE_SUPERSONIC, + MOVE_WATER_SPORT, + MOVE_MUD_SPORT), + + egg_moves(CORPHISH, + MOVE_MUD_SPORT, + MOVE_ENDEAVOR, + MOVE_BODY_SLAM, + MOVE_ANCIENT_POWER), + + egg_moves(FEEBAS, + MOVE_MIRROR_COAT, + MOVE_DRAGON_BREATH, + MOVE_MUD_SPORT, + MOVE_HYPNOSIS, + MOVE_LIGHT_SCREEN, + MOVE_CONFUSE_RAY), + + egg_moves(CARVANHA, + MOVE_HYDRO_PUMP, + MOVE_DOUBLE_EDGE, + MOVE_THRASH), + + egg_moves(TRAPINCH, + MOVE_FOCUS_ENERGY, + MOVE_QUICK_ATTACK, + MOVE_GUST), + + egg_moves(MAKUHITA, + MOVE_FAINT_ATTACK, + MOVE_DETECT, + MOVE_FORESIGHT, + MOVE_HELPING_HAND, + MOVE_CROSS_CHOP, + MOVE_REVENGE, + MOVE_DYNAMIC_PUNCH, + MOVE_COUNTER), + + egg_moves(ELECTRIKE, + MOVE_CRUNCH, + MOVE_HEADBUTT, + MOVE_UPROAR, + MOVE_CURSE, + MOVE_SWIFT), + + egg_moves(NUMEL, + MOVE_HOWL, + MOVE_SCARY_FACE, + MOVE_BODY_SLAM, + MOVE_ROLLOUT, + MOVE_DEFENSE_CURL, + MOVE_STOMP), + + egg_moves(SPHEAL, + MOVE_WATER_SPORT, + MOVE_STOCKPILE, + MOVE_SWALLOW, + MOVE_SPIT_UP, + MOVE_YAWN, + MOVE_ROCK_SLIDE, + MOVE_CURSE, + MOVE_FISSURE), + + egg_moves(CACNEA, + MOVE_GRASS_WHISTLE, + MOVE_ACID, + MOVE_TEETER_DANCE, + MOVE_DYNAMIC_PUNCH, + MOVE_COUNTER), + + egg_moves(SNORUNT, + MOVE_BLOCK, + MOVE_SPIKES), + + egg_moves(AZURILL, + MOVE_ENCORE, + MOVE_SING, + MOVE_REFRESH, + MOVE_SLAM, + MOVE_TICKLE), + + egg_moves(SPOINK, + MOVE_FUTURE_SIGHT, + MOVE_EXTRASENSORY, + MOVE_SUBSTITUTE, + MOVE_TRICK), + + egg_moves(PLUSLE, + MOVE_SUBSTITUTE, + MOVE_WISH), + + egg_moves(MINUN, + MOVE_SUBSTITUTE, + MOVE_WISH), + + egg_moves(MAWILE, + MOVE_SWORDS_DANCE, + MOVE_FALSE_SWIPE, + MOVE_POISON_FANG, + MOVE_PSYCH_UP, + MOVE_ANCIENT_POWER, + MOVE_TICKLE), + + egg_moves(MEDITITE, + MOVE_FIRE_PUNCH, + MOVE_THUNDER_PUNCH, + MOVE_ICE_PUNCH, + MOVE_FORESIGHT, + MOVE_FAKE_OUT, + MOVE_BATON_PASS, + MOVE_DYNAMIC_PUNCH), + + egg_moves(SWABLU, + MOVE_AGILITY, + MOVE_HAZE, + MOVE_PURSUIT, + MOVE_RAGE), + + egg_moves(DUSKULL, + MOVE_IMPRISON, + MOVE_DESTINY_BOND, + MOVE_PAIN_SPLIT, + MOVE_GRUDGE, + MOVE_MEMENTO, + MOVE_FAINT_ATTACK), + + egg_moves(ROSELIA, + MOVE_SPIKES, + MOVE_SYNTHESIS, + MOVE_PIN_MISSILE, + MOVE_COTTON_SPORE), + + egg_moves(SLAKOTH, + MOVE_PURSUIT, + MOVE_SLASH, + MOVE_BODY_SLAM, + MOVE_SNORE, + MOVE_CRUSH_CLAW, + MOVE_CURSE, + MOVE_SLEEP_TALK), + + egg_moves(GULPIN, + MOVE_DREAM_EATER, + MOVE_ACID_ARMOR, + MOVE_SMOG, + MOVE_PAIN_SPLIT), + + egg_moves(TROPIUS, + MOVE_HEADBUTT, + MOVE_SLAM, + MOVE_RAZOR_WIND, + MOVE_LEECH_SEED, + MOVE_NATURE_POWER), + + egg_moves(WHISMUR, + MOVE_TAKE_DOWN, + MOVE_SNORE, + MOVE_SWAGGER, + MOVE_EXTRASENSORY, + MOVE_SMELLING_SALT), + + egg_moves(CLAMPERL, + MOVE_REFRESH, + MOVE_MUD_SPORT, + MOVE_BODY_SLAM, + MOVE_SUPERSONIC, + MOVE_BARRIER, + MOVE_CONFUSE_RAY), + + egg_moves(ABSOL, + MOVE_BATON_PASS, + MOVE_FAINT_ATTACK, + MOVE_DOUBLE_EDGE, + MOVE_MAGIC_COAT, + MOVE_CURSE, + MOVE_SUBSTITUTE), + + egg_moves(SHUPPET, + MOVE_DISABLE, + MOVE_DESTINY_BOND, + MOVE_FORESIGHT, + MOVE_ASTONISH, + MOVE_IMPRISON), + + egg_moves(SEVIPER, + MOVE_STOCKPILE, + MOVE_SWALLOW, + MOVE_SPIT_UP, + MOVE_BODY_SLAM), + + egg_moves(ZANGOOSE, + MOVE_FLAIL, + MOVE_DOUBLE_KICK, + MOVE_RAZOR_WIND, + MOVE_COUNTER, + MOVE_ROAR, + MOVE_CURSE), + + egg_moves(RELICANTH, + MOVE_MAGNITUDE, + MOVE_SKULL_BASH, + MOVE_WATER_SPORT, + MOVE_AMNESIA, + MOVE_SLEEP_TALK, + MOVE_ROCK_SLIDE), + + egg_moves(ARON, + MOVE_ENDEAVOR, + MOVE_BODY_SLAM, + MOVE_STOMP, + MOVE_SMELLING_SALT), + + egg_moves(CASTFORM, + MOVE_FUTURE_SIGHT, + MOVE_PSYCH_UP), + + egg_moves(VOLBEAT, + MOVE_BATON_PASS, + MOVE_SILVER_WIND, + MOVE_TRICK), + + egg_moves(ILLUMISE, + MOVE_BATON_PASS, + MOVE_SILVER_WIND, + MOVE_GROWTH), + + egg_moves(LILEEP, + MOVE_BARRIER, + MOVE_RECOVER, + MOVE_MIRROR_COAT, + MOVE_ROCK_SLIDE), + + egg_moves(ANORITH, + MOVE_RAPID_SPIN, + MOVE_KNOCK_OFF, + MOVE_SWORDS_DANCE, + MOVE_ROCK_SLIDE), + + egg_moves(RALTS, + MOVE_DISABLE, + MOVE_WILL_O_WISP, + MOVE_MEAN_LOOK, + MOVE_MEMENTO, + MOVE_DESTINY_BOND), + + egg_moves(BAGON, + MOVE_HYDRO_PUMP, + MOVE_THRASH, + MOVE_DRAGON_RAGE, + MOVE_TWISTER, + MOVE_DRAGON_DANCE), + + egg_moves(CHIMECHO, + MOVE_DISABLE, + MOVE_CURSE, + MOVE_HYPNOSIS, + MOVE_DREAM_EATER), + + 0xFFFF +}; diff --git a/include/data/pokemon/evolution.h b/include/data/pokemon/evolution.h index 51e993347..919416fee 100644 --- a/include/data/pokemon/evolution.h +++ b/include/data/pokemon/evolution.h @@ -1,5 +1,5 @@ // -// Created by Scott Norton on 6/27/17. + // #ifndef POKERUBY_EVOLUTION_H diff --git a/include/data/pokemon/experience_tables.h b/include/data/pokemon/experience_tables.h index 70c5e88ed..2fb416fe9 100644 --- a/include/data/pokemon/experience_tables.h +++ b/include/data/pokemon/experience_tables.h @@ -1,5 +1,5 @@ // -// Created by Scott Norton on 6/27/17. + // #ifndef POKERUBY_EXPERIENCE_TABLES_H diff --git a/include/data/pokemon/item_effects.h b/include/data/pokemon/item_effects.h index b07573933..cd06228dd 100644 --- a/include/data/pokemon/item_effects.h +++ b/include/data/pokemon/item_effects.h @@ -1,5 +1,5 @@ // -// Created by Scott Norton on 6/27/17. + // #ifndef POKERUBY_ITEM_EFFECTS_H diff --git a/include/data/pokemon/level_up_learnset_pointers.h b/include/data/pokemon/level_up_learnset_pointers.h index 753947d51..19761c996 100644 --- a/include/data/pokemon/level_up_learnset_pointers.h +++ b/include/data/pokemon/level_up_learnset_pointers.h @@ -1,5 +1,5 @@ // -// Created by Scott Norton on 6/27/17. + // #ifndef POKERUBY_LEVEL_UP_LEARNSET_POINTERS_H diff --git a/include/data/pokemon/level_up_learnsets.h b/include/data/pokemon/level_up_learnsets.h index 5b79f4bc0..bc1de82de 100644 --- a/include/data/pokemon/level_up_learnsets.h +++ b/include/data/pokemon/level_up_learnsets.h @@ -1,5 +1,5 @@ // -// Created by Scott Norton on 6/27/17. + // #ifndef POKERUBY_LEVEL_UP_LEARNSETS_H diff --git a/include/data/pokemon/nature_stats.h b/include/data/pokemon/nature_stats.h index 27bd98f9d..fcef2a0ac 100644 --- a/include/data/pokemon/nature_stats.h +++ b/include/data/pokemon/nature_stats.h @@ -1,5 +1,5 @@ // -// Created by Scott Norton on 6/27/17. + // #ifndef POKERUBY_NATURE_STATS_H diff --git a/include/data/pokemon/spinda_spots.h b/include/data/pokemon/spinda_spots.h index 234cdf00e..d045e0734 100644 --- a/include/data/pokemon/spinda_spots.h +++ b/include/data/pokemon/spinda_spots.h @@ -1,5 +1,5 @@ // -// Created by Scott Norton on 6/27/17. + // #ifndef POKERUBY_SPINDA_SPOTS_H diff --git a/include/data/pokemon/tmhm_learnsets.h b/include/data/pokemon/tmhm_learnsets.h index fa48f7f5c..02cd22d56 100644 --- a/include/data/pokemon/tmhm_learnsets.h +++ b/include/data/pokemon/tmhm_learnsets.h @@ -1,5 +1,5 @@ // -// Created by Scott Norton on 6/27/17. + // #ifndef POKERUBY_TMHM_LEARNSETS_H diff --git a/include/data/pokemon/trainer_class_lookups.h b/include/data/pokemon/trainer_class_lookups.h index 0aea322a0..c86e795c4 100644 --- a/include/data/pokemon/trainer_class_lookups.h +++ b/include/data/pokemon/trainer_class_lookups.h @@ -1,5 +1,5 @@ // -// Created by Scott Norton on 6/27/17. + // #ifndef POKERUBY_TRAINER_CLASS_LOOKUPS_H diff --git a/include/data2.h b/include/data2.h index 9dd26fd5f..53a90944d 100644 --- a/include/data2.h +++ b/include/data2.h @@ -3,12 +3,7 @@ #include "sprite.h" -struct UnknownStructD2 -{ - u32 unk0; - u32 unk4; - u32 unk8; -}; +struct UnknownTaskStruct; struct MonCoords { @@ -44,8 +39,10 @@ extern u8 gEnemyMonElevation[]; extern const u8 gTrainerClassNames[][13]; extern const struct Trainer gTrainers[]; extern u8 gSpeciesNames[][11]; -extern u8 gMoveNames[][13]; -extern const struct UnknownStructD2 gUnknown_081F9674; +extern const u8 gMoveNames[][13]; +extern const u8 gAbilityNames[][13]; +extern const u8 gTypeNames[][7]; +extern const struct UnknownTaskStruct gUnknown_081F9674; extern const u8 gUnknown_081F96C8[]; extern struct CompressedSpriteSheet gUnknown_081FAEA4; extern struct CompressedSpritePalette gUnknown_081FAEAC; diff --git a/include/daycare.h b/include/daycare.h index b90c50610..e46351d72 100644 --- a/include/daycare.h +++ b/include/daycare.h @@ -1,14 +1,15 @@ #ifndef GUARD_DAYCARE_H #define GUARD_DAYCARE_H -u8 Daycare_CountPokemon(struct BoxPokemon *); -void sub_8041324(struct BoxPokemon *, struct RecordMixing_UnknownStruct *); -void sub_8041790(int i); +u8 Daycare_CountPokemon(struct DayCareData *); +void sub_8041324(struct BoxPokemon *, struct RecordMixingDayCareMail *); +void sub_8041790(u16 i); u16 sub_8041870(u16); void sub_8041940(void); void sub_8041950(void); void sub_8042044(struct Pokemon *mon, u16, u8); u8 sub_80422A0(void); u8 daycare_relationship_score_from_savegame(void); +bool8 NameHasGenderSymbol(const u8 *, u8); #endif // GUARD_DAYCARE_H diff --git a/include/decompress.h b/include/decompress.h index 07d69301f..01f66971c 100644 --- a/include/decompress.h +++ b/include/decompress.h @@ -3,14 +3,14 @@ #include "sprite.h" -void sub_800D238(const void *src, void *dest); +void LZDecompressWram(const void *src, void *dest); void LZDecompressVram(const void *src, void *dest); void LoadCompressedObjectPic(const struct CompressedSpriteSheet *a); void LoadCompressedObjectPicOverrideBuffer(const struct CompressedSpriteSheet *a, void *buffer); void LoadCompressedObjectPalette(const struct CompressedSpritePalette *a); void LoadCompressedObjectPaletteOverrideBuffer(const struct CompressedSpritePalette *a, void *buffer); void DecompressPicFromTable_2(const struct CompressedSpriteSheet *a, u8 b, u8 c, void *d, void *e, s32 f); -void HandleLoadSpecialPokePic(const struct CompressedSpriteSheet *spriteSheet, u32 b, u32 c, u32 d, void *dest, s32 species, u32 g); +void HandleLoadSpecialPokePic(const struct CompressedSpriteSheet *spriteSheet, u32 b, u32 c, u32 d, void *dest, s32 species, u32 pid); void LoadSpecialPokePic(const struct CompressedSpriteSheet *spriteSheet, u32 b, u32 c, u32 d, void *dest, s32 species, u32 g, u32 h); void Unused_LZDecompressWramIndirect(const void **src, void *dest); diff --git a/include/diploma.h b/include/diploma.h index 81e9e3bb2..8d730fa05 100644 --- a/include/diploma.h +++ b/include/diploma.h @@ -1,6 +1,6 @@ #ifndef GUARD_DIPLOMA_H #define GUARD_DIPLOMA_H -void sub_8145D88(void); +void CB2_ShowDiploma(void); #endif // GUARD_DIPLOMA_H diff --git a/include/easy_chat.h b/include/easy_chat.h index 03e9bb737..8a820353f 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -1,7 +1,8 @@ #ifndef GUARD_EASYCHAT_H #define GUARD_EASYCHAT_H -enum { +enum +{ EC_GROUP_POKEMON, EC_GROUP_TRAINER, EC_GROUP_STATUS, @@ -26,6 +27,1045 @@ enum { EC_GROUP_POKEMON_2, }; +enum { + EC_WORD_I_CHOOSE_YOU = EC_GROUP_TRAINER << 9, + EC_WORD_GOTCHA, + EC_WORD_TRADE, + EC_WORD_SAPPHIRE, + EC_WORD_EVOLVE, + EC_WORD_ENCYCLOPEDIA, + EC_WORD_NATURE, + EC_WORD_CENTER, + EC_WORD_EGG, + EC_WORD_LINK, + EC_WORD_SP_ABILITY, + EC_WORD_TRAINER, + EC_WORD_VERSION, + EC_WORD_POKENAV, + EC_WORD_POKEMON, + EC_WORD_GET, + EC_WORD_POKEDEX, + EC_WORD_RUBY, + EC_WORD_LEVEL +}; +enum { + EC_WORD_DARK = EC_GROUP_STATUS << 9, + EC_WORD_STENCH, + EC_WORD_THICK_FAT, + EC_WORD_RAIN_DISH, + EC_WORD_DRIZZLE, + EC_WORD_ARENA_TRAP, + EC_WORD_INTIMIDATE, + EC_WORD_ROCK_HEAD, + EC_WORD_COLOR, + EC_WORD_ALT_COLOR, + EC_WORD_ROCK, + EC_WORD_BEAUTIFUL, + EC_WORD_BEAUTY, + EC_WORD_AIR_LOCK, + EC_WORD_PSYCHIC, + EC_WORD_HYPER_CUTTER, + EC_WORD_FIGHTING, + EC_WORD_SHADOW_TAG, + EC_WORD_SMART, + EC_WORD_SMARTNESS, + EC_WORD_SPEED_BOOST, + EC_WORD_COOL, + EC_WORD_COOLNESS, + EC_WORD_BATTLE_ARMOR, + EC_WORD_CUTE, + EC_WORD_CUTENESS, + EC_WORD_STURDY, + EC_WORD_SUCTION_CUPS, + EC_WORD_GRASS, + EC_WORD_CLEAR_BODY, + EC_WORD_TORRENT, + EC_WORD_GHOST, + EC_WORD_ICE, + EC_WORD_GUTS, + EC_WORD_ROUGH_SKIN, + EC_WORD_SHELL_ARMOR, + EC_WORD_NATURAL_CURE, + EC_WORD_DAMP, + EC_WORD_GROUND, + EC_WORD_LIMBER, + EC_WORD_MAGNET_PULL, + EC_WORD_WHITE_SMOKE, + EC_WORD_SYNCHRONIZE, + EC_WORD_OVERGROW, + EC_WORD_SWIFT_SWIM, + EC_WORD_SAND_STREAM, + EC_WORD_SAND_VEIL, + EC_WORD_KEEN_EYE, + EC_WORD_INNER_FOCUS, + EC_WORD_STATIC, + EC_WORD_TYPE, + EC_WORD_TOUGH, + EC_WORD_TOUGHNESS, + EC_WORD_SHED_SKIN, + EC_WORD_HUGE_POWER, + EC_WORD_VOLT_ABSORB, + EC_WORD_WATER_ABSORB, + EC_WORD_ELECTRIC, + EC_WORD_FORECAST, + EC_WORD_SERENE_GRACE, + EC_WORD_POISON, + EC_WORD_POISON_POINT, + EC_WORD_DRAGON, + EC_WORD_TRACE, + EC_WORD_OBLIVIOUS, + EC_WORD_TRUANT, + EC_WORD_RUN_AWAY, + EC_WORD_STICKY_HOLD, + EC_WORD_CLOUD_NINE, + EC_WORD_NORMAL, + EC_WORD_STEEL, + EC_WORD_ILLUMINATE, + EC_WORD_EARLY_BIRD, + EC_WORD_HUSTLE, + EC_WORD_SHINE, + EC_WORD_FLYING, + EC_WORD_DROUGHT, + EC_WORD_LIGHTNINGROD, + EC_WORD_COMPOUNDEYES, + EC_WORD_MARVEL_SCALE, + EC_WORD_WONDER_GUARD, + EC_WORD_INSOMNIA, + EC_WORD_LEVITATE, + EC_WORD_PLUS, + EC_WORD_PRESSURE, + EC_WORD_LIQUID_OOZE, + EC_WORD_COLOR_CHANGE, + EC_WORD_SOUNDPROOF, + EC_WORD_EFFECT_SPORE, + EC_WORD_PKRS, + EC_WORD_FIRE, + EC_WORD_FLAME_BODY, + EC_WORD_MINUS, + EC_WORD_OWN_TEMPO, + EC_WORD_MAGMA_ARMOR, + EC_WORD_WATER, + EC_WORD_WATER_VEIL, + EC_WORD_BUG, + EC_WORD_SWARM, + EC_WORD_CUTE_CHARM, + EC_WORD_IMMUNITY, + EC_WORD_BLAZE, + EC_WORD_PICKUP, + EC_WORD_PATTERN, + EC_WORD_FLASH_FIRE, + EC_WORD_VITAL_SPIRIT, + EC_WORD_CHLOROPHYLL, + EC_WORD_PURE_POWER, + EC_WORD_SHIELD_DUST, +}; +enum { + EC_WORD_MATCH_UP = EC_GROUP_BATTLE << 9, + EC_WORD_GO, + EC_WORD_NO_1, + EC_WORD_DECIDE, + EC_WORD_LET_ME_WIN, + EC_WORD_WINS, + EC_WORD_WIN, + EC_WORD_WON, + EC_WORD_IF_I_WIN, + EC_WORD_WHEN_I_WIN, + EC_WORD_CAN_T_WIN, + EC_WORD_CAN_WIN, + EC_WORD_NO_MATCH, + EC_WORD_SPIRIT, + EC_WORD_DECIDED, + EC_WORD_TRUMP_CARD, + EC_WORD_TAKE_THAT, + EC_WORD_COME_ON, + EC_WORD_ATTACK, + EC_WORD_SURRENDER, + EC_WORD_GUTSY, + EC_WORD_TALENT, + EC_WORD_STRATEGY, + EC_WORD_SMITE, + EC_WORD_MATCH, + EC_WORD_VICTORY, + EC_WORD_OFFENSIVE, + EC_WORD_SENSE, + EC_WORD_VERSUS, + EC_WORD_FIGHTS, + EC_WORD_POWER, + EC_WORD_CHALLENGE, + EC_WORD_STRONG, + EC_WORD_TOO_STRONG, + EC_WORD_GO_EASY, + EC_WORD_FOE, + EC_WORD_GENIUS, + EC_WORD_LEGEND, + EC_WORD_ESCAPE, + EC_WORD_AIM, + EC_WORD_BATTLE, + EC_WORD_FIGHT, + EC_WORD_RESUSCITATE, + EC_WORD_POINTS, + EC_WORD_SERIOUS, + EC_WORD_GIVE_UP, + EC_WORD_LOSS, + EC_WORD_IF_I_LOSE, + EC_WORD_LOST, + EC_WORD_LOSE, + EC_WORD_GUARD, + EC_WORD_PARTNER, + EC_WORD_REJECT, + EC_WORD_ACCEPT, + EC_WORD_INVINCIBLE, + EC_WORD_RECEIVED, + EC_WORD_EASY, + EC_WORD_WEAK, + EC_WORD_TOO_WEAK, + EC_WORD_PUSHOVER, + EC_WORD_LEADER, + EC_WORD_RULE, + EC_WORD_MOVE +}; +enum { + EC_WORD_THANKS = EC_GROUP_GREETINGS << 9, + EC_WORD_YES, + EC_WORD_HERE_GOES, + EC_WORD_HERE_I_COME, + EC_WORD_HERE_IT_IS, + EC_WORD_YEAH, + EC_WORD_WELCOME, + EC_WORD_OI, + EC_WORD_HOW_DO, + EC_WORD_CONGRATS, + EC_WORD_GIVE_ME, + EC_WORD_SORRY, + EC_WORD_APOLOGIZE, + EC_WORD_FORGIVE, + EC_WORD_HEY_THERE, + EC_WORD_HELLO, + EC_WORD_GOOD_BYE, + EC_WORD_THANK_YOU, + EC_WORD_I_VE_ARRIVED, + EC_WORD_PARDON, + EC_WORD_EXCUSE, + EC_WORD_SEE_YA, + EC_WORD_EXCUSE_ME, + EC_WORD_WELL_THEN, + EC_WORD_GO_AHEAD, + EC_WORD_APPRECIATE, + EC_WORD_HEY_QUES, + EC_WORD_WHAT_S_UP_QUES, + EC_WORD_HUH_QUES, + EC_WORD_NO, + EC_WORD_HI, + EC_WORD_YEAH_YEAH, + EC_WORD_BYE_BYE, + EC_WORD_MEET_YOU, + EC_WORD_HEY, + EC_WORD_SMELL, + EC_WORD_LISTENING, + EC_WORD_HOO_HAH, + EC_WORD_YAHOO, + EC_WORD_YO, + EC_WORD_COME_OVER, + EC_WORD_COUNT_ON +}; +enum { + EC_WORD_OPPONENT = EC_GROUP_PEOPLE << 9, + EC_WORD_I, + EC_WORD_YOU, + EC_WORD_YOURS, + EC_WORD_SON, + EC_WORD_YOUR, + EC_WORD_YOU_RE, + EC_WORD_YOU_VE, + EC_WORD_MOTHER, + EC_WORD_GRANDFATHER, + EC_WORD_UNCLE, + EC_WORD_FATHER, + EC_WORD_BOY, + EC_WORD_ADULT, + EC_WORD_BROTHER, + EC_WORD_SISTER, + EC_WORD_GRANDMOTHER, + EC_WORD_AUNT, + EC_WORD_PARENT, + EC_WORD_MAN, + EC_WORD_ME, + EC_WORD_GIRL, + EC_WORD_BABE, + EC_WORD_FAMILY, + EC_WORD_HER, + EC_WORD_HIM, + EC_WORD_HE, + EC_WORD_PLACE, + EC_WORD_DAUGHTER, + EC_WORD_HIS, + EC_WORD_HE_S, + EC_WORD_AREN_T, + EC_WORD_SIBLINGS, + EC_WORD_KID, + EC_WORD_CHILDREN, + EC_WORD_MR, + EC_WORD_MRS, + EC_WORD_MYSELF, + EC_WORD_I_WAS, + EC_WORD_TO_ME, + EC_WORD_MY, + EC_WORD_I_AM, + EC_WORD_I_VE, + EC_WORD_WHO, + EC_WORD_SOMEONE, + EC_WORD_WHO_WAS, + EC_WORD_TO_WHOM, + EC_WORD_WHOSE, + EC_WORD_WHO_IS, + EC_WORD_IT_S, + EC_WORD_LADY, + EC_WORD_FRIEND, + EC_WORD_ALLY, + EC_WORD_PERSON, + EC_WORD_DUDE, + EC_WORD_THEY, + EC_WORD_THEY_WERE, + EC_WORD_TO_THEM, + EC_WORD_THEIR, + EC_WORD_THEY_RE, + EC_WORD_THEY_VE, + EC_WORD_WE, + EC_WORD_BEEN, + EC_WORD_TO_US, + EC_WORD_OUR, + EC_WORD_WE_RE, + EC_WORD_RIVAL, + EC_WORD_WE_VE, + EC_WORD_WOMAN, + EC_WORD_SHE, + EC_WORD_SHE_WAS, + EC_WORD_TO_HER, + EC_WORD_HERS, + EC_WORD_SHE_IS, + EC_WORD_SOME +}; +enum { + EC_WORD_EXCL = EC_GROUP_VOICES << 9, + EC_WORD_EXCL_EXCL, + EC_WORD_QUES_EXCL, + EC_WORD_QUES, + EC_WORD_ELLIPSIS, + EC_WORD_ELLIPSIS_EXCL, + EC_WORD_ELLIPSIS_ELLIPSIS_ELLIPSIS, + EC_WORD_DASH, + EC_WORD_DASH_DASH_DASH, + EC_WORD_UH_OH, + EC_WORD_WAAAH, + EC_WORD_AHAHA, + EC_WORD_OH_QUES, + EC_WORD_NOPE, + EC_WORD_URGH, + EC_WORD_HMM, + EC_WORD_WHOAH, + EC_WORD_WROOOAAR_EXCL, + EC_WORD_WOW, + EC_WORD_GIGGLE, + EC_WORD_SIGH, + EC_WORD_UNBELIEVABLE, + EC_WORD_CRIES, + EC_WORD_AGREE, + EC_WORD_EH_QUES, + EC_WORD_CRY, + EC_WORD_EHEHE, + EC_WORD_OI_OI_OI, + EC_WORD_OH_YEAH, + EC_WORD_OH, + EC_WORD_OOPS, + EC_WORD_SHOCKED, + EC_WORD_EEK, + EC_WORD_GRAAAH, + EC_WORD_GWAHAHAHA, + EC_WORD_WAY, + EC_WORD_TCH, + EC_WORD_HEHE, + EC_WORD_HAH, + EC_WORD_YUP, + EC_WORD_HAHAHA, + EC_WORD_AIYEEH, + EC_WORD_HIYAH, + EC_WORD_FUFUFU, + EC_WORD_LOL, + EC_WORD_SNORT, + EC_WORD_HUMPH, + EC_WORD_HEHEHE, + EC_WORD_HEH, + EC_WORD_HOHOHO, + EC_WORD_UH_HUH, + EC_WORD_OH_DEAR, + EC_WORD_ARRGH, + EC_WORD_MUFUFU, + EC_WORD_MMM, + EC_WORD_OH_KAY, + EC_WORD_OKAY, + EC_WORD_LALALA, + EC_WORD_YAY, + EC_WORD_AWW, + EC_WORD_WOWEE, + EC_WORD_GWAH, + EC_WORD_WAHAHAHA +}; +enum { + EC_WORD_LISTEN = EC_GROUP_SPEECH << 9, + EC_WORD_NOT_VERY, + EC_WORD_MEAN, + EC_WORD_LIE, + EC_WORD_LAY, + EC_WORD_RECOMMEND, + EC_WORD_NITWIT, + EC_WORD_QUITE, + EC_WORD_FROM, + EC_WORD_FEELING, + EC_WORD_BUT, + EC_WORD_HOWEVER, + EC_WORD_CASE, + EC_WORD_THE, + EC_WORD_MISS, + EC_WORD_HOW, + EC_WORD_HIT, + EC_WORD_ENOUGH, + EC_WORD_A_LOT, + EC_WORD_A_LITTLE, + EC_WORD_ABSOLUTELY, + EC_WORD_AND, + EC_WORD_ONLY, + EC_WORD_AROUND, + EC_WORD_PROBABLY, + EC_WORD_IF, + EC_WORD_VERY, + EC_WORD_A_TINY_BIT, + EC_WORD_WILD, + EC_WORD_THAT_S, + EC_WORD_JUST, + EC_WORD_EVEN_SO, + EC_WORD_MUST_BE, + EC_WORD_NATURALLY, + EC_WORD_FOR_NOW, + EC_WORD_UNDERSTOOD, + EC_WORD_JOKING, + EC_WORD_READY, + EC_WORD_SOMETHING, + EC_WORD_SOMEHOW, + EC_WORD_ALTHOUGH, + EC_WORD_ALSO, + EC_WORD_PERFECT, + EC_WORD_AS_MUCH_AS, + EC_WORD_REALLY, + EC_WORD_TRULY, + EC_WORD_SERIOUSLY, + EC_WORD_TOTALLY, + EC_WORD_UNTIL, + EC_WORD_AS_IF, + EC_WORD_MOOD, + EC_WORD_RATHER, + EC_WORD_AWFULLY, + EC_WORD_MODE, + EC_WORD_MORE, + EC_WORD_TOO_LATE, + EC_WORD_FINALLY, + EC_WORD_ANY, + EC_WORD_INSTEAD, + EC_WORD_FANTASTIC +}; +enum { + EC_WORD_WILL = EC_GROUP_ENDINGS << 9, + EC_WORD_WILL_BE_HERE, + EC_WORD_OR, + EC_WORD_TIMES, + EC_WORD_WONDER, + EC_WORD_IS_IT_QUES, + EC_WORD_BE, + EC_WORD_GIMME, + EC_WORD_COULD, + EC_WORD_LIKELY_TO, + EC_WORD_WOULD, + EC_WORD_IS, + EC_WORD_ISN_T_IT_QUES, + EC_WORD_LET_S, + EC_WORD_OTHER, + EC_WORD_ARE, + EC_WORD_WAS, + EC_WORD_WERE, + EC_WORD_THOSE, + EC_WORD_ISN_T, + EC_WORD_WON_T, + EC_WORD_CAN_T, + EC_WORD_CAN, + EC_WORD_DON_T, + EC_WORD_DO, + EC_WORD_DOES, + EC_WORD_WHOM, + EC_WORD_WHICH, + EC_WORD_WASN_T, + EC_WORD_WEREN_T, + EC_WORD_HAVE, + EC_WORD_HAVEN_T, + EC_WORD_A, + EC_WORD_AN, + EC_WORD_NOT, + EC_WORD_THERE, + EC_WORD_OK_QUES, + EC_WORD_SO, + EC_WORD_MAYBE, + EC_WORD_ABOUT, + EC_WORD_OVER, + EC_WORD_IT, + EC_WORD_ALL, + EC_WORD_FOR, + EC_WORD_ON, + EC_WORD_OFF, + EC_WORD_AS, + EC_WORD_TO, + EC_WORD_WITH, + EC_WORD_BETTER, + EC_WORD_EVER, + EC_WORD_SINCE, + EC_WORD_OF, + EC_WORD_BELONGS_TO, + EC_WORD_AT, + EC_WORD_IN, + EC_WORD_OUT, + EC_WORD_TOO, + EC_WORD_LIKE, + EC_WORD_DID, + EC_WORD_DIDN_T, + EC_WORD_DOESN_T, + EC_WORD_WITHOUT, + EC_WORD_AFTER, + EC_WORD_BEFORE, + EC_WORD_WHILE, + EC_WORD_THAN, + EC_WORD_ONCE, + EC_WORD_ANYWHERE +}; +enum { + EC_WORD_MEET = EC_GROUP_FEELINGS << 9, + EC_WORD_PLAY, + EC_WORD_HURRIED, + EC_WORD_GOES, + EC_WORD_GIDDY, + EC_WORD_HAPPY, + EC_WORD_HAPPINESS, + EC_WORD_EXCITE, + EC_WORD_IMPORTANT, + EC_WORD_FUNNY, + EC_WORD_GOT, + EC_WORD_GO_HOME, + EC_WORD_DISAPPOINTED, + EC_WORD_DISAPPOINTS, + EC_WORD_SAD, + EC_WORD_TRY, + EC_WORD_TRIES, + EC_WORD_HEARS, + EC_WORD_THINK, + EC_WORD_HEAR, + EC_WORD_WANTS, + EC_WORD_MISHEARD, + EC_WORD_DISLIKE, + EC_WORD_ANGRY, + EC_WORD_ANGER, + EC_WORD_SCARY, + EC_WORD_LONESOME, + EC_WORD_DISAPPOINT, + EC_WORD_JOY, + EC_WORD_GETS, + EC_WORD_NEVER, + EC_WORD_DARN, + EC_WORD_DOWNCAST, + EC_WORD_INCREDIBLE, + EC_WORD_LIKES, + EC_WORD_DISLIKES, + EC_WORD_BORING, + EC_WORD_CARE, + EC_WORD_CARES, + EC_WORD_ALL_RIGHT, + EC_WORD_ADORE, + EC_WORD_DISASTER, + EC_WORD_ENJOY, + EC_WORD_ENJOYS, + EC_WORD_EAT, + EC_WORD_LACKING, + EC_WORD_BAD, + EC_WORD_HARD, + EC_WORD_TERRIBLE, + EC_WORD_SHOULD, + EC_WORD_NICE, + EC_WORD_DRINK, + EC_WORD_SURPRISE, + EC_WORD_FEAR, + EC_WORD_WANT, + EC_WORD_WAIT, + EC_WORD_SATISFIED, + EC_WORD_SEE, + EC_WORD_RARE, + EC_WORD_NEGATIVE, + EC_WORD_DONE, + EC_WORD_DANGER, + EC_WORD_DEFEATED, + EC_WORD_BEAT, + EC_WORD_GREAT, + EC_WORD_ROMANTIC, + EC_WORD_QUESTION, + EC_WORD_UNDERSTAND, + EC_WORD_UNDERSTANDS +}; +enum { + EC_WORD_HOT = EC_GROUP_CONDITIONS << 9, + EC_WORD_EXISTS, + EC_WORD_EXCESS, + EC_WORD_APPROVED, + EC_WORD_HAS, + EC_WORD_GOOD, + EC_WORD_LESS, + EC_WORD_MOMENTUM, + EC_WORD_GOING, + EC_WORD_WEIRD, + EC_WORD_BUSY, + EC_WORD_TOGETHER, + EC_WORD_FULL, + EC_WORD_ABSENT, + EC_WORD_BEING, + EC_WORD_NEED, + EC_WORD_TASTY, + EC_WORD_SKILLED, + EC_WORD_NOISY, + EC_WORD_BIG, + EC_WORD_LATE, + EC_WORD_CLOSE, + EC_WORD_DOCILE, + EC_WORD_AMUSING, + EC_WORD_ENTERTAINING, + EC_WORD_PERFECTION, + EC_WORD_PRETTY, + EC_WORD_HEALTHY, + EC_WORD_EXCELLENT, + EC_WORD_UPSIDE_DOWN, + EC_WORD_COLD, + EC_WORD_REFRESHING, + EC_WORD_UNAVOIDABLE, + EC_WORD_MUCH, + EC_WORD_OVERWHELMING, + EC_WORD_FABULOUS, + EC_WORD_ELSE, + EC_WORD_EXPENSIVE, + EC_WORD_CORRECT, + EC_WORD_IMPOSSIBLE, + EC_WORD_SMALL, + EC_WORD_DIFFERENT, + EC_WORD_TIRED, + EC_WORD_SKILL, + EC_WORD_TOP, + EC_WORD_NON_STOP, + EC_WORD_PREPOSTEROUS, + EC_WORD_NONE, + EC_WORD_NOTHING, + EC_WORD_NATURAL, + EC_WORD_BECOMES, + EC_WORD_LUKEWARM, + EC_WORD_FAST, + EC_WORD_LOW, + EC_WORD_AWFUL, + EC_WORD_ALONE, + EC_WORD_BORED, + EC_WORD_SECRET, + EC_WORD_MYSTERY, + EC_WORD_LACKS, + EC_WORD_BEST, + EC_WORD_LOUSY, + EC_WORD_MISTAKE, + EC_WORD_KIND, + EC_WORD_WELL, + EC_WORD_WEAKENED, + EC_WORD_SIMPLE, + EC_WORD_SEEMS, + EC_WORD_BADLY +}; +enum { + EC_WORD_MEETS = EC_GROUP_ACTIONS << 9, + EC_WORD_CONCEDE, + EC_WORD_GIVE, + EC_WORD_GIVES, + EC_WORD_PLAYED, + EC_WORD_PLAYS, + EC_WORD_COLLECT, + EC_WORD_WALKING, + EC_WORD_WALKS, + EC_WORD_SAYS, + EC_WORD_WENT, + EC_WORD_SAID, + EC_WORD_WAKE_UP, + EC_WORD_WAKES_UP, + EC_WORD_ANGERS, + EC_WORD_TEACH, + EC_WORD_TEACHES, + EC_WORD_PLEASE, + EC_WORD_LEARN, + EC_WORD_CHANGE, + EC_WORD_STORY, + EC_WORD_TRUST, + EC_WORD_LAVISH, + EC_WORD_LISTENS, + EC_WORD_HEARING, + EC_WORD_TRAINS, + EC_WORD_CHOOSE, + EC_WORD_COME, + EC_WORD_CAME, + EC_WORD_SEARCH, + EC_WORD_MAKE, + EC_WORD_CAUSE, + EC_WORD_KNOW, + EC_WORD_KNOWS, + EC_WORD_REFUSE, + EC_WORD_STORES, + EC_WORD_BRAG, + EC_WORD_IGNORANT, + EC_WORD_THINKS, + EC_WORD_BELIEVE, + EC_WORD_SLIDE, + EC_WORD_EATS, + EC_WORD_USE, + EC_WORD_USES, + EC_WORD_USING, + EC_WORD_COULDN_T, + EC_WORD_CAPABLE, + EC_WORD_DISAPPEAR, + EC_WORD_APPEAR, + EC_WORD_THROW, + EC_WORD_WORRY, + EC_WORD_SLEPT, + EC_WORD_SLEEP, + EC_WORD_RELEASE, + EC_WORD_DRINKS, + EC_WORD_RUNS, + EC_WORD_RUN, + EC_WORD_WORKS, + EC_WORD_WORKING, + EC_WORD_TALKING, + EC_WORD_TALK, + EC_WORD_SINK, + EC_WORD_SMACK, + EC_WORD_PRETEND, + EC_WORD_PRAISE, + EC_WORD_OVERDO, + EC_WORD_SHOW, + EC_WORD_LOOKS, + EC_WORD_SEES, + EC_WORD_SEEK, + EC_WORD_OWN, + EC_WORD_TAKE, + EC_WORD_ALLOW, + EC_WORD_FORGET, + EC_WORD_FORGETS, + EC_WORD_APPEARS, + EC_WORD_FAINT, + EC_WORD_FAINTED +}; +enum { + EC_WORD_CHORES = EC_GROUP_LIFESTYLE << 9, + EC_WORD_HOME, + EC_WORD_MONEY, + EC_WORD_ALLOWANCE, + EC_WORD_BATH, + EC_WORD_CONVERSATION, + EC_WORD_SCHOOL, + EC_WORD_COMMEMORATE, + EC_WORD_HABIT, + EC_WORD_GROUP, + EC_WORD_WORD, + EC_WORD_STORE, + EC_WORD_SERVICE, + EC_WORD_WORK, + EC_WORD_SYSTEM, + EC_WORD_TRAIN, + EC_WORD_CLASS, + EC_WORD_LESSONS, + EC_WORD_INFORMATION, + EC_WORD_LIVING, + EC_WORD_TEACHER, + EC_WORD_TOURNAMENT, + EC_WORD_LETTER, + EC_WORD_EVENT, + EC_WORD_DIGITAL, + EC_WORD_TEST, + EC_WORD_DEPT_STORE, + EC_WORD_TELEVISION, + EC_WORD_PHONE, + EC_WORD_ITEM, + EC_WORD_NAME, + EC_WORD_NEWS, + EC_WORD_POPULAR, + EC_WORD_PARTY, + EC_WORD_STUDY, + EC_WORD_MACHINE, + EC_WORD_MAIL, + EC_WORD_MESSAGE, + EC_WORD_PROMISE, + EC_WORD_DREAM, + EC_WORD_KINDERGARTEN, + EC_WORD_LIFE, + EC_WORD_RADIO, + EC_WORD_RENTAL, + EC_WORD_WORLD +}; +enum { + EC_WORD_IDOL = EC_GROUP_HOBBIES << 9, + EC_WORD_ANIME, + EC_WORD_SONG, + EC_WORD_MOVIE, + EC_WORD_SWEETS, + EC_WORD_CHAT, + EC_WORD_CHILD_S_PLAY, + EC_WORD_TOYS, + EC_WORD_MUSIC, + EC_WORD_CARDS, + EC_WORD_SHOPPING, + EC_WORD_CAMERA, + EC_WORD_VIEWING, + EC_WORD_SPECTATOR, + EC_WORD_GOURMET, + EC_WORD_GAME, + EC_WORD_RPG, + EC_WORD_COLLECTION, + EC_WORD_COMPLETE, + EC_WORD_MAGAZINE, + EC_WORD_WALK, + EC_WORD_BIKE, + EC_WORD_HOBBY, + EC_WORD_SPORTS, + EC_WORD_SOFTWARE, + EC_WORD_SONGS, + EC_WORD_DIET, + EC_WORD_TREASURE, + EC_WORD_TRAVEL, + EC_WORD_DANCE, + EC_WORD_CHANNEL, + EC_WORD_MAKING, + EC_WORD_FISHING, + EC_WORD_DATE, + EC_WORD_DESIGN, + EC_WORD_LOCOMOTIVE, + EC_WORD_PLUSH_DOLL, + EC_WORD_PC, + EC_WORD_FLOWERS, + EC_WORD_HERO, + EC_WORD_NAP, + EC_WORD_HEROINE, + EC_WORD_FASHION, + EC_WORD_ADVENTURE, + EC_WORD_BOARD, + EC_WORD_BALL, + EC_WORD_BOOK, + EC_WORD_FESTIVAL, + EC_WORD_COMICS, + EC_WORD_HOLIDAY, + EC_WORD_PLANS, + EC_WORD_TRENDY, + EC_WORD_VACATION, + EC_WORD_LOOK +}; +enum { + EC_WORD_FALL = EC_GROUP_TIME << 9, + EC_WORD_MORNING, + EC_WORD_TOMORROW, + EC_WORD_LAST, + EC_WORD_DAY, + EC_WORD_SOMETIME, + EC_WORD_ALWAYS, + EC_WORD_CURRENT, + EC_WORD_FOREVER, + EC_WORD_DAYS, + EC_WORD_END, + EC_WORD_TUESDAY, + EC_WORD_YESTERDAY, + EC_WORD_TODAY, + EC_WORD_FRIDAY, + EC_WORD_MONDAY, + EC_WORD_LATER, + EC_WORD_EARLIER, + EC_WORD_ANOTHER, + EC_WORD_TIME, + EC_WORD_FINISH, + EC_WORD_WEDNESDAY, + EC_WORD_SOON, + EC_WORD_START, + EC_WORD_MONTH, + EC_WORD_STOP, + EC_WORD_NOW, + EC_WORD_FINAL, + EC_WORD_NEXT, + EC_WORD_AGE, + EC_WORD_SATURDAY, + EC_WORD_SUMMER, + EC_WORD_SUNDAY, + EC_WORD_BEGINNING, + EC_WORD_SPRING, + EC_WORD_DAYTIME, + EC_WORD_WINTER, + EC_WORD_DAILY, + EC_WORD_OLDEN, + EC_WORD_ALMOST, + EC_WORD_NEARLY, + EC_WORD_THURSDAY, + EC_WORD_NIGHTTIME, + EC_WORD_NIGHT, + EC_WORD_WEEK +}; +enum { + EC_WORD_HIGHS = EC_GROUP_MISC << 9, + EC_WORD_LOWS, + EC_WORD_UM, + EC_WORD_REAR, + EC_WORD_THINGS, + EC_WORD_THING, + EC_WORD_BELOW, + EC_WORD_ABOVE, + EC_WORD_BACK, + EC_WORD_HIGH, + EC_WORD_HERE, + EC_WORD_INSIDE, + EC_WORD_OUTSIDE, + EC_WORD_BESIDE, + EC_WORD_THIS_IS_IT_EXCL, + EC_WORD_THIS, + EC_WORD_EVERY, + EC_WORD_THESE, + EC_WORD_THESE_WERE, + EC_WORD_DOWN, + EC_WORD_THAT, + EC_WORD_THOSE_ARE, + EC_WORD_THOSE_WERE, + EC_WORD_THAT_S_IT_EXCL, + EC_WORD_AM, + EC_WORD_THAT_WAS, + EC_WORD_FRONT, + EC_WORD_UP, + EC_WORD_CHOICE, + EC_WORD_FAR, + EC_WORD_AWAY, + EC_WORD_NEAR, + EC_WORD_WHERE, + EC_WORD_WHEN, + EC_WORD_WHAT, + EC_WORD_DEEP, + EC_WORD_SHALLOW, + EC_WORD_WHY, + EC_WORD_CONFUSED, + EC_WORD_OPPOSITE, + EC_WORD_LEFT, + EC_WORD_RIGHT +}; +enum { + EC_WORD_WANDERING = EC_GROUP_ADJECTIVES << 9, + EC_WORD_RICKETY, + EC_WORD_ROCK_SOLID, + EC_WORD_HUNGRY, + EC_WORD_TIGHT, + EC_WORD_TICKLISH, + EC_WORD_TWIRLING, + EC_WORD_SPIRALING, + EC_WORD_THIRSTY, + EC_WORD_LOLLING, + EC_WORD_SILKY, + EC_WORD_SADLY, + EC_WORD_HOPELESS, + EC_WORD_USELESS, + EC_WORD_DROOLING, + EC_WORD_EXCITING, + EC_WORD_THICK, + EC_WORD_SMOOTH, + EC_WORD_SLIMY, + EC_WORD_THIN, + EC_WORD_BREAK, + EC_WORD_VORACIOUS, + EC_WORD_SCATTER, + EC_WORD_AWESOME, + EC_WORD_WIMPY, + EC_WORD_WOBBLY, + EC_WORD_SHAKY, + EC_WORD_RIPPED, + EC_WORD_SHREDDED, + EC_WORD_INCREASING, + EC_WORD_YET, + EC_WORD_DESTROYED, + EC_WORD_FIERY, + EC_WORD_LOVEY_DOVEY, + EC_WORD_HAPPILY, + EC_WORD_ANTICIPATION +}; +enum { + EC_WORD_APPEAL = EC_GROUP_EVENTS << 9, + EC_WORD_EVENTS, + EC_WORD_STAY_AT_HOME, + EC_WORD_BERRY, + EC_WORD_CONTEST, + EC_WORD_MC, + EC_WORD_JUDGE, + EC_WORD_SUPER, + EC_WORD_STAGE, + EC_WORD_HALL_OF_FAME, + EC_WORD_EVOLUTION, + EC_WORD_HYPER, + EC_WORD_BATTLE_TOWER, + EC_WORD_LEADERS, + EC_WORD_BATTLE_ROOM, + EC_WORD_HIDDEN, + EC_WORD_SECRET_BASE, + EC_WORD_BLEND, + EC_WORD_POKEBLOCK, + EC_WORD_MASTER, + EC_WORD_RANK, + EC_WORD_RIBBON +}; +enum { + EC_WORD_KTHX_BYE = EC_GROUP_TRENDY_SAYING << 9, + EC_WORD_YES_SIR_EXCL, + EC_WORD_AVANT_GARDE, + EC_WORD_COUPLE, + EC_WORD_MUCH_OBLIGED, + EC_WORD_YEEHAW_EXCL, + EC_WORD_MEGA, + EC_WORD_1_HIT_KO_EXCL, + EC_WORD_DESTINY, + EC_WORD_CANCEL, + EC_WORD_NEW, + EC_WORD_FLATTEN, + EC_WORD_KIDDING, + EC_WORD_LOSER, + EC_WORD_LOSING, + EC_WORD_HAPPENING, + EC_WORD_HIP_AND, + EC_WORD_SHAKE, + EC_WORD_SHADY, + EC_WORD_UPBEAT, + EC_WORD_MODERN, + EC_WORD_SMELL_YA, + EC_WORD_BANG, + EC_WORD_KNOCKOUT, + EC_WORD_HASSLE, + EC_WORD_WINNER, + EC_WORD_FEVER, + EC_WORD_WANNABE, + EC_WORD_BABY, + EC_WORD_HEART, + EC_WORD_OLD, + EC_WORD_YOUNG, + EC_WORD_UGLY +}; + +#define EC_POKEMON(mon) ((EC_GROUP_POKEMON << 9) | SPECIES_##mon) +#define EC_POKEMON2(mon) ((EC_GROUP_POKEMON_2 << 9) | SPECIES_##mon) +#define EC_MOVE(move) ((EC_GROUP_MOVE_1 << 9) | MOVE_##move) +#define EC_MOVE2(move) ((EC_GROUP_MOVE_2 << 9) | MOVE_##move) + +#define EC_GROUP(word) ((word) >> 9) +#define EC_INDEX(word) ((word) & 0x1FF) + +extern u8 gUnknown_020388AC; u16 sub_80EB72C(u16 group); void sub_80EB6FC(u16 *, u16); @@ -33,7 +1073,7 @@ void InitEasyChatPhrases(void); u8 sub_80EAD7C(u8 group); u16 sub_80EAE88(u8); u8 sub_80EB37C(u16); -u8* sub_80EB3FC(u8 *, u16); +u8* EasyChat_GetWordText(u8 *, u16); u8 *ConvertEasyChatWordsToString(u8 *dst, u16 *words, u16, u16); u16 sub_80EB784(u16 group); u8 sub_80EB868(u8); diff --git a/include/event_data.h b/include/event_data.h index 98e4a6da3..ae048af4c 100644 --- a/include/event_data.h +++ b/include/event_data.h @@ -22,7 +22,7 @@ bool8 VarSet(u16 id, u16 value); u8 VarGetFieldObjectGraphicsId(u8 id); u8 *GetFlagPointer(u16 id); u8 FlagSet(u16 id); -u8 FlagReset(u16 id); +u8 FlagClear(u16 id); bool8 FlagGet(u16 id); extern u16 gSpecialVar_0x8000; diff --git a/include/evolution_graphics.h b/include/evolution_graphics.h new file mode 100644 index 000000000..a960f637b --- /dev/null +++ b/include/evolution_graphics.h @@ -0,0 +1,15 @@ +#ifndef GUARD_EVOLUTION_GRAPHICS_H +#define GUARD_EVOLUTION_GRAPHICS_H + +void LoadEvoSparkleSpriteAndPal(void); + +u8 LaunchTask_PreEvoSparklesSet1(u16 arg0); +u8 LaunchTask_PreEvoSparklesSet2(void); +u8 LaunchTask_PostEvoSparklesSet1(void); +u8 LaunchTask_PostEvoSparklesSet2AndFlash(u16 species); +u8 LaunchTask_PostEvoSparklesSet2AndFlash_Trade(u16 species); +u8 sub_8149E7C(u8 preEvoSpriteID, u8 postEvoSpriteID); + +#define EvoGraphicsTaskEvoStop data[8] + +#endif // GUARD_EVOLUTION_GRAPHICS_H diff --git a/include/evolution_scene.h b/include/evolution_scene.h new file mode 100644 index 000000000..48bd6ebe1 --- /dev/null +++ b/include/evolution_scene.h @@ -0,0 +1,10 @@ +#ifndef GUARD_EVOLUTION_SCENE_H +#define GUARD_EVOLUTION_SCENE_H + +void EvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo, u8 partyID); +void BeginEvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo, u8 partyID); +void TradeEvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, u8 preEvoSpriteID, u8 partyID); + +extern void (*gCB2_AfterEvolution)(void); + +#endif // GUARD_EVOLUTION_SCENE_H diff --git a/include/field_camera.h b/include/field_camera.h index 4ce207541..17126d190 100644 --- a/include/field_camera.h +++ b/include/field_camera.h @@ -11,7 +11,7 @@ struct CameraSomething s32 unk14; }; -extern struct Camera gUnknown_0202E844; +extern struct Camera gCamera; void move_tilemap_camera_to_upper_left_corner(void); void sub_8057A58(void); diff --git a/include/field_door.h b/include/field_door.h index 1759e0dc1..31fdd154b 100644 --- a/include/field_door.h +++ b/include/field_door.h @@ -20,6 +20,6 @@ void FieldSetDoorClosed(u32, u32); s8 FieldAnimateDoorClose(u32, u32); s8 FieldAnimateDoorOpen(u32, u32); bool8 FieldIsDoorAnimationRunning(void); -u32 sub_8058790(u32 x, u32 y); +u32 GetDoorSoundEffect(u32 x, u32 y); #endif diff --git a/include/field_effect.h b/include/field_effect.h index bf80ca0dc..a509697e4 100644 --- a/include/field_effect.h +++ b/include/field_effect.h @@ -130,6 +130,8 @@ void PokeballGlowEffect_5(struct Sprite *); void PokeballGlowEffect_6(struct Sprite *); void PokeballGlowEffect_7(struct Sprite *); +void sub_8086748(void); + bool8 sub_80867AC(struct Task *); bool8 sub_8086854(struct Task *); bool8 sub_8086870(struct Task *); @@ -138,6 +140,8 @@ bool8 sub_808699C(struct Task *); bool8 sub_80869B8(struct Task *); bool8 sub_80869F8(struct Task *); +void sub_8086A2C(u8, u8); + bool8 sub_8086AA0(struct Task *); bool8 sub_8086AC0(struct Task *); bool8 sub_8086B30(struct Task *); @@ -163,6 +167,8 @@ bool8 sub_8087124(struct Task *); bool8 dive_2_unknown(struct Task *); bool8 dive_3_unknown(struct Task *); +void sub_80871B8(u8); + bool8 sub_808722C(struct Task *, struct MapObject *, struct Sprite *); bool8 sub_8087264(struct Task *, struct MapObject *, struct Sprite *); bool8 sub_8087298(struct Task *, struct MapObject *, struct Sprite *); @@ -175,6 +181,8 @@ bool8 sub_80874FC(struct Task *, struct MapObject *, struct Sprite *); bool8 sub_8087548(struct Task *, struct MapObject *, struct Sprite *); bool8 sub_808759C(struct Task *, struct MapObject *, struct Sprite *); +void sub_8087654(u8); + bool8 sub_80876C8(struct Task *, struct MapObject *, struct Sprite *); bool8 sub_80876F8(struct Task *, struct MapObject *, struct Sprite *); bool8 sub_8087774(struct Task *, struct MapObject *, struct Sprite *); @@ -236,7 +244,7 @@ void sub_808948C(struct Task *); void sub_80894C4(struct Task *); void fishE(struct Task *); -u8 CreateTrainerSprite_BirchSpeech(u8 gender, s16 x, s16 y, u8 subpriority, u8 *buffer); +u8 CreateTrainerSprite(u8 trainerSpriteID, s16 x, s16 y, u8 subpriority, u8 *buffer); void LoadTrainerGfx_TrainerCard(u8 gender, u16 palOffset, u8 *dest); u8 CreateBirchSprite(s16 x, s16 y, u8 subpriority); u8 CreateMonSprite_PicBox(u16, s16, s16, u8); @@ -245,6 +253,6 @@ void MultiplyInvertedPaletteRGBComponents(u16, u8, u8, u8); void sub_80878A8(void); void sub_8087BA8(void); -extern u32 gUnknown_0202FF84[8]; +extern u32 gFieldEffectArguments[8]; #endif // GUARD_FIELD_EFFECT_H diff --git a/include/field_effect_helpers.h b/include/field_effect_helpers.h index a1dd53a2b..7bba24fa6 100644 --- a/include/field_effect_helpers.h +++ b/include/field_effect_helpers.h @@ -1,6 +1,8 @@ #ifndef GUARD_FIELD_EFFECT_HELPERS_H #define GUARD_FIELD_EFFECT_HELPERS_H +extern const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[]; + void sub_812869C(struct MapObject *); bool8 sub_81286C4(struct MapObject *); void oamc_shadow(struct Sprite *); @@ -26,6 +28,9 @@ void sub_8126BC4(u8 unk_1B, u8 r6, s16 x, s16 y); void sub_8127ED0(u8, u8); void sub_8127F28(u8, u8, s16); u8 sub_8128124(u8 id); -void ash(s16, s16, u16, u8); +void ash(s16, s16, u16, s16); +void SetUpReflection(struct MapObject *mapObj, struct Sprite *sprite, u8 a); +u32 oe_exec_and_other_stuff(u8 fieldEffectId, struct MapObject *mapObject); +u8 sub_8126FF0(u8, u8, u8, s16, s16); #endif // GUARD_FIELD_EFFECT_HELPERS_H diff --git a/include/field_fadetransition.h b/include/field_fadetransition.h index 764adfc9a..111dc92a6 100644 --- a/include/field_fadetransition.h +++ b/include/field_fadetransition.h @@ -16,7 +16,7 @@ void sub_8080B60(void); void atk17_seteffectuser(void); void sub_8080E28(void); void sub_8080E44(void); -int sub_8080E70(void); +bool32 sub_8080E70(void); void sub_8080E88(void); void sub_8080E88(); void sp13E_warp_to_last_warp(void); diff --git a/include/field_map_obj.h b/include/field_map_obj.h index d2a1a9b1f..641a28ed3 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -3,6 +3,8 @@ #include "sprite.h" +extern const u8 gUnknown_0830FD14[]; + #define fieldmap_object_cb(setup, callback, table) \ static u8 callback(struct MapObject *, struct Sprite *);\ void setup(struct Sprite *sprite)\ @@ -54,17 +56,15 @@ u8 sub_805CCAC(s16 a0, s16 a1, s16 a2, s16 a3); u8 sub_805CCE8(s16 a0, s16 a1, s16 a2, s16 a3); u8 sub_805CD24(s16 a0, s16 a1, s16 a2, s16 a3); -u8 sub_805F3EC(struct MapObject *, struct Sprite *, u8, bool8 (*const)(u8)); -u8 sub_805F3F0(struct MapObject *, struct Sprite *, u8, bool8 (*const)(u8)); -u8 sub_805F438(struct MapObject *, struct Sprite *, u8, bool8 (*const)(u8)); -u8 sub_805F4F0(struct MapObject *, struct Sprite *, u8, bool8 (*const)(u8)); -u8 sub_805F5A8(struct MapObject *, struct Sprite *, u8, bool8 (*const)(u8)); -u8 sub_805F660(struct MapObject *, struct Sprite *, u8, bool8 (*const)(u8)); -u8 cph_IM_DIFFERENT(struct MapObject *, struct Sprite *, u8, bool8 (*const)(u8)); -u8 sub_805F760(struct MapObject *, struct Sprite *, u8, bool8 (*const)(u8)); -u8 oac_hopping(struct MapObject *, struct Sprite *, u8, bool8 (*const)(u8)); -u8 sub_805F3EC(struct MapObject *, struct Sprite *, u8, bool8 (*const)(u8)); -u8 sub_805F3EC(struct MapObject *, struct Sprite *, u8, bool8 (*const)(u8)); +u8 sub_805F3EC(struct MapObject *, struct Sprite *, u8, bool8(u8)); +u8 sub_805F3F0(struct MapObject *, struct Sprite *, u8, bool8(u8)); +u8 sub_805F438(struct MapObject *, struct Sprite *, u8, bool8(u8)); +u8 sub_805F4F0(struct MapObject *, struct Sprite *, u8, bool8(u8)); +u8 sub_805F5A8(struct MapObject *, struct Sprite *, u8, bool8(u8)); +u8 sub_805F660(struct MapObject *, struct Sprite *, u8, bool8(u8)); +u8 cph_IM_DIFFERENT(struct MapObject *, struct Sprite *, u8, bool8(u8)); +u8 sub_805F760(struct MapObject *, struct Sprite *, u8, bool8(u8)); +u8 oac_hopping(struct MapObject *, struct Sprite *, u8, bool8(u8)); extern struct CameraSomething gUnknown_03004880; extern u16 gUnknown_03004898; @@ -318,7 +318,7 @@ u8 get_go_fast_image_anim_num(u8); u8 get_go_faster_image_anim_num(u8); u8 sub_805FD78(u8); -int state_to_direction(u8, u8, u8); +u32 state_to_direction(u8, u32, u32); void sub_805AA98(); void sub_805AAB0(void); @@ -379,14 +379,14 @@ u8 sub_805FDF8(u8); u8 sub_805FE08(u8); void npc_set_running_behaviour_etc(struct MapObject *, u8); u8 npc_running_behaviour_by_direction(u8); -u8 npc_block_way(struct MapObject *, s16, s16, u8); +u8 npc_block_way(struct MapObject *, s16, s16, u32); u8 sub_8060024(struct MapObject *, s16, s16, u8); u8 sub_8060234(u8, u8, u8); void sub_8060288(u8, u8, u8); void sub_8060388(s16, s16, s16 *, s16 *); void sub_80603CC(s16 x, s16 y, s16 *pInt, s16 *pInt1); void GetFieldObjectMovingCameraOffset(s16 *, s16 *); -void FieldObjectMoveDestCoords(struct MapObject *pObject, u8 unk_19, s16 *pInt, s16 *pInt1); +void FieldObjectMoveDestCoords(struct MapObject *pObject, u32 unk_19, s16 *pInt, s16 *pInt1); bool8 FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive(struct MapObject *); bool8 FieldObjectIsSpecialAnimActive(struct MapObject *); bool8 FieldObjectSetSpecialAnim(struct MapObject *, u8); @@ -396,21 +396,23 @@ void FieldObjectClearAnim(struct MapObject *); bool8 FieldObjectCheckIfSpecialAnimFinishedOrInactive(struct MapObject *); u8 FieldObjectClearAnimIfSpecialAnimFinished(struct MapObject *); u8 FieldObjectGetSpecialAnim(struct MapObject *); -u8 GetFaceDirectionAnimId(u8); -u8 GetSimpleGoAnimId(u8); -u8 GetGoSpeed0AnimId(u8 a); -u8 sub_8060744(u8 a); -u8 d2s_08064034(u8 a); -u8 sub_806079C(u8 a); -u8 sub_80607F4(u8 a); -u8 GetJumpLedgeAnimId(u8 a); -u8 sub_806084C(u8); -u8 sub_8060878(u8); -u8 sub_80608D0(u8); -u8 GetStepInPlaceDelay32AnimId(u8 a); -u8 GetStepInPlaceDelay16AnimId(u8); -u8 GetStepInPlaceDelay8AnimId(u8 a); -u8 GetStepInPlaceDelay4AnimId(u8 a); +u8 GetFaceDirectionAnimId(u32); +u8 GetSimpleGoAnimId(u32); +u8 GetGoSpeed0AnimId(u32); +u8 sub_8060744(u32); +u8 d2s_08064034(u32); +u8 sub_806079C(u32); +u8 sub_80607C8(u32); +u8 sub_80607F4(u32); +u8 GetJumpLedgeAnimId(u32); +u8 sub_806084C(u32); +u8 sub_8060878(u32); +u8 sub_80608A4(u32); +u8 sub_80608D0(u32); +u8 GetStepInPlaceDelay32AnimId(u32); +u8 GetStepInPlaceDelay16AnimId(u32); +u8 GetStepInPlaceDelay8AnimId(u32); +u8 GetStepInPlaceDelay4AnimId(u32); u8 FieldObjectFaceOppositeDirection(struct MapObject *, u8); u8 sub_80609D8(u8); u8 sub_8060A04(u8); @@ -427,5 +429,9 @@ void sub_80634D0(struct MapObject *, struct Sprite *); u8 SpawnSpecialFieldObjectParametrized(u8, u8, u8, s16, s16, u8); void CameraObjectSetFollowedObjectId(u8); u8 sub_805ADDC(u8); +void sub_8060320(u32, s16 *, s16 *, s16, s16); +u8 obj_unfreeze(struct Sprite *, s16, s16, u8); +u16 npc_paltag_by_palslot(u8); +void sub_8060470(s16 *, s16 *, s16, s16); #endif // GUARD_FIELD_MAP_OBJ_H diff --git a/include/field_map_obj_helpers.h b/include/field_map_obj_helpers.h index fd29a9a7f..f760bf153 100644 --- a/include/field_map_obj_helpers.h +++ b/include/field_map_obj_helpers.h @@ -18,4 +18,6 @@ void DoShadowFieldEffect(struct MapObject *mapObject); u8 sub_8064704(struct Sprite *); u8 sub_806478C(struct Sprite *); void obj_anim_image_set_and_seek(struct Sprite *sprite, u8 a2, u8 a3); +void DoRippleFieldEffect(struct MapObject *mapObj, struct Sprite *sprite); + #endif diff --git a/include/field_poison.h b/include/field_poison.h index 8e8e2746f..df0b31434 100644 --- a/include/field_poison.h +++ b/include/field_poison.h @@ -1,6 +1,6 @@ #ifndef GUARD_FIELD_POISON_H #define GUARD_FIELD_POISON_H -s32 overworld_poison(void); +s32 DoPoisonFieldEffect(void); #endif // GUARD_FIELD_POISON_H diff --git a/include/field_special_scene.h b/include/field_special_scene.h index ef3f07120..d674f09df 100644 --- a/include/field_special_scene.h +++ b/include/field_special_scene.h @@ -9,5 +9,6 @@ void Task_Truck3(u8 taskId); void Task_HandleTruckSequence(u8 taskId); void ExecuteTruckSequence(void); void EndTruckSequence(u8); +void sub_80C791C(void); #endif // GUARD_FIELD_SPECIAL_SCENE_H diff --git a/include/gba/m4a_internal.h b/include/gba/m4a_internal.h index 572b77711..ff92fcc40 100644 --- a/include/gba/m4a_internal.h +++ b/include/gba/m4a_internal.h @@ -404,10 +404,6 @@ void SampleFreqSet(u32 freq); void m4aSoundVSyncOn(void); void m4aSoundVSyncOff(void); -void m4aMPlayTempoControl(struct MusicPlayerInfo *mplayInfo, u16 tempo); -void m4aMPlayVolumeControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u16 volume); -void m4aMPlayPitchControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u16 pitch); -void m4aMPlayPanpotControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, s8 pan); void ClearModM(struct MusicPlayerTrack *track); void m4aMPlayModDepthSet(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u8 modDepth); void m4aMPlayLFOSpeedSet(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u8 lfoSpeed); diff --git a/include/gba/macro.h b/include/gba/macro.h index 230fb4383..1e0254806 100644 --- a/include/gba/macro.h +++ b/include/gba/macro.h @@ -84,4 +84,38 @@ dmaRegs[5]; \ } +#define DmaCopyLarge(dmaNum, src, dest, size, block, bit) \ +{ \ + const void *_src = src; \ + void *_dest = dest; \ + u32 _size = size; \ + while (1) \ + { \ + DmaCopy##bit(dmaNum, _src, _dest, (block)); \ + _src += (block); \ + _dest += (block); \ + _size -= (block); \ + if (_size <= (block)) \ + { \ + DmaCopy##bit(dmaNum, _src, _dest, _size); \ + break; \ + } \ + } \ +} + +#define DmaCopyLarge16(dmaNum, src, dest, size, block) DmaCopyLarge(dmaNum, src, dest, size, block, 16) + +#define DmaCopyLarge32(dmaNum, src, dest, size, block) DmaCopyLarge(dmaNum, src, dest, size, block, 32) + +#define DmaCopyDefvars(dmaNum, src, dest, size, bit) \ +{ \ + const void *_src = src; \ + void *_dest = dest; \ + u32 _size = size; \ + DmaCopy##bit(dmaNum, _src, _dest, _size); \ +} + +#define DmaCopy16Defvars(dmaNum, src, dest, size) DmaCopyDefvars(dmaNum, src, dest, size, 16) +#define DmaCopy32Defvars(dmaNum, src, dest, size) DmaCopyDefvars(dmaNum, src, dest, size, 32) + #endif // GUARD_GBA_MACRO_H diff --git a/include/gba/types.h b/include/gba/types.h index 96e057ab7..480619d21 100644 --- a/include/gba/types.h +++ b/include/gba/types.h @@ -39,11 +39,11 @@ struct PlttData struct OamData { /*0x00*/ u32 y:8; - /*0x01*/ u32 affineMode:2; - u32 objMode:2; - u32 mosaic:1; - u32 bpp:1; - u32 shape:2; + /*0x01*/ u32 affineMode:2; // 0x1, 0x2 = 0x3 + u32 objMode:2; // 0x4, 0x8 = 0xC + u32 mosaic:1; // 0x10 + u32 bpp:1; // 0x20 + u32 shape:2; // 0x40, 0x80 /*0x02*/ u32 x:9; u32 matrixNum:5; // bits 3/4 are h-flip/v-flip if not in affine mode diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 4029132e8..5c93eb8ab 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -14,16 +14,16 @@ enum // map types enum { - MAP_TYPE_0, - MAP_TYPE_TOWN, - MAP_TYPE_CITY, - MAP_TYPE_ROUTE, - MAP_TYPE_UNDERGROUND, - MAP_TYPE_UNDERWATER, - MAP_TYPE_6, - MAP_TYPE_7, - MAP_TYPE_INDOOR, - MAP_TYPE_SECRET_BASE + MAP_TYPE_0, // 0 + MAP_TYPE_TOWN, // 1 + MAP_TYPE_CITY, // 2 + MAP_TYPE_ROUTE, // 3 + MAP_TYPE_UNDERGROUND, // 4 + MAP_TYPE_UNDERWATER, // 5 + MAP_TYPE_6, // 6 + MAP_TYPE_7, // 7 + MAP_TYPE_INDOOR, // 8 + MAP_TYPE_SECRET_BASE // 9 }; // map battle scenes diff --git a/include/global.h b/include/global.h index 73f73093d..f0eb7401f 100644 --- a/include/global.h +++ b/include/global.h @@ -37,6 +37,7 @@ fndec\ #define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0])) +#define POKEMON_SLOTS_NUMBER 412 #define POKEMON_NAME_LENGTH 10 #define OT_NAME_LENGTH 7 @@ -447,43 +448,69 @@ struct MailStruct /*0x20*/ u16 itemId; }; -struct UnkMauvilleOldManStruct + +// Mauville Pokemon Center men + +struct MauvilleManCommon { - u8 unk_2D94; - u8 unk_2D95; - /*0x2D96*/ u16 mauvilleOldMan_ecArray[6]; - /*0x2DA2*/ u16 mauvilleOldMan_ecArray2[6]; - /*0x2DAE*/ u8 playerName[8]; - /*0x2DB6*/ u8 filler_2DB6[0x3]; - /*0x2DB9*/ u8 playerTrainerId[4]; - u8 unk_2DBD; -}; /*size = 0x2C*/ + u8 id; +}; -struct UnkMauvilleOldManStruct2 +struct MauvilleManBard { - u8 filler0; - u8 unk1; - u8 unk2; - u16 mauvilleOldMan_ecArray[10]; - u8 mauvilleOldMan_ecArray2[12]; - u8 fillerF[0x2]; + /*0x00*/ u8 id; + /*0x02*/ u16 songLyrics[6]; + /*0x0E*/ u16 temporaryLyrics[6]; + /*0x1A*/ u8 playerName[8]; + /*0x22*/ u8 filler_2DB6[0x3]; + /*0x25*/ u8 playerTrainerId[4]; + /*0x29*/ bool8 hasChangedSong; }; /*size = 0x2C*/ -struct MauvilleOldManTrader +struct MauvilleManHipster { - u8 unk0; + u8 id; + bool8 alreadySpoken; +}; + +struct MauvilleManTrader +{ + u8 id; u8 unk1[4]; u8 unk5[4][11]; - u8 unk31; + bool8 alreadyTraded; }; -typedef union OldMan +struct MauvilleManStoryteller { - struct UnkMauvilleOldManStruct oldMan1; - struct UnkMauvilleOldManStruct2 oldMan2; - struct MauvilleOldManTrader trader; - u8 filler[0x40]; -} OldMan; + u8 id; + bool8 alreadyRecorded; + u8 filler2[2]; + u8 gameStatIDs[4]; + u8 trainerNames[4][7]; + u8 statValues[4][4]; +}; + +struct MauvilleManGiddy +{ + /*0x00*/ u8 id; + /*0x01*/ u8 taleCounter; + /*0x02*/ u8 questionNum; + /*0x04*/ u16 randomWords[10]; + /*0x18*/ u8 questionList[12]; +}; /*size = 0x2C*/ + + +union MauvilleMan +{ + struct MauvilleManCommon common; + struct MauvilleManBard bard; + struct MauvilleManHipster hipster; + struct MauvilleManTrader trader; + struct MauvilleManStoryteller storyteller; + struct MauvilleManGiddy giddy; + u8 filler[0x40]; // needed to pad out the struct +}; struct Unk_SB_Access_Struct1 { @@ -534,18 +561,34 @@ struct GabbyAndTyData /*2b1b*/ u8 valB_5:3; }; -struct RecordMixing_UnknownStructSub +struct DayCareMail { - u32 unk0; - u8 data[0x34]; - //u8 data[0x38]; + /*0x00*/ struct MailStruct message; + /*0x24*/ u8 names[19]; }; -struct RecordMixing_UnknownStruct +struct DayCareStepCountersEtc { + u32 steps[2]; + u16 personalityLo; + u8 unk_11a; +}; + +struct RecordMixingDayCareMail { - struct RecordMixing_UnknownStructSub data[2]; + struct DayCareMail mail[2]; u32 unk70; - u16 unk74[0x2]; + u16 unk74[2]; +}; + +struct DayCareMisc +{ + struct DayCareMail mail[2]; + struct DayCareStepCountersEtc countersEtc; +}; + +struct DayCareData { + struct BoxPokemon mons[2]; + struct DayCareMisc misc; }; struct LinkBattleRecord @@ -557,18 +600,37 @@ struct LinkBattleRecord u16 draws; }; +struct RecordMixingGiftData +{ + u8 unk0; + u8 quantity; + u16 itemId; + u8 filler4[8]; +}; + +struct RecordMixingGift +{ + int checksum; + struct RecordMixingGiftData data; +}; + +// there should be enough flags for all 412 slots +// each slot takes up 8 flags +// if the value is not divisible by 8, we need to account for the reminder as well +#define DEX_FLAGS_NO ((POKEMON_SLOTS_NUMBER / 8) + ((POKEMON_SLOTS_NUMBER % 8) ? 1 : 0)) + struct SaveBlock1 /* 0x02025734 */ { /*0x00*/ struct Coords16 pos; /*0x04*/ struct WarpData location; /*0x0C*/ struct WarpData warp1; /*0x14*/ struct WarpData warp2; - /*0x1C*/ struct WarpData warp3; + /*0x1C*/ struct WarpData lastHealLocation; /*0x24*/ struct WarpData warp4; - /*0x2C*/ u16 battleMusic; + /*0x2C*/ u16 savedMusic; /*0x2E*/ u8 weather; /*0x2F*/ u8 filler_2F; - /*0x30*/ u8 flashUsed; + /*0x30*/ u8 flashLevel; // flash level on current map, 0 being normal and 4 being the darkest /*0x32*/ u16 mapDataId; /*0x34*/ u16 mapView[0x100]; /*0x234*/ u8 playerPartyCount; @@ -583,7 +645,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x640*/ struct ItemSlot bagPocket_TMHM[64]; /*0x740*/ struct ItemSlot bagPocket_Berries[46]; /*0x7F8*/ struct Pokeblock pokeblocks[40]; - /*0x938*/ u8 unk938[52]; // pokedex related + /*0x938*/ u8 dexSeen2[DEX_FLAGS_NO]; /*0x96C*/ u16 berryBlenderRecords[3]; /*0x972*/ u8 filler_972[0x6]; /*0x978*/ u16 trainerRematchStepCounter; @@ -626,24 +688,20 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2B4C*/ struct MailStruct mail[16]; /*0x2D8C*/ u8 unk2D8C[4]; /*0x2D90*/ u8 filler_2D90[0x4]; - /*0x2D94*/ OldMan oldMan; + /*0x2D94*/ union MauvilleMan mauvilleMan; /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff /*0x2DFC*/ u8 filler_2DFC[0x8]; /*0x2E04*/ SB_Struct sbStruct; - /*0x2F9C*/ struct BoxPokemon daycareData[2]; - /*0x303C*/ struct RecordMixing_UnknownStruct filler_303C; - /*0x30AC*/ u8 filler_30B4[0x2]; - /*0x30B6*/ u8 filler_30B6; - /*0x30B7*/ u8 filler_30B7[1]; + /*0x2F9C*/ struct DayCareData daycareData; /*0x30B8*/ struct LinkBattleRecord linkBattleRecords[5]; /*0x3108*/ u8 filler_3108[8]; - /*0x3110*/ u8 giftRibbons[7]; - /*0x3117*/ u8 filler_311B[0x2D]; + /*0x3110*/ u8 giftRibbons[11]; + /*0x3117*/ u8 filler_311B[0x29]; /*0x3144*/ struct Roamer roamer; /*0x3160*/ struct EnigmaBerry enigmaBerry; /*0x3690*/ struct RamScript ramScript; - /*0x3A7C*/ u8 filler_3A7C[0x10]; - /*0x3A8C*/ u8 unk3A8C[52]; //pokedex related + /*0x3A7C*/ struct RecordMixingGift recordMixingGift; + /*0x3A8C*/ u8 dexSeen3[DEX_FLAGS_NO]; }; extern struct SaveBlock1 gSaveBlock1; @@ -665,8 +723,8 @@ struct Pokedex /*0x04*/ u32 unownPersonality; // set when you first see Unown /*0x08*/ u32 spindaPersonality; // set when you first see Spinda /*0x0C*/ u32 unknown3; - /*0x10*/ u8 owned[52]; - /*0x44*/ u8 seen[52]; + /*0x10*/ u8 owned[DEX_FLAGS_NO]; + /*0x44*/ u8 seen[DEX_FLAGS_NO]; }; struct SaveBlock2_Sub @@ -674,7 +732,8 @@ struct SaveBlock2_Sub /*0x0000, 0x00A8*/ u8 filler_000[0x3D8]; /*0x03D8, 0x0480*/ u16 var_480; /*0x03DA, 0x0482*/ u16 var_482; - /*0x03DC, 0x0484*/ u8 filler_3DC[0xD0]; + /*0x03DC, 0x0484*/ u8 filler_3DC[0x14]; + /*0x03F0, 0x0498*/ u8 ereaderTrainer[0xBC]; /*0x04AC, 0x0554*/ u8 var_4AC; /*0x04AD, 0x0555*/ u8 var_4AD; /*0x04AE, 0x0556*/ u8 var_4AE[2]; diff --git a/include/graphics.h b/include/graphics.h index 5632cb831..f3a722b40 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -2564,4 +2564,13 @@ extern const u8 gUnknown_08E8CFC0[]; extern const u8 gUnknown_08E8D4C0[]; extern const u8 gUnknown_08E8D9C0[]; +extern const u8 gUnknown_08EA1DEC[]; +extern const u16 gUnknown_08EA0328[]; +extern const u16 gUnknown_08EA02C8[]; +extern const u16 gUnknown_08EA0348[]; +extern const u16 gUnknown_08EA15C8[]; +extern const u16 gTradeMonBoxTilemap[]; +extern const u8 gUnknown_08D00000[]; +extern const u16 gUnknown_08D00524[]; +extern const u8 gUnknown_08D004E0[]; #endif // GUARD_GRAPHICS_H diff --git a/include/intro_credits_graphics.h b/include/intro_credits_graphics.h index 5abb2381b..2718d2f9f 100644 --- a/include/intro_credits_graphics.h +++ b/include/intro_credits_graphics.h @@ -10,15 +10,16 @@ extern const struct SpritePalette gIntro2SpritePalettes[]; extern const struct CompressedSpriteSheet gUnknown_08416E24; extern const struct CompressedSpriteSheet gUnknown_08416E34; -void load_intro_part2_graphics(/*TODO: arg types*/); -void sub_8148C78(/*TODO: arg types*/); +void load_intro_part2_graphics(u8 a); +void sub_8148C78(u8 a); void sub_8148CB0(u8); void sub_8148E90(u8); -u8 sub_8148EC0(/*TODO: arg types*/); -void sub_8149020(/*TODO: arg types*/); -u8 intro_create_brendan_sprite(/*TODO: arg types*/); -u8 intro_create_may_sprite(/*TODO: arg types*/); -u8 intro_create_latios_sprite(/*TODO: arg types*/); -u8 intro_create_latias_sprite(/*TODO: arg types*/); +u8 sub_8148EC0(u8 a, u16 b, u16 c, u16 d); +void sub_8148F3C(u8); +void sub_8149020(u8); +u8 intro_create_brendan_sprite(s16 a, s16 b); +u8 intro_create_may_sprite(s16 a, s16 b); +u8 intro_create_latios_sprite(s16 a, s16 b); +u8 intro_create_latias_sprite(s16 a, s16 b); #endif // GUARD_INTRO_CREDITS_GRAPHICS_H diff --git a/include/item_menu.h b/include/item_menu.h index 6950ed0ff..29618f347 100644 --- a/include/item_menu.h +++ b/include/item_menu.h @@ -3,6 +3,17 @@ #include "string_util.h" +struct PocketScrollState +{ + u8 cursorPos; + u8 scrollTop; + u8 numSlots; + u8 cursorMax; +}; + +extern struct PocketScrollState gBagPocketScrollStates[]; +extern struct ItemSlot *gCurrentBagPocketItemSlots; + void ResetBagScrollPositions(void); void ClearBag(void); void sub_80A3E0C(void); diff --git a/include/item_use.h b/include/item_use.h index 1558f7691..227c0c9ee 100644 --- a/include/item_use.h +++ b/include/item_use.h @@ -38,7 +38,7 @@ void sub_80C9FC0(u8); void ItemUseOutOfBattle_Repel(u8); void ItemUseOutOfBattle_BlackWhiteFlute(u8); void task08_080A1C44(u8); -u8 sub_80CA1C8(void); +u8 CanUseEscapeRopeOnCurrMap(void); void ItemUseOutOfBattle_EscapeRope(u8); void ItemUseOutOfBattle_EvolutionStone(u8); void ItemUseInBattle_PokeBall(u8); @@ -49,5 +49,6 @@ void ItemUseInBattle_Escape(u8); void ItemUseOutOfBattle_EnigmaBerry(u8); void ItemUseInBattle_EnigmaBerry(u8); void ItemUseOutOfBattle_CannotUse(u8); +u8 CheckIfItemIsTMHMOrEvolutionStone(u16 itemId); #endif // GUARD_ITEM_USE_H diff --git a/include/m4a.h b/include/m4a.h index b6c8f9072..7d016c98b 100644 --- a/include/m4a.h +++ b/include/m4a.h @@ -16,4 +16,9 @@ void m4aMPlayFadeOutTemporarily(struct MusicPlayerInfo *mplayInfo, u16 speed); void m4aMPlayFadeIn(struct MusicPlayerInfo *mplayInfo, u16 speed); void m4aMPlayImmInit(struct MusicPlayerInfo *mplayInfo); +void m4aMPlayTempoControl(struct MusicPlayerInfo *mplayInfo, u16 tempo); +void m4aMPlayVolumeControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u16 volume); +void m4aMPlayPitchControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, s16 pitch); +void m4aMPlayPanpotControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, s8 pan); + #endif //GUARD_M4A_H diff --git a/include/mail_data.h b/include/mail_data.h index df4b385a1..2659c0d37 100644 --- a/include/mail_data.h +++ b/include/mail_data.h @@ -11,6 +11,6 @@ u8 GiveMailToMon2(struct Pokemon *, struct MailStruct *); void TakeMailFromMon(struct Pokemon *); u8 TakeMailFromMon2(struct Pokemon *); bool8 ItemIsMail(u16); -bool8 ItemIsMail(u16); +bool8 MonHasMail(struct Pokemon *); #endif // GUARD_MAIL_DATA_H diff --git a/include/map_obj_lock.h b/include/map_obj_lock.h index f7352be22..9fb57743e 100644 --- a/include/map_obj_lock.h +++ b/include/map_obj_lock.h @@ -7,7 +7,7 @@ bool8 sub_8064CFC(void); void ScriptFreezeMapObjects(void); void sub_8064D38(u8 taskId); bool8 sub_8064DB4(void); -void sub_8064DD8(void); +void LockSelectedMapObject(void); void sub_8064E2C(void); void unref_sub_8064E5C(void); void sub_8064EAC(void); diff --git a/include/mauville_man.h b/include/mauville_man.h new file mode 100644 index 000000000..2b8f139f2 --- /dev/null +++ b/include/mauville_man.h @@ -0,0 +1,18 @@ +#ifndef GUARD_MAUVILLE_OLD_MAN_H +#define GUARD_MAUVILLE_OLD_MAN_H + +// IDs +enum +{ + MAUVILLE_MAN_BARD, + MAUVILLE_MAN_HIPSTER, + MAUVILLE_MAN_TRADER, + MAUVILLE_MAN_STORYTELLER, + MAUVILLE_MAN_GIDDY, +}; + +void SetupMauvilleOldMan(void); +void sub_80F7F30(void); +void sub_80F83D0(void); + +#endif // GUARD_MAUVILLE_OLD_MAN_H diff --git a/include/mauville_old_man.h b/include/mauville_old_man.h deleted file mode 100644 index 473fcf5c8..000000000 --- a/include/mauville_old_man.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef GUARD_MAUVILLE_OLD_MAN_H -#define GUARD_MAUVILLE_OLD_MAN_H - -void SetMauvilleOldMan(void); -void sub_80F7DC0(void); -void sub_80F7F30(void); -void sub_80F7F80(u8); -void sub_80F83D0(void); -void sub_80F83F8(void); - -#endif // GUARD_MAUVILLE_OLD_MAN_H diff --git a/include/menu.h b/include/menu.h index e1bb4f1e4..3cf47b9b8 100644 --- a/include/menu.h +++ b/include/menu.h @@ -43,7 +43,7 @@ u16 unref_sub_8071F98(u8, u8); void unref_sub_8071FBC(u16, u8, u8, u8, u8); void MenuDisplayMessageBox(void); void MenuPrintMessage(const u8 *, u8, u8); -void sub_8072044(const u8 *); +void MenuPrintMessageDefaultCoords(const u8 *); void MenuSetText(const u8 *); u8 MenuUpdateWindowText(void); u8 unref_sub_8072098(void); @@ -59,7 +59,7 @@ void sub_807274C(u8, u8, u8, u8, const struct MenuAction[], u8, u32); s8 sub_80727CC(void); u8 sub_807288C(u8); void PrintMenuItems(u8, u8, u8, const struct MenuAction[]); -void PrintMenuItemsReordered(u8, u8, u8, const struct MenuAction[], const u8*); +void PrintMenuItemsReordered(u8 left, u8 top, u8 menuItemCount, const struct MenuAction2 menuItems[], const u8 *order); void InitYesNoMenu(u8, u8, u8); void DisplayYesNoMenu(u8, u8, u32); s8 ProcessMenuInputNoWrap_(void); diff --git a/include/menu_cursor.h b/include/menu_cursor.h index ca82ef244..6d31cc29f 100644 --- a/include/menu_cursor.h +++ b/include/menu_cursor.h @@ -21,4 +21,8 @@ void sub_814AD7C(u8 a1, u8 a2); void sub_814ADC8(void); void sub_814ADF4(u8 a1); +#if GERMAN +extern const u32 gUnknown_0842F798[2]; +#endif + #endif // GUARD_MENU_CURSOR_H diff --git a/include/money.h b/include/money.h index 49015ee19..5a0acd482 100644 --- a/include/money.h +++ b/include/money.h @@ -2,15 +2,15 @@ #define GUARD_MONEY_H bool8 IsEnoughMoney(u32, u32); -void sub_80B79B8(u32 *, u32); -void sub_80B79E0(u32 *, u32); -void sub_80B79F8(u8 *buffer, u32 arg1, u8 arg2); -void sub_80B7A94(u32 arg0, u8 arg1, u8 x, u8 y); +void AddMoney(u32 *, u32); +void RemoveMoney(u32 *, u32); +void GetMoneyAmountText(u8 *buffer, u32 arg1, u8 arg2); +void PrintMoneyAmount(u32 arg0, u8 arg1, u8 x, u8 y); void sub_80B7AEC(u32, u8 left, u8 top); -void sub_80B7B34(void); -void sub_80B7BEC(u32, u8, u8); -void sub_80B7C14(u32, u8, u8); -void RemoveMoneyLabelObject(u8, u8); +void sub_80B7B34(u8, u8, int); +void UpdateMoneyWindow(u32, u8, u8); +void OpenMoneyWindow(u32, u8, u8); +void CloseMoneyWindow(u8, u8); bool8 sub_80B7CE8(void); void sub_80B7D0C(void); diff --git a/include/mystery_event_script.h b/include/mystery_event_script.h index 766303588..ab23a8d00 100644 --- a/include/mystery_event_script.h +++ b/include/mystery_event_script.h @@ -1,8 +1,8 @@ #ifndef GUARD_MYSTERY_EVENT_SCRIPT_H #define GUARD_MYSTERY_EVENT_SCRIPT_H -u32 sub_812613C(u8 *); -void sub_8126160(u32 val); -u16 sub_8126338(void); +u32 RunMysteryEventScript(u8 *); +void SetMysteryEventScriptStatus(u32 val); +u16 GetRecordMixingGift(void); #endif // GUARD_MYSTERY_EVENT_SCRIPT_H diff --git a/include/rom4.h b/include/overworld.h index fabd25302..0954f1b63 100644 --- a/include/rom4.h +++ b/include/overworld.h @@ -22,42 +22,42 @@ struct UCoords32 u32 x, y; }; -extern struct UCoords32 gUnknown_0821664C[]; +extern const struct UCoords32 gUnknown_0821664C[]; extern void (*gFieldCallback)(void); // sub_8052F5C -void flag_var_implications_of_teleport_(void); -void new_game(void); -void sub_8053014(void); -void sub_8053050(void); +void Overworld_ResetStateAfterFly(void); +void Overworld_ResetStateAfterTeleport(void); +void Overworld_ResetStateAfterDigEscRope(void); +void Overworld_ResetStateAfterWhiteOut(void); // sub_805308C void ResetGameStats(void); void IncrementGameStat(u8 index); u32 GetGameStat(u8 index); void SetGameStat(u8, u32); -// sub_8053154 -// sub_8053198 -void update_saveblock1_field_object_coords(u8, s16, s16); -void update_saveblock1_field_object_movement_behavior(u8, u8); +// LoadMapObjTemplatesFromHeader +// LoadSaveblockMapObjScripts +void Overworld_SetMapObjTemplateCoords(u8, s16, s16); +void Overworld_SetMapObjTemplateMovementType(u8, u8); // mapdata_load_assets_to_gpu_and_full_redraw // get_mapdata_header -// warp_shift -// warp_set +// ApplyCurrentWarp +// SetWarpData // warp_data_is_not_neg_1 -struct MapHeader * const get_mapheader_by_bank_and_number(u16 mapGroup, u16 mapNum); +struct MapHeader * const Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum); struct MapHeader * const warp1_get_mapheader(void); // set_current_map_header_from_sav1_save_old_name -// sub_805338C +// LoadSaveblockMapHeader // sub_80533CC void warp_in(void); -void warp1_set(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); +void Overworld_SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); void warp1_set_2(s8 mapGroup, s8 mapNum, s8 warpId); void saved_warp2_set(int unused, s8 mapGroup, s8 mapNum, s8 warpId); void saved_warp2_set_2(int unused, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); void copy_saved_warp2_bank_and_enter_x_to_warp1(u8 unused); void sub_8053538(u8); -void sub_8053570(void); -void sub_8053588(u8); +void Overworld_SetWarpDestToLastHealLoc(void); +void Overworld_SetHealLocationWarp(u8); void sub_80535C4(s16 a1, s16 a2); void sub_805363C(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); void sub_8053678(void); @@ -69,7 +69,7 @@ void sub_8053720(s16, s16); // unref_sub_8053790 void sub_80537CC(u8); void gpu_sync_bg_hide(); -// sub_8053818 +// GetMapConnection // sub_8053850 bool8 sub_80538B0(u16 x, u16 y); bool8 sub_80538D0(u16 x, u16 y); @@ -81,37 +81,37 @@ void walkrun_find_lowest_active_bit_in_bitfield(void); u8 sub_8053B00(struct UnkPlayerStruct *playerStruct, u16 a2, u8 a3); u8 sub_8053B60(struct UnkPlayerStruct *playerStruct, u8, u16, u8); u16 cur_mapdata_block_role_at_screen_center_acc_to_sav1(void); -bool32 IsBikingAllowedByMap(void); -void sub_8053C98(void); -void sub_8053CE4(s32 a1); -u8 sav1_get_flash_used_on_map(void); +bool32 Overworld_IsBikingAllowed(void); +void SetDefaultFlashLevel(void); +void Overworld_SetFlashLevel(s32 a1); +u8 Overworld_GetFlashLevel(void); void sub_8053D14(u16); // sub_8053D30 // sub_8053D6C -// sub_8053D9C -// sav1_map_get_music -// warp1_target_get_music -// call_map_music_set_to_zero -void sub_8053E90(void); -void sav1_set_battle_music_maybe(u16); -void sav1_reset_battle_music_maybe(void); +// GetLocationMusic +// GetCurrLocationDefaultMusic +// GetWarpDestinationMusic +// Overworld_ResetMapMusic +void Overworld_PlaySpecialMapMusic(void); +void Overworld_SetSavedMusic(u16); +void Overworld_ClearSavedMusic(void); void sub_8053F0C(void); -void sub_8053F84(void); -void sub_8053FB0(u16); -// is_warp1_light_level_8_or_9 -// sub_8053FF8 +void Overworld_ChangeMusicToDefault(void); +void Overworld_ChangeMusicTo(u16); +// GetMapMusicFadeoutSpeed +void sub_8053FF8(void); bool8 sub_8054034(void); -void sub_8054044(void); -// sub_8054050 -void sub_80540D0(s16 *, u16 *); -void sub_8054164(void); -u8 get_map_light_level_by_bank_and_number(s8 mapGroup, s8 mapNum); -// get_map_light_level_from_warp -u8 sav1_map_get_light_level(void); -u8 get_map_light_from_warp0(void); -bool8 is_light_level_1_2_3_5_or_6(u8 a1); -bool8 is_light_level_1_2_3_or_6(u8 a1); -u8 is_light_level_8_or_9(u8); +void Overworld_FadeOutMapMusic(void); +// PlayAmbientCry +void UpdateAmbientCry(s16 *, u16 *); +void ChooseAmbientCrySpecies(void); +u8 GetMapTypeByGroupAndId(s8 mapGroup, s8 mapNum); +// GetMapTypeByWarpData +u8 Overworld_GetMapTypeOfSaveblockLocation(void); +u8 get_map_type_from_warp0(void); +bool8 is_map_type_1_2_3_5_or_6(u8 a1); +bool8 Overworld_MapTypeAllowsTeleportAndFly(u8 a1); +u8 Overworld_MapTypeIsIndoors(u8); // unref_sub_8054260 u8 sav1_map_get_name(); // sav1_map_get_battletype @@ -119,8 +119,8 @@ u8 sav1_map_get_name(); bool32 is_c1_link_related_active(void); // c1_overworld_normal // c1_overworld -// c2_overworld_basic -// sub_8054398 +// OverworldBasic +void CB2_OverworldBasic(void); void c2_overworld(void); // set_callback1 // sub_80543DC @@ -129,8 +129,8 @@ void CB2_NewGame(void); void CB2_WhiteOut(void); void CB2_LoadMap(void); void CB2_LoadMap2(void); -// sub_8054534 -// sub_8054588 +void sub_8054534(void); +void sub_8054588(void); void c2_80567AC(void); void c2_exit_to_overworld_2_switch(void); void c2_exit_to_overworld_2_local(void); @@ -233,5 +233,6 @@ u8 npc_something3(u8, u8); u8 LinkPlayerDetectCollision(u8, u8, s16, s16); void CreateLinkPlayerSprite(u8); void SpriteCB_LinkPlayer(struct Sprite *); +void sub_805465C(void); #endif // GUARD_ROM4_H diff --git a/include/party_menu.h b/include/party_menu.h index 9ce476869..e3f5c62f3 100644 --- a/include/party_menu.h +++ b/include/party_menu.h @@ -53,40 +53,58 @@ struct Struct201B000 u16 unk282; }; +struct Unk2001000 +{ + u8 unk0; + u8 unk1; + u8 unk2; + u8 unk3; + u8 unk4; + u8 unk5; + u8 unk6; + u8 unk7; + u8 unk8; + u8 unk9; + u8 unkA; + u8 unkB; + void* unkC; + u16 array[53561]; +}; + extern u8 ewram[]; +#define ewram01000 (*(struct Unk2001000 *)(ewram + 0x01000)) #define ewram1B000 (*(struct Unk201B000 *)(ewram + 0x1B000)) #define ewram1B000_alt (*(struct Struct201B000 *)(ewram + 0x1B000)) #define EWRAM_1B000 ewram1B000_alt void sub_806AEDC(void); -void sub_806AF4C(); +void sub_806AF4C(u8 arg0, u8 arg1, void* arg2, u8 arg3); void OpenPartyMenu(u8, u8); void OpenPartyMenu(); -u8 sub_806B124(void); +bool8 sub_806B124(void); u8 IsLinkDoubleBattle(void); u8 sub_806B58C(u8); u8 sub_806B58C(u8); void sub_806BC3C(u8, u8); u8 sub_806BD58(u8, u8); u8 sub_806BD58(u8, u8); -u16 sub_806BD80(); // undefined args in battle_party_menu.c +u16 sub_806BD80(u8); void task_pc_turn_off(); -void sub_806BF74(); -void sub_806C994(); -u8 sub_806CA38(u8); +void sub_806BF74(u8 arg0, u8 arg1); +void sub_806C994(u8 arg0, u8 arg1); +u8 sub_806CA38(u8 taskID); void sub_806CB74(u8 taskId); void sub_806CCE4(void); void sub_806CD44(u8 taskId); -void sub_806D538(); -void sub_806D538(); -void sub_806D538(); +void sub_806D538(u8 arg0, u8 arg1); void sub_806D5A4(void); void SetMonIconAnim(); void TryCreatePartyMenuMonIcon(u8, u8, struct Pokemon *); void LoadHeldItemIconGraphics(void); -void LoadHeldItemIconGraphics(void); +void PartyMenuTryGiveMonHeldItem(u8 taskId, u16 newItem, TaskFunc c); void CreateHeldItemIcons_806DC34(); // undefined args void CreateHeldItemIcons_806DC34(); +void CreateHeldItemIcons(u8 *, u8 *, u8); u8 GetMonIconSpriteId_maybe(); void SetHeldItemIconVisibility(); void TryPrintPartyMenuMonNickname(); @@ -151,5 +169,13 @@ void DoRareCandyItemEffect(u8, u16, TaskFunc); void Task_RareCandy1(u8); void Task_RareCandy2(u8); void sub_8070848(u8 taskId); +void sub_806CA60(u8 taskId); +void sub_806CD5C(u8 taskId); +void DoTakeMail(u8 taskId, TaskFunc func); +void PartyMenuTryGiveMonHeldItem_806ECE8(u8 taskId, TaskFunc func); +void PartyMenuTryGiveMonMail(u8 taskId, TaskFunc func); +void sub_806D668(u8 partyID); +void TaughtMove(u8 taskId); +void StopTryingToTeachMove_806F588(u8 taskId); #endif // GUARD_PARTY_MENU_H diff --git a/include/pokeball.h b/include/pokeball.h index 19f813415..0a709c869 100644 --- a/include/pokeball.h +++ b/include/pokeball.h @@ -7,5 +7,6 @@ void CreatePokeballSprite(u8 r0, u8 r1, u8 r2, u8 r3, u8 s1, u8 s2, u8 s3, u32 s void sub_804777C(u8); void sub_80478DC(u8); void sub_804794C(u8); +u8 sub_8047580(u8, u8, u8, u8, u8, u8, u8, u32); #endif // GUARD_POKEBALL_H diff --git a/include/pokeblock.h b/include/pokeblock.h index f78ed40c3..6720653a0 100644 --- a/include/pokeblock.h +++ b/include/pokeblock.h @@ -1,7 +1,8 @@ #ifndef GUARD_POKEBLOCK_H #define GUARD_POKEBLOCK_H -enum { +enum +{ PBLOCK_CLR_BLACK, PBLOCK_CLR_RED, PBLOCK_CLR_BLUE, @@ -10,15 +11,32 @@ enum { PBLOCK_CLR_YELLOW }; +enum +{ + PBLOCK_COLOR, + PBLOCK_SPICY, + PBLOCK_DRY, + PBLOCK_SWEET, + PBLOCK_BITTER, + PBLOCK_SOUR, + PBLOCK_FEEL, +}; + void sub_810B96C(void); u8 sub_810BA50(s16, s16, u8); u8 sub_810C9B0(struct Pokeblock *); -s16 sub_810CA9C(const struct Pokeblock *, u8); +s16 GetPokeblockData(const struct Pokeblock *, u8); u8 sub_810C9E8(struct Pokeblock *); void sub_810BA7C(u8); void ClearPokeblocks(void); -bool8 sub_810CA6C(u8); -s16 sub_810CAE4(u8, const struct Pokeblock *); +bool8 PokeblockClearIfExists(u8); +s16 PokeblockGetGain(u8, const struct Pokeblock *); u8 sub_810CB68(u8, u8*); +void PokeblockCopyName(struct Pokeblock *pokeblock, u8 *dest); +void CB2_PreparePokeblockFeedScene(void); + +#include "main.h" + +void sub_8136130(struct Pokeblock *, MainCallback); #endif // GUARD_POKEBLOCK_H diff --git a/include/pokeblock_feed.h b/include/pokeblock_feed.h deleted file mode 100644 index 65d0d1dc9..000000000 --- a/include/pokeblock_feed.h +++ /dev/null @@ -1,10 +0,0 @@ -// -// Created by Scott Norton on 6/28/17. -// - -#ifndef POKERUBY_POKEBLOCK_FEED_H -#define POKERUBY_POKEBLOCK_FEED_H - -void sub_8147ADC(void); - -#endif //POKERUBY_POKEBLOCK_FEED_H diff --git a/include/pokedex.h b/include/pokedex.h index 1bc63a4ff..c47494e1f 100644 --- a/include/pokedex.h +++ b/include/pokedex.h @@ -9,7 +9,17 @@ void CB2_InitPokedex(void); u8 sub_809070C(u16 dexNum, u32 b, u32 c); const u8 *GetPokemonCategory(u16); u16 GetPokedexHeightWeight(u16 dexNum, u8 data); -s8 GetNationalPokedexFlag(u16, u8); + +enum +{ + FLAG_GET_SEEN, + FLAG_GET_CAUGHT, + FLAG_SET_SEEN, + FLAG_SET_CAUGHT +}; + +s8 GetSetPokedexFlag(u16, u8); + u16 GetNationalPokedexCount(u8); u16 GetHoennPokedexCount(u8); bool8 sub_8090FC0(void); diff --git a/include/pokemon.h b/include/pokemon.h index c69fb87e0..76728a5ee 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -93,6 +93,8 @@ #define MON_DATA_SPATK2 87 #define MON_DATA_SPDEF2 88 +#define MAX_LEVEL 100 + #define MON_MALE 0x00 #define MON_FEMALE 0xFE #define MON_GENDERLESS 0xFF @@ -349,6 +351,18 @@ struct BattlePokemon /*0x54*/ u32 otId; }; +enum +{ + STAT_STAGE_HP, // 0 + STAT_STAGE_ATK, // 1 + STAT_STAGE_DEF, // 2 + STAT_STAGE_SPEED, // 3 + STAT_STAGE_SPATK, // 4 + STAT_STAGE_SPDEF, // 5 + STAT_STAGE_ACC, // 6 + STAT_STAGE_EVASION, // 7 +}; + struct BaseStats { /*0x00*/ u8 baseHP; @@ -379,7 +393,7 @@ struct BaseStats /*0x17*/ u8 ability2; /*0x18*/ u8 safariZoneFleeRate; /*0x19*/ u8 bodyColor:7; - u8 unk19_7:1; + u8 noFlip:1; }; struct BattleMove @@ -392,9 +406,16 @@ struct BattleMove u8 secondaryEffectChance; u8 target; u8 priority; - u32 flags; + u8 flags; + u8 pad[3]; }; +#define FLAG_MAKES_CONTACT 0x1 +#define FLAG_PROTECT_AFFECTED 0x2 +#define FLAG_MAGICCOAT_AFFECTED 0x4 +#define FLAG_SNATCH_AFFECTED 0x8 +#define FLAG_KINGSROCK_AFFECTED 0x20 + struct PokemonStorage { /*0x00*/ u8 currentBox; @@ -464,7 +485,9 @@ struct EvolutionData struct Evolution evolutions[5]; }; +extern u8 gPlayerPartyCount; extern struct Pokemon gPlayerParty[PARTY_SIZE]; +extern u8 gEnemyPartyCount; extern struct Pokemon gEnemyParty[PARTY_SIZE]; extern const u8 *const gItemEffectTable[]; extern const struct BaseStats gBaseStats[]; @@ -489,7 +512,7 @@ void sub_803ADE8(struct Pokemon *mon, struct UnknownPokemonStruct *src); void sub_803AF78(struct Pokemon *mon, struct UnknownPokemonStruct *dest); u16 CalculateBoxMonChecksum(struct BoxPokemon *boxMon); void CalculateMonStats(struct Pokemon *mon); -void sub_803B4B4(struct Pokemon *src, struct Pokemon *dest); +void sub_803B4B4(const struct BoxPokemon *src, struct Pokemon *dest); u8 GetLevelFromMonExp(struct Pokemon *mon); u8 GetLevelFromBoxMonExp(struct BoxPokemon *boxMon); u16 GiveMoveToMon(struct Pokemon *mon, u16 move); @@ -499,7 +522,7 @@ void SetMonMoveSlot(struct Pokemon *mon, u16 move, u8 slot); void SetBattleMonMoveSlot(struct BattlePokemon *mon, u16 move, u8 slot); void GiveMonInitialMoveset(struct Pokemon *mon); void GiveBoxMonInitialMoveset(struct BoxPokemon *boxMon); -u16 sub_803B7C8(struct Pokemon *mon, u8 a2); +u16 MonTryLearningNewMove(struct Pokemon *mon, bool8 a2); void DeleteFirstMoveAndGiveMoveToMon(struct Pokemon *mon, u16 move); void DeleteFirstMoveAndGiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move); @@ -555,6 +578,7 @@ u16 NationalPokedexNumToSpecies(u16 nationalNum); u16 NationalToHoennOrder(u16); u16 SpeciesToNationalPokedexNum(u16); u16 HoennToNationalOrder(u16); +u16 SpeciesToCryId(u16 species); void DrawSpindaSpots(u16, u32, u8 *, u8); u8 sub_803FBBC(void); u8 sub_803FC58(u16); @@ -562,13 +586,14 @@ void AdjustFriendship(struct Pokemon *, u8); u8 CheckPartyHasHadPokerus(struct Pokemon *, u8); void UpdatePartyPokerusTime(u16); u32 CanMonLearnTMHM(struct Pokemon *, u8); +u8 GetMoveRelearnerMoves(struct Pokemon *mon, u16 *moves); u8 sub_8040574(struct Pokemon *party); void ClearBattleMonForms(void); void sub_80408BC(); void current_map_music_set__default_for_battle(u16); -const u8 *pokemon_get_pal(struct Pokemon *mon); -const u8 *species_and_otid_get_pal(u16, u32, u32); -const struct CompressedSpritePalette *sub_80409C8(u16, u32, u32); +const u8 *GetMonSpritePal(struct Pokemon *mon); +const u8 *GetMonSpritePalFromOtIdPersonality(u16, u32, u32); +const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u16, u32, u32); bool8 IsOtherTrainer(u32, u8 *); void sub_8040B8C(void); void SetWildMonHeldItem(void); @@ -576,5 +601,10 @@ u8 *sub_8040D08(); bool32 sub_8040D3C(u16 species, u8 *name, u8 language); s8 sub_8040A54(struct Pokemon *, u8); u16 GetMonEVCount(struct Pokemon *); +u16 GetEvolutionTargetSpecies(struct Pokemon *, u8, u16); +const struct CompressedSpritePalette *GetMonSpritePalStruct(struct Pokemon *); +bool8 IsPokeSpriteNotFlipped(u16); +u8 GetLevelUpMovesBySpecies(u16, u16 *); +u8 TryIncrementMonLevel(struct Pokemon *); #endif // GUARD_POKEMON_H diff --git a/include/pokemon_icon.h b/include/pokemon_icon.h index 98f984564..2fbf9f700 100644 --- a/include/pokemon_icon.h +++ b/include/pokemon_icon.h @@ -1,7 +1,7 @@ #ifndef GUARD_POKEMON_ICON_H #define GUARD_POKEMON_ICON_H -u8 CreateMonIcon(); +u8 CreateMonIcon(u16, void (*callback)(struct Sprite *), s16, s16, bool8, u32); u8 sub_809D3A4(u16 arg0, void (*)(struct Sprite *), int, u8 arg3, u32 arg4); u16 GetUnownLetterByPersonality(u32); u16 sub_809D4A8(u16); @@ -10,5 +10,7 @@ void sub_809D51C(void); void sub_809D580(u16); void sub_809D608(u16); void UpdateMonIconFrame(struct Sprite *sprite); +void sub_809D824(struct Sprite *, u8); +void sub_809D62C(struct Sprite *); #endif // GUARD_POKEMON_ICON_H diff --git a/include/pokemon_menu.h b/include/pokemon_menu.h index fc43a44c6..06f905577 100644 --- a/include/pokemon_menu.h +++ b/include/pokemon_menu.h @@ -1,15 +1,47 @@ #ifndef GUARD_POKEMON_MENU_H #define GUARD_POKEMON_MENU_H +#define POKEMENU_FIRST_FIELD_MOVE_ID 10 + +enum +{ + POKEMENU_SUMMARY, // 0 + POKEMENU_SWITCH, // 1 + POKEMENU_ITEM, // 2 + POKEMENU_CANCEL, // 3 + POKEMENU_GIVE_ITEM, // 4 + POKEMENU_TAKE_ITEM, // 5 + POKEMENU_TAKE_MAIL, // 6 + POKEMENU_MAIL, // 7 + POKEMENU_READ_MAIL, // 8 + POKEMENU_CANCEL_SUBMENU, // 9 + POKEMENU_CUT, // 10 + POKEMENU_FLASH, // 11 + POKEMENU_ROCK_SMASH, // 12 + POKEMENU_STRENGTH, // 13 + POKEMENU_SURF, // 14 + POKEMENU_FLY, // 15 + POKEMENU_DIVE, // 16 + POKEMENU_WATERFALL, // 17 + POKEMENU_TELEPORT, // 18 + POKEMENU_DIG, // 19 + POKEMENU_SECRET_POWER, // 20 + POKEMENU_MILK_DRINK, // 21 + POKEMENU_SOFT_BOILED, // 22 + POKEMENU_SWEET_SCENT, // 23 +}; + +extern u8 gLastFieldPokeMenuOpened; +extern void (*gUnknown_03005CE4)(void); + +void sub_808B5B4(u32 taskID); void sub_8089A70(void); -void sub_808A004(); -void sub_808AB90(void); -void sub_808AB90(void); // unknown args -void sub_808AB90(void); +void sub_808A004(u8 taskID); +void FieldCallback_Teleport(void); void sub_808AD58(void); void sub_808B020(void); -void sub_808B0C0(u8); +void sub_808B0C0(u8 taskID); void sub_808B508(u8); -void sub_808B564(); +void sub_808B564(void); #endif // GUARD_POKEMON_MENU_H diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index bd4e7915b..9fe3436ef 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -2,5 +2,7 @@ #define GUARD_POKEMON_STORAGE_SYSTEM_H void ResetPokemonStorageSystem(void); +void BoxMonRestorePP(struct BoxPokemon *); +void party_compaction(void); #endif // GUARD_POKEMON_STORAGE_SYSTEM_H diff --git a/include/rom3.h b/include/rom3.h index a45ec7dc4..81bb56df1 100644 --- a/include/rom3.h +++ b/include/rom3.h @@ -1,6 +1,8 @@ #ifndef GUARD_ROM3_H #define GUARD_ROM3_H +struct DisableStruct; + void sub_800B858(void); void setup_poochyena_battle(); void sub_800B950(void); @@ -8,58 +10,58 @@ void sub_800B9A8(void); void sub_800BA78(void); void sub_800BD54(void); void sub_800BF28(void); -void dp01_prepare_buffer_wireless_probably(u8 a, u16, u8 *c); +void PrepareBufferDataTransferLink(u8 a, u16, u8 *c); void sub_800C1A8(u8); void sub_800C35C(void); void sub_800C47C(u8); void EmitGetAttributes(u8 a, u8 b, u8 c); -void dp01_build_cmdbuf_x01_a_b_0(u8 a, u8 b, u8 c); -void EmitSetAttributes(u8 a, u8 b, u8 c, u8 d, u8 *e); -void dp01_build_cmdbuf_x04_4_4_4(u8 a); -void sub_800C704(u8, u8, u8); -void dp01_build_cmdbuf_x06_a(u8 a, u8 b); -void dp01_build_cmdbuf_x07_7_7_7(u8 a); -void dp01_build_cmdbuf_x08_8_8_8(u8 a); -void dp01_build_cmdbuf_x09_9_9_9(u8 a); -void EmitFaintAnimation(u8 a); -void dp01_build_cmdbuf_x0B_B_B_B(u8 a); -void dp01_build_cmdbuf_x0C_C_C_C(u8 a); -void dp01_build_cmdbuf_x0D_a(u8 a, u8 b); -void EmitMoveAnimation(u8 a, u16 b, u8 c, u16 d, s32 e, u8 f, u8 *g); +void Emitcmd1(u8 a, u8 b, u8 c); +void EmitLoadPokeSprite(u8 a); +void EmitSendOutPoke(u8, u8, u8); +void EmitReturnPokeToBall(u8 a, u8 b); +void EmitTrainerThrow(u8 a); +void EmitTrainerSlide(u8 a); +void EmitTrainerSlideBack(u8 a); +void Emitcmd10(u8 a); +void Emitcmd11(u8 a); +void Emitcmd12(u8 a); +void EmitBallThrow(u8 a, u8 b); +void EmitMoveAnimation(u8 a, u16 b, u8 c, u16 d, s32 e, u8 f, struct DisableStruct *g); void EmitPrintString(u8 a, u16 b); -void dp01_build_cmdbuf_x12_a_bb(u8 a, u8 b, u16 c); -void sub_800CBA4(u8 a, u8 b, u8 c, u8 *d); -void sub_800CBE0(u8 a, u8 *b); -void dp01_build_cmdbuf_x16_a_b_c_ptr_d_e_f(u8 a, u8 b, u8 c, u8 d, u8 *e); -void dp01_build_cmdbuf_x17_17_17_17(u8 a); -void EmitHealthBarUpdate(u8 a, s16 b); -void EmitExpBarUpdate(u8 a, u8 b, s16 c); +void EmitPrintStringPlayerOnly(u8 a, u16 stringID); +void Emitcmd18(u8 a, u8 b, u16 c); +void Emitcmd20(u8 a, u8 b, u8 c, u8 *d); +void EmitOpenBag(u8 a, u8 *b); +void EmitChoosePokemon(u8 a, u8 b, u8 c, u8 d, u8 *e); +void Emitcmd23(u8 a); +void EmitHealthBarUpdate(u8 a, u16 b); +void EmitExpBarUpdate(u8 a, u8 b, u16 c); void EmitStatusIconUpdate(u8 a, u32 b, u32 c); void EmitStatusAnimation(u8 a, u8 b, u32 c); void EmitStatusXor(u8 a, u8 b); -void dp01_build_cmdbuf_x1D_1D_numargs_varargs(u8, u16, u8 *); -void dp01_build_cmdbuf_x21_a_bb(u8 a, u8 b, u16 c); -void dp01_build_cmdbuf_x22_a_three_bytes(u8 a, u8 b, u8 *c); -void dp01_build_cmdbuf_x23_aa_0(u8 a, u16 b); -void dp01_build_cmdbuf_x24_aa_0(u8 a, u16 b); -void dp01_build_cmdbuf_x25_25_25_25(u8 a); -void dp01_build_cmdbuf_x26_a(u8 a, u8 b); -void dp01_build_cmdbuf_x27_27_27_27(u8 a); -void dp01_build_cmdbuf_x28_28_28_28(u8 a); +void Emitcmd29(u8, u16, u8 *); +void Emitcmd33(u8 a, u8 b, u16 c); +void Emitcmd34(u8 a, u8 b, u8 *c); +void Emitcmd35(u8 a, u16 b); +void Emitcmd36(u8 a, u16 b); +void Emitcmd37(u8 a); +void Emitcmd38(u8 a, u8 b); +void Emitcmd39(u8 a); +void Emitcmd40(u8 a); void EmitHitAnimation(u8 a); -void dp01_build_cmdbuf_x2A_2A_2A_2A(u8 a); +void Emitcmd42(u8 a); void EmitEffectivenessSound(u8 a, u16 b); -void sub_800D074(u8 a, u16 b); +void Emitcmd44(u8 a, u16 b); void EmitFaintingCry(u8 a); -void EmitBattleIntroSlide(u8 a, u8 b); -void dp01_build_cmdbuf_x2F_2F_2F_2F(u8 a); -void dp01_build_cmdbuf_x30_TODO(u8 a, u8 *b, u8 c); -void dp01_build_cmdbuf_x31_31_31_31(u8 a); -void dp01_build_cmdbuf_x32_32_32_32(u8 a); +void EmitIntroSlide(u8 a, u8 b); +void EmitTrainerBallThrow(u8 a); +void Emitcmd48(u8 a, u8 *b, u8 c); +void Emitcmd49(u8 a); +void Emitcmd50(u8 a); void EmitSpriteInvisibility(u8 a, u8 b); void EmitBattleAnimation(u8 a, u8 b, u16 c); void EmitLinkStandbyMsg(u8 a, u8 b); void EmitResetActionMoveSelection(u8 a, u8 b); -void dp01_build_cmdbuf_x37_a(u8 a, u8 b); +void Emitcmd55(u8 a, u8 b); #endif // GUARD_ROM3_H diff --git a/include/rom_8077ABC.h b/include/rom_8077ABC.h index 11e94e1f5..94e535df5 100644 --- a/include/rom_8077ABC.h +++ b/include/rom_8077ABC.h @@ -4,10 +4,18 @@ #include "sprite.h" #include "task.h" +enum +{ + ANIM_BANK_ATK, + ANIM_BANK_DEF, + ANIM_BANK_ATK_PARTNER, + ANIM_BANK_DEF_PARTNER +}; + u8 sub_8077ABC(u8, u8); u8 sub_8077E44(u8 slot, u16 species, u8 a3); -u8 obj_id_for_side_relative_to_move(u8 side); -void oamt_set_x3A_32(struct Sprite *sprite, void(*callback)(struct Sprite *)); +u8 GetAnimBankSpriteId(u8 side); +void StoreSpriteCallbackInData6(struct Sprite *sprite, void(*callback)(struct Sprite *)); void sub_8078314(struct Sprite *sprite); void sub_8078364(struct Sprite *sprite); void sub_8078458(struct Sprite *sprite); @@ -22,8 +30,8 @@ u8 GetBankIdentity(u8 slot); u8 GetBankByPlayerAI(u8); u8 GetBankByPlayerAI(u8); u8 GetBankByPlayerAI(u8 state); -u8 sub_8078874(u8); -bool8 sub_8078874(u8); +u8 AnimBankSpriteExists(u8); +bool8 AnimBankSpriteExists(u8); bool8 IsDoubleBattle(); u8 IsDoubleBattle(void); bool8 IsDoubleBattle(void); @@ -55,5 +63,6 @@ void sub_807A784(u8 taskId); void sub_807A850(struct Task *task, u8 taskId); void sub_807A8D4(struct Sprite *sprite); void sub_807A960(struct Sprite *sprite); +void sub_8078A34(struct Sprite *sprite); #endif // GUARD_ROM_8077ABC_H diff --git a/include/script.h b/include/script.h index b3d888edf..5a899cf4a 100644 --- a/include/script.h +++ b/include/script.h @@ -11,7 +11,7 @@ struct ScriptContext u8 stackDepth; u8 mode; u8 comparisonResult; - u8 (*nativePtr)(void); + bool8 (*nativePtr)(void); const u8 *scriptPtr; const u8 *stack[20]; ScrCmdFunc *cmdTable; @@ -23,9 +23,9 @@ struct ScriptContext void InitScriptContext(struct ScriptContext *ctx, void *cmdTable, void *cmdTableEnd); u8 SetupBytecodeScript(struct ScriptContext *ctx, const u8 *ptr); -void SetupNativeScript(struct ScriptContext *ctx, void *ptr); +void SetupNativeScript(struct ScriptContext *ctx, bool8 (*ptr)(void)); void StopScript(struct ScriptContext *ctx); -u8 RunScript(struct ScriptContext *ctx); +u8 RunScriptCommand(struct ScriptContext *ctx); u8 ScriptPush(struct ScriptContext *ctx, const u8 *ptr); const u8 *ScriptPop(struct ScriptContext *ctx); void ScriptJump(struct ScriptContext *ctx, u8 *ptr); @@ -42,16 +42,12 @@ void ScriptContext1_SetupScript(const u8 *ptr); void ScriptContext1_Stop(void); void EnableBothScriptContexts(void); void ScriptContext2_RunNewScript(const u8 *ptr); -u8 *mapheader_get_tagged_pointer(u8 tag); -void mapheader_run_script_by_tag(u8 tag); -u8 *mapheader_get_first_match_from_tagged_ptr_list(u8 tag); void mapheader_run_script_with_tag_x1(void); void mapheader_run_script_with_tag_x3(void); void mapheader_run_script_with_tag_x5(void); void mapheader_run_script_with_tag_x6(void); bool8 mapheader_run_first_tag2_script_list_match(void); void mapheader_run_first_tag4_script_list_match(void); -u32 CalculateRamScriptChecksum(void); void ClearRamScript(void); bool8 InitRamScript(u8 *script, u16 scriptSize, u8 mapGroup, u8 mapNum, u8 objectId); u8 *GetRamScript(u8 objectId, u8 *script); diff --git a/include/script_menu.h b/include/script_menu.h index cc5c442ec..dca8c26a7 100644 --- a/include/script_menu.h +++ b/include/script_menu.h @@ -1,33 +1,19 @@ #ifndef GUARD_SCRIPTMENU_H #define GUARD_SCRIPTMENU_H -struct MultichoiceListStruct -{ - struct MenuAction *list; - u8 count; -}; +struct MenuAction; extern const u8 *const gUnknown_083CE048[]; -bool8 sub_80B5054(u8 left, u8 top, u8 var3, u8 var4); -bool8 sub_80B50B0(u8 left, u8 top, u8 var3, u8 var4, u8 var5); -u16 GetStringWidthInTilesForScriptMenu(const u8 *str); -void DrawMultichoiceMenu(u8, u8, u8, struct MenuAction *list, u8, u8); -void sub_80B5230(u8, u8, u8, u8, u8, u8); -void sub_80B52B4(u8); +bool8 ScriptMenu_Multichoice(u8 left, u8 top, u8 var3, u8 var4); +bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 var3, u8 var4, u8 var5); bool8 Multichoice(u8 var1, u8 var2, u8 var3, u8 var4); -void sub_80B53B4(u8, u8, u8, struct MenuAction *list, u8); -bool8 yes_no_box(u8 var1, u8 var2); -bool8 IsScriptActive(void); // unused -void task_yes_no_maybe(u8); -bool8 sub_80B5578(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 columnCount); -void sub_80B5684(u8); -bool8 TryCreatePCMenu(void); -void CreatePCMenu(void); -void sub_80B5838(void); -void task_picbox(u8 taskId); -bool8 sub_80B58C4(u16 var1, u8 var2, u8 var3); -void *picbox_close(void); -bool8 sub_80B59AC(void); +bool8 ScriptMenu_YesNo(u8 var1, u8 var2); +bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 columnCount); +bool8 ScrSpecial_CreatePCMenu(void); +void ScriptMenu_CreatePCMenu(void); +void ScriptMenu_DisplayPCStartupPrompt(void); +bool8 ScriptMenu_ShowPokemonPic(u16 var1, u8 var2, u8 var3); +bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void); #endif diff --git a/include/script_movement.h b/include/script_movement.h index e3cdc25b3..dc6d7e51b 100644 --- a/include/script_movement.h +++ b/include/script_movement.h @@ -1,8 +1,8 @@ #ifndef GUARD_SCRIPT_MOVEMENT_H #define GUARD_SCRIPT_MOVEMENT_H -bool8 exec_movement(u8, u8, u8, u8 *); -bool8 sub_80A212C(u8, u8, u8); +bool8 ScriptMovement_StartObjectMovementScript(u8, u8, u8, u8 *); +bool8 ScriptMovement_IsObjectMovementFinished(u8, u8, u8); void sub_80A2178(void); #endif // GUARD_SCRIPT_MOVEMENT_H diff --git a/include/script_pokemon_80C4.h b/include/script_pokemon_80C4.h index 629980a2d..fab07994e 100644 --- a/include/script_pokemon_80C4.h +++ b/include/script_pokemon_80C4.h @@ -8,10 +8,10 @@ void ReducePlayerPartyToThree(void); u8 sub_80C4D50(void); void ShowContestWinner(void); -void HealPlayerParty(); +void ScrSpecial_HealPlayerParty(); u8 ScriptGiveMon(u16, u8, u16, u32, u32, u8); u8 ScriptGiveEgg(u16); -void ScriptWildBattle(u16, u8, u16); +void CreateScriptedWildMon(u16, u8, u16); void ScriptSetMonMoveSlot(u8, u16, u8); #endif diff --git a/include/shop.h b/include/shop.h index cca6091c9..b785ca764 100644 --- a/include/shop.h +++ b/include/shop.h @@ -1,6 +1,34 @@ #ifndef GUARD_SHOP_H #define GUARD_SHOP_H +enum +{ + MART_TYPE_0, // normal mart + MART_TYPE_1, + MART_TYPE_2, +}; + +// shop view window NPC info enum +enum +{ + MAP_OBJ_ID, + X_COORD, + Y_COORD, + ANIM_NUM +}; + +struct MartInfo +{ + /* 0x0 */ void (* callback) (void); + /* 0x4 */ u16 *itemList; + /* 0x8 */ u8 itemCount; // how many unique items are there for sale? + /* 0x9 */ u8 cursor; // this shows the on-screen true index of the cursor and not the current item selected. + /* 0xA */ u8 numChoices; // how many options does the mart have? can be either 2 or 1 (BUY/SELL vs BUY) + /* 0xB */ u8 choicesAbove; // when your cursor is far down, there are choices that have scrolled up past the top. this is the count of that. + /* 0xC */ u8 martType; // 0-2. 0 is normal mart while 1-2 seem to be decor shops or non-stackable purchases in general. + /* 0xD */ u8 curItemCount; // if you are selling an item, this is the count of the current item stack you have. +}; + void sub_80B2E38(u8); void HandleShopMenuQuit(u8); void sub_80B2FA0(u8); @@ -11,8 +39,10 @@ void BuyMenuDrawMapGraphics(void); void sub_80B3764(int, int); void sub_80B37EC(void); void sub_80B40E8(u8); -void CreatePokemartMenu(void *); -void CreateDecorationShop1Menu(void *); -void CreateDecorationShop2Menu(void *); +void CreatePokemartMenu(u16 *); +void CreateDecorationShop1Menu(u16 *); +void CreateDecorationShop2Menu(u16 *); +void sub_80B356C(void); +void sub_80B368C(void); #endif // GUARD_SHOP_H diff --git a/include/songs.h b/include/songs.h index 8cf7ee5e9..afd26d683 100644 --- a/include/songs.h +++ b/include/songs.h @@ -36,29 +36,29 @@ enum /*0x1E*/ SE_N, /*0x1F*/ SE_SEIKAI, /*0x20*/ SE_HAZURE, - SE_EXP, - SE_JITE_PYOKO, - SE_MU_PACHI, - SE_TK_KASYA, - SE_FU_ZAKU, - SE_FU_ZAKU2, - SE_FU_ZUZUZU, - SE_RU_GASHIN, - SE_RU_GASYAN, - SE_RU_BARI, - SE_RU_HYUU, - SE_KI_GASYAN, - SE_TK_WARPIN, - SE_TK_WARPOUT, - SE_TU_SAA, - SE_HI_TURUN, - SE_TRACK_MOVE, - SE_TRACK_STOP, - SE_TRACK_HAIK, - SE_TRACK_DOOR, - SE_MOTER, - SE_CARD, - SE_SAVE, + /*0x21*/ SE_EXP, + /*0x22*/ SE_JITE_PYOKO, + /*0x23*/ SE_MU_PACHI, + /*0x24*/ SE_TK_KASYA, + /*0x25*/ SE_FU_ZAKU, + /*0x26*/ SE_FU_ZAKU2, + /*0x27*/ SE_FU_ZUZUZU, + /*0x28*/ SE_RU_GASHIN, + /*0x29*/ SE_RU_GASYAN, + /*0x2A*/ SE_RU_BARI, + /*0x2B*/ SE_RU_HYUU, + /*0x2C*/ SE_KI_GASYAN, + /*0x2D*/ SE_TK_WARPIN, + /*0x2E*/ SE_TK_WARPOUT, + /*0x2F*/ SE_TU_SAA, + /*0x30*/ SE_HI_TURUN, + /*0x31*/ SE_TRACK_MOVE, + /*0x32*/ SE_TRACK_STOP, + /*0x33*/ SE_TRACK_HAIK, + /*0x34*/ SE_TRACK_DOOR, + /*0x35*/ SE_MOTER, + /*0x36*/ SE_CARD, + /*0x37*/ SE_SAVE, /*0x38*/ SE_KON, /*0x39*/ SE_KON2, /*0x3A*/ SE_KON3, @@ -105,9 +105,9 @@ enum SE_C_PASI, SE_C_SYU, SE_C_PIKON, - SE_REAPOKE, - SE_OP_BASYU, - SE_BT_START, + /*0x66*/ SE_REAPOKE, + /*0x67*/ SE_OP_BASYU, + /*0x68*/ SE_BT_START, SE_DENDOU, SE_JIHANKI, SE_TAMA, @@ -131,20 +131,20 @@ enum /*0x7D*/ SE_W145B, /*0x7E*/ SE_W145C, /*0x7F*/ SE_W240, - SE_W015, - SE_W081, - SE_W081B, - SE_W088, - SE_W016, - SE_W016B, - SE_W003, - SE_W104, - SE_W013, - SE_W196, - SE_W086, - SE_W004, - SE_W025, - SE_W025B, + /*0x80*/ SE_W015, + /*0x81*/ SE_W081, + /*0x82*/ SE_W081B, + /*0x83*/ SE_W088, + /*0x84*/ SE_W016, + /*0x85*/ SE_W016B, + /*0x86*/ SE_W003, + /*0x87*/ SE_W104, + /*0x88*/ SE_W013, + /*0x89*/ SE_W196, + /*0x8A*/ SE_W086, + /*0x8B*/ SE_W004, + /*0x8C*/ SE_W025, + /*0x8D*/ SE_W025B, SE_W152, SE_W026, SE_W172, @@ -185,29 +185,29 @@ enum SE_W071B, SE_W071, SE_W103, - SE_W062, - SE_W062B, - SE_W048, - SE_W187, - SE_W118, - SE_W155, - SE_W122, - SE_W060, - SE_W185, - SE_W014, - SE_W043, - SE_W207, - SE_W207B, - SE_W215, - SE_W109, - SE_W173, - SE_W280, - SE_W202, - SE_W060B, - SE_W076, - SE_W080, - SE_W100, - SE_W107, + /*0xB6*/ SE_W062, + /*0xB7*/ SE_W062B, + /*0xB8*/ SE_W048, + /*0xB9*/ SE_W187, + /*0xBA*/ SE_W118, + /*0xBB*/ SE_W155, + /*0xBC*/ SE_W122, + /*0xBD*/ SE_W060, + /*0xBE*/ SE_W185, + /*0xBF*/ SE_W014, + /*0xC0*/ SE_W043, + /*0xC1*/ SE_W207, + /*0xC2*/ SE_W207B, + /*0xC3*/ SE_W215, + /*0xC4*/ SE_W109, + /*0xC5*/ SE_W173, + /*0xC6*/ SE_W280, + /*0xC7*/ SE_W202, + /*0xC8*/ SE_W060B, + /*0xC9*/ SE_W076, + /*0xCA*/ SE_W080, + /*0xCB*/ SE_W100, + /*0xCC*/ SE_W107, SE_W166, SE_W129, SE_W115, @@ -274,38 +274,38 @@ enum /*0x171*/ BGM_ME_BACHI, /*0x172*/ BGM_FANFA4, /*0x173*/ BGM_FANFA5, - BGM_ME_WAZA, - BGM_BIJYUTU, - BGM_DOORO_X4, - BGM_FUNE_KAN, - BGM_ME_SHINKA, - BGM_SHINKA, - BGM_ME_WASURE, - BGM_SYOUJOEYE, - BGM_BOYEYE, - BGM_DAN02, - BGM_MACHI_S3, - BGM_ODAMAKI, - BGM_B_TOWER, - BGM_SWIMEYE, - BGM_DAN03, - BGM_ME_KINOMI, - BGM_ME_TAMA, - BGM_ME_B_BIG, - BGM_ME_B_SMALL, - BGM_ME_ZANNEN, - BGM_BD_TIME, - BGM_TEST1, - BGM_TEST2, - BGM_TEST3, - BGM_TEST4, - BGM_TEST, - BGM_GOMACHI0, - BGM_GOTOWN, - BGM_POKECEN, - BGM_NEXTROAD, - BGM_GRANROAD, - BGM_CYCLING, + /*0x174*/ BGM_ME_WAZA, + /*0x175*/ BGM_BIJYUTU, + /*0x176*/ BGM_DOORO_X4, + /*0x177*/ BGM_FUNE_KAN, + /*0x178*/ BGM_ME_SHINKA, + /*0x179*/ BGM_SHINKA, + /*0x17A*/ BGM_ME_WASURE, + /*0x17B*/ BGM_SYOUJOEYE, + /*0x17C*/ BGM_BOYEYE, + /*0x17D*/ BGM_DAN02, + /*0x17E*/ BGM_MACHI_S3, + /*0x17F*/ BGM_ODAMAKI, + /*0x180*/ BGM_B_TOWER, + /*0x181*/ BGM_SWIMEYE, + /*0x182*/ BGM_DAN03, + /*0x183*/ BGM_ME_KINOMI, + /*0x184*/ BGM_ME_TAMA, + /*0x185*/ BGM_ME_B_BIG, + /*0x186*/ BGM_ME_B_SMALL, + /*0x187*/ BGM_ME_ZANNEN, + /*0x188*/ BGM_BD_TIME, + /*0x189*/ BGM_TEST1, + /*0x18A*/ BGM_TEST2, + /*0x18B*/ BGM_TEST3, + /*0x18C*/ BGM_TEST4, + /*0x18D*/ BGM_TEST, + /*0x18E*/ BGM_GOMACHI0, + /*0x18F*/ BGM_GOTOWN, + /*0x190*/ BGM_POKECEN, + /*0x191*/ BGM_NEXTROAD, + /*0x192*/ BGM_GRANROAD, + /*0x193*/ BGM_CYCLING, BGM_FRIENDLY, BGM_MISHIRO, BGM_TOZAN, diff --git a/include/species.h b/include/species.h index e33481afd..9ab0565cb 100644 --- a/include/species.h +++ b/include/species.h @@ -1,7 +1,8 @@ #ifndef GUARD_SPECIES_H #define GUARD_SPECIES_H -enum { +enum +{ SPECIES_NONE, // 0x000 SPECIES_BULBASAUR, // 0x001 SPECIES_IVYSAUR, // 0x002 diff --git a/include/sprite.h b/include/sprite.h index 733231eb5..0d84c8127 100644 --- a/include/sprite.h +++ b/include/sprite.h @@ -204,14 +204,14 @@ struct Sprite /*0x3A*/ s16 data6; /*0x3C*/ s16 data7; - /*0x3E*/ u16 inUse:1; - u16 coordOffsetEnabled:1; - u16 invisible:1; - u16 flags_3:1; - u16 flags_4:1; - u16 flags_5:1; - u16 flags_6:1; - u16 flags_7:1; + /*0x3E*/ u16 inUse:1; //1 + u16 coordOffsetEnabled:1; //2 + u16 invisible:1; //4 + u16 flags_3:1; //8 + u16 flags_4:1; //0x10 + u16 flags_5:1; //0x20 + u16 flags_6:1; //0x40 + u16 flags_7:1; //0x80 /*0x3F*/ u16 hFlip:1; u16 vFlip:1; u16 animBeginning:1; @@ -299,4 +299,6 @@ u8 SpriteTileAllocBitmapOp(u16 bit, u8 op); extern const union AffineAnimCmd *const gDummySpriteAffineAnimTable[]; +extern const struct SpriteTemplate gDummySpriteTemplate; + #endif // GUARD_SPRITE_H diff --git a/include/start_menu.h b/include/start_menu.h index 5169b3bf0..d3f77dc99 100644 --- a/include/start_menu.h +++ b/include/start_menu.h @@ -5,7 +5,7 @@ void CreateStartMenuTask(void (*func)(u8)); void sub_80712B4(u8 taskId); void sub_8071310(void); -void InitSaveDialog(void); +void ScrSpecial_DoSaveDialog(void); void sub_8071B28(void); #endif // GUARD_STARTER_CHOOSE_H diff --git a/include/strings2.h b/include/strings2.h index 600bb2d31..8052c6c4a 100644 --- a/include/strings2.h +++ b/include/strings2.h @@ -319,4 +319,8 @@ extern const u8 gOtherText_OK[]; // wallclock extern const u8 gOtherText_CorrectTimePrompt[]; +#if GERMAN +extern const u8 deuOtherText_ForgotAndLearned[]; +#endif + #endif // GUARD_STRINGS2_H diff --git a/include/text.h b/include/text.h index 99987d2c3..ebc4ebe7e 100644 --- a/include/text.h +++ b/include/text.h @@ -2,6 +2,7 @@ #define GUARD_TEXT_H #define CHAR_SPACE 0x00 +#define CHAR_SONG_WORD_SEPARATOR 0x37 // separates words in the bard song. Not sure if it's used for anything else #define CHAR_0 0xA1 #define CHAR_QUESTION_MARK 0xAC #define CHAR_PERIOD 0xAD @@ -97,35 +98,35 @@ struct WindowConfig struct Window { - u8 textMode; - u8 fontNum; - u8 language; - u8 foregroundColor; - u8 backgroundColor; - u8 shadowColor; - u8 paletteNum; - u8 tilemapLeft; - u8 tilemapTop; - u8 width; - u8 height; - u8 win_field_B; - u8 win_field_C; - u8 delayCounter; - u8 spacing; - u8 win_field_F; - u8 cursorX; - u8 cursorY; - u8 left; - u16 top; - u16 state; - u16 downArrowCounter; - u16 tileDataStartOffset; - u16 tileDataOffset; - u16 textIndex; - const u8 *text; - u8 *tileData; - u16 *tilemap; - struct WindowConfig *config; + /*0x00*/ u8 textMode; + /*0x01*/ u8 fontNum; + /*0x02*/ u8 language; + /*0x03*/ u8 foregroundColor; + /*0x04*/ u8 backgroundColor; + /*0x05*/ u8 shadowColor; + /*0x06*/ u8 paletteNum; + /*0x07*/ u8 tilemapLeft; + /*0x08*/ u8 tilemapTop; + /*0x09*/ u8 width; + /*0x0A*/ u8 height; + /*0x0B*/ u8 win_field_B; + /*0x0C*/ u8 win_field_C; + /*0x0D*/ u8 delayCounter; + /*0x0E*/ u8 spacing; + /*0x0F*/ u8 win_field_F; + /*0x10*/ u8 cursorX; + /*0x11*/ u8 cursorY; + /*0x12*/ u8 left; + /*0x14*/ u16 top; // padded to 0x14 + /*0x16*/ u16 state; + /*0x18*/ u16 downArrowCounter; + /*0x1A*/ u16 tileDataStartOffset; + /*0x1C*/ u16 tileDataOffset; + /*0x1E*/ u16 textIndex; + /*0x20*/ const u8 *text; + /*0x24*/ u8 *tileData; + /*0x28*/ u16 *tilemap; + /*0x2C*/ const struct WindowConfig *config; }; extern vu16 *const gBGControlRegs[]; @@ -202,6 +203,7 @@ extern u8 gStringVar1[]; extern u8 gStringVar2[]; extern u8 gStringVar3[]; extern u8 gStringVar4[]; +extern u8 gTileBuffer[]; void LoadFontDefaultPalette(const struct WindowConfig *winConfig); void SetUpWindowConfig(const struct WindowConfig *winConfig); @@ -244,8 +246,8 @@ u8 sub_8004D38(struct Window *win, const u8 *text, u16 tileDataStartOffset, u8 l u8 sub_8004DB0(struct Window *win, const u8 *text, u16 tileDataStartOffset, u8 left, u8 top, u16 a6); u8 sub_8004E24(struct Window *win); void sub_8004E28(struct Window *win, u8 *foreground, u8 *background, u8 *shadow); -void sub_8004E3C(struct WindowConfig *winConfig, u8 *tileData, const u8 *text); -u8 GetStringWidthGivenWindowConfig(struct WindowConfig *winConfig, const u8 *s); +void sub_8004E3C(const struct WindowConfig *winConfig, u8 *tileData, const u8 *text); +u8 GetStringWidthGivenWindowConfig(const struct WindowConfig *winConfig, const u8 *s); void ConvertInternationalString(u8 *s, u8 language); void StripExtCtrlCodes(u8 *str); s32 StringCompareWithoutExtCtrlCodes(const u8 *str1, const u8 *str2); diff --git a/include/trade.h b/include/trade.h new file mode 100644 index 000000000..1dd4b53bd --- /dev/null +++ b/include/trade.h @@ -0,0 +1,64 @@ + +#ifndef GUARD_TRADE_H +#define GUARD_TRADE_H + +struct TradeEwramSubstruct2 { + /*0x0000*/ u8 filler_0000; + /*0x0004*/ struct Window window; + /*0x0034*/ u8 textWindowBaseTileNum; + /*0x0038*/ struct Pokemon pokemon; + /*0x009c*/ u8 unk_009c; + /*0x009d*/ u8 unk_009d; + /*0x009e*/ u16 linkData[10]; + /*0x00b2*/ u8 unk_00b2; + /*0x00b3*/ u8 unk_00b3; + /*0x00b4*/ u16 unk_00b4; + /*0x00b6*/ u16 unk_00b6; + // Sprite indices + /*0x00b8*/ u8 pokePicSpriteIdxs[2]; + /*0x00ba*/ u8 unk_00ba; + /*0x00bb*/ u8 unk_00bb; + /*0x00bc*/ u8 unk_00bc; + /*0x00bd*/ u8 unk_00bd; + // Timer + /*0x00c0*/ u32 unk_00c0; + // Scene index + /*0x00c4*/ u16 unk_00c4; + /*0x00c6*/ u8 filler_00c6[0x3c]; + /*0x0102*/ u8 unk_0102; + /*0x0103*/ u8 unk_0103; + /*0x0104*/ u16 unk_0104; + /*0x0106*/ u16 unk_0106; + /*0x0108*/ u16 unk_0108; + /*0x010a*/ u16 unk_010a; + /*0x010c*/ u16 unk_010c; + /*0x010e*/ s16 unk_010e; + /*0x0110*/ s16 bg1vofs; + /*0x0112*/ s16 bg1hofs; + /*0x0114*/ s16 bg2vofs; + /*0x0116*/ s16 bg2hofs; + /*0x0118*/ u16 unk_0118; + /*0x011a*/ u16 unk_011a; + /*0x011c*/ u16 unk_011c; + /*0x011e*/ u8 isLinkTrade; + /*0x0120*/ u16 tradeSpecies[2]; + /*0x0124*/ u16 unk_0124; +}; + +extern struct TradeEwramSubstruct2 *gUnknown_03004828; +extern const u16 gUnknown_0820C9F8[][16]; +extern const u32 gUnknown_0820CA98[]; +extern const u16 gUnknown_0820F798[]; + +void sub_8047CD8(void); +u16 sub_804DB2C(void); +void sub_804DB68(void); +void sub_804E174(void); +const u8 gOtherText_MaleSymbol3[2]; +const u8 gOtherText_FemaleSymbol3[2]; +const u8 gOtherText_GenderlessSymbol[2]; + +void sub_804E22C(void); +u16 sub_804D89C(void); + +#endif //POKERUBY_TRADE_H diff --git a/include/trader.h b/include/trader.h index 24a9f2a07..832a04b65 100644 --- a/include/trader.h +++ b/include/trader.h @@ -1,6 +1,7 @@ #ifndef GUARD_TRADER_H #define GUARD_TRADER_H -void sub_81099CC(void); +void TraderSetup(void); +void sub_8109A20(void); #endif // GUARD_TRADER_H diff --git a/include/trainer_see.h b/include/trainer_see.h index b80a41641..de96dcd3a 100644 --- a/include/trainer_see.h +++ b/include/trainer_see.h @@ -7,29 +7,13 @@ bool8 CheckTrainers(void); bool8 CheckTrainer(u8); u8 TrainerCanApproachPlayer(struct MapObject *); -bool8 IsTrainerInRangeSouth(struct MapObject *trainerObj, s16 vision, s16 x, s16 y); -bool8 IsTrainerInRangeNorth(struct MapObject *trainerObj, s16 vision, s16 x, s16 y); -bool8 IsTrainerInRangeWest(struct MapObject *trainerObj, s16 vision, s16 x, s16 y); -bool8 IsTrainerInRangeEast(struct MapObject *trainerObj, s16 vision, s16 x, s16 y); + bool8 CheckPathBetweenTrainerAndPlayer(struct MapObject2 *, u8, u8); void sub_80842C8(struct MapObject *, u8); void sub_80842FC(void (*func)(u8)); void RunTrainerSeeFuncList(u8); -u8 sub_8084394(void); -s8 sub_8084398(u8 taskId, struct Task *task, struct MapObject *trainerObj); -s8 sub_80843DC(u8 taskId, struct Task *task, struct MapObject *trainerObj); -s8 sub_808441C(u8 taskId, struct Task *task, struct MapObject *trainerObj); -s8 sub_8084478(u8 taskId, struct Task *task, struct MapObject *trainerObj); -s8 sub_8084534(u8 taskId, struct Task *task, struct MapObject *trainerObj); -s8 sub_8084578(u8 taskId, struct Task *task, struct MapObject *trainerObj); -s8 sub_80845AC(u8 taskId, struct Task *task, struct MapObject *trainerObj); -s8 sub_80845C8(u8 taskId, struct Task *task, struct MapObject *trainerObj); -s8 sub_80845FC(u8 taskId, struct Task *task, struct MapObject *trainerObj); -s8 sub_8084654(u8 taskId, struct Task *task, struct MapObject *trainerObj); -s8 sub_80846C8(u8 taskId, struct Task *task, struct MapObject *trainerObj); -void sub_80846E4(u8 taskId); void sub_8084794(struct MapObject *var); -void sub_80847C8(void); +void ScrSpecial_EndTrainerApproach(void); void sub_80847D8(u8); void sub_8084894(struct Sprite *sprite, u16 a2, u8 a3); void objc_exclamation_mark_probably(struct Sprite *sprite); diff --git a/include/unknown_task.h b/include/unknown_task.h index dc07767d6..d7ac63931 100644 --- a/include/unknown_task.h +++ b/include/unknown_task.h @@ -1,14 +1,24 @@ #ifndef GUARD_UNKNOWN_TASK_H #define GUARD_UNKNOWN_TASK_H +struct UnknownTaskStruct +{ + volatile void *dest; + u32 control; + u8 unk8; + u8 unk9; +}; + void remove_some_task(void); void remove_some_task(void); void dp12_8087EA4(void); void dp12_8087EA4(void); -void sub_80895F8(u32 i, u32 i1, u32 i2); -void sub_80895F8(); +//void sub_80895F8(u32 i, u32 i1, u32 i2); +//void sub_80895F8(); +void sub_80895F8(struct UnknownTaskStruct unk); void sub_8089668(void); void sub_8089668(); -void sub_8089944(int i, int i1, int i2, int i3, int i4, int i5, int i6); +//void sub_8089944(int i, int i1, int i2, int i3, int i4, int i5, int i6); +u8 sub_8089944(u8 a1, u8 a2, u8 a3, u8 a4, u8 a5, u8 a6, u8 a7); #endif // GUARD_UNKNOWN_TASK_H diff --git a/include/use_pokeblock.h b/include/use_pokeblock.h deleted file mode 100644 index f34857cf1..000000000 --- a/include/use_pokeblock.h +++ /dev/null @@ -1,10 +0,0 @@ -// -// Created by Scott Norton on 5/31/17. -// - -#ifndef POKERUBY_USE_POKEBLOCK_H -#define POKERUBY_USE_POKEBLOCK_H - -void sub_8136130(struct Pokeblock *, MainCallback); - -#endif //POKERUBY_USE_POKEBLOCK_H diff --git a/include/util.h b/include/util.h index 1851c2e82..87fa4aecc 100644 --- a/include/util.h +++ b/include/util.h @@ -9,5 +9,7 @@ extern const u32 gBitTable[]; u8 CreateInvisibleSpriteWithCallback(void (*)(struct Sprite *)); void StoreWordInTwoHalfwords(u16 *, u32); void LoadWordFromTwoHalfwords(u16 *, u32 *); +u16 CalcCRC16(u8 *data, int length); +void DoBgAffineSet(struct BgAffineDstData *dest, u32 texX, u32 texY, s16 scrX, s16 scrY, s16 sx, s16 sy, u16 alpha); #endif // GUARD_UTIL_H diff --git a/include/vars.h b/include/vars.h index efbb462a4..179fd6f93 100644 --- a/include/vars.h +++ b/include/vars.h @@ -45,6 +45,7 @@ #define VAR_0x4095 0x4095 #define VAR_0x4097 0x4097 #define VAR_0x409a 0x409a +#define VAR_WEATHER_INSTITUTE_CLEARED 0x040B3 #define VAR_PORTHOLE 0x40B4 #define VAR_0x40BC 0x40BC diff --git a/include/wild_encounter.h b/include/wild_encounter.h index a4485b08d..d4b343126 100644 --- a/include/wild_encounter.h +++ b/include/wild_encounter.h @@ -28,12 +28,12 @@ extern struct WildPokemonHeader gWildMonHeaders[]; void DisableWildEncounters(bool8 disabled); bool8 StandardWildEncounter(u16 a, u16 b); -void RockSmashWildEncounter(void); +void ScrSpecial_RockSmashWildEncounter(void); bool8 SweetScentWildEncounter(void); -bool8 GetFishingWildMonListHeader(void); +bool8 DoesCurrentMapHaveFishingMons(void); void FishingWildEncounter(u8 rod); u16 GetLocalWildMon(bool8 *isWaterMon); -u16 GetMirageIslandMon(void); +u16 GetLocalWaterMon(void); bool8 UpdateRepelCounter(void); #endif // GUARD_WILD_ENCOUNTER_H |