Creation of constants for OBJECT_09 indices

This commit is contained in:
PikalaxALT 2015-11-13 18:59:49 -05:00
parent 01fe51df0c
commit cc8c36ee14
12 changed files with 330 additions and 255 deletions

View File

@ -266,3 +266,31 @@ SPRITEMOVEDATA_FIELDS EQU 6
const SPRITEMOVEFN_1B const SPRITEMOVEFN_1B
MAX_OUTDOOR_SPRITES EQU 23 MAX_OUTDOOR_SPRITES EQU 23
const_def
const OBJECT_09_VALUE_00
const OBJECT_09_VALUE_01
const OBJECT_09_VALUE_02
const OBJECT_09_VALUE_03
const OBJECT_09_VALUE_04
const OBJECT_09_VALUE_05
const OBJECT_09_VALUE_06
const OBJECT_09_VALUE_07
const OBJECT_09_VALUE_08
const OBJECT_09_VALUE_09
const OBJECT_09_VALUE_0A
const OBJECT_09_VALUE_0B
const OBJECT_09_VALUE_0C
const OBJECT_09_VALUE_0D
const OBJECT_09_VALUE_0E
const OBJECT_09_VALUE_0F
const OBJECT_09_VALUE_10
const OBJECT_09_VALUE_11
const OBJECT_09_VALUE_12
const OBJECT_09_VALUE_13
const OBJECT_09_VALUE_14
const OBJECT_09_VALUE_15
const OBJECT_09_VALUE_16
const OBJECT_09_VALUE_17
const OBJECT_09_VALUE_18
const OBJECT_09_VALUE_19

View File

