mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
More map object, swap StandingTile and NextTile
This commit is contained in:
parent
ed44de4bb4
commit
b921226aea
@ -527,13 +527,13 @@ const_value SET 1
|
|||||||
const OBJECT_PALETTE
|
const OBJECT_PALETTE
|
||||||
const OBJECT_DIRECTION_WALKING
|
const OBJECT_DIRECTION_WALKING
|
||||||
const OBJECT_FACING
|
const OBJECT_FACING
|
||||||
const OBJECT_09
|
const OBJECT_STEP_TYPE
|
||||||
const OBJECT_STEP_DURATION
|
const OBJECT_STEP_DURATION
|
||||||
const OBJECT_ACTION
|
const OBJECT_ACTION
|
||||||
const OBJECT_12
|
const OBJECT_12
|
||||||
const OBJECT_FACING_STEP
|
const OBJECT_FACING_STEP
|
||||||
const OBJECT_STANDING_TILE
|
|
||||||
const OBJECT_NEXT_TILE
|
const OBJECT_NEXT_TILE
|
||||||
|
const OBJECT_STANDING_TILE
|
||||||
const OBJECT_NEXT_MAP_X
|
const OBJECT_NEXT_MAP_X
|
||||||
const OBJECT_NEXT_MAP_Y
|
const OBJECT_NEXT_MAP_Y
|
||||||
const OBJECT_MAP_X
|
const OBJECT_MAP_X
|
||||||
@ -590,9 +590,9 @@ OW_RIGHT EQU RIGHT << 2
|
|||||||
const EMOTE_BOLT ; 5
|
const EMOTE_BOLT ; 5
|
||||||
const EMOTE_SLEEP ; 6
|
const EMOTE_SLEEP ; 6
|
||||||
const EMOTE_FISH ; 7
|
const EMOTE_FISH ; 7
|
||||||
const EMOTE_08 ; 8
|
const EMOTE_SHADOW ; 8
|
||||||
const EMOTE_09 ; 9
|
const EMOTE_ROD ; 9
|
||||||
const EMOTE_0A ; 10
|
const EMOTE_BOULDER_DUST ; 10
|
||||||
const EMOTE_0B ; 11
|
const EMOTE_0B ; 11
|
||||||
EMOTE_MEM EQU -1
|
EMOTE_MEM EQU -1
|
||||||
|
|
||||||
|
@ -268,29 +268,48 @@ SPRITEMOVEDATA_FIELDS EQU 6
|
|||||||
MAX_OUTDOOR_SPRITES EQU 23
|
MAX_OUTDOOR_SPRITES EQU 23
|
||||||
|
|
||||||
const_def
|
const_def
|
||||||
const OBJECT_09_VALUE_00
|
const STEP_TYPE_00
|
||||||
const OBJECT_09_VALUE_01 ; standing
|
const STEP_TYPE_01 ; standing
|
||||||
const OBJECT_09_VALUE_02 ; walking
|
const STEP_TYPE_02 ; walking
|
||||||
const OBJECT_09_VALUE_03 ; bumping
|
const STEP_TYPE_03 ; bumping
|
||||||
const OBJECT_09_VALUE_04
|
const STEP_TYPE_04
|
||||||
const OBJECT_09_VALUE_05
|
const STEP_TYPE_05
|
||||||
const OBJECT_09_VALUE_06
|
const STEP_TYPE_06
|
||||||
const OBJECT_09_VALUE_07
|
const STEP_TYPE_07
|
||||||
const OBJECT_09_VALUE_08
|
const STEP_TYPE_08
|
||||||
const OBJECT_09_VALUE_09
|
const STEP_TYPE_09
|
||||||
const OBJECT_09_VALUE_0A
|
const STEP_TYPE_0A
|
||||||
const OBJECT_09_VALUE_0B
|
const STEP_TYPE_0B
|
||||||
const OBJECT_09_VALUE_0C
|
const STEP_TYPE_0C
|
||||||
const OBJECT_09_VALUE_0D
|
const STEP_TYPE_0D
|
||||||
const OBJECT_09_VALUE_0E
|
const STEP_TYPE_0E
|
||||||
const OBJECT_09_VALUE_0F
|
const STEP_TYPE_0F
|
||||||
const OBJECT_09_VALUE_10
|
const STEP_TYPE_10
|
||||||
const OBJECT_09_VALUE_11
|
const STEP_TYPE_11
|
||||||
const OBJECT_09_VALUE_12
|
const STEP_TYPE_12
|
||||||
const OBJECT_09_VALUE_13
|
const STEP_TYPE_13
|
||||||
const OBJECT_09_VALUE_14
|
const STEP_TYPE_14
|
||||||
const OBJECT_09_VALUE_15
|
const STEP_TYPE_15
|
||||||
const OBJECT_09_VALUE_16
|
const STEP_TYPE_16
|
||||||
const OBJECT_09_VALUE_17
|
const STEP_TYPE_17
|
||||||
const OBJECT_09_VALUE_18
|
const STEP_TYPE_18
|
||||||
const OBJECT_09_VALUE_19
|
const STEP_TYPE_19
|
||||||
|
|
||||||
|
const_def
|
||||||
|
const PERSON_ACTION_00
|
||||||
|
const PERSON_ACTION_01
|
||||||
|
const PERSON_ACTION_02
|
||||||
|
const PERSON_ACTION_03
|
||||||
|
const PERSON_ACTION_04
|
||||||
|
const PERSON_ACTION_05
|
||||||
|
const PERSON_ACTION_06
|
||||||
|
const PERSON_ACTION_07
|
||||||
|
const PERSON_ACTION_08
|
||||||
|
const PERSON_ACTION_09
|
||||||
|
const PERSON_ACTION_0A
|
||||||
|
const PERSON_ACTION_0B
|
||||||
|
const PERSON_ACTION_0C
|
||||||
|
const PERSON_ACTION_0D
|
||||||
|
const PERSON_ACTION_0E
|
||||||
|
const PERSON_ACTION_0F
|
||||||
|
const PERSON_ACTION_10
|
||||||
|
@ -252,7 +252,7 @@ Function967e1: ; 967e1
|
|||||||
; 967f4
|
; 967f4
|
||||||
|
|
||||||
Function967f4: ; 967f4
|
Function967f4: ; 967f4
|
||||||
ld a, [wd150]
|
ld a, [wPlayerStepFlags]
|
||||||
bit 5, a
|
bit 5, a
|
||||||
jr z, .events
|
jr z, .events
|
||||||
bit 6, a
|
bit 6, a
|
||||||
@ -273,7 +273,7 @@ Function967f4: ; 967f4
|
|||||||
; 96812
|
; 96812
|
||||||
|
|
||||||
Function96812: ; 96812
|
Function96812: ; 96812
|
||||||
ld hl, wd150
|
ld hl, wPlayerStepFlags
|
||||||
bit 6, [hl]
|
bit 6, [hl]
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
@ -396,7 +396,7 @@ CheckTileEvent: ; 96874
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.warp_tile
|
.warp_tile
|
||||||
ld a, [PlayerStandingTile]
|
ld a, [PlayerNextTile]
|
||||||
call CheckPitTile
|
call CheckPitTile
|
||||||
jr nz, .not_pit
|
jr nz, .not_pit
|
||||||
ld a, PLAYEREVENT_FALL
|
ld a, PLAYEREVENT_FALL
|
||||||
|
@ -161,7 +161,7 @@ CanUseSweetScent:: ; 97cfd
|
|||||||
jr nc, .no
|
jr nc, .no
|
||||||
|
|
||||||
.ice_check
|
.ice_check
|
||||||
ld a, [PlayerStandingTile]
|
ld a, [PlayerNextTile]
|
||||||
call CheckIceTile
|
call CheckIceTile
|
||||||
jr z, .no
|
jr z, .no
|
||||||
scf
|
scf
|
||||||
@ -235,7 +235,7 @@ ChooseWildEncounter_BugContest:: ; 97d31
|
|||||||
; 97d64
|
; 97d64
|
||||||
|
|
||||||
TryWildEncounter_BugContest: ; 97d64
|
TryWildEncounter_BugContest: ; 97d64
|
||||||
ld a, [PlayerStandingTile]
|
ld a, [PlayerNextTile]
|
||||||
call CheckSuperTallGrassTile
|
call CheckSuperTallGrassTile
|
||||||
ld b, 40 percent
|
ld b, 40 percent
|
||||||
jr z, .ok
|
jr z, .ok
|
||||||
|
@ -50,7 +50,7 @@ BEHIND_BG EQU 1 << OAM_PRIORITY
|
|||||||
Facing00:
|
Facing00:
|
||||||
Facing02:
|
Facing02:
|
||||||
Facing24:
|
Facing24:
|
||||||
Facing26: ; 408b
|
Facing26: ; standing down
|
||||||
db 4 ; #
|
db 4 ; #
|
||||||
db 0, 0, 0, $00
|
db 0, 0, 0, $00
|
||||||
db 0, 8, 0, $01
|
db 0, 8, 0, $01
|
||||||
@ -58,7 +58,7 @@ Facing26: ; 408b
|
|||||||
db 8, 8, 2, $03
|
db 8, 8, 2, $03
|
||||||
; 409c
|
; 409c
|
||||||
|
|
||||||
Facing01: ; 409c
|
Facing01: ; walking down 1
|
||||||
db 4 ; #
|
db 4 ; #
|
||||||
db 0, 0, 0, $80
|
db 0, 0, 0, $80
|
||||||
db 0, 8, 0, $81
|
db 0, 8, 0, $81
|
||||||
@ -66,7 +66,7 @@ Facing01: ; 409c
|
|||||||
db 8, 8, 2, $83
|
db 8, 8, 2, $83
|
||||||
; 40ad
|
; 40ad
|
||||||
|
|
||||||
Facing03: ; 40ad
|
Facing03: ; walking down 2
|
||||||
db 4 ; #
|
db 4 ; #
|
||||||
db 0, 8, X_FLIP, $80
|
db 0, 8, X_FLIP, $80
|
||||||
db 0, 0, X_FLIP, $81
|
db 0, 0, X_FLIP, $81
|
||||||
@ -75,7 +75,7 @@ Facing03: ; 40ad
|
|||||||
; 40be
|
; 40be
|
||||||
|
|
||||||
Facing04:
|
Facing04:
|
||||||
Facing06: ; 40be
|
Facing06: ; standing up
|
||||||
db 4 ; #
|
db 4 ; #
|
||||||
db 0, 0, 0, $04
|
db 0, 0, 0, $04
|
||||||
db 0, 8, 0, $05
|
db 0, 8, 0, $05
|
||||||
@ -83,7 +83,7 @@ Facing06: ; 40be
|
|||||||
db 8, 8, 2, $07
|
db 8, 8, 2, $07
|
||||||
; 40cf
|
; 40cf
|
||||||
|
|
||||||
Facing05: ; 40cf
|
Facing05: ; walking up 1
|
||||||
db 4 ; #
|
db 4 ; #
|
||||||
db 0, 0, 0, $84
|
db 0, 0, 0, $84
|
||||||
db 0, 8, 0, $85
|
db 0, 8, 0, $85
|
||||||
@ -91,7 +91,7 @@ Facing05: ; 40cf
|
|||||||
db 8, 8, 2, $87
|
db 8, 8, 2, $87
|
||||||
; 40e0
|
; 40e0
|
||||||
|
|
||||||
Facing07: ; 40e0
|
Facing07: ; walking up 2
|
||||||
db 4 ; #
|
db 4 ; #
|
||||||
db 0, 8, X_FLIP, $84
|
db 0, 8, X_FLIP, $84
|
||||||
db 0, 0, X_FLIP, $85
|
db 0, 0, X_FLIP, $85
|
||||||
@ -100,7 +100,7 @@ Facing07: ; 40e0
|
|||||||
; 40f1
|
; 40f1
|
||||||
|
|
||||||
Facing08:
|
Facing08:
|
||||||
Facing10: ; 40f1
|
Facing10: ; standing left
|
||||||
db 4 ; #
|
db 4 ; #
|
||||||
db 0, 0, 0, $08
|
db 0, 0, 0, $08
|
||||||
db 0, 8, 0, $09
|
db 0, 8, 0, $09
|
||||||
@ -109,7 +109,7 @@ Facing10: ; 40f1
|
|||||||
; 4102
|
; 4102
|
||||||
|
|
||||||
Facing12:
|
Facing12:
|
||||||
Facing14: ; 4102
|
Facing14: ; standing right
|
||||||
db 4 ; #
|
db 4 ; #
|
||||||
db 0, 8, X_FLIP, $08
|
db 0, 8, X_FLIP, $08
|
||||||
db 0, 0, X_FLIP, $09
|
db 0, 0, X_FLIP, $09
|
||||||
@ -118,7 +118,7 @@ Facing14: ; 4102
|
|||||||
; 4113
|
; 4113
|
||||||
|
|
||||||
Facing09:
|
Facing09:
|
||||||
Facing11: ; 4113
|
Facing11: ; walking left
|
||||||
db 4 ; #
|
db 4 ; #
|
||||||
db 0, 0, 0, $88
|
db 0, 0, 0, $88
|
||||||
db 0, 8, 0, $89
|
db 0, 8, 0, $89
|
||||||
@ -127,7 +127,7 @@ Facing11: ; 4113
|
|||||||
; 4124
|
; 4124
|
||||||
|
|
||||||
Facing13:
|
Facing13:
|
||||||
Facing15: ; 4124
|
Facing15: ; walking right
|
||||||
db 4 ; #
|
db 4 ; #
|
||||||
db 0, 8, X_FLIP, $88
|
db 0, 8, X_FLIP, $88
|
||||||
db 0, 0, X_FLIP, $89
|
db 0, 0, X_FLIP, $89
|
||||||
@ -135,7 +135,7 @@ Facing15: ; 4124
|
|||||||
db 8, 0, 2 | X_FLIP, $8b
|
db 8, 0, 2 | X_FLIP, $8b
|
||||||
; 4135
|
; 4135
|
||||||
|
|
||||||
Facing16: ; 4135
|
Facing16: ; fishing down
|
||||||
db 5 ; #
|
db 5 ; #
|
||||||
db 0, 0, 0, $00
|
db 0, 0, 0, $00
|
||||||
db 0, 8, 0, $01
|
db 0, 8, 0, $01
|
||||||
@ -144,7 +144,7 @@ Facing16: ; 4135
|
|||||||
db 16, 0, 4, $fc
|
db 16, 0, 4, $fc
|
||||||
; 414a
|
; 414a
|
||||||
|
|
||||||
Facing17: ; 414a
|
Facing17: ; fishing up
|
||||||
db 5 ; #
|
db 5 ; #
|
||||||
db 0, 0, 0, $04
|
db 0, 0, 0, $04
|
||||||
db 0, 8, 0, $05
|
db 0, 8, 0, $05
|
||||||
@ -153,7 +153,7 @@ Facing17: ; 414a
|
|||||||
db -8, 0, 4, $fc
|
db -8, 0, 4, $fc
|
||||||
; 415f
|
; 415f
|
||||||
|
|
||||||
Facing18: ; 415f
|
Facing18: ; fishing left
|
||||||
db 5 ; #
|
db 5 ; #
|
||||||
db 0, 0, 0, $08
|
db 0, 0, 0, $08
|
||||||
db 0, 8, 0, $09
|
db 0, 8, 0, $09
|
||||||
@ -162,7 +162,7 @@ Facing18: ; 415f
|
|||||||
db 5, -8, 4 | X_FLIP, $fd
|
db 5, -8, 4 | X_FLIP, $fd
|
||||||
; 4174
|
; 4174
|
||||||
|
|
||||||
Facing19: ; 4174
|
Facing19: ; fishing right
|
||||||
db 5 ; #
|
db 5 ; #
|
||||||
db 0, 8, X_FLIP, $08
|
db 0, 8, X_FLIP, $08
|
||||||
db 0, 0, X_FLIP, $09
|
db 0, 0, X_FLIP, $09
|
||||||
@ -171,7 +171,7 @@ Facing19: ; 4174
|
|||||||
db 5, 16, 4, $fd
|
db 5, 16, 4, $fd
|
||||||
; 4189
|
; 4189
|
||||||
|
|
||||||
Facing20: ; 4189
|
Facing20: ; emote
|
||||||
db 4 ; #
|
db 4 ; #
|
||||||
db 0, 0, 4, $f8
|
db 0, 0, 4, $f8
|
||||||
db 0, 8, 4, $f9
|
db 0, 8, 4, $f9
|
||||||
@ -179,13 +179,13 @@ Facing20: ; 4189
|
|||||||
db 8, 8, 4, $fb
|
db 8, 8, 4, $fb
|
||||||
; 419a
|
; 419a
|
||||||
|
|
||||||
Facing21: ; 419a
|
Facing21: ; shadow
|
||||||
db 2 ; #
|
db 2 ; #
|
||||||
db 0, 0, 4, $fc
|
db 0, 0, 4, $fc
|
||||||
db 0, 8, 4 | X_FLIP, $fc
|
db 0, 8, 4 | X_FLIP, $fc
|
||||||
; 41a3
|
; 41a3
|
||||||
|
|
||||||
Facing23: ; 41a3
|
Facing23: ; big doll
|
||||||
db 16 ; #
|
db 16 ; #
|
||||||
db 0, 0, 0, $00
|
db 0, 0, 0, $00
|
||||||
db 0, 8, 0, $01
|
db 0, 8, 0, $01
|
||||||
@ -239,7 +239,7 @@ Facing22: ; 4206
|
|||||||
db 24, 16, 0, $0b
|
db 24, 16, 0, $0b
|
||||||
; 423f
|
; 423f
|
||||||
|
|
||||||
Facing28: ; 423f
|
Facing28: ; boulder dust 1
|
||||||
db 4 ; #
|
db 4 ; #
|
||||||
db 0, 0, 4, $fe
|
db 0, 0, 4, $fe
|
||||||
db 0, 8, 4, $fe
|
db 0, 8, 4, $fe
|
||||||
@ -247,7 +247,7 @@ Facing28: ; 423f
|
|||||||
db 8, 8, 4, $fe
|
db 8, 8, 4, $fe
|
||||||
; 4250
|
; 4250
|
||||||
|
|
||||||
Facing29: ; 4250
|
Facing29: ; boulder dust 2
|
||||||
db 4 ; #
|
db 4 ; #
|
||||||
db 0, 0, 4, $ff
|
db 0, 0, 4, $ff
|
||||||
db 0, 8, 4, $ff
|
db 0, 8, 4, $ff
|
||||||
|
@ -151,7 +151,7 @@ Function4386: ; 4386
|
|||||||
; 43f3
|
; 43f3
|
||||||
|
|
||||||
Function43f3: ; 43f3
|
Function43f3: ; 43f3
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
@ -162,7 +162,7 @@ Function43f3: ; 43f3
|
|||||||
bit 5, [hl]
|
bit 5, [hl]
|
||||||
jr nz, .bit5
|
jr nz, .bit5
|
||||||
|
|
||||||
cp OBJECT_09_VALUE_01
|
cp STEP_TYPE_01
|
||||||
jr z, .one
|
jr z, .one
|
||||||
jr .ok
|
jr .ok
|
||||||
|
|
||||||
@ -175,12 +175,13 @@ Function43f3: ; 43f3
|
|||||||
|
|
||||||
.one
|
.one
|
||||||
call Function47dd
|
call Function47dd
|
||||||
ld hl, OBJECT_09
|
|
||||||
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
cp OBJECT_09_VALUE_01
|
cp STEP_TYPE_01
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
.ok
|
.ok
|
||||||
@ -242,40 +243,23 @@ endr
|
|||||||
; 445f
|
; 445f
|
||||||
|
|
||||||
Pointers445f: ; 445f
|
Pointers445f: ; 445f
|
||||||
dw Function44a3 ; 00
|
dw Function44a3, Function44a3 ; 00
|
||||||
dw Function44a3 ; 01 (00)
|
dw Function44b5, Function44aa ; 01
|
||||||
dw Function44b5 ; 02 (01)
|
dw Function44c1, Function44aa ; 02
|
||||||
dw Function44aa ; 03 (02)
|
dw Function4508, Function44aa ; 03
|
||||||
dw Function44c1 ; 04 (03)
|
dw Function4529, Function44aa ; 04
|
||||||
dw Function44aa ; 05 (04)
|
dw Function4539, Function44a3 ; 05
|
||||||
dw Function4508 ; 06 (05)
|
dw Function456e, Function456e ; 06
|
||||||
dw Function44aa ; 07 (06)
|
dw Function457b, Function44a3 ; 07
|
||||||
dw Function4529 ; 08 (07)
|
dw Function4582, Function4582 ; 08
|
||||||
dw Function44aa ; 09 (08)
|
dw Function4589, Function4589 ; 09
|
||||||
dw Function4539 ; 0a (09)
|
dw Function4590, Function45a4 ; 0a
|
||||||
dw Function44a3 ; 0b (0a)
|
dw Function45ab, Function44aa ; 0c
|
||||||
dw Function456e ; 0c (0b)
|
dw Function45be, Function45be ; 0b
|
||||||
dw Function456e ; 0d (0c)
|
dw Function45c5, Function45c5 ; 0d
|
||||||
dw Function457b ; 0e (0d)
|
dw Function45da, Function44a3 ; 0e
|
||||||
dw Function44a3 ; 0f (0e)
|
dw Function45ed, Function44a3 ; 0f
|
||||||
dw Function4582 ; 10 (0f)
|
dw Function44e4, Function44aa ; 10
|
||||||
dw Function4582 ; 11 (10)
|
|
||||||
dw Function4589 ; 12 (11)
|
|
||||||
dw Function4589 ; 13 (12)
|
|
||||||
dw Function4590 ; 14 (13)
|
|
||||||
dw Function45a4 ; 15 (14)
|
|
||||||
dw Function45ab ; 16 (15)
|
|
||||||
dw Function44aa ; 17 (16)
|
|
||||||
dw Function45be ; 18 (17)
|
|
||||||
dw Function45be ; 19 (18)
|
|
||||||
dw Function45c5 ; 1a (19)
|
|
||||||
dw Function45c5 ; 1b (1a)
|
|
||||||
dw Function45da ; 1c (1b)
|
|
||||||
dw Function44a3 ; 1d (1c)
|
|
||||||
dw Function45ed ; 1e (1d)
|
|
||||||
dw Function44a3 ; 1f (1e)
|
|
||||||
dw Function44e4 ; 20 (1f)
|
|
||||||
dw Function44aa ; 21 (20)
|
|
||||||
; 44a3
|
; 44a3
|
||||||
|
|
||||||
Function44a3: ; 44a3
|
Function44a3: ; 44a3
|
||||||
@ -571,15 +555,15 @@ Function4600: ; 4600
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
ld hl, OBJECT_STANDING_TILE
|
ld hl, OBJECT_NEXT_TILE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld hl, OBJECT_NEXT_TILE
|
ld hl, OBJECT_STANDING_TILE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
call Function4661
|
call Function4661
|
||||||
ld hl, OBJECT_STANDING_TILE
|
ld hl, OBJECT_NEXT_TILE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
|
|
||||||
@ -611,18 +595,18 @@ Function463f: ; 463f
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
bit 3, [hl]
|
bit 3, [hl]
|
||||||
jr z, .ok
|
jr z, .ok
|
||||||
ld hl, OBJECT_STANDING_TILE
|
ld hl, OBJECT_NEXT_TILE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
call Function4661
|
call Function4661
|
||||||
|
|
||||||
.ok
|
.ok
|
||||||
ld hl, OBJECT_STANDING_TILE
|
ld hl, OBJECT_NEXT_TILE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
call Function4679
|
call Function4679
|
||||||
ret c
|
ret c
|
||||||
ld hl, OBJECT_NEXT_TILE
|
ld hl, OBJECT_STANDING_TILE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
call Function4679
|
call Function4679
|
||||||
@ -677,7 +661,7 @@ Function4690: ; 4690
|
|||||||
ld hl, OBJECT_FLAGS1
|
ld hl, OBJECT_FLAGS1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
bit FIXED_FACING, [hl]
|
bit FIXED_FACING, [hl]
|
||||||
jr nz, GetCurTile
|
jr nz, GetStandingTile
|
||||||
|
|
||||||
rept 2
|
rept 2
|
||||||
add a
|
add a
|
||||||
@ -686,7 +670,7 @@ endr
|
|||||||
ld hl, OBJECT_FACING
|
ld hl, OBJECT_FACING
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
GetCurTile: ; 46a6
|
GetStandingTile: ; 46a6
|
||||||
|
|
||||||
call GetStepVector
|
call GetStepVector
|
||||||
|
|
||||||
@ -718,7 +702,7 @@ GetCurTile: ; 46a6
|
|||||||
call GetCoordTile
|
call GetCoordTile
|
||||||
pop bc
|
pop bc
|
||||||
|
|
||||||
ld hl, OBJECT_STANDING_TILE
|
ld hl, OBJECT_NEXT_TILE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
@ -801,15 +785,15 @@ Function4738: ; 4738
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and %00000011
|
and %00000011
|
||||||
ld [wd151], a
|
ld [wPlayerStepDirection], a
|
||||||
call AddStepVector
|
call AddStepVector
|
||||||
ld a, [wd14e]
|
ld a, [wPlayerStepVectorX]
|
||||||
add d
|
add d
|
||||||
ld [wd14e], a
|
ld [wPlayerStepVectorX], a
|
||||||
ld a, [wd14f]
|
ld a, [wPlayerStepVectorY]
|
||||||
add e
|
add e
|
||||||
ld [wd14f], a
|
ld [wPlayerStepVectorY], a
|
||||||
ld hl, wd150
|
ld hl, wPlayerStepFlags
|
||||||
set 5, [hl]
|
set 5, [hl]
|
||||||
ret
|
ret
|
||||||
; 4759
|
; 4759
|
||||||
@ -925,14 +909,14 @@ Function47bc: ; 47bc
|
|||||||
push bc
|
push bc
|
||||||
call GetCoordTile
|
call GetCoordTile
|
||||||
pop bc
|
pop bc
|
||||||
ld hl, OBJECT_STANDING_TILE
|
ld hl, OBJECT_NEXT_TILE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
call Function4600
|
call Function4600
|
||||||
call Function467b
|
call Function467b
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_01
|
ld [hl], STEP_TYPE_01
|
||||||
ret
|
ret
|
||||||
; 47dd
|
; 47dd
|
||||||
|
|
||||||
@ -965,15 +949,15 @@ Function47dd: ; 47dd
|
|||||||
dw .Script ; 10
|
dw .Script ; 10
|
||||||
dw .Strength ; 11
|
dw .Strength ; 11
|
||||||
dw .FollowNotExact ; 12
|
dw .FollowNotExact ; 12
|
||||||
dw .Movement13 ; 13
|
dw .MovementShadow ; 13
|
||||||
dw .Movement14 ; 14
|
dw .MovementEmote ; 14
|
||||||
dw .MovementBigStanding ; 15
|
dw .MovementBigStanding ; 15
|
||||||
dw .MovementBouncing ; 16
|
dw .MovementBouncing ; 16
|
||||||
dw .Movement17 ; 17
|
dw .MovementScreenShake ; 17
|
||||||
dw .MovementSpinClockwise ; 18
|
dw .MovementSpinClockwise ; 18
|
||||||
dw .MovementSpinCounterclockwise ; 19
|
dw .MovementSpinCounterclockwise ; 19
|
||||||
dw .Movement1a ; 1a
|
dw .MovementBoulderDust ; 1a
|
||||||
dw .Movement1b ; 1b
|
dw .MovementShakingGrass ; 1b
|
||||||
; 4821
|
; 4821
|
||||||
|
|
||||||
.Null_00: ; 4821
|
.Null_00: ; 4821
|
||||||
@ -1035,10 +1019,10 @@ Function47dd: ; 47dd
|
|||||||
call Function467b
|
call Function467b
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 1
|
ld [hl], PERSON_ACTION_01
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_05
|
ld [hl], STEP_TYPE_05
|
||||||
ret
|
ret
|
||||||
; 487c
|
; 487c
|
||||||
|
|
||||||
@ -1095,7 +1079,7 @@ Function47dd: ; 47dd
|
|||||||
; 48b3
|
; 48b3
|
||||||
|
|
||||||
.Strength_Start: ; 48b3
|
.Strength_Start: ; 48b3
|
||||||
ld hl, OBJECT_STANDING_TILE
|
ld hl, OBJECT_NEXT_TILE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
call CheckPitTile
|
call CheckPitTile
|
||||||
@ -1120,9 +1104,9 @@ Function47dd: ; 47dd
|
|||||||
call PlaySFX
|
call PlaySFX
|
||||||
call SpawnStrengthBoulderDust
|
call SpawnStrengthBoulderDust
|
||||||
call Function463f
|
call Function463f
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_0F
|
ld [hl], STEP_TYPE_0F
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.ok2
|
.ok2
|
||||||
@ -1210,7 +1194,7 @@ Function47dd: ; 47dd
|
|||||||
ld [hl], STANDING
|
ld [hl], STANDING
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 1
|
ld [hl], PERSON_ACTION_01
|
||||||
ret
|
ret
|
||||||
; 4958
|
; 4958
|
||||||
|
|
||||||
@ -1221,10 +1205,10 @@ Function47dd: ; 47dd
|
|||||||
ld [hl], STANDING
|
ld [hl], STANDING
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 9
|
ld [hl], PERSON_ACTION_09
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_04
|
ld [hl], STEP_TYPE_04
|
||||||
ret
|
ret
|
||||||
; 496e
|
; 496e
|
||||||
|
|
||||||
@ -1235,10 +1219,10 @@ Function47dd: ; 47dd
|
|||||||
ld [hl], STANDING
|
ld [hl], STANDING
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 10
|
ld [hl], PERSON_ACTION_0A
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_04
|
ld [hl], STEP_TYPE_04
|
||||||
ret
|
ret
|
||||||
; 4984
|
; 4984
|
||||||
|
|
||||||
@ -1265,17 +1249,17 @@ Function47dd: ; 47dd
|
|||||||
.MovementSpinRepeat: ; 499c
|
.MovementSpinRepeat: ; 499c
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 1
|
ld [hl], PERSON_ACTION_01
|
||||||
ld hl, OBJECT_RANGE
|
ld hl, OBJECT_RANGE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld a, 16
|
ld a, $10
|
||||||
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_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_03
|
ld [hl], STEP_TYPE_03
|
||||||
call IncrementObjectMovementByteIndex
|
call IncrementObjectMovementByteIndex
|
||||||
ret
|
ret
|
||||||
; 49b8
|
; 49b8
|
||||||
@ -1318,11 +1302,11 @@ Function47dd: ; 47dd
|
|||||||
ret
|
ret
|
||||||
; 49e5
|
; 49e5
|
||||||
|
|
||||||
.Movement13: ; 49e5
|
.MovementShadow: ; 49e5
|
||||||
call ._Movement13_14_1a_1b
|
call ._MovementShadow_14_1a_1b
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $7
|
ld [hl], PERSON_ACTION_07
|
||||||
ld hl, OBJECT_STEP_DURATION
|
ld hl, OBJECT_STEP_DURATION
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -1350,39 +1334,39 @@ Function47dd: ; 47dd
|
|||||||
ld hl, OBJECT_SPRITE_X_OFFSET
|
ld hl, OBJECT_SPRITE_X_OFFSET
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 0
|
ld [hl], 0
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_13
|
ld [hl], STEP_TYPE_13
|
||||||
ret
|
ret
|
||||||
; 4a21
|
; 4a21
|
||||||
|
|
||||||
.Movement14: ; 4a21
|
.MovementEmote: ; 4a21
|
||||||
call Function467b
|
call Function467b
|
||||||
call ._Movement13_14_1a_1b
|
call ._MovementShadow_14_1a_1b
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 8
|
ld [hl], PERSON_ACTION_08
|
||||||
ld hl, OBJECT_STEP_DURATION
|
ld hl, OBJECT_STEP_DURATION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 0
|
ld [hl], 0
|
||||||
ld hl, OBJECT_SPRITE_Y_OFFSET
|
ld hl, OBJECT_SPRITE_Y_OFFSET
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $f0
|
ld [hl], -$10
|
||||||
ld hl, OBJECT_SPRITE_X_OFFSET
|
ld hl, OBJECT_SPRITE_X_OFFSET
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 0
|
ld [hl], 0
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_13
|
ld [hl], STEP_TYPE_13
|
||||||
ret
|
ret
|
||||||
; 4a46
|
; 4a46
|
||||||
|
|
||||||
.Movement1a: ; 4a46
|
.MovementBoulderDust: ; 4a46
|
||||||
call Function467b
|
call Function467b
|
||||||
call ._Movement13_14_1a_1b
|
call ._MovementShadow_14_1a_1b
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $e
|
ld [hl], PERSON_ACTION_0E
|
||||||
ld hl, OBJECT_STEP_DURATION
|
ld hl, OBJECT_STEP_DURATION
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -1410,9 +1394,9 @@ endr
|
|||||||
ld hl, OBJECT_SPRITE_Y_OFFSET
|
ld hl, OBJECT_SPRITE_Y_OFFSET
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], e
|
ld [hl], e
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_13
|
ld [hl], STEP_TYPE_13
|
||||||
ret
|
ret
|
||||||
; 4a81
|
; 4a81
|
||||||
|
|
||||||
@ -1424,12 +1408,12 @@ endr
|
|||||||
db -6, 2
|
db -6, 2
|
||||||
; 4a89
|
; 4a89
|
||||||
|
|
||||||
.Movement1b: ; 4a89
|
.MovementShakingGrass: ; 4a89
|
||||||
call Function467b
|
call Function467b
|
||||||
call ._Movement13_14_1a_1b
|
call ._MovementShadow_14_1a_1b
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $f
|
ld [hl], PERSON_ACTION_0F
|
||||||
ld hl, OBJECT_STEP_DURATION
|
ld hl, OBJECT_STEP_DURATION
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -1437,13 +1421,13 @@ endr
|
|||||||
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_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_13
|
ld [hl], STEP_TYPE_13
|
||||||
ret
|
ret
|
||||||
; 4aa8
|
; 4aa8
|
||||||
|
|
||||||
._Movement13_14_1a_1b: ; 4aa8
|
._MovementShadow_14_1a_1b: ; 4aa8
|
||||||
ld hl, OBJECT_RANGE
|
ld hl, OBJECT_RANGE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -1460,28 +1444,28 @@ endr
|
|||||||
ret
|
ret
|
||||||
; 4abc
|
; 4abc
|
||||||
|
|
||||||
.Movement17: ; 4abc
|
.MovementScreenShake: ; 4abc
|
||||||
call Function467b
|
call Function467b
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 0
|
ld [hl], PERSON_ACTION_00
|
||||||
ld hl, OBJECT_RANGE
|
ld hl, OBJECT_RANGE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
call ._Movement17
|
call ._MovementScreenShake
|
||||||
ld hl, OBJECT_STEP_DURATION
|
ld hl, OBJECT_STEP_DURATION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], e
|
ld [hl], e
|
||||||
ld hl, OBJECT_30
|
ld hl, OBJECT_30
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_15
|
ld [hl], STEP_TYPE_15
|
||||||
ret
|
ret
|
||||||
; 4ade
|
; 4ade
|
||||||
|
|
||||||
._Movement17: ; 4ade
|
._MovementScreenShake: ; 4ade
|
||||||
ld d, a
|
ld d, a
|
||||||
and %00111111
|
and %00111111
|
||||||
ld e, a
|
ld e, a
|
||||||
@ -1506,20 +1490,20 @@ endr
|
|||||||
call Function463f
|
call Function463f
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 2
|
ld [hl], PERSON_ACTION_02
|
||||||
ld hl, wd4cf
|
ld hl, wd4cf
|
||||||
ld a, [hMapObjectIndexBuffer]
|
ld a, [hMapObjectIndexBuffer]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr z, .load_6
|
jr z, .load_6
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_07
|
ld [hl], STEP_TYPE_07
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.load_6
|
.load_6
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_06
|
ld [hl], STEP_TYPE_06
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function4b17: ; 4b17
|
Function4b17: ; 4b17
|
||||||
@ -1551,15 +1535,15 @@ SetRandomStepDuration: ; 4b2d
|
|||||||
ld [hl], STANDING
|
ld [hl], STANDING
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 1
|
ld [hl], PERSON_ACTION_01
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_03
|
ld [hl], STEP_TYPE_03
|
||||||
ret
|
ret
|
||||||
; 4b45
|
; 4b45
|
||||||
|
|
||||||
Pointers4b45: ; 4b45
|
Pointers4b45: ; 4b45
|
||||||
; These pointers use OBJECT_09. See constants/sprite_constants.asm
|
; These pointers use OBJECT_STEP_TYPE. See constants/sprite_constants.asm
|
||||||
dw Function47bc ; 00
|
dw Function47bc ; 00
|
||||||
dw Function47dd ; 01
|
dw Function47dd ; 01
|
||||||
dw Function4e2b ; 02
|
dw Function4e2b ; 02
|
||||||
@ -1593,9 +1577,9 @@ Function4b79: ; 4b79
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
dec [hl]
|
dec [hl]
|
||||||
ret nz
|
ret nz
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_01
|
ld [hl], STEP_TYPE_01
|
||||||
ret
|
ret
|
||||||
; 4b86
|
; 4b86
|
||||||
|
|
||||||
@ -1614,7 +1598,7 @@ Function4b8d: ; 4b8d
|
|||||||
dec [hl]
|
dec [hl]
|
||||||
ret nz
|
ret nz
|
||||||
call Function4600
|
call Function4600
|
||||||
call GetCurTile
|
call GetStandingTile
|
||||||
ld hl, OBJECT_FLAGS2
|
ld hl, OBJECT_FLAGS2
|
||||||
add hl, bc
|
add hl, bc
|
||||||
res 3, [hl]
|
res 3, [hl]
|
||||||
@ -1630,9 +1614,9 @@ Function4ba9: ; 4ba9
|
|||||||
dec [hl]
|
dec [hl]
|
||||||
ret nz
|
ret nz
|
||||||
call Function4600
|
call Function4600
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_01
|
ld [hl], STEP_TYPE_01
|
||||||
ret
|
ret
|
||||||
; 4bbf
|
; 4bbf
|
||||||
|
|
||||||
@ -1646,7 +1630,7 @@ Function4bbf: ; 4bbf
|
|||||||
; 4bca
|
; 4bca
|
||||||
|
|
||||||
Function4bca: ; 4bca
|
Function4bca: ; 4bca
|
||||||
ld hl, wd150
|
ld hl, wPlayerStepFlags
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
call IncrementObjectStructField28
|
call IncrementObjectStructField28
|
||||||
; fallthrough
|
; fallthrough
|
||||||
@ -1663,7 +1647,7 @@ Function4bd2: ; 4bd2
|
|||||||
ld hl, OBJECT_FLAGS2
|
ld hl, OBJECT_FLAGS2
|
||||||
add hl, bc
|
add hl, bc
|
||||||
res 3, [hl]
|
res 3, [hl]
|
||||||
ld hl, wd150
|
ld hl, wPlayerStepFlags
|
||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
set 4, [hl]
|
set 4, [hl]
|
||||||
call IncrementObjectStructField28
|
call IncrementObjectStructField28
|
||||||
@ -1671,8 +1655,8 @@ Function4bd2: ; 4bd2
|
|||||||
; 4bf2
|
; 4bf2
|
||||||
|
|
||||||
Function4bf2: ; 4bf2
|
Function4bf2: ; 4bf2
|
||||||
call GetCurTile
|
call GetStandingTile
|
||||||
ld hl, wd150
|
ld hl, wPlayerStepFlags
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
call IncrementObjectStructField28
|
call IncrementObjectStructField28
|
||||||
; fallthrough
|
; fallthrough
|
||||||
@ -1685,12 +1669,12 @@ Function4bfd: ; 4bfd
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
dec [hl]
|
dec [hl]
|
||||||
ret nz
|
ret nz
|
||||||
ld hl, wd150
|
ld hl, wPlayerStepFlags
|
||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
call Function4600
|
call Function4600
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_01
|
ld [hl], STEP_TYPE_01
|
||||||
ret
|
ret
|
||||||
; 4c18
|
; 4c18
|
||||||
|
|
||||||
@ -1717,7 +1701,7 @@ Function4c23: ; 4c23
|
|||||||
Function4c32: ; 4c32
|
Function4c32: ; 4c32
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 4
|
ld [hl], PERSON_ACTION_04
|
||||||
ld hl, OBJECT_STEP_DURATION
|
ld hl, OBJECT_STEP_DURATION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
dec [hl]
|
dec [hl]
|
||||||
@ -1746,7 +1730,7 @@ Function4c42: ; 4c42
|
|||||||
Function4c5d: ; 4c5d
|
Function4c5d: ; 4c5d
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 4
|
ld [hl], PERSON_ACTION_04
|
||||||
ld hl, OBJECT_31
|
ld hl, OBJECT_31
|
||||||
add hl, bc
|
add hl, bc
|
||||||
inc [hl]
|
inc [hl]
|
||||||
@ -1765,9 +1749,9 @@ Function4c5d: ; 4c5d
|
|||||||
ld hl, OBJECT_12
|
ld hl, OBJECT_12
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 0
|
ld [hl], 0
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_01
|
ld [hl], STEP_TYPE_01
|
||||||
ret
|
ret
|
||||||
; 4c89
|
; 4c89
|
||||||
|
|
||||||
@ -1786,7 +1770,7 @@ Function4c89: ; 4c89
|
|||||||
Function4c9a: ; 4c9a
|
Function4c9a: ; 4c9a
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 0
|
ld [hl], PERSON_ACTION_00
|
||||||
ld hl, OBJECT_STEP_DURATION
|
ld hl, OBJECT_STEP_DURATION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $10
|
ld [hl], $10
|
||||||
@ -1820,7 +1804,7 @@ Function4cb3: ; 4cb3
|
|||||||
Function4cc9: ; 4cc9
|
Function4cc9: ; 4cc9
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 4
|
ld [hl], PERSON_ACTION_04
|
||||||
ld hl, OBJECT_31
|
ld hl, OBJECT_31
|
||||||
add hl, bc
|
add hl, bc
|
||||||
inc [hl]
|
inc [hl]
|
||||||
@ -1851,7 +1835,7 @@ Function4ceb: ; 4ceb
|
|||||||
Function4cf5: ; 4cf5
|
Function4cf5: ; 4cf5
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 4
|
ld [hl], PERSON_ACTION_04
|
||||||
ld hl, OBJECT_STEP_DURATION
|
ld hl, OBJECT_STEP_DURATION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
dec [hl]
|
dec [hl]
|
||||||
@ -1865,9 +1849,9 @@ Function4d01: ; 4d01
|
|||||||
ld hl, OBJECT_SPRITE_Y_OFFSET
|
ld hl, OBJECT_SPRITE_Y_OFFSET
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 0
|
ld [hl], 0
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_01
|
ld [hl], STEP_TYPE_01
|
||||||
ret
|
ret
|
||||||
; 4d14
|
; 4d14
|
||||||
|
|
||||||
@ -1883,7 +1867,7 @@ Function4d14: ; 4d14
|
|||||||
Function4d1f: ; 4d1f
|
Function4d1f: ; 4d1f
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 0
|
ld [hl], PERSON_ACTION_00
|
||||||
ld hl, OBJECT_STEP_DURATION
|
ld hl, OBJECT_STEP_DURATION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $10
|
ld [hl], $10
|
||||||
@ -1898,7 +1882,7 @@ Function4d2e: ; 4d2e
|
|||||||
ret nz
|
ret nz
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 2
|
ld [hl], PERSON_ACTION_02
|
||||||
ld hl, OBJECT_12
|
ld hl, OBJECT_12
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 0
|
ld [hl], 0
|
||||||
@ -1939,9 +1923,9 @@ Function4d6b: ; 4d6b
|
|||||||
ld hl, OBJECT_SPRITE_Y_OFFSET
|
ld hl, OBJECT_SPRITE_Y_OFFSET
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 0
|
ld [hl], 0
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_01
|
ld [hl], STEP_TYPE_01
|
||||||
ret
|
ret
|
||||||
; 4d7e
|
; 4d7e
|
||||||
|
|
||||||
@ -1976,9 +1960,9 @@ Function4d94: ; 4d94
|
|||||||
ld hl, OBJECT_SPRITE_Y_OFFSET
|
ld hl, OBJECT_SPRITE_Y_OFFSET
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 0
|
ld [hl], 0
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_01
|
ld [hl], STEP_TYPE_01
|
||||||
ret
|
ret
|
||||||
; 4daf
|
; 4daf
|
||||||
|
|
||||||
@ -1992,9 +1976,9 @@ Function4db5: ; 4db5
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and %00000001
|
and %00000001
|
||||||
ld a, 1
|
ld a, PERSON_ACTION_01
|
||||||
jr z, .yes
|
jr z, .yes
|
||||||
ld a, 0
|
ld a, PERSON_ACTION_00
|
||||||
|
|
||||||
.yes
|
.yes
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
@ -2008,9 +1992,9 @@ Function4dc8: ; 4dc8
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and %00000001
|
and %00000001
|
||||||
ld a, 4
|
ld a, PERSON_ACTION_04
|
||||||
jr z, .yes
|
jr z, .yes
|
||||||
ld a, 5
|
ld a, PERSON_ACTION_05
|
||||||
|
|
||||||
.yes
|
.yes
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
@ -2027,9 +2011,9 @@ Function4ddd: ; 4ddd
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
dec [hl]
|
dec [hl]
|
||||||
ret nz
|
ret nz
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_01
|
ld [hl], STEP_TYPE_01
|
||||||
ret
|
ret
|
||||||
; 4df0
|
; 4df0
|
||||||
|
|
||||||
@ -2049,9 +2033,9 @@ Function4dff: ; 4dff
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
dec [hl]
|
dec [hl]
|
||||||
ret nz
|
ret nz
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_01
|
ld [hl], STEP_TYPE_01
|
||||||
ret
|
ret
|
||||||
; 4e0c
|
; 4e0c
|
||||||
|
|
||||||
@ -2091,9 +2075,9 @@ Function4e2b: ; 4e2b
|
|||||||
ld hl, OBJECT_DIRECTION_WALKING
|
ld hl, OBJECT_DIRECTION_WALKING
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], STANDING
|
ld [hl], STANDING
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_01
|
ld [hl], STEP_TYPE_01
|
||||||
ret
|
ret
|
||||||
; 4e47
|
; 4e47
|
||||||
|
|
||||||
@ -2116,7 +2100,7 @@ Function4e56: ; 4e56
|
|||||||
; 4e5d
|
; 4e5d
|
||||||
|
|
||||||
Function4e5d: ; 4e5d
|
Function4e5d: ; 4e5d
|
||||||
ld hl, wd150
|
ld hl, wPlayerStepFlags
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
call IncrementObjectStructField28
|
call IncrementObjectStructField28
|
||||||
; fallthrough
|
; fallthrough
|
||||||
@ -2129,15 +2113,15 @@ Function4e65: ; 4e65
|
|||||||
dec [hl]
|
dec [hl]
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
ld hl, wd150
|
ld hl, wPlayerStepFlags
|
||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
call Function4600
|
call Function4600
|
||||||
ld hl, OBJECT_DIRECTION_WALKING
|
ld hl, OBJECT_DIRECTION_WALKING
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], STANDING
|
ld [hl], STANDING
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_01
|
ld [hl], STEP_TYPE_01
|
||||||
ret
|
ret
|
||||||
; 4e83
|
; 4e83
|
||||||
|
|
||||||
@ -2193,9 +2177,9 @@ Function4ec0: ; 4ec0
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
dec [hl]
|
dec [hl]
|
||||||
ret nz
|
ret nz
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_01
|
ld [hl], STEP_TYPE_01
|
||||||
ret
|
ret
|
||||||
; 4ecd
|
; 4ecd
|
||||||
|
|
||||||
@ -2225,9 +2209,9 @@ Function4ecd: ; 4ecd
|
|||||||
ld hl, OBJECT_DIRECTION_WALKING
|
ld hl, OBJECT_DIRECTION_WALKING
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], STANDING
|
ld [hl], STANDING
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_01
|
ld [hl], STEP_TYPE_01
|
||||||
ret
|
ret
|
||||||
; 4f04
|
; 4f04
|
||||||
|
|
||||||
@ -2286,9 +2270,9 @@ Function4f43: ; 4f43
|
|||||||
ld hl, OBJECT_29
|
ld hl, OBJECT_29
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
ld a, [wd14f]
|
ld a, [wPlayerStepVectorY]
|
||||||
sub d
|
sub d
|
||||||
ld [wd14f], a
|
ld [wPlayerStepVectorY], a
|
||||||
ld hl, OBJECT_STEP_DURATION
|
ld hl, OBJECT_STEP_DURATION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
dec [hl]
|
dec [hl]
|
||||||
@ -2299,9 +2283,9 @@ Function4f43: ; 4f43
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld d, a
|
ld d, a
|
||||||
ld a, [wd14f]
|
ld a, [wPlayerStepVectorY]
|
||||||
add d
|
add d
|
||||||
ld [wd14f], a
|
ld [wPlayerStepVectorY], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.ok
|
.ok
|
||||||
@ -2342,10 +2326,10 @@ Function4f83: ; 4f83
|
|||||||
Function4f8a: ; 4f8a
|
Function4f8a: ; 4f8a
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $10
|
ld [hl], PERSON_ACTION_10
|
||||||
ld hl, OBJECT_STEP_DURATION
|
ld hl, OBJECT_STEP_DURATION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $10
|
ld [hl], 16
|
||||||
call IncrementObjectStructField28
|
call IncrementObjectStructField28
|
||||||
; 4f99
|
; 4f99
|
||||||
|
|
||||||
@ -2360,9 +2344,9 @@ Function4f99: ; 4f99
|
|||||||
ld hl, OBJECT_12
|
ld hl, OBJECT_12
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 0
|
ld [hl], 0
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_01
|
ld [hl], STEP_TYPE_01
|
||||||
ret
|
ret
|
||||||
; 4fb2
|
; 4fb2
|
||||||
|
|
||||||
@ -2893,7 +2877,7 @@ Function5688: ; 5688
|
|||||||
ld e, [hl]
|
ld e, [hl]
|
||||||
call GetCoordTile
|
call GetCoordTile
|
||||||
pop bc
|
pop bc
|
||||||
ld hl, OBJECT_STANDING_TILE
|
ld hl, OBJECT_NEXT_TILE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
callba Function463f
|
callba Function463f
|
||||||
@ -3060,11 +3044,11 @@ Function576a:: ; 576a
|
|||||||
|
|
||||||
Function5771: ; 5771
|
Function5771: ; 5771
|
||||||
xor a
|
xor a
|
||||||
ld [wd14e], a
|
ld [wPlayerStepVectorX], a
|
||||||
ld [wd14f], a
|
ld [wPlayerStepVectorY], a
|
||||||
ld [wd150], a
|
ld [wPlayerStepFlags], a
|
||||||
ld a, -1
|
ld a, -1
|
||||||
ld [wd151], a
|
ld [wPlayerStepDirection], a
|
||||||
ret
|
ret
|
||||||
; 5781
|
; 5781
|
||||||
|
|
||||||
@ -3203,9 +3187,9 @@ SetFollowerIfVisible: ; 582c
|
|||||||
ld hl, OBJECT_MOVEMENTTYPE
|
ld hl, OBJECT_MOVEMENTTYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], SPRITEMOVEDATA_FOLLOWING
|
ld [hl], SPRITEMOVEDATA_FOLLOWING
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_00
|
ld [hl], STEP_TYPE_00
|
||||||
ld a, [hObjectStructIndexBuffer]
|
ld a, [hObjectStructIndexBuffer]
|
||||||
ld [wObjectFollow_Follower], a
|
ld [wObjectFollow_Follower], a
|
||||||
ret
|
ret
|
||||||
@ -3343,9 +3327,9 @@ Function58e3: ; 58e3
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_00
|
ld [hl], STEP_TYPE_00
|
||||||
ret
|
ret
|
||||||
; 5903
|
; 5903
|
||||||
|
|
||||||
@ -3362,9 +3346,9 @@ Function5903: ; 5903
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_00
|
ld [hl], STEP_TYPE_00
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.standing_movefns
|
.standing_movefns
|
||||||
|
@ -93,30 +93,30 @@ MovementPointers: ; 5075
|
|||||||
|
|
||||||
|
|
||||||
Movement_teleport_from: ; 5129
|
Movement_teleport_from: ; 5129
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_0C
|
ld [hl], STEP_TYPE_0C
|
||||||
ret
|
ret
|
||||||
; 5130
|
; 5130
|
||||||
|
|
||||||
Movement_teleport_to: ; 5130
|
Movement_teleport_to: ; 5130
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_0D
|
ld [hl], STEP_TYPE_0D
|
||||||
ret
|
ret
|
||||||
; 5137
|
; 5137
|
||||||
|
|
||||||
Movement_skyfall: ; 5137
|
Movement_skyfall: ; 5137
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_0E
|
ld [hl], STEP_TYPE_0E
|
||||||
ret
|
ret
|
||||||
; 513e
|
; 513e
|
||||||
|
|
||||||
Movement_59: ; 513e
|
Movement_59: ; 513e
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_19
|
ld [hl], STEP_TYPE_19
|
||||||
ret
|
ret
|
||||||
; 5145
|
; 5145
|
||||||
|
|
||||||
@ -129,14 +129,14 @@ Movement_step_wait5: ; 5145
|
|||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $4
|
ld [hl], PERSON_ACTION_04
|
||||||
call GetMovementByte
|
call GetMovementByte
|
||||||
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_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_03
|
ld [hl], STEP_TYPE_03
|
||||||
ld hl, OBJECT_DIRECTION_WALKING
|
ld hl, OBJECT_DIRECTION_WALKING
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], STANDING
|
ld [hl], STANDING
|
||||||
@ -157,19 +157,19 @@ Movement_58: ; 516a
|
|||||||
ld hl, OBJECT_DIRECTION_WALKING
|
ld hl, OBJECT_DIRECTION_WALKING
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], STANDING
|
ld [hl], STANDING
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_12
|
ld [hl], STEP_TYPE_12
|
||||||
ret
|
ret
|
||||||
; 5189
|
; 5189
|
||||||
|
|
||||||
Movement_fish_got_bite: ; 5189
|
Movement_fish_got_bite: ; 5189
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $6
|
ld [hl], PERSON_ACTION_06
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_10
|
ld [hl], STEP_TYPE_10
|
||||||
ret
|
ret
|
||||||
; 5196
|
; 5196
|
||||||
|
|
||||||
@ -180,20 +180,20 @@ Movement_rock_smash: ; 5196
|
|||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $1
|
ld [hl], PERSON_ACTION_01
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_11
|
ld [hl], STEP_TYPE_11
|
||||||
ret
|
ret
|
||||||
; 51ab
|
; 51ab
|
||||||
|
|
||||||
Movement_fish_cast_rod: ; 51ab
|
Movement_fish_cast_rod: ; 51ab
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $6
|
ld [hl], PERSON_ACTION_06
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_01
|
ld [hl], STEP_TYPE_01
|
||||||
ret
|
ret
|
||||||
; 51b8
|
; 51b8
|
||||||
|
|
||||||
@ -217,9 +217,9 @@ Movement_step_end: ; 51c1
|
|||||||
ld hl, VramState
|
ld hl, VramState
|
||||||
res 7, [hl]
|
res 7, [hl]
|
||||||
|
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_01
|
ld [hl], STEP_TYPE_01
|
||||||
ret
|
ret
|
||||||
; 51db
|
; 51db
|
||||||
|
|
||||||
@ -238,9 +238,9 @@ Movement_48: ; 51db
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_03
|
ld [hl], STEP_TYPE_03
|
||||||
|
|
||||||
ld hl, VramState
|
ld hl, VramState
|
||||||
res 7, [hl]
|
res 7, [hl]
|
||||||
@ -264,11 +264,11 @@ Movement_remove_person: ; 51fd
|
|||||||
Movement_4b: ; 5210
|
Movement_4b: ; 5210
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $1
|
ld [hl], PERSON_ACTION_01
|
||||||
|
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_04
|
ld [hl], STEP_TYPE_04
|
||||||
|
|
||||||
ld hl, VramState
|
ld hl, VramState
|
||||||
res 7, [hl]
|
res 7, [hl]
|
||||||
@ -319,13 +319,13 @@ Movement_step_sleep_common: ; 5247
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_03
|
ld [hl], STEP_TYPE_03
|
||||||
|
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $1
|
ld [hl], PERSON_ACTION_01
|
||||||
|
|
||||||
ld hl, OBJECT_DIRECTION_WALKING
|
ld hl, OBJECT_DIRECTION_WALKING
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -338,12 +338,12 @@ Movement_step_bump: ; 525f
|
|||||||
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_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_0B
|
ld [hl], STEP_TYPE_0B
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $3
|
ld [hl], PERSON_ACTION_03
|
||||||
ld hl, OBJECT_DIRECTION_WALKING
|
ld hl, OBJECT_DIRECTION_WALKING
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], STANDING
|
ld [hl], STANDING
|
||||||
@ -351,16 +351,19 @@ Movement_step_bump: ; 525f
|
|||||||
; 5279
|
; 5279
|
||||||
|
|
||||||
Movement_56: ; 5279
|
Movement_56: ; 5279
|
||||||
ld a, $18
|
ld a, 24
|
||||||
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_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_03
|
ld [hl], STEP_TYPE_03
|
||||||
|
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $b
|
ld [hl], PERSON_ACTION_0B
|
||||||
|
|
||||||
ld hl, OBJECT_DIRECTION_WALKING
|
ld hl, OBJECT_DIRECTION_WALKING
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], STANDING
|
ld [hl], STANDING
|
||||||
@ -448,9 +451,11 @@ TurnHead: ; 52ee
|
|||||||
ld hl, OBJECT_FACING
|
ld hl, OBJECT_FACING
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $1
|
ld [hl], PERSON_ACTION_01
|
||||||
|
|
||||||
ld hl, OBJECT_DIRECTION_WALKING
|
ld hl, OBJECT_DIRECTION_WALKING
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], STANDING
|
ld [hl], STANDING
|
||||||
@ -721,12 +726,14 @@ HalfStep: ; 5400
|
|||||||
ld hl, OBJECT_29
|
ld hl, OBJECT_29
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $2
|
ld [hl], PERSON_ACTION_02
|
||||||
ld hl, OBJECT_09
|
|
||||||
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_0A
|
ld [hl], STEP_TYPE_0A
|
||||||
ret
|
ret
|
||||||
; 5412
|
; 5412
|
||||||
|
|
||||||
@ -735,34 +742,35 @@ NormalStep: ; 5412
|
|||||||
call Function463f
|
call Function463f
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $2
|
ld [hl], PERSON_ACTION_02
|
||||||
ld hl, OBJECT_STANDING_TILE
|
|
||||||
|
ld hl, OBJECT_NEXT_TILE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
call CheckSuperTallGrassTile
|
call CheckSuperTallGrassTile
|
||||||
jr z, .asm_542d
|
jr z, .shake_grass
|
||||||
|
|
||||||
call Function1875
|
call Function1875
|
||||||
jr c, .asm_5430
|
jr c, .skip_grass
|
||||||
|
|
||||||
.asm_542d
|
.shake_grass
|
||||||
call ShakeGrass
|
call ShakeGrass
|
||||||
|
|
||||||
.asm_5430
|
.skip_grass
|
||||||
ld hl, wd4cf
|
ld hl, wd4cf
|
||||||
ld a, [hMapObjectIndexBuffer]
|
ld a, [hMapObjectIndexBuffer]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr z, .asm_543f
|
jr z, .asm_543f
|
||||||
|
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_02
|
ld [hl], STEP_TYPE_02
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_543f
|
.asm_543f
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_06
|
ld [hl], STEP_TYPE_06
|
||||||
ret
|
ret
|
||||||
; 5446
|
; 5446
|
||||||
|
|
||||||
@ -771,20 +779,20 @@ TurningStep: ; 5446
|
|||||||
call Function463f
|
call Function463f
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $4
|
ld [hl], PERSON_ACTION_04
|
||||||
ld hl, wd4cf
|
ld hl, wd4cf
|
||||||
ld a, [hMapObjectIndexBuffer]
|
ld a, [hMapObjectIndexBuffer]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr z, .asm_5461
|
jr z, .asm_5461
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_02
|
ld [hl], STEP_TYPE_02
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_5461
|
.asm_5461
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_06
|
ld [hl], STEP_TYPE_06
|
||||||
ret
|
ret
|
||||||
; 5468
|
; 5468
|
||||||
|
|
||||||
@ -794,20 +802,20 @@ SlideStep: ; 5468
|
|||||||
call Function463f
|
call Function463f
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $1
|
ld [hl], PERSON_ACTION_01
|
||||||
ld hl, wd4cf
|
ld hl, wd4cf
|
||||||
ld a, [hMapObjectIndexBuffer]
|
ld a, [hMapObjectIndexBuffer]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr z, .asm_5483
|
jr z, .asm_5483
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_02
|
ld [hl], STEP_TYPE_02
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_5483
|
.asm_5483
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_06
|
ld [hl], STEP_TYPE_06
|
||||||
ret
|
ret
|
||||||
; 548a
|
; 548a
|
||||||
|
|
||||||
@ -822,20 +830,20 @@ JumpStep: ; 548a
|
|||||||
res 3, [hl]
|
res 3, [hl]
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $2
|
ld [hl], PERSON_ACTION_02
|
||||||
call SpawnShadow
|
call SpawnShadow
|
||||||
ld hl, wd4cf
|
ld hl, wd4cf
|
||||||
ld a, [hMapObjectIndexBuffer]
|
ld a, [hMapObjectIndexBuffer]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr z, .asm_54b1
|
jr z, .asm_54b1
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_08
|
ld [hl], STEP_TYPE_08
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_54b1
|
.asm_54b1
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_09_VALUE_09
|
ld [hl], STEP_TYPE_09
|
||||||
ret
|
ret
|
||||||
; 54b8
|
; 54b8
|
||||||
|
@ -13,11 +13,11 @@ _ReplaceKrisSprite:: ; 14135
|
|||||||
ld [hUsedSpriteIndex], a
|
ld [hUsedSpriteIndex], a
|
||||||
ld a, [UsedSprites + 1]
|
ld a, [UsedSprites + 1]
|
||||||
ld [hUsedSpriteTile], a
|
ld [hUsedSpriteTile], a
|
||||||
call Function143c8
|
call GetUsedSprite
|
||||||
ret
|
ret
|
||||||
; 14146
|
; 14146
|
||||||
|
|
||||||
Function14146: ; 14146
|
Function14146: ; mobile
|
||||||
ld hl, wSpriteFlags
|
ld hl, wSpriteFlags
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
push af
|
push af
|
||||||
@ -29,7 +29,7 @@ Function14146: ; 14146
|
|||||||
ret
|
ret
|
||||||
; 14157
|
; 14157
|
||||||
|
|
||||||
Function14157: ; 14157
|
Function14157: ; mobile
|
||||||
ld hl, wSpriteFlags
|
ld hl, wSpriteFlags
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
push af
|
push af
|
||||||
@ -168,23 +168,23 @@ endr
|
|||||||
RunCallback_04: ; 14209
|
RunCallback_04: ; 14209
|
||||||
ld a, $4
|
ld a, $4
|
||||||
call RunMapCallback
|
call RunMapCallback
|
||||||
call Function1439b
|
call GetUsedSprites
|
||||||
call Function14215
|
call .LoadMiscTiles
|
||||||
ret
|
ret
|
||||||
; 14215
|
; 14215
|
||||||
|
|
||||||
Function14215: ; 14215
|
.LoadMiscTiles: ; 14215
|
||||||
ld a, [wSpriteFlags]
|
ld a, [wSpriteFlags]
|
||||||
bit 6, a
|
bit 6, a
|
||||||
ret nz
|
ret nz
|
||||||
ld c, EMOTE_08
|
|
||||||
|
ld c, EMOTE_SHADOW
|
||||||
callba LoadEmote
|
callba LoadEmote
|
||||||
call GetMapPermission
|
call GetMapPermission
|
||||||
call CheckOutdoorMap
|
call CheckOutdoorMap
|
||||||
ld c, EMOTE_0B
|
ld c, EMOTE_0B
|
||||||
jr z, .outdoor
|
jr z, .outdoor
|
||||||
ld c, EMOTE_0A
|
ld c, EMOTE_BOULDER_DUST
|
||||||
|
|
||||||
.outdoor
|
.outdoor
|
||||||
callba LoadEmote
|
callba LoadEmote
|
||||||
ret
|
ret
|
||||||
@ -575,29 +575,34 @@ GetSpriteLength: ; 14386
|
|||||||
; 1439b
|
; 1439b
|
||||||
|
|
||||||
|
|
||||||
Function1439b: ; 1439b
|
GetUsedSprites: ; 1439b
|
||||||
ld hl, UsedSprites
|
ld hl, UsedSprites
|
||||||
ld c, SPRITE_GFX_LIST_CAPACITY
|
ld c, SPRITE_GFX_LIST_CAPACITY
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
ld a, [wSpriteFlags]
|
ld a, [wSpriteFlags]
|
||||||
res 5, a
|
res 5, a
|
||||||
ld [wSpriteFlags], a
|
ld [wSpriteFlags], a
|
||||||
|
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
and a
|
and a
|
||||||
jr z, .done
|
jr z, .done
|
||||||
ld [hUsedSpriteIndex], a
|
ld [hUsedSpriteIndex], a
|
||||||
|
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [hUsedSpriteTile], a
|
ld [hUsedSpriteTile], a
|
||||||
|
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr z, .dont_set
|
jr z, .dont_set
|
||||||
|
|
||||||
ld a, [wSpriteFlags]
|
ld a, [wSpriteFlags]
|
||||||
set 5, a
|
set 5, a ; load VBank0
|
||||||
ld [wSpriteFlags], a
|
ld [wSpriteFlags], a
|
||||||
|
|
||||||
.dont_set
|
.dont_set
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
call Function143c8
|
call GetUsedSprite
|
||||||
pop hl
|
pop hl
|
||||||
pop bc
|
pop bc
|
||||||
dec c
|
dec c
|
||||||
@ -607,7 +612,7 @@ Function1439b: ; 1439b
|
|||||||
ret
|
ret
|
||||||
; 143c8
|
; 143c8
|
||||||
|
|
||||||
Function143c8: ; 143c8
|
GetUsedSprite: ; 143c8
|
||||||
ld a, [hUsedSpriteIndex]
|
ld a, [hUsedSpriteIndex]
|
||||||
call SafeGetSprite
|
call SafeGetSprite
|
||||||
ld a, [hUsedSpriteTile]
|
ld a, [hUsedSpriteTile]
|
||||||
@ -632,14 +637,17 @@ endr
|
|||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
ld a, [wSpriteFlags]
|
ld a, [wSpriteFlags]
|
||||||
bit 5, a
|
bit 5, a
|
||||||
jr nz, .done
|
jr nz, .done
|
||||||
bit 6, a
|
bit 6, a
|
||||||
jr nz, .done
|
jr nz, .done
|
||||||
|
|
||||||
ld a, [hUsedSpriteIndex]
|
ld a, [hUsedSpriteIndex]
|
||||||
call _DoesSpriteHaveFacings
|
call _DoesSpriteHaveFacings
|
||||||
jr c, .done
|
jr c, .done
|
||||||
|
|
||||||
ld a, h
|
ld a, h
|
||||||
add $8
|
add $8
|
||||||
ld h, a
|
ld h, a
|
||||||
@ -716,7 +724,7 @@ LoadEmote:: ; 1442f
|
|||||||
emote_header: MACRO
|
emote_header: MACRO
|
||||||
dw \1
|
dw \1
|
||||||
db \2 tiles, BANK(\1)
|
db \2 tiles, BANK(\1)
|
||||||
dw \3
|
dw VTiles1 tile \3
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
EmotesPointers: ; 144d
|
EmotesPointers: ; 144d
|
||||||
@ -724,18 +732,18 @@ EmotesPointers: ; 144d
|
|||||||
; db length, bank
|
; db length, bank
|
||||||
; dw dest address
|
; dw dest address
|
||||||
|
|
||||||
emote_header ShockEmote, 4, VTiles1 tile $78
|
emote_header ShockEmote, 4, $78
|
||||||
emote_header QuestionEmote, 4, VTiles1 tile $78
|
emote_header QuestionEmote, 4, $78
|
||||||
emote_header HappyEmote, 4, VTiles1 tile $78
|
emote_header HappyEmote, 4, $78
|
||||||
emote_header SadEmote, 4, VTiles1 tile $78
|
emote_header SadEmote, 4, $78
|
||||||
emote_header HeartEmote, 4, VTiles1 tile $78
|
emote_header HeartEmote, 4, $78
|
||||||
emote_header BoltEmote, 4, VTiles1 tile $78
|
emote_header BoltEmote, 4, $78
|
||||||
emote_header SleepEmote, 4, VTiles1 tile $78
|
emote_header SleepEmote, 4, $78
|
||||||
emote_header FishEmote, 4, VTiles1 tile $78
|
emote_header FishEmote, 4, $78
|
||||||
emote_header JumpShadowGFX, 1, VTiles1 tile $7c
|
emote_header JumpShadowGFX, 1, $7c
|
||||||
emote_header FishingRodGFX2, 2, VTiles1 tile $7c
|
emote_header FishingRodGFX2, 2, $7c
|
||||||
emote_header BoulderDustGFX, 2, VTiles1 tile $7e
|
emote_header BoulderDustGFX, 2, $7e
|
||||||
emote_header FishingRodGFX4, 1, VTiles1 tile $7e
|
emote_header FishingRodGFX4, 1, $7e
|
||||||
; 14495
|
; 14495
|
||||||
|
|
||||||
|
|
||||||
|
22
home/map.asm
22
home/map.asm
@ -1238,9 +1238,9 @@ ScrollMapDown:: ; 272a
|
|||||||
call BackupBGMapRow
|
call BackupBGMapRow
|
||||||
ld c, 2 * SCREEN_WIDTH
|
ld c, 2 * SCREEN_WIDTH
|
||||||
call FarCallScrollBGMapPalettes
|
call FarCallScrollBGMapPalettes
|
||||||
ld a, [wBGMapAnchorLo]
|
ld a, [wBGMapAnchor]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wBGMapAnchorHi]
|
ld a, [wBGMapAnchor + 1]
|
||||||
ld d, a
|
ld d, a
|
||||||
call UpdateBGMapRow
|
call UpdateBGMapRow
|
||||||
ld a, $1
|
ld a, $1
|
||||||
@ -1254,9 +1254,9 @@ ScrollMapUp:: ; 2748
|
|||||||
call BackupBGMapRow
|
call BackupBGMapRow
|
||||||
ld c, 2 * SCREEN_WIDTH
|
ld c, 2 * SCREEN_WIDTH
|
||||||
call FarCallScrollBGMapPalettes
|
call FarCallScrollBGMapPalettes
|
||||||
ld a, [wBGMapAnchorLo]
|
ld a, [wBGMapAnchor]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, [wBGMapAnchorHi]
|
ld a, [wBGMapAnchor + 1]
|
||||||
ld h, a
|
ld h, a
|
||||||
ld bc, $0200
|
ld bc, $0200
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -1278,9 +1278,9 @@ ScrollMapLeft:: ; 2771
|
|||||||
call BackupBGMapColumn
|
call BackupBGMapColumn
|
||||||
ld c, 2 * SCREEN_HEIGHT
|
ld c, 2 * SCREEN_HEIGHT
|
||||||
call FarCallScrollBGMapPalettes
|
call FarCallScrollBGMapPalettes
|
||||||
ld a, [wBGMapAnchorLo]
|
ld a, [wBGMapAnchor]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wBGMapAnchorHi]
|
ld a, [wBGMapAnchor + 1]
|
||||||
ld d, a
|
ld d, a
|
||||||
call UpdateBGMapColumn
|
call UpdateBGMapColumn
|
||||||
ld a, $1
|
ld a, $1
|
||||||
@ -1294,7 +1294,7 @@ ScrollMapRight:: ; 278f
|
|||||||
call BackupBGMapColumn
|
call BackupBGMapColumn
|
||||||
ld c, 2 * SCREEN_HEIGHT
|
ld c, 2 * SCREEN_HEIGHT
|
||||||
call FarCallScrollBGMapPalettes
|
call FarCallScrollBGMapPalettes
|
||||||
ld a, [wBGMapAnchorLo]
|
ld a, [wBGMapAnchor]
|
||||||
ld e, a
|
ld e, a
|
||||||
and %11100000
|
and %11100000
|
||||||
ld b, a
|
ld b, a
|
||||||
@ -1303,7 +1303,7 @@ ScrollMapRight:: ; 278f
|
|||||||
and %00011111
|
and %00011111
|
||||||
or b
|
or b
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wBGMapAnchorHi]
|
ld a, [wBGMapAnchor + 1]
|
||||||
ld d, a
|
ld d, a
|
||||||
call UpdateBGMapColumn
|
call UpdateBGMapColumn
|
||||||
ld a, $1
|
ld a, $1
|
||||||
@ -1505,7 +1505,7 @@ SaveScreen:: ; 289d
|
|||||||
ld a, [MapWidth]
|
ld a, [MapWidth]
|
||||||
add $6
|
add $6
|
||||||
ld [hMapObjectIndexBuffer], a
|
ld [hMapObjectIndexBuffer], a
|
||||||
ld a, [wd151]
|
ld a, [wPlayerStepDirection]
|
||||||
and a
|
and a
|
||||||
jr z, .down
|
jr z, .down
|
||||||
cp UP
|
cp UP
|
||||||
@ -1599,11 +1599,11 @@ Function2914:: ; 2914
|
|||||||
ld a, [PlayerNextMapY]
|
ld a, [PlayerNextMapY]
|
||||||
ld e, a
|
ld e, a
|
||||||
call GetCoordTile
|
call GetCoordTile
|
||||||
ld [PlayerStandingTile], a
|
ld [PlayerNextTile], a
|
||||||
call Function29ff
|
call Function29ff
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
ld a, [PlayerStandingTile]
|
ld a, [PlayerNextTile]
|
||||||
and 7
|
and 7
|
||||||
ld hl, .data_2945
|
ld hl, .data_2945
|
||||||
add l
|
add l
|
||||||
|
@ -80,14 +80,14 @@ DoesSpriteHaveFacings:: ; 1836
|
|||||||
|
|
||||||
|
|
||||||
Function184a:: ; 184a
|
Function184a:: ; 184a
|
||||||
ld a, [PlayerStandingTile]
|
ld a, [PlayerNextTile]
|
||||||
call GetTileCollision
|
call GetTileCollision
|
||||||
ld b, a
|
ld b, a
|
||||||
ret
|
ret
|
||||||
; 1852
|
; 1852
|
||||||
|
|
||||||
CheckOnWater:: ; 1852
|
CheckOnWater:: ; 1852
|
||||||
ld a, [PlayerStandingTile]
|
ld a, [PlayerNextTile]
|
||||||
call GetTileCollision
|
call GetTileCollision
|
||||||
sub 1
|
sub 1
|
||||||
ret z
|
ret z
|
||||||
@ -211,7 +211,7 @@ CheckWaterfallTile:: ; 18bd
|
|||||||
; 18c3
|
; 18c3
|
||||||
|
|
||||||
CheckStandingOnEntrance:: ; 18c3
|
CheckStandingOnEntrance:: ; 18c3
|
||||||
ld a, [PlayerStandingTile]
|
ld a, [PlayerNextTile]
|
||||||
cp $71 ; door
|
cp $71 ; door
|
||||||
ret z
|
ret z
|
||||||
cp $79
|
cp $79
|
||||||
@ -447,7 +447,7 @@ LoadMovementDataPointer:: ; 19e9
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], SPRITEMOVEDATA_SCRIPTED
|
ld [hl], SPRITEMOVEDATA_SCRIPTED
|
||||||
|
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 0
|
ld [hl], 0
|
||||||
|
|
||||||
|
136
main.asm
136
main.asm
@ -1526,9 +1526,9 @@ Function6473: ; 6473
|
|||||||
ld a, VBGMap0 / $100
|
ld a, VBGMap0 / $100
|
||||||
call Function64b9
|
call Function64b9
|
||||||
xor a
|
xor a
|
||||||
ld [wd152], a
|
ld [wBGMapAnchor], a
|
||||||
ld a, $98
|
ld a, VBGMap0 / $100
|
||||||
ld [wd153], a
|
ld [wBGMapAnchor + 1], a
|
||||||
xor a
|
xor a
|
||||||
ld [hSCX], a
|
ld [hSCX], a
|
||||||
ld [hSCY], a
|
ld [hSCY], a
|
||||||
@ -2188,7 +2188,7 @@ Function6f07: ; 6f07
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
bit 7, [hl]
|
bit 7, [hl]
|
||||||
jp nz, Function6fa1
|
jp nz, Function6fa1
|
||||||
ld hl, OBJECT_STANDING_TILE
|
ld hl, OBJECT_NEXT_TILE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld d, a
|
ld d, a
|
||||||
@ -2202,7 +2202,7 @@ Function6f07: ; 6f07
|
|||||||
Function6f2c: ; 6f2c
|
Function6f2c: ; 6f2c
|
||||||
call Function6f5f
|
call Function6f5f
|
||||||
ret c
|
ret c
|
||||||
ld hl, OBJECT_STANDING_TILE
|
ld hl, OBJECT_NEXT_TILE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
call GetTileCollision
|
call GetTileCollision
|
||||||
@ -2213,7 +2213,7 @@ Function6f2c: ; 6f2c
|
|||||||
; 6f3e
|
; 6f3e
|
||||||
|
|
||||||
Function6f3e: ; 6f3e
|
Function6f3e: ; 6f3e
|
||||||
ld hl, OBJECT_STANDING_TILE
|
ld hl, OBJECT_NEXT_TILE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
call Function6f7f
|
call Function6f7f
|
||||||
@ -2239,7 +2239,7 @@ Function6f3e: ; 6f3e
|
|||||||
; 6f5f
|
; 6f5f
|
||||||
|
|
||||||
Function6f5f: ; 6f5f
|
Function6f5f: ; 6f5f
|
||||||
ld hl, OBJECT_NEXT_TILE
|
ld hl, OBJECT_STANDING_TILE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
call Function6f7f
|
call Function6f7f
|
||||||
@ -3488,7 +3488,7 @@ InitializeVisibleSprites: ; 8177
|
|||||||
|
|
||||||
Function81ca:: ; 81ca
|
Function81ca:: ; 81ca
|
||||||
nop
|
nop
|
||||||
ld a, [wd151]
|
ld a, [wPlayerStepDirection]
|
||||||
cp $ff
|
cp $ff
|
||||||
ret z
|
ret z
|
||||||
ld hl, .jumptable
|
ld hl, .jumptable
|
||||||
@ -3651,9 +3651,9 @@ CopyTempObjectToObjectStruct: ; 8286
|
|||||||
add hl, de
|
add hl, de
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, de
|
add hl, de
|
||||||
ld [hl], OBJECT_09_VALUE_00
|
ld [hl], STEP_TYPE_00
|
||||||
|
|
||||||
ld hl, OBJECT_FACING_STEP
|
ld hl, OBJECT_FACING_STEP
|
||||||
add hl, de
|
add hl, de
|
||||||
@ -3904,9 +3904,9 @@ FollowNotExact:: ; 839e
|
|||||||
ld hl, OBJECT_MOVEMENTTYPE
|
ld hl, OBJECT_MOVEMENTTYPE
|
||||||
add hl, de
|
add hl, de
|
||||||
ld [hl], SPRITEMOVEDATA_FOLLOWNOTEXACT
|
ld [hl], SPRITEMOVEDATA_FOLLOWNOTEXACT
|
||||||
ld hl, OBJECT_09
|
ld hl, OBJECT_STEP_TYPE
|
||||||
add hl, de
|
add hl, de
|
||||||
ld [hl], OBJECT_09_VALUE_00
|
ld [hl], STEP_TYPE_00
|
||||||
ret
|
ret
|
||||||
; 8417
|
; 8417
|
||||||
|
|
||||||
@ -5381,7 +5381,7 @@ Script_UsedWaterfall: ; 0xcb20
|
|||||||
CheckContinueWaterfall: ; cb38
|
CheckContinueWaterfall: ; cb38
|
||||||
xor a
|
xor a
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
ld a, [PlayerStandingTile]
|
ld a, [PlayerNextTile]
|
||||||
call CheckWaterfallTile
|
call CheckWaterfallTile
|
||||||
ret z
|
ret z
|
||||||
callba MobileFn_1060c1
|
callba MobileFn_1060c1
|
||||||
@ -6325,7 +6325,7 @@ Script_NotEvenANibble2: ; 0xd027
|
|||||||
writetext UnknownText_0xd0a9
|
writetext UnknownText_0xd0a9
|
||||||
|
|
||||||
Script_NotEvenANibble_FallThrough: ; 0xd02d
|
Script_NotEvenANibble_FallThrough: ; 0xd02d
|
||||||
loademote EMOTE_08
|
loademote EMOTE_SHADOW
|
||||||
callasm PutTheRodAway
|
callasm PutTheRodAway
|
||||||
loadmovesprites
|
loadmovesprites
|
||||||
end
|
end
|
||||||
@ -6396,7 +6396,7 @@ Script_FishCastRod: ; 0xd07c
|
|||||||
reloadmappart
|
reloadmappart
|
||||||
loadvar hBGMapMode, $0
|
loadvar hBGMapMode, $0
|
||||||
special UpdateTimePals
|
special UpdateTimePals
|
||||||
loademote EMOTE_09
|
loademote EMOTE_ROD
|
||||||
callasm LoadFishingGFX
|
callasm LoadFishingGFX
|
||||||
loademote EMOTE_SHOCK
|
loademote EMOTE_SHOCK
|
||||||
applymovement PLAYER, MovementData_0xd093
|
applymovement PLAYER, MovementData_0xd093
|
||||||
@ -7291,7 +7291,7 @@ GetItemPrice: ; d486
|
|||||||
|
|
||||||
|
|
||||||
Functiond497:: ; d497 (3:5497)
|
Functiond497:: ; d497 (3:5497)
|
||||||
ld a, [wd150]
|
ld a, [wPlayerStepFlags]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
bit 7, a
|
bit 7, a
|
||||||
@ -7311,9 +7311,9 @@ Functiond497:: ; d497 (3:5497)
|
|||||||
jr .asm_d4b8
|
jr .asm_d4b8
|
||||||
.asm_d4b8
|
.asm_d4b8
|
||||||
call Functiond4e5
|
call Functiond4e5
|
||||||
ld a, [wd14e]
|
ld a, [wPlayerStepVectorX]
|
||||||
ld d, a
|
ld d, a
|
||||||
ld a, [wd14f]
|
ld a, [wPlayerStepVectorY]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wd14c]
|
ld a, [wd14c]
|
||||||
sub d
|
sub d
|
||||||
@ -7324,9 +7324,9 @@ Functiond497:: ; d497 (3:5497)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Functiond4d2:: ; d4d2 (3:54d2)
|
Functiond4d2:: ; d4d2 (3:54d2)
|
||||||
ld a, [wd14e]
|
ld a, [wPlayerStepVectorX]
|
||||||
ld d, a
|
ld d, a
|
||||||
ld a, [wd14f]
|
ld a, [wPlayerStepVectorY]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [hSCX]
|
ld a, [hSCX]
|
||||||
add d
|
add d
|
||||||
@ -7372,7 +7372,7 @@ Jumptable_d4f2: ; d4f2 (3:54f2)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Functiond511: ; d511 (3:5511)
|
Functiond511: ; d511 (3:5511)
|
||||||
ld a, [wd151]
|
ld a, [wPlayerStepDirection]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_d51c
|
jr nz, .asm_d51c
|
||||||
ld hl, YCoord
|
ld hl, YCoord
|
||||||
@ -7398,7 +7398,7 @@ Functiond511: ; d511 (3:5511)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Functiond536: ; d536 (3:5536)
|
Functiond536: ; d536 (3:5536)
|
||||||
ld a, [wd151]
|
ld a, [wPlayerStepDirection]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_d549
|
jr z, .asm_d549
|
||||||
cp $1
|
cp $1
|
||||||
@ -7434,24 +7434,24 @@ Functiond536: ; d536 (3:5536)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Functiond571: ; d571 (3:5571)
|
Functiond571: ; d571 (3:5571)
|
||||||
ld a, [wd152]
|
ld a, [wBGMapAnchor]
|
||||||
add $40
|
add $40
|
||||||
ld [wd152], a
|
ld [wBGMapAnchor], a
|
||||||
jr nc, .asm_d586
|
jr nc, .not_overflowed
|
||||||
ld a, [wd153]
|
ld a, [wBGMapAnchor + 1]
|
||||||
inc a
|
inc a
|
||||||
and $3
|
and $3
|
||||||
or $98
|
or VBGMap0 / $100
|
||||||
ld [wd153], a
|
ld [wBGMapAnchor + 1], a
|
||||||
.asm_d586
|
.not_overflowed
|
||||||
ld hl, wd196
|
ld hl, wd196
|
||||||
inc [hl]
|
inc [hl]
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp $2
|
cp $2 ; was 1
|
||||||
jr nz, .asm_d594
|
jr nz, .skip
|
||||||
ld [hl], $0
|
ld [hl], $0
|
||||||
call Functiond595
|
call Functiond595
|
||||||
.asm_d594
|
.skip
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Functiond595: ; d595 (3:5595)
|
Functiond595: ; d595 (3:5595)
|
||||||
@ -7465,24 +7465,24 @@ Functiond595: ; d595 (3:5595)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Functiond5a2: ; d5a2 (3:55a2)
|
Functiond5a2: ; d5a2 (3:55a2)
|
||||||
ld a, [wd152]
|
ld a, [wBGMapAnchor]
|
||||||
sub $40
|
sub $40
|
||||||
ld [wd152], a
|
ld [wBGMapAnchor], a
|
||||||
jr nc, .asm_d5b7
|
jr nc, .not_underflowed
|
||||||
ld a, [wd153]
|
ld a, [wBGMapAnchor + 1]
|
||||||
dec a
|
dec a
|
||||||
and $3
|
and $3
|
||||||
or $98
|
or VBGMap0 / $100
|
||||||
ld [wd153], a
|
ld [wBGMapAnchor + 1], a
|
||||||
.asm_d5b7
|
.not_underflowed
|
||||||
ld hl, wd196
|
ld hl, wd196
|
||||||
dec [hl]
|
dec [hl]
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp $ff
|
cp $ff ; was 0
|
||||||
jr nz, .asm_d5c5
|
jr nz, .skip
|
||||||
ld [hl], $1
|
ld [hl], $1
|
||||||
call Functiond5c6
|
call Functiond5c6
|
||||||
.asm_d5c5
|
.skip
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Functiond5c6: ; d5c6 (3:55c6)
|
Functiond5c6: ; d5c6 (3:55c6)
|
||||||
@ -7498,7 +7498,7 @@ Functiond5c6: ; d5c6 (3:55c6)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Functiond5d5: ; d5d5 (3:55d5)
|
Functiond5d5: ; d5d5 (3:55d5)
|
||||||
ld a, [wd152]
|
ld a, [wBGMapAnchor]
|
||||||
ld e, a
|
ld e, a
|
||||||
and $e0
|
and $e0
|
||||||
ld d, a
|
ld d, a
|
||||||
@ -7506,7 +7506,7 @@ Functiond5d5: ; d5d5 (3:55d5)
|
|||||||
sub $2
|
sub $2
|
||||||
and $1f
|
and $1f
|
||||||
or d
|
or d
|
||||||
ld [wd152], a
|
ld [wBGMapAnchor], a
|
||||||
ld hl, wd197
|
ld hl, wd197
|
||||||
dec [hl]
|
dec [hl]
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -7527,7 +7527,7 @@ Functiond5f4: ; d5f4 (3:55f4)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Functiond5fe: ; d5fe (3:55fe)
|
Functiond5fe: ; d5fe (3:55fe)
|
||||||
ld a, [wd152]
|
ld a, [wBGMapAnchor]
|
||||||
ld e, a
|
ld e, a
|
||||||
and $e0
|
and $e0
|
||||||
ld d, a
|
ld d, a
|
||||||
@ -7535,7 +7535,7 @@ Functiond5fe: ; d5fe (3:55fe)
|
|||||||
add $2
|
add $2
|
||||||
and $1f
|
and $1f
|
||||||
or d
|
or d
|
||||||
ld [wd152], a
|
ld [wBGMapAnchor], a
|
||||||
ld hl, wd197
|
ld hl, wd197
|
||||||
inc [hl]
|
inc [hl]
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -11364,7 +11364,7 @@ Function140ed:: ; 140ed
|
|||||||
INCLUDE "engine/overworld.asm"
|
INCLUDE "engine/overworld.asm"
|
||||||
|
|
||||||
Function1499a:: ; 1499a
|
Function1499a:: ; 1499a
|
||||||
ld a, [PlayerStandingTile]
|
ld a, [PlayerNextTile]
|
||||||
cp $60
|
cp $60
|
||||||
jr z, .asm_149ad
|
jr z, .asm_149ad
|
||||||
cp $68
|
cp $68
|
||||||
@ -11381,7 +11381,7 @@ Function1499a:: ; 1499a
|
|||||||
; 149af
|
; 149af
|
||||||
|
|
||||||
Function149af:: ; 149af
|
Function149af:: ; 149af
|
||||||
ld a, [PlayerStandingTile]
|
ld a, [PlayerNextTile]
|
||||||
cp $70
|
cp $70
|
||||||
jr z, .asm_149c4
|
jr z, .asm_149c4
|
||||||
cp $76
|
cp $76
|
||||||
@ -11401,7 +11401,7 @@ Function149af:: ; 149af
|
|||||||
CheckWarpCollision: ; 149c6
|
CheckWarpCollision: ; 149c6
|
||||||
ld de, 1
|
ld de, 1
|
||||||
ld hl, .blocks
|
ld hl, .blocks
|
||||||
ld a, [PlayerStandingTile]
|
ld a, [PlayerNextTile]
|
||||||
call IsInArray
|
call IsInArray
|
||||||
ret
|
ret
|
||||||
; 149d3
|
; 149d3
|
||||||
@ -11420,7 +11420,7 @@ CheckWarpCollision: ; 149c6
|
|||||||
; 149dd
|
; 149dd
|
||||||
|
|
||||||
CheckGrassCollision:: ; 149dd
|
CheckGrassCollision:: ; 149dd
|
||||||
ld a, [PlayerStandingTile]
|
ld a, [PlayerNextTile]
|
||||||
ld hl, .blocks
|
ld hl, .blocks
|
||||||
ld de, 1
|
ld de, 1
|
||||||
call IsInArray
|
call IsInArray
|
||||||
@ -11460,7 +11460,7 @@ CheckCutCollision: ; 149f5
|
|||||||
; 14a07
|
; 14a07
|
||||||
|
|
||||||
Function14a07:: ; 14a07
|
Function14a07:: ; 14a07
|
||||||
ld a, [PlayerStandingTile]
|
ld a, [PlayerNextTile]
|
||||||
ld de, $1f
|
ld de, $1f
|
||||||
cp $71 ; door
|
cp $71 ; door
|
||||||
ret z
|
ret z
|
||||||
@ -34139,7 +34139,7 @@ CheckTileMovement: ; 800b7
|
|||||||
; Tiles such as waterfalls and warps move the player
|
; Tiles such as waterfalls and warps move the player
|
||||||
; in a given direction, overriding input.
|
; in a given direction, overriding input.
|
||||||
|
|
||||||
ld a, [PlayerStandingTile]
|
ld a, [PlayerNextTile]
|
||||||
ld c, a
|
ld c, a
|
||||||
call CheckWhirlpoolTile
|
call CheckWhirlpoolTile
|
||||||
jr c, .asm_800c4
|
jr c, .asm_800c4
|
||||||
@ -34300,7 +34300,7 @@ TryStep: ; 8016b
|
|||||||
cp 2
|
cp 2
|
||||||
jr z, .bump
|
jr z, .bump
|
||||||
|
|
||||||
ld a, [PlayerStandingTile]
|
ld a, [PlayerNextTile]
|
||||||
call CheckIceTile
|
call CheckIceTile
|
||||||
jr nc, .ice
|
jr nc, .ice
|
||||||
|
|
||||||
@ -34387,7 +34387,7 @@ TrySurfStep: ; 801c0
|
|||||||
|
|
||||||
|
|
||||||
TryJumpLedge: ; 801f3
|
TryJumpLedge: ; 801f3
|
||||||
ld a, [PlayerStandingTile]
|
ld a, [PlayerNextTile]
|
||||||
ld e, a
|
ld e, a
|
||||||
and $f0
|
and $f0
|
||||||
cp $a0 ; ledge
|
cp $a0 ; ledge
|
||||||
@ -34439,7 +34439,7 @@ CheckEdgeWarp: ; 80226
|
|||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, .EdgeWarps
|
ld hl, .EdgeWarps
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [PlayerStandingTile]
|
ld a, [PlayerNextTile]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr nz, .nope
|
jr nz, .nope
|
||||||
|
|
||||||
@ -34647,7 +34647,7 @@ GetMovementAction: ; 802ec
|
|||||||
; tile collision pointer
|
; tile collision pointer
|
||||||
.table1
|
.table1
|
||||||
db STANDING, FACE_CURRENT, 0, 0
|
db STANDING, FACE_CURRENT, 0, 0
|
||||||
dw PlayerStandingTile
|
dw PlayerNextTile
|
||||||
.table2
|
.table2
|
||||||
db RIGHT, FACE_RIGHT, 1, 0
|
db RIGHT, FACE_RIGHT, 1, 0
|
||||||
dw TileRight
|
dw TileRight
|
||||||
@ -34859,7 +34859,7 @@ CheckStandingOnIce:: ; 80404
|
|||||||
jr z, .nope
|
jr z, .nope
|
||||||
cp $f0
|
cp $f0
|
||||||
jr z, .nope
|
jr z, .nope
|
||||||
ld a, [PlayerStandingTile]
|
ld a, [PlayerNextTile]
|
||||||
call CheckIceTile
|
call CheckIceTile
|
||||||
jr nc, .yep
|
jr nc, .yep
|
||||||
ld a, [PlayerState]
|
ld a, [PlayerState]
|
||||||
@ -50406,23 +50406,23 @@ Function104309:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function10433a: ; 10433a (41:433a)
|
Function10433a: ; 10433a (41:433a)
|
||||||
ld b, $4
|
ld b, 4
|
||||||
.asm_10433c
|
.outer_loop
|
||||||
ld c, $14
|
ld c, 20
|
||||||
.asm_10433e
|
.inner_loop
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
inc de
|
inc de
|
||||||
dec c
|
dec c
|
||||||
jr nz, .asm_10433e
|
jr nz, .inner_loop
|
||||||
ld a, l
|
ld a, l
|
||||||
add $c
|
add $20 - 20
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, h
|
ld a, h
|
||||||
adc $0
|
adc $0
|
||||||
ld h, a
|
ld h, a
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_10433c
|
jr nz, .outer_loop
|
||||||
ret
|
ret
|
||||||
; 104350
|
; 104350
|
||||||
|
|
||||||
@ -50460,7 +50460,7 @@ RunCallback_03: ; 1045c4
|
|||||||
|
|
||||||
EnterMapConnection: ; 1045d6
|
EnterMapConnection: ; 1045d6
|
||||||
; Return carry if a connection has been entered.
|
; Return carry if a connection has been entered.
|
||||||
ld a, [wd151]
|
ld a, [wPlayerStepDirection]
|
||||||
and a
|
and a
|
||||||
jp z, EnterSouthConnection
|
jp z, EnterSouthConnection
|
||||||
cp 1
|
cp 1
|
||||||
@ -50687,9 +50687,9 @@ LoadMapTimeOfDay: ; 104750
|
|||||||
|
|
||||||
Function104770: ; 104770 (41:4770)
|
Function104770: ; 104770 (41:4770)
|
||||||
ld a, $98
|
ld a, $98
|
||||||
ld [wd153], a
|
ld [wBGMapAnchor + 1], a
|
||||||
xor a
|
xor a
|
||||||
ld [wd152], a
|
ld [wBGMapAnchor], a
|
||||||
ld [hSCY], a
|
ld [hSCY], a
|
||||||
ld [hSCX], a
|
ld [hSCX], a
|
||||||
callba Function5958
|
callba Function5958
|
||||||
@ -50776,7 +50776,7 @@ RefreshMapSprites: ; 1047f0
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
CheckMovingOffEdgeOfMap:: ; 104820 (41:4820)
|
CheckMovingOffEdgeOfMap:: ; 104820 (41:4820)
|
||||||
ld a, [wd151]
|
ld a, [wPlayerStepDirection]
|
||||||
cp STANDING
|
cp STANDING
|
||||||
ret z
|
ret z
|
||||||
and a ; DOWN
|
and a ; DOWN
|
||||||
|
@ -1297,7 +1297,7 @@ Function_LoadOpponentTrainerAndPokemonsWithOTSprite: ; 0x170b44
|
|||||||
ld [hUsedSpriteIndex], a
|
ld [hUsedSpriteIndex], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [hUsedSpriteTile], a
|
ld [hUsedSpriteTile], a
|
||||||
callba Function143c8
|
callba GetUsedSprite
|
||||||
ret
|
ret
|
||||||
; 170b90
|
; 170b90
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ Tileset03Anim: ; 0xfc01b
|
|||||||
dw NULL, AnimateFlowerTile
|
dw NULL, AnimateFlowerTile
|
||||||
dw NULL, WaitTileAnimation
|
dw NULL, WaitTileAnimation
|
||||||
dw NULL, WaitTileAnimation
|
dw NULL, WaitTileAnimation
|
||||||
dw NULL, CurTileFrame8
|
dw NULL, StandingTileFrame8
|
||||||
dw NULL, DoneTileAnimation
|
dw NULL, DoneTileAnimation
|
||||||
; 0xfc047
|
; 0xfc047
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ Tileset25Anim: ; 0xfc047
|
|||||||
dw NULL, AnimateFlowerTile
|
dw NULL, AnimateFlowerTile
|
||||||
dw NULL, WaitTileAnimation
|
dw NULL, WaitTileAnimation
|
||||||
dw NULL, WaitTileAnimation
|
dw NULL, WaitTileAnimation
|
||||||
dw NULL, CurTileFrame8
|
dw NULL, StandingTileFrame8
|
||||||
dw NULL, DoneTileAnimation
|
dw NULL, DoneTileAnimation
|
||||||
; 0xfc073
|
; 0xfc073
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ Tileset31Anim: ; 0xfc073
|
|||||||
dw NULL, AnimateFlowerTile
|
dw NULL, AnimateFlowerTile
|
||||||
dw VTiles2 tile $14, AnimateWaterTile
|
dw VTiles2 tile $14, AnimateWaterTile
|
||||||
dw NULL, TileAnimationPalette
|
dw NULL, TileAnimationPalette
|
||||||
dw NULL, CurTileFrame8
|
dw NULL, StandingTileFrame8
|
||||||
dw NULL, DoneTileAnimation
|
dw NULL, DoneTileAnimation
|
||||||
; 0xfc0a3
|
; 0xfc0a3
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ Tileset01Anim: ; 0xfc0a3
|
|||||||
dw WhirlpoolFrames3, AnimateWhirlpoolTile
|
dw WhirlpoolFrames3, AnimateWhirlpoolTile
|
||||||
dw WhirlpoolFrames4, AnimateWhirlpoolTile
|
dw WhirlpoolFrames4, AnimateWhirlpoolTile
|
||||||
dw NULL, WaitTileAnimation
|
dw NULL, WaitTileAnimation
|
||||||
dw NULL, CurTileFrame8
|
dw NULL, StandingTileFrame8
|
||||||
dw NULL, DoneTileAnimation
|
dw NULL, DoneTileAnimation
|
||||||
; 0xfc0d7
|
; 0xfc0d7
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ Tileset09Anim: ; 0xfc12f
|
|||||||
dw NULL, WaitTileAnimation
|
dw NULL, WaitTileAnimation
|
||||||
dw NULL, WaitTileAnimation
|
dw NULL, WaitTileAnimation
|
||||||
dw NULL, WaitTileAnimation
|
dw NULL, WaitTileAnimation
|
||||||
dw NULL, CurTileFrame8
|
dw NULL, StandingTileFrame8
|
||||||
dw NULL, DoneTileAnimation
|
dw NULL, DoneTileAnimation
|
||||||
; 0xfc15f
|
; 0xfc15f
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ Tileset15Anim: ; 0xfc15f
|
|||||||
dw NULL, WaitTileAnimation
|
dw NULL, WaitTileAnimation
|
||||||
dw NULL, SafariFountainAnim1
|
dw NULL, SafariFountainAnim1
|
||||||
dw NULL, WaitTileAnimation
|
dw NULL, WaitTileAnimation
|
||||||
dw NULL, CurTileFrame8
|
dw NULL, StandingTileFrame8
|
||||||
dw NULL, DoneTileAnimation
|
dw NULL, DoneTileAnimation
|
||||||
; 0xfc17f
|
; 0xfc17f
|
||||||
|
|
||||||
@ -239,7 +239,7 @@ Tileset23Anim: ; 0xfc27f
|
|||||||
dw SproutPillarTilePointer4, AnimateSproutPillarTile
|
dw SproutPillarTilePointer4, AnimateSproutPillarTile
|
||||||
dw SproutPillarTilePointer1, AnimateSproutPillarTile
|
dw SproutPillarTilePointer1, AnimateSproutPillarTile
|
||||||
dw SproutPillarTilePointer2, AnimateSproutPillarTile
|
dw SproutPillarTilePointer2, AnimateSproutPillarTile
|
||||||
dw NULL, CurTileFrame
|
dw NULL, StandingTileFrame
|
||||||
dw NULL, WaitTileAnimation
|
dw NULL, WaitTileAnimation
|
||||||
dw NULL, WaitTileAnimation
|
dw NULL, WaitTileAnimation
|
||||||
dw NULL, WaitTileAnimation
|
dw NULL, WaitTileAnimation
|
||||||
@ -302,7 +302,7 @@ WaitTileAnimation: ; fc2fe
|
|||||||
ret
|
ret
|
||||||
; fc2ff
|
; fc2ff
|
||||||
|
|
||||||
CurTileFrame8: ; fc2ff
|
StandingTileFrame8: ; fc2ff
|
||||||
ld a, [TileAnimationTimer]
|
ld a, [TileAnimationTimer]
|
||||||
inc a
|
inc a
|
||||||
and a, 7
|
and a, 7
|
||||||
@ -806,7 +806,7 @@ AnimateSproutPillarTile: ; fc645
|
|||||||
; fc673
|
; fc673
|
||||||
|
|
||||||
|
|
||||||
CurTileFrame: ; fc673
|
StandingTileFrame: ; fc673
|
||||||
ld hl, TileAnimationTimer
|
ld hl, TileAnimationTimer
|
||||||
inc [hl]
|
inc [hl]
|
||||||
ret
|
ret
|
||||||
|
21
wram.asm
21
wram.asm
@ -1735,15 +1735,14 @@ wd14b:: ds 1
|
|||||||
|
|
||||||
wd14c:: ds 1 ; used in FollowNotExact
|
wd14c:: ds 1 ; used in FollowNotExact
|
||||||
wd14d:: ds 1 ; used in FollowNotExact
|
wd14d:: ds 1 ; used in FollowNotExact
|
||||||
|
|
||||||
; Player movement
|
; Player movement
|
||||||
wd14e:: ds 1
|
wPlayerStepVectorX:: ds 1
|
||||||
wd14f:: ds 1
|
wPlayerStepVectorY:: ds 1
|
||||||
wd150:: ds 1
|
wPlayerStepFlags:: ds 1
|
||||||
wd151:: ds 1
|
wPlayerStepDirection:: ds 1
|
||||||
wBGMapAnchorLo::
|
|
||||||
wd152:: ds 1
|
wBGMapAnchor:: ds 2
|
||||||
wBGMapAnchorHi::
|
|
||||||
wd153:: ds 1
|
|
||||||
|
|
||||||
UsedSprites:: ds 64 ; d154
|
UsedSprites:: ds 64 ; d154
|
||||||
UsedSpritesEnd::
|
UsedSpritesEnd::
|
||||||
@ -2218,13 +2217,13 @@ object_struct: MACRO
|
|||||||
\1Palette:: ds 1
|
\1Palette:: ds 1
|
||||||
\1Walking:: ds 1
|
\1Walking:: ds 1
|
||||||
\1Direction:: ds 1
|
\1Direction:: ds 1
|
||||||
\1Object09:: ds 1
|
\1StepType:: ds 1
|
||||||
\1StepDuration:: ds 1
|
\1StepDuration:: ds 1
|
||||||
\1Action:: ds 1
|
\1Action:: ds 1
|
||||||
\1Object12:: ds 1
|
\1Object12:: ds 1
|
||||||
\1Facing:: ds 1
|
\1Facing:: ds 1
|
||||||
\1StandingTile:: ds 1 ; collision
|
\1NextTile:: ds 1 ; collision
|
||||||
\1CurTile:: ds 1 ; collision
|
\1StandingTile:: ds 1 ; collision
|
||||||
\1NextMapX:: ds 1
|
\1NextMapX:: ds 1
|
||||||
\1NextMapY:: ds 1
|
\1NextMapY:: ds 1
|
||||||
\1MapX:: ds 1
|
\1MapX:: ds 1
|
||||||
|
Loading…
Reference in New Issue
Block a user