blob: f479ef68d7a99be06d9133a968e6cce7c5e4356e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#include "global.h"
#include "event_data.h"
#include "event_scripts.h"
#include "field_effect.h"
#include "fldeff.h"
#include "party_menu.h"
#include "script.h"
#include "string_util.h"
#include "task.h"
#include "constants/event_objects.h"
#include "constants/field_effects.h"
// static functions
static void FldEff_UseStrength(void);
static void sub_8145E74(void);
// text
bool8 SetUpFieldMove_Strength(void)
{
if (CheckObjectGraphicsInFrontOfPlayer(OBJ_EVENT_GFX_PUSHABLE_BOULDER) == TRUE)
{
gSpecialVar_Result = GetCursorSelectionMonId();
gFieldCallback2 = FieldCallback_PrepareFadeInFromMenu;
gPostMenuFieldCallback = FldEff_UseStrength;
return TRUE;
}
return FALSE;
}
static void FldEff_UseStrength(void)
{
gFieldEffectArguments[0] = GetCursorSelectionMonId();
ScriptContext1_SetupScript(EventScript_FldEffStrength);
}
bool8 sub_8145E2C(void)
{
u8 taskId = oei_task_add();
gTasks[taskId].data[8] = (u32)sub_8145E74 >> 16;
gTasks[taskId].data[9] = (u32)sub_8145E74;
GetMonNickname(&gPlayerParty[gFieldEffectArguments[0]], gStringVar1);
return FALSE;
}
static void sub_8145E74(void)
{
FieldEffectActiveListRemove(FLDEFF_USE_STRENGTH);
EnableBothScriptContexts();
}
|