From 9e08cfe55f632fd749ce64c0e54eb93bd10926dc Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 18 Dec 2019 19:22:39 -0500 Subject: [PATCH] Remove uses of compare_var_to --- asm/macros/event.inc | 2 +- data/scripts/mevent_altering_cave.inc | 2 +- data/scripts/mevent_aurora_ticket.inc | 4 ++-- data/scripts/mevent_battle_card.inc | 2 +- data/scripts/mevent_mystic_ticket.inc | 4 ++-- data/scripts/mevent_old_sea_map.inc | 4 ++-- data/scripts/mevent_pichu.inc | 12 ++++++------ data/scripts/mevent_trainer.inc | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 951e295a6..764dcf054 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -235,7 +235,7 @@ @ Generic compare macro which attempts to deduce argument types based on their values @ Any values between 0x4000 to 0x40FF and 0x8000 to 0x8015 are considered event variable identifiers .macro compare var:req, arg:req - .if (\arg >= VARS_START && \arg <= VARS_END) || (\arg >= SPECIAL_VARS_START && \arg <= SPECIAL_VARS_END) + .if ((\arg >= VARS_START && \arg <= VARS_END) || (\arg >= SPECIAL_VARS_START && \arg <= SPECIAL_VARS_END)) compare_var_to_var \var, \arg .else compare_var_to_value \var, \arg diff --git a/data/scripts/mevent_altering_cave.inc b/data/scripts/mevent_altering_cave.inc index 072005934..499907edd 100644 --- a/data/scripts/mevent_altering_cave.inc +++ b/data/scripts/mevent_altering_cave.inc @@ -1,7 +1,7 @@ MysteryEventScript_AlteringCave:: @ 86756E3 setvaddress MysteryEventScript_AlteringCave addvar VAR_ALTERING_CAVE_WILD_SET, 1 - compare_var_to_value VAR_ALTERING_CAVE_WILD_SET, 10 + compare VAR_ALTERING_CAVE_WILD_SET, 10 vgoto_if_ne MysteryEventScript_AlteringCave_ setvar VAR_ALTERING_CAVE_WILD_SET, 0 MysteryEventScript_AlteringCave_: @ 86756FD diff --git a/data/scripts/mevent_aurora_ticket.inc b/data/scripts/mevent_aurora_ticket.inc index 811c840aa..177d69681 100644 --- a/data/scripts/mevent_aurora_ticket.inc +++ b/data/scripts/mevent_aurora_ticket.inc @@ -7,13 +7,13 @@ MysteryEventScript_AuroraTicket:: @ 867533C checkflag FLAG_BATTLED_DEOXYS vgoto_if_eq AuroraTicket_Obtained checkitem ITEM_AURORA_TICKET, 1 - compare_var_to_value VAR_RESULT, TRUE + compare VAR_RESULT, TRUE vgoto_if_eq AuroraTicket_Obtained vmessage sText_AuroraTicketForYou waitmessage waitbuttonpress checkitemspace ITEM_AURORA_TICKET, 1 - compare_var_to_value VAR_RESULT, FALSE + compare VAR_RESULT, FALSE vgoto_if_eq AuroraTicket_NoBagSpace giveitem_std ITEM_AURORA_TICKET setflag FLAG_ENABLE_SHIP_BIRTH_ISLAND diff --git a/data/scripts/mevent_battle_card.inc b/data/scripts/mevent_battle_card.inc index 8c36ed63a..77f9a9b24 100644 --- a/data/scripts/mevent_battle_card.inc +++ b/data/scripts/mevent_battle_card.inc @@ -4,7 +4,7 @@ MysteryEventScript_BattleCard:: @ 867513C vgoto_if_eq MysteryEventScript_BattleCardInfo setorcopyvar VAR_RESULT, GET_CARD_BATTLES_WON specialvar VAR_0x8008, GetMysteryEventCardVal - compare_var_to_value VAR_0x8008, REQUIRED_CARD_BATTLES + compare VAR_0x8008, REQUIRED_CARD_BATTLES vgoto_if_ne MysteryEventScript_BattleCardInfo lock faceplayer diff --git a/data/scripts/mevent_mystic_ticket.inc b/data/scripts/mevent_mystic_ticket.inc index 0264fb77f..9d532b043 100644 --- a/data/scripts/mevent_mystic_ticket.inc +++ b/data/scripts/mevent_mystic_ticket.inc @@ -9,13 +9,13 @@ MysteryEventScript_MysticTicket:: @ 867550B checkflag FLAG_CAUGHT_HO_OH vgoto_if_eq MysticTicket_Obtained checkitem ITEM_MYSTIC_TICKET, 1 - compare_var_to_value VAR_RESULT, TRUE + compare VAR_RESULT, TRUE vgoto_if_eq MysticTicket_Obtained vmessage sText_MysticTicketForYou waitmessage waitbuttonpress checkitemspace ITEM_MYSTIC_TICKET, 1 - compare_var_to_value VAR_RESULT, FALSE + compare VAR_RESULT, FALSE vgoto_if_eq MysticTicket_NoBagSpace giveitem_std ITEM_MYSTIC_TICKET setflag FLAG_ENABLE_SHIP_NAVEL_ROCK diff --git a/data/scripts/mevent_old_sea_map.inc b/data/scripts/mevent_old_sea_map.inc index dffb56caa..45c5f6728 100644 --- a/data/scripts/mevent_old_sea_map.inc +++ b/data/scripts/mevent_old_sea_map.inc @@ -7,13 +7,13 @@ MysteryEventScript_OldSeaMap:: @ 86757F4 checkflag FLAG_CAUGHT_MEW vgoto_if_eq OldSeaMap_Obtained checkitem ITEM_OLD_SEA_MAP, 1 - compare_var_to_value VAR_RESULT, TRUE + compare VAR_RESULT, TRUE vgoto_if_eq OldSeaMap_Obtained vmessage sText_MysteryGiftOldSeaMapForYou waitmessage waitbuttonpress checkitemspace ITEM_OLD_SEA_MAP, 1 - compare_var_to_value VAR_RESULT, FALSE + compare VAR_RESULT, FALSE vgoto_if_eq OldSeaMap_NoBagSpace giveitem_std ITEM_OLD_SEA_MAP setflag FLAG_ENABLE_SHIP_FARAWAY_ISLAND diff --git a/data/scripts/mevent_pichu.inc b/data/scripts/mevent_pichu.inc index 4df317564..4f5c739af 100644 --- a/data/scripts/mevent_pichu.inc +++ b/data/scripts/mevent_pichu.inc @@ -6,7 +6,7 @@ MysteryEventScript_SurfPichu:: @ 8674D3D SurfPichu_GiveIfPossible: @ 8674D4C specialvar VAR_EVENT_PICHU_SLOT, CalculatePlayerPartyCount - compare_var_to_value VAR_EVENT_PICHU_SLOT, PARTY_SIZE + compare VAR_EVENT_PICHU_SLOT, PARTY_SIZE vgoto_if_eq SurfPichu_FullParty setflag FLAG_MYSTERY_EVENT_DONE vcall SurfPichu_GiveEgg @@ -33,15 +33,15 @@ SurfPichu_GiveEgg: @ 8674D7E giveegg SPECIES_PICHU setmonobedient VAR_EVENT_PICHU_SLOT setmonmetlocation VAR_EVENT_PICHU_SLOT, METLOC_FATEFUL_ENCOUNTER - compare_var_to_value VAR_EVENT_PICHU_SLOT, 1 + compare VAR_EVENT_PICHU_SLOT, 1 vgoto_if_eq SurfPichu_Slot1 - compare_var_to_value VAR_EVENT_PICHU_SLOT, 2 + compare VAR_EVENT_PICHU_SLOT, 2 vgoto_if_eq SurfPichu_Slot2 - compare_var_to_value VAR_EVENT_PICHU_SLOT, 3 + compare VAR_EVENT_PICHU_SLOT, 3 vgoto_if_eq SurfPichu_Slot3 - compare_var_to_value VAR_EVENT_PICHU_SLOT, 4 + compare VAR_EVENT_PICHU_SLOT, 4 vgoto_if_eq SurfPichu_Slot4 - compare_var_to_value VAR_EVENT_PICHU_SLOT, 5 + compare VAR_EVENT_PICHU_SLOT, 5 vgoto_if_eq SurfPichu_Slot5 return diff --git a/data/scripts/mevent_trainer.inc b/data/scripts/mevent_trainer.inc index 1b0117078..4114750d8 100644 --- a/data/scripts/mevent_trainer.inc +++ b/data/scripts/mevent_trainer.inc @@ -1,7 +1,7 @@ MysteryEventScript_VisitingTrainer:: @ 8674EC1 setvaddress MysteryEventScript_VisitingTrainer special ValidateEReaderTrainer - compare_var_to_value VAR_RESULT, 0 + compare VAR_RESULT, 0 vgoto_if_eq MysteryEventScript_VisitingTrainerArrived lock faceplayer