summaryrefslogtreecommitdiff
path: root/src/trainer_see.c
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2017-01-21 16:48:06 -0800
committerYamaArashi <shadow962@live.com>2017-01-21 16:48:06 -0800
commitbcaab977727ded65c9eeaef9dbef9e9441d26fb7 (patch)
treeb93f1df1194ebbe96e6b331b8387d75eeb19f4cb /src/trainer_see.c
parenta8b6cad54a9e0abadd61d3d71d5e9ee9f279382b (diff)
formatting
Diffstat (limited to 'src/trainer_see.c')
-rw-r--r--src/trainer_see.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/trainer_see.c b/src/trainer_see.c
index 28904d04d..9d58faab8 100644
--- a/src/trainer_see.c
+++ b/src/trainer_see.c
@@ -23,7 +23,7 @@ bool8 CheckTrainers(void)
{
u8 i;
- for(i = 0; i < 16; i++)
+ for (i = 0; i < 16; i++)
{
if ( gMapObjects[i].active )
if ( gMapObjects[i].trainerType == 1 || gMapObjects[i].trainerType == 3 )
@@ -37,14 +37,14 @@ bool8 CheckTrainer(u8 trainer)
{
u8 *scriptPtr = GetFieldObjectScriptPointerByFieldObjectId(trainer);
- if(GetTrainerFlagFromScriptPointer(scriptPtr))
+ if (GetTrainerFlagFromScriptPointer(scriptPtr))
return FALSE;
else
{
struct MapObject *trainerObj = &gMapObjects[trainer];
u8 canApproach = TrainerCanApproachPlayer(trainerObj);
- if(canApproach != 0)
+ if (canApproach != 0)
{
TrainerWantsBattle(trainer, scriptPtr);
sub_80842C8(trainerObj, (canApproach - 1));
@@ -71,7 +71,7 @@ bool8 TrainerCanApproachPlayer(struct MapObject *trainerObj)
}
else // spinners
{
- for(i = 0; i < 4; i++)
+ for (i = 0; i < 4; i++)
{
playerCoord = gIsTrainerInRange[i](trainerObj, trainerObj->trainerRange_berryTreeId, x, y);
if ( CheckPathBetweenTrainerAndPlayer((struct MapObject2 *)trainerObj, playerCoord, i + 1) ) // directions are 1-4 instead of 0-3. south north west east
@@ -233,7 +233,7 @@ s8 sub_808441C(u8 taskId, struct Task *task, struct MapObject *trainerObj)
{
if (!(FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive(trainerObj)) || FieldObjectClearAnimIfSpecialAnimFinished(trainerObj))
{
- if(task->data[3])
+ if (task->data[3])
{
FieldObjectSetSpecialAnim(trainerObj, GetGoSpeed0AnimId(trainerObj->mapobj_unk_18));
task->data[3]--;
@@ -282,7 +282,7 @@ s8 sub_8084534(u8 taskId, struct Task *task, struct MapObject *trainerObj) // te
s8 sub_8084578(u8 taskId, struct Task *task, struct MapObject *trainerObj)
{
- if(!FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive(trainerObj)
+ if (!FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive(trainerObj)
|| FieldObjectClearAnimIfSpecialAnimFinished(trainerObj))
{
FieldObjectSetSpecialAnim(trainerObj, 0x59);
@@ -301,7 +301,7 @@ s8 sub_80845AC(u8 taskId, struct Task *task, struct MapObject *trainerObj)
s8 sub_80845C8(u8 taskId, struct Task *task, struct MapObject *trainerObj)
{
- if(!FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive(trainerObj)
+ if (!FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive(trainerObj)
|| FieldObjectClearAnimIfSpecialAnimFinished(trainerObj))
{
FieldObjectSetSpecialAnim(trainerObj, 0x3E);
@@ -312,7 +312,7 @@ s8 sub_80845C8(u8 taskId, struct Task *task, struct MapObject *trainerObj)
s8 sub_80845FC(u8 taskId, struct Task *task, struct MapObject *trainerObj)
{
- if(FieldObjectCheckIfSpecialAnimFinishedOrInactive(trainerObj))
+ if (FieldObjectCheckIfSpecialAnimFinishedOrInactive(trainerObj))
{
gUnknown_0202FF84[0] = trainerObj->coords2.x;
gUnknown_0202FF84[1] = trainerObj->coords2.y;
@@ -328,7 +328,7 @@ s8 sub_8084654(u8 taskId, struct Task *task, struct MapObject *trainerObj)
{
struct Sprite *sprite;
- if(gSprites[task->data[4]].animCmdIndex == 2)
+ if (gSprites[task->data[4]].animCmdIndex == 2)
{
trainerObj->mapobj_bit_26 = 0;
trainerObj->mapobj_bit_2 = 1;
@@ -344,7 +344,7 @@ s8 sub_8084654(u8 taskId, struct Task *task, struct MapObject *trainerObj)
s8 sub_80846C8(u8 taskId, struct Task *task, struct MapObject *trainerObj)
{
- if(!FieldEffectActiveListContains(49))
+ if (!FieldEffectActiveListContains(49))
task->data[0] = 3;
return 0;
@@ -357,13 +357,13 @@ void sub_80846E4(u8 taskId)
// another mapObj loaded into by loadword?
LoadWordFromTwoHalfwords(&task->data[1], (u32 *)&mapObj);
- if(!task->data[7])
+ if (!task->data[7])
{
FieldObjectClearAnim(mapObj);
task->data[7]++;
}
gTrainerSeeFuncList2[task->data[0]](taskId, task, mapObj);
- if(task->data[0] == 3 && !FieldEffectActiveListContains(49))
+ if (task->data[0] == 3 && !FieldEffectActiveListContains(49))
{
npc_set_running_behaviour_etc(mapObj, npc_running_behaviour_by_direction(mapObj->mapobj_unk_18));
sub_805C774(mapObj, npc_running_behaviour_by_direction(mapObj->mapobj_unk_18));