Rename field_map_obj to event_object_movement

This commit is contained in:
Marcus Huderle
2018-06-11 08:34:19 -05:00
parent 300428d540
commit 38a126df66
31 changed files with 96 additions and 147 deletions
+2 -2
View File
@@ -21,7 +21,7 @@
#include "constants/items.h"
#include "palette.h"
#include "window.h"
#include "field_map_obj.h"
#include "event_object_movement.h"
#include "event_scripts.h"
#include "trainer_see.h"
#include "field_message_box.h"
@@ -32,7 +32,7 @@
#include "overworld.h"
#include "field_weather.h"
#include "gym_leader_rematch.h"
#include "field_map_obj_helpers.h"
#include "event_object_movement_helpers.h"
enum
{
+1 -1
View File
@@ -2,7 +2,7 @@
#include "berry_tag_screen.h"
#include "berry.h"
#include "decompress.h"
#include "field_map_obj.h"
#include "event_object_movement.h"
#include "item_menu.h"
#include "constants/items.h"
#include "item.h"
+1 -1
View File
@@ -1,6 +1,6 @@
#include "global.h"
#include "bike.h"
#include "field_map_obj.h"
#include "event_object_movement.h"
#include "field_player_avatar.h"
#include "fieldmap.h"
#include "constants/flags.h"
+1 -1
View File
@@ -17,7 +17,7 @@
#include "field_player_avatar.h"
#include "field_camera.h"
#include "field_screen.h"
#include "field_map_obj.h"
#include "event_object_movement.h"
#include "list_menu.h"
#include "menu_helpers.h"
#include "menu.h"
@@ -14,7 +14,7 @@
#include "rom_818CFC8.h"
#include "rom_81BE66C.h"
#include "field_ground_effect.h"
#include "field_map_obj_helpers.h"
#include "event_object_movement_helpers.h"
#include "mauville_old_man.h"
#include "metatile_behavior.h"
#include "field_effect.h"
@@ -22,7 +22,7 @@
#include "field_camera.h"
#include "trainer_see.h"
#include "decoration.h"
#include "field_map_obj.h"
#include "event_object_movement.h"
#define NUM_FIELD_MAP_OBJECT_TEMPLATES 0x51
@@ -175,6 +175,24 @@ extern u8 (*const gUnknown_0850DEE8[5])(u8);
extern const s16 gUnknown_0850DFBC[3];
extern const s16 gUnknown_0850DFC2[3];
/*static*/ void FieldObjectUpdateMetatileBehaviors(struct MapObject*);
/*static*/ void GetAllGroundEffectFlags_OnBeginStep(struct MapObject*, u32*);
/*static*/ void GetGroundEffectFlags_Reflection(struct MapObject*, u32*);
/*static*/ void GetGroundEffectFlags_TallGrassOnSpawn(struct MapObject*, u32*);
/*static*/ void GetGroundEffectFlags_LongGrassOnSpawn(struct MapObject*, u32*);
/*static*/ void GetGroundEffectFlags_SandHeap(struct MapObject*, u32*);
/*static*/ void GetGroundEffectFlags_ShallowFlowingWater(struct MapObject*, u32*);
/*static*/ void GetGroundEffectFlags_ShortGrass(struct MapObject*, u32*);
/*static*/ void GetGroundEffectFlags_HotSprings(struct MapObject*, u32*);
/*static*/ void GetGroundEffectFlags_TallGrassOnBeginStep(struct MapObject*, u32*);
/*static*/ void GetGroundEffectFlags_LongGrassOnBeginStep(struct MapObject*, u32*);
/*static*/ void GetGroundEffectFlags_Tracks(struct MapObject*, u32*);
/*static*/ void GetGroundEffectFlags_Puddle(struct MapObject*, u32*);
/*static*/ void GetGroundEffectFlags_Ripple(struct MapObject*, u32*);
/*static*/ void GetGroundEffectFlags_Seaweed(struct MapObject*, u32*);
/*static*/ void GetGroundEffectFlags_JumpLanding(struct MapObject*, u32*);
// Code
static void npc_clear_ids_and_state(struct MapObject *mapObject)
@@ -5117,3 +5135,42 @@ static void npc_update_obj_anim_flag(struct MapObject *mapObject, struct Sprite
sprite->invisible = TRUE;
}
}
/*static*/ void GetAllGroundEffectFlags_OnSpawn(struct MapObject *eventObj, u32 *flags)
{
FieldObjectUpdateMetatileBehaviors(eventObj);
GetGroundEffectFlags_Reflection(eventObj, flags);
GetGroundEffectFlags_TallGrassOnSpawn(eventObj, flags);
GetGroundEffectFlags_LongGrassOnSpawn(eventObj, flags);
GetGroundEffectFlags_SandHeap(eventObj, flags);
GetGroundEffectFlags_ShallowFlowingWater(eventObj, flags);
GetGroundEffectFlags_ShortGrass(eventObj, flags);
GetGroundEffectFlags_HotSprings(eventObj, flags);
}
/*static*/ void GetAllGroundEffectFlags_OnBeginStep(struct MapObject *eventObj, u32 *flags)
{
FieldObjectUpdateMetatileBehaviors(eventObj);
GetGroundEffectFlags_Reflection(eventObj, flags);
GetGroundEffectFlags_TallGrassOnBeginStep(eventObj, flags);
GetGroundEffectFlags_LongGrassOnBeginStep(eventObj, flags);
GetGroundEffectFlags_Tracks(eventObj, flags);
GetGroundEffectFlags_SandHeap(eventObj, flags);
GetGroundEffectFlags_ShallowFlowingWater(eventObj, flags);
GetGroundEffectFlags_Puddle(eventObj, flags);
GetGroundEffectFlags_ShortGrass(eventObj, flags);
GetGroundEffectFlags_HotSprings(eventObj, flags);
}
/*static*/ void GetAllGroundEffectFlags_OnFinishStep(struct MapObject *eventObj, u32 *flags)
{
FieldObjectUpdateMetatileBehaviors(eventObj);
GetGroundEffectFlags_ShallowFlowingWater(eventObj, flags);
GetGroundEffectFlags_SandHeap(eventObj, flags);
GetGroundEffectFlags_Puddle(eventObj, flags);
GetGroundEffectFlags_Ripple(eventObj, flags);
GetGroundEffectFlags_ShortGrass(eventObj, flags);
GetGroundEffectFlags_HotSprings(eventObj, flags);
GetGroundEffectFlags_Seaweed(eventObj, flags);
GetGroundEffectFlags_JumpLanding(eventObj, flags);
}
@@ -1,8 +1,8 @@
#include "global.h"
#include "field_ground_effect.h"
#include "field_map_obj.h"
#include "event_object_movement.h"
#include "field_effect.h"
#include "field_map_obj_helpers.h"
#include "event_object_movement_helpers.h"
#include "malloc.h"
#include "task.h"
#include "util.h"
+1 -1
View File
@@ -4,7 +4,7 @@
#include "field_camera.h"
#include "field_player_avatar.h"
#include "fieldmap.h"
#include "field_map_obj.h"
#include "event_object_movement.h"
#include "gpu_regs.h"
#include "menu.h"
#include "overworld.h"
+2 -2
View File
@@ -6,8 +6,8 @@
#include "decompress.h"
#include "field_camera.h"
#include "field_effect_helpers.h"
#include "field_map_obj.h"
#include "field_map_obj_helpers.h"
#include "event_object_movement.h"
#include "event_object_movement_helpers.h"
#include "field_player_avatar.h"
#include "field_screen.h"
#include "field_weather.h"
+1 -1
View File
@@ -1,7 +1,7 @@
#include "global.h"
#include "task.h"
#include "sprite.h"
#include "field_map_obj.h"
#include "event_object_movement.h"
#include "constants/songs.h"
#include "sound.h"
#include "palette.h"
+1 -1
View File
@@ -4,7 +4,7 @@
#include "constants/songs.h"
#include "event_data.h"
#include "field_camera.h"
#include "field_map_obj.h"
#include "event_object_movement.h"
#include "malloc.h"
#include "random.h"
#include "roulette_util.h"
+1 -1
View File
@@ -4,7 +4,7 @@
#include "bg.h"
#include "event_data.h"
#include "field_camera.h"
#include "field_map_obj.h"
#include "event_object_movement.h"
#include "fieldmap.h"
#include "global.fieldmap.h"
#include "gpu_regs.h"
+1 -1
View File
@@ -9,7 +9,7 @@
#include "constants/songs.h"
#include "decompress.h"
#include "event_data.h"
#include "field_map_obj_helpers.h"
#include "event_object_movement_helpers.h"
#include "field_player_avatar.h"
#include "field_specials.h"
#include "graphics.h"
+2 -2
View File
@@ -12,12 +12,12 @@
#include "data2.h"
#include "event_data.h"
#include "fieldmap.h"
#include "field_map_obj.h"
#include "event_object_movement.h"
#include "field_player_avatar.h"
#include "field_screen.h"
#include "field_weather.h"
#include "item.h"
#include "field_map_obj_helpers.h"
#include "event_object_movement_helpers.h"
#include "mail.h"
#include "metatile_behavior.h"
#include "overworld.h"
+2 -2
View File
@@ -1,7 +1,7 @@
#include "global.h"
#include "event_data.h"
#include "field_map_obj.h"
#include "field_map_obj_helpers.h"
#include "event_object_movement.h"
#include "event_object_movement_helpers.h"
#include "field_player_avatar.h"
#include "map_obj_lock.h"
#include "script_movement.h"
+1 -1
View File
@@ -11,7 +11,7 @@
#include "pokemon.h"
#include "field_specials.h"
#include "field_player_avatar.h"
#include "field_map_obj.h"
#include "event_object_movement.h"
#include "event_data.h"
#include "constants/vars.h"
#include "constants/songs.h"
+2 -2
View File
@@ -11,8 +11,8 @@
#include "field_effect.h"
#include "field_fadetransition.h"
#include "field_ground_effect.h"
#include "field_map_obj.h"
#include "field_map_obj_helpers.h"
#include "event_object_movement.h"
#include "event_object_movement_helpers.h"
#include "field_message_box.h"
#include "field_player_avatar.h"
#include "field_screen_effect.h"
+1 -1
View File
@@ -4,7 +4,7 @@
#include "decoration.h"
#include "event_scripts.h"
#include "field_fadetransition.h"
#include "field_map_obj.h"
#include "event_object_movement.h"
#include "field_screen.h"
#include "field_weather.h"
#include "international_string_util.h"
+1 -1
View File
@@ -6,7 +6,7 @@
#include "event_data.h"
#include "event_scripts.h"
#include "field_effect.h"
#include "field_map_obj.h"
#include "event_object_movement.h"
#include "field_player_avatar.h"
#include "item_use.h"
#include "party_menu.h"
+1 -1
View File
@@ -1,7 +1,7 @@
#include "global.h"
#include "bike.h"
#include "event_data.h"
#include "field_map_obj.h"
#include "event_object_movement.h"
#include "constants/maps.h"
#include "constants/songs.h"
#include "sound.h"
+2 -2
View File
@@ -13,8 +13,8 @@
#include "field_door.h"
#include "field_effect.h"
#include "field_fadetransition.h"
#include "field_map_obj.h"
#include "field_map_obj_helpers.h"
#include "event_object_movement.h"
#include "event_object_movement_helpers.h"
#include "field_message_box.h"
#include "field_player_avatar.h"
#include "field_screen_effect.h"
+2 -2
View File
@@ -1,7 +1,7 @@
#include "global.h"
#include "script_movement.h"
#include "field_map_obj.h"
#include "field_map_obj_helpers.h"
#include "event_object_movement.h"
#include "event_object_movement_helpers.h"
#include "task.h"
#include "util.h"
+1 -1
View File
@@ -20,7 +20,7 @@
#include "field_player_avatar.h"
#include "field_screen.h"
#include "field_weather.h"
#include "field_map_obj.h"
#include "event_object_movement.h"
#include "field_effect.h"
#include "fldeff_80F9BCC.h"
#include "metatile_behavior.h"
+1 -1
View File
@@ -15,7 +15,7 @@
#include "battle_frontier_2.h"
#include "rom_818CFC8.h"
#include "field_specials.h"
#include "field_map_obj_helpers.h"
#include "event_object_movement_helpers.h"
#include "script.h"
#include "main.h"
#include "sound.h"
+2 -2
View File
@@ -4,9 +4,9 @@
#include "pokemon.h"
#include "sprite.h"
#include "field_effect.h"
#include "field_map_obj.h"
#include "event_object_movement.h"
#include "field_player_avatar.h"
#include "field_map_obj_helpers.h"
#include "event_object_movement_helpers.h"
#include "pokenav.h"
#include "task.h"
#include "util.h"
+1 -1
View File
@@ -26,7 +26,7 @@
#include "lilycove_lady.h"
#include "rom6.h"
#include "pokedex.h"
#include "field_map_obj.h"
#include "event_object_movement.h"
#include "text.h"
#include "script_menu.h"
#include "naming_screen.h"