@ -24,13 +24,13 @@ OverworldLoop:: ; 966b0
; 966cb ; 966cb
ClearAllScriptFlags3: ; 966cb DisableEvents: ; 966cb
xor a xor a
ld [ScriptFlags3], a ld [ScriptFlags3], a
ret ret
; 966d0 ; 966d0
SetAll_ScriptFlags3:: ; 966d0 EnableEvents:: ; 966d0
ld a, $ff ld a, $ff
ld [ScriptFlags3], a ld [ScriptFlags3], a
ret ret
@ -42,73 +42,73 @@ CheckBit5_ScriptFlags3: ; 966d6
ret ret
; 966dc ; 966dc
ResetBit2_ScriptFlags3: ; 966dc DisableWarpsConnxns: ; 966dc
ld hl, ScriptFlags3 ld hl, ScriptFlags3
res 2, [hl] res 2, [hl]
ret ret
; 966e2 ; 966e2
ResetBit1_ScriptFlags3: ; 966e2 DisableCoordEvents: ; 966e2
ld hl, ScriptFlags3 ld hl, ScriptFlags3
res 1, [hl] res 1, [hl]
ret ret
; 966e8 ; 966e8
ResetBit0_ScriptFlags3: ; 966e8 DisableStepCount: ; 966e8
ld hl, ScriptFlags3 ld hl, ScriptFlags3
res 0, [hl] res 0, [hl]
ret ret
; 966ee ; 966ee
ResetBit4_ScriptFlags3: ; 966ee DisableWildEncounters: ; 966ee
ld hl, ScriptFlags3 ld hl, ScriptFlags3
res 4, [hl] res 4, [hl]
ret ret
; 966f4 ; 966f4
SetBit2_ScriptFlags3: ; 966f4 EnableWarpsConnxns: ; 966f4
ld hl, ScriptFlags3 ld hl, ScriptFlags3
set 2, [hl] set 2, [hl]
ret ret
; 966fa ; 966fa
SetBit1_ScriptFlags3: ; 966fa EnableCoordEvents: ; 966fa
ld hl, ScriptFlags3 ld hl, ScriptFlags3
set 1, [hl] set 1, [hl]
ret ret
; 96700 ; 96700
SetBit0_ScriptFlags3: ; 96700 EnableStepCount: ; 96700
ld hl, ScriptFlags3 ld hl, ScriptFlags3
set 0, [hl] set 0, [hl]
ret ret
; 96706 ; 96706
SetBit4_ScriptFlags3: ; 96706 EnableWildEncounters: ; 96706
ld hl, ScriptFlags3 ld hl, ScriptFlags3
set 4, [hl] set 4, [hl]
ret ret
; 9670c ; 9670c
CheckBit2_ScriptFlags3: ; 9670c CheckWarpConnxnScriptFlag: ; 9670c
ld hl, ScriptFlags3 ld hl, ScriptFlags3
bit 2, [hl] bit 2, [hl]
ret ret
; 96712 ; 96712
CheckBit1_ScriptFlags3: ; 96712 CheckCoordEventScriptFlag: ; 96712
ld hl, ScriptFlags3 ld hl, ScriptFlags3
bit 1, [hl] bit 1, [hl]
ret ret
; 96718 ; 96718
CheckBit0_ScriptFlags3: ; 96718 CheckStepCountScriptFlag: ; 96718
ld hl, ScriptFlags3 ld hl, ScriptFlags3
bit 0, [hl] bit 0, [hl]
ret ret
; 9671e ; 9671e
CheckBit4_ScriptFlags3: ; 9671e CheckWildEncountersScriptFlag: ; 9671e
ld hl, ScriptFlags3 ld hl, ScriptFlags3
bit 4, [hl] bit 4, [hl]
ret ret
@ -135,13 +135,13 @@ EnterMap: ; 9673e
ld [wd454], a ld [wd454], a
call SetUpFiveStepWildEncounterCooldown call SetUpFiveStepWildEncounterCooldown
callba RunMapSetupScript callba RunMapSetupScript
call ClearAllScriptFlags3 call DisableEvents
ld a, [hMapEntryMethod] ld a, [hMapEntryMethod]
cp MAPSETUP_CONNECTION cp MAPSETUP_CONNECTION
jr nz, .dontset jr nz, .dont_enable
call SetAll_ScriptFlags3 call EnableEvents
.dontset .dont_enable
ld a, [hMapEntryMethod] ld a, [hMapEntryMethod]
cp MAPSETUP_RELOADMAP cp MAPSETUP_RELOADMAP
@ -197,7 +197,7 @@ MapEvents: ; 96795
.events ; 967a1 .events ; 967a1
call PlayerEvents call PlayerEvents
call ClearAllScriptFlags3 call DisableEvents
callba ScriptEvents callba ScriptEvents
ret ret
; 967ae ; 967ae
@ -238,7 +238,7 @@ Function967c1: ; 967c1
; 967d1 ; 967d1
Function967d1: ; 967d1 Function967d1: ; 967d1
callba Function576a callba Function576a ; engine/map_objects.asm
callba Functiond497 callba Functiond497
call Function96812 call Function96812
ret ret
@ -259,7 +259,7 @@ Function967f4: ; 967f4
jr z, .noevents jr z, .noevents
bit 4, a bit 4, a
jr nz, .noevents jr nz, .noevents
call SetAll_ScriptFlags3 call EnableEvents
.events .events
ld a, 0 ; events ld a, 0 ; events
@ -355,8 +355,8 @@ CheckTrainerBattle3: ; 96867
CheckTileEvent: ; 96874 CheckTileEvent: ; 96874
; Check for warps, tile triggers or wild battles. ; Check for warps, tile triggers or wild battles.
call CheckBit2_ScriptFlags3 call CheckWarpConnxnScriptFlag
jr z, .bit2 jr z, .connections_disabled
callba CheckMovingOffEdgeOfMap callba CheckMovingOffEdgeOfMap
jr c, .map_connection jr c, .map_connection
@ -364,22 +364,22 @@ CheckTileEvent: ; 96874
call CheckWarpTile call CheckWarpTile
jr c, .warp_tile jr c, .warp_tile
.bit2 .connections_disabled
call CheckBit1_ScriptFlags3 call CheckCoordEventScriptFlag
jr z, .bit1 jr z, .coord_events_disabled
call CheckCurrentMapXYTriggers call CheckCurrentMapXYTriggers
jr c, .movement jr c, .coord_event
.bit1 .coord_events_disabled
call CheckBit0_ScriptFlags3 call CheckStepCountScriptFlag
jr z, .bit0 jr z, .step_count_disabled
call CountStep call CountStep
ret c ret c
.bit0 .step_count_disabled
call CheckBit4_ScriptFlags3 call CheckWildEncountersScriptFlag
jr z, .ok jr z, .ok
call RandomEncounter call RandomEncounter
@ -408,8 +408,8 @@ CheckTileEvent: ; 96874
scf scf
ret ret
.movement .coord_event
ld hl, MovementAnimation ld hl, EngineBuffer5
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -552,7 +552,7 @@ OWPlayerInput: ; 96974
jr nz, .NoAction jr nz, .NoAction
; Can't perform button actions while sliding on ice. ; Can't perform button actions while sliding on ice.
callba Function80404 callba CheckStandingOnIce
jr c, .NoAction jr c, .NoAction
call CheckAPressOW call CheckAPressOW
@ -1077,12 +1077,12 @@ PlayerEventScriptPointers: ; 96c0c
dba SeenByTrainerScript ; 1 dba SeenByTrainerScript ; 1
dba TalkToTrainerScript ; 2 dba TalkToTrainerScript ; 2
dba FindItemInBallScript ; 3 dba FindItemInBallScript ; 3
dba UnknownScript_0x96c4d ; 4 dba EdgeWarpScript ; 4
dba WarpToNewMapScript ; 5 dba WarpToNewMapScript ; 5
dba FallIntoMapScript ; 6 dba FallIntoMapScript ; 6
dba Script_OverworldWhiteout ; 7 dba Script_OverworldWhiteout ; 7
dba HatchEggScript ; 8 dba HatchEggScript ; 8
dba UnknownScript_0x96c4f ; 9 dba ChangeDirectionScript ; 9
dba Invalid_0x96c2d ; 10 dba Invalid_0x96c2d ; 10
; 96c2d ; 96c2d
@ -1124,13 +1124,13 @@ LandAfterPitfallScript: ; 96c4a
end end
; 96c4d ; 96c4d
UnknownScript_0x96c4d: ; 4 EdgeWarpScript: ; 4
reloadandreturn MAPSETUP_CONNECTION reloadandreturn MAPSETUP_CONNECTION
; 96c4f ; 96c4f
UnknownScript_0x96c4f: ; 9 ChangeDirectionScript: ; 9
deactivatefacing $3 deactivatefacing 3
callasm SetBit4_ScriptFlags3 callasm EnableWildEncounters
end end
; 96c56 ; 96c56

View File

