Add missing script labels
This commit is contained in:
+22
-15
@@ -27,6 +27,13 @@
|
||||
#include "constants/items.h"
|
||||
#include "constants/quest_log.h"
|
||||
|
||||
enum
|
||||
{
|
||||
VSSEEKER_NOT_CHARGED,
|
||||
VSSEEKER_NO_ONE_IN_RANGE,
|
||||
VSSEEKER_CAN_USE,
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
VSSEEKER_RESPONSE_NO_RESPONSE,
|
||||
@@ -735,17 +742,17 @@ void Task_VsSeeker_0(u8 taskId)
|
||||
sVsSeeker = AllocZeroed(sizeof(struct VsSeekerStruct));
|
||||
GatherNearbyTrainerInfo();
|
||||
respval = CanUseVsSeeker();
|
||||
if (respval == 0)
|
||||
if (respval == VSSEEKER_NOT_CHARGED)
|
||||
{
|
||||
Free(sVsSeeker);
|
||||
DisplayItemMessageOnField(taskId, 2, gUnknown_81C137C, sub_80A1E0C);
|
||||
DisplayItemMessageOnField(taskId, 2, VSSeeker_Text_BatteryNotChargedNeedXSteps, sub_80A1E0C);
|
||||
}
|
||||
else if (respval == 1)
|
||||
else if (respval == VSSEEKER_NO_ONE_IN_RANGE)
|
||||
{
|
||||
Free(sVsSeeker);
|
||||
DisplayItemMessageOnField(taskId, 2, gUnknown_81C13D6, sub_80A1E0C);
|
||||
DisplayItemMessageOnField(taskId, 2, VSSeeker_Text_NoTrainersWithinRange, sub_80A1E0C);
|
||||
}
|
||||
else if (respval == 2)
|
||||
else if (respval == VSSEEKER_CAN_USE)
|
||||
{
|
||||
ItemUse_SetQuestLogEvent(QL_EVENT_USED_ITEM, 0, gSpecialVar_ItemId, 0xffff);
|
||||
FieldEffectStart(FLDEFF_USE_VS_SEEKER);
|
||||
@@ -814,13 +821,13 @@ static void Task_VsSeeker_3(u8 taskId)
|
||||
{
|
||||
if (ScriptMovement_IsObjectMovementFinished(0xFF, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup))
|
||||
{
|
||||
if (sVsSeeker->responseCode == 0)
|
||||
if (sVsSeeker->responseCode == VSSEEKER_RESPONSE_NO_RESPONSE)
|
||||
{
|
||||
DisplayItemMessageOnField(taskId, 2, gUnknown_81C1429, sub_80A1E0C);
|
||||
DisplayItemMessageOnField(taskId, 2, VSSeeker_Text_TrainersNotReady, sub_80A1E0C);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sVsSeeker->responseCode == 2)
|
||||
if (sVsSeeker->responseCode == VSSEEKER_RESPONSE_FOUND_REMATCHES)
|
||||
StartAllRespondantIdleMovements();
|
||||
ClearDialogWindowAndFrame(0, 1);
|
||||
sub_80696C0();
|
||||
@@ -831,20 +838,20 @@ static void Task_VsSeeker_3(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
u8 CanUseVsSeeker(void)
|
||||
static u8 CanUseVsSeeker(void)
|
||||
{
|
||||
u8 vsSeekerChargeSteps = gSaveBlock1Ptr->trainerRematchStepCounter;
|
||||
if (vsSeekerChargeSteps == 100)
|
||||
{
|
||||
if (GetRematchableTrainerLocalId() == 0xFF)
|
||||
return 1;
|
||||
return VSSEEKER_NO_ONE_IN_RANGE;
|
||||
else
|
||||
return 2;
|
||||
return VSSEEKER_CAN_USE;
|
||||
}
|
||||
else
|
||||
{
|
||||
TV_PrintIntToStringVar(0, 100 - vsSeekerChargeSteps);
|
||||
return 0;
|
||||
return VSSEEKER_NOT_CHARGED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -928,11 +935,11 @@ static u8 GetVsSeekerResponseInArea(const VsSeekerData * a0)
|
||||
PlaySE(SE_PIN);
|
||||
FlagSet(FLAG_SYS_VS_SEEKER_CHARGING);
|
||||
sub_810C640();
|
||||
return 2;
|
||||
return VSSEEKER_RESPONSE_FOUND_REMATCHES;
|
||||
}
|
||||
if (sVsSeeker->trainerHasNotYetBeenFought)
|
||||
return 1;
|
||||
return 0;
|
||||
return VSSEEKER_RESPONSE_UNFOUGHT_TRAINERS;
|
||||
return VSSEEKER_RESPONSE_NO_RESPONSE;
|
||||
}
|
||||
|
||||
void sub_810CB90(void)
|
||||
|
||||
Reference in New Issue
Block a user