From bad170b0cb7a0a7ecb8725e6fc458a39c11a7e4d Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Wed, 8 Aug 2018 23:53:21 -0700 Subject: Continue decompiling field_specials --- src/scrcmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/scrcmd.c') diff --git a/src/scrcmd.c b/src/scrcmd.c index a15ad666c..01d04704a 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1515,7 +1515,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx) xText = (xWindow - xText - 1) * 8 + 3; yText = (yText - yWindow - 1) * 8; - winTemplate = sub_8198A50(0, xWindow, yWindow + 1, width, height, 0xF, 0x1); + winTemplate = CreateWindowTemplate(0, xWindow, yWindow + 1, width, height, 0xF, 0x1); gUnknown_03000F30 = AddWindow(&winTemplate); LoadUserWindowBorderGfx(gUnknown_03000F30, 0x214, 0xE0); NewMenuHelpers_DrawStdWindowFrame(gUnknown_03000F30, 0); -- cgit v1.2.3 From 4c54212b1f559a110fc7f6fffebe3a54748f3fec Mon Sep 17 00:00:00 2001 From: Slawter666 <38655737+Slawter666@users.noreply.github.com> Date: Tue, 4 Sep 2018 23:31:37 +0100 Subject: Bring labels for overworld.c over from pokeruby --- src/scrcmd.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/scrcmd.c') diff --git a/src/scrcmd.c b/src/scrcmd.c index 01d04704a..31a4ed35a 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -750,7 +750,7 @@ bool8 ScrCmd_warp(struct ScriptContext *ctx) Overworld_SetWarpDestination(mapGroup, mapNum, warpId, x, y); sub_80AF734(); - player_avatar_init_params_reset(); + ResetInitialPlayerAvatarState(); return TRUE; } @@ -764,7 +764,7 @@ bool8 ScrCmd_warpsilent(struct ScriptContext *ctx) Overworld_SetWarpDestination(mapGroup, mapNum, warpId, x, y); sp13E_warp_to_last_warp(); - player_avatar_init_params_reset(); + ResetInitialPlayerAvatarState(); return TRUE; } @@ -778,7 +778,7 @@ bool8 ScrCmd_warpdoor(struct ScriptContext *ctx) Overworld_SetWarpDestination(mapGroup, mapNum, warpId, x, y); sub_80AF7D0(); - player_avatar_init_params_reset(); + ResetInitialPlayerAvatarState(); return TRUE; } @@ -791,11 +791,11 @@ bool8 ScrCmd_warphole(struct ScriptContext *ctx) PlayerGetDestCoords(&x, &y); if (mapGroup == 0xFF && mapNum == 0xFF) - sub_8084EBC(x - 7, y - 7); + SetFixedHoleWarpAsDestination(x - 7, y - 7); else Overworld_SetWarpDestination(mapGroup, mapNum, -1, x - 7, y - 7); sp13F_fall_to_last_warp(); - player_avatar_init_params_reset(); + ResetInitialPlayerAvatarState(); return TRUE; } @@ -809,7 +809,7 @@ bool8 ScrCmd_warpteleport(struct ScriptContext *ctx) Overworld_SetWarpDestination(mapGroup, mapNum, warpId, x, y); sub_80AF848(); - player_avatar_init_params_reset(); + ResetInitialPlayerAvatarState(); return TRUE; } @@ -823,7 +823,7 @@ bool8 ScrCmd_warpD7(struct ScriptContext *ctx) Overworld_SetWarpDestination(mapGroup, mapNum, warpId, x, y); sub_80AF87C(); - player_avatar_init_params_reset(); + ResetInitialPlayerAvatarState(); return TRUE; } @@ -859,7 +859,7 @@ bool8 ScrCmd_setdivewarp(struct ScriptContext *ctx) u16 x = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx)); - sub_8084E2C(mapGroup, mapNum, warpId, x, y); + SetFixedDiveWarp(mapGroup, mapNum, warpId, x, y); return FALSE; } @@ -871,7 +871,7 @@ bool8 ScrCmd_setholewarp(struct ScriptContext *ctx) u16 x = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx)); - sub_8084E80(mapGroup, mapNum, warpId, x, y); + SetFixedHoleWarp(mapGroup, mapNum, warpId, x, y); return FALSE; } @@ -2240,7 +2240,7 @@ bool8 ScrCmd_warpD1(struct ScriptContext *ctx) Overworld_SetWarpDestination(mapGroup, mapNum, warpId, x, y); sub_808D074(GetPlayerFacingDirection()); sub_80B0244(); - player_avatar_init_params_reset(); + ResetInitialPlayerAvatarState(); return TRUE; } @@ -2293,6 +2293,6 @@ bool8 ScrCmd_warpE0(struct ScriptContext *ctx) Overworld_SetWarpDestination(mapGroup, mapNum, warpId, x, y); sub_80AF79C(); - player_avatar_init_params_reset(); + ResetInitialPlayerAvatarState(); return TRUE; } -- cgit v1.2.3 From 2f59df03ab8dbd5d9edb28b5680cc668aafc6684 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 8 Sep 2018 23:38:30 +0200 Subject: Standartize AddTextPrinterParametrized functions, --- src/scrcmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/scrcmd.c') diff --git a/src/scrcmd.c b/src/scrcmd.c index 01d04704a..b9a8a37af 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1304,7 +1304,7 @@ bool8 ScrCmd_cmdDB(struct ScriptContext *ctx) msg = (const u8 *)ctx->data[0]; sub_81973A4(); NewMenuHelpers_DrawDialogueFrame(0, 1); - PrintTextOnWindow(0, 1, msg, 0, 1, 0, 0); + AddTextPrinterParameterized(0, 1, msg, 0, 1, 0, 0); return FALSE; } @@ -1521,7 +1521,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx) NewMenuHelpers_DrawStdWindowFrame(gUnknown_03000F30, 0); PutWindowTilemap(gUnknown_03000F30); FillWindowPixelBuffer(gUnknown_03000F30, 0x11); - PrintTextOnWindow(gUnknown_03000F30, 6, gStringVar4, xText, yText, 0xFF, 0x0); + AddTextPrinterParameterized(gUnknown_03000F30, 6, gStringVar4, xText, yText, 0xFF, 0x0); CopyWindowToVram(gUnknown_03000F30, 3); return FALSE; } -- cgit v1.2.3