summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm.h9
-rw-r--r--include/asm.inc.h43
-rw-r--r--include/battle.h3
-rw-r--r--include/config.h16
-rw-r--r--include/easy_chat.h32
-rw-r--r--include/field_message_box.h8
-rw-r--r--include/global.h25
-rw-r--r--include/m4a.h1
-rw-r--r--include/pokemon.h9
-rw-r--r--include/roamer.h11
-rw-r--r--include/songs.h6
-rw-r--r--include/string_util.h3
-rw-r--r--include/text.h7
13 files changed, 132 insertions, 41 deletions
diff --git a/include/asm.h b/include/asm.h
index fe1b3139f..e72683e45 100644
--- a/include/asm.h
+++ b/include/asm.h
@@ -45,6 +45,15 @@ struct UnknownStruct_FPA
u16 unk14;
};
+struct CryRelatedStruct
+{
+ u16 unk0;
+ u8 unk2;
+ u8 paletteNo;
+ u8 xPos;
+ u8 yPos;
+};
+
#include "asm.inc.h"
#endif //PROJECT_ASM_H
diff --git a/include/asm.inc.h b/include/asm.inc.h
index 416917fa6..eb3cec985 100644
--- a/include/asm.inc.h
+++ b/include/asm.inc.h
@@ -10,20 +10,23 @@ void sub_80157C4(u8 index);
u8 sub_8015A98(u8, u8, u8);
u8 sub_8018324(u8, u8, u8, u8, u16);
+// asm/battle_5.o
+void sub_802C098();
+void sub_802E3E4(u8, int);
+void nullsub_8(u8);
+
// asm/battle_7.o
void sub_8032AA8(u8 index, int i);
// src/pokemon_3.o
u16 SpeciesToNationalPokedexNum(u16);
-
-// asm/pokemon_3.o
-void DrawSpindaSpots(u16, u32, void *, u8);
+void DrawSpindaSpots(u16, u32, u8 *, u8);
u8 sub_803FC58(u16);
void AdjustFriendship(struct Pokemon *, u8);
void sub_80408BC();
void current_map_music_set__default_for_battle(u16);
-// asm/util.o
+// src/util.o
void StoreWordInTwoHalfwords(u16 *, u32);
void LoadWordFromTwoHalfwords(u16 *, u32 *);
@@ -157,7 +160,7 @@ void sub_806FA18(u8 taskId);
// src/party_menu.o
void sub_806E834();
-// asm/rom_8077ABC.o
+// src/rom_8077ABC.o
u8 battle_side_get_owner(u8);
u8 battle_get_per_side_status(u8);
u8 battle_get_side_with_given_state(u8);
@@ -211,6 +214,9 @@ void sub_8089A70(void);
void sub_808A004();
void sub_808AB90(void);
+// asm/rom_8094928.o
+u8 pokemon_order_func(u8);
+
// asm/pokemon_storage_system.o
void sub_80961D8(void);
@@ -321,9 +327,8 @@ void sub_80C8F34(u8);
// asm/easy_chat.o
void sub_80E6764(void);
-void sub_80EB3FC(u8 *, u16);
+u8* sub_80EB3FC(u8 *, u16);
u8 ConvertEasyChatWordsToString(u8 *dst, u16 *words, u16, u16);
-u16 sub_80EB72C(u16);
// asm/pokenav.o
void sub_80EBA5C(void);
@@ -355,7 +360,7 @@ s16 sub_810CAE4(u8, struct Pokeblock *);
// asm/fldeff_flash.o
void sub_810CC80(void);
-// asm/time_events.o
+// src/time_events.o
u8 IsMirageIslandPresent(void);
// asm/field_specials.o
@@ -370,11 +375,22 @@ void sub_810FA54(void);
// asm/battle_records.o
void InitLinkBattleRecords(void);
+// asm/pokedex_cry_screen.o
+u8 sub_8119E3C(struct CryRelatedStruct *, u8);
+void sub_8119F88(u8 a);
+void sub_811A050(u16 species);
+u8 ShowPokedexCryScreen(struct CryRelatedStruct *, u8);
+void DestroyCryMeterNeedleSprite();
+
// asm/battle_transition.o
void sub_811AABC(u8);
void sub_811AAD8(u8);
u8 sub_811AAE8(void);
+// asm/battle_message.o
+void get_battle_strings_(u8 *);
+void sub_8120FFC(const u8 *, u8 *);
+
// src/mystery_event_script.o
u32 sub_812613C(u8 *);
void sub_8126160(u8);
@@ -400,20 +416,15 @@ u8 IsThereStorageSpaceForDecoration(u8);
u8 sub_8134074(u8);
s8 sub_81340A8(u8);
-// asm/roamer.o
-void sub_81341F8(void);
-void sub_813420C(void);
-void mapnumbers_history_shift_sav1_0_2_4_out(void);
-void sub_8134348(void);
-void sub_8134394();
-u8 sub_81344CC(void);
-
// asm/battle_tower.o
void sub_8134AC0(void *);
// src/player_pc.o
void NewGameInitPCItems(void);
+// src/diploma.o
+void sub_8145D88(void);
+
// asm/intro_credits_graphics.o
void load_intro_part2_graphics(/*TODO: arg types*/);
void sub_8148C78(/*TODO: arg types*/);
diff --git a/include/battle.h b/include/battle.h
index 4b9144721..8f7141803 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -51,8 +51,7 @@ struct Trainer
{
/*0x00*/ u8 partyFlags;
/*0x01*/ u8 trainerClass;
- /*0x02*/ u8 encounterMusic:7;
- /*0x02*/ u8 gender:1;
+ /*0x02*/ u8 encounterMusic_gender;
/*0x03*/ u8 trainerPic;
/*0x04*/ u8 trainerName[12];
/*0x10*/ u16 items[4];
diff --git a/include/config.h b/include/config.h
index 5ee062006..205f53f16 100644
--- a/include/config.h
+++ b/include/config.h
@@ -5,19 +5,27 @@
#define REVISION 0
#endif
-#if REVISION == 2
+#if (ENGLISH && REVISION == 2) || (GERMAN && REVISION == 1)
#define BUGFIX_BERRY
#endif
-#if REVISION >= 1
+#if (ENGLISH && REVISION >= 1) || GERMAN
#define BUGFIX_GLYPHWIDTH
#define BUGFIX_SAVEFAILEDSCREEN1
#endif
-// #define BUGFIX_SAVEFAILEDSCREEN2
+#if GERMAN
+#define BUGFIX_SAVEFAILEDSCREEN2
+#endif
// European editions of Ruby/Sapphire and all editions of Emerald have this fix.
-// #define BUGFIX_TRAINERAPPROACH
+#if GERMAN
+#define BUGFIX_TRAINERAPPROACH
+#endif
+
+#if (ENGLISH && REVISION >= 1) || GERMAN
+#define BUGFIX_EVO_NAME
+#endif
// Fixed in Emerald.
// #define BUGFIX_SETMONIVS
diff --git a/include/easy_chat.h b/include/easy_chat.h
new file mode 100644
index 000000000..ee5ac4138
--- /dev/null
+++ b/include/easy_chat.h
@@ -0,0 +1,32 @@
+#ifndef GUARD_EASYCHAT_H
+#define GUARD_EASYCHAT_H
+
+enum {
+ EC_GROUP_POKEMON,
+ EC_GROUP_TRAINER,
+ EC_GROUP_STATUS,
+ EC_GROUP_BATTLE,
+ EC_GROUP_GREETINGS,
+ EC_GROUP_PEOPLE,
+ EC_GROUP_VOICES,
+ EC_GROUP_SPEECH,
+ EC_GROUP_ENDINGS,
+ EC_GROUP_FEELINGS,
+ EC_GROUP_CONDITIONS,
+ EC_GROUP_ACTIONS,
+ EC_GROUP_LIFESTYLE,
+ EC_GROUP_HOBBIES,
+ EC_GROUP_TIME,
+ EC_GROUP_MISC,
+ EC_GROUP_ADJECTIVES,
+ EC_GROUP_EVENTS,
+ EC_GROUP_MOVE_1,
+ EC_GROUP_MOVE_2,
+ EC_GROUP_TRENDY_SAYING,
+ EC_GROUP_POKEMON_2,
+};
+
+
+u16 sub_80EB72C(u16 group);
+
+#endif // GUARD_EASYCHAT_H
diff --git a/include/field_message_box.h b/include/field_message_box.h
index 50d96ccd1..c35aaf595 100644
--- a/include/field_message_box.h
+++ b/include/field_message_box.h
@@ -10,10 +10,10 @@ enum
};
void InitFieldMessageBox(void);
-bool8 ShowFieldMessage(u8 *message);
-bool8 ShowFieldAutoScrollMessage(u8 *message);
-bool8 unref_sub_8064BB8(u8 *message);
-bool8 unref_sub_8064BD0(u8 *message);
+bool8 ShowFieldMessage(const u8 *message);
+bool8 ShowFieldAutoScrollMessage(const u8 *message);
+bool8 unref_sub_8064BB8(const u8 *message);
+bool8 unref_sub_8064BD0(const u8 *message);
void HideFieldMessageBox(void);
u8 GetFieldMessageBoxMode(void);
bool8 IsFieldMessageBoxHidden(void);
diff --git a/include/global.h b/include/global.h
index 62e557ef4..4cbbef5cc 100644
--- a/include/global.h
+++ b/include/global.h
@@ -28,7 +28,11 @@ enum LanguageId {
LANGUAGE_GERMAN = 5,
};
+#if defined(ENGLISH)
#define GAME_LANGUAGE (LANGUAGE_ENGLISH)
+#elif defined(GERMAN)
+#define GAME_LANGUAGE (LANGUAGE_GERMAN)
+#endif
enum
{
@@ -152,7 +156,8 @@ struct Roamer
/*0x10*/ u8 cute;
/*0x11*/ u8 smart;
/*0x12*/ u8 tough;
- /*0x13*/ u8 active;
+ /*0x13*/ bool8 active;
+ /*0x14*/ u8 filler[0x8];
};
struct RamScriptData
@@ -291,7 +296,7 @@ struct UnkMauvilleOldManStruct2
u8 unk1;
u8 unk2;
u16 mauvilleOldMan_ecArray[10];
- u16 mauvilleOldMan_ecArray2[6];
+ u8 mauvilleOldMan_ecArray2[12];
u8 fillerF[0x2];
/* size = 0x2C */
};
@@ -382,10 +387,13 @@ struct SaveBlock1 /* 0x02025734 */
/*0x2B0D*/ u8 outbreakPokemonProbability;
/*0x2B0E*/ u16 outbreakUnk5;
/*0x2B10*/ u8 filler_2B0E[0xC];
- /*0x2B1C*/ u16 unk2B1C[4];
- /*0x2B24*/ u8 filler_2B24[0x28];
+ /*0x2B1C*/ u16 unk2B1C[6];
+ /*0x2B28*/ u16 unk2B28[6];
+ /*0x2B34*/ u16 unk2B34[6];
+ /*0x2B40*/ u16 unk2B40[6];
/*0x2B4C*/ struct MailStruct mail[16];
- /*0x2D8C*/ u8 filler_2D8C[0x8];
+ /*0x2D8C*/ u8 unk2D8C[4];
+ /*0x2D90*/ u8 filler_2D90[0x4];
/*0x2D94*/ OldMan oldMan;
/*0x2DC0*/ u8 unk_2DC0[0x14];
/*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff
@@ -395,11 +403,12 @@ struct SaveBlock1 /* 0x02025734 */
/*0x303C*/ u8 filler_303C[0x38];
/*0x3074*/ u8 filler_3074[0x42];
/*0x30B6*/ u8 filler_30B6;
- /*0x30B7*/ u8 filler_30B7[0x59];
+ /*0x30B7*/ u8 filler_30B7[1];
+ /*0x30B8*/ u8 linkBattleRecords[5][16];
+ /*0x3108*/ u8 filler_3108[8];
/*0x3110*/ u8 giftRibbons[7];
/*0x3117*/ u8 filler_311B[0x2D];
/*0x3144*/ struct Roamer roamer;
- /*0x3158*/ u8 filler_3158[0x8];
/*0x3160*/ struct EnigmaBerry enigmaBerry;
/*0x3690*/ struct RamScript ramScript;
/*0x3A7C*/ u8 filler_3A7C[0x10];
@@ -488,7 +497,7 @@ struct UnkStruct_8054FF8
// wasnt defined so I had to define it
struct HallOfFame
{
- u8 filler[0x1F00];
+ u8 filler[0x1F00];
};
extern struct HallOfFame gHallOfFame;
diff --git a/include/m4a.h b/include/m4a.h
index 949403885..b6c8f9072 100644
--- a/include/m4a.h
+++ b/include/m4a.h
@@ -9,6 +9,7 @@ void m4aSoundInit(void);
void m4aSoundMain(void);
void m4aSongNumStart(u16);
void m4aSongNumStop(u16 n);
+void m4aMPlayAllStop(void);
void m4aMPlayContinue(struct MusicPlayerInfo *mplayInfo);
void m4aMPlayFadeOut(struct MusicPlayerInfo *mplayInfo, u16 speed);
void m4aMPlayFadeOutTemporarily(struct MusicPlayerInfo *mplayInfo, u16 speed);
diff --git a/include/pokemon.h b/include/pokemon.h
index 39bde80cb..ae02de8ca 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -65,7 +65,7 @@
#define MON_DATA_SPD 61
#define MON_DATA_SPATK 62
#define MON_DATA_SPDEF 63
-#define MON_DATA_64 64
+#define MON_DATA_MAIL 64
#define MON_DATA_SPECIES2 65
#define MON_DATA_IVS 66
#define MON_DATA_CHAMPION_RIBBON 67
@@ -115,6 +115,9 @@
#define TYPE_DARK 0x11
#define PARTY_SIZE 6
+#define MAX_TOTAL_EVS 510
+#define NUM_STATS 6
+#define UNOWN_FORM_COUNT 28
enum {
NATURE_HARDY,
@@ -250,7 +253,7 @@ struct Pokemon
struct BoxPokemon box;
u32 status;
u8 level;
- u8 pokerus;
+ u8 mail;
u16 hp;
u16 maxHP;
u16 attack;
@@ -455,7 +458,7 @@ u8 GetNatureFromPersonality(u32 personality);
u16 nature_stat_mod(u8 nature, u16 n, u8 statIndex);
-void sub_8040B1C(void *);
+void MonRestorePP(struct Pokemon *);
u8 *sub_803F378(u16 itemId);
diff --git a/include/roamer.h b/include/roamer.h
new file mode 100644
index 000000000..9d5f3c4ed
--- /dev/null
+++ b/include/roamer.h
@@ -0,0 +1,11 @@
+#ifndef GUARD_ROAMER_H
+#define GUARD_ROAMER_H
+
+void ClearRoamerData(void);
+void ClearRoamerLocationData(void);
+void UpdateLocationHistoryForRoamer(void);
+void RoamerMoveToOtherLocationSet(void);
+void RoamerMove();
+u8 TryStartRoamerEncounter(void);
+
+#endif
diff --git a/include/songs.h b/include/songs.h
index 01ecf9fe0..244bb9808 100644
--- a/include/songs.h
+++ b/include/songs.h
@@ -117,9 +117,9 @@ enum
SE_PN_OFF,
SE_Z_SEARCH,
SE_TAMAGO,
- SE_TB_START,
- SE_TB_KON,
- SE_TB_KARA,
+ /*0x72*/ SE_TB_START,
+ /*0x73*/ SE_TB_KON,
+ /*0x74*/ SE_TB_KARA,
SE_BIDORO,
SE_W085,
SE_W085B,
diff --git a/include/string_util.h b/include/string_util.h
index c20965380..f45c2741f 100644
--- a/include/string_util.h
+++ b/include/string_util.h
@@ -16,6 +16,9 @@ u8 *StringAppend(u8 *dest, const u8 *src);
u8 *StringCopyN(u8 *dest, const u8 *src, u8 n);
u8 *StringAppendN(u8 *dest, const u8 *src, u8 n);
u16 StringLength(const u8 *str);
+#ifdef GERMAN
+s32 StringLengthN(const u8 *str, s32 n);
+#endif
s32 StringCompare(const u8 *str1, const u8 *str2);
s32 StringCompareN(const u8 *str1, const u8 *str2, u32 n);
u8 *ConvertIntToDecimalStringN(u8 *dest, s32 value, enum StringConvertMode mode, u8 n);
diff --git a/include/text.h b/include/text.h
index 4f52e3cdd..ba4ccb4b2 100644
--- a/include/text.h
+++ b/include/text.h
@@ -3,8 +3,13 @@
#define CHAR_SPACE 0x00
#define CHAR_QUESTION_MARK 0xAC
+#define CHAR_PERIOD 0xAD
#define CHAR_HYPHEN 0xAE
+#define CHAR_MALE 0xB5
+#define CHAR_FEMALE 0xB6
+#define CHAR_COMMA 0xB8
#define CHAR_CURRENCY 0xB7
+#define CHAR_SLASH 0xBA
#define CHAR_COLON 0xF0
#define EXT_CTRL_CODE_BEGIN 0xFC // extended control code
#define PLACEHOLDER_BEGIN 0xFD // string placeholder
@@ -155,7 +160,7 @@ u8 sub_8002F44(struct Window *win);
u8 sub_8003418(struct Window *win);
u8 sub_8003460(struct Window *win, const u8 *text, u16 tileDataStartOffset, u8 left, u8 top);
u8 sub_8003490(struct Window *win, u8 c, u16 tileDataStartOffset, u8 left, u8 top);
-void sub_80034D4(u8 *tileData, u8 *text);
+void sub_80034D4(u8 *tileData, const u8 *text);
u8 sub_80034EC(u8 *str);
u8 *sub_8003504(u8 *dest, s32 value, u8 alignAmount, u8 alignType);
u8 *sub_8003558(u8 *dest, const u8 *src, u8 alignAmount, u8 alignType);