@ -156,11 +156,13 @@ Function43f3: ; 43f3
ld a, [hl] ld a, [hl]
and a and a
jr z, .zero jr z, .zero
ld hl, OBJECT_FLAGS2 ld hl, OBJECT_FLAGS2
add hl, bc add hl, bc
bit 5, [hl] bit 5, [hl]
jr nz, .bit5 jr nz, .bit5
cp 1
cp OBJECT_09_VALUE_01
jr z, .one jr z, .one
jr .ok jr .ok
@ -178,7 +180,7 @@ Function43f3: ; 43f3
ld a, [hl] ld a, [hl]
and a and a
ret z ret z
cp 1 cp OBJECT_09_VALUE_01
ret z ret z
.ok .ok
@ -892,6 +894,7 @@ IncrementObjectStructField28: ; 47a2
; 47a8 ; 47a8
JumptoObjectStructField28: ; 47a8 JumptoObjectStructField28: ; 47a8
; anonymous jumptable
ld hl, OBJECT_28 ld hl, OBJECT_28
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
@ -931,7 +934,7 @@ Function47bc: ; 47bc
call Function467b call Function467b
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 1 ld [hl], OBJECT_09_VALUE_01
ret ret
; 47dd ; 47dd
@ -1037,7 +1040,7 @@ Function47dd: ; 47dd
ld [hl], 1 ld [hl], 1
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 5 ld [hl], OBJECT_09_VALUE_05
ret ret
; 487c ; 487c
@ -1121,7 +1124,7 @@ Function47dd: ; 47dd
call Function463f call Function463f
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $f ld [hl], OBJECT_09_VALUE_0F
ret ret
.ok2 .ok2
@ -1223,7 +1226,7 @@ Function47dd: ; 47dd
ld [hl], 9 ld [hl], 9
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 4 ld [hl], OBJECT_09_VALUE_04
ret ret
; 496e ; 496e
@ -1237,7 +1240,7 @@ Function47dd: ; 47dd
ld [hl], 10 ld [hl], 10
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 4 ld [hl], OBJECT_09_VALUE_04
ret ret
; 4984 ; 4984
@ -1274,7 +1277,7 @@ Function47dd: ; 47dd
ld [hl], a ld [hl], a
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 3 ld [hl], OBJECT_09_VALUE_03
call IncrementObjectStructField27 call IncrementObjectStructField27
ret ret
; 49b8 ; 49b8
@ -1351,7 +1354,7 @@ Function47dd: ; 47dd
ld [hl], 0 ld [hl], 0
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $13 ld [hl], OBJECT_09_VALUE_13
ret ret
; 4a21 ; 4a21
@ -1372,7 +1375,7 @@ Function47dd: ; 47dd
ld [hl], 0 ld [hl], 0
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $13 ld [hl], OBJECT_09_VALUE_13
ret ret
; 4a46 ; 4a46
@ -1411,7 +1414,7 @@ endr
ld [hl], e ld [hl], e
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $13 ld [hl], OBJECT_09_VALUE_13
ret ret
; 4a81 ; 4a81
@ -1438,7 +1441,7 @@ endr
ld [hl], a ld [hl], a
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $13 ld [hl], OBJECT_09_VALUE_13
ret ret
; 4aa8 ; 4aa8
@ -1476,7 +1479,7 @@ endr
ld [hl], a ld [hl], a
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $15 ld [hl], OBJECT_09_VALUE_15
ret ret
; 4ade ; 4ade
@ -1512,13 +1515,13 @@ endr
jr z, .load_6 jr z, .load_6
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 7 ld [hl], OBJECT_09_VALUE_07
ret ret
.load_6 .load_6
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 6 ld [hl], OBJECT_09_VALUE_06
ret ret
Function4b17: ; 4b17 Function4b17: ; 4b17
@ -1553,37 +1556,38 @@ Function4b2d: ; 4b2d
ld [hl], 1 ld [hl], 1
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 3 ld [hl], OBJECT_09_VALUE_03
ret ret
; 4b45 ; 4b45
Pointers4b45: ; 4b45 Pointers4b45: ; 4b45
dw Function47bc ; These pointers use OBJECT_09. See constants/sprite_constants.asm
dw Function47dd dw Function47bc ; 00
dw Function4e2b dw Function47dd ; 01
dw Function4ddd dw Function4e2b ; 02
dw Function4e21 dw Function4ddd ; 03
dw Function4e0c dw Function4e21 ; 04
dw Function4e56 dw Function4e0c ; 05
dw Function4e47 dw Function4e56 ; 06
dw Function4b86 dw Function4e47 ; 07
dw Function4bbf dw Function4b86 ; 08
dw Function4e83 dw Function4bbf ; 09
dw Function4dff dw Function4e83 ; 0a
dw Function4c18 dw Function4dff ; 0b
dw Function4c89 dw Function4c18 ; 0c
dw Function4d14 dw Function4c89 ; 0d
dw Function4ecd dw Function4d14 ; 0e
dw Function4d7e dw Function4ecd ; 0f
dw Function4daf dw Function4d7e ; 10
dw Function4dc8 dw Function4daf ; 11
dw Function4f04 dw Function4dc8 ; 12
dw Function4f33 dw Function4f04 ; 13
dw Function4f33 dw Function4f33 ; 14
dw Function4f77 dw Function4f33 ; 15
dw Function4f7a dw Function4f77 ; 16
dw Function4df0 dw Function4f7a ; 17
dw Function4f83 dw Function4df0 ; 18
dw Function4f83 ; 19
; 4b79 ; 4b79
Function4b79: ; 4b79 Function4b79: ; 4b79
@ -1593,7 +1597,7 @@ Function4b79: ; 4b79
ret nz ret nz
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 1 ld [hl], OBJECT_09_VALUE_01
ret ret
; 4b86 ; 4b86
@ -1629,7 +1633,7 @@ Function4ba9: ; 4ba9
call Function4600 call Function4600
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 1 ld [hl], OBJECT_09_VALUE_01
ret ret
; 4bbf ; 4bbf
@ -1686,7 +1690,7 @@ Function4bfd: ; 4bfd
call Function4600 call Function4600
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 1 ld [hl], OBJECT_09_VALUE_01
ret ret
; 4c18 ; 4c18
@ -1762,7 +1766,7 @@ Function4c5d: ; 4c5d
ld [hl], 0 ld [hl], 0
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 1 ld [hl], OBJECT_09_VALUE_01
ret ret
; 4c89 ; 4c89
@ -1861,7 +1865,7 @@ Function4d01: ; 4d01
ld [hl], 0 ld [hl], 0
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 1 ld [hl], OBJECT_09_VALUE_01
ret ret
; 4d14 ; 4d14
@ -1934,7 +1938,7 @@ Function4d6b: ; 4d6b
ld [hl], 0 ld [hl], 0
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 1 ld [hl], OBJECT_09_VALUE_01
ret ret
; 4d7e ; 4d7e
@ -1970,7 +1974,7 @@ Function4d94: ; 4d94
ld [hl], 0 ld [hl], 0
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 1 ld [hl], OBJECT_09_VALUE_01
ret ret
; 4daf ; 4daf
@ -2021,7 +2025,7 @@ Function4ddd: ; 4ddd
ret nz ret nz
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 1 ld [hl], OBJECT_09_VALUE_01
ret ret
; 4df0 ; 4df0
@ -2043,7 +2047,7 @@ Function4dff: ; 4dff
ret nz ret nz
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 1 ld [hl], OBJECT_09_VALUE_01
ret ret
; 4e0c ; 4e0c
@ -2055,7 +2059,7 @@ Function4e0c: ; 4e0c
Function4e13: ; 4e13 Function4e13: ; 4e13
call RestoreDefaultMovement call RestoreDefaultMovement
call Function1a47 call GetInitialFacing
ld hl, OBJECT_FACING ld hl, OBJECT_FACING
add hl, bc add hl, bc
ld [hl], a ld [hl], a
@ -2084,7 +2088,7 @@ Function4e2b: ; 4e2b
ld [hl], STANDING ld [hl], STANDING
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 1 ld [hl], OBJECT_09_VALUE_01
ret ret
; 4e47 ; 4e47
@ -2126,7 +2130,7 @@ Function4e65: ; 4e65
ld [hl], STANDING ld [hl], STANDING
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 1 ld [hl], OBJECT_09_VALUE_01
ret ret
; 4e83 ; 4e83
@ -2183,7 +2187,7 @@ Function4ec0: ; 4ec0
ret nz ret nz
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 1 ld [hl], OBJECT_09_VALUE_01
ret ret
; 4ecd ; 4ecd
@ -2215,7 +2219,7 @@ Function4ecd: ; 4ecd
ld [hl], STANDING ld [hl], STANDING
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 1 ld [hl], OBJECT_09_VALUE_01
ret ret
; 4f04 ; 4f04
@ -2347,7 +2351,7 @@ Function4f99: ; 4f99
ld [hl], 0 ld [hl], 0
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 1 ld [hl], OBJECT_09_VALUE_01
ret ret
; 4fb2 ; 4fb2
@ -2404,7 +2408,7 @@ UpdateJumpPosition: ; 4fd5
; 5000 ; 5000
Function5000: ; unscripted? Function5000: ; unscripted?
; copy [wc3de] to [wc2df] ; copy [wc2de] to [wc2df]
ld a, [wc2de] ld a, [wc2de]
ld hl, wc2df ld hl, wc2df
ld [hl], a ld [hl], a
@ -3188,7 +3192,7 @@ SetFollowerIfVisible: ; 582c
ld [hl], SPRITEMOVEDATA_FOLLOWING ld [hl], SPRITEMOVEDATA_FOLLOWING
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 0 ld [hl], OBJECT_09_VALUE_00
ld a, [hObjectStructIndexBuffer] ld a, [hObjectStructIndexBuffer]
ld [wObjectFollow_Follower], a ld [wObjectFollow_Follower], a
ret ret
@ -3328,7 +3332,7 @@ Function58e3: ; 58e3
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 0 ld [hl], OBJECT_09_VALUE_00
ret ret
; 5903 ; 5903
@ -3347,7 +3351,7 @@ Function5903: ; 5903
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], 0 ld [hl], OBJECT_09_VALUE_00
ret ret
.standing_movefns .standing_movefns

