From ab39e96b1b51f144739b0662f22b7ac7f1a66e95 Mon Sep 17 00:00:00 2001 From: Jdog Date: Tue, 11 Aug 2020 19:29:31 -0700 Subject: [PATCH] Style changes and removing casts --- papermario/src/code_fa4c0_len_3bf0.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/papermario/src/code_fa4c0_len_3bf0.c b/papermario/src/code_fa4c0_len_3bf0.c index 5549705359..44b889a82c 100644 --- a/papermario/src/code_fa4c0_len_3bf0.c +++ b/papermario/src/code_fa4c0_len_3bf0.c @@ -54,7 +54,7 @@ s32 PlaySoundAt(script_context* script, s32 initialCall) { s32 y = get_variable(script, *ptrReadPos++); s32 z = get_variable(script, *ptrReadPos++); - play_sound_at_position(soundID, value2, (f32) x, (f32) y, (f32) z); + play_sound_at_position(soundID, value2, x, y, z); return 2; } @@ -92,6 +92,7 @@ s32 RemoveKeyItemAt(script_context* script, s32 initialCall) { s32* ptrReadPos = script->ptrReadPos; s32 index = get_variable(script, *ptrReadPos++); s16* ptrTemp = D_8010F304; + ptrTemp[index] = 0; return 2; @@ -101,6 +102,7 @@ s32 RemoveItemAt(script_context* script, s32 initialCall) { s32* ptrReadPos = script->ptrReadPos; s32 index = get_variable(script, *ptrReadPos++); s16* ptrTemp = D_8010F444; + ptrTemp[index] = 0; sort_items(); @@ -166,9 +168,9 @@ s32 SetItemPos(script_context* script, s32 initialCall) { z = get_variable(script, *ptrReadPos++); ptrItemEntity = get_item_entity(itemEntityIndex); - ptrItemEntity->position[0] = (f32) x; - ptrItemEntity->position[1] = (f32) y; - ptrItemEntity->position[2] = (f32) z; + ptrItemEntity->position[0] = x; + ptrItemEntity->position[1] = y; + ptrItemEntity->position[2] = z; return 2; }