diff options
Diffstat (limited to 'src/scrcmd.c')
-rw-r--r-- | src/scrcmd.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/scrcmd.c b/src/scrcmd.c index ad01791a9..d2ebcbb85 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" @@ -38,7 +38,7 @@ #include "script.h" #include "script_menu.h" #include "script_movement.h" -#include "script_pokemon_80F8.h" +#include "script_pokemon_util.h" #include "shop.h" #include "slot_machine.h" #include "sound.h" @@ -788,8 +788,8 @@ bool8 ScrCmd_warphole(struct ScriptContext *ctx) { u8 mapGroup = ScriptReadByte(ctx); u8 mapNum = ScriptReadByte(ctx); - u16 x; - u16 y; + s16 x; + s16 y; PlayerGetDestCoords(&x, &y); if (mapGroup == 0xFF && mapNum == 0xFF) @@ -801,6 +801,7 @@ bool8 ScrCmd_warphole(struct ScriptContext *ctx) return TRUE; } +// RS mossdeep gym warp, unused in Emerald bool8 ScrCmd_warpteleport(struct ScriptContext *ctx) { u8 mapGroup = ScriptReadByte(ctx); @@ -810,7 +811,7 @@ bool8 ScrCmd_warpteleport(struct ScriptContext *ctx) u16 y = VarGet(ScriptReadHalfword(ctx)); SetWarpDestination(mapGroup, mapNum, warpId, x, y); - DoTeleportWarp(); + DoTeleportTileWarp(); ResetInitialPlayerAvatarState(); return TRUE; } @@ -1185,22 +1186,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; } @@ -1282,7 +1283,7 @@ bool8 ScrCmd_pokenavcall(struct ScriptContext *ctx) if (msg == NULL) msg = (const u8 *)ctx->data[0]; - sub_8098238(msg); + ShowPokenavFieldMessage(msg); return FALSE; } @@ -1469,10 +1470,12 @@ 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(); + ShowContestWinnerPainting(); ScriptContext1_Stop(); return TRUE; } @@ -1953,14 +1956,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; } |