View File

@ -29,7 +29,7 @@ MartDialog: ; 15a61
ld a, 0 ld a, 0
ld [EngineBuffer1], a ld [EngineBuffer1], a
xor a xor a
ld [MovementAnimation], a ld [EngineBuffer5], a
call StandardMart call StandardMart
ret ret
; 15a6e ; 15a6e
@ -129,7 +129,7 @@ LoadMartPointer: ; 15b10
ld bc, 16 ld bc, 16
call ByteFill call ByteFill
xor a xor a
ld [MovementAnimation], a ld [EngineBuffer5], a
ld [wBargainShopFlags], a ld [wBargainShopFlags], a
ld [FacingDirection], a ld [FacingDirection], a
ret ret
@ -157,10 +157,10 @@ endr
StandardMart: ; 15b47 StandardMart: ; 15b47
.loop .loop
ld a, [MovementAnimation] ld a, [EngineBuffer5]
ld hl, .MartFunctions ld hl, .MartFunctions
rst JumpTable rst JumpTable
ld [MovementAnimation], a ld [EngineBuffer5], a
cp $ff cp $ff
jr nz, .loop jr nz, .loop
ret ret

View File

@ -79,7 +79,7 @@ MovementPointers: ; 5075
dw Movement_teleport_to ; 4d dw Movement_teleport_to ; 4d
dw Movement_skyfall ; 4e dw Movement_skyfall ; 4e
dw Movement_step_wait5 ; 4f dw Movement_step_wait5 ; 4f
dw Movement_50 ; 50 dw Movement_step_bump ; 50
dw Movement_fish_got_bite ; 51 dw Movement_fish_got_bite ; 51
dw Movement_fish_cast_rod ; 52 dw Movement_fish_cast_rod ; 52
dw Movement_hide_emote ; 53 dw Movement_hide_emote ; 53
@ -95,28 +95,28 @@ MovementPointers: ; 5075
Movement_teleport_from: ; 5129 Movement_teleport_from: ; 5129
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $c ld [hl], OBJECT_09_VALUE_0C
ret ret
; 5130 ; 5130
Movement_teleport_to: ; 5130 Movement_teleport_to: ; 5130
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $d ld [hl], OBJECT_09_VALUE_0D
ret ret
; 5137 ; 5137
Movement_skyfall: ; 5137 Movement_skyfall: ; 5137
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $e ld [hl], OBJECT_09_VALUE_0E
ret ret
; 513e ; 513e
Movement_59: ; 513e Movement_59: ; 513e
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $19 ld [hl], OBJECT_09_VALUE_19
ret ret
; 5145 ; 5145
@ -136,7 +136,7 @@ Movement_step_wait5: ; 5145
ld [hl], a ld [hl], a
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $3 ld [hl], OBJECT_09_VALUE_03
ld hl, OBJECT_DIRECTION_WALKING ld hl, OBJECT_DIRECTION_WALKING
add hl, bc add hl, bc
ld [hl], STANDING ld [hl], STANDING
@ -159,7 +159,7 @@ Movement_58: ; 516a
ld [hl], STANDING ld [hl], STANDING
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $12 ld [hl], OBJECT_09_VALUE_12
ret ret
; 5189 ; 5189
@ -169,7 +169,7 @@ Movement_fish_got_bite: ; 5189
ld [hl], $6 ld [hl], $6
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $10 ld [hl], OBJECT_09_VALUE_10
ret ret
; 5196 ; 5196
@ -183,7 +183,7 @@ Movement_rock_smash: ; 5196
ld [hl], $1 ld [hl], $1
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $11 ld [hl], OBJECT_09_VALUE_11
ret ret
; 51ab ; 51ab
@ -193,7 +193,7 @@ Movement_fish_cast_rod: ; 51ab
ld [hl], $6 ld [hl], $6
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $1 ld [hl], OBJECT_09_VALUE_01
ret ret
; 51b8 ; 51b8
@ -219,7 +219,7 @@ Movement_step_end: ; 51c1
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $1 ld [hl], OBJECT_09_VALUE_01
ret ret
; 51db ; 51db
@ -240,7 +240,7 @@ Movement_48: ; 51db
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $3 ld [hl], OBJECT_09_VALUE_03
ld hl, VramState ld hl, VramState
res 7, [hl] res 7, [hl]
@ -268,7 +268,7 @@ Movement_4b: ; 5210
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $4 ld [hl], OBJECT_09_VALUE_04
ld hl, VramState ld hl, VramState
res 7, [hl] res 7, [hl]
@ -276,52 +276,52 @@ Movement_4b: ; 5210
; 5222 ; 5222
Movement_step_sleep_1: ; 5222 Movement_step_sleep_1: ; 5222
ld a, $1 ld a, 1
jr Function5247 jr Movement_step_sleep_common
Movement_step_sleep_2: ; 5226 Movement_step_sleep_2: ; 5226
ld a, $2 ld a, 2
jr Function5247 jr Movement_step_sleep_common
Movement_step_sleep_3: ; 522a Movement_step_sleep_3: ; 522a
ld a, $3 ld a, 3
jr Function5247 jr Movement_step_sleep_common
Movement_step_sleep_4: ; 522e Movement_step_sleep_4: ; 522e
ld a, $4 ld a, 4
jr Function5247 jr Movement_step_sleep_common
Movement_step_sleep_5: ; 5232 Movement_step_sleep_5: ; 5232
ld a, $5 ld a, 5
jr Function5247 jr Movement_step_sleep_common
Movement_step_sleep_6: ; 5236 Movement_step_sleep_6: ; 5236
ld a, $6 ld a, 6
jr Function5247 jr Movement_step_sleep_common
Movement_step_sleep_7: ; 523a Movement_step_sleep_7: ; 523a
ld a, $7 ld a, 7
jr Function5247 jr Movement_step_sleep_common
Movement_step_sleep_8: ; 523e Movement_step_sleep_8: ; 523e
ld a, $8 ld a, 8
jr Function5247 jr Movement_step_sleep_common
Movement_step_sleep: ; 5242 Movement_step_sleep: ; 5242
; parameters: ; parameters:
; duration (DecimalParam) ; duration (DecimalParam)
call GetMovementByte call GetMovementByte
jr Function5247 jr Movement_step_sleep_common
Function5247: ; 5247 Movement_step_sleep_common: ; 5247
ld hl, OBJECT_STEP_DURATION ld hl, OBJECT_STEP_DURATION
add hl, bc add hl, bc
ld [hl], a ld [hl], a
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $3 ld [hl], OBJECT_09_VALUE_03
ld hl, OBJECT_11 ld hl, OBJECT_11
add hl, bc add hl, bc
@ -333,14 +333,14 @@ Function5247: ; 5247
ret ret
; 525f ; 525f
Movement_50: ; 525f Movement_step_bump: ; 525f
ld a, $1 ld a, $1
ld hl, OBJECT_STEP_DURATION ld hl, OBJECT_STEP_DURATION
add hl, bc add hl, bc
ld [hl], a ld [hl], a
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $b ld [hl], OBJECT_09_VALUE_0B
ld hl, OBJECT_11 ld hl, OBJECT_11
add hl, bc add hl, bc
ld [hl], $3 ld [hl], $3
@ -357,7 +357,7 @@ Movement_56: ; 5279
ld [hl], a ld [hl], a
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $3 ld [hl], OBJECT_09_VALUE_03
ld hl, OBJECT_11 ld hl, OBJECT_11
add hl, bc add hl, bc
ld [hl], $b ld [hl], $b
@ -726,7 +726,7 @@ HalfStep: ; 5400
ld [hl], $2 ld [hl], $2
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $a ld [hl], OBJECT_09_VALUE_0A
ret ret
; 5412 ; 5412
@ -756,13 +756,13 @@ NormalStep: ; 5412
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $2 ld [hl], OBJECT_09_VALUE_02
ret ret
.asm_543f .asm_543f
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $6 ld [hl], OBJECT_09_VALUE_06
ret ret
; 5446 ; 5446
@ -778,13 +778,13 @@ TurningStep: ; 5446
jr z, .asm_5461 jr z, .asm_5461
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $2 ld [hl], OBJECT_09_VALUE_02
ret ret
.asm_5461 .asm_5461
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $6 ld [hl], OBJECT_09_VALUE_06
ret ret
; 5468 ; 5468
@ -801,13 +801,13 @@ SlideStep: ; 5468
jr z, .asm_5483 jr z, .asm_5483
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $2 ld [hl], OBJECT_09_VALUE_02
ret ret
.asm_5483 .asm_5483
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $6 ld [hl], OBJECT_09_VALUE_06
ret ret
; 548a ; 548a
@ -830,12 +830,12 @@ JumpStep: ; 548a
jr z, .asm_54b1 jr z, .asm_54b1
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $8 ld [hl], OBJECT_09_VALUE_08
ret ret
.asm_54b1 .asm_54b1
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, bc add hl, bc
ld [hl], $9 ld [hl], OBJECT_09_VALUE_09
ret ret
; 54b8 ; 54b8

