mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Movement etc.
This commit is contained in:
parent
efee40447e
commit
caa83c08a7
@ -269,7 +269,7 @@ MAX_OUTDOOR_SPRITES EQU 23
|
||||
|
||||
const_def
|
||||
const STEP_TYPE_00
|
||||
const STEP_TYPE_STANDING
|
||||
const STEP_TYPE_SLEEP
|
||||
const STEP_TYPE_NPC_WALK
|
||||
const STEP_TYPE_03
|
||||
const STEP_TYPE_04
|
||||
@ -287,7 +287,7 @@ MAX_OUTDOOR_SPRITES EQU 23
|
||||
const STEP_TYPE_GOT_BITE
|
||||
const STEP_TYPE_ROCK_SMASH
|
||||
const STEP_TYPE_RETURN_DIG
|
||||
const STEP_TYPE_13
|
||||
const STEP_TYPE_TRACKING_OBJECT
|
||||
const STEP_TYPE_14
|
||||
const STEP_TYPE_15
|
||||
const STEP_TYPE_16
|
||||
|
@ -1,6 +1,5 @@
|
||||
INCLUDE "includes.asm"
|
||||
|
||||
|
||||
SECTION "Events", ROMX, BANK[EVENTS]
|
||||
|
||||
OverworldLoop:: ; 966b0
|
||||
@ -23,7 +22,6 @@ OverworldLoop:: ; 966b0
|
||||
dw .done
|
||||
; 966cb
|
||||
|
||||
|
||||
DisableEvents: ; 966cb
|
||||
xor a
|
||||
ld [ScriptFlags3], a
|
||||
@ -114,21 +112,16 @@ CheckWildEncountersScriptFlag: ; 9671e
|
||||
ret
|
||||
; 96724
|
||||
|
||||
|
||||
StartMap: ; 96724
|
||||
xor a
|
||||
ld [ScriptVar], a
|
||||
xor a
|
||||
ld [ScriptRunning], a
|
||||
ld hl, MapStatus
|
||||
ld bc, $3e ; 62
|
||||
ld bc, wMapStatusEnd - MapStatus
|
||||
call ByteFill
|
||||
callba InitCallReceiveDelay
|
||||
call ClearJoypad
|
||||
; fallthrough
|
||||
; 9673e
|
||||
|
||||
|
||||
EnterMap: ; 9673e
|
||||
xor a
|
||||
ld [wd453], a
|
||||
@ -157,17 +150,15 @@ EnterMap: ; 9673e
|
||||
ret
|
||||
; 9676d
|
||||
|
||||
|
||||
Function9676d: ; 9676d
|
||||
UnusedWait30Frames: ; 9676d
|
||||
ld c, 30
|
||||
call DelayFrames
|
||||
ret
|
||||
; 96773
|
||||
|
||||
|
||||
HandleMap: ; 96773
|
||||
call ResetOverworldDelay
|
||||
call Function967c1
|
||||
call HandleMapTimeAndJoypad
|
||||
callba HandleCmdQueue ; no need to farcall
|
||||
call MapEvents
|
||||
|
||||
@ -183,7 +174,6 @@ HandleMap: ; 96773
|
||||
ret
|
||||
; 96795
|
||||
|
||||
|
||||
MapEvents: ; 96795
|
||||
ld a, [MapEventStatus]
|
||||
ld hl, .jumps
|
||||
@ -206,7 +196,6 @@ MapEvents: ; 96795
|
||||
ret
|
||||
; 967af
|
||||
|
||||
|
||||
MaxOverworldDelay: ; 967af
|
||||
db 2
|
||||
; 967b0
|
||||
@ -226,7 +215,7 @@ NextOverworldFrame: ; 967b7
|
||||
ret
|
||||
; 967c1
|
||||
|
||||
Function967c1: ; 967c1
|
||||
HandleMapTimeAndJoypad: ; 967c1
|
||||
ld a, [MapEventStatus]
|
||||
cp 1 ; no events
|
||||
ret z
|
||||
@ -281,7 +270,6 @@ Function96812: ; 96812
|
||||
ret
|
||||
; 9681f
|
||||
|
||||
|
||||
PlayerEvents: ; 9681f
|
||||
|
||||
xor a
|
||||
@ -313,7 +301,6 @@ PlayerEvents: ; 9681f
|
||||
xor a
|
||||
ret
|
||||
|
||||
|
||||
.ok
|
||||
push af
|
||||
callba EnableScriptMode
|
||||
@ -335,7 +322,6 @@ PlayerEvents: ; 9681f
|
||||
ret
|
||||
; 96867
|
||||
|
||||
|
||||
CheckTrainerBattle3: ; 96867
|
||||
nop
|
||||
nop
|
||||
@ -351,7 +337,6 @@ CheckTrainerBattle3: ; 96867
|
||||
ret
|
||||
; 96874
|
||||
|
||||
|
||||
CheckTileEvent: ; 96874
|
||||
; Check for warps, tile triggers or wild battles.
|
||||
|
||||
@ -418,7 +403,6 @@ CheckTileEvent: ; 96874
|
||||
ret
|
||||
; 968c7
|
||||
|
||||
|
||||
CheckWildEncounterCooldown:: ; 968c7
|
||||
ld hl, wWildEncounterCooldown
|
||||
ld a, [hl]
|
||||
@ -543,7 +527,6 @@ CheckTimeEvents: ; 9693a
|
||||
ret
|
||||
; 96974
|
||||
|
||||
|
||||
OWPlayerInput: ; 96974
|
||||
|
||||
call PlayerMovement
|
||||
@ -573,7 +556,6 @@ OWPlayerInput: ; 96974
|
||||
ret
|
||||
; 96999
|
||||
|
||||
|
||||
CheckAPressOW: ; 96999
|
||||
ld a, [hJoyPressed]
|
||||
and A_BUTTON
|
||||
@ -588,7 +570,6 @@ CheckAPressOW: ; 96999
|
||||
ret
|
||||
; 969ac
|
||||
|
||||
|
||||
PlayTalkObject: ; 969ac
|
||||
push de
|
||||
ld de, SFX_READ_TEXT_2
|
||||
@ -597,7 +578,6 @@ PlayTalkObject: ; 969ac
|
||||
ret
|
||||
; 969b5
|
||||
|
||||
|
||||
TryObjectEvent: ; 969b5
|
||||
callba CheckFacingObject
|
||||
jr c, .IsObject
|
||||
@ -704,7 +684,6 @@ TryObjectEvent: ; 969b5
|
||||
ret
|
||||
; 96a38
|
||||
|
||||
|
||||
TryReadSign: ; 96a38
|
||||
call CheckFacingSign
|
||||
jr c, .IsSign
|
||||
@ -810,7 +789,6 @@ endr
|
||||
ret
|
||||
; 96ad8
|
||||
|
||||
|
||||
CheckSignFlag: ; 96ad8
|
||||
ld hl, EngineBuffer4
|
||||
ld a, [hli]
|
||||
@ -829,7 +807,6 @@ CheckSignFlag: ; 96ad8
|
||||
ret
|
||||
; 96af0
|
||||
|
||||
|
||||
PlayerMovement: ; 96af0
|
||||
callba DoPlayerMovement
|
||||
ld a, c
|
||||
@ -896,7 +873,6 @@ PlayerMovement: ; 96af0
|
||||
ret
|
||||
; 96b30
|
||||
|
||||
|
||||
CheckMenuOW: ; 96b30
|
||||
xor a
|
||||
ld [hMenuReturn], a
|
||||
@ -928,7 +904,6 @@ CheckMenuOW: ; 96b30
|
||||
ret
|
||||
; 96b58
|
||||
|
||||
|
||||
StartMenuScript: ; 96b58
|
||||
callasm StartMenu
|
||||
jump StartMenuCallback
|
||||
@ -956,7 +931,6 @@ SelectMenuCallback: ; 96b66
|
||||
end
|
||||
; 96b79
|
||||
|
||||
|
||||
CountStep: ; 96b79
|
||||
; Don't count steps in link communication rooms.
|
||||
ld a, [wLinkMode]
|
||||
@ -1024,7 +998,6 @@ CountStep: ; 96b79
|
||||
ret
|
||||
; 96bd3
|
||||
|
||||
|
||||
.unreferenced: ; 96bd3
|
||||
ld a, 7
|
||||
scf
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -193,7 +193,7 @@ Movement_fish_cast_rod: ; 51ab
|
||||
ld [hl], PERSON_ACTION_FISHING
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], STEP_TYPE_STANDING
|
||||
ld [hl], STEP_TYPE_SLEEP
|
||||
ret
|
||||
; 51b8
|
||||
|
||||
@ -219,7 +219,7 @@ Movement_step_end: ; 51c1
|
||||
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], STEP_TYPE_STANDING
|
||||
ld [hl], STEP_TYPE_SLEEP
|
||||
ret
|
||||
; 51db
|
||||
|
||||
@ -248,7 +248,7 @@ Movement_48: ; 51db
|
||||
; 51fd
|
||||
|
||||
Movement_remove_person: ; 51fd
|
||||
call Function4357
|
||||
call DeleteMapObject
|
||||
ld hl, wObjectFollow_Leader
|
||||
ld a, [hMapObjectIndexBuffer]
|
||||
cp [hl]
|
||||
@ -726,7 +726,7 @@ Movement_half_step_right: ; 53fc
|
||||
jr HalfStep
|
||||
|
||||
HalfStep: ; 5400
|
||||
ld hl, OBJECT_29
|
||||
ld hl, OBJECT_29 ; new facing
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
|
||||
@ -741,8 +741,8 @@ HalfStep: ; 5400
|
||||
; 5412
|
||||
|
||||
NormalStep: ; 5412
|
||||
call Function4690
|
||||
call Function463f
|
||||
call InitStep
|
||||
call UpdateTallGrassFlags
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, bc
|
||||
ld [hl], PERSON_ACTION_STEP
|
||||
@ -778,8 +778,8 @@ NormalStep: ; 5412
|
||||
; 5446
|
||||
|
||||
TurningStep: ; 5446
|
||||
call Function4690
|
||||
call Function463f
|
||||
call InitStep
|
||||
call UpdateTallGrassFlags
|
||||
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, bc
|
||||
@ -804,8 +804,8 @@ TurningStep: ; 5446
|
||||
|
||||
|
||||
SlideStep: ; 5468
|
||||
call Function4690
|
||||
call Function463f
|
||||
call InitStep
|
||||
call UpdateTallGrassFlags
|
||||
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, bc
|
||||
@ -830,7 +830,7 @@ SlideStep: ; 5468
|
||||
|
||||
|
||||
JumpStep: ; 548a
|
||||
call Function4690
|
||||
call InitStep
|
||||
ld hl, OBJECT_31
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
|
@ -369,7 +369,7 @@ Function1967:: ; 1967
|
||||
call Function1985
|
||||
pop af
|
||||
call GetObjectStruct
|
||||
callba Function4357
|
||||
callba DeleteMapObject
|
||||
ret
|
||||
; 1985
|
||||
|
||||
@ -435,7 +435,7 @@ Function19b8:: ; 19b8
|
||||
.ok
|
||||
ld a, b
|
||||
call GetObjectStruct
|
||||
callba Function4357
|
||||
callba DeleteMapObject
|
||||
ret
|
||||
; 19e9
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user