diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2018-10-06 17:48:06 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2018-10-06 17:48:06 -0400 |
commit | b6cc51de43826e74fef7967b1694133a87c215f9 (patch) | |
tree | 49d3bd4e2519a023ae3086eb00df4cd1f4e884d0 /src | |
parent | 53b701c9effd24ec19e1e0dbeb5f411b0674a95d (diff) |
through sub_810C96C
Diffstat (limited to 'src')
-rw-r--r-- | src/vs_seeker.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/vs_seeker.c b/src/vs_seeker.c index b18521b83..9c4f12a1d 100644 --- a/src/vs_seeker.c +++ b/src/vs_seeker.c @@ -7,6 +7,9 @@ #include "new_menu_helpers.h" #include "item_use.h" #include "event_scripts.h" +#include "script.h" +#include "map_obj_lock.h" +#include "field_specials.h" #include "item_menu.h" #include "field_effect.h" #include "script_movement.h" @@ -26,10 +29,12 @@ void sub_810C730(u8 taskId); void sub_810C760(u8 taskId); void sub_810C808(void); void sub_810C8EC(u8 taskId); +void sub_810D304(void); bool8 sub_810C96C(void); void sub_810C604(void); u8 sub_810C9A8(const void *); u16 sub_810D074(const u8 *); +u8 sub_810D1CC(void); // rodata extern const struct UnkStruct_845318C gUnknown_845318C[]; @@ -121,3 +126,41 @@ void sub_810C808(void) } gUnknown_203ADB8->unk_000[vsSeekerObjectIdx].unk_6 = 0xFF; } + +void sub_810C8EC(u8 taskId) +{ + if (ScriptMovement_IsObjectMovementFinished(0xFF, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup)) + { + if (gUnknown_203ADB8->unk_431_3 == 0) + { + DisplayItemMessageOnField(taskId, 2, gUnknown_81C1429, sub_80A1E0C); + } + else + { + if (gUnknown_203ADB8->unk_431_3 == 2) + sub_810D304(); + sub_80F6F54(0, 1); + sub_80696C0(); + ScriptContext2_Disable(); + DestroyTask(taskId); + } + Free(gUnknown_203ADB8); + } +} + +u8 sub_810C96C(void) +{ + u8 vsSeekerChargeSteps = gSaveBlock1Ptr->trainerRematchStepCounter; + if (vsSeekerChargeSteps == 100) + { + if (sub_810D1CC() == 0xFF) + return 1; + else + return 2; + } + else + { + TV_PrintIntToStringVar(0, 100 - vsSeekerChargeSteps); + return 0; + } +} |