From eaf508ba5e5508a52ac0c846f4c55c0dbd8125be Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 12 Feb 2020 00:44:09 -0500 Subject: [PATCH] Resolve missing parens errors --- data/maps/MauvilleCity_GameCorner/scripts.inc | 4 ++-- include/constants/items.h | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/data/maps/MauvilleCity_GameCorner/scripts.inc b/data/maps/MauvilleCity_GameCorner/scripts.inc index 3401251cf0..46c61a017b 100644 --- a/data/maps/MauvilleCity_GameCorner/scripts.inc +++ b/data/maps/MauvilleCity_GameCorner/scripts.inc @@ -44,7 +44,7 @@ MauvilleCity_GameCorner_EventScript_ChooseCoinsDefault500:: @ 820FC0C MauvilleCity_GameCorner_EventScript_Buy50Coins:: @ 820FC33 checkcoins VAR_TEMP_1 - compare VAR_TEMP_1, MAX_COINS + 1 - 50 + compare VAR_TEMP_1, (MAX_COINS + 1 - 50) goto_if_ge MauvilleCity_GameCorner_EventScript_NoRoomForCoins checkmoney COINS_PRICE_50, 0 compare VAR_RESULT, FALSE @@ -62,7 +62,7 @@ MauvilleCity_GameCorner_EventScript_Buy50Coins:: @ 820FC33 MauvilleCity_GameCorner_EventScript_Buy500Coins:: @ 820FC75 checkcoins VAR_TEMP_1 - compare VAR_TEMP_1, MAX_COINS + 1 - 500 + compare VAR_TEMP_1, (MAX_COINS + 1 - 500) goto_if_ge MauvilleCity_GameCorner_EventScript_NoRoomForCoins checkmoney COINS_PRICE_500, 0 compare VAR_RESULT, FALSE diff --git a/include/constants/items.h b/include/constants/items.h index c238169010..fafcac8b18 100644 --- a/include/constants/items.h +++ b/include/constants/items.h @@ -478,13 +478,13 @@ #define FIRST_ROUTE_114_MAN_BERRY ITEM_RAZZ_BERRY #define LAST_ROUTE_114_MAN_BERRY ITEM_PINAP_BERRY -#define NUM_BERRY_MASTER_BERRIES LAST_BERRY_MASTER_BERRY - FIRST_BERRY_MASTER_BERRY + 1 -#define NUM_BERRY_MASTER_BERRIES_SKIPPED FIRST_BERRY_MASTER_BERRY - FIRST_BERRY_INDEX -#define NUM_BERRY_MASTER_WIFE_BERRIES LAST_BERRY_MASTER_WIFE_BERRY - FIRST_BERRY_MASTER_WIFE_BERRY + 1 -#define NUM_KIRI_BERRIES LAST_KIRI_BERRY - FIRST_KIRI_BERRY + 1 -#define NUM_KIRI_BERRIES_SKIPPED FIRST_KIRI_BERRY - FIRST_BERRY_INDEX -#define NUM_ROUTE_114_MAN_BERRIES LAST_ROUTE_114_MAN_BERRY - FIRST_ROUTE_114_MAN_BERRY + 1 -#define NUM_ROUTE_114_MAN_BERRIES_SKIPPED FIRST_ROUTE_114_MAN_BERRY - FIRST_BERRY_INDEX +#define NUM_BERRY_MASTER_BERRIES (LAST_BERRY_MASTER_BERRY - FIRST_BERRY_MASTER_BERRY + 1) +#define NUM_BERRY_MASTER_BERRIES_SKIPPED (FIRST_BERRY_MASTER_BERRY - FIRST_BERRY_INDEX) +#define NUM_BERRY_MASTER_WIFE_BERRIES (LAST_BERRY_MASTER_WIFE_BERRY - FIRST_BERRY_MASTER_WIFE_BERRY + 1) +#define NUM_KIRI_BERRIES (LAST_KIRI_BERRY - FIRST_KIRI_BERRY + 1) +#define NUM_KIRI_BERRIES_SKIPPED (FIRST_KIRI_BERRY - FIRST_BERRY_INDEX) +#define NUM_ROUTE_114_MAN_BERRIES (LAST_ROUTE_114_MAN_BERRY - FIRST_ROUTE_114_MAN_BERRY + 1) +#define NUM_ROUTE_114_MAN_BERRIES_SKIPPED (FIRST_ROUTE_114_MAN_BERRY - FIRST_BERRY_INDEX) #define ITEM_TO_BERRY(itemId)(((itemId - FIRST_BERRY_INDEX) + 1))