View File

@ -2987,12 +2987,12 @@ Script_warpcheck: ; 0x97af6
call WarpCheck call WarpCheck
ret nc ret nc
callba SetAll_ScriptFlags3 callba EnableEvents
ret ret
; 0x97b01 ; 0x97b01
Function97b01: ; 0x97b01 Script_enableevents: ; unreferenced
callba SetAll_ScriptFlags3 callba EnableEvents
ret ret
; 0x97b08 ; 0x97b08

View File

@ -75,7 +75,7 @@ Function8cf7a: ; 8cf7a
; 8cfa8 ; 8cfa8
Function8cfa8: ; 8cfa8 (23:4fa8) Function8cfa8: ; 8cfa8 (23:4fa8)
ld hl, wc314 ld hl, wSpriteAnimationStructs
ld e, 10 ld e, 10
.loop .loop

View File

@ -508,7 +508,7 @@ endr
ret ret
; 1a47 ; 1a47
Function1a47:: ; 1a47 GetInitialFacing:: ; 1a47
push bc push bc
push de push de
ld e, a ld e, a

View File

@ -388,7 +388,10 @@ step_wait5: macro
db movement_step_wait5 ; $4f db movement_step_wait5 ; $4f
endm endm
__enum__ = $51 enum movement_step_bump
step_bump: macro
db movement_step_bump ; $50
endm
enum movement_fish_got_bite enum movement_fish_got_bite
fish_got_bite: macro fish_got_bite: macro

