diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/constants/berry.h | 7 | ||||
-rw-r--r-- | include/constants/heal_locations.h | 8 | ||||
-rwxr-xr-x | include/constants/map_types.h | 4 | ||||
-rw-r--r-- | include/constants/slot_machine.h | 42 | ||||
-rw-r--r-- | include/constants/trainer_types.h | 9 | ||||
-rw-r--r-- | include/global.fieldmap.h | 8 | ||||
-rw-r--r-- | include/global.h | 2 | ||||
-rw-r--r-- | include/graphics.h | 6 | ||||
-rw-r--r-- | include/item_use.h | 2 | ||||
-rw-r--r-- | include/librfu.h | 8 | ||||
-rwxr-xr-x | include/math_util.h | 18 | ||||
-rwxr-xr-x | include/pokemon_summary_screen.h | 7 | ||||
-rw-r--r-- | include/slot_machine.h | 15 |
13 files changed, 87 insertions, 49 deletions
diff --git a/include/constants/berry.h b/include/constants/berry.h index d413b9947..8f1e7cd82 100644 --- a/include/constants/berry.h +++ b/include/constants/berry.h @@ -25,4 +25,11 @@ #define BERRY_STAGE_BERRIES 5 #define BERRY_STAGE_SPARKLING 255 +// Berries can be watered in the following stages: +// - BERRY_STAGE_PLANTED +// - BERRY_STAGE_SPROUTED +// - BERRY_STAGE_TALLER +// - BERRY_STAGE_FLOWERING +#define NUM_WATER_STAGES 4 + #endif // GUARD_CONSTANTS_BERRY_H diff --git a/include/constants/heal_locations.h b/include/constants/heal_locations.h index 64c8956a9..272a69dfa 100644 --- a/include/constants/heal_locations.h +++ b/include/constants/heal_locations.h @@ -11,16 +11,16 @@ #define HEAL_LOCATION_LILYCOVE_CITY 8 #define HEAL_LOCATION_MOSSDEEP_CITY 9 #define HEAL_LOCATION_SOOTOPOLIS_CITY 10 -#define HEAL_LOCATION_EVER_GRANDE_CITY_1 11 -#define HEAL_LOCATION_LITTLEROOT_TOWN_1 12 -#define HEAL_LOCATION_LITTLEROOT_TOWN_2 13 +#define HEAL_LOCATION_EVER_GRANDE_CITY 11 +#define HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE 12 +#define HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE 13 #define HEAL_LOCATION_OLDALE_TOWN 14 #define HEAL_LOCATION_DEWFORD_TOWN 15 #define HEAL_LOCATION_LAVARIDGE_TOWN 16 #define HEAL_LOCATION_FALLARBOR_TOWN 17 #define HEAL_LOCATION_VERDANTURF_TOWN 18 #define HEAL_LOCATION_PACIFIDLOG_TOWN 19 -#define HEAL_LOCATION_EVER_GRANDE_CITY_2 20 +#define HEAL_LOCATION_EVER_GRANDE_CITY_POKEMON_LEAGUE 20 #define HEAL_LOCATION_SOUTHERN_ISLAND_EXTERIOR 21 #define HEAL_LOCATION_BATTLE_FRONTIER_OUTSIDE_EAST 22 diff --git a/include/constants/map_types.h b/include/constants/map_types.h index 8d071fd41..03a3f0a9a 100755 --- a/include/constants/map_types.h +++ b/include/constants/map_types.h @@ -1,14 +1,14 @@ #ifndef GUARD_CONSTANTS_MAP_TYPES_H #define GUARD_CONSTANTS_MAP_TYPES_H -#define MAP_TYPE_UNUSED_1 0 +#define MAP_TYPE_NONE 0 #define MAP_TYPE_TOWN 1 #define MAP_TYPE_CITY 2 #define MAP_TYPE_ROUTE 3 #define MAP_TYPE_UNDERGROUND 4 #define MAP_TYPE_UNDERWATER 5 #define MAP_TYPE_OCEAN_ROUTE 6 -#define MAP_TYPE_UNUSED_2 7 +#define MAP_TYPE_UNKNOWN 7 // Not used by any map. #define MAP_TYPE_INDOOR 8 #define MAP_TYPE_SECRET_BASE 9 diff --git a/include/constants/slot_machine.h b/include/constants/slot_machine.h new file mode 100644 index 000000000..9ecf46d79 --- /dev/null +++ b/include/constants/slot_machine.h @@ -0,0 +1,42 @@ +#ifndef GUARD_CONSTANTS_SLOT_MACHINE_H +#define GUARD_CONSTANTS_SLOT_MACHINE_H + +#define NUM_REELS 3 +#define REEL_NUM_TAGS 21 +#define REEL_TAG_HEIGHT 24 +#define SLOT_MACHINE_COUNT 12 + +// Lucky Flags +#define LUCKY_BIAS_REPLAY (1 << 0) +#define LUCKY_BIAS_CHERRY (1 << 1) +#define LUCKY_BIAS_LOTAD (1 << 2) +#define LUCKY_BIAS_AZURILL (1 << 3) +#define LUCKY_BIAS_POWER (1 << 4) +#define LUCKY_BIAS_REELTIME (1 << 5) +#define LUCKY_BIAS_MIXED_777 (1 << 6) +#define LUCKY_BIAS_777 (1 << 7) + +#define SLOT_MACHINE_TAG_7_RED 0 +#define SLOT_MACHINE_TAG_7_BLUE 1 +#define SLOT_MACHINE_TAG_AZURILL 2 +#define SLOT_MACHINE_TAG_LOTAD 3 +#define SLOT_MACHINE_TAG_CHERRY 4 +#define SLOT_MACHINE_TAG_POWER 5 +#define SLOT_MACHINE_TAG_REPLAY 6 + +#define SLOT_MACHINE_MATCHED_1CHERRY 0 +#define SLOT_MACHINE_MATCHED_2CHERRY 1 +#define SLOT_MACHINE_MATCHED_REPLAY 2 +#define SLOT_MACHINE_MATCHED_LOTAD 3 +#define SLOT_MACHINE_MATCHED_AZURILL 4 +#define SLOT_MACHINE_MATCHED_POWER 5 +#define SLOT_MACHINE_MATCHED_777_MIXED 6 +#define SLOT_MACHINE_MATCHED_777_RED 7 +#define SLOT_MACHINE_MATCHED_777_BLUE 8 +#define SLOT_MACHINE_MATCHED_NONE 9 + +#define LEFT_REEL 0 +#define MIDDLE_REEL 1 +#define RIGHT_REEL 2 + +#endif // GUARD_CONSTANTS_SLOT_MACHINE_H
\ No newline at end of file diff --git a/include/constants/trainer_types.h b/include/constants/trainer_types.h new file mode 100644 index 000000000..8886cf442 --- /dev/null +++ b/include/constants/trainer_types.h @@ -0,0 +1,9 @@ +#ifndef GUARD_CONSTANTS_TRAINER_TYPES_H +#define GUARD_CONSTANTS_TRAINER_TYPES_H + +#define TRAINER_TYPE_NONE 0 +#define TRAINER_TYPE_NORMAL 1 +#define TRAINER_TYPE_SEE_ALL_DIRECTIONS 2 +#define TRAINER_TYPE_BURIED 3 + +#endif // GUARD_CONSTANTS_TRAINER_TYPES_H diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 2e451a368..59610f9ad 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -54,7 +54,7 @@ struct ObjectEventTemplate { /*0x00*/ u8 localId; /*0x01*/ u8 graphicsId; - /*0x02*/ u8 unk2; + /*0x02*/ u8 inConnection; // Leftover from FRLG /*0x04*/ s16 x; /*0x06*/ s16 y; /*0x08*/ u8 elevation; @@ -144,9 +144,9 @@ struct MapHeader }; // Flags for gMapHeader.flags, as defined in the map_header_flags macro -#define MAP_ALLOW_BIKE (1 << 0) -#define MAP_ALLOW_ESCAPE_ROPE (1 << 1) -#define MAP_ALLOW_RUN (1 << 2) +#define MAP_ALLOW_CYCLING (1 << 0) +#define MAP_ALLOW_ESCAPING (1 << 1) // Escape Rope and Dig +#define MAP_ALLOW_RUNNING (1 << 2) #define MAP_SHOW_MAP_NAME (1 << 3) #define UNUSED_MAP_FLAGS (1 << 4 | 1 << 5 | 1 << 6 | 1 << 7) diff --git a/include/global.h b/include/global.h index bcf3e6486..2b03ebbe1 100644 --- a/include/global.h +++ b/include/global.h @@ -52,7 +52,7 @@ #define Q_4_12(n) ((s16)((n) * 4096)) // Converts a number to Q24.8 fixed-point format -#define Q_24_8(n) ((s32)((n) * 256)) +#define Q_24_8(n) ((s32)((n) << 8)) // Converts a Q8.8 fixed-point format number to a regular integer #define Q_8_8_TO_INT(n) ((int)((n) / 256)) diff --git a/include/graphics.h b/include/graphics.h index dad8dc1f1..b41a43095 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4048,11 +4048,11 @@ extern const u32 gMoveTypes_Pal[]; extern const u32 gStatusScreenBitmap[]; extern const u16 gSummaryScreenPowAcc_Tilemap[]; -extern const u16 gUnknown_08DC3C34[]; +extern const u16 gSummaryScreenAppealJam_Tilemap[]; extern const u32 gMoveTypes_Gfx[]; -extern const u32 gMoveSelectorBitmap[]; -extern const u32 gUnknown_08D97CF4[]; +extern const u32 gSummaryMoveSelect_Gfx[]; +extern const u32 gSummaryMoveSelect_Pal[]; extern const u32 gStatusGfx_Icons[]; extern const u32 gStatusPal_Icons[]; diff --git a/include/item_use.h b/include/item_use.h index 0cb76e7d4..f577f8d46 100644 --- a/include/item_use.h +++ b/include/item_use.h @@ -31,7 +31,7 @@ void ItemUseInBattle_PPRecovery(u8); void ItemUseInBattle_Escape(u8); void ItemUseInBattle_EnigmaBerry(u8); void Task_UseDigEscapeRopeOnField(u8 taskId); -u8 CanUseEscapeRopeOnCurrMap(void); +u8 CanUseDigOrEscapeRopeOnCurMap(void); u8 CheckIfItemIsTMHMOrEvolutionStone(u16 itemId); #endif // GUARD_ITEM_USE_H diff --git a/include/librfu.h b/include/librfu.h index 1baa4253e..69c696172 100644 --- a/include/librfu.h +++ b/include/librfu.h @@ -90,13 +90,8 @@ #define RFU_MBOOT_DOWNLOADER_SERIAL_NO 0x0000 // The game serial number of the multi-boot downloader (programs that boot without a Game Pak) -#if LIBRFU_VERSION >= 1028 -#define RFU_API_BUFF_SIZE_RAM 0x0e8c // Necessary size for buffer specified by rfu_initializeAPI (fast communication version that operates the library SIO interrupt routines in RAM) -#define RFU_API_BUFF_SIZE_ROM 0x052c // Necessary size for buffer specified by rfu_initializeAPI (fast communication version that operates the library SIO interrupt routines in ROM) -#else #define RFU_API_BUFF_SIZE_RAM 0x0e64 // Necessary size for buffer specified by rfu_initializeAPI (fast communication version that operates the library SIO interrupt routines in RAM) #define RFU_API_BUFF_SIZE_ROM 0x0504 // Necessary size for buffer specified by rfu_initializeAPI (fast communication version that operates the library SIO interrupt routines in ROM) -#endif #define RFU_CHILD_MAX 4 // Maximum number of slaves that can be connected to one parent device @@ -376,8 +371,7 @@ struct NIComm u16 state; // Communication state of slot u16 failCounter; // Count of failed transmissions/receptions (Count is increased when transmission/reception of data does not succeed within 1PF=16.7 ms) const u8 *now_p[WINDOW_COUNT]; // Address of current send/receive (The data is divided into WINDOW_COUNT blocks and sent in payloadSize units.) - // remainSize is u32 in SDK. This is a hack to match ASM - s32 remainSize; // Size of remaining communication data + u32 remainSize; // Size of remaining communication data u16 errorCode; // Error code u8 bmSlot; // Expresses the current communication slot in bits // (When sending from the Master, because multiple slaves can be specified with bmSlot, communications are terminated based on the failCounter for each child device) diff --git a/include/math_util.h b/include/math_util.h index 6b0d42460..04013fc03 100755 --- a/include/math_util.h +++ b/include/math_util.h @@ -1,14 +1,14 @@ #ifndef GUARD_MATH_UTIL_H #define GUARD_MATH_UTIL_H -s16 sub_8151534(s16 x, s16 y); -s16 sub_8151550(u8 s, s16 x, s16 y); -s32 sub_8151574(s32 x, s32 y); -s16 sub_81515B0(s16 x, s16 y); -s16 sub_81515D4(u8 s, s16 x, s16 y); -s32 sub_81515FC(s32 x, s32 y); -s16 sub_8151624(s16 y); -s16 sub_815163C(u8 s, s16 y); -s32 sub_815165C(s32 y); +s16 MathUtil_Mul16(s16 x, s16 y); +s16 MathUtil_Mul16Shift(u8 s, s16 x, s16 y); +s32 MathUtil_Mul32(s32 x, s32 y); +s16 MathUtil_Div16(s16 x, s16 y); +s16 MathUtil_Div16Shift(u8 s, s16 x, s16 y); +s32 MathUtil_Div32(s32 x, s32 y); +s16 MathUtil_Inv16(s16 y); +s16 MathUtil_Inv16Shift(u8 s, s16 y); +s32 MathUtil_Inv32(s32 y); #endif // GUARD_MATH_UTIL_H diff --git a/include/pokemon_summary_screen.h b/include/pokemon_summary_screen.h index 07d541cac..6413dcdec 100755 --- a/include/pokemon_summary_screen.h +++ b/include/pokemon_summary_screen.h @@ -9,10 +9,10 @@ extern const u8 *const gMoveDescriptionPointers[]; extern const u8 *const gNatureNamePointers[]; void ShowPokemonSummaryScreen(u8 mode, void *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void)); -void ShowSelectMovePokemonSummaryScreen(struct Pokemon *, u8, u8, MainCallback, u16); +void ShowSelectMovePokemonSummaryScreen(struct Pokemon *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void), u16 newMove); void ShowPokemonSummaryScreenSet40EF(u8 mode, struct BoxPokemon *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void)); u8 GetMoveSlotToReplace(void); -void SummaryScreen_SetUnknownTaskId(u8 a0); +void SummaryScreen_SetUnknownTaskId(u8 taskId); void SummaryScreen_DestroyUnknownTask(void); // The Pokemon Summary Screen can operate in different modes. Certain features, @@ -20,7 +20,7 @@ void SummaryScreen_DestroyUnknownTask(void); enum PokemonSummaryScreenMode { PSS_MODE_NORMAL, - PSS_MODE_UNK1, + PSS_MODE_LOCK_MOVES, PSS_MODE_BOX, PSS_MODE_SELECT_MOVE, }; @@ -31,6 +31,7 @@ enum PokemonSummaryScreenPage PSS_PAGE_SKILLS, PSS_PAGE_BATTLE_MOVES, PSS_PAGE_CONTEST_MOVES, + PSS_PAGE_COUNT, }; #endif // GUARD_POKEMON_SUMMARY_SCREEN_H diff --git a/include/slot_machine.h b/include/slot_machine.h index 1b22e165f..88bbbd91b 100644 --- a/include/slot_machine.h +++ b/include/slot_machine.h @@ -1,21 +1,6 @@ #ifndef GUARD_SLOT_MACHINE_H #define GUARD_SLOT_MACHINE_H -#define NUM_REELS 3 -#define REEL_NUM_TAGS 21 -#define REEL_TAG_HEIGHT 24 -#define SLOT_MACHINE_COUNT 12 - -// Lucky Flags -#define LUCKY_BIAS_REPLAY (1 << 0) -#define LUCKY_BIAS_CHERRY (1 << 1) -#define LUCKY_BIAS_LOTAD (1 << 2) -#define LUCKY_BIAS_AZURILL (1 << 3) -#define LUCKY_BIAS_POWER (1 << 4) -#define LUCKY_BIAS_REELTIME (1 << 5) -#define LUCKY_BIAS_MIXED_777 (1 << 6) -#define LUCKY_BIAS_777 (1 << 7) - void PlaySlotMachine(u8, void (callback)(void)); #endif // GUARD_SLOT_MACHINE_H |