2016-01-08 10:08:16 +01:00
|
|
|
#ifndef GUARD_GLOBAL_H
|
|
|
|
#define GUARD_GLOBAL_H
|
|
|
|
|
2016-10-31 09:14:22 +01:00
|
|
|
#include "gba/gba.h"
|
2016-01-08 10:08:16 +01:00
|
|
|
|
2017-01-15 00:17:51 +01:00
|
|
|
// Prevent cross-jump optimization.
|
|
|
|
#define BLOCK_CROSS_JUMP asm("");
|
|
|
|
|
|
|
|
// to help in decompiling
|
|
|
|
#define asm_comment(x) asm volatile("@ -- " x " -- ")
|
|
|
|
|
|
|
|
#define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0]))
|
|
|
|
|
|
|
|
#define POKEMON_NAME_LENGTH 10
|
|
|
|
#define OT_NAME_LENGTH 7
|
|
|
|
|
|
|
|
extern u8 gStringVar1[];
|
|
|
|
extern u8 gStringVar2[];
|
|
|
|
extern u8 gStringVar3[];
|
|
|
|
extern u8 gStringVar4[];
|
|
|
|
|
2017-01-14 20:53:20 +01:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
VERSION_SAPPHIRE = 1,
|
|
|
|
VERSION_RUBY = 2,
|
|
|
|
VERSION_EMERALD = 3,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum LanguageId {
|
|
|
|
LANGUAGE_JAPANESE = 1,
|
|
|
|
LANGUAGE_ENGLISH = 2,
|
|
|
|
LANGUAGE_GERMAN = 5,
|
|
|
|
};
|
|
|
|
|
|
|
|
#define GAME_LANGUAGE (LANGUAGE_ENGLISH)
|
|
|
|
|
|
|
|
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 SaveBlock2
|
|
|
|
{
|
|
|
|
/*0x00*/ u8 playerName[8];
|
|
|
|
/*0x08*/ u8 playerGender; // MALE, FEMALE
|
|
|
|
/*0x09*/ u8 specialSaveWarp;
|
|
|
|
/*0x0A*/ u8 playerTrainerId[4];
|
|
|
|
/*0x0E*/ u16 playTimeHours;
|
|
|
|
/*0x10*/ u8 playTimeMinutes;
|
|
|
|
/*0x11*/ u8 playTimeSeconds;
|
|
|
|
/*0x12*/ u8 playTimeVBlanks;
|
|
|
|
/*0x13*/ u8 optionsButtonMode; // OPTIONS_BUTTON_MODE_[NORMAL/LR/L_EQUALS_A]
|
|
|
|
/*0x14*/ u16 optionsTextSpeed:3; // OPTIONS_TEXT_SPEED_[SLOW/MID/FAST]
|
|
|
|
u16 optionsWindowFrameType:5; // Specifies one of the 20 decorative borders for text boxes
|
|
|
|
u16 optionsSound:1; // OPTIONS_SOUND_[MONO/STEREO]
|
|
|
|
u16 optionsBattleStyle:1; // OPTIONS_BATTLE_STYLE_[SHIFT/SET]
|
|
|
|
u16 optionsBattleSceneOff:1; // whether battle animations are disabled
|
|
|
|
u16 regionMapZoom:1; // whether the map is zoomed in
|
|
|
|
};
|
|
|
|
|
|
|
|
extern struct SaveBlock2 *gSaveBlock2Ptr;
|
|
|
|
|
2016-01-08 10:08:16 +01:00
|
|
|
#endif // GUARD_GLOBAL_H
|