summaryrefslogtreecommitdiff
path: root/src/field_control_avatar.c
diff options
context:
space:
mode:
authorgolem galvanize <golemgalvanize@github.com>2018-12-07 14:47:20 -0500
committergolem galvanize <golemgalvanize@github.com>2018-12-07 14:47:20 -0500
commit53fac4417b53fcee2cc9e46d72ad598b016cc967 (patch)
tree07e69072826569c7c31230cb4671a5d321e5f972 /src/field_control_avatar.c
parent18124740a4d75ae95948f95ca6f63c320e51501c (diff)
parent6df2042b3b3ea8e7bf61cfd95bd24ee06e7b4b32 (diff)
fixing merge conflicts
Diffstat (limited to 'src/field_control_avatar.c')
-rw-r--r--src/field_control_avatar.c60
1 files changed, 5 insertions, 55 deletions
diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c
index fef403c04..c52f5190f 100644
--- a/src/field_control_avatar.c
+++ b/src/field_control_avatar.c
@@ -1,11 +1,11 @@
#include "global.h"
#include "battle_setup.h"
-#include "battle_frontier_1.h"
#include "bike.h"
#include "coord_event_weather.h"
#include "daycare.h"
#include "event_data.h"
#include "event_object_movement.h"
+#include "event_scripts.h"
#include "fieldmap.h"
#include "field_control_avatar.h"
#include "field_fadetransition.h"
@@ -31,62 +31,13 @@
#include "constants/map_types.h"
#include "constants/songs.h"
+extern bool32 sub_8196034(void);
+
static EWRAM_DATA u8 sWildEncounterImmunitySteps = 0;
static EWRAM_DATA u16 sPreviousPlayerMetatileBehavior = 0;
u8 gSelectedEventObject;
-//scripts
-extern const u8 EventScript_PlayerPCMale[];
-extern const u8 EventScript_PlayerPCFemale[];
-extern const u8 EventScript_SecretBasePC[];
-extern const u8 EventScript_RecordMixingSecretBasePC[];
-extern const u8 EventScript_SecretPower1[];
-extern const u8 EventScript_SecretPower2[];
-extern const u8 EventScript_PC[];
-extern const u8 EventScript_TestSignpostMsg[];
-extern const u8 EventScript_HiddenItemScript[];
-extern const u8 EventScript_2759F1[];
-extern const u8 EventScript_TV[];
-extern const u8 EventScript_ClosedSootopolisDoor[];
-extern const u8 SkyPillar_Outside_EventScript_2393F9[];
-extern const u8 EventScript_CableBoxResults[];
-extern const u8 EventScript_2A4BAC[];
-extern const u8 Route110_TrickHouseEntrance_EventScript_26A22A[];
-extern const u8 EventScript_RegionMap[];
-extern const u8 EventScript_RunningShoesManual[];
-extern const u8 EventScript_PictureBookShelf[];
-extern const u8 EventScript_BookShelf[];
-extern const u8 EventScript_PokemonCenterBookshelf[];
-extern const u8 EventScript_Vase[];
-extern const u8 EventScript_TrashCan[];
-extern const u8 EventScript_ShopShelf[];
-extern const u8 EventScript_Blueprint[];
-extern const u8 EventScript_WirelessBoxResults[];
-extern const u8 EventScript_CableBoxResults[];
-extern const u8 EventScript_Questionnaire[];
-extern const u8 EventScript_TrainerHillTimer[];
-extern const u8 EventScript_SecretBaseSandOrnament[];
-extern const u8 EventScript_SecretBaseShieldOrToyTV[];
-extern const u8 EventScript_UseSurf[];
-extern const u8 EventScript_UseWaterfall[];
-extern const u8 EventScript_CannotUseWaterfall[];
-extern const u8 EventScript_UseDive[];
-extern const u8 EventScript_UseDiveUnderwater[];
-extern const u8 EventScript_FallDownHole[];
-extern const u8 BattleFrontier_BattlePyramidEmptySquare_EventScript_252BE8[];
-extern const u8 EventScript_Poison[];
-extern const u8 EventScript_EggHatch[];
-extern const u8 gUnknown_08273D1F[];
-extern const u8 IslandCave_EventScript_238EAF[];
-extern const u8 MauvilleCity_EventScript_1DF7BA[];
-extern const u8 Route119_EventScript_1F49EC[];
-extern const u8 LittlerootTown_ProfessorBirchsLab_EventScript_1FA4D6[];
-extern const u8 RustboroCity_Gym_EventScript_21307B[];
-extern const u8 MossdeepCity_SpaceCenter_2F_EventScript_224175[];
-extern const u8 SSTidalCorridor_EventScript_23C050[];
-extern const u8 gUnknown_082A8350[];
-
static void GetPlayerPosition(struct MapPosition *);
static void GetInFrontOfPlayerPosition(struct MapPosition *);
static u16 GetPlayerCurMetatileBehavior(int);
@@ -178,7 +129,7 @@ void FieldGetPlayerInput(struct FieldInput *input, u16 newKeys, u16 heldKeys)
input->dpadDirection = DIR_EAST;
}
-int sub_809C014(struct FieldInput *input)
+int ProcessPlayerFieldInput(struct FieldInput *input)
{
struct MapPosition position;
u8 playerDirection;
@@ -557,8 +508,7 @@ static bool8 TryStartCoordEventScript(struct MapPosition *position)
static bool8 TryStartMiscWalkingScripts(u16 metatileBehavior)
{
- s16 x;
- s16 y;
+ s16 x, y;
if (MetatileBehavior_IsCrackedFloorHole(metatileBehavior))
{