149
main.asm
View File

@ -2369,7 +2369,7 @@ CheckFacingObject:: ; 6fd9
ld bc, ObjectStructs ; redundant ld bc, ObjectStructs ; redundant
ld a, 0 ld a, 0
ld [hMapObjectIndexBuffer], a ld [hMapObjectIndexBuffer], a
call Function7041 call IsNPCAtCoord
ret nc ret nc
ld hl, OBJECT_DIRECTION_WALKING ld hl, OBJECT_DIRECTION_WALKING
add hl, bc add hl, bc
@ -2392,14 +2392,14 @@ Function7009: ; 7009
ld hl, OBJECT_MAP_Y ld hl, OBJECT_MAP_Y
add hl, bc add hl, bc
ld e, [hl] ld e, [hl]
jr Function7041 jr IsNPCAtCoord
; 7015 ; 7015
Function7015: ; unreferenced Function7015: ; unreferenced
ld a, [hMapObjectIndexBuffer] ld a, [hMapObjectIndexBuffer]
call GetObjectStruct call GetObjectStruct
call Function7021 call Function7021
call Function7041 call IsNPCAtCoord
ret ret
Function7021: ; 7021 Function7021: ; 7021
@ -2432,21 +2432,24 @@ Function7021: ; 7021
ret ret
; 7041 ; 7041
Function7041: ; 7041 IsNPCAtCoord: ; 7041
ld bc, ObjectStructs ld bc, ObjectStructs
xor a xor a
.loop .loop
ld [hObjectStructIndexBuffer], a ld [hObjectStructIndexBuffer], a
call GetObjectSprite call GetObjectSprite
jr z, .next jr z, .next
ld hl, OBJECT_FLAGS1 ld hl, OBJECT_FLAGS1
add hl, bc add hl, bc
bit 7, [hl] bit 7, [hl]
jr nz, .next jr nz, .next
ld hl, OBJECT_PALETTE ld hl, OBJECT_PALETTE
add hl, bc add hl, bc
bit 7, [hl] bit 7, [hl]
jr z, .got jr z, .got
call Function7171 call Function7171
jr nc, .ok jr nc, .ok
jr .ok2 jr .ok2
@ -3631,7 +3634,7 @@ Function8286: ; 8286
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, de add hl, de
ld [hl], $0 ld [hl], OBJECT_09_VALUE_00
ld hl, OBJECT_FACING_STEP ld hl, OBJECT_FACING_STEP
add hl, de add hl, de
@ -3882,7 +3885,7 @@ FollowNotExact:: ; 839e
ld [hl], SPRITEMOVEDATA_FOLLOWNOTEXACT ld [hl], SPRITEMOVEDATA_FOLLOWNOTEXACT
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, de add hl, de
ld [hl], $0 ld [hl], OBJECT_09_VALUE_00
ret ret
; 8417 ; 8417
@ -33993,7 +33996,7 @@ SECTION "bank20", ROMX, BANK[$20]
DoPlayerMovement:: ; 80000 DoPlayerMovement:: ; 80000
call GetMovementInput call GetMovementInput
ld a, $3e ; standing ld a, movement_step_sleep_1
ld [MovementAnimation], a ld [MovementAnimation], a
xor a xor a
ld [wd041], a ld [wd041], a
@ -34039,7 +34042,7 @@ GetPlayerMovement: ; 8002d
cp PLAYER_BIKE cp PLAYER_BIKE
jr z, .Normal jr z, .Normal
cp PLAYER_SLIP cp PLAYER_SLIP
jr z, .Board jr z, .Ice
.Normal .Normal
call CheckForcedMovementInput call CheckForcedMovementInput
@ -34067,7 +34070,7 @@ GetPlayerMovement: ; 8002d
ret c ret c
jr .NotMoving jr .NotMoving
.Board .Ice
call CheckForcedMovementInput call CheckForcedMovementInput
call GetMovementAction call GetMovementAction
call CheckTileMovement call CheckTileMovement
@ -34095,7 +34098,7 @@ GetPlayerMovement: ; 8002d
jr z, .Standing jr z, .Standing
; Walking into an edge warp won't bump. ; Walking into an edge warp won't bump.
ld a, [wd041] ld a, [EngineBuffer4]
and a and a
jr nz, .CantMove jr nz, .CantMove
call PlayBump call PlayBump
@ -34268,13 +34271,13 @@ TryStep: ; 8016b
jr z, TrySurfStep jr z, TrySurfStep
call CheckLandPermissions call CheckLandPermissions
jr c, .asm_801be jr c, .bump
call IsNPCInFront call IsNPCInFront
and a and a
jr z, .asm_801be jr z, .bump
cp 2 cp 2
jr z, .asm_801be jr z, .bump
ld a, [PlayerStandingTile] ld a, [PlayerStandingTile]
call CheckIceTile call CheckIceTile
@ -34282,7 +34285,7 @@ TryStep: ; 8016b
; Downhill riding is slower when not moving down. ; Downhill riding is slower when not moving down.
call CheckRiding call CheckRiding
jr nz, .asm_801ae jr nz, .walk
ld hl, BikeFlags ld hl, BikeFlags
bit 2, [hl] ; downhill bit 2, [hl] ; downhill
@ -34303,7 +34306,7 @@ TryStep: ; 8016b
scf scf
ret ret
.asm_801ae .walk
ld a, STEP_WALK ld a, STEP_WALK
call DoStep call DoStep
scf scf
@ -34319,7 +34322,7 @@ TryStep: ; 8016b
xor a xor a
ret ret
.asm_801be .bump
xor a xor a
ret ret
; 801c0 ; 801c0
@ -34417,13 +34420,13 @@ CheckEdgeWarp: ; 80226
add hl, de add hl, de
ld a, [PlayerStandingTile] ld a, [PlayerStandingTile]
cp [hl] cp [hl]
jr nz, .asm_80259 jr nz, .nope
ld a, 1 ld a, 1
ld [wd041], a ld [wd041], a
ld a, [WalkingDirection] ld a, [WalkingDirection]
cp STANDING cp STANDING
jr z, .asm_80259 jr z, .nope
ld e, a ld e, a
ld a, [PlayerDirection] ld a, [PlayerDirection]
@ -34431,16 +34434,16 @@ CheckEdgeWarp: ; 80226
rrca rrca
and 3 and 3
cp e cp e
jr nz, .asm_80259 jr nz, .nope
call WarpCheck ; CheckFallPit? call WarpCheck
jr nc, .asm_80259 jr nc, .nope
call StandInPlace call StandInPlace
scf scf
ld a, 1 ld a, 1
ret ret
.asm_80259 .nope
xor a xor a
ret ret
@ -34488,28 +34491,52 @@ endr
dw .WalkInPlace dw .WalkInPlace
.Slow .Slow
db $08, $09, $0a, $0b slow_step_down
slow_step_up
slow_step_left
slow_step_right
.Walk .Walk
db $0c, $0d, $0e, $0f step_down
step_up
step_left
step_right
.Bike .Bike
db $10, $11, $12, $13 big_step_down
big_step_up
big_step_left
big_step_right
.Ledge .Ledge
db $30, $31, $32, $33 jump_step_down
jump_step_up
jump_step_left
jump_step_right
.Ice .Ice
db $1c, $1d, $1e, $1f fast_slide_step_down
fast_slide_step_up
fast_slide_step_left
fast_slide_step_right
.BackwardsLedge .BackwardsLedge
db $31, $30, $33, $32 jump_step_up
jump_step_down
jump_step_right
jump_step_left
.Turn .Turn
db $04, $05, $06, $07 half_step_down
half_step_up
half_step_left
half_step_right
.WalkInPlace .WalkInPlace
db $80, $81, $82, $83 db $80 + movement_turn_head_down
db $80 + movement_turn_head_up
db $80 + movement_turn_head_left
db $80 + movement_turn_head_right
; 802b3 ; 802b3
StandInPlace: ; 802b3 StandInPlace: ; 802b3
ld a, 0 ld a, 0
ld [wd04e], a ld [wd04e], a
ld a, $3e ; standing ld a, movement_step_sleep_1
ld [MovementAnimation], a ld [MovementAnimation], a
xor a xor a
ret ret
@ -34519,7 +34546,7 @@ StandInPlace: ; 802b3
WalkInPlace: ; 802bf WalkInPlace: ; 802bf
ld a, 0 ld a, 0
ld [wd04e], a ld [wd04e], a
ld a, $50 ; walking ld a, movement_step_bump
ld [MovementAnimation], a ld [MovementAnimation], a
xor a xor a
ret ret
@ -34529,7 +34556,7 @@ WalkInPlace: ; 802bf
CheckForcedMovementInput: ; 802cb CheckForcedMovementInput: ; 802cb
; When sliding on ice, input is forced to remain in the same direction. ; When sliding on ice, input is forced to remain in the same direction.
call Function80404 call CheckStandingOnIce
ret nc ret nc
ld a, [wd04e] ld a, [wd04e]
@ -34542,7 +34569,7 @@ CheckForcedMovementInput: ; 802cb
ld hl, .data_802e8 ld hl, .data_802e8
add hl, de add hl, de
ld a, [CurInput] ld a, [CurInput]
and A_BUTTON | B_BUTTON | SELECT | START and BUTTONS
or [hl] or [hl]
ld [CurInput], a ld [CurInput], a
ret ret
@ -34613,33 +34640,39 @@ GetMovementAction: ; 802ec
IsNPCInFront: ; 80341 IsNPCInFront: ; 80341
; Returns 0 if there is an NPC in front that you can't move
; Returns 1 if there is no NPC in front
; Returns 2 if there is a movable NPC in front
ld a, 0 ld a, 0
ld [hMapObjectIndexBuffer], a ld [hMapObjectIndexBuffer], a
; Load the next X coordinate into d
ld a, [PlayerMapX] ld a, [PlayerMapX]
ld d, a ld d, a
ld a, [WalkingX] ld a, [WalkingX]
add d add d
ld d, a ld d, a
; Load the next Y coordinate into e
ld a, [PlayerMapY] ld a, [PlayerMapY]
ld e, a ld e, a
ld a, [WalkingY] ld a, [WalkingY]
add e add e
ld e, a ld e, a
; Find an object struct with coordinates equal to d,e
ld bc, ObjectStructs ; redundant ld bc, ObjectStructs ; redundant
callba Function7041 callba IsNPCAtCoord
jr nc, .asm_80369 jr nc, .nope
call Function8036f call Function8036f
jr c, .asm_8036c jr c, .no_bump
; .bump
xor a xor a
ret ret
.asm_80369 .nope
ld a, 1 ld a, 1
ret ret
.asm_8036c .no_bump
ld a, 2 ld a, 2
ret ret
; 8036f ; 8036f
@ -34648,27 +34681,27 @@ IsNPCInFront: ; 80341
Function8036f: ; 8036f Function8036f: ; 8036f
ld hl, BikeFlags ld hl, BikeFlags
bit 0, [hl] bit 0, [hl] ; using strength
jr z, .asm_8039c jr z, .nope
ld hl, $7 ld hl, OBJECT_DIRECTION_WALKING
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
cp $ff cp STANDING
jr nz, .asm_8039c jr nz, .nope
ld hl, $6 ld hl, OBJECT_PALETTE
add hl, bc add hl, bc
bit 6, [hl] bit 6, [hl]
jr z, .asm_8039c jr z, .nope
ld hl, $5 ld hl, OBJECT_FLAGS2
add hl, bc add hl, bc
set 2, [hl] set 2, [hl]
ld a, [WalkingDirection] ld a, [WalkingDirection]
ld d, a ld d, a
ld hl, $20 ld hl, OBJECT_32
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and $fc and $fc
@ -34678,7 +34711,7 @@ Function8036f: ; 8036f
scf scf
ret ret
.asm_8039c .nope
xor a xor a
ret ret
; 8039e ; 8039e
@ -34799,24 +34832,24 @@ WaterToLandSprite: ; 803f9
; 80404 ; 80404
Function80404:: ; 80404 CheckStandingOnIce:: ; 80404
ld a, [wd04e] ld a, [wd04e]
cp 0 cp 0
jr z, .asm_80420 jr z, .nope
cp $f0 cp $f0
jr z, .asm_80420 jr z, .nope
ld a, [PlayerStandingTile] ld a, [PlayerStandingTile]
call CheckIceTile call CheckIceTile
jr nc, .asm_8041e jr nc, .yep
ld a, [PlayerState] ld a, [PlayerState]
cp PLAYER_SLIP cp PLAYER_SLIP
jr nz, .asm_80420 jr nz, .nope
.asm_8041e .yep
scf scf
ret ret
.asm_80420 .nope
and a and a
ret ret
; 80422 ; 80422
@ -34824,7 +34857,7 @@ Function80404:: ; 80404
Function80422:: ; 80422 Function80422:: ; 80422
ld hl, wc2de ld hl, wc2de
ld a, $3e ; standing ld a, movement_step_sleep_1
cp [hl] cp [hl]
ret z ret z
ld [hl], a ld [hl], a

