summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2020-01-08 18:09:24 -0500
committerGriffinR <griffin.g.richards@gmail.com>2020-01-08 18:09:24 -0500
commit31d31d326034fde26dedaf2dadb1c608e00fb92f (patch)
treebe13ed87df14390256c9a3e582fb11adbe4090b8 /include
parent26f7ba482384ad4f63063797a527b7fb33572aa1 (diff)
Sync compare macros, some event_scripts.s doc, begin map_scripts constants
Diffstat (limited to 'include')
-rw-r--r--include/constants/global.h82
-rw-r--r--include/constants/map_scripts.h12
-rw-r--r--include/constants/vars.h7
-rw-r--r--include/global.h4
-rw-r--r--include/strings.h2
5 files changed, 50 insertions, 57 deletions
diff --git a/include/constants/global.h b/include/constants/global.h
index 68c4f8246..4a4c83c62 100644
--- a/include/constants/global.h
+++ b/include/constants/global.h
@@ -7,24 +7,19 @@
#define POKEMON_NAME_LENGTH 10
#define OT_NAME_LENGTH 7
-enum
-{
- VERSION_SAPPHIRE = 1,
- VERSION_RUBY = 2,
- VERSION_EMERALD = 3,
- VERSION_FIRE_RED = 4,
- VERSION_LEAF_GREEN = 5,
-};
-
-enum LanguageId {
- LANGUAGE_JAPANESE = 1,
- LANGUAGE_ENGLISH = 2,
- LANGUAGE_FRENCH = 3,
- LANGUAGE_ITALIAN = 4,
- LANGUAGE_GERMAN = 5,
+#define VERSION_SAPPHIRE 1
+#define VERSION_RUBY 2
+#define VERSION_EMERALD 3
+#define VERSION_FIRE_RED 4
+#define VERSION_LEAF_GREEN 5
+
+#define LANGUAGE_JAPANESE 1
+#define LANGUAGE_ENGLISH 2
+#define LANGUAGE_FRENCH 3
+#define LANGUAGE_ITALIAN 4
+#define LANGUAGE_GERMAN 5
// 6 goes unused but the theory is it was meant to be Korean
- LANGUAGE_SPANISH = 7,
-};
+#define LANGUAGE_SPANISH 7
#ifdef ENGLISH
#define GAME_LANGUAGE (LANGUAGE_ENGLISH)
@@ -37,49 +32,32 @@ enum LanguageId {
#define BAG_TMHM_COUNT 58
#define BAG_BERRIES_COUNT 43
-enum
-{
- MALE,
- FEMALE
-};
+#define MALE 0
+#define FEMALE 1
-enum
-{
- OPTIONS_BUTTON_MODE_HELP,
- OPTIONS_BUTTON_MODE_LR,
- OPTIONS_BUTTON_MODE_L_EQUALS_A
-};
+#define OPTIONS_BUTTON_MODE_HELP 0
+#define OPTIONS_BUTTON_MODE_LR 1
+#define OPTIONS_BUTTON_MODE_L_EQUALS_A 2
-enum
-{
- OPTIONS_TEXT_SPEED_SLOW,
- OPTIONS_TEXT_SPEED_MID,
- OPTIONS_TEXT_SPEED_FAST
-};
+#define OPTIONS_TEXT_SPEED_SLOW 0
+#define OPTIONS_TEXT_SPEED_MID 1
+#define OPTIONS_TEXT_SPEED_FAST 2
-enum
-{
- OPTIONS_SOUND_MONO,
- OPTIONS_SOUND_STEREO
-};
+#define OPTIONS_SOUND_MONO 0
+#define OPTIONS_SOUND_STEREO 1
-enum
-{
- OPTIONS_BATTLE_STYLE_SHIFT,
- OPTIONS_BATTLE_STYLE_SET
-};
+#define OPTIONS_BATTLE_STYLE_SHIFT 0
+#define OPTIONS_BATTLE_STYLE_SET 1
-enum
-{
- POCKET_ITEMS = 1,
- POCKET_KEY_ITEMS,
- POCKET_POKE_BALLS,
- POCKET_TM_CASE,
- POCKET_BERRY_POUCH,
-};
+#define POCKET_ITEMS 1
+#define POCKET_KEY_ITEMS 2
+#define POCKET_POKE_BALLS 3
+#define POCKET_TM_CASE 4
+#define POCKET_BERRY_POUCH 5
#define NUM_BAG_POCKETS 5
+#define PARTY_SIZE 6
#define MULTI_PARTY_SIZE PARTY_SIZE / 2
#endif //GUARD_CONSTANTS_GLOBAL_H
diff --git a/include/constants/map_scripts.h b/include/constants/map_scripts.h
new file mode 100644
index 000000000..2ef3d2544
--- /dev/null
+++ b/include/constants/map_scripts.h
@@ -0,0 +1,12 @@
+#ifndef GUARD_CONSTANTS_MAP_SCRIPTS_H
+#define GUARD_CONSTANTS_MAP_SCRIPTS_H
+
+#define MAP_SCRIPT_ON_LOAD 1
+#define MAP_SCRIPT_ON_FRAME_TABLE 2
+#define MAP_SCRIPT_ON_TRANSITION 3
+#define MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE 4
+#define MAP_SCRIPT_ON_RESUME 5
+#define MAP_SCRIPT_ON_DIVE_WARP 6
+#define MAP_SCRIPT_ON_RETURN_TO_FIELD 7
+
+#endif // GUARD_CONSTANTS_MAP_SCRIPTS_H
diff --git a/include/constants/vars.h b/include/constants/vars.h
index 3f171ede8..3635aef6b 100644
--- a/include/constants/vars.h
+++ b/include/constants/vars.h
@@ -303,7 +303,10 @@
#define VAR_0x40FE 0x40FE
#define VAR_0x40FF 0x40FF
-#define SPECIAL_VARS_START 0x8000
+#define VARS_END 0x40FF
+
+#define SPECIAL_VARS_START 0x8000
+
#define VAR_0x8000 0x8000
#define VAR_0x8001 0x8001
#define VAR_0x8002 0x8002
@@ -326,4 +329,6 @@
#define VAR_MON_BOX_POS 0x8013
#define VAR_TEXT_COLOR 0x8014
+#define SPECIAL_VARS_END 0x8014
+
#endif // GUARD_CONSTANTS_VARS_H
diff --git a/include/global.h b/include/global.h
index f4d21704b..d8ea62d5c 100644
--- a/include/global.h
+++ b/include/global.h
@@ -295,8 +295,6 @@ struct SaveBlock2
extern struct SaveBlock2 *gSaveBlock2Ptr;
-#define PARTY_SIZE 6
-
struct SecretBaseParty
{
u32 personality[PARTY_SIZE];
@@ -406,7 +404,7 @@ struct UnkMauvilleOldManStruct
u8 unk_2D95;
/*0x2D96*/ u16 mauvilleOldMan_ecArray[6];
/*0x2DA2*/ u16 mauvilleOldMan_ecArray2[6];
- /*0x2DAE*/ u8 playerName[8];
+ /*0x2DAE*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
/*0x2DB6*/ u8 filler_2DB6[0x3];
/*0x2DB9*/ u8 playerTrainerId[4];
u8 unk_2DBD;
diff --git a/include/strings.h b/include/strings.h
index 90fd49b52..4379ebb65 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -823,7 +823,7 @@ extern const u8 gText_Tough_2[];
extern const u8 gText_Items[];
extern const u8 gText_KeyItems[];
extern const u8 gText_PokeBalls[];
-extern const u8 gText_TmsgUnknown_8417B2CHms[];
+extern const u8 gText_TMsAndHMs[];
extern const u8 gText_Berries[];
extern const u8 gText_Boulderbadge[];
extern const u8 gText_Cascadebadge[];