diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2020-07-08 16:03:32 -0400 |
---|---|---|
committer | GriffinR <griffin.g.richards@gmail.com> | 2020-07-08 16:03:32 -0400 |
commit | beeb673ba16e02cacadb2de0ee3608d2106ed14a (patch) | |
tree | 8924e783fc8af67286cf45abcef95c065a3fd223 /src/scrcmd.c | |
parent | 2ed1f7c6f92abe93d86b921709576b82970f0848 (diff) | |
parent | ebade7affb31d5bcdc17cdcd3895758010ee6f66 (diff) |
Merge branch 'master' of https://github.com/pret/pokeemerald into add-flagvarsave
Diffstat (limited to 'src/scrcmd.c')
-rw-r--r-- | src/scrcmd.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/scrcmd.c b/src/scrcmd.c index 9e62c45c5..4a7f4ea73 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -5,7 +5,7 @@ #include "clock.h" #include "coins.h" #include "contest.h" -#include "contest_link_80F57C4.h" +#include "contest_util.h" #include "contest_painting.h" #include "data.h" #include "decoration.h" @@ -1185,22 +1185,22 @@ bool8 ScrCmd_setobjectmovementtype(struct ScriptContext *ctx) bool8 ScrCmd_createvobject(struct ScriptContext *ctx) { u8 graphicsId = ScriptReadByte(ctx); - u8 v2 = ScriptReadByte(ctx); + u8 objectEventId = ScriptReadByte(ctx); u16 x = VarGet(ScriptReadHalfword(ctx)); u32 y = VarGet(ScriptReadHalfword(ctx)); u8 elevation = ScriptReadByte(ctx); u8 direction = ScriptReadByte(ctx); - sprite_new(graphicsId, v2, x, y, elevation, direction); + CreateObjectSprite(graphicsId, objectEventId, x, y, elevation, direction); return FALSE; } bool8 ScrCmd_turnvobject(struct ScriptContext *ctx) { - u8 v1 = ScriptReadByte(ctx); + u8 objectEventId = ScriptReadByte(ctx); u8 direction = ScriptReadByte(ctx); - sub_8097B78(v1, direction); + TurnObjectEventSprite(objectEventId, direction); return FALSE; } @@ -1469,7 +1469,9 @@ bool8 ScrCmd_hidemonpic(struct ScriptContext *ctx) bool8 ScrCmd_showcontestwinner(struct ScriptContext *ctx) { u8 contestWinnerId = ScriptReadByte(ctx); - if (contestWinnerId) + + // Don't save artist's painting yet + if (contestWinnerId != CONTEST_WINNER_ARTIST) SetContestWinnerForPainting(contestWinnerId); ShowContestWinner(); @@ -1953,14 +1955,14 @@ bool8 ScrCmd_startcontest(struct ScriptContext *ctx) bool8 ScrCmd_showcontestresults(struct ScriptContext *ctx) { - sub_80F8484(); + ShowContestResults(); ScriptContext1_Stop(); return TRUE; } bool8 ScrCmd_contestlinktransfer(struct ScriptContext *ctx) { - sub_80F84C4(gSpecialVar_ContestCategory); + ContestLinkTransfer(gSpecialVar_ContestCategory); ScriptContext1_Stop(); return TRUE; } |