summaryrefslogtreecommitdiff
path: root/src/scrcmd.c
diff options
context:
space:
mode:
authorgarak <garakmon@gmail.com>2018-11-27 13:31:07 -0500
committergarak <garakmon@gmail.com>2018-11-27 13:31:07 -0500
commit50f00b0827a4952a12f90009bd992f23c80a56af (patch)
tree6a5f78b04b42c162ed95cfc66c91a8b24f4051b2 /src/scrcmd.c
parentf02cb667bbddf4f4a1152c86cbf9616468e7f0d2 (diff)
parentc909aa92dee0a8d202d9195d80d0cc96b0d1ebc8 (diff)
Merge remote-tracking branch 'upstream/master' into fldeff
Diffstat (limited to 'src/scrcmd.c')
-rw-r--r--src/scrcmd.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/scrcmd.c b/src/scrcmd.c
index 127a5ecaa..310387337 100644
--- a/src/scrcmd.c
+++ b/src/scrcmd.c
@@ -4,6 +4,7 @@
#include "berry.h"
#include "clock.h"
#include "coins.h"
+#include "contest.h"
#include "contest_link_80F57C4.h"
#include "contest_painting.h"
#include "data2.h"
@@ -27,6 +28,7 @@
#include "event_obj_lock.h"
#include "menu.h"
#include "money.h"
+#include "mossdeep_gym.h"
#include "mystery_event_script.h"
#include "palette.h"
#include "party_menu.h"
@@ -49,11 +51,6 @@
#include "tv.h"
#include "window.h"
-extern u16 sub_81A89A0(u8);
-extern void sub_81A8AF8(void);
-extern void sub_81A895C(void);
-extern void sub_81A8934(u8);
-
typedef u16 (*SpecialFunc)(void);
typedef void (*NativeFunc)(void);
@@ -66,8 +63,6 @@ static EWRAM_DATA u16 sMovingNpcMapBank = 0;
static EWRAM_DATA u16 sMovingNpcMapId = 0;
static EWRAM_DATA u16 sFieldEffectScriptId = 0;
-extern u16 gSpecialVar_ContestCategory;
-
IWRAM_DATA u8 gUnknown_03000F30;
extern const SpecialFunc gSpecials[];
@@ -1713,8 +1708,8 @@ bool8 ScrCmd_checkpartymove(struct ScriptContext *ctx)
u8 i;
u16 moveId = ScriptReadHalfword(ctx);
- gSpecialVar_Result = 6;
- for (i = 0; i < 6; i++)
+ gSpecialVar_Result = PARTY_SIZE;
+ for (i = 0; i < PARTY_SIZE; i++)
{
u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES, NULL);
if (!species)
@@ -2157,13 +2152,13 @@ bool8 ScrCmd_mossdeepgym1(struct ScriptContext *ctx)
{
u16 v1 = VarGet(ScriptReadHalfword(ctx));
- sMovingNpcId = sub_81A89A0(v1);
+ sMovingNpcId = MossdeepGym_MoveEvents(v1);
return FALSE;
}
bool8 ScrCmd_mossdeepgym2(struct ScriptContext *ctx)
{
- sub_81A8AF8();
+ MossdeepGym_TurnEvents();
return FALSE;
}
@@ -2171,13 +2166,13 @@ bool8 ScrCmd_mossdeepgym3(struct ScriptContext *ctx)
{
u16 v1 = VarGet(ScriptReadHalfword(ctx));
- sub_81A8934(v1);
+ InitMossdeepGymTiles(v1);
return FALSE;
}
bool8 ScrCmd_mossdeepgym4(struct ScriptContext *ctx)
{
- sub_81A895C();
+ FinishMossdeepGymTiles();
return FALSE;
}
@@ -2204,7 +2199,7 @@ bool8 ScrCmd_cmdD9(struct ScriptContext *ctx)
}
}
-// This command will force the Pokémon to be obedient, you don't get to make it disobedient
+// This command will force the Pokémon to be obedient, you don't get to make it disobedient.
bool8 ScrCmd_setmonobedient(struct ScriptContext *ctx)
{
bool8 obedient = TRUE;