summaryrefslogtreecommitdiff
path: root/src/rom6.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rom6.c')
-rw-r--r--src/rom6.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rom6.c b/src/rom6.c
index e7b84e42c..30eb62c16 100644
--- a/src/rom6.c
+++ b/src/rom6.c
@@ -32,14 +32,14 @@ static void sub_810B58C(void);
static void sub_810B5D8(void);
static void sub_810B634(void);
-bool8 npc_before_player_of_type(u8 a)
+bool8 SetLastTalkedObjectInFrontOfPlayer(u8 graphicsId)
{
u8 mapObjId;
GetXYCoordsOneStepInFrontOfPlayer(&gPlayerFacingPosition.x, &gPlayerFacingPosition.y);
gPlayerFacingPosition.height = PlayerGetZCoord();
mapObjId = GetFieldObjectIdByXYZ(gPlayerFacingPosition.x, gPlayerFacingPosition.y, gPlayerFacingPosition.height);
- if (gMapObjects[mapObjId].graphicsId != a)
+ if (gMapObjects[mapObjId].graphicsId != graphicsId)
{
return FALSE;
}
@@ -121,7 +121,7 @@ static void sub_810B4CC(u8 taskId)
#if DEBUG
void debug_sub_8120968(void)
{
- if (npc_before_player_of_type(MAP_OBJ_GFX_BREAKABLE_ROCK) == TRUE)
+ if (SetLastTalkedObjectInFrontOfPlayer(MAP_OBJ_GFX_BREAKABLE_ROCK) == TRUE)
{
gLastFieldPokeMenuOpened = 0;
sub_810B53C();
@@ -135,7 +135,7 @@ void debug_sub_8120968(void)
bool8 SetUpFieldMove_RockSmash(void)
{
- if (npc_before_player_of_type(0x56) == TRUE)
+ if (SetLastTalkedObjectInFrontOfPlayer(MAP_OBJ_GFX_BREAKABLE_ROCK) == TRUE)
{
gFieldCallback = FieldCallback_PrepareFadeInFromMenu;
gPostMenuFieldCallback = sub_810B53C;