Continue documenting overworld/field effects
@ -52,9 +52,9 @@
|
|||||||
special CallTrainerHillFunction
|
special CallTrainerHillFunction
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ Unknown, dummied. Only side effect is setting VAR_RESULT to 0.
|
@ Unknown, dummied. E-Reader association is assumed. Only side effect is setting VAR_RESULT to 0.
|
||||||
.macro trainerhill_clearresult
|
.macro trainerhill_getusingereader
|
||||||
setvar VAR_0x8004, TRAINER_HILL_FUNC_CLEAR_RESULT
|
setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_IN_EREADER_MODE
|
||||||
special CallTrainerHillFunction
|
special CallTrainerHillFunction
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -17,17 +17,17 @@ gFieldEffectScriptPointers:: @ 82DB9D4
|
|||||||
.4byte gFieldEffectScript_UseSurf @ FLDEFF_USE_SURF
|
.4byte gFieldEffectScript_UseSurf @ FLDEFF_USE_SURF
|
||||||
.4byte gFieldEffectScript_GroundImpactDust @ FLDEFF_DUST
|
.4byte gFieldEffectScript_GroundImpactDust @ FLDEFF_DUST
|
||||||
.4byte gFieldEffectScript_UseSecretPowerCave @ FLDEFF_USE_SECRET_POWER_CAVE
|
.4byte gFieldEffectScript_UseSecretPowerCave @ FLDEFF_USE_SECRET_POWER_CAVE
|
||||||
.4byte gFieldEffectScript_BikeHopTallGrass @ FLDEFF_JUMP_TALL_GRASS
|
.4byte gFieldEffectScript_JumpTallGrass @ FLDEFF_JUMP_TALL_GRASS
|
||||||
.4byte gFieldEffectScript_SandFootprints @ FLDEFF_SAND_FOOTPRINTS
|
.4byte gFieldEffectScript_SandFootprints @ FLDEFF_SAND_FOOTPRINTS
|
||||||
.4byte gFieldEffectScript_BikeHopBigSplash @ FLDEFF_JUMP_BIG_SPLASH
|
.4byte gFieldEffectScript_JumpBigSplash @ FLDEFF_JUMP_BIG_SPLASH
|
||||||
.4byte gFieldEffectScript_Splash @ FLDEFF_SPLASH
|
.4byte gFieldEffectScript_Splash @ FLDEFF_SPLASH
|
||||||
.4byte gFieldEffectScript_BikeHopSmallSplash @ FLDEFF_JUMP_SMALL_SPLASH
|
.4byte gFieldEffectScript_JumpSmallSplash @ FLDEFF_JUMP_SMALL_SPLASH
|
||||||
.4byte gFieldEffectScript_LongGrass @ FLDEFF_LONG_GRASS
|
.4byte gFieldEffectScript_LongGrass @ FLDEFF_LONG_GRASS
|
||||||
.4byte gFieldEffectScript_JumpLongGrass @ FLDEFF_JUMP_LONG_GRASS
|
.4byte gFieldEffectScript_JumpLongGrass @ FLDEFF_JUMP_LONG_GRASS
|
||||||
.4byte gFieldEffectScript_Unknown19 @ FLDEFF_UNKNOWN_19
|
.4byte gFieldEffectScript_Unknown19 @ FLDEFF_UNKNOWN_19
|
||||||
.4byte gFieldEffectScript_UnusedGrass @ FLDEFF_UNUSED_GRASS
|
.4byte gFieldEffectScript_UnusedGrass2 @ FLDEFF_UNUSED_GRASS_2
|
||||||
.4byte gFieldEffectScript_Unknown21 @ FLDEFF_UNKNOWN_21
|
.4byte gFieldEffectScript_Unknown21 @ FLDEFF_UNKNOWN_21
|
||||||
.4byte gFieldEffectScript_Unknown22 @ FLDEFF_UNKNOWN_22
|
.4byte gFieldEffectScript_WaterSurfacing @ FLDEFF_WATER_SURFACING
|
||||||
.4byte gFieldEffectScript_BerryTreeGrowthSparkle @ FLDEFF_BERRY_TREE_GROWTH_SPARKLE
|
.4byte gFieldEffectScript_BerryTreeGrowthSparkle @ FLDEFF_BERRY_TREE_GROWTH_SPARKLE
|
||||||
.4byte gFieldEffectScript_DeepSandFootprints @ FLDEFF_DEEP_SAND_FOOTPRINTS
|
.4byte gFieldEffectScript_DeepSandFootprints @ FLDEFF_DEEP_SAND_FOOTPRINTS
|
||||||
.4byte gFieldEffectScript_PokeCenterHeal @ FLDEFF_POKECENTER_HEAL
|
.4byte gFieldEffectScript_PokeCenterHeal @ FLDEFF_POKECENTER_HEAL
|
||||||
@ -54,8 +54,8 @@ gFieldEffectScriptPointers:: @ 82DB9D4
|
|||||||
.4byte gFieldEffectScript_HeartIcon @ FLDEFF_HEART_ICON
|
.4byte gFieldEffectScript_HeartIcon @ FLDEFF_HEART_ICON
|
||||||
.4byte gFieldEffectScript_Unknown47 @ FLDEFF_NOP_47
|
.4byte gFieldEffectScript_Unknown47 @ FLDEFF_NOP_47
|
||||||
.4byte gFieldEffectScript_Unknown48 @ FLDEFF_NOP_48
|
.4byte gFieldEffectScript_Unknown48 @ FLDEFF_NOP_48
|
||||||
.4byte gFieldEffectScript_JumpOutOfAsh @ FLDEFF_POP_OUT_OF_ASH
|
.4byte gFieldEffectScript_AshPuff @ FLDEFF_ASH_PUFF
|
||||||
.4byte gFieldEffectScript_LavaridgeGymWarp @ FLDEFF_LAVARIDGE_GYM_WARP
|
.4byte gFieldEffectScript_AshLaunch @ FLDEFF_ASH_LAUNCH
|
||||||
.4byte gFieldEffectScript_SweetScent @ FLDEFF_SWEET_SCENT
|
.4byte gFieldEffectScript_SweetScent @ FLDEFF_SWEET_SCENT
|
||||||
.4byte gFieldEffectScript_SandPillar @ FLDEFF_SAND_PILLAR
|
.4byte gFieldEffectScript_SandPillar @ FLDEFF_SAND_PILLAR
|
||||||
.4byte gFieldEffectScript_Bubbles @ FLDEFF_BUBBLES
|
.4byte gFieldEffectScript_Bubbles @ FLDEFF_BUBBLES
|
||||||
@ -69,7 +69,7 @@ gFieldEffectScriptPointers:: @ 82DB9D4
|
|||||||
.4byte gFieldEffectScript_SecretBaseBootPC @ FLDEFF_PCTURN_ON
|
.4byte gFieldEffectScript_SecretBaseBootPC @ FLDEFF_PCTURN_ON
|
||||||
.4byte gFieldEffectScript_HallOfFameRecord @ FLDEFF_HALL_OF_FAME_RECORD
|
.4byte gFieldEffectScript_HallOfFameRecord @ FLDEFF_HALL_OF_FAME_RECORD
|
||||||
.4byte gFieldEffectScript_UseTeleport @ FLDEFF_USE_TELEPORT
|
.4byte gFieldEffectScript_UseTeleport @ FLDEFF_USE_TELEPORT
|
||||||
.4byte gFieldEffectScript_Rayquaza @ FLDEFF_RAYQUAZA
|
.4byte gFieldEffectScript_RayquazaSpotlight @ FLDEFF_RAYQUAZA_SPOTLIGHT
|
||||||
.4byte gFieldEffectScript_DestroyDeoxysRock @ FLDEFF_DESTROY_DEOXYS_ROCK
|
.4byte gFieldEffectScript_DestroyDeoxysRock @ FLDEFF_DESTROY_DEOXYS_ROCK
|
||||||
.4byte gFieldEffectScript_MoveDeoxysRock @ FLDEFF_MOVE_DEOXYS_ROCK
|
.4byte gFieldEffectScript_MoveDeoxysRock @ FLDEFF_MOVE_DEOXYS_ROCK
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ gFieldEffectScript_UseSecretPowerCave:: @ 82DBB32
|
|||||||
field_eff_callnative FldEff_UseSecretPowerCave
|
field_eff_callnative FldEff_UseSecretPowerCave
|
||||||
field_eff_end
|
field_eff_end
|
||||||
|
|
||||||
gFieldEffectScript_BikeHopTallGrass:: @ 82DBB38
|
gFieldEffectScript_JumpTallGrass:: @ 82DBB38
|
||||||
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo1, FldEff_JumpTallGrass
|
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo1, FldEff_JumpTallGrass
|
||||||
field_eff_end
|
field_eff_end
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ gFieldEffectScript_SandFootprints:: @ 82DBB42
|
|||||||
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_SandFootprints
|
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_SandFootprints
|
||||||
field_eff_end
|
field_eff_end
|
||||||
|
|
||||||
gFieldEffectScript_BikeHopBigSplash:: @ 82DBB4C
|
gFieldEffectScript_JumpBigSplash:: @ 82DBB4C
|
||||||
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_JumpBigSplash
|
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_JumpBigSplash
|
||||||
field_eff_end
|
field_eff_end
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ gFieldEffectScript_Splash:: @ 82DBB56
|
|||||||
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_Splash
|
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_Splash
|
||||||
field_eff_end
|
field_eff_end
|
||||||
|
|
||||||
gFieldEffectScript_BikeHopSmallSplash:: @ 82DBB60
|
gFieldEffectScript_JumpSmallSplash:: @ 82DBB60
|
||||||
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_JumpSmallSplash
|
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_JumpSmallSplash
|
||||||
field_eff_end
|
field_eff_end
|
||||||
|
|
||||||
@ -153,16 +153,16 @@ gFieldEffectScript_Unknown19:: @ 82DBB7E
|
|||||||
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo1, FldEff_Unknown19
|
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo1, FldEff_Unknown19
|
||||||
field_eff_end
|
field_eff_end
|
||||||
|
|
||||||
gFieldEffectScript_UnusedGrass:: @ 82DBB88
|
gFieldEffectScript_UnusedGrass2:: @ 82DBB88
|
||||||
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo1, FldEff_UnusedGrass
|
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo1, FldEff_UnusedGrass2
|
||||||
field_eff_end
|
field_eff_end
|
||||||
|
|
||||||
gFieldEffectScript_Unknown21:: @ 82DBB92
|
gFieldEffectScript_Unknown21:: @ 82DBB92
|
||||||
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_Unknown21
|
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_Unknown21
|
||||||
field_eff_end
|
field_eff_end
|
||||||
|
|
||||||
gFieldEffectScript_Unknown22:: @ 82DBB9C
|
gFieldEffectScript_WaterSurfacing:: @ 82DBB9C
|
||||||
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_Unknown22
|
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_WaterSurfacing
|
||||||
field_eff_end
|
field_eff_end
|
||||||
|
|
||||||
gFieldEffectScript_BerryTreeGrowthSparkle:: @ 82DBBA6
|
gFieldEffectScript_BerryTreeGrowthSparkle:: @ 82DBBA6
|
||||||
@ -271,12 +271,12 @@ gFieldEffectScript_Unknown48:: @ 82DBC66
|
|||||||
field_eff_callnative FldEff_NopA700
|
field_eff_callnative FldEff_NopA700
|
||||||
field_eff_end
|
field_eff_end
|
||||||
|
|
||||||
gFieldEffectScript_JumpOutOfAsh:: @ 82DBC6C
|
gFieldEffectScript_AshPuff:: @ 82DBC6C
|
||||||
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo2, FldEff_PopOutOfAsh
|
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo2, FldEff_AshPuff
|
||||||
field_eff_end
|
field_eff_end
|
||||||
|
|
||||||
gFieldEffectScript_LavaridgeGymWarp:: @ 82DBC76
|
gFieldEffectScript_AshLaunch:: @ 82DBC76
|
||||||
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo2, FldEff_LavaridgeGymWarp
|
field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo2, FldEff_AshLaunch
|
||||||
field_eff_end
|
field_eff_end
|
||||||
|
|
||||||
gFieldEffectScript_SweetScent:: @ 82DBC80
|
gFieldEffectScript_SweetScent:: @ 82DBC80
|
||||||
@ -332,8 +332,8 @@ gFieldEffectScript_UseTeleport:: @ 82DBCED
|
|||||||
field_eff_callnative FldEff_UseTeleport
|
field_eff_callnative FldEff_UseTeleport
|
||||||
field_eff_end
|
field_eff_end
|
||||||
|
|
||||||
gFieldEffectScript_Rayquaza:: @ 82DBCF3
|
gFieldEffectScript_RayquazaSpotlight:: @ 82DBCF3
|
||||||
field_eff_callnative sub_80B8F98
|
field_eff_callnative FldEff_RayquazaSpotlight
|
||||||
field_eff_end
|
field_eff_end
|
||||||
|
|
||||||
gFieldEffectScript_DestroyDeoxysRock:: @ 82DBCF9
|
gFieldEffectScript_DestroyDeoxysRock:: @ 82DBCF9
|
||||||
|
@ -18,8 +18,8 @@ TrainerHill_Entrance_OnWarp: @ 82680CF
|
|||||||
TrainerHill_Entrance_OnResume: @ 82680D0
|
TrainerHill_Entrance_OnResume: @ 82680D0
|
||||||
trainerhill_resumetimer
|
trainerhill_resumetimer
|
||||||
setvar VAR_TEMP_0, 0
|
setvar VAR_TEMP_0, 0
|
||||||
trainerhill_clearresult
|
trainerhill_getusingereader
|
||||||
compare VAR_RESULT, 0 @ VAR_RESULT always 0 here
|
compare VAR_RESULT, FALSE @ VAR_RESULT always FALSE here
|
||||||
goto_if_eq TrainerHill_Entrance_EventScript_TryFaceAttendant
|
goto_if_eq TrainerHill_Entrance_EventScript_TryFaceAttendant
|
||||||
setobjectxy OBJ_EVENT_ID_PLAYER, 9, 6
|
setobjectxy OBJ_EVENT_ID_PLAYER, 9, 6
|
||||||
applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Entrance_Movement_PlayerFaceAttendant
|
applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Entrance_Movement_PlayerFaceAttendant
|
||||||
|
@ -32,8 +32,8 @@ EventScript_TrainerHillTimer:: @ 82C8393
|
|||||||
|
|
||||||
TrainerHill_1F_EventScript_DummyWarpToEntranceCounter:: @ 82C83A6
|
TrainerHill_1F_EventScript_DummyWarpToEntranceCounter:: @ 82C83A6
|
||||||
setvar VAR_TEMP_2, 1
|
setvar VAR_TEMP_2, 1
|
||||||
trainerhill_clearresult
|
trainerhill_getusingereader
|
||||||
compare VAR_RESULT, 1 @ VAR_RESULT always 0 here
|
compare VAR_RESULT, TRUE @ VAR_RESULT always FALSE here
|
||||||
goto_if_eq TrainerHill_1F_EventScript_WarpSilentToEntranceCounter
|
goto_if_eq TrainerHill_1F_EventScript_WarpSilentToEntranceCounter
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 406 B After Width: | Height: | Size: 406 B |
Before Width: | Height: | Size: 346 B After Width: | Height: | Size: 346 B |
Before Width: | Height: | Size: 273 B After Width: | Height: | Size: 273 B |
Before Width: | Height: | Size: 197 B After Width: | Height: | Size: 197 B |
Before Width: | Height: | Size: 205 B After Width: | Height: | Size: 205 B |
Before Width: | Height: | Size: 344 B |
Before Width: | Height: | Size: 389 B After Width: | Height: | Size: 344 B |
BIN
graphics/field_effects/pics/unused_grass_3.png
Normal file
After Width: | Height: | Size: 389 B |
Before Width: | Height: | Size: 319 B After Width: | Height: | Size: 319 B |
Before Width: | Height: | Size: 100 B After Width: | Height: | Size: 100 B |
Before Width: | Height: | Size: 91 B After Width: | Height: | Size: 91 B |
Before Width: | Height: | Size: 99 B After Width: | Height: | Size: 99 B |
Before Width: | Height: | Size: 102 B After Width: | Height: | Size: 102 B |
Before Width: | Height: | Size: 184 B After Width: | Height: | Size: 184 B |
Before Width: | Height: | Size: 177 B After Width: | Height: | Size: 177 B |
@ -21,9 +21,9 @@
|
|||||||
#define FLDEFF_LONG_GRASS 17
|
#define FLDEFF_LONG_GRASS 17
|
||||||
#define FLDEFF_JUMP_LONG_GRASS 18
|
#define FLDEFF_JUMP_LONG_GRASS 18
|
||||||
#define FLDEFF_UNKNOWN_19 19
|
#define FLDEFF_UNKNOWN_19 19
|
||||||
#define FLDEFF_UNUSED_GRASS 20
|
#define FLDEFF_UNUSED_GRASS_2 20
|
||||||
#define FLDEFF_UNKNOWN_21 21
|
#define FLDEFF_UNKNOWN_21 21
|
||||||
#define FLDEFF_UNKNOWN_22 22
|
#define FLDEFF_WATER_SURFACING 22
|
||||||
#define FLDEFF_BERRY_TREE_GROWTH_SPARKLE 23
|
#define FLDEFF_BERRY_TREE_GROWTH_SPARKLE 23
|
||||||
#define FLDEFF_DEEP_SAND_FOOTPRINTS 24
|
#define FLDEFF_DEEP_SAND_FOOTPRINTS 24
|
||||||
#define FLDEFF_POKECENTER_HEAL 25
|
#define FLDEFF_POKECENTER_HEAL 25
|
||||||
@ -50,8 +50,8 @@
|
|||||||
#define FLDEFF_HEART_ICON 46
|
#define FLDEFF_HEART_ICON 46
|
||||||
#define FLDEFF_NOP_47 47
|
#define FLDEFF_NOP_47 47
|
||||||
#define FLDEFF_NOP_48 48
|
#define FLDEFF_NOP_48 48
|
||||||
#define FLDEFF_POP_OUT_OF_ASH 49
|
#define FLDEFF_ASH_PUFF 49
|
||||||
#define FLDEFF_LAVARIDGE_GYM_WARP 50
|
#define FLDEFF_ASH_LAUNCH 50
|
||||||
#define FLDEFF_SWEET_SCENT 51
|
#define FLDEFF_SWEET_SCENT 51
|
||||||
#define FLDEFF_SAND_PILLAR 52
|
#define FLDEFF_SAND_PILLAR 52
|
||||||
#define FLDEFF_BUBBLES 53
|
#define FLDEFF_BUBBLES 53
|
||||||
@ -65,7 +65,7 @@
|
|||||||
#define FLDEFF_PCTURN_ON 61
|
#define FLDEFF_PCTURN_ON 61
|
||||||
#define FLDEFF_HALL_OF_FAME_RECORD 62
|
#define FLDEFF_HALL_OF_FAME_RECORD 62
|
||||||
#define FLDEFF_USE_TELEPORT 63
|
#define FLDEFF_USE_TELEPORT 63
|
||||||
#define FLDEFF_RAYQUAZA 64
|
#define FLDEFF_RAYQUAZA_SPOTLIGHT 64
|
||||||
#define FLDEFF_DESTROY_DEOXYS_ROCK 65
|
#define FLDEFF_DESTROY_DEOXYS_ROCK 65
|
||||||
#define FLDEFF_MOVE_DEOXYS_ROCK 66
|
#define FLDEFF_MOVE_DEOXYS_ROCK 66
|
||||||
|
|
||||||
@ -87,9 +87,9 @@
|
|||||||
#define FLDEFFOBJ_LONG_GRASS 15
|
#define FLDEFFOBJ_LONG_GRASS 15
|
||||||
#define FLDEFFOBJ_JUMP_LONG_GRASS 16
|
#define FLDEFFOBJ_JUMP_LONG_GRASS 16
|
||||||
#define FLDEFFOBJ_17 17
|
#define FLDEFFOBJ_17 17
|
||||||
#define FLDEFFOBJ_UNUSED_GRASS 18
|
#define FLDEFFOBJ_UNUSED_GRASS_2 18
|
||||||
#define FLDEFFOBJ_19 19
|
#define FLDEFFOBJ_19 19
|
||||||
#define FLDEFFOBJ_20 20
|
#define FLDEFFOBJ_WATER_SURFACING 20
|
||||||
#define FLDEFFOBJ_REFLECTION_DISTORTION 21
|
#define FLDEFFOBJ_REFLECTION_DISTORTION 21
|
||||||
#define FLDEFFOBJ_SPARKLE 22
|
#define FLDEFFOBJ_SPARKLE 22
|
||||||
#define FLDEFFOBJ_DEEP_SAND_FOOTPRINTS 23
|
#define FLDEFFOBJ_DEEP_SAND_FOOTPRINTS 23
|
||||||
@ -101,10 +101,25 @@
|
|||||||
#define FLDEFFOBJ_SAND_PILE 29
|
#define FLDEFFOBJ_SAND_PILE 29
|
||||||
#define FLDEFFOBJ_SHORT_GRASS 30
|
#define FLDEFFOBJ_SHORT_GRASS 30
|
||||||
#define FLDEFFOBJ_HOT_SPRINGS_WATER 31
|
#define FLDEFFOBJ_HOT_SPRINGS_WATER 31
|
||||||
#define FLDEFFOBJ_JUMP_OUT_OF_ASH 32
|
#define FLDEFFOBJ_ASH_PUFF 32
|
||||||
#define FLDEFFOBJ_LAVARIDGE_GYM_WARP 33
|
#define FLDEFFOBJ_ASH_LAUNCH 33
|
||||||
#define FLDEFFOBJ_BUBBLES 34
|
#define FLDEFFOBJ_BUBBLES 34
|
||||||
#define FLDEFFOBJ_SMALL_SPARKLE 35
|
#define FLDEFFOBJ_SMALL_SPARKLE 35
|
||||||
#define FLDEFFOBJ_RAYQUAZA 36
|
#define FLDEFFOBJ_RAYQUAZA 36
|
||||||
|
|
||||||
|
#define FLDEFF_PAL_TAG_0 0x1000
|
||||||
|
#define FLDEFF_PAL_TAG_3 0x1003
|
||||||
|
#define FLDEFF_PAL_TAG_4 0x1004
|
||||||
|
#define FLDEFF_PAL_TAG_5 0x1005
|
||||||
|
#define FLDEFF_PAL_TAG_6 0x1006
|
||||||
|
#define FLDEFF_PAL_TAG_7 0x1007
|
||||||
|
#define FLDEFF_PAL_TAG_8 0x1008
|
||||||
|
#define FLDEFF_PAL_TAG_9 0x1009
|
||||||
|
#define FLDEFF_PAL_TAG_10 0x100A
|
||||||
|
#define FLDEFF_PAL_TAG_13 0x100D
|
||||||
|
#define FLDEFF_PAL_TAG_14 0x100E
|
||||||
|
#define FLDEFF_PAL_TAG_15 0x100F
|
||||||
|
#define FLDEFF_PAL_TAG_16 0x1010
|
||||||
|
#define FLDEFF_PAL_TAG_17 0x1011
|
||||||
|
|
||||||
#endif // GUARD_FIELD_EFFECT_CONSTANTS_H
|
#endif // GUARD_FIELD_EFFECT_CONSTANTS_H
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#define TRAINER_HILL_FUNC_GET_CHALLENGE_STATUS 6
|
#define TRAINER_HILL_FUNC_GET_CHALLENGE_STATUS 6
|
||||||
#define TRAINER_HILL_FUNC_GET_CHALLENGE_TIME 7
|
#define TRAINER_HILL_FUNC_GET_CHALLENGE_TIME 7
|
||||||
#define TRAINER_HILL_FUNC_GET_ALL_FLOORS_USED 8
|
#define TRAINER_HILL_FUNC_GET_ALL_FLOORS_USED 8
|
||||||
#define TRAINER_HILL_FUNC_CLEAR_RESULT 9
|
#define TRAINER_HILL_FUNC_GET_IN_EREADER_MODE 9
|
||||||
#define TRAINER_HILL_FUNC_IN_CHALLENGE 10
|
#define TRAINER_HILL_FUNC_IN_CHALLENGE 10
|
||||||
#define TRAINER_HILL_FUNC_POST_BATTLE_TEXT 11
|
#define TRAINER_HILL_FUNC_POST_BATTLE_TEXT 11
|
||||||
#define TRAINER_HILL_FUNC_SET_ALL_TRAINER_FLAGS 12
|
#define TRAINER_HILL_FUNC_SET_ALL_TRAINER_FLAGS 12
|
||||||
|
@ -16,11 +16,7 @@ enum SpinnerRunnerFollowPatterns
|
|||||||
RUNFOLLOW_SOUTH_EAST_WEST
|
RUNFOLLOW_SOUTH_EAST_WEST
|
||||||
};
|
};
|
||||||
|
|
||||||
struct UnkStruct_085094AC
|
#define FIGURE_8_LENGTH 72
|
||||||
{
|
|
||||||
const union AnimCmd *const *anims;
|
|
||||||
u8 animPos[4];
|
|
||||||
};
|
|
||||||
|
|
||||||
#define GROUND_EFFECT_FLAG_TALL_GRASS_ON_SPAWN (1 << 0)
|
#define GROUND_EFFECT_FLAG_TALL_GRASS_ON_SPAWN (1 << 0)
|
||||||
#define GROUND_EFFECT_FLAG_TALL_GRASS_ON_MOVE (1 << 1)
|
#define GROUND_EFFECT_FLAG_TALL_GRASS_ON_MOVE (1 << 1)
|
||||||
@ -43,6 +39,12 @@ struct UnkStruct_085094AC
|
|||||||
#define GROUND_EFFECT_FLAG_HOT_SPRINGS (1 << 18)
|
#define GROUND_EFFECT_FLAG_HOT_SPRINGS (1 << 18)
|
||||||
#define GROUND_EFFECT_FLAG_SEAWEED (1 << 19)
|
#define GROUND_EFFECT_FLAG_SEAWEED (1 << 19)
|
||||||
|
|
||||||
|
struct UnkStruct_085094AC
|
||||||
|
{
|
||||||
|
const union AnimCmd *const *anims;
|
||||||
|
u8 animPos[4];
|
||||||
|
};
|
||||||
|
|
||||||
struct PairedPalettes
|
struct PairedPalettes
|
||||||
{
|
{
|
||||||
u16 tag;
|
u16 tag;
|
||||||
@ -174,8 +176,6 @@ u8 sub_809785C(struct Sprite *);
|
|||||||
u8 sub_80978E4(struct Sprite *);
|
u8 sub_80978E4(struct Sprite *);
|
||||||
void SetAndStartSpriteAnim(struct Sprite *, u8, u8);
|
void SetAndStartSpriteAnim(struct Sprite *, u8, u8);
|
||||||
bool8 SpriteAnimEnded(struct Sprite *);
|
bool8 SpriteAnimEnded(struct Sprite *);
|
||||||
void sub_8097750(struct Sprite *);
|
|
||||||
bool8 sub_8097758(struct Sprite *);
|
|
||||||
void CreateLevitateMovementTask(struct ObjectEvent *);
|
void CreateLevitateMovementTask(struct ObjectEvent *);
|
||||||
void DestroyExtraMovementTask(u8);
|
void DestroyExtraMovementTask(u8);
|
||||||
void UnfreezeObjectEvents(void);
|
void UnfreezeObjectEvents(void);
|
||||||
@ -191,8 +191,8 @@ u8 GetLedgeJumpDirection(s16, s16, u8);
|
|||||||
void CameraObjectSetFollowedObjectId(u8 objectId);
|
void CameraObjectSetFollowedObjectId(u8 objectId);
|
||||||
u16 GetObjectPaletteTag(u8 palSlot);
|
u16 GetObjectPaletteTag(u8 palSlot);
|
||||||
void UpdateObjectEventSpriteVisibility(struct Sprite *sprite, bool8 invisible);
|
void UpdateObjectEventSpriteVisibility(struct Sprite *sprite, bool8 invisible);
|
||||||
s16 sub_809773C(s16 a1);
|
s16 GetFigure8XOffset(s16 idx);
|
||||||
s16 sub_8097728(s16 a1);
|
s16 GetFigure8YOffset(s16 idx);
|
||||||
void CameraObjectReset2(void);
|
void CameraObjectReset2(void);
|
||||||
u8 ObjectEventGetBerryTreeId(u8 objectEventId);
|
u8 ObjectEventGetBerryTreeId(u8 objectEventId);
|
||||||
void sub_8092EF0(u8 mapId, u8 mapNumber, u8 mapGroup);
|
void sub_8092EF0(u8 mapId, u8 mapNumber, u8 mapGroup);
|
||||||
|
@ -39,8 +39,8 @@ void StartEscalatorWarp(u8 metatileBehavior, u8 priority);
|
|||||||
void StartLavaridgeGymB1FWarp(u8 priority);
|
void StartLavaridgeGymB1FWarp(u8 priority);
|
||||||
void StartLavaridgeGym1FWarp(u8 priority);
|
void StartLavaridgeGym1FWarp(u8 priority);
|
||||||
|
|
||||||
void SpriteCB_PopOutOfAsh(struct Sprite*);
|
void SpriteCB_AshPuff(struct Sprite*);
|
||||||
void SpriteCB_LavaridgeGymWarp(struct Sprite*);
|
void SpriteCB_AshLaunch(struct Sprite*);
|
||||||
|
|
||||||
void MultiplyPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b);
|
void MultiplyPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b);
|
||||||
void FreeResourcesAndDestroySprite(struct Sprite *sprite, u8 spriteId);
|
void FreeResourcesAndDestroySprite(struct Sprite *sprite, u8 spriteId);
|
||||||
|
@ -8,20 +8,22 @@
|
|||||||
// Exported ROM declarations
|
// Exported ROM declarations
|
||||||
u8 CreateWarpArrowSprite(void);
|
u8 CreateWarpArrowSprite(void);
|
||||||
u8 sub_8155800(u8 oldSpriteId);
|
u8 sub_8155800(u8 oldSpriteId);
|
||||||
void sub_81555AC(u8, u8);
|
void SetSurfBobState(u8 spriteId, u8 value);
|
||||||
|
void SetSurfBobWhileFlyingOutState(u8 spriteId, u8 value);
|
||||||
|
void SetSurfBobWhileFishingState(u8 spriteId, u8 value, s16 data1);
|
||||||
bool8 sub_8155DA0(struct ObjectEvent *);
|
bool8 sub_8155DA0(struct ObjectEvent *);
|
||||||
void sub_8155D78(struct ObjectEvent *);
|
void sub_8155D78(struct ObjectEvent *);
|
||||||
void StartAshFieldEffect(s16, s16, u16, s16);
|
void StartAshFieldEffect(s16, s16, u16, s16);
|
||||||
void SetUpReflection(struct ObjectEvent*, struct Sprite*, u8);
|
void SetUpReflection(struct ObjectEvent*, struct Sprite*, u8);
|
||||||
u32 StartFieldEffectForObjectEvent(u8, struct ObjectEvent*);
|
u32 StartFieldEffectForObjectEvent(u8, struct ObjectEvent*);
|
||||||
u8 FindTallGrassFieldEffectSpriteId(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y);
|
u8 FindTallGrassFieldEffectSpriteId(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y);
|
||||||
void sub_8155F80(struct Sprite*);
|
void UpdateRayquazaSpotlightEffect(struct Sprite*);
|
||||||
void UpdateShadowFieldEffect(struct Sprite*);
|
void UpdateShadowFieldEffect(struct Sprite*);
|
||||||
void UpdateTallGrassFieldEffect(struct Sprite*);
|
void UpdateTallGrassFieldEffect(struct Sprite*);
|
||||||
void WaitFieldEffectSpriteAnim(struct Sprite*);
|
void WaitFieldEffectSpriteAnim(struct Sprite*);
|
||||||
void UpdateAshFieldEffect(struct Sprite*);
|
void UpdateAshFieldEffect(struct Sprite*);
|
||||||
void UpdateSurfBlobFieldEffect(struct Sprite*);
|
void UpdateSurfBlobFieldEffect(struct Sprite*);
|
||||||
void sub_8156194(struct Sprite*);
|
void UpdateJumpImpactEffect(struct Sprite*);
|
||||||
void UpdateFootprintsTireTracksFieldEffect(struct Sprite*);
|
void UpdateFootprintsTireTracksFieldEffect(struct Sprite*);
|
||||||
void UpdateSplashFieldEffect(struct Sprite*);
|
void UpdateSplashFieldEffect(struct Sprite*);
|
||||||
void UpdateLongGrassFieldEffect(struct Sprite*);
|
void UpdateLongGrassFieldEffect(struct Sprite*);
|
||||||
@ -33,7 +35,5 @@ void UpdateBubblesFieldEffect(struct Sprite*);
|
|||||||
void UpdateSparkleFieldEffect(struct Sprite*);
|
void UpdateSparkleFieldEffect(struct Sprite*);
|
||||||
void SetSpriteInvisible(u8 spriteId);
|
void SetSpriteInvisible(u8 spriteId);
|
||||||
void ShowWarpArrowSprite(u8 spriteId, u8 direction, s16 x, s16 y);
|
void ShowWarpArrowSprite(u8 spriteId, u8 direction, s16 x, s16 y);
|
||||||
void sub_8155604(u8 spriteId, u8 value, s16 data1);
|
|
||||||
void sub_81555D8(u8 spriteId, u8 value);
|
|
||||||
|
|
||||||
#endif //GUARD_FIELD_EFFECT_HELPERS_H
|
#endif //GUARD_FIELD_EFFECT_HELPERS_H
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef GUARD_FIELD_PLAYER_AVATAR_H
|
#ifndef GUARD_FIELD_PLAYER_AVATAR_H
|
||||||
#define GUARD_FIELD_PLAYER_AVATAR_H
|
#define GUARD_FIELD_PLAYER_AVATAR_H
|
||||||
|
|
||||||
void player_step(u8 a, u16 b, u16 c);
|
void PlayerStep(u8 direction, u16 newKeys, u16 heldKeys);
|
||||||
void ClearPlayerAvatarInfo(void);
|
void ClearPlayerAvatarInfo(void);
|
||||||
void SetPlayerAvatarExtraStateTransition(u8, u8);
|
void SetPlayerAvatarExtraStateTransition(u8, u8);
|
||||||
u8 GetPlayerAvatarGenderByGraphicsId(u8);
|
u8 GetPlayerAvatarGenderByGraphicsId(u8);
|
||||||
@ -49,7 +49,7 @@ bool8 IsPlayerFacingSurfableFishableWater(void);
|
|||||||
bool8 IsPlayerSurfingNorth(void);
|
bool8 IsPlayerSurfingNorth(void);
|
||||||
void SetPlayerAvatarWatering(u8 direction);
|
void SetPlayerAvatarWatering(u8 direction);
|
||||||
u8 GetPlayerAvatarFlags(void);
|
u8 GetPlayerAvatarFlags(void);
|
||||||
void sub_808B578(void);
|
void UpdatePlayerAvatarTransitionState(void);
|
||||||
u8 GetFRLGAvatarGraphicsIdByGender(u8);
|
u8 GetFRLGAvatarGraphicsIdByGender(u8);
|
||||||
u8 GetRSAvatarGraphicsIdByGender(u8);
|
u8 GetRSAvatarGraphicsIdByGender(u8);
|
||||||
void PlayerWheelieInPlace(u8 direction);
|
void PlayerWheelieInPlace(u8 direction);
|
||||||
|
@ -30,7 +30,7 @@ struct MapConnection *sub_8088950(u8 direction, int x, int y);
|
|||||||
bool8 sub_80889A8(u8 direction, int x, int y, struct MapConnection *connection);
|
bool8 sub_80889A8(u8 direction, int x, int y, struct MapConnection *connection);
|
||||||
bool8 sub_8088A0C(int x, int src_width, int dest_width, int offset);
|
bool8 sub_8088A0C(int x, int src_width, int dest_width, int offset);
|
||||||
void save_serialize_map(void);
|
void save_serialize_map(void);
|
||||||
void sub_8088B3C(u16 x, u16 y);
|
void SetCameraFocusCoords(u16 x, u16 y);
|
||||||
void InitMap(void);
|
void InitMap(void);
|
||||||
void InitMapFromSavedGame(void);
|
void InitMapFromSavedGame(void);
|
||||||
void InitTrainerHillMap(void);
|
void InitTrainerHillMap(void);
|
||||||
@ -41,13 +41,9 @@ void LoadSecondaryTilesetPalette(struct MapLayout const *mapLayout);
|
|||||||
void CopySecondaryTilesetToVramUsingHeap(struct MapLayout const *mapLayout);
|
void CopySecondaryTilesetToVramUsingHeap(struct MapLayout const *mapLayout);
|
||||||
void CopyPrimaryTilesetToVram(const struct MapLayout *);
|
void CopyPrimaryTilesetToVram(const struct MapLayout *);
|
||||||
void CopySecondaryTilesetToVram(const struct MapLayout *);
|
void CopySecondaryTilesetToVram(const struct MapLayout *);
|
||||||
struct MapHeader const *const mapconnection_get_mapheader(struct MapConnection *connection);
|
struct MapHeader const *const GetMapHeaderFromConnection(struct MapConnection *connection);
|
||||||
struct MapConnection *GetConnectionAtCoords(s16 x, s16 y);
|
struct MapConnection *GetConnectionAtCoords(s16 x, s16 y);
|
||||||
|
|
||||||
void SpriteCB_PokeballGlow(struct Sprite *);
|
|
||||||
void SpriteCB_PokecenterMonitor(struct Sprite *);
|
|
||||||
void SpriteCB_HallOfFameMonitor(struct Sprite *);
|
|
||||||
|
|
||||||
// field_region_map.c
|
// field_region_map.c
|
||||||
void FieldInitRegionMap(MainCallback callback);
|
void FieldInitRegionMap(MainCallback callback);
|
||||||
void sub_8088B94(int x, int y, int a2);
|
void sub_8088B94(int x, int y, int a2);
|
||||||
|
@ -75,7 +75,7 @@ void FillHillTrainerParty(void);
|
|||||||
void FillHillTrainersParties(void);
|
void FillHillTrainersParties(void);
|
||||||
u8 GetTrainerEncounterMusicIdInTrainerHill(u16 trainerId);
|
u8 GetTrainerEncounterMusicIdInTrainerHill(u16 trainerId);
|
||||||
u8 GetNumFloorsInTrainerHillChallenge(void);
|
u8 GetNumFloorsInTrainerHillChallenge(void);
|
||||||
void sub_81D64C0(void);
|
void TryLoadTrainerHillEReaderPalette(void);
|
||||||
bool32 sub_81D6534(void);
|
bool32 OnTrainerHillEReaderChallengeFloor(void);
|
||||||
|
|
||||||
#endif // GUARD_TRAINER_HILL_H
|
#endif // GUARD_TRAINER_HILL_H
|
||||||
|
@ -30,7 +30,7 @@ void AlertTVThatPlayerPlayedSlotMachine(u16 nCoinsSpent);
|
|||||||
void AlertTVThatPlayerPlayedRoulette(u16 nCoinsSpent);
|
void AlertTVThatPlayerPlayedRoulette(u16 nCoinsSpent);
|
||||||
void AlertTVOfNewCoinTotal(u16 nCoinsPaidOut);
|
void AlertTVOfNewCoinTotal(u16 nCoinsPaidOut);
|
||||||
void TryPutSecretBaseSecretsOnAir(void);
|
void TryPutSecretBaseSecretsOnAir(void);
|
||||||
void sub_80EDB44(void);
|
void TryPutTodaysRivalTrainerOnAir(void);
|
||||||
void sub_80EDC60(const u16 *words);
|
void sub_80EDC60(const u16 *words);
|
||||||
void sub_80EDA80(void);
|
void sub_80EDA80(void);
|
||||||
void ReceivePokeNewsData(void *src, u32 size, u8 masterIdx);
|
void ReceivePokeNewsData(void *src, u32 size, u8 masterIdx);
|
||||||
|
@ -585,13 +585,13 @@ $(FLDEFFGFXDIR)/ash.4bpp: %.4bpp: %.png
|
|||||||
$(FLDEFFGFXDIR)/sparkle.4bpp: %.4bpp: %.png
|
$(FLDEFFGFXDIR)/sparkle.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -mwidth 2 -mheight 2
|
$(GFX) $< $@ -mwidth 2 -mheight 2
|
||||||
|
|
||||||
$(FLDEFFGFXDIR)/bike_hop_big_splash.4bpp: %.4bpp: %.png
|
$(FLDEFFGFXDIR)/jump_big_splash.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -mwidth 2 -mheight 2
|
$(GFX) $< $@ -mwidth 2 -mheight 2
|
||||||
|
|
||||||
$(FLDEFFGFXDIR)/bike_hop_small_splash.4bpp: %.4bpp: %.png
|
$(FLDEFFGFXDIR)/jump_small_splash.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -mwidth 2 -mheight 1
|
$(GFX) $< $@ -mwidth 2 -mheight 1
|
||||||
|
|
||||||
$(FLDEFFGFXDIR)/bike_hop_tall_grass.4bpp: %.4bpp: %.png
|
$(FLDEFFGFXDIR)/jump_tall_grass.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -mwidth 2 -mheight 1
|
$(GFX) $< $@ -mwidth 2 -mheight 1
|
||||||
|
|
||||||
$(FLDEFFGFXDIR)/bike_tire_tracks.4bpp: %.4bpp: %.png
|
$(FLDEFFGFXDIR)/bike_tire_tracks.4bpp: %.4bpp: %.png
|
||||||
@ -606,7 +606,7 @@ $(FLDEFFGFXDIR)/deep_sand_footprints.4bpp: %.4bpp: %.png
|
|||||||
$(FLDEFFGFXDIR)/ground_impact_dust.4bpp: %.4bpp: %.png
|
$(FLDEFFGFXDIR)/ground_impact_dust.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -mwidth 2 -mheight 1
|
$(GFX) $< $@ -mwidth 2 -mheight 1
|
||||||
|
|
||||||
$(FLDEFFGFXDIR)/jump_out_of_ash.4bpp: %.4bpp: %.png
|
$(FLDEFFGFXDIR)/ash_puff.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -mwidth 2 -mheight 2
|
$(GFX) $< $@ -mwidth 2 -mheight 2
|
||||||
|
|
||||||
$(FLDEFFGFXDIR)/long_grass.4bpp: %.4bpp: %.png
|
$(FLDEFFGFXDIR)/long_grass.4bpp: %.4bpp: %.png
|
||||||
@ -642,23 +642,23 @@ $(FLDEFFGFXDIR)/unknown_16.4bpp: %.4bpp: %.png
|
|||||||
$(FLDEFFGFXDIR)/unknown_17.4bpp: %.4bpp: %.png
|
$(FLDEFFGFXDIR)/unknown_17.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -mwidth 2 -mheight 2
|
$(GFX) $< $@ -mwidth 2 -mheight 2
|
||||||
|
|
||||||
$(FLDEFFGFXDIR)/unused_grass.4bpp: %.4bpp: %.png
|
$(FLDEFFGFXDIR)/unused_grass_2.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -mwidth 2 -mheight 2
|
$(GFX) $< $@ -mwidth 2 -mheight 2
|
||||||
|
|
||||||
$(FLDEFFGFXDIR)/unknown_19.4bpp: %.4bpp: %.png
|
$(FLDEFFGFXDIR)/unknown_19.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -mwidth 2 -mheight 2
|
$(GFX) $< $@ -mwidth 2 -mheight 2
|
||||||
|
|
||||||
$(FLDEFFGFXDIR)/unknown_20.4bpp: %.4bpp: %.png
|
$(FLDEFFGFXDIR)/water_surfacing.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -mwidth 2 -mheight 2
|
$(GFX) $< $@ -mwidth 2 -mheight 2
|
||||||
|
|
||||||
$(FLDEFFGFXDIR)/sand_pile.4bpp: %.4bpp: %.png
|
$(FLDEFFGFXDIR)/sand_pile.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -mwidth 2 -mheight 1
|
$(GFX) $< $@ -mwidth 2 -mheight 1
|
||||||
|
|
||||||
$(FLDEFFGFXDIR)/lavaridge_gym_warp.4bpp: %.4bpp: %.png
|
$(FLDEFFGFXDIR)/ash_launch.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -mwidth 2 -mheight 2
|
$(GFX) $< $@ -mwidth 2 -mheight 2
|
||||||
|
|
||||||
$(FLDEFFGFXDIR)/small_sparkle.4bpp: %.4bpp: %.png
|
$(FLDEFFGFXDIR)/small_sparkle.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -mwidth 2 -mheight 2
|
$(GFX) $< $@ -mwidth 2 -mheight 2
|
||||||
|
|
||||||
$(FLDEFFGFXDIR)/unused_grass_2.4bpp: %.4bpp: %.png
|
$(FLDEFFGFXDIR)/unused_grass_3.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -mwidth 2 -mheight 2
|
$(GFX) $< $@ -mwidth 2 -mheight 2
|
||||||
|
@ -749,7 +749,7 @@ static const union AffineAnimCmd *const sSpriteAffineAnimTable_Pokeball[] =
|
|||||||
static const struct SpriteTemplate sSpriteTemplate_Pokeball =
|
static const struct SpriteTemplate sSpriteTemplate_Pokeball =
|
||||||
{
|
{
|
||||||
.tileTag = 0xFFFF,
|
.tileTag = 0xFFFF,
|
||||||
.paletteTag = 4105,
|
.paletteTag = FLDEFF_PAL_TAG_9,
|
||||||
.oam = &gObjectEventBaseOam_32x32,
|
.oam = &gObjectEventBaseOam_32x32,
|
||||||
.anims = sSpriteAnimTable_Pokeball,
|
.anims = sSpriteAnimTable_Pokeball,
|
||||||
.images = sSpriteImage_Pokeball,
|
.images = sSpriteImage_Pokeball,
|
||||||
@ -798,7 +798,7 @@ static const union AnimCmd *const sSpriteAnimTable_UnusedBrendanLass[] =
|
|||||||
static const struct SpriteTemplate sSpriteTemplate_UnusedBrendan =
|
static const struct SpriteTemplate sSpriteTemplate_UnusedBrendan =
|
||||||
{
|
{
|
||||||
.tileTag = 0xFFFF,
|
.tileTag = 0xFFFF,
|
||||||
.paletteTag = 4106,
|
.paletteTag = FLDEFF_PAL_TAG_10,
|
||||||
.oam = &sOam_UnusedBrendanLass,
|
.oam = &sOam_UnusedBrendanLass,
|
||||||
.anims = sSpriteAnimTable_UnusedBrendanLass,
|
.anims = sSpriteAnimTable_UnusedBrendanLass,
|
||||||
.images = sImageTable_UnusedBrendan,
|
.images = sImageTable_UnusedBrendan,
|
||||||
@ -809,7 +809,7 @@ static const struct SpriteTemplate sSpriteTemplate_UnusedBrendan =
|
|||||||
static const struct SpriteTemplate sSpriteTemplate_UnusedLass =
|
static const struct SpriteTemplate sSpriteTemplate_UnusedLass =
|
||||||
{
|
{
|
||||||
.tileTag = 0xFFFF,
|
.tileTag = 0xFFFF,
|
||||||
.paletteTag = 4106,
|
.paletteTag = FLDEFF_PAL_TAG_10,
|
||||||
.oam = &sOam_UnusedBrendanLass,
|
.oam = &sOam_UnusedBrendanLass,
|
||||||
.anims = sSpriteAnimTable_UnusedBrendanLass,
|
.anims = sSpriteAnimTable_UnusedBrendanLass,
|
||||||
.images = sImageTable_UnusedLass,
|
.images = sImageTable_UnusedLass,
|
||||||
@ -821,7 +821,7 @@ static const u16 gFieldEffectObjectPalette10[] = INCBIN_U16("graphics/field_effe
|
|||||||
|
|
||||||
const struct SpritePalette gFieldEffectObjectPaletteInfo10 =
|
const struct SpritePalette gFieldEffectObjectPaletteInfo10 =
|
||||||
{
|
{
|
||||||
gFieldEffectObjectPalette10, 0x1009
|
gFieldEffectObjectPalette10, FLDEFF_PAL_TAG_9
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sMugshotPal_Sidney[] = INCBIN_U16("graphics/battle_transitions/sidney_bg.gbapal");
|
static const u16 sMugshotPal_Sidney[] = INCBIN_U16("graphics/battle_transitions/sidney_bg.gbapal");
|
||||||
@ -850,7 +850,7 @@ static const u16 *const sPlayerMugshotsPals[GENDER_COUNT] =
|
|||||||
static const u16 sUnusedTrainerPalette[] = INCBIN_U16("graphics/battle_transitions/unused_trainer.gbapal");
|
static const u16 sUnusedTrainerPalette[] = INCBIN_U16("graphics/battle_transitions/unused_trainer.gbapal");
|
||||||
static const struct SpritePalette sSpritePalette_UnusedTrainer =
|
static const struct SpritePalette sSpritePalette_UnusedTrainer =
|
||||||
{
|
{
|
||||||
sUnusedTrainerPalette, 0x100A
|
sUnusedTrainerPalette, FLDEFF_PAL_TAG_10
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sBigPokeball_Tilemap[] = INCBIN_U16("graphics/battle_transitions/big_pokeball_map.bin");
|
static const u16 sBigPokeball_Tilemap[] = INCBIN_U16("graphics/battle_transitions/big_pokeball_map.bin");
|
||||||
|
@ -16,9 +16,9 @@ const struct SpriteTemplate gFieldEffectObjectTemplate_JumpSmallSplash;
|
|||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_LongGrass;
|
const struct SpriteTemplate gFieldEffectObjectTemplate_LongGrass;
|
||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_JumpLongGrass;
|
const struct SpriteTemplate gFieldEffectObjectTemplate_JumpLongGrass;
|
||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_Unknown17;
|
const struct SpriteTemplate gFieldEffectObjectTemplate_Unknown17;
|
||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_UnusedGrass;
|
const struct SpriteTemplate gFieldEffectObjectTemplate_UnusedGrass2;
|
||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_Unknown19;
|
const struct SpriteTemplate gFieldEffectObjectTemplate_Unknown19;
|
||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_Unknown20;
|
const struct SpriteTemplate gFieldEffectObjectTemplate_WaterSurfacing;
|
||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_ReflectionDistortion;
|
const struct SpriteTemplate gFieldEffectObjectTemplate_ReflectionDistortion;
|
||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_Sparkle;
|
const struct SpriteTemplate gFieldEffectObjectTemplate_Sparkle;
|
||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_DeepSandFootprints;
|
const struct SpriteTemplate gFieldEffectObjectTemplate_DeepSandFootprints;
|
||||||
@ -30,8 +30,8 @@ const struct SpriteTemplate gFieldEffectObjectTemplate_SandDisguisePlaceholder;
|
|||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_SandPile;
|
const struct SpriteTemplate gFieldEffectObjectTemplate_SandPile;
|
||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_ShortGrass;
|
const struct SpriteTemplate gFieldEffectObjectTemplate_ShortGrass;
|
||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_HotSpringsWater;
|
const struct SpriteTemplate gFieldEffectObjectTemplate_HotSpringsWater;
|
||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_JumpOutOfAsh;
|
const struct SpriteTemplate gFieldEffectObjectTemplate_AshPuff;
|
||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_LavaridgeGymWarp;
|
const struct SpriteTemplate gFieldEffectObjectTemplate_AshLaunch;
|
||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_Bubbles;
|
const struct SpriteTemplate gFieldEffectObjectTemplate_Bubbles;
|
||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_SmallSparkle;
|
const struct SpriteTemplate gFieldEffectObjectTemplate_SmallSparkle;
|
||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_Rayquaza;
|
const struct SpriteTemplate gFieldEffectObjectTemplate_Rayquaza;
|
||||||
@ -55,9 +55,9 @@ const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[] = {
|
|||||||
[FLDEFFOBJ_LONG_GRASS] = &gFieldEffectObjectTemplate_LongGrass,
|
[FLDEFFOBJ_LONG_GRASS] = &gFieldEffectObjectTemplate_LongGrass,
|
||||||
[FLDEFFOBJ_JUMP_LONG_GRASS] = &gFieldEffectObjectTemplate_JumpLongGrass,
|
[FLDEFFOBJ_JUMP_LONG_GRASS] = &gFieldEffectObjectTemplate_JumpLongGrass,
|
||||||
[FLDEFFOBJ_17] = &gFieldEffectObjectTemplate_Unknown17,
|
[FLDEFFOBJ_17] = &gFieldEffectObjectTemplate_Unknown17,
|
||||||
[FLDEFFOBJ_UNUSED_GRASS] = &gFieldEffectObjectTemplate_UnusedGrass,
|
[FLDEFFOBJ_UNUSED_GRASS_2] = &gFieldEffectObjectTemplate_UnusedGrass2,
|
||||||
[FLDEFFOBJ_19] = &gFieldEffectObjectTemplate_Unknown19,
|
[FLDEFFOBJ_19] = &gFieldEffectObjectTemplate_Unknown19,
|
||||||
[FLDEFFOBJ_20] = &gFieldEffectObjectTemplate_Unknown20,
|
[FLDEFFOBJ_WATER_SURFACING] = &gFieldEffectObjectTemplate_WaterSurfacing,
|
||||||
[FLDEFFOBJ_REFLECTION_DISTORTION] = &gFieldEffectObjectTemplate_ReflectionDistortion,
|
[FLDEFFOBJ_REFLECTION_DISTORTION] = &gFieldEffectObjectTemplate_ReflectionDistortion,
|
||||||
[FLDEFFOBJ_SPARKLE] = &gFieldEffectObjectTemplate_Sparkle,
|
[FLDEFFOBJ_SPARKLE] = &gFieldEffectObjectTemplate_Sparkle,
|
||||||
[FLDEFFOBJ_DEEP_SAND_FOOTPRINTS] = &gFieldEffectObjectTemplate_DeepSandFootprints,
|
[FLDEFFOBJ_DEEP_SAND_FOOTPRINTS] = &gFieldEffectObjectTemplate_DeepSandFootprints,
|
||||||
@ -69,8 +69,8 @@ const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[] = {
|
|||||||
[FLDEFFOBJ_SAND_PILE] = &gFieldEffectObjectTemplate_SandPile,
|
[FLDEFFOBJ_SAND_PILE] = &gFieldEffectObjectTemplate_SandPile,
|
||||||
[FLDEFFOBJ_SHORT_GRASS] = &gFieldEffectObjectTemplate_ShortGrass,
|
[FLDEFFOBJ_SHORT_GRASS] = &gFieldEffectObjectTemplate_ShortGrass,
|
||||||
[FLDEFFOBJ_HOT_SPRINGS_WATER] = &gFieldEffectObjectTemplate_HotSpringsWater,
|
[FLDEFFOBJ_HOT_SPRINGS_WATER] = &gFieldEffectObjectTemplate_HotSpringsWater,
|
||||||
[FLDEFFOBJ_JUMP_OUT_OF_ASH] = &gFieldEffectObjectTemplate_JumpOutOfAsh,
|
[FLDEFFOBJ_ASH_PUFF] = &gFieldEffectObjectTemplate_AshPuff,
|
||||||
[FLDEFFOBJ_LAVARIDGE_GYM_WARP] = &gFieldEffectObjectTemplate_LavaridgeGymWarp,
|
[FLDEFFOBJ_ASH_LAUNCH] = &gFieldEffectObjectTemplate_AshLaunch,
|
||||||
[FLDEFFOBJ_BUBBLES] = &gFieldEffectObjectTemplate_Bubbles,
|
[FLDEFFOBJ_BUBBLES] = &gFieldEffectObjectTemplate_Bubbles,
|
||||||
[FLDEFFOBJ_SMALL_SPARKLE] = &gFieldEffectObjectTemplate_SmallSparkle,
|
[FLDEFFOBJ_SMALL_SPARKLE] = &gFieldEffectObjectTemplate_SmallSparkle,
|
||||||
[FLDEFFOBJ_RAYQUAZA] = &gFieldEffectObjectTemplate_Rayquaza,
|
[FLDEFFOBJ_RAYQUAZA] = &gFieldEffectObjectTemplate_Rayquaza,
|
||||||
|
@ -303,11 +303,11 @@ const u32 gFieldEffectObjectPic_Arrow[] = INCBIN_U32("graphics/field_effects/pic
|
|||||||
const u16 gFieldEffectObjectPalette0[] = INCBIN_U16("graphics/field_effects/palettes/00.gbapal");
|
const u16 gFieldEffectObjectPalette0[] = INCBIN_U16("graphics/field_effects/palettes/00.gbapal");
|
||||||
const u16 gFieldEffectObjectPalette1[] = INCBIN_U16("graphics/field_effects/palettes/01.gbapal");
|
const u16 gFieldEffectObjectPalette1[] = INCBIN_U16("graphics/field_effects/palettes/01.gbapal");
|
||||||
const u32 gFieldEffectObjectPic_GroundImpactDust[] = INCBIN_U32("graphics/field_effects/pics/ground_impact_dust.4bpp");
|
const u32 gFieldEffectObjectPic_GroundImpactDust[] = INCBIN_U32("graphics/field_effects/pics/ground_impact_dust.4bpp");
|
||||||
const u32 gFieldEffectObjectPic_JumpTallGrass[] = INCBIN_U32("graphics/field_effects/pics/bike_hop_tall_grass.4bpp");
|
const u32 gFieldEffectObjectPic_JumpTallGrass[] = INCBIN_U32("graphics/field_effects/pics/jump_tall_grass.4bpp");
|
||||||
const u32 gUnusedGrass[] = INCBIN_U32("graphics/field_effects/pics/unused_grass_2.4bpp");
|
const u32 gUnusedGrass3[] = INCBIN_U32("graphics/field_effects/pics/unused_grass_3.4bpp");
|
||||||
const u32 gFieldEffectObjectPic_JumpLongGrass[] = INCBIN_U32("graphics/field_effects/pics/unknown_16.4bpp");
|
const u32 gFieldEffectObjectPic_JumpLongGrass[] = INCBIN_U32("graphics/field_effects/pics/unknown_16.4bpp");
|
||||||
const u32 gFieldEffectObjectPic_Unknown17[] = INCBIN_U32("graphics/field_effects/pics/unknown_17.4bpp");
|
const u32 gFieldEffectObjectPic_Unknown17[] = INCBIN_U32("graphics/field_effects/pics/unknown_17.4bpp");
|
||||||
const u32 gFieldEffectObjectPic_UnusedGrass[] = INCBIN_U32("graphics/field_effects/pics/unused_grass.4bpp");
|
const u32 gFieldEffectObjectPic_UnusedGrass2[] = INCBIN_U32("graphics/field_effects/pics/unused_grass_2.4bpp");
|
||||||
const u32 gFieldEffectObjectPic_LongGrass[] = INCBIN_U32("graphics/field_effects/pics/long_grass.4bpp");
|
const u32 gFieldEffectObjectPic_LongGrass[] = INCBIN_U32("graphics/field_effects/pics/long_grass.4bpp");
|
||||||
const u32 gFieldEffectObjectPic_TallGrass[] = INCBIN_U32("graphics/field_effects/pics/tall_grass.4bpp");
|
const u32 gFieldEffectObjectPic_TallGrass[] = INCBIN_U32("graphics/field_effects/pics/tall_grass.4bpp");
|
||||||
const u32 gFieldEffectObjectPic_ShortGrass[] = INCBIN_U32("graphics/field_effects/pics/short_grass.4bpp");
|
const u32 gFieldEffectObjectPic_ShortGrass[] = INCBIN_U32("graphics/field_effects/pics/short_grass.4bpp");
|
||||||
@ -316,17 +316,17 @@ const u32 gFieldEffectObjectPic_DeepSandFootprints[] = INCBIN_U32("graphics/fiel
|
|||||||
const u32 gFieldEffectObjectPic_BikeTireTracks[] = INCBIN_U32("graphics/field_effects/pics/bike_tire_tracks.4bpp");
|
const u32 gFieldEffectObjectPic_BikeTireTracks[] = INCBIN_U32("graphics/field_effects/pics/bike_tire_tracks.4bpp");
|
||||||
const u32 gFieldEffectObjectPic_Unknown19[] = INCBIN_U32("graphics/field_effects/pics/unknown_19.4bpp");
|
const u32 gFieldEffectObjectPic_Unknown19[] = INCBIN_U32("graphics/field_effects/pics/unknown_19.4bpp");
|
||||||
const u32 gFieldEffectObjectPic_SandPile[] = INCBIN_U32("graphics/field_effects/pics/sand_pile.4bpp");
|
const u32 gFieldEffectObjectPic_SandPile[] = INCBIN_U32("graphics/field_effects/pics/sand_pile.4bpp");
|
||||||
const u32 gFieldEffectObjectPic_JumpBigSplash[] = INCBIN_U32("graphics/field_effects/pics/bike_hop_big_splash.4bpp");
|
const u32 gFieldEffectObjectPic_JumpBigSplash[] = INCBIN_U32("graphics/field_effects/pics/jump_big_splash.4bpp");
|
||||||
const u32 gFieldEffectObjectPic_Splash[] = INCBIN_U32("graphics/field_effects/pics/splash.4bpp");
|
const u32 gFieldEffectObjectPic_Splash[] = INCBIN_U32("graphics/field_effects/pics/splash.4bpp");
|
||||||
const u32 gFieldEffectObjectPic_JumpSmallSplash[] = INCBIN_U32("graphics/field_effects/pics/bike_hop_small_splash.4bpp");
|
const u32 gFieldEffectObjectPic_JumpSmallSplash[] = INCBIN_U32("graphics/field_effects/pics/jump_small_splash.4bpp");
|
||||||
const u32 gFieldEffectObjectPic_Unknown20[] = INCBIN_U32("graphics/field_effects/pics/unknown_20.4bpp");
|
const u32 gFieldEffectObjectPic_WaterSurfacing[] = INCBIN_U32("graphics/field_effects/pics/water_surfacing.4bpp");
|
||||||
const u32 gFieldEffectObjectPic_TreeDisguise[] = INCBIN_U32("graphics/field_effects/pics/tree_disguise.4bpp");
|
const u32 gFieldEffectObjectPic_TreeDisguise[] = INCBIN_U32("graphics/field_effects/pics/tree_disguise.4bpp");
|
||||||
const u32 gFieldEffectObjectPic_MountainDisguise[] = INCBIN_U32("graphics/field_effects/pics/mountain_disguise.4bpp");
|
const u32 gFieldEffectObjectPic_MountainDisguise[] = INCBIN_U32("graphics/field_effects/pics/mountain_disguise.4bpp");
|
||||||
const u32 gFieldEffectObjectPic_SandDisguisePlaceholder[] = INCBIN_U32("graphics/field_effects/pics/sand_disguise_placeholder.4bpp");
|
const u32 gFieldEffectObjectPic_SandDisguisePlaceholder[] = INCBIN_U32("graphics/field_effects/pics/sand_disguise_placeholder.4bpp");
|
||||||
const u32 gFieldEffectObjectPic_HotSpringsWater[] = INCBIN_U32("graphics/field_effects/pics/hot_springs_water.4bpp");
|
const u32 gFieldEffectObjectPic_HotSpringsWater[] = INCBIN_U32("graphics/field_effects/pics/hot_springs_water.4bpp");
|
||||||
const u16 gFieldEffectObjectPalette2[] = INCBIN_U16("graphics/field_effects/palettes/02.gbapal");
|
const u16 gFieldEffectObjectPalette2[] = INCBIN_U16("graphics/field_effects/palettes/02.gbapal");
|
||||||
const u32 gFieldEffectObjectPic_JumpOutOfAsh[] = INCBIN_U32("graphics/field_effects/pics/jump_out_of_ash.4bpp");
|
const u32 gFieldEffectObjectPic_AshPuff[] = INCBIN_U32("graphics/field_effects/pics/ash_puff.4bpp");
|
||||||
const u32 gFieldEffectObjectPic_LavaridgeGymWarp[] = INCBIN_U32("graphics/field_effects/pics/lavaridge_gym_warp.4bpp");
|
const u32 gFieldEffectObjectPic_AshLaunch[] = INCBIN_U32("graphics/field_effects/pics/ash_launch.4bpp");
|
||||||
const u32 gFieldEffectObjectPic_Bubbles[] = INCBIN_U32("graphics/field_effects/pics/bubbles.4bpp");
|
const u32 gFieldEffectObjectPic_Bubbles[] = INCBIN_U32("graphics/field_effects/pics/bubbles.4bpp");
|
||||||
const u32 gFieldEffectObjectPic_SmallSparkle[] = INCBIN_U32("graphics/field_effects/pics/small_sparkle.4bpp");
|
const u32 gFieldEffectObjectPic_SmallSparkle[] = INCBIN_U32("graphics/field_effects/pics/small_sparkle.4bpp");
|
||||||
const u16 gFieldEffectObjectPalette3[] = INCBIN_U16("graphics/field_effects/palettes/03.gbapal");
|
const u16 gFieldEffectObjectPalette3[] = INCBIN_U16("graphics/field_effects/palettes/03.gbapal");
|
||||||
|
@ -130,6 +130,8 @@ static void ClearObjectEventMovement(struct ObjectEvent *, struct Sprite *);
|
|||||||
static void ObjectEventSetSingleMovement(struct ObjectEvent *, struct Sprite *, u8);
|
static void ObjectEventSetSingleMovement(struct ObjectEvent *, struct Sprite *, u8);
|
||||||
static void oamt_npc_ministep_reset(struct Sprite *, u8, u8);
|
static void oamt_npc_ministep_reset(struct Sprite *, u8, u8);
|
||||||
static void UpdateObjectEventSpriteSubpriorityAndVisibility(struct Sprite *);
|
static void UpdateObjectEventSpriteSubpriorityAndVisibility(struct Sprite *);
|
||||||
|
static void InitSpriteForFigure8Anim(struct Sprite *sprite);
|
||||||
|
static bool8 AnimateSpriteInFigure8(struct Sprite *sprite);
|
||||||
|
|
||||||
const u8 gReflectionEffectPaletteMap[] = {1, 1, 6, 7, 8, 9, 6, 7, 8, 9, 11, 11, 0, 0, 0, 0};
|
const u8 gReflectionEffectPaletteMap[] = {1, 1, 6, 7, 8, 9, 6, 7, 8, 9, 11, 11, 0, 0, 0, 0};
|
||||||
|
|
||||||
@ -6864,15 +6866,15 @@ bool8 MovementAction_UnusedAcroActionRight_Step0(struct ObjectEvent *objectEvent
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8095AF0(struct ObjectEvent *objectEvent, struct Sprite *sprite)
|
void InitFigure8Anim(struct ObjectEvent *objectEvent, struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sub_8097750(sprite);
|
InitSpriteForFigure8Anim(sprite);
|
||||||
sprite->animPaused = FALSE;
|
sprite->animPaused = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_8095B0C(struct ObjectEvent *objectEvent, struct Sprite *sprite)
|
bool8 DoFigure8Anim(struct ObjectEvent *objectEvent, struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (sub_8097758(sprite))
|
if (AnimateSpriteInFigure8(sprite))
|
||||||
{
|
{
|
||||||
ShiftStillObjectEventCoords(objectEvent);
|
ShiftStillObjectEventCoords(objectEvent);
|
||||||
objectEvent->triggerGroundEffectsOnStop = TRUE;
|
objectEvent->triggerGroundEffectsOnStop = TRUE;
|
||||||
@ -6884,14 +6886,14 @@ bool8 sub_8095B0C(struct ObjectEvent *objectEvent, struct Sprite *sprite)
|
|||||||
|
|
||||||
bool8 MovementAction_Figure8_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite)
|
bool8 MovementAction_Figure8_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sub_8095AF0(objectEvent, sprite);
|
InitFigure8Anim(objectEvent, sprite);
|
||||||
sprite->data[2] = 1;
|
sprite->data[2] = 1;
|
||||||
return MovementAction_Figure8_Step1(objectEvent, sprite);
|
return MovementAction_Figure8_Step1(objectEvent, sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 MovementAction_Figure8_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite)
|
bool8 MovementAction_Figure8_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (sub_8095B0C(objectEvent, sprite))
|
if (DoFigure8Anim(objectEvent, sprite))
|
||||||
{
|
{
|
||||||
sprite->data[2] = 2;
|
sprite->data[2] = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -8094,26 +8096,26 @@ void GroundEffect_Seaweed(struct ObjectEvent *objEvent, struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void (*const sGroundEffectFuncs[])(struct ObjectEvent *objEvent, struct Sprite *sprite) = {
|
static void (*const sGroundEffectFuncs[])(struct ObjectEvent *objEvent, struct Sprite *sprite) = {
|
||||||
GroundEffect_SpawnOnTallGrass,
|
GroundEffect_SpawnOnTallGrass, // GROUND_EFFECT_FLAG_TALL_GRASS_ON_SPAWN
|
||||||
GroundEffect_StepOnTallGrass,
|
GroundEffect_StepOnTallGrass, // GROUND_EFFECT_FLAG_TALL_GRASS_ON_MOVE
|
||||||
GroundEffect_SpawnOnLongGrass,
|
GroundEffect_SpawnOnLongGrass, // GROUND_EFFECT_FLAG_LONG_GRASS_ON_SPAWN
|
||||||
GroundEffect_StepOnLongGrass,
|
GroundEffect_StepOnLongGrass, // GROUND_EFFECT_FLAG_LONG_GRASS_ON_MOVE
|
||||||
GroundEffect_WaterReflection,
|
GroundEffect_WaterReflection, // GROUND_EFFECT_FLAG_ICE_REFLECTION
|
||||||
GroundEffect_IceReflection,
|
GroundEffect_IceReflection, // GROUND_EFFECT_FLAG_REFLECTION
|
||||||
GroundEffect_FlowingWater,
|
GroundEffect_FlowingWater, // GROUND_EFFECT_FLAG_SHALLOW_FLOWING_WATER
|
||||||
GroundEffect_SandTracks,
|
GroundEffect_SandTracks, // GROUND_EFFECT_FLAG_SAND
|
||||||
GroundEffect_DeepSandTracks,
|
GroundEffect_DeepSandTracks, // GROUND_EFFECT_FLAG_DEEP_SAND
|
||||||
GroundEffect_Ripple,
|
GroundEffect_Ripple, // GROUND_EFFECT_FLAG_RIPPLES
|
||||||
GroundEffect_StepOnPuddle,
|
GroundEffect_StepOnPuddle, // GROUND_EFFECT_FLAG_PUDDLE
|
||||||
GroundEffect_SandHeap,
|
GroundEffect_SandHeap, // GROUND_EFFECT_FLAG_SAND_PILE
|
||||||
GroundEffect_JumpOnTallGrass,
|
GroundEffect_JumpOnTallGrass, // GROUND_EFFECT_FLAG_LAND_IN_TALL_GRASS
|
||||||
GroundEffect_JumpOnLongGrass,
|
GroundEffect_JumpOnLongGrass, // GROUND_EFFECT_FLAG_LAND_IN_LONG_GRASS
|
||||||
GroundEffect_JumpOnShallowWater,
|
GroundEffect_JumpOnShallowWater, // GROUND_EFFECT_FLAG_LAND_IN_SHALLOW_WATER
|
||||||
GroundEffect_JumpOnWater,
|
GroundEffect_JumpOnWater, // GROUND_EFFECT_FLAG_LAND_IN_DEEP_WATER
|
||||||
GroundEffect_JumpLandingDust,
|
GroundEffect_JumpLandingDust, // GROUND_EFFECT_FLAG_LAND_ON_NORMAL_GROUND
|
||||||
GroundEffect_ShortGrass,
|
GroundEffect_ShortGrass, // GROUND_EFFECT_FLAG_SHORT_GRASS
|
||||||
GroundEffect_HotSprings,
|
GroundEffect_HotSprings, // GROUND_EFFECT_FLAG_HOT_SPRINGS
|
||||||
GroundEffect_Seaweed
|
GroundEffect_Seaweed // GROUND_EFFECT_FLAG_SEAWEED
|
||||||
};
|
};
|
||||||
|
|
||||||
static void DoFlaggedGroundEffects(struct ObjectEvent *objEvent, struct Sprite *sprite, u32 flags)
|
static void DoFlaggedGroundEffects(struct ObjectEvent *objEvent, struct Sprite *sprite, u32 flags)
|
||||||
@ -8391,7 +8393,7 @@ bool8 sub_80976EC(struct Sprite *sprite)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const s8 gUnknown_0850E772[] = {
|
static const s8 sFigure8XOffsets[FIGURE_8_LENGTH] = {
|
||||||
1, 2, 2, 2, 2, 2, 2, 2,
|
1, 2, 2, 2, 2, 2, 2, 2,
|
||||||
2, 2, 2, 1, 2, 2, 1, 2,
|
2, 2, 2, 1, 2, 2, 1, 2,
|
||||||
2, 1, 2, 2, 1, 2, 1, 1,
|
2, 1, 2, 2, 1, 2, 1, 1,
|
||||||
@ -8403,7 +8405,7 @@ static const s8 gUnknown_0850E772[] = {
|
|||||||
0, 1, 0, 0, 0, 0, 0, 0,
|
0, 1, 0, 0, 0, 0, 0, 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const s8 gUnknown_0850E7BA[] = {
|
static const s8 sFigure8YOffsets[FIGURE_8_LENGTH] = {
|
||||||
0, 0, 1, 0, 0, 1, 0, 0,
|
0, 0, 1, 0, 0, 1, 0, 0,
|
||||||
1, 0, 1, 1, 0, 1, 1, 0,
|
1, 0, 1, 1, 0, 1, 1, 0,
|
||||||
1, 1, 0, 1, 1, 0, 1, 1,
|
1, 1, 0, 1, 1, 0, 1, 1,
|
||||||
@ -8415,57 +8417,57 @@ static const s8 gUnknown_0850E7BA[] = {
|
|||||||
-1, -1, -1, -1, -1, -1, -1, -2,
|
-1, -1, -1, -1, -1, -1, -1, -2,
|
||||||
};
|
};
|
||||||
|
|
||||||
s16 sub_8097728(s16 a1)
|
s16 GetFigure8YOffset(s16 idx)
|
||||||
{
|
{
|
||||||
return gUnknown_0850E7BA[a1];
|
return sFigure8YOffsets[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
s16 sub_809773C(s16 a1)
|
s16 GetFigure8XOffset(s16 idx)
|
||||||
{
|
{
|
||||||
return gUnknown_0850E772[a1];
|
return sFigure8XOffsets[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8097750(struct Sprite *sprite)
|
static void InitSpriteForFigure8Anim(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->data[6] = 0;
|
sprite->data[6] = 0;
|
||||||
sprite->data[7] = 0;
|
sprite->data[7] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_8097758(struct Sprite *sprite)
|
static bool8 AnimateSpriteInFigure8(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
bool8 result = FALSE;
|
bool8 finished = FALSE;
|
||||||
|
|
||||||
switch(sprite->data[7])
|
switch(sprite->data[7])
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
sprite->pos2.x += sub_809773C(sprite->data[6]);
|
sprite->pos2.x += GetFigure8XOffset(sprite->data[6]);
|
||||||
sprite->pos2.y += sub_8097728(sprite->data[6]);
|
sprite->pos2.y += GetFigure8YOffset(sprite->data[6]);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
sprite->pos2.x -= sub_809773C(0x47 - sprite->data[6]);
|
sprite->pos2.x -= GetFigure8XOffset((FIGURE_8_LENGTH - 1) - sprite->data[6]);
|
||||||
sprite->pos2.y += sub_8097728(0x47 - sprite->data[6]);
|
sprite->pos2.y += GetFigure8YOffset((FIGURE_8_LENGTH - 1) - sprite->data[6]);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
sprite->pos2.x -= sub_809773C(sprite->data[6]);
|
sprite->pos2.x -= GetFigure8XOffset(sprite->data[6]);
|
||||||
sprite->pos2.y += sub_8097728(sprite->data[6]);
|
sprite->pos2.y += GetFigure8YOffset(sprite->data[6]);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
sprite->pos2.x += sub_809773C(0x47 - sprite->data[6]);
|
sprite->pos2.x += GetFigure8XOffset((FIGURE_8_LENGTH - 1) - sprite->data[6]);
|
||||||
sprite->pos2.y += sub_8097728(0x47 - sprite->data[6]);
|
sprite->pos2.y += GetFigure8YOffset((FIGURE_8_LENGTH - 1) - sprite->data[6]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(++sprite->data[6] == 0x48)
|
if (++sprite->data[6] == FIGURE_8_LENGTH)
|
||||||
{
|
{
|
||||||
sprite->data[6] = 0;
|
sprite->data[6] = 0;
|
||||||
sprite->data[7]++;
|
sprite->data[7]++;
|
||||||
}
|
}
|
||||||
if(sprite->data[7] == 0x4)
|
if (sprite->data[7] == 4)
|
||||||
{
|
{
|
||||||
sprite->pos2.y = 0;
|
sprite->pos2.y = 0;
|
||||||
sprite->pos2.x = 0;
|
sprite->pos2.x = 0;
|
||||||
result = TRUE;
|
finished = TRUE;
|
||||||
}
|
}
|
||||||
return result;
|
return finished;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const s8 gUnknown_0850E802[] = {
|
static const s8 gUnknown_0850E802[] = {
|
||||||
|
2153
src/field_effect.c
@ -817,19 +817,19 @@ u32 FldEff_Unknown19(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 FldEff_UnusedGrass(void)
|
u32 FldEff_UnusedGrass2(void)
|
||||||
{
|
{
|
||||||
u8 spriteId;
|
u8 spriteId;
|
||||||
struct Sprite *sprite;
|
struct Sprite *sprite;
|
||||||
|
|
||||||
sub_80930E0((s16 *)&gFieldEffectArguments[0], (s16 *)&gFieldEffectArguments[1], 8, 8);
|
sub_80930E0((s16 *)&gFieldEffectArguments[0], (s16 *)&gFieldEffectArguments[1], 8, 8);
|
||||||
spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_UNUSED_GRASS], gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2]);
|
spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_UNUSED_GRASS_2], gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2]);
|
||||||
if (spriteId != MAX_SPRITES)
|
if (spriteId != MAX_SPRITES)
|
||||||
{
|
{
|
||||||
sprite = &gSprites[spriteId];
|
sprite = &gSprites[spriteId];
|
||||||
sprite->coordOffsetEnabled = TRUE;
|
sprite->coordOffsetEnabled = TRUE;
|
||||||
sprite->oam.priority = gFieldEffectArguments[3];
|
sprite->oam.priority = gFieldEffectArguments[3];
|
||||||
sprite->data[0] = FLDEFF_UNUSED_GRASS;
|
sprite->data[0] = FLDEFF_UNUSED_GRASS_2;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -851,19 +851,19 @@ u32 FldEff_Unknown21(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 FldEff_Unknown22(void)
|
u32 FldEff_WaterSurfacing(void)
|
||||||
{
|
{
|
||||||
u8 spriteId;
|
u8 spriteId;
|
||||||
struct Sprite *sprite;
|
struct Sprite *sprite;
|
||||||
|
|
||||||
sub_80930E0((s16 *)&gFieldEffectArguments[0], (s16 *)&gFieldEffectArguments[1], 8, 8);
|
sub_80930E0((s16 *)&gFieldEffectArguments[0], (s16 *)&gFieldEffectArguments[1], 8, 8);
|
||||||
spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_20], gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2]);
|
spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_WATER_SURFACING], gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2]);
|
||||||
if (spriteId != MAX_SPRITES)
|
if (spriteId != MAX_SPRITES)
|
||||||
{
|
{
|
||||||
sprite = &gSprites[spriteId];
|
sprite = &gSprites[spriteId];
|
||||||
sprite->coordOffsetEnabled = TRUE;
|
sprite->coordOffsetEnabled = TRUE;
|
||||||
sprite->oam.priority = gFieldEffectArguments[3];
|
sprite->oam.priority = gFieldEffectArguments[3];
|
||||||
sprite->data[0] = FLDEFF_UNKNOWN_22;
|
sprite->data[0] = FLDEFF_WATER_SURFACING;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -960,33 +960,34 @@ u32 FldEff_SurfBlob(void)
|
|||||||
return spriteId;
|
return spriteId;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_81555AC(u8 spriteId, u8 value)
|
// States for bobbing up and down while surfing
|
||||||
|
void SetSurfBobState(u8 spriteId, u8 value)
|
||||||
{
|
{
|
||||||
gSprites[spriteId].data[0] = (gSprites[spriteId].data[0] & ~0xF) | (value & 0xF);
|
gSprites[spriteId].data[0] = (gSprites[spriteId].data[0] & ~0xF) | (value & 0xF);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_81555D8(u8 spriteId, u8 value)
|
void SetSurfBobWhileFlyingOutState(u8 spriteId, u8 value)
|
||||||
{
|
{
|
||||||
gSprites[spriteId].data[0] = (gSprites[spriteId].data[0] & ~0xF0) | ((value & 0xF) << 4);
|
gSprites[spriteId].data[0] = (gSprites[spriteId].data[0] & ~0xF0) | ((value & 0xF) << 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8155604(u8 spriteId, u8 value, s16 data1)
|
void SetSurfBobWhileFishingState(u8 spriteId, u8 value, s16 data1)
|
||||||
{
|
{
|
||||||
gSprites[spriteId].data[0] = (gSprites[spriteId].data[0] & ~0xF00) | ((value & 0xF) << 8);
|
gSprites[spriteId].data[0] = (gSprites[spriteId].data[0] & ~0xF00) | ((value & 0xF) << 8);
|
||||||
gSprites[spriteId].data[1] = data1;
|
gSprites[spriteId].data[1] = data1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8 sub_8155638(struct Sprite *sprite)
|
static u8 GetSurfBobState(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
return sprite->data[0] & 0xF;
|
return sprite->data[0] & 0xF;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8 sub_8155640(struct Sprite *sprite)
|
static u8 GetSurfBobWhileFlyingOutState(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
return (sprite->data[0] & 0xF0) >> 4;
|
return (sprite->data[0] & 0xF0) >> 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8 sub_815564C(struct Sprite *sprite)
|
static u8 GetSurfBobWhileFishingState(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
return (sprite->data[0] & 0xF00) >> 8;
|
return (sprite->data[0] & 0xF00) >> 8;
|
||||||
}
|
}
|
||||||
@ -1018,7 +1019,7 @@ static void SynchroniseSurfAnim(struct ObjectEvent *objectEvent, struct Sprite *
|
|||||||
[DIR_NORTHEAST] = 1,
|
[DIR_NORTHEAST] = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (sub_8155640(sprite) == 0)
|
if (GetSurfBobWhileFlyingOutState(sprite) == 0)
|
||||||
StartSpriteAnimIfDifferent(sprite, surfBlobDirectionAnims[objectEvent->movementDirection]);
|
StartSpriteAnimIfDifferent(sprite, surfBlobDirectionAnims[objectEvent->movementDirection]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1049,8 +1050,8 @@ void sub_81556E8(struct ObjectEvent *objectEvent, struct Sprite *sprite)
|
|||||||
static void CreateBobbingEffect(struct ObjectEvent *objectEvent, struct Sprite *linkedSprite, struct Sprite *sprite)
|
static void CreateBobbingEffect(struct ObjectEvent *objectEvent, struct Sprite *linkedSprite, struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
u16 unk_085CDC6A[] = {3, 7};
|
u16 unk_085CDC6A[] = {3, 7};
|
||||||
u8 v0 = sub_8155638(sprite);
|
u8 bobState = GetSurfBobState(sprite);
|
||||||
if (v0 != 0)
|
if (bobState != 0)
|
||||||
{
|
{
|
||||||
if (((u16)(++ sprite->data[4]) & unk_085CDC6A[sprite->data[5]]) == 0)
|
if (((u16)(++ sprite->data[4]) & unk_085CDC6A[sprite->data[5]]) == 0)
|
||||||
{
|
{
|
||||||
@ -1060,9 +1061,9 @@ static void CreateBobbingEffect(struct ObjectEvent *objectEvent, struct Sprite *
|
|||||||
{
|
{
|
||||||
sprite->data[3] = -sprite->data[3];
|
sprite->data[3] = -sprite->data[3];
|
||||||
}
|
}
|
||||||
if (v0 != 2)
|
if (bobState != 2)
|
||||||
{
|
{
|
||||||
if (sub_815564C(sprite) == 0)
|
if (GetSurfBobWhileFishingState(sprite) == 0)
|
||||||
linkedSprite->pos2.y = sprite->pos2.y;
|
linkedSprite->pos2.y = sprite->pos2.y;
|
||||||
else
|
else
|
||||||
linkedSprite->pos2.y = sprite->data[1] + sprite->pos2.y;
|
linkedSprite->pos2.y = sprite->data[1] + sprite->pos2.y;
|
||||||
@ -1358,61 +1359,72 @@ void UpdateSparkleFieldEffect(struct Sprite *sprite)
|
|||||||
FieldEffectStop(sprite, FLDEFF_SPARKLE);
|
FieldEffectStop(sprite, FLDEFF_SPARKLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8155EA0(struct Sprite *sprite)
|
#define sTimer data[0]
|
||||||
|
#define sState data[2]
|
||||||
|
#define sStartY data[4]
|
||||||
|
#define sCounter data[5]
|
||||||
|
#define sAnimCounter data[6]
|
||||||
|
#define sAnimState data[7]
|
||||||
|
|
||||||
|
// Same as InitSpriteForFigure8Anim
|
||||||
|
static void InitRayquazaForFigure8Anim(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->data[6] = 0;
|
sprite->sAnimCounter = 0;
|
||||||
sprite->data[7] = 0;
|
sprite->sAnimState = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_8155EA8(struct Sprite *sprite)
|
// Only different from AnimateSpriteInFigure8 by the addition of SetGpuReg to move the spotlight
|
||||||
|
static bool8 AnimateRayquazaInFigure8(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
bool8 returnBool = FALSE;
|
bool8 finished = FALSE;
|
||||||
|
|
||||||
switch (sprite->data[7])
|
switch (sprite->sAnimState)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
sprite->pos2.x += sub_809773C(sprite->data[6]);
|
sprite->pos2.x += GetFigure8XOffset(sprite->sAnimCounter);
|
||||||
sprite->pos2.y += sub_8097728(sprite->data[6]);
|
sprite->pos2.y += GetFigure8YOffset(sprite->sAnimCounter);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
sprite->pos2.x -= sub_809773C(0x47 - sprite->data[6]);
|
sprite->pos2.x -= GetFigure8XOffset((FIGURE_8_LENGTH - 1) - sprite->sAnimCounter);
|
||||||
sprite->pos2.y += sub_8097728(0x47 - sprite->data[6]);
|
sprite->pos2.y += GetFigure8YOffset((FIGURE_8_LENGTH - 1) - sprite->sAnimCounter);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
sprite->pos2.x -= sub_809773C(sprite->data[6]);
|
sprite->pos2.x -= GetFigure8XOffset(sprite->sAnimCounter);
|
||||||
sprite->pos2.y += sub_8097728(sprite->data[6]);
|
sprite->pos2.y += GetFigure8YOffset(sprite->sAnimCounter);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
sprite->pos2.x += sub_809773C(0x47 - sprite->data[6]);
|
sprite->pos2.x += GetFigure8XOffset((FIGURE_8_LENGTH - 1) - sprite->sAnimCounter);
|
||||||
sprite->pos2.y += sub_8097728(0x47 - sprite->data[6]);
|
sprite->pos2.y += GetFigure8YOffset((FIGURE_8_LENGTH - 1) - sprite->sAnimCounter);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update spotlight to sweep left and right with Rayquaza
|
||||||
SetGpuReg(REG_OFFSET_BG0HOFS, -sprite->pos2.x);
|
SetGpuReg(REG_OFFSET_BG0HOFS, -sprite->pos2.x);
|
||||||
if (++sprite->data[6] == 72)
|
|
||||||
|
if (++sprite->sAnimCounter == FIGURE_8_LENGTH)
|
||||||
{
|
{
|
||||||
sprite->data[6] = 0;
|
sprite->sAnimCounter = 0;
|
||||||
sprite->data[7]++;
|
sprite->sAnimState++;
|
||||||
}
|
}
|
||||||
if (sprite->data[7] == 4)
|
if (sprite->sAnimState == 4)
|
||||||
{
|
{
|
||||||
sprite->pos2.y = 0;
|
sprite->pos2.y = 0;
|
||||||
sprite->pos2.x = 0;
|
sprite->pos2.x = 0;
|
||||||
returnBool = TRUE;
|
finished = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return returnBool;
|
return finished;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8155F80(struct Sprite *sprite)
|
void UpdateRayquazaSpotlightEffect(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
u8 i, j;
|
u8 i, j;
|
||||||
|
|
||||||
switch (sprite->data[2])
|
switch (sprite->sState)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
SetGpuReg(REG_OFFSET_BG0VOFS, 0x78 - (sprite->data[0] / 3));
|
SetGpuReg(REG_OFFSET_BG0VOFS, 120 - (sprite->sTimer / 3));
|
||||||
if (sprite->data[0] == 0x60)
|
if (sprite->sTimer == 96)
|
||||||
{
|
{
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
@ -1422,42 +1434,42 @@ void sub_8155F80(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sprite->data[0] > 0x137)
|
if (sprite->sTimer > 311)
|
||||||
{
|
{
|
||||||
sprite->data[2] = 1;
|
sprite->sState = 1;
|
||||||
sprite->data[0] = 0;
|
sprite->sTimer = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
sprite->pos1.y = (gSineTable[sprite->data[0] / 3] >> 2) + sprite->data[4];
|
sprite->pos1.y = (gSineTable[sprite->sTimer / 3] >> 2) + sprite->sStartY;
|
||||||
if (sprite->data[0] == 0xBD)
|
if (sprite->sTimer == 189)
|
||||||
{
|
{
|
||||||
sprite->data[2] = 2;
|
sprite->sState = 2;
|
||||||
sprite->data[5] = 0;
|
sprite->sCounter = 0;
|
||||||
sprite->data[0] = 0;
|
sprite->sTimer = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (sprite->data[0] == 0x3C)
|
if (sprite->sTimer == 60)
|
||||||
{
|
{
|
||||||
sprite->data[5]++;
|
sprite->sCounter++;
|
||||||
sprite->data[0] = 0;
|
sprite->sTimer = 0;
|
||||||
}
|
}
|
||||||
if (sprite->data[5] == 7)
|
if (sprite->sCounter == 7)
|
||||||
{
|
{
|
||||||
sprite->data[5] = 0;
|
sprite->sCounter = 0;
|
||||||
sprite->data[2] = 3;
|
sprite->sState = 3;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (sprite->pos2.y == 0)
|
if (sprite->pos2.y == 0)
|
||||||
{
|
{
|
||||||
sprite->data[0] = 0;
|
sprite->sTimer = 0;
|
||||||
sprite->data[2]++;
|
sprite->sState++;
|
||||||
}
|
}
|
||||||
if (sprite->data[0] == 5)
|
if (sprite->sTimer == 5)
|
||||||
{
|
{
|
||||||
sprite->data[0] = 0;
|
sprite->sTimer = 0;
|
||||||
if (sprite->pos2.y > 0)
|
if (sprite->pos2.y > 0)
|
||||||
sprite->pos2.y--;
|
sprite->pos2.y--;
|
||||||
else
|
else
|
||||||
@ -1465,38 +1477,38 @@ void sub_8155F80(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if (sprite->data[0] == 0x3C)
|
if (sprite->sTimer == 60)
|
||||||
{
|
{
|
||||||
sprite->data[2] = 5;
|
sprite->sState = 5;
|
||||||
sprite->data[0] = 0;
|
sprite->sTimer = 0;
|
||||||
sprite->data[5] = 0;
|
sprite->sCounter = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
sub_8155EA0(sprite);
|
InitRayquazaForFigure8Anim(sprite);
|
||||||
sprite->data[2] = 6;
|
sprite->sState = 6;
|
||||||
sprite->data[0] = 0;
|
sprite->sTimer = 0;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
if (sub_8155EA8(sprite))
|
if (AnimateRayquazaInFigure8(sprite))
|
||||||
{
|
{
|
||||||
sprite->data[0] = 0;
|
sprite->sTimer = 0;
|
||||||
if (++sprite->data[5] <= 2)
|
if (++sprite->sCounter <= 2)
|
||||||
{
|
{
|
||||||
sub_8155EA0(sprite);
|
InitRayquazaForFigure8Anim(sprite);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprite->data[5] = 0;
|
sprite->sCounter = 0;
|
||||||
sprite->data[2] = 7;
|
sprite->sState = 7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
if (sprite->data[0] == 0x1E)
|
if (sprite->sTimer == 30)
|
||||||
{
|
{
|
||||||
sprite->data[2] = 8;
|
sprite->sState = 8;
|
||||||
sprite->data[0] = 0;
|
sprite->sTimer = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
@ -1508,11 +1520,11 @@ void sub_8155F80(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
SetGpuReg(REG_OFFSET_BG0VOFS, 0);
|
SetGpuReg(REG_OFFSET_BG0VOFS, 0);
|
||||||
FieldEffectStop(sprite, FLDEFF_RAYQUAZA);
|
FieldEffectStop(sprite, FLDEFF_RAYQUAZA_SPOTLIGHT);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sprite->data[2] == 1)
|
if (sprite->sState == 1)
|
||||||
{
|
{
|
||||||
if ((sprite->data[1] & 7) == 0)
|
if ((sprite->data[1] & 7) == 0)
|
||||||
sprite->pos2.y += sprite->data[3];
|
sprite->pos2.y += sprite->data[3];
|
||||||
@ -1521,10 +1533,17 @@ void sub_8155F80(struct Sprite *sprite)
|
|||||||
sprite->data[1]++;
|
sprite->data[1]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
sprite->data[0]++;
|
sprite->sTimer++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8156194(struct Sprite *sprite)
|
#undef sTimer
|
||||||
|
#undef sState
|
||||||
|
#undef sStartY
|
||||||
|
#undef sCounter
|
||||||
|
#undef sAnimCounter
|
||||||
|
#undef sAnimState
|
||||||
|
|
||||||
|
void UpdateJumpImpactEffect(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (sprite->animEnded)
|
if (sprite->animEnded)
|
||||||
{
|
{
|
||||||
|
@ -320,7 +320,7 @@ static u8 ObjectEventCB2_NoMovement2(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void player_step(u8 direction, u16 newKeys, u16 heldKeys)
|
void PlayerStep(u8 direction, u16 newKeys, u16 heldKeys)
|
||||||
{
|
{
|
||||||
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
|
||||||
|
|
||||||
@ -869,7 +869,7 @@ static void PlayerAvatarTransition_Surfing(struct ObjectEvent *objEvent)
|
|||||||
gFieldEffectArguments[2] = gPlayerAvatar.objectEventId;
|
gFieldEffectArguments[2] = gPlayerAvatar.objectEventId;
|
||||||
spriteId = FieldEffectStart(FLDEFF_SURF_BLOB);
|
spriteId = FieldEffectStart(FLDEFF_SURF_BLOB);
|
||||||
objEvent->fieldEffectSpriteId = spriteId;
|
objEvent->fieldEffectSpriteId = spriteId;
|
||||||
sub_81555AC(spriteId, 1);
|
SetSurfBobState(spriteId, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PlayerAvatarTransition_Underwater(struct ObjectEvent *objEvent)
|
static void PlayerAvatarTransition_Underwater(struct ObjectEvent *objEvent)
|
||||||
@ -885,7 +885,7 @@ static void PlayerAvatarTransition_ReturnToField(struct ObjectEvent *objEvent)
|
|||||||
gPlayerAvatar.flags |= PLAYER_AVATAR_FLAG_5;
|
gPlayerAvatar.flags |= PLAYER_AVATAR_FLAG_5;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_808B578(void)
|
void UpdatePlayerAvatarTransitionState(void)
|
||||||
{
|
{
|
||||||
gPlayerAvatar.tileTransitionState = T_NOT_MOVING;
|
gPlayerAvatar.tileTransitionState = T_NOT_MOVING;
|
||||||
if (PlayerIsAnimActive())
|
if (PlayerIsAnimActive())
|
||||||
@ -1650,7 +1650,7 @@ static void Task_StopSurfingInit(u8 taskId)
|
|||||||
if (!ObjectEventClearHeldMovementIfFinished(playerObjEvent))
|
if (!ObjectEventClearHeldMovementIfFinished(playerObjEvent))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sub_81555AC(playerObjEvent->fieldEffectSpriteId, 2);
|
SetSurfBobState(playerObjEvent->fieldEffectSpriteId, 2);
|
||||||
ObjectEventSetHeldMovement(playerObjEvent, GetJumpSpecialMovementAction((u8)gTasks[taskId].data[0]));
|
ObjectEventSetHeldMovement(playerObjEvent, GetJumpSpecialMovementAction((u8)gTasks[taskId].data[0]));
|
||||||
gTasks[taskId].func = Task_WaitStopSurfing;
|
gTasks[taskId].func = Task_WaitStopSurfing;
|
||||||
}
|
}
|
||||||
@ -1934,7 +1934,7 @@ static bool8 Fishing11(struct Task *task)
|
|||||||
ObjectEventSetGraphicsId(playerObjEvent, task->tPlayerGfxId);
|
ObjectEventSetGraphicsId(playerObjEvent, task->tPlayerGfxId);
|
||||||
ObjectEventTurn(playerObjEvent, playerObjEvent->movementDirection);
|
ObjectEventTurn(playerObjEvent, playerObjEvent->movementDirection);
|
||||||
if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING)
|
if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING)
|
||||||
sub_8155604(gObjectEvents[gPlayerAvatar.objectEventId].fieldEffectSpriteId, 0, 0);
|
SetSurfBobWhileFishingState(gObjectEvents[gPlayerAvatar.objectEventId].fieldEffectSpriteId, 0, 0);
|
||||||
gSprites[gPlayerAvatar.spriteId].pos2.x = 0;
|
gSprites[gPlayerAvatar.spriteId].pos2.x = 0;
|
||||||
gSprites[gPlayerAvatar.spriteId].pos2.y = 0;
|
gSprites[gPlayerAvatar.spriteId].pos2.y = 0;
|
||||||
ClearDialogWindowAndFrame(0, TRUE);
|
ClearDialogWindowAndFrame(0, TRUE);
|
||||||
@ -1994,7 +1994,7 @@ static bool8 Fishing15(struct Task *task)
|
|||||||
ObjectEventSetGraphicsId(playerObjEvent, task->tPlayerGfxId);
|
ObjectEventSetGraphicsId(playerObjEvent, task->tPlayerGfxId);
|
||||||
ObjectEventTurn(playerObjEvent, playerObjEvent->movementDirection);
|
ObjectEventTurn(playerObjEvent, playerObjEvent->movementDirection);
|
||||||
if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING)
|
if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING)
|
||||||
sub_8155604(gObjectEvents[gPlayerAvatar.objectEventId].fieldEffectSpriteId, 0, 0);
|
SetSurfBobWhileFishingState(gObjectEvents[gPlayerAvatar.objectEventId].fieldEffectSpriteId, 0, 0);
|
||||||
gSprites[gPlayerAvatar.spriteId].pos2.x = 0;
|
gSprites[gPlayerAvatar.spriteId].pos2.x = 0;
|
||||||
gSprites[gPlayerAvatar.spriteId].pos2.y = 0;
|
gSprites[gPlayerAvatar.spriteId].pos2.y = 0;
|
||||||
task->tStep++;
|
task->tStep++;
|
||||||
@ -2053,7 +2053,7 @@ static void AlignFishingAnimationFrames(void)
|
|||||||
if (animType == 10 || animType == 11)
|
if (animType == 10 || animType == 11)
|
||||||
playerSprite->pos2.y = 8;
|
playerSprite->pos2.y = 8;
|
||||||
if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING)
|
if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING)
|
||||||
sub_8155604(gObjectEvents[gPlayerAvatar.objectEventId].fieldEffectSpriteId, 1, playerSprite->pos2.y);
|
SetSurfBobWhileFishingState(gObjectEvents[gPlayerAvatar.objectEventId].fieldEffectSpriteId, 1, playerSprite->pos2.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_808D074(u8 a0)
|
void sub_808D074(u8 a0)
|
||||||
|
@ -290,7 +290,7 @@ void FieldCB_WarpExitFadeFromWhite(void)
|
|||||||
|
|
||||||
void FieldCB_WarpExitFadeFromBlack(void)
|
void FieldCB_WarpExitFadeFromBlack(void)
|
||||||
{
|
{
|
||||||
if (!sub_81D6534()) // sub_81D6534 always returns false
|
if (!OnTrainerHillEReaderChallengeFloor()) // always false
|
||||||
Overworld_PlaySpecialMapMusic();
|
Overworld_PlaySpecialMapMusic();
|
||||||
FadeInFromBlack();
|
FadeInFromBlack();
|
||||||
SetUpWarpExitTask();
|
SetUpWarpExitTask();
|
||||||
|
@ -44,7 +44,7 @@ static void InitBackupMapLayoutConnections(struct MapHeader *mapHeader);
|
|||||||
static void LoadSavedMapView(void);
|
static void LoadSavedMapView(void);
|
||||||
static bool8 SkipCopyingMetatileFromSavedMap(u16* mapMetatilePtr, u16 mapWidth, u8 yMode);
|
static bool8 SkipCopyingMetatileFromSavedMap(u16* mapMetatilePtr, u16 mapWidth, u8 yMode);
|
||||||
|
|
||||||
struct MapHeader const *const mapconnection_get_mapheader(struct MapConnection *connection)
|
struct MapHeader const *const GetMapHeaderFromConnection(struct MapConnection *connection)
|
||||||
{
|
{
|
||||||
return Overworld_GetMapHeaderByGroupAndId(connection->mapGroup, connection->mapNum);
|
return Overworld_GetMapHeaderByGroupAndId(connection->mapGroup, connection->mapNum);
|
||||||
}
|
}
|
||||||
@ -124,7 +124,7 @@ static void InitBackupMapLayoutConnections(struct MapHeader *mapHeader)
|
|||||||
gMapConnectionFlags = sDummyConnectionFlags;
|
gMapConnectionFlags = sDummyConnectionFlags;
|
||||||
for (i = 0; i < count; i++, connection++)
|
for (i = 0; i < count; i++, connection++)
|
||||||
{
|
{
|
||||||
struct MapHeader const *cMap = mapconnection_get_mapheader(connection);
|
struct MapHeader const *cMap = GetMapHeaderFromConnection(connection);
|
||||||
u32 offset = connection->offset;
|
u32 offset = connection->offset;
|
||||||
switch (connection->direction)
|
switch (connection->direction)
|
||||||
{
|
{
|
||||||
@ -734,7 +734,7 @@ int CanCameraMoveInDirection(int direction)
|
|||||||
void sub_80887F8(struct MapConnection *connection, int direction, int x, int y)
|
void sub_80887F8(struct MapConnection *connection, int direction, int x, int y)
|
||||||
{
|
{
|
||||||
struct MapHeader const *mapHeader;
|
struct MapHeader const *mapHeader;
|
||||||
mapHeader = mapconnection_get_mapheader(connection);
|
mapHeader = GetMapHeaderFromConnection(connection);
|
||||||
switch (direction)
|
switch (direction)
|
||||||
{
|
{
|
||||||
case CONNECTION_EAST:
|
case CONNECTION_EAST:
|
||||||
@ -805,7 +805,7 @@ struct MapConnection *sub_8088950(u8 direction, int x, int y)
|
|||||||
bool8 sub_80889A8(u8 direction, int x, int y, struct MapConnection *connection)
|
bool8 sub_80889A8(u8 direction, int x, int y, struct MapConnection *connection)
|
||||||
{
|
{
|
||||||
struct MapHeader const *mapHeader;
|
struct MapHeader const *mapHeader;
|
||||||
mapHeader = mapconnection_get_mapheader(connection);
|
mapHeader = GetMapHeaderFromConnection(connection);
|
||||||
switch (direction)
|
switch (direction)
|
||||||
{
|
{
|
||||||
case CONNECTION_SOUTH:
|
case CONNECTION_SOUTH:
|
||||||
@ -846,7 +846,7 @@ int sub_8088A38(int x, int width)
|
|||||||
int sub_8088A4C(struct MapConnection *connection, int x, int y)
|
int sub_8088A4C(struct MapConnection *connection, int x, int y)
|
||||||
{
|
{
|
||||||
struct MapHeader const *mapHeader;
|
struct MapHeader const *mapHeader;
|
||||||
mapHeader = mapconnection_get_mapheader(connection);
|
mapHeader = GetMapHeaderFromConnection(connection);
|
||||||
switch (connection->direction)
|
switch (connection->direction)
|
||||||
{
|
{
|
||||||
case CONNECTION_SOUTH:
|
case CONNECTION_SOUTH:
|
||||||
@ -893,7 +893,7 @@ struct MapConnection *GetConnectionAtCoords(s16 x, s16 y)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8088B3C(u16 x, u16 y)
|
void SetCameraFocusCoords(u16 x, u16 y)
|
||||||
{
|
{
|
||||||
gSaveBlock1Ptr->pos.x = x - 7;
|
gSaveBlock1Ptr->pos.x = x - 7;
|
||||||
gSaveBlock1Ptr->pos.y = y - 7;
|
gSaveBlock1Ptr->pos.y = y - 7;
|
||||||
@ -905,7 +905,8 @@ void GetCameraFocusCoords(u16 *x, u16 *y)
|
|||||||
*y = gSaveBlock1Ptr->pos.y + 7;
|
*y = gSaveBlock1Ptr->pos.y + 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetPlayerCoords(u16 x, u16 y)
|
// Unused
|
||||||
|
static void SetCameraCoords(u16 x, u16 y)
|
||||||
{
|
{
|
||||||
gSaveBlock1Ptr->pos.x = x;
|
gSaveBlock1Ptr->pos.x = x;
|
||||||
gSaveBlock1Ptr->pos.y = y;
|
gSaveBlock1Ptr->pos.y = y;
|
||||||
|
@ -122,12 +122,12 @@ static const struct SpriteFrameImage sSpriteImageTable_CutGrass[] =
|
|||||||
{gFieldEffectPic_CutGrass, 0x20},
|
{gFieldEffectPic_CutGrass, 0x20},
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpritePalette gFieldEffectObjectPaletteInfo6 = {gFieldEffectObjectPalette6, 0x1000};
|
const struct SpritePalette gFieldEffectObjectPaletteInfo6 = {gFieldEffectObjectPalette6, FLDEFF_PAL_TAG_0};
|
||||||
|
|
||||||
static const struct SpriteTemplate sSpriteTemplate_CutGrass =
|
static const struct SpriteTemplate sSpriteTemplate_CutGrass =
|
||||||
{
|
{
|
||||||
.tileTag = 0xFFFF,
|
.tileTag = 0xFFFF,
|
||||||
.paletteTag = 0x1000,
|
.paletteTag = FLDEFF_PAL_TAG_0,
|
||||||
.oam = &sOamData_CutGrass,
|
.oam = &sOamData_CutGrass,
|
||||||
.anims = sSpriteAnimTable_CutGrass,
|
.anims = sSpriteAnimTable_CutGrass,
|
||||||
.images = sSpriteImageTable_CutGrass,
|
.images = sSpriteImageTable_CutGrass,
|
||||||
|
@ -209,7 +209,7 @@ static const struct SpriteFrameImage gUnknown_858E5D8[] =
|
|||||||
static const struct SpriteTemplate gUnknown_0858E600 =
|
static const struct SpriteTemplate gUnknown_0858E600 =
|
||||||
{
|
{
|
||||||
.tileTag = 0xFFFF,
|
.tileTag = 0xFFFF,
|
||||||
.paletteTag = 0x1003,
|
.paletteTag = FLDEFF_PAL_TAG_3,
|
||||||
.oam = &gOamData_858E4D8,
|
.oam = &gOamData_858E4D8,
|
||||||
.anims = gSpriteAnimTable_858E570,
|
.anims = gSpriteAnimTable_858E570,
|
||||||
.images = gUnknown_858E588,
|
.images = gUnknown_858E588,
|
||||||
@ -220,7 +220,7 @@ static const struct SpriteTemplate gUnknown_0858E600 =
|
|||||||
static const struct SpriteTemplate gUnknown_0858E618 =
|
static const struct SpriteTemplate gUnknown_0858E618 =
|
||||||
{
|
{
|
||||||
.tileTag = 0xFFFF,
|
.tileTag = 0xFFFF,
|
||||||
.paletteTag = 0x1008,
|
.paletteTag = FLDEFF_PAL_TAG_8,
|
||||||
.oam = &gOamData_858E4D8,
|
.oam = &gOamData_858E4D8,
|
||||||
.anims = gSpriteAnimTable_858E574,
|
.anims = gSpriteAnimTable_858E574,
|
||||||
.images = gUnknown_858E5B0,
|
.images = gUnknown_858E5B0,
|
||||||
@ -231,7 +231,7 @@ static const struct SpriteTemplate gUnknown_0858E618 =
|
|||||||
static const struct SpriteTemplate gUnknown_0858E630 =
|
static const struct SpriteTemplate gUnknown_0858E630 =
|
||||||
{
|
{
|
||||||
.tileTag = 0xFFFF,
|
.tileTag = 0xFFFF,
|
||||||
.paletteTag = 0x1008,
|
.paletteTag = FLDEFF_PAL_TAG_8,
|
||||||
.oam = &gOamData_858E4D8,
|
.oam = &gOamData_858E4D8,
|
||||||
.anims = gSpriteAnimTable_858E584,
|
.anims = gSpriteAnimTable_858E584,
|
||||||
.images = gUnknown_858E5D8,
|
.images = gUnknown_858E5D8,
|
||||||
@ -239,8 +239,8 @@ static const struct SpriteTemplate gUnknown_0858E630 =
|
|||||||
.callback = ShrubEntranceSpriteCallback1,
|
.callback = ShrubEntranceSpriteCallback1,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpritePalette gFieldEffectObjectPaletteInfo7 = {gFieldEffectObjectPalette7, 0x1003};
|
const struct SpritePalette gFieldEffectObjectPaletteInfo7 = {gFieldEffectObjectPalette7, FLDEFF_PAL_TAG_3};
|
||||||
const struct SpritePalette gFieldEffectObjectPaletteInfo8 = {gFieldEffectObjectPalette8, 0x1008};
|
const struct SpritePalette gFieldEffectObjectPaletteInfo8 = {gFieldEffectObjectPalette8, FLDEFF_PAL_TAG_8};
|
||||||
|
|
||||||
static const struct OamData gOamData_858E658 =
|
static const struct OamData gOamData_858E658 =
|
||||||
{
|
{
|
||||||
@ -277,7 +277,7 @@ static const struct SpriteFrameImage gUnknown_0858E674[] =
|
|||||||
static const struct SpriteTemplate gUnknown_0858E68C =
|
static const struct SpriteTemplate gUnknown_0858E68C =
|
||||||
{
|
{
|
||||||
.tileTag = 0xFFFF,
|
.tileTag = 0xFFFF,
|
||||||
.paletteTag = 0x100E,
|
.paletteTag = FLDEFF_PAL_TAG_14,
|
||||||
.oam = &gOamData_858E658,
|
.oam = &gOamData_858E658,
|
||||||
.anims = gSpriteAnimTable_858E670,
|
.anims = gSpriteAnimTable_858E670,
|
||||||
.images = gUnknown_0858E674,
|
.images = gUnknown_0858E674,
|
||||||
@ -286,7 +286,7 @@ static const struct SpriteTemplate gUnknown_0858E68C =
|
|||||||
};
|
};
|
||||||
|
|
||||||
// This uses one of the secret base palettes, so there is no "graphics/field_effects/palettes/09.pal" file.
|
// This uses one of the secret base palettes, so there is no "graphics/field_effects/palettes/09.pal" file.
|
||||||
const struct SpritePalette gFieldEffectObjectPaletteInfo9 = {gTilesetPalettes_SecretBase[5], 0x100E};
|
const struct SpritePalette gFieldEffectObjectPaletteInfo9 = {gTilesetPalettes_SecretBase[5], FLDEFF_PAL_TAG_14};
|
||||||
|
|
||||||
static const u8 gSpriteImage_858E6AC[] = INCBIN_U8("graphics/unknown/858E84C/0.4bpp");
|
static const u8 gSpriteImage_858E6AC[] = INCBIN_U8("graphics/unknown/858E84C/0.4bpp");
|
||||||
static const u8 gSpriteImage_858E72C[] = INCBIN_U8("graphics/unknown/858E84C/1.4bpp");
|
static const u8 gSpriteImage_858E72C[] = INCBIN_U8("graphics/unknown/858E84C/1.4bpp");
|
||||||
@ -300,7 +300,7 @@ static const struct SpriteFrameImage gUnknown_0858E84C[] =
|
|||||||
{gSpriteImage_858E7AC, sizeof(gSpriteImage_858E7AC)},
|
{gSpriteImage_858E7AC, sizeof(gSpriteImage_858E7AC)},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct SpritePalette gUnknown_0858E864 = {gUnknown_0858E82C, 0x1000};
|
static const struct SpritePalette gUnknown_0858E864 = {gUnknown_0858E82C, FLDEFF_PAL_TAG_0};
|
||||||
|
|
||||||
static const union AnimCmd gSpriteAnim_858E86C[] =
|
static const union AnimCmd gSpriteAnim_858E86C[] =
|
||||||
{
|
{
|
||||||
@ -318,7 +318,7 @@ static const union AnimCmd *const gSpriteAnimTable_858E87C[] =
|
|||||||
static const struct SpriteTemplate gUnknown_0858E880 =
|
static const struct SpriteTemplate gUnknown_0858E880 =
|
||||||
{
|
{
|
||||||
.tileTag = 0xFFFF,
|
.tileTag = 0xFFFF,
|
||||||
.paletteTag = 0x1000,
|
.paletteTag = FLDEFF_PAL_TAG_0,
|
||||||
.oam = &gObjectEventBaseOam_32x8,
|
.oam = &gObjectEventBaseOam_32x8,
|
||||||
.anims = gSpriteAnimTable_858E87C,
|
.anims = gSpriteAnimTable_858E87C,
|
||||||
.images = gUnknown_0858E84C,
|
.images = gUnknown_0858E84C,
|
||||||
|
@ -399,7 +399,7 @@ static bool8 IsHiddenItemPresentInConnection(struct MapConnection *connection, i
|
|||||||
u32 localOffset;
|
u32 localOffset;
|
||||||
s32 localLength;
|
s32 localLength;
|
||||||
|
|
||||||
struct MapHeader const *const mapHeader = mapconnection_get_mapheader(connection);
|
struct MapHeader const *const mapHeader = GetMapHeaderFromConnection(connection);
|
||||||
|
|
||||||
switch (connection->direction)
|
switch (connection->direction)
|
||||||
{
|
{
|
||||||
|
@ -96,24 +96,24 @@ static void VBlankCB_Field(void);
|
|||||||
static void SpriteCB_LinkPlayer(struct Sprite *sprite);
|
static void SpriteCB_LinkPlayer(struct Sprite *sprite);
|
||||||
static void ChooseAmbientCrySpecies(void);
|
static void ChooseAmbientCrySpecies(void);
|
||||||
static void DoMapLoadLoop(u8 *state);
|
static void DoMapLoadLoop(u8 *state);
|
||||||
|
static bool32 LoadMapInStepsLocal(u8 *state, bool32);
|
||||||
static bool32 LoadMapInStepsLink(u8 *state);
|
static bool32 LoadMapInStepsLink(u8 *state);
|
||||||
static bool32 ReturnToFieldLocal(u8 *state);
|
static bool32 ReturnToFieldLocal(u8 *state);
|
||||||
static bool32 LoadMapInStepsLocal(u8 *state, bool32);
|
|
||||||
static bool32 ReturnToFieldLink(u8 *state);
|
static bool32 ReturnToFieldLink(u8 *state);
|
||||||
static void mli4_mapscripts_and_other(void);
|
static void InitObjectEventsLink(void);
|
||||||
|
static void InitObjectEventsLocal(void);
|
||||||
static void InitOverworldGraphicsRegisters(void);
|
static void InitOverworldGraphicsRegisters(void);
|
||||||
static u8 GetSpriteForLinkedPlayer(u8);
|
static u8 GetSpriteForLinkedPlayer(u8);
|
||||||
static u16 KeyInterCB_SendNothing(u32 a1);
|
static u16 KeyInterCB_SendNothing(u32 a1);
|
||||||
static void sub_80867C8(void);
|
static void ResetMirageTowerAndSaveBlockPtrs(void);
|
||||||
static void sub_80867D8(void);
|
static void sub_80867D8(void);
|
||||||
static void sub_8086AE4(void);
|
static void OffsetCameraFocusByLinkPlayerId(void);
|
||||||
static void sub_80869DC(void);
|
static void SpawnLinkPlayers(void);
|
||||||
static void sub_8086B14(void);
|
|
||||||
static void SetCameraToTrackGuestPlayer(void);
|
static void SetCameraToTrackGuestPlayer(void);
|
||||||
static void sub_8086988(bool32 arg0);
|
static void ResumeMap(bool32 arg0);
|
||||||
static void SetCameraToTrackPlayer(void);
|
static void SetCameraToTrackPlayer(void);
|
||||||
static void sub_8086A68(void);
|
static void sub_8086A68(void);
|
||||||
static void sub_8086860(void);
|
static void InitViewGraphics(void);
|
||||||
static void SetCameraToTrackGuestPlayer_2(void);
|
static void SetCameraToTrackGuestPlayer_2(void);
|
||||||
static void CreateLinkPlayerSprites(void);
|
static void CreateLinkPlayerSprites(void);
|
||||||
static void ClearAllPlayerKeys(void);
|
static void ClearAllPlayerKeys(void);
|
||||||
@ -520,7 +520,7 @@ void Overworld_SetObjEventTemplateMovementType(u8 localId, u8 movementType)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mapdata_load_assets_to_gpu_and_full_redraw(void)
|
static void InitMapView(void)
|
||||||
{
|
{
|
||||||
ResetFieldCamera();
|
ResetFieldCamera();
|
||||||
CopyMapTilesetsToVram(gMapHeader.mapLayout);
|
CopyMapTilesetsToVram(gMapHeader.mapLayout);
|
||||||
@ -939,7 +939,7 @@ static u8 GetAdjustedInitialDirection(struct InitialPlayerAvatarState *playerStr
|
|||||||
else if (MetatileBehavior_IsEastArrowWarp(metatileBehavior) == TRUE)
|
else if (MetatileBehavior_IsEastArrowWarp(metatileBehavior) == TRUE)
|
||||||
return DIR_WEST;
|
return DIR_WEST;
|
||||||
else if ((playerStruct->transitionFlags == PLAYER_AVATAR_FLAG_UNDERWATER && transitionFlags == PLAYER_AVATAR_FLAG_SURFING)
|
else if ((playerStruct->transitionFlags == PLAYER_AVATAR_FLAG_UNDERWATER && transitionFlags == PLAYER_AVATAR_FLAG_SURFING)
|
||||||
|| (playerStruct->transitionFlags == PLAYER_AVATAR_FLAG_SURFING && transitionFlags == PLAYER_AVATAR_FLAG_UNDERWATER ))
|
|| (playerStruct->transitionFlags == PLAYER_AVATAR_FLAG_SURFING && transitionFlags == PLAYER_AVATAR_FLAG_UNDERWATER))
|
||||||
return playerStruct->direction;
|
return playerStruct->direction;
|
||||||
else if (MetatileBehavior_IsLadder(metatileBehavior) == TRUE)
|
else if (MetatileBehavior_IsLadder(metatileBehavior) == TRUE)
|
||||||
return playerStruct->direction;
|
return playerStruct->direction;
|
||||||
@ -1421,7 +1421,7 @@ static void DoCB1_Overworld(u16 newKeys, u16 heldKeys)
|
|||||||
{
|
{
|
||||||
struct FieldInput inputStruct;
|
struct FieldInput inputStruct;
|
||||||
|
|
||||||
sub_808B578();
|
UpdatePlayerAvatarTransitionState();
|
||||||
FieldClearPlayerInput(&inputStruct);
|
FieldClearPlayerInput(&inputStruct);
|
||||||
FieldGetPlayerInput(&inputStruct, newKeys, heldKeys);
|
FieldGetPlayerInput(&inputStruct, newKeys, heldKeys);
|
||||||
if (!ScriptContext2_IsEnabled())
|
if (!ScriptContext2_IsEnabled())
|
||||||
@ -1433,7 +1433,7 @@ static void DoCB1_Overworld(u16 newKeys, u16 heldKeys)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player_step(inputStruct.dpadDirection, newKeys, heldKeys);
|
PlayerStep(inputStruct.dpadDirection, newKeys, heldKeys);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1723,12 +1723,12 @@ void CB2_ContinueSavedGame(void)
|
|||||||
ClearContinueGameWarpStatus();
|
ClearContinueGameWarpStatus();
|
||||||
SetWarpDestinationToContinueGameWarp();
|
SetWarpDestinationToContinueGameWarp();
|
||||||
WarpIntoMap();
|
WarpIntoMap();
|
||||||
sub_80EDB44();
|
TryPutTodaysRivalTrainerOnAir();
|
||||||
SetMainCallback2(CB2_LoadMap);
|
SetMainCallback2(CB2_LoadMap);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sub_80EDB44();
|
TryPutTodaysRivalTrainerOnAir();
|
||||||
gFieldCallback = sub_8086204;
|
gFieldCallback = sub_8086204;
|
||||||
SetMainCallback1(CB1_Overworld);
|
SetMainCallback1(CB1_Overworld);
|
||||||
CB2_ReturnToField();
|
CB2_ReturnToField();
|
||||||
@ -1797,7 +1797,7 @@ static bool32 LoadMapInStepsLink(u8 *state)
|
|||||||
InitOverworldBgs();
|
InitOverworldBgs();
|
||||||
ScriptContext1_Init();
|
ScriptContext1_Init();
|
||||||
ScriptContext2_Disable();
|
ScriptContext2_Disable();
|
||||||
sub_80867C8();
|
ResetMirageTowerAndSaveBlockPtrs();
|
||||||
sub_80867D8();
|
sub_80867D8();
|
||||||
(*state)++;
|
(*state)++;
|
||||||
break;
|
break;
|
||||||
@ -1806,13 +1806,13 @@ static bool32 LoadMapInStepsLink(u8 *state)
|
|||||||
(*state)++;
|
(*state)++;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
sub_8086988(TRUE);
|
ResumeMap(TRUE);
|
||||||
(*state)++;
|
(*state)++;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
sub_8086AE4();
|
OffsetCameraFocusByLinkPlayerId();
|
||||||
sub_80869DC();
|
InitObjectEventsLink();
|
||||||
sub_8086B14();
|
SpawnLinkPlayers();
|
||||||
SetCameraToTrackGuestPlayer();
|
SetCameraToTrackGuestPlayer();
|
||||||
(*state)++;
|
(*state)++;
|
||||||
break;
|
break;
|
||||||
@ -1878,16 +1878,16 @@ static bool32 LoadMapInStepsLocal(u8 *state, bool32 a2)
|
|||||||
(*state)++;
|
(*state)++;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
sub_80867C8();
|
ResetMirageTowerAndSaveBlockPtrs();
|
||||||
sub_80867D8();
|
sub_80867D8();
|
||||||
(*state)++;
|
(*state)++;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
sub_8086988(a2);
|
ResumeMap(a2);
|
||||||
(*state)++;
|
(*state)++;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
mli4_mapscripts_and_other();
|
InitObjectEventsLocal();
|
||||||
SetCameraToTrackPlayer();
|
SetCameraToTrackPlayer();
|
||||||
(*state)++;
|
(*state)++;
|
||||||
break;
|
break;
|
||||||
@ -1945,16 +1945,16 @@ static bool32 ReturnToFieldLocal(u8 *state)
|
|||||||
switch (*state)
|
switch (*state)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
sub_80867C8();
|
ResetMirageTowerAndSaveBlockPtrs();
|
||||||
sub_80867D8();
|
sub_80867D8();
|
||||||
sub_8086988(FALSE);
|
ResumeMap(FALSE);
|
||||||
sub_8086A68();
|
sub_8086A68();
|
||||||
SetCameraToTrackPlayer();
|
SetCameraToTrackPlayer();
|
||||||
(*state)++;
|
(*state)++;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
sub_8086860();
|
InitViewGraphics();
|
||||||
sub_81D64C0();
|
TryLoadTrainerHillEReaderPalette();
|
||||||
(*state)++;
|
(*state)++;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
@ -1974,12 +1974,12 @@ static bool32 ReturnToFieldLink(u8 *state)
|
|||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
FieldClearVBlankHBlankCallbacks();
|
FieldClearVBlankHBlankCallbacks();
|
||||||
sub_80867C8();
|
ResetMirageTowerAndSaveBlockPtrs();
|
||||||
sub_80867D8();
|
sub_80867D8();
|
||||||
(*state)++;
|
(*state)++;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
sub_8086988(TRUE);
|
ResumeMap(TRUE);
|
||||||
(*state)++;
|
(*state)++;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
@ -2050,7 +2050,7 @@ static void DoMapLoadLoop(u8 *state)
|
|||||||
while (!LoadMapInStepsLocal(state, FALSE));
|
while (!LoadMapInStepsLocal(state, FALSE));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_80867C8(void)
|
static void ResetMirageTowerAndSaveBlockPtrs(void)
|
||||||
{
|
{
|
||||||
ClearMirageTowerPulseBlend();
|
ClearMirageTowerPulseBlend();
|
||||||
MoveSaveBlocks_ResetHeap();
|
MoveSaveBlocks_ResetHeap();
|
||||||
@ -2067,12 +2067,12 @@ static void sub_80867D8(void)
|
|||||||
LoadOam();
|
LoadOam();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_8086860(void)
|
static void InitViewGraphics(void)
|
||||||
{
|
{
|
||||||
InitCurrentFlashLevelScanlineEffect();
|
InitCurrentFlashLevelScanlineEffect();
|
||||||
InitOverworldGraphicsRegisters();
|
InitOverworldGraphicsRegisters();
|
||||||
InitTextBoxGfxAndPrinters();
|
InitTextBoxGfxAndPrinters();
|
||||||
mapdata_load_assets_to_gpu_and_full_redraw();
|
InitMapView();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void InitOverworldGraphicsRegisters(void)
|
static void InitOverworldGraphicsRegisters(void)
|
||||||
@ -2110,7 +2110,7 @@ static void InitOverworldGraphicsRegisters(void)
|
|||||||
InitFieldMessageBox();
|
InitFieldMessageBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_8086988(bool32 a1)
|
static void ResumeMap(bool32 a1)
|
||||||
{
|
{
|
||||||
ResetTasks();
|
ResetTasks();
|
||||||
ResetSpriteData();
|
ResetSpriteData();
|
||||||
@ -2133,7 +2133,7 @@ static void sub_8086988(bool32 a1)
|
|||||||
TryStartMirageTowerPulseBlendEffect();
|
TryStartMirageTowerPulseBlendEffect();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_80869DC(void)
|
static void InitObjectEventsLink(void)
|
||||||
{
|
{
|
||||||
gTotalCameraPixelOffsetX = 0;
|
gTotalCameraPixelOffsetX = 0;
|
||||||
gTotalCameraPixelOffsetY = 0;
|
gTotalCameraPixelOffsetY = 0;
|
||||||
@ -2142,7 +2142,7 @@ static void sub_80869DC(void)
|
|||||||
TryRunOnWarpIntoMapScript();
|
TryRunOnWarpIntoMapScript();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mli4_mapscripts_and_other(void)
|
static void InitObjectEventsLocal(void)
|
||||||
{
|
{
|
||||||
s16 x, y;
|
s16 x, y;
|
||||||
struct InitialPlayerAvatarState *player;
|
struct InitialPlayerAvatarState *player;
|
||||||
@ -2183,17 +2183,17 @@ static void SetCameraToTrackGuestPlayer_2(void)
|
|||||||
InitCameraUpdateCallback(GetSpriteForLinkedPlayer(gLocalLinkPlayerId));
|
InitCameraUpdateCallback(GetSpriteForLinkedPlayer(gLocalLinkPlayerId));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_8086AE4(void)
|
static void OffsetCameraFocusByLinkPlayerId(void)
|
||||||
{
|
{
|
||||||
u16 x, y;
|
u16 x, y;
|
||||||
GetCameraFocusCoords(&x, &y);
|
GetCameraFocusCoords(&x, &y);
|
||||||
|
|
||||||
// This is a hack of some kind; it's undone in sub_8086B14, which is called
|
// This is a hack of some kind; it's undone in SpawnLinkPlayers, which is called
|
||||||
// soon after this function.
|
// soon after this function.
|
||||||
sub_8088B3C(x + gLocalLinkPlayerId, y);
|
SetCameraFocusCoords(x + gLocalLinkPlayerId, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_8086B14(void)
|
static void SpawnLinkPlayers(void)
|
||||||
{
|
{
|
||||||
u16 i;
|
u16 i;
|
||||||
u16 x, y;
|
u16 x, y;
|
||||||
|
@ -64,7 +64,7 @@ static void TrainerHillSetPlayerLost(void);
|
|||||||
static void TrainerHillGetChallengeStatus(void);
|
static void TrainerHillGetChallengeStatus(void);
|
||||||
static void BufferChallengeTime(void);
|
static void BufferChallengeTime(void);
|
||||||
static void GetAllFloorsUsed(void);
|
static void GetAllFloorsUsed(void);
|
||||||
static void ClearVarResult(void);
|
static void GetInEReaderMode(void);
|
||||||
static void IsTrainerHillChallengeActive(void);
|
static void IsTrainerHillChallengeActive(void);
|
||||||
static void ShowTrainerHillPostBattleText(void);
|
static void ShowTrainerHillPostBattleText(void);
|
||||||
static void SetAllTrainerFlags(void);
|
static void SetAllTrainerFlags(void);
|
||||||
@ -202,7 +202,7 @@ static const u16 *const *const sPrizeListSets[] =
|
|||||||
sPrizeLists2
|
sPrizeLists2
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sUnknown_0862A5D4[] = INCBIN_U16("graphics/pokenav/862A5D4.gbapal");
|
static const u16 sEReader_Pal[] = INCBIN_U16("graphics/misc/trainer_hill_ereader.gbapal");
|
||||||
static const u8 sRecordWinColors[] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY};
|
static const u8 sRecordWinColors[] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY};
|
||||||
|
|
||||||
static const struct TrHillTag *const sDataPerTag[] =
|
static const struct TrHillTag *const sDataPerTag[] =
|
||||||
@ -233,7 +233,7 @@ static void (* const sHillFunctions[])(void) =
|
|||||||
[TRAINER_HILL_FUNC_GET_CHALLENGE_STATUS] = TrainerHillGetChallengeStatus,
|
[TRAINER_HILL_FUNC_GET_CHALLENGE_STATUS] = TrainerHillGetChallengeStatus,
|
||||||
[TRAINER_HILL_FUNC_GET_CHALLENGE_TIME] = BufferChallengeTime,
|
[TRAINER_HILL_FUNC_GET_CHALLENGE_TIME] = BufferChallengeTime,
|
||||||
[TRAINER_HILL_FUNC_GET_ALL_FLOORS_USED] = GetAllFloorsUsed,
|
[TRAINER_HILL_FUNC_GET_ALL_FLOORS_USED] = GetAllFloorsUsed,
|
||||||
[TRAINER_HILL_FUNC_CLEAR_RESULT] = ClearVarResult,
|
[TRAINER_HILL_FUNC_GET_IN_EREADER_MODE] = GetInEReaderMode,
|
||||||
[TRAINER_HILL_FUNC_IN_CHALLENGE] = IsTrainerHillChallengeActive,
|
[TRAINER_HILL_FUNC_IN_CHALLENGE] = IsTrainerHillChallengeActive,
|
||||||
[TRAINER_HILL_FUNC_POST_BATTLE_TEXT] = ShowTrainerHillPostBattleText,
|
[TRAINER_HILL_FUNC_POST_BATTLE_TEXT] = ShowTrainerHillPostBattleText,
|
||||||
[TRAINER_HILL_FUNC_SET_ALL_TRAINER_FLAGS] = SetAllTrainerFlags,
|
[TRAINER_HILL_FUNC_SET_ALL_TRAINER_FLAGS] = SetAllTrainerFlags,
|
||||||
@ -546,10 +546,11 @@ static void GetAllFloorsUsed(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// May have been dummied. Every time this is called a conditional for var result occurs afterwards
|
// May have been dummied. Every time this is called a conditional for var result occurs afterwards
|
||||||
static void ClearVarResult(void)
|
// Relation to E-Reader is an assumption, most dummied Trainer Hill code seems to be JP E-Reader mode related
|
||||||
|
static void GetInEReaderMode(void)
|
||||||
{
|
{
|
||||||
SetUpDataStruct();
|
SetUpDataStruct();
|
||||||
gSpecialVar_Result = 0;
|
gSpecialVar_Result = FALSE;
|
||||||
FreeDataStruct();
|
FreeDataStruct();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -997,11 +998,11 @@ static void SetAllTrainerFlags(void)
|
|||||||
gSaveBlock2Ptr->frontier.trainerFlags = 0xFF;
|
gSaveBlock2Ptr->frontier.trainerFlags = 0xFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Palette never loaded, sub_81D6534 always FALSE
|
// Palette never loaded, OnTrainerHillEReaderChallengeFloor always FALSE
|
||||||
void sub_81D64C0(void)
|
void TryLoadTrainerHillEReaderPalette(void)
|
||||||
{
|
{
|
||||||
if (sub_81D6534() == TRUE)
|
if (OnTrainerHillEReaderChallengeFloor() == TRUE)
|
||||||
LoadPalette(sUnknown_0862A5D4, 0x70, 0x20);
|
LoadPalette(sEReader_Pal, 0x70, 0x20);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void GetGameSaved(void)
|
static void GetGameSaved(void)
|
||||||
@ -1020,13 +1021,13 @@ static void ClearGameSaved(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Always FALSE
|
// Always FALSE
|
||||||
bool32 sub_81D6534(void)
|
bool32 OnTrainerHillEReaderChallengeFloor(void)
|
||||||
{
|
{
|
||||||
if (!InTrainerHillChallenge() || GetCurrentTrainerHillMapId() == TRAINER_HILL_ENTRANCE)
|
if (!InTrainerHillChallenge() || GetCurrentTrainerHillMapId() == TRAINER_HILL_ENTRANCE)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
ClearVarResult();
|
GetInEReaderMode();
|
||||||
if (gSpecialVar_Result == 0)
|
if (gSpecialVar_Result == FALSE)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
else
|
else
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -559,7 +559,7 @@ static bool8 PopOutOfAshHiddenTrainer(u8 taskId, struct Task *task, struct Objec
|
|||||||
gFieldEffectArguments[1] = trainerObj->currentCoords.y;
|
gFieldEffectArguments[1] = trainerObj->currentCoords.y;
|
||||||
gFieldEffectArguments[2] = gSprites[trainerObj->spriteId].subpriority - 1;
|
gFieldEffectArguments[2] = gSprites[trainerObj->spriteId].subpriority - 1;
|
||||||
gFieldEffectArguments[3] = 2;
|
gFieldEffectArguments[3] = 2;
|
||||||
task->tOutOfAshSpriteId = FieldEffectStart(FLDEFF_POP_OUT_OF_ASH);
|
task->tOutOfAshSpriteId = FieldEffectStart(FLDEFF_ASH_PUFF);
|
||||||
task->tFuncId++;
|
task->tFuncId++;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -586,7 +586,7 @@ static bool8 JumpInPlaceHiddenTrainer(u8 taskId, struct Task *task, struct Objec
|
|||||||
|
|
||||||
static bool8 WaitRevealHiddenTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj)
|
static bool8 WaitRevealHiddenTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj)
|
||||||
{
|
{
|
||||||
if (!FieldEffectActiveListContains(FLDEFF_POP_OUT_OF_ASH))
|
if (!FieldEffectActiveListContains(FLDEFF_ASH_PUFF))
|
||||||
task->tFuncId = 3;
|
task->tFuncId = 3;
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -610,7 +610,7 @@ static void sub_80B44C8(u8 taskId)
|
|||||||
task->data[7]++;
|
task->data[7]++;
|
||||||
}
|
}
|
||||||
sTrainerSeeFuncList2[task->data[0]](taskId, task, objEvent);
|
sTrainerSeeFuncList2[task->data[0]](taskId, task, objEvent);
|
||||||
if (task->data[0] == 3 && !FieldEffectActiveListContains(FLDEFF_POP_OUT_OF_ASH))
|
if (task->data[0] == 3 && !FieldEffectActiveListContains(FLDEFF_ASH_PUFF))
|
||||||
{
|
{
|
||||||
SetTrainerMovementType(objEvent, GetTrainerFacingDirectionMovementType(objEvent->facingDirection));
|
SetTrainerMovementType(objEvent, GetTrainerFacingDirectionMovementType(objEvent->facingDirection));
|
||||||
TryOverrideTemplateCoordsForObjectEvent(objEvent, GetTrainerFacingDirectionMovementType(objEvent->facingDirection));
|
TryOverrideTemplateCoordsForObjectEvent(objEvent, GetTrainerFacingDirectionMovementType(objEvent->facingDirection));
|
||||||
|