diff options
35 files changed, 188 insertions, 208 deletions
diff --git a/asm/trade.s b/asm/trade.s index eb2d22b06..b833240dd 100644 --- a/asm/trade.s +++ b/asm/trade.s @@ -1,6 +1,6 @@ .include "asm/macros.inc" .include "constants/gba_constants.inc" - .include "constants/misc_constants.inc" + .include "constants/global.inc" .syntax unified @@ -2399,7 +2399,7 @@ _08078726: bne _08078766 adds r0, r4, 0 movs r1, 0x2 - ldr r2, =gSpeciesNames + 303 * POKEMON_NAME_LENGTH @ SPECIES_SHEDINJA + ldr r2, =gSpeciesNames + 303 * 11 @ SPECIES_SHEDINJA * POKEMON_NAME_LENGTH + 1 bl SetMonData _08078766: adds r4, 0x64 diff --git a/constants/constants.inc b/constants/constants.inc index 38887dd28..7c74c8e87 100644 --- a/constants/constants.inc +++ b/constants/constants.inc @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "constants/misc_constants.inc" + .include "constants/global.inc" .include "constants/contest_constants.inc" .include "constants/pokemon_data_constants.inc" .include "constants/berry_constants.inc" diff --git a/constants/misc_constants.inc b/constants/global.inc index 5fa58cfe8..621ba2af8 100644 --- a/constants/misc_constants.inc +++ b/constants/global.inc @@ -3,9 +3,6 @@ .set NULL, 0 - .set POKEMON_NAME_LENGTH, 11 - .set MOVE_NAME_LENGTH, 13 - .set SPRITE_SIZE_8x8, (OAM_SIZE_0 >> 28) | (OAM_SQUARE >> 14) .set SPRITE_SIZE_16x16, (OAM_SIZE_1 >> 28) | (OAM_SQUARE >> 14) .set SPRITE_SIZE_32x32, (OAM_SIZE_2 >> 28) | (OAM_SQUARE >> 14) diff --git a/data/event_scripts.s b/data/event_scripts.s index 92b0d504d..6a3a2f2f6 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -1,3 +1,4 @@ +#include "constants/global.h" #include "constants/battle_frontier.h" #include "constants/battle_setup.h" #include "constants/event_objects.h" @@ -1792,9 +1793,9 @@ Route110_EventScript_271ED7:: @ 8271ED7 Route119_EventScript_271ED7:: @ 8271ED7 RustboroCity_EventScript_271ED7:: @ 8271ED7 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq RustboroCity_EventScript_271EEF - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq RustboroCity_EventScript_271EF5 end @@ -1810,9 +1811,9 @@ LavaridgeTown_EventScript_271EFB:: @ 8271EFB Route110_EventScript_271EFB:: @ 8271EFB Route119_EventScript_271EFB:: @ 8271EFB checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq LavaridgeTown_EventScript_271F13 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq LavaridgeTown_EventScript_271F19 end @@ -1826,9 +1827,9 @@ LavaridgeTown_EventScript_271F19:: @ 8271F19 EventScript_271F1F:: @ 8271F1F checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq EventScript_271F37 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq EventScript_271F3D end diff --git a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc index c6f06631c..cec596b2d 100644 --- a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc @@ -17,9 +17,9 @@ BattleFrontier_BattleArenaBattleRoom_MapScript1_2574A0: @ 82574A0 BattleFrontier_BattleArenaBattleRoom_EventScript_2574AE:: @ 82574AE checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_2574C6 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_2574CC return diff --git a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc index ab0736581..d92c6cbf4 100644 --- a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc @@ -20,9 +20,9 @@ BattleFrontier_BattleDomeBattleRoom_MapScript1_24BCB1: @ 824BCB1 BattleFrontier_BattleArenaBattleRoom_EventScript_24BCDC:: @ 824BCDC BattleFrontier_BattleDomeBattleRoom_EventScript_24BCDC:: @ 824BCDC checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_24BCF4 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_24BCFA return diff --git a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc index 794dd9d1e..8c22a9bc9 100644 --- a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc @@ -8,9 +8,9 @@ BattleFrontier_BattleFactoryBattleRoom_MapScript1_25ADBB: @ 825ADBB setvar VAR_0x8004, 5 special CallFrontierUtilFunc checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_25AE25 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_25AE2B setvar VAR_0x8004, 9 special CallFrontierUtilFunc diff --git a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc index c09c9e61c..529bcd0c3 100644 --- a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc @@ -12,9 +12,9 @@ BattleFrontier_BattlePalaceBattleRoom_MapScript1_24F825: @ 824F825 BattleFrontier_BattlePalaceBattleRoom_EventScript_24F833:: @ 824F833 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24F84B - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24F856 return diff --git a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc index 8da9ae712..149c54cd8 100644 --- a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc +++ b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc @@ -53,16 +53,16 @@ EverGrandeCity_ChampionsRoom_EventScript_228A61:: @ 8228A61 closemessage playse SE_DOOR checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq EverGrandeCity_ChampionsRoom_EventScript_228ABC - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq EverGrandeCity_ChampionsRoom_EventScript_228AC1 addobject 2 call EverGrandeCity_ChampionsRoom_EventScript_228BFD checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq EverGrandeCity_ChampionsRoom_EventScript_228AC6 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq EverGrandeCity_ChampionsRoom_EventScript_228AFB end @@ -128,9 +128,9 @@ EverGrandeCity_ChampionsRoom_EventScript_228B30:: @ 8228B30 waitmovement 0 msgbox EverGrandeCity_ChampionsRoom_Text_2293EB, MSGBOX_DEFAULT checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq EverGrandeCity_ChampionsRoom_EventScript_228BEB - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq EverGrandeCity_ChampionsRoom_EventScript_228BF4 closemessage applymovement 1, EverGrandeCity_ChampionsRoom_Movement_228C3F diff --git a/data/maps/EverGrandeCity_HallOfFame/scripts.inc b/data/maps/EverGrandeCity_HallOfFame/scripts.inc index 9b9bdb5d6..ddb9ade89 100644 --- a/data/maps/EverGrandeCity_HallOfFame/scripts.inc +++ b/data/maps/EverGrandeCity_HallOfFame/scripts.inc @@ -44,9 +44,9 @@ EverGrandeCity_HallOfFame_EventScript_229850:: @ 8229850 setvar VAR_TEMP_1, 1 call EverGrandeCity_HallOfFame_EventScript_2717C1 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq EverGrandeCity_HallOfFame_EventScript_2298E9 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq EverGrandeCity_HallOfFame_EventScript_2298F5 end diff --git a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc index a7bf0ae62..dff1d26e0 100644 --- a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc @@ -10,9 +10,9 @@ FallarborTown_BattleTentBattleRoom_MapScript1_2008A9: @ 82008A9 FallarborTown_BattleTentBattleRoom_EventScript_2008AF:: @ 82008AF checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_2008C7 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_2008D2 return diff --git a/data/maps/InsideOfTruck/scripts.inc b/data/maps/InsideOfTruck/scripts.inc index 53bdc073a..858975d7a 100644 --- a/data/maps/InsideOfTruck/scripts.inc +++ b/data/maps/InsideOfTruck/scripts.inc @@ -17,9 +17,9 @@ InsideOfTruck_EventScript_23BF04:: @ 823BF04 lockall setflag FLAG_SPECIAL_FLAG_0x4000 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq InsideOfTruck_EventScript_23BF20 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq InsideOfTruck_EventScript_23BF46 end diff --git a/data/maps/LavaridgeTown/scripts.inc b/data/maps/LavaridgeTown/scripts.inc index f210a9d11..8d7ab36db 100644 --- a/data/maps/LavaridgeTown/scripts.inc +++ b/data/maps/LavaridgeTown/scripts.inc @@ -53,18 +53,18 @@ LavaridgeTown_EventScript_1EA551:: @ 81EA551 call_if_ne LavaridgeTown_EventScript_1EA65C delay 20 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq LavaridgeTown_EventScript_1EA630 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq LavaridgeTown_EventScript_1EA635 compare VAR_0x8008, 9 call_if_eq LavaridgeTown_EventScript_1EA6A1 compare VAR_0x8008, 9 call_if_ne LavaridgeTown_EventScript_1EA6AC checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq LavaridgeTown_EventScript_1EA5B5 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq LavaridgeTown_EventScript_1EA5DA end diff --git a/data/maps/LilycoveCity/scripts.inc b/data/maps/LilycoveCity/scripts.inc index 515754f8c..20baacc89 100644 --- a/data/maps/LilycoveCity/scripts.inc +++ b/data/maps/LilycoveCity/scripts.inc @@ -231,9 +231,9 @@ LilycoveCity_EventScript_1E2DDE:: @ 81E2DDE lock faceplayer checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq LilycoveCity_EventScript_1E2DF8 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq LilycoveCity_EventScript_1E2E6B end diff --git a/data/maps/LittlerootTown/scripts.inc b/data/maps/LittlerootTown/scripts.inc index 9f589d2e4..c0147fedd 100644 --- a/data/maps/LittlerootTown/scripts.inc +++ b/data/maps/LittlerootTown/scripts.inc @@ -68,9 +68,9 @@ LittlerootTown_EventScript_1E7E92:: @ 81E7E92 clearflag FLAG_HIDE_LITTLEROOT_TOWN_MOM_OUTSIDE setobjectmovementtype 4, 8 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq LittlerootTown_EventScript_1E7EB1 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq LittlerootTown_EventScript_1E7EB9 return @@ -381,9 +381,9 @@ LittlerootTown_EventScript_1E815A:: @ 81E815A LittlerootTown_EventScript_1E8163:: @ 81E8163 lockall checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq LittlerootTown_EventScript_1E817D - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq LittlerootTown_EventScript_1E8186 releaseall end @@ -399,9 +399,9 @@ LittlerootTown_EventScript_1E8186:: @ 81E8186 LittlerootTown_EventScript_1E818F:: @ 81E818F lockall checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq LittlerootTown_EventScript_1E81A9 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq LittlerootTown_EventScript_1E81B2 releaseall end @@ -454,27 +454,27 @@ LittlerootTown_EventScript_1E8205:: @ 81E8205 LittlerootTown_EventScript_1E8211:: @ 81E8211 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq LittlerootTown_EventScript_1E8297 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq LittlerootTown_EventScript_1E82A2 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq LittlerootTown_EventScript_1E8281 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq LittlerootTown_EventScript_1E828C msgbox LittlerootTown_Text_1E87E1, MSGBOX_DEFAULT closemessage checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq LittlerootTown_EventScript_1E82AD - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq LittlerootTown_EventScript_1E82F0 call LittlerootTown_EventScript_1E8693 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq LittlerootTown_EventScript_1E8405 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq LittlerootTown_EventScript_1E8448 goto LittlerootTown_EventScript_1E8686 end @@ -889,9 +889,9 @@ LittlerootTown_EventScript_1E863D:: @ 81E863D lock faceplayer checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq LittlerootTown_EventScript_1E8281 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq LittlerootTown_EventScript_1E828C call LittlerootTown_EventScript_1E8693 applymovement 4, LittlerootTown_Movement_2725A6 diff --git a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc index 096f35c1e..1093e5277 100644 --- a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc +++ b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc @@ -247,9 +247,9 @@ LittlerootTown_BrendansHouse_2F_Movement_1F8609: @ 81F8609 EventScript_PlayerPCMale:: @ 81F860D lockall checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F8626 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F864C end diff --git a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc index e0cb7dfe7..4d6661ad7 100644 --- a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc +++ b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc @@ -251,9 +251,9 @@ LittlerootTown_MaysHouse_2F_EventScript_1F94C1:: @ 81F94C1 lockall goto_if_set FLAG_0x124, LittlerootTown_BrendansHouse_2F_EventScript_1F94F7 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F94E3 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F94ED end @@ -271,9 +271,9 @@ LittlerootTown_BrendansHouse_2F_EventScript_1F94F7:: @ 81F94F7 applymovement VAR_LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_27259E waitmovement 0 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F951D - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F952F setflag FLAG_0x125 releaseall @@ -300,9 +300,9 @@ LittlerootTown_BrendansHouse_2F_EventScript_1F954A:: @ 81F954A EventScript_PlayerPCFemale:: @ 81F9553 lockall checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_1F956C - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_1F9576 end diff --git a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc index 3534047ae..b5dc7d060 100644 --- a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc +++ b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc @@ -171,9 +171,9 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1F9E80:: @ 81F9E80 applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_ProfessorBirchsLab_Movement_2725A4 waitmovement 0 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1F9F32 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1F9F3C playse SE_PC_ON waitse @@ -533,9 +533,9 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA2F8:: @ 81FA2F8 applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_ProfessorBirchsLab_Movement_2725A8 waitmovement 0 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA352 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA37F setvar VAR_0x4084, 5 setflag FLAG_0x074 @@ -605,9 +605,9 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA3EC:: @ 81FA3EC compare VAR_0x40D3, 2 goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_1FA490 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA428 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA431 release end @@ -622,9 +622,9 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA431:: @ 81FA431 LittlerootTown_ProfessorBirchsLab_EventScript_1FA43A:: @ 81FA43A checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA453 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA45C release end @@ -639,9 +639,9 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA45C:: @ 81FA45C LittlerootTown_ProfessorBirchsLab_EventScript_1FA465:: @ 81FA465 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA47E - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA487 release end @@ -656,9 +656,9 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA487:: @ 81FA487 LittlerootTown_ProfessorBirchsLab_EventScript_1FA490:: @ 81FA490 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA4A9 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA4B2 release end diff --git a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc index c4b106589..e55bc07f7 100644 --- a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc +++ b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc @@ -349,9 +349,9 @@ MossdeepCity_SpaceCenter_2F_EventScript_224166:: @ 8224166 MossdeepCity_SpaceCenter_2F_EventScript_224175:: @ 8224175 lockall checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq MossdeepCity_SpaceCenter_2F_EventScript_224193 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq MossdeepCity_SpaceCenter_2F_EventScript_22419A closemessage clearflag FLAG_0x075 diff --git a/data/maps/OldaleTown/scripts.inc b/data/maps/OldaleTown/scripts.inc index 96863ceed..a246adc4f 100644 --- a/data/maps/OldaleTown/scripts.inc +++ b/data/maps/OldaleTown/scripts.inc @@ -255,9 +255,9 @@ OldaleTown_EventScript_1E90C6:: @ 81E90C6 OldaleTown_EventScript_1E90E6:: @ 81E90E6 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq OldaleTown_EventScript_1E90FE - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq OldaleTown_EventScript_1E910C end diff --git a/data/maps/Route101/scripts.inc b/data/maps/Route101/scripts.inc index deea27e74..e7f5f0af6 100644 --- a/data/maps/Route101/scripts.inc +++ b/data/maps/Route101/scripts.inc @@ -238,9 +238,9 @@ Route101_EventScript_1EBE16:: @ 81EBE16 setvar VAR_0x4060, 3 clearflag FLAG_SPECIAL_FLAG_0x4000 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq Route101_EventScript_1EBE85 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq Route101_EventScript_1EBE89 warp MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB, 255, 6, 5 waitstate diff --git a/data/maps/Route103/scripts.inc b/data/maps/Route103/scripts.inc index 6b793286e..463db7b49 100644 --- a/data/maps/Route103/scripts.inc +++ b/data/maps/Route103/scripts.inc @@ -20,9 +20,9 @@ Route103_EventScript_1EC3AE:: @ 81EC3AE Route103_EventScript_1EC3C1:: @ 81EC3C1 lockall checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq Route103_EventScript_1EC3DA - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq Route103_EventScript_1EC434 end diff --git a/data/maps/Route104/scripts.inc b/data/maps/Route104/scripts.inc index 2dfb42d74..1b3adf2a2 100644 --- a/data/maps/Route104/scripts.inc +++ b/data/maps/Route104/scripts.inc @@ -72,9 +72,9 @@ Route104_EventScript_1ECCB3:: @ 81ECCB3 Route104_EventScript_1ECD11:: @ 81ECD11 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq Route104_EventScript_1ECD29 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq Route104_EventScript_1ECD2E return @@ -88,9 +88,9 @@ Route104_EventScript_1ECD2E:: @ 81ECD2E Route104_EventScript_1ECD33:: @ 81ECD33 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq Route104_EventScript_1ECD4B - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq Route104_EventScript_1ECE6F end diff --git a/data/maps/Route110/scripts.inc b/data/maps/Route110/scripts.inc index ba7bced21..4e96a592c 100644 --- a/data/maps/Route110/scripts.inc +++ b/data/maps/Route110/scripts.inc @@ -379,9 +379,9 @@ Route110_EventScript_1EF763:: @ 81EF763 Route110_EventScript_1EF76E:: @ 81EF76E lockall checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq Route110_EventScript_1EF7E1 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq Route110_EventScript_1EF7E6 applymovement 28, Route110_Movement_2725AA waitmovement 0 @@ -397,9 +397,9 @@ Route110_EventScript_1EF76E:: @ 81EF76E compare VAR_0x8008, 3 call_if_eq Route110_EventScript_1EF964 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq Route110_EventScript_1EF7EB - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq Route110_EventScript_1EF865 releaseall end diff --git a/data/maps/Route111/scripts.inc b/data/maps/Route111/scripts.inc index 6b8763fd7..ad6a16572 100644 --- a/data/maps/Route111/scripts.inc +++ b/data/maps/Route111/scripts.inc @@ -53,9 +53,9 @@ Route111_MapScript1_1F0D87: @ 81F0D87 Route111_EventScript_1F0DC2:: @ 81F0DC2 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq Route111_EventScript_1F0DDA - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq Route111_EventScript_1F0DE0 return diff --git a/data/maps/Route119/scripts.inc b/data/maps/Route119/scripts.inc index 229db6da5..978067ddf 100644 --- a/data/maps/Route119/scripts.inc +++ b/data/maps/Route119/scripts.inc @@ -42,9 +42,9 @@ Route119_EventScript_1F4488:: @ 81F4488 lockall addobject 25 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq Route119_EventScript_1F4501 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq Route119_EventScript_1F4506 delay 65 compare VAR_TEMP_1, 1 @@ -62,9 +62,9 @@ Route119_EventScript_1F4488:: @ 81F4488 addobject 16 delay 30 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq Route119_EventScript_1F450B - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq Route119_EventScript_1F4585 releaseall end diff --git a/data/maps/RustboroCity/scripts.inc b/data/maps/RustboroCity/scripts.inc index 941f73161..345faa51c 100644 --- a/data/maps/RustboroCity/scripts.inc +++ b/data/maps/RustboroCity/scripts.inc @@ -677,9 +677,9 @@ RustboroCity_EventScript_1E0DB8:: @ 81E0DB8 Route104_EventScript_1E0DD1:: @ 81E0DD1 RustboroCity_EventScript_1E0DD1:: @ 81E0DD1 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq RustboroCity_EventScript_1E0DE9 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq RustboroCity_EventScript_1E0DEE return @@ -821,9 +821,9 @@ RustboroCity_EventScript_1E0FB3:: @ 81E0FB3 RustboroCity_EventScript_1E0FF3:: @ 81E0FF3 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq RustboroCity_EventScript_1E100B - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq RustboroCity_EventScript_1E1114 end diff --git a/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc b/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc index 74c64d0f2..9df0e0a6a 100644 --- a/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc +++ b/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc @@ -10,9 +10,9 @@ SlateportCity_BattleTentBattleRoom_MapScript1_209970: @ 8209970 SlateportCity_BattleTentBattleRoom_EventScript_209976:: @ 8209976 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq SlateportCity_BattleTentBattleRoom_EventScript_20998E - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq SlateportCity_BattleTentBattleRoom_EventScript_209994 return diff --git a/data/maps/SouthernIsland_Interior/scripts.inc b/data/maps/SouthernIsland_Interior/scripts.inc index 13b38c835..31675c905 100644 --- a/data/maps/SouthernIsland_Interior/scripts.inc +++ b/data/maps/SouthernIsland_Interior/scripts.inc @@ -34,9 +34,9 @@ SouthernIsland_Interior_EventScript_242A95:: @ 8242A95 SouthernIsland_Interior_EventScript_242AA0:: @ 8242AA0 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq SouthernIsland_Interior_EventScript_242AB8 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq SouthernIsland_Interior_EventScript_242ABE end diff --git a/data/maps/UnknownMap_25_34/scripts.inc b/data/maps/UnknownMap_25_34/scripts.inc index efb82a907..fe88972df 100644 --- a/data/maps/UnknownMap_25_34/scripts.inc +++ b/data/maps/UnknownMap_25_34/scripts.inc @@ -442,9 +442,9 @@ LinkContestRoom1_EventScript_23BEAC:: @ 823BEAC LilycoveCity_ContestLobby_EventScript_23BEB6:: @ 823BEB6 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq LilycoveCity_ContestLobby_EventScript_23BECE - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq LilycoveCity_ContestLobby_EventScript_23BED4 return diff --git a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc index e6a61184e..52aed7618 100644 --- a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc @@ -10,9 +10,9 @@ VerdanturfTown_BattleTentBattleRoom_MapScript1_20230A: @ 820230A VerdanturfTown_BattleTentBattleRoom_EventScript_202310:: @ 8202310 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE goto_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_202328 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE goto_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_202333 return diff --git a/data/scripts/players_house.inc b/data/scripts/players_house.inc index f9c6cf24e..166134abf 100644 --- a/data/scripts/players_house.inc +++ b/data/scripts/players_house.inc @@ -68,9 +68,9 @@ LittlerootTown_MaysHouse_2F_EventScript_292799:: @ 8292799 setflag FLAG_HIDE_LITTLEROOT_TOWN_PLAYERS_HOUSE_VIGOROTH_1 setflag FLAG_HIDE_LITTLEROOT_TOWN_PLAYERS_HOUSE_VIGOROTH_2 checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_2927DF - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_29280F playse SE_KAIDAN removeobject VAR_0x8008 @@ -438,9 +438,9 @@ LittlerootTown_BrendansHouse_1F_EventScript_292AF2:: @ 8292AF2 LittlerootTown_MaysHouse_1F_EventScript_292AF2:: @ 8292AF2 lockall checkplayergender - compare VAR_RESULT, 0 + compare VAR_RESULT, MALE call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292C76 - compare VAR_RESULT, 1 + compare VAR_RESULT, FEMALE call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292C86 compare VAR_0x8008, 0 call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D08 diff --git a/include/constants/global.h b/include/constants/global.h new file mode 100644 index 000000000..ff28d6a4b --- /dev/null +++ b/include/constants/global.h @@ -0,0 +1,77 @@ +#ifndef GUARD_CONSTANTS_GLOBAL_H +#define GUARD_CONSTANTS_GLOBAL_H +// Invalid Versions show as "----------" in Gen 4 and Gen 5's summary screen. +// In Gens 6 and 7, invalid versions instead show "a distant land" in the summary screen. +// In Gen 4 only, migrated Pokemon with Diamond, Pearl, or Platinum's ID show as "----------". +// Gen 5 and up read Diamond, Pearl, or Platinum's ID as "Sinnoh". +// In Gen 4 and up, migrated Pokemon with HeartGold or SoulSilver's ID show the otherwise unused "Johto" string. +#define VERSION_SAPPHIRE 1 +#define VERSION_RUBY 2 +#define VERSION_EMERALD 3 +#define VERSION_FIRE_RED 4 +#define VERSION_LEAF_GREEN 5 +#define VERSION_HEART_GOLD 7 +#define VERSION_SOUL_SILVER 8 +#define VERSION_DIAMOND 10 +#define VERSION_PEARL 11 +#define VERSION_PLATINUM 12 +#define VERSION_GAMECUBE 15 + +#define LANGUAGE_JAPANESE 1 +#define LANGUAGE_ENGLISH 2 +#define LANGUAGE_FRENCH 3 +#define LANGUAGE_ITALIAN 4 +#define LANGUAGE_GERMAN 5 +#define LANGUAGE_KOREAN 6 // 6 goes unused but the theory is it was meant to be Korean +#define LANGUAGE_SPANISH 7 + +#define GAME_VERSION (VERSION_EMERALD) +#define GAME_LANGUAGE (LANGUAGE_ENGLISH) + +// capacities of various saveblock objects +#define DAYCARE_MON_COUNT 2 +#define POKEBLOCKS_COUNT 40 +#define EVENT_OBJECTS_COUNT 16 +#define BERRY_TREES_COUNT 128 +#define FLAGS_COUNT 300 +#define VARS_COUNT 256 +#define MAIL_COUNT 16 +#define SECRET_BASES_COUNT 20 +#define TV_SHOWS_COUNT 25 +#define POKE_NEWS_COUNT 16 +#define PC_ITEMS_COUNT 50 +#define BAG_ITEMS_COUNT 30 +#define BAG_KEYITEMS_COUNT 30 +#define BAG_POKEBALLS_COUNT 16 +#define BAG_TMHM_COUNT 64 +#define BAG_BERRIES_COUNT 46 +#define EVENT_OBJECT_TEMPLATES_COUNT 64 + +#define PYRAMID_BAG_ITEMS_COUNT 10 +#define HALL_FACILITIES_COUNT 9 // 7 facilities for single mode + tower double mode + tower multi mode. + +// string lengths +#define ITEM_NAME_LENGTH 14 +#define POKEMON_NAME_LENGTH 10 +#define PLAYER_NAME_LENGTH 7 +#define MAIL_WORDS_COUNT 9 +#define MOVE_NAME_LENGTH 12 + +#define MALE 0 +#define FEMALE 1 + +#define OPTIONS_BUTTON_MODE_NORMAL 0 +#define OPTIONS_BUTTON_MODE_LR 1 +#define OPTIONS_BUTTON_MODE_L_EQUALS_A 2 + +#define OPTIONS_TEXT_SPEED_SLOW 0 +#define OPTIONS_TEXT_SPEED_MID 1 +#define OPTIONS_TEXT_SPEED_FAST 2 + +#define OPTIONS_SOUND_MONO 0 +#define OPTIONS_SOUND_STEREO 1 + +#define OPTIONS_BATTLE_STYLE_SHIFT 0 +#define OPTIONS_BATTLE_STYLE_SET 1 + +#endif // GUARD_CONSTANTS_GLOBAL_H diff --git a/include/data2.h b/include/data2.h index 268dc9ac8..37ce5bf20 100644 --- a/include/data2.h +++ b/include/data2.h @@ -1,8 +1,6 @@ #ifndef GUARD_DATA2_H #define GUARD_DATA2_H -#define MOVE_NAME_LENGTH 12 - struct MonCoords { // This would use a bitfield, but some function diff --git a/include/global.h b/include/global.h index 4656f3968..c11bddc2d 100644 --- a/include/global.h +++ b/include/global.h @@ -4,6 +4,7 @@ #include <string.h> #include "config.h" // we need to define config before gba headers as print stuff needs the functions nulled before defines. #include "gba/gba.h" +#include "constants/global.h" // Prevent cross-jump optimization. #define BLOCK_CROSS_JUMP asm(""); @@ -93,100 +94,6 @@ f; \ }) -// Invalid Versions show as "----------" in Gen 4 and Gen 5's summary screen. -// In Gens 6 and 7, invalid versions instead show "a distant land" in the summary screen. -// In Gen 4 only, migrated Pokemon with Diamond, Pearl, or Platinum's ID show as "----------". -// Gen 5 and up read Diamond, Pearl, or Platinum's ID as "Sinnoh". -// In Gen 4 and up, migrated Pokemon with HeartGold or SoulSilver's ID show the otherwise unused "Johto" string. -enum -{ - VERSION_SAPPHIRE = 1, - VERSION_RUBY = 2, - VERSION_EMERALD = 3, - VERSION_FIRE_RED = 4, - VERSION_LEAF_GREEN = 5, - VERSION_HEART_GOLD = 7, - VERSION_SOUL_SILVER = 8, - VERSION_DIAMOND = 10, - VERSION_PEARL = 11, - VERSION_PLATINUM = 12, - VERSION_GAMECUBE = 15, -}; - -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_VERSION (VERSION_EMERALD) -#define GAME_LANGUAGE (LANGUAGE_ENGLISH) - -// capacities of various saveblock objects -#define DAYCARE_MON_COUNT 2 -#define POKEBLOCKS_COUNT 40 -#define EVENT_OBJECTS_COUNT 16 -#define BERRY_TREES_COUNT 128 -#define FLAGS_COUNT 300 -#define VARS_COUNT 256 -#define MAIL_COUNT 16 -#define SECRET_BASES_COUNT 20 -#define TV_SHOWS_COUNT 25 -#define POKE_NEWS_COUNT 16 -#define PC_ITEMS_COUNT 50 -#define BAG_ITEMS_COUNT 30 -#define BAG_KEYITEMS_COUNT 30 -#define BAG_POKEBALLS_COUNT 16 -#define BAG_TMHM_COUNT 64 -#define BAG_BERRIES_COUNT 46 -#define EVENT_OBJECT_TEMPLATES_COUNT 64 - -#define PYRAMID_BAG_ITEMS_COUNT 10 -#define HALL_FACILITIES_COUNT 9 // 7 facilities for single mode + tower double mode + tower multi mode. - -// string lengths -#define ITEM_NAME_LENGTH 14 -#define POKEMON_NAME_LENGTH 10 -#define PLAYER_NAME_LENGTH 7 -#define MAIL_WORDS_COUNT 9 - -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 -}; - struct Coords8 { s8 x; |