diff options
Diffstat (limited to 'include/global.h')
-rw-r--r-- | include/global.h | 85 |
1 files changed, 10 insertions, 75 deletions
diff --git a/include/global.h b/include/global.h index b10f4af49..e1f63213a 100644 --- a/include/global.h +++ b/include/global.h @@ -4,6 +4,7 @@ #include "config.h" #include "gba/gba.h" #include <string.h> +#include "constants/global.h" // Prevent cross-jump optimization. #define BLOCK_CROSS_JUMP asm(""); @@ -39,10 +40,6 @@ // Converts a number to Q4.12 fixed-point format #define Q_4_12(n) ((s16)((n) * 4096)) -#define POKEMON_SLOTS_NUMBER 412 -#define POKEMON_NAME_LENGTH 10 -#define OT_NAME_LENGTH 7 - #define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) >= (b) ? (a) : (b)) @@ -72,81 +69,13 @@ #define TEST_BUTTON(field, button) ({(field) & (button);}) #define JOY_NEW(button) TEST_BUTTON(gMain.newKeys, button) #define JOY_HELD(button) TEST_BUTTON(gMain.heldKeys, button) +#define JOY_REPT(button) TEST_BUTTON(gMain.newAndRepeatedKeys, button) extern u8 gStringVar1[]; extern u8 gStringVar2[]; extern u8 gStringVar3[]; extern u8 gStringVar4[]; -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, - // 6 goes unused but the theory is it was meant to be Korean - LANGUAGE_SPANISH = 7, -}; - -#define GAME_LANGUAGE (LANGUAGE_ENGLISH) - -#define PC_ITEMS_COUNT 30 -#define BAG_ITEMS_COUNT 42 -#define BAG_KEYITEMS_COUNT 30 -#define BAG_POKEBALLS_COUNT 13 -#define BAG_TMHM_COUNT 58 -#define BAG_BERRIES_COUNT 43 - -enum -{ - MALE, - FEMALE -}; - -enum -{ - OPTIONS_BUTTON_MODE_NORMAL, - OPTIONS_BUTTON_MODE_LR, - OPTIONS_BUTTON_MODE_L_EQUALS_A -}; - -enum -{ - OPTIONS_TEXT_SPEED_SLOW, - OPTIONS_TEXT_SPEED_MID, - OPTIONS_TEXT_SPEED_FAST -}; - -enum -{ - OPTIONS_SOUND_MONO, - OPTIONS_SOUND_STEREO -}; - -enum -{ - OPTIONS_BATTLE_STYLE_SHIFT, - OPTIONS_BATTLE_STYLE_SET -}; - -enum -{ - BAG_ITEMS = 1, - BAG_POKEBALLS, - BAG_TMsHMs, - BAG_BERRIES, - BAG_KEYITEMS -}; - struct Coords16 { s16 x; @@ -280,7 +209,7 @@ struct SaveBlock2 { /*0x000*/ u8 playerName[PLAYER_NAME_LENGTH]; /*0x008*/ u8 playerGender; // MALE, FEMALE - /*0x009*/ u8 specialSaveWarp; + /*0x009*/ u8 specialSaveWarpFlags; /*0x00A*/ u8 playerTrainerId[4]; /*0x00E*/ u16 playTimeHours; /*0x010*/ u8 playTimeMinutes; @@ -797,8 +726,14 @@ struct SaveBlock1 /*0x3D38*/ struct TrainerTowerLog unkArray[4]; }; -extern struct SaveBlock1* gSaveBlock1Ptr; +struct MapPosition +{ + s16 x; + s16 y; + s8 height; +}; +extern struct SaveBlock1* gSaveBlock1Ptr; extern u8 gReservedSpritePaletteCount; #endif // GUARD_GLOBAL_H |