From 9506b205e6194b9417c8bbbb02cdbbed2c70c99b Mon Sep 17 00:00:00 2001 From: psf <77138753+pkmnsnfrn@users.noreply.github.com> Date: Sat, 20 May 2023 05:25:59 -0700 Subject: [PATCH] Changed 999999 in MaxMoney to MAX_MONEY constant (#3015) --- include/money.h | 2 ++ src/debug.c | 2 +- src/money.c | 2 -- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/money.h b/include/money.h index e7a837978..211f9caa2 100644 --- a/include/money.h +++ b/include/money.h @@ -1,6 +1,8 @@ #ifndef GUARD_MONEY_H #define GUARD_MONEY_H +#define MAX_MONEY 999999 + u32 GetMoney(u32 *moneyPtr); void SetMoney(u32 *moneyPtr, u32 newValue); bool8 IsEnoughMoney(u32 *moneyPtr, u32 cost); diff --git a/src/debug.c b/src/debug.c index 8fff84d57..cd7f58e6d 100644 --- a/src/debug.c +++ b/src/debug.c @@ -2758,7 +2758,7 @@ static void DebugAction_Give_Pokemon_ComplexCreateMon(u8 taskId) //https://githu static void DebugAction_Give_MaxMoney(u8 taskId) { - SetMoney(&gSaveBlock1Ptr->money, 999999); + SetMoney(&gSaveBlock1Ptr->money, MAX_MONEY); } static void DebugAction_Give_MaxCoins(u8 taskId) diff --git a/src/money.c b/src/money.c index 88e1fea64..321f882ff 100644 --- a/src/money.c +++ b/src/money.c @@ -10,8 +10,6 @@ #include "strings.h" #include "decompress.h" -#define MAX_MONEY 999999 - EWRAM_DATA static u8 sMoneyBoxWindowId = 0; EWRAM_DATA static u8 sMoneyLabelSpriteId = 0;