View File

@ -1960,7 +1960,7 @@ Function171ccd: ; 171ccd (5c:5ccd)
ld de, wMapPals ld de, wMapPals
ld bc, $40 ld bc, $40
call CopyBytes call CopyBytes
ld hl, MovementAnimation ld hl, EngineBuffer5
ld a, $ff ld a, $ff
ld [hli], a ld [hli], a
ld a, $7f ld a, $7f

View File

@ -319,7 +319,8 @@ ScriptVar:: ; c2dd
ds 1 ds 1
wc2de:: ds 1 wc2de:: ds 1
wc2df:: ds 3 wc2df:: ds 1
ds 2
wMovementPerson:: ds 1 wMovementPerson:: ds 1
wMovementDataPointer:: ds 3 ; dba wMovementDataPointer:: ds 3 ; dba
wc2e6:: ds 4 wc2e6:: ds 4
@ -1568,6 +1569,7 @@ wTempTrainerEventFlagLo::
wTempTrainerEventFlagHi:: wTempTrainerEventFlagHi::
MovementAnimation:: ; d042 MovementAnimation:: ; d042
EngineBuffer5::
ds 1 ds 1
wTempTrainerClass:: wTempTrainerClass::
@ -2089,6 +2091,11 @@ ScriptFlags:: ; d434
ScriptFlags2:: ; d435 ScriptFlags2:: ; d435
ds 1 ds 1
ScriptFlags3:: ; d436 ScriptFlags3:: ; d436
; bit 0: count steps
; bit 1: xy triggers
; bit 2: warps and connections
; bit 4: wild encounters
; bit 5: unknown
ds 1 ds 1
ScriptMode:: ; d437 ScriptMode:: ; d437
@ -2198,7 +2205,7 @@ wd4d0:: ds 1
wd4d1:: ds 1 wd4d1:: ds 1
ds 4 ds 4
ObjectStructs:: ObjectStructs:: ; d4d6
object_struct: MACRO object_struct: MACRO
\1Struct:: \1Struct::
\1Sprite:: ds 1 \1Sprite:: ds 1