RandomlyLookNorthOrEast
This commit is contained in:
@@ -2096,7 +2096,7 @@ bool8 sub_808FA3C(struct MapObject *mapObject, struct Sprite *sprite)
|
||||
u8 direction;
|
||||
|
||||
memcpy(directions, gUnknown_0850D710, sizeof directions);
|
||||
direction = GetRunningPastFacingDirection(mapObject, 0);
|
||||
direction = GetRunningPastFacingDirection(mapObject, RUNFOLLOW_ANY);
|
||||
if (direction == 0)
|
||||
{
|
||||
direction = directions[Random() & 0x03];
|
||||
@@ -2424,7 +2424,7 @@ bool8 sub_8090148 (struct MapObject *mapObject, struct Sprite *sprite)
|
||||
u8 direction;
|
||||
|
||||
memcpy(directions, gUnknown_0850D770, sizeof gUnknown_0850D770);
|
||||
direction = GetRunningPastFacingDirection(mapObject, 1);
|
||||
direction = GetRunningPastFacingDirection(mapObject, RUNFOLLOW_NORTH_SOUTH);
|
||||
if (direction == 0)
|
||||
{
|
||||
direction = directions[Random() & 0x01];
|
||||
@@ -2477,7 +2477,7 @@ bool8 sub_8090288 (struct MapObject *mapObject, struct Sprite *sprite)
|
||||
u8 direction;
|
||||
|
||||
memcpy(directions, gUnknown_0850D790, sizeof gUnknown_0850D790);
|
||||
direction = GetRunningPastFacingDirection(mapObject, 2);
|
||||
direction = GetRunningPastFacingDirection(mapObject, RUNFOLLOW_EAST_WEST);
|
||||
if (direction == 0)
|
||||
{
|
||||
direction = directions[Random() & 0x01];
|
||||
@@ -2530,7 +2530,60 @@ bool8 sub_80903C8 (struct MapObject *mapObject, struct Sprite *sprite)
|
||||
u8 direction;
|
||||
|
||||
memcpy(directions, gUnknown_0850D7F0, sizeof gUnknown_0850D7F0);
|
||||
direction = GetRunningPastFacingDirection(mapObject, 3);
|
||||
direction = GetRunningPastFacingDirection(mapObject, RUNFOLLOW_NORTH_WEST);
|
||||
if (direction == 0)
|
||||
{
|
||||
direction = directions[Random() & 0x01];
|
||||
}
|
||||
FieldObjectSetDirection(mapObject, direction);
|
||||
sprite->data1 = 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
field_object_step(RandomlyLookNorthOrEast, gUnknown_0850D7F4)
|
||||
|
||||
bool8 sub_8090454 (struct MapObject *mapObject, struct Sprite *sprite)
|
||||
{
|
||||
npc_reset(mapObject, sprite);
|
||||
sprite->data1 = 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_8090468 (struct MapObject *mapObject, struct Sprite *sprite)
|
||||
{
|
||||
FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(mapObject->mapobj_unk_18));
|
||||
sprite->data1 = 2;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_8090494 (struct MapObject *mapObject, struct Sprite *sprite)
|
||||
{
|
||||
if (FieldObjectExecRegularAnim(mapObject, sprite))
|
||||
{
|
||||
SetFieldObjectStepTimer(sprite, gUnknown_0850D6EC[Random() & 0x03]);
|
||||
mapObject->mapobj_bit_1 = FALSE;
|
||||
sprite->data1 = 3;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 sub_80904D8 (struct MapObject *mapObject, struct Sprite *sprite)
|
||||
{
|
||||
if (RunFieldObjectStepTimer(sprite) || FieldObjectIsTrainerAndCloseToPlayer(mapObject))
|
||||
{
|
||||
sprite->data1 = 4;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 sub_8090508 (struct MapObject *mapObject, struct Sprite *sprite)
|
||||
{
|
||||
u8 directions[2];
|
||||
u8 direction;
|
||||
|
||||
memcpy(directions, gUnknown_0850D808, sizeof gUnknown_0850D808);
|
||||
direction = GetRunningPastFacingDirection(mapObject, RUNFOLLOW_NORTH_EAST);
|
||||
if (direction == 0)
|
||||
{
|
||||
direction = directions[Random() & 0x01];
|
||||
|
||||
Reference in New Issue
Block a user