You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
More map object, swap StandingTile and NextTile
This commit is contained in:
@@ -527,13 +527,13 @@ const_value SET 1
|
||||
const OBJECT_PALETTE
|
||||
const OBJECT_DIRECTION_WALKING
|
||||
const OBJECT_FACING
|
||||
const OBJECT_09
|
||||
const OBJECT_STEP_TYPE
|
||||
const OBJECT_STEP_DURATION
|
||||
const OBJECT_ACTION
|
||||
const OBJECT_12
|
||||
const OBJECT_FACING_STEP
|
||||
const OBJECT_STANDING_TILE
|
||||
const OBJECT_NEXT_TILE
|
||||
const OBJECT_STANDING_TILE
|
||||
const OBJECT_NEXT_MAP_X
|
||||
const OBJECT_NEXT_MAP_Y
|
||||
const OBJECT_MAP_X
|
||||
@@ -590,9 +590,9 @@ OW_RIGHT EQU RIGHT << 2
|
||||
const EMOTE_BOLT ; 5
|
||||
const EMOTE_SLEEP ; 6
|
||||
const EMOTE_FISH ; 7
|
||||
const EMOTE_08 ; 8
|
||||
const EMOTE_09 ; 9
|
||||
const EMOTE_0A ; 10
|
||||
const EMOTE_SHADOW ; 8
|
||||
const EMOTE_ROD ; 9
|
||||
const EMOTE_BOULDER_DUST ; 10
|
||||
const EMOTE_0B ; 11
|
||||
EMOTE_MEM EQU -1
|
||||
|
||||
|
@@ -268,29 +268,48 @@ SPRITEMOVEDATA_FIELDS EQU 6
|
||||
MAX_OUTDOOR_SPRITES EQU 23
|
||||
|
||||
const_def
|
||||
const OBJECT_09_VALUE_00
|
||||
const OBJECT_09_VALUE_01 ; standing
|
||||
const OBJECT_09_VALUE_02 ; walking
|
||||
const OBJECT_09_VALUE_03 ; bumping
|
||||
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
|
||||
const STEP_TYPE_00
|
||||
const STEP_TYPE_01 ; standing
|
||||
const STEP_TYPE_02 ; walking
|
||||
const STEP_TYPE_03 ; bumping
|
||||
const STEP_TYPE_04
|
||||
const STEP_TYPE_05
|
||||
const STEP_TYPE_06
|
||||
const STEP_TYPE_07
|
||||
const STEP_TYPE_08
|
||||
const STEP_TYPE_09
|
||||
const STEP_TYPE_0A
|
||||
const STEP_TYPE_0B
|
||||
const STEP_TYPE_0C
|
||||
const STEP_TYPE_0D
|
||||
const STEP_TYPE_0E
|
||||
const STEP_TYPE_0F
|
||||
const STEP_TYPE_10
|
||||
const STEP_TYPE_11
|
||||
const STEP_TYPE_12
|
||||
const STEP_TYPE_13
|
||||
const STEP_TYPE_14
|
||||
const STEP_TYPE_15
|
||||
const STEP_TYPE_16
|
||||
const STEP_TYPE_17
|
||||
const STEP_TYPE_18
|
||||
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
|
||||
|
||||
Function967f4: ; 967f4
|
||||
ld a, [wd150]
|
||||
ld a, [wPlayerStepFlags]
|
||||
bit 5, a
|
||||
jr z, .events
|
||||
bit 6, a
|
||||
@@ -273,7 +273,7 @@ Function967f4: ; 967f4
|
||||
; 96812
|
||||
|
||||
Function96812: ; 96812
|
||||
ld hl, wd150
|
||||
ld hl, wPlayerStepFlags
|
||||
bit 6, [hl]
|
||||
ret z
|
||||
|
||||
@@ -396,7 +396,7 @@ CheckTileEvent: ; 96874
|
||||
ret
|
||||
|
||||
.warp_tile
|
||||
ld a, [PlayerStandingTile]
|
||||
ld a, [PlayerNextTile]
|
||||
call CheckPitTile
|
||||
jr nz, .not_pit
|
||||
ld a, PLAYEREVENT_FALL
|
||||
|
@@ -161,7 +161,7 @@ CanUseSweetScent:: ; 97cfd
|
||||
jr nc, .no
|
||||
|
||||
.ice_check
|
||||
ld a, [PlayerStandingTile]
|
||||
ld a, [PlayerNextTile]
|
||||
call CheckIceTile
|
||||
jr z, .no
|
||||
scf
|
||||
@@ -235,7 +235,7 @@ ChooseWildEncounter_BugContest:: ; 97d31
|
||||
; 97d64
|
||||
|
||||
TryWildEncounter_BugContest: ; 97d64
|
||||
ld a, [PlayerStandingTile]
|
||||
ld a, [PlayerNextTile]
|
||||
call CheckSuperTallGrassTile
|
||||
ld b, 40 percent
|
||||
jr z, .ok
|
||||
|
@@ -50,7 +50,7 @@ BEHIND_BG EQU 1 << OAM_PRIORITY
|
||||
Facing00:
|
||||
Facing02:
|
||||
Facing24:
|
||||
Facing26: ; 408b
|
||||
Facing26: ; standing down
|
||||
db 4 ; #
|
||||
db 0, 0, 0, $00
|
||||
db 0, 8, 0, $01
|
||||
@@ -58,7 +58,7 @@ Facing26: ; 408b
|
||||
db 8, 8, 2, $03
|
||||
; 409c
|
||||
|
||||
Facing01: ; 409c
|
||||
Facing01: ; walking down 1
|
||||
db 4 ; #
|
||||
db 0, 0, 0, $80
|
||||
db 0, 8, 0, $81
|
||||
@@ -66,7 +66,7 @@ Facing01: ; 409c
|
||||
db 8, 8, 2, $83
|
||||
; 40ad
|
||||
|
||||
Facing03: ; 40ad
|
||||
Facing03: ; walking down 2
|
||||
db 4 ; #
|
||||
db 0, 8, X_FLIP, $80
|
||||
db 0, 0, X_FLIP, $81
|
||||
@@ -75,7 +75,7 @@ Facing03: ; 40ad
|
||||
; 40be
|
||||
|
||||
Facing04:
|
||||
Facing06: ; 40be
|
||||
Facing06: ; standing up
|
||||
db 4 ; #
|
||||
db 0, 0, 0, $04
|
||||
db 0, 8, 0, $05
|
||||
@@ -83,7 +83,7 @@ Facing06: ; 40be
|
||||
db 8, 8, 2, $07
|
||||
; 40cf
|
||||
|
||||
Facing05: ; 40cf
|
||||
Facing05: ; walking up 1
|
||||
db 4 ; #
|
||||
db 0, 0, 0, $84
|
||||
db 0, 8, 0, $85
|
||||
@@ -91,7 +91,7 @@ Facing05: ; 40cf
|
||||
db 8, 8, 2, $87
|
||||
; 40e0
|
||||
|
||||
Facing07: ; 40e0
|
||||
Facing07: ; walking up 2
|
||||
db 4 ; #
|
||||
db 0, 8, X_FLIP, $84
|
||||
db 0, 0, X_FLIP, $85
|
||||
@@ -100,7 +100,7 @@ Facing07: ; 40e0
|
||||
; 40f1
|
||||
|
||||
Facing08:
|
||||
Facing10: ; 40f1
|
||||
Facing10: ; standing left
|
||||
db 4 ; #
|
||||
db 0, 0, 0, $08
|
||||
db 0, 8, 0, $09
|
||||
@@ -109,7 +109,7 @@ Facing10: ; 40f1
|
||||
; 4102
|
||||
|
||||
Facing12:
|
||||
Facing14: ; 4102
|
||||
Facing14: ; standing right
|
||||
db 4 ; #
|
||||
db 0, 8, X_FLIP, $08
|
||||
db 0, 0, X_FLIP, $09
|
||||
@@ -118,7 +118,7 @@ Facing14: ; 4102
|
||||
; 4113
|
||||
|
||||
Facing09:
|
||||
Facing11: ; 4113
|
||||
Facing11: ; walking left
|
||||
db 4 ; #
|
||||
db 0, 0, 0, $88
|
||||
db 0, 8, 0, $89
|
||||
@@ -127,7 +127,7 @@ Facing11: ; 4113
|
||||
; 4124
|
||||
|
||||
Facing13:
|
||||
Facing15: ; 4124
|
||||
Facing15: ; walking right
|
||||
db 4 ; #
|
||||
db 0, 8, X_FLIP, $88
|
||||
db 0, 0, X_FLIP, $89
|
||||
@@ -135,7 +135,7 @@ Facing15: ; 4124
|
||||
db 8, 0, 2 | X_FLIP, $8b
|
||||
; 4135
|
||||
|
||||
Facing16: ; 4135
|
||||
Facing16: ; fishing down
|
||||
db 5 ; #
|
||||
db 0, 0, 0, $00
|
||||
db 0, 8, 0, $01
|
||||
@@ -144,7 +144,7 @@ Facing16: ; 4135
|
||||
db 16, 0, 4, $fc
|
||||
; 414a
|
||||
|
||||
Facing17: ; 414a
|
||||
Facing17: ; fishing up
|
||||
db 5 ; #
|
||||
db 0, 0, 0, $04
|
||||
db 0, 8, 0, $05
|
||||
@@ -153,7 +153,7 @@ Facing17: ; 414a
|
||||
db -8, 0, 4, $fc
|
||||
; 415f
|
||||
|
||||
Facing18: ; 415f
|
||||
Facing18: ; fishing left
|
||||
db 5 ; #
|
||||
db 0, 0, 0, $08
|
||||
db 0, 8, 0, $09
|
||||
@@ -162,7 +162,7 @@ Facing18: ; 415f
|
||||
db 5, -8, 4 | X_FLIP, $fd
|
||||
; 4174
|
||||
|
||||
Facing19: ; 4174
|
||||
Facing19: ; fishing right
|
||||
db 5 ; #
|
||||
db 0, 8, X_FLIP, $08
|
||||
db 0, 0, X_FLIP, $09
|
||||
@@ -171,7 +171,7 @@ Facing19: ; 4174
|
||||
db 5, 16, 4, $fd
|
||||
; 4189
|
||||
|
||||
Facing20: ; 4189
|
||||
Facing20: ; emote
|
||||
db 4 ; #
|
||||
db 0, 0, 4, $f8
|
||||
db 0, 8, 4, $f9
|
||||
@@ -179,13 +179,13 @@ Facing20: ; 4189
|
||||
db 8, 8, 4, $fb
|
||||
; 419a
|
||||
|
||||
Facing21: ; 419a
|
||||
Facing21: ; shadow
|
||||
db 2 ; #
|
||||
db 0, 0, 4, $fc
|
||||
db 0, 8, 4 | X_FLIP, $fc
|
||||
; 41a3
|
||||
|
||||
Facing23: ; 41a3
|
||||
Facing23: ; big doll
|
||||
db 16 ; #
|
||||
db 0, 0, 0, $00
|
||||
db 0, 8, 0, $01
|
||||
@@ -239,7 +239,7 @@ Facing22: ; 4206
|
||||
db 24, 16, 0, $0b
|
||||
; 423f
|
||||
|
||||
Facing28: ; 423f
|
||||
Facing28: ; boulder dust 1
|
||||
db 4 ; #
|
||||
db 0, 0, 4, $fe
|
||||
db 0, 8, 4, $fe
|
||||
@@ -247,7 +247,7 @@ Facing28: ; 423f
|
||||
db 8, 8, 4, $fe
|
||||
; 4250
|
||||
|
||||
Facing29: ; 4250
|
||||
Facing29: ; boulder dust 2
|
||||
db 4 ; #
|
||||
db 0, 0, 4, $ff
|
||||
db 0, 8, 4, $ff
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -93,30 +93,30 @@ MovementPointers: ; 5075
|
||||
|
||||
|
||||
Movement_teleport_from: ; 5129
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_0C
|
||||
ld [hl], STEP_TYPE_0C
|
||||
ret
|
||||
; 5130
|
||||
|
||||
Movement_teleport_to: ; 5130
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_0D
|
||||
ld [hl], STEP_TYPE_0D
|
||||
ret
|
||||
; 5137
|
||||
|
||||
Movement_skyfall: ; 5137
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_0E
|
||||
ld [hl], STEP_TYPE_0E
|
||||
ret
|
||||
; 513e
|
||||
|
||||
Movement_59: ; 513e
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_19
|
||||
ld [hl], STEP_TYPE_19
|
||||
ret
|
||||
; 5145
|
||||
|
||||
@@ -129,14 +129,14 @@ Movement_step_wait5: ; 5145
|
||||
ld [hl], a
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, bc
|
||||
ld [hl], $4
|
||||
ld [hl], PERSON_ACTION_04
|
||||
call GetMovementByte
|
||||
ld hl, OBJECT_STEP_DURATION
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_03
|
||||
ld [hl], STEP_TYPE_03
|
||||
ld hl, OBJECT_DIRECTION_WALKING
|
||||
add hl, bc
|
||||
ld [hl], STANDING
|
||||
@@ -157,19 +157,19 @@ Movement_58: ; 516a
|
||||
ld hl, OBJECT_DIRECTION_WALKING
|
||||
add hl, bc
|
||||
ld [hl], STANDING
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_12
|
||||
ld [hl], STEP_TYPE_12
|
||||
ret
|
||||
; 5189
|
||||
|
||||
Movement_fish_got_bite: ; 5189
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, bc
|
||||
ld [hl], $6
|
||||
ld hl, OBJECT_09
|
||||
ld [hl], PERSON_ACTION_06
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_10
|
||||
ld [hl], STEP_TYPE_10
|
||||
ret
|
||||
; 5196
|
||||
|
||||
@@ -180,20 +180,20 @@ Movement_rock_smash: ; 5196
|
||||
ld [hl], a
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, bc
|
||||
ld [hl], $1
|
||||
ld hl, OBJECT_09
|
||||
ld [hl], PERSON_ACTION_01
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_11
|
||||
ld [hl], STEP_TYPE_11
|
||||
ret
|
||||
; 51ab
|
||||
|
||||
Movement_fish_cast_rod: ; 51ab
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, bc
|
||||
ld [hl], $6
|
||||
ld hl, OBJECT_09
|
||||
ld [hl], PERSON_ACTION_06
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_01
|
||||
ld [hl], STEP_TYPE_01
|
||||
ret
|
||||
; 51b8
|
||||
|
||||
@@ -217,9 +217,9 @@ Movement_step_end: ; 51c1
|
||||
ld hl, VramState
|
||||
res 7, [hl]
|
||||
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_01
|
||||
ld [hl], STEP_TYPE_01
|
||||
ret
|
||||
; 51db
|
||||
|
||||
@@ -238,9 +238,9 @@ Movement_48: ; 51db
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_03
|
||||
ld [hl], STEP_TYPE_03
|
||||
|
||||
ld hl, VramState
|
||||
res 7, [hl]
|
||||
@@ -264,11 +264,11 @@ Movement_remove_person: ; 51fd
|
||||
Movement_4b: ; 5210
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, bc
|
||||
ld [hl], $1
|
||||
ld [hl], PERSON_ACTION_01
|
||||
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_04
|
||||
ld [hl], STEP_TYPE_04
|
||||
|
||||
ld hl, VramState
|
||||
res 7, [hl]
|
||||
@@ -319,13 +319,13 @@ Movement_step_sleep_common: ; 5247
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_03
|
||||
ld [hl], STEP_TYPE_03
|
||||
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, bc
|
||||
ld [hl], $1
|
||||
ld [hl], PERSON_ACTION_01
|
||||
|
||||
ld hl, OBJECT_DIRECTION_WALKING
|
||||
add hl, bc
|
||||
@@ -338,12 +338,12 @@ Movement_step_bump: ; 525f
|
||||
ld hl, OBJECT_STEP_DURATION
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_0B
|
||||
ld [hl], STEP_TYPE_0B
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, bc
|
||||
ld [hl], $3
|
||||
ld [hl], PERSON_ACTION_03
|
||||
ld hl, OBJECT_DIRECTION_WALKING
|
||||
add hl, bc
|
||||
ld [hl], STANDING
|
||||
@@ -351,16 +351,19 @@ Movement_step_bump: ; 525f
|
||||
; 5279
|
||||
|
||||
Movement_56: ; 5279
|
||||
ld a, $18
|
||||
ld a, 24
|
||||
ld hl, OBJECT_STEP_DURATION
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ld hl, OBJECT_09
|
||||
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_03
|
||||
ld [hl], STEP_TYPE_03
|
||||
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, bc
|
||||
ld [hl], $b
|
||||
ld [hl], PERSON_ACTION_0B
|
||||
|
||||
ld hl, OBJECT_DIRECTION_WALKING
|
||||
add hl, bc
|
||||
ld [hl], STANDING
|
||||
@@ -448,9 +451,11 @@ TurnHead: ; 52ee
|
||||
ld hl, OBJECT_FACING
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, bc
|
||||
ld [hl], $1
|
||||
ld [hl], PERSON_ACTION_01
|
||||
|
||||
ld hl, OBJECT_DIRECTION_WALKING
|
||||
add hl, bc
|
||||
ld [hl], STANDING
|
||||
@@ -721,12 +726,14 @@ HalfStep: ; 5400
|
||||
ld hl, OBJECT_29
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, bc
|
||||
ld [hl], $2
|
||||
ld hl, OBJECT_09
|
||||
ld [hl], PERSON_ACTION_02
|
||||
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_0A
|
||||
ld [hl], STEP_TYPE_0A
|
||||
ret
|
||||
; 5412
|
||||
|
||||
@@ -735,34 +742,35 @@ NormalStep: ; 5412
|
||||
call Function463f
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, bc
|
||||
ld [hl], $2
|
||||
ld hl, OBJECT_STANDING_TILE
|
||||
ld [hl], PERSON_ACTION_02
|
||||
|
||||
ld hl, OBJECT_NEXT_TILE
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
call CheckSuperTallGrassTile
|
||||
jr z, .asm_542d
|
||||
jr z, .shake_grass
|
||||
|
||||
call Function1875
|
||||
jr c, .asm_5430
|
||||
jr c, .skip_grass
|
||||
|
||||
.asm_542d
|
||||
.shake_grass
|
||||
call ShakeGrass
|
||||
|
||||
.asm_5430
|
||||
.skip_grass
|
||||
ld hl, wd4cf
|
||||
ld a, [hMapObjectIndexBuffer]
|
||||
cp [hl]
|
||||
jr z, .asm_543f
|
||||
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_02
|
||||
ld [hl], STEP_TYPE_02
|
||||
ret
|
||||
|
||||
.asm_543f
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_06
|
||||
ld [hl], STEP_TYPE_06
|
||||
ret
|
||||
; 5446
|
||||
|
||||
@@ -771,20 +779,20 @@ TurningStep: ; 5446
|
||||
call Function463f
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, bc
|
||||
ld [hl], $4
|
||||
ld [hl], PERSON_ACTION_04
|
||||
ld hl, wd4cf
|
||||
ld a, [hMapObjectIndexBuffer]
|
||||
cp [hl]
|
||||
jr z, .asm_5461
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_02
|
||||
ld [hl], STEP_TYPE_02
|
||||
ret
|
||||
|
||||
.asm_5461
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_06
|
||||
ld [hl], STEP_TYPE_06
|
||||
ret
|
||||
; 5468
|
||||
|
||||
@@ -794,20 +802,20 @@ SlideStep: ; 5468
|
||||
call Function463f
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, bc
|
||||
ld [hl], $1
|
||||
ld [hl], PERSON_ACTION_01
|
||||
ld hl, wd4cf
|
||||
ld a, [hMapObjectIndexBuffer]
|
||||
cp [hl]
|
||||
jr z, .asm_5483
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_02
|
||||
ld [hl], STEP_TYPE_02
|
||||
ret
|
||||
|
||||
.asm_5483
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_06
|
||||
ld [hl], STEP_TYPE_06
|
||||
ret
|
||||
; 548a
|
||||
|
||||
@@ -822,20 +830,20 @@ JumpStep: ; 548a
|
||||
res 3, [hl]
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, bc
|
||||
ld [hl], $2
|
||||
ld [hl], PERSON_ACTION_02
|
||||
call SpawnShadow
|
||||
ld hl, wd4cf
|
||||
ld a, [hMapObjectIndexBuffer]
|
||||
cp [hl]
|
||||
jr z, .asm_54b1
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_08
|
||||
ld [hl], STEP_TYPE_08
|
||||
ret
|
||||
|
||||
.asm_54b1
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], OBJECT_09_VALUE_09
|
||||
ld [hl], STEP_TYPE_09
|
||||
ret
|
||||
; 54b8
|
||||
|
@@ -13,11 +13,11 @@ _ReplaceKrisSprite:: ; 14135
|
||||
ld [hUsedSpriteIndex], a
|
||||
ld a, [UsedSprites + 1]
|
||||
ld [hUsedSpriteTile], a
|
||||
call Function143c8
|
||||
call GetUsedSprite
|
||||
ret
|
||||
; 14146
|
||||
|
||||
Function14146: ; 14146
|
||||
Function14146: ; mobile
|
||||
ld hl, wSpriteFlags
|
||||
ld a, [hl]
|
||||
push af
|
||||
@@ -29,7 +29,7 @@ Function14146: ; 14146
|
||||
ret
|
||||
; 14157
|
||||
|
||||
Function14157: ; 14157
|
||||
Function14157: ; mobile
|
||||
ld hl, wSpriteFlags
|
||||
ld a, [hl]
|
||||
push af
|
||||
@@ -168,23 +168,23 @@ endr
|
||||
RunCallback_04: ; 14209
|
||||
ld a, $4
|
||||
call RunMapCallback
|
||||
call Function1439b
|
||||
call Function14215
|
||||
call GetUsedSprites
|
||||
call .LoadMiscTiles
|
||||
ret
|
||||
; 14215
|
||||
|
||||
Function14215: ; 14215
|
||||
.LoadMiscTiles: ; 14215
|
||||
ld a, [wSpriteFlags]
|
||||
bit 6, a
|
||||
ret nz
|
||||
ld c, EMOTE_08
|
||||
|
||||
ld c, EMOTE_SHADOW
|
||||
callba LoadEmote
|
||||
call GetMapPermission
|
||||
call CheckOutdoorMap
|
||||
ld c, EMOTE_0B
|
||||
jr z, .outdoor
|
||||
ld c, EMOTE_0A
|
||||
|
||||
ld c, EMOTE_BOULDER_DUST
|
||||
.outdoor
|
||||
callba LoadEmote
|
||||
ret
|
||||
@@ -575,29 +575,34 @@ GetSpriteLength: ; 14386
|
||||
; 1439b
|
||||
|
||||
|
||||
Function1439b: ; 1439b
|
||||
GetUsedSprites: ; 1439b
|
||||
ld hl, UsedSprites
|
||||
ld c, SPRITE_GFX_LIST_CAPACITY
|
||||
|
||||
.loop
|
||||
ld a, [wSpriteFlags]
|
||||
res 5, a
|
||||
ld [wSpriteFlags], a
|
||||
|
||||
ld a, [hli]
|
||||
and a
|
||||
jr z, .done
|
||||
ld [hUsedSpriteIndex], a
|
||||
|
||||
ld a, [hli]
|
||||
ld [hUsedSpriteTile], a
|
||||
|
||||
bit 7, a
|
||||
jr z, .dont_set
|
||||
|
||||
ld a, [wSpriteFlags]
|
||||
set 5, a
|
||||
set 5, a ; load VBank0
|
||||
ld [wSpriteFlags], a
|
||||
|
||||
.dont_set
|
||||
push bc
|
||||
push hl
|
||||
call Function143c8
|
||||
call GetUsedSprite
|
||||
pop hl
|
||||
pop bc
|
||||
dec c
|
||||
@@ -607,7 +612,7 @@ Function1439b: ; 1439b
|
||||
ret
|
||||
; 143c8
|
||||
|
||||
Function143c8: ; 143c8
|
||||
GetUsedSprite: ; 143c8
|
||||
ld a, [hUsedSpriteIndex]
|
||||
call SafeGetSprite
|
||||
ld a, [hUsedSpriteTile]
|
||||
@@ -632,14 +637,17 @@ endr
|
||||
ld d, h
|
||||
ld e, l
|
||||
pop hl
|
||||
|
||||
ld a, [wSpriteFlags]
|
||||
bit 5, a
|
||||
jr nz, .done
|
||||
bit 6, a
|
||||
jr nz, .done
|
||||
|
||||
ld a, [hUsedSpriteIndex]
|
||||
call _DoesSpriteHaveFacings
|
||||
jr c, .done
|
||||
|
||||
ld a, h
|
||||
add $8
|
||||
ld h, a
|
||||
@@ -716,7 +724,7 @@ LoadEmote:: ; 1442f
|
||||
emote_header: MACRO
|
||||
dw \1
|
||||
db \2 tiles, BANK(\1)
|
||||
dw \3
|
||||
dw VTiles1 tile \3
|
||||
ENDM
|
||||
|
||||
EmotesPointers: ; 144d
|
||||
@@ -724,18 +732,18 @@ EmotesPointers: ; 144d
|
||||
; db length, bank
|
||||
; dw dest address
|
||||
|
||||
emote_header ShockEmote, 4, VTiles1 tile $78
|
||||
emote_header QuestionEmote, 4, VTiles1 tile $78
|
||||
emote_header HappyEmote, 4, VTiles1 tile $78
|
||||
emote_header SadEmote, 4, VTiles1 tile $78
|
||||
emote_header HeartEmote, 4, VTiles1 tile $78
|
||||
emote_header BoltEmote, 4, VTiles1 tile $78
|
||||
emote_header SleepEmote, 4, VTiles1 tile $78
|
||||
emote_header FishEmote, 4, VTiles1 tile $78
|
||||
emote_header JumpShadowGFX, 1, VTiles1 tile $7c
|
||||
emote_header FishingRodGFX2, 2, VTiles1 tile $7c
|
||||
emote_header BoulderDustGFX, 2, VTiles1 tile $7e
|
||||
emote_header FishingRodGFX4, 1, VTiles1 tile $7e
|
||||
emote_header ShockEmote, 4, $78
|
||||
emote_header QuestionEmote, 4, $78
|
||||
emote_header HappyEmote, 4, $78
|
||||
emote_header SadEmote, 4, $78
|
||||
emote_header HeartEmote, 4, $78
|
||||
emote_header BoltEmote, 4, $78
|
||||
emote_header SleepEmote, 4, $78
|
||||
emote_header FishEmote, 4, $78
|
||||
emote_header JumpShadowGFX, 1, $7c
|
||||
emote_header FishingRodGFX2, 2, $7c
|
||||
emote_header BoulderDustGFX, 2, $7e
|
||||
emote_header FishingRodGFX4, 1, $7e
|
||||
; 14495
|
||||
|
||||
|
||||
|
22
home/map.asm
22
home/map.asm
@@ -1238,9 +1238,9 @@ ScrollMapDown:: ; 272a
|
||||
call BackupBGMapRow
|
||||
ld c, 2 * SCREEN_WIDTH
|
||||
call FarCallScrollBGMapPalettes
|
||||
ld a, [wBGMapAnchorLo]
|
||||
ld a, [wBGMapAnchor]
|
||||
ld e, a
|
||||
ld a, [wBGMapAnchorHi]
|
||||
ld a, [wBGMapAnchor + 1]
|
||||
ld d, a
|
||||
call UpdateBGMapRow
|
||||
ld a, $1
|
||||
@@ -1254,9 +1254,9 @@ ScrollMapUp:: ; 2748
|
||||
call BackupBGMapRow
|
||||
ld c, 2 * SCREEN_WIDTH
|
||||
call FarCallScrollBGMapPalettes
|
||||
ld a, [wBGMapAnchorLo]
|
||||
ld a, [wBGMapAnchor]
|
||||
ld l, a
|
||||
ld a, [wBGMapAnchorHi]
|
||||
ld a, [wBGMapAnchor + 1]
|
||||
ld h, a
|
||||
ld bc, $0200
|
||||
add hl, bc
|
||||
@@ -1278,9 +1278,9 @@ ScrollMapLeft:: ; 2771
|
||||
call BackupBGMapColumn
|
||||
ld c, 2 * SCREEN_HEIGHT
|
||||
call FarCallScrollBGMapPalettes
|
||||
ld a, [wBGMapAnchorLo]
|
||||
ld a, [wBGMapAnchor]
|
||||
ld e, a
|
||||
ld a, [wBGMapAnchorHi]
|
||||
ld a, [wBGMapAnchor + 1]
|
||||
ld d, a
|
||||
call UpdateBGMapColumn
|
||||
ld a, $1
|
||||
@@ -1294,7 +1294,7 @@ ScrollMapRight:: ; 278f
|
||||
call BackupBGMapColumn
|
||||
ld c, 2 * SCREEN_HEIGHT
|
||||
call FarCallScrollBGMapPalettes
|
||||
ld a, [wBGMapAnchorLo]
|
||||
ld a, [wBGMapAnchor]
|
||||
ld e, a
|
||||
and %11100000
|
||||
ld b, a
|
||||
@@ -1303,7 +1303,7 @@ ScrollMapRight:: ; 278f
|
||||
and %00011111
|
||||
or b
|
||||
ld e, a
|
||||
ld a, [wBGMapAnchorHi]
|
||||
ld a, [wBGMapAnchor + 1]
|
||||
ld d, a
|
||||
call UpdateBGMapColumn
|
||||
ld a, $1
|
||||
@@ -1505,7 +1505,7 @@ SaveScreen:: ; 289d
|
||||
ld a, [MapWidth]
|
||||
add $6
|
||||
ld [hMapObjectIndexBuffer], a
|
||||
ld a, [wd151]
|
||||
ld a, [wPlayerStepDirection]
|
||||
and a
|
||||
jr z, .down
|
||||
cp UP
|
||||
@@ -1599,11 +1599,11 @@ Function2914:: ; 2914
|
||||
ld a, [PlayerNextMapY]
|
||||
ld e, a
|
||||
call GetCoordTile
|
||||
ld [PlayerStandingTile], a
|
||||
ld [PlayerNextTile], a
|
||||
call Function29ff
|
||||
ret nz
|
||||
|
||||
ld a, [PlayerStandingTile]
|
||||
ld a, [PlayerNextTile]
|
||||
and 7
|
||||
ld hl, .data_2945
|
||||
add l
|
||||
|
@@ -80,14 +80,14 @@ DoesSpriteHaveFacings:: ; 1836
|
||||
|
||||
|
||||
Function184a:: ; 184a
|
||||
ld a, [PlayerStandingTile]
|
||||
ld a, [PlayerNextTile]
|
||||
call GetTileCollision
|
||||
ld b, a
|
||||
ret
|
||||
; 1852
|
||||
|
||||
CheckOnWater:: ; 1852
|
||||
ld a, [PlayerStandingTile]
|
||||
ld a, [PlayerNextTile]
|
||||
call GetTileCollision
|
||||
sub 1
|
||||
ret z
|
||||
@@ -211,7 +211,7 @@ CheckWaterfallTile:: ; 18bd
|
||||
; 18c3
|
||||
|
||||
CheckStandingOnEntrance:: ; 18c3
|
||||
ld a, [PlayerStandingTile]
|
||||
ld a, [PlayerNextTile]
|
||||
cp $71 ; door
|
||||
ret z
|
||||
cp $79
|
||||
@@ -447,7 +447,7 @@ LoadMovementDataPointer:: ; 19e9
|
||||
add hl, bc
|
||||
ld [hl], SPRITEMOVEDATA_SCRIPTED
|
||||
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], 0
|
||||
|
||||
|
136
main.asm
136
main.asm
@@ -1526,9 +1526,9 @@ Function6473: ; 6473
|
||||
ld a, VBGMap0 / $100
|
||||
call Function64b9
|
||||
xor a
|
||||
ld [wd152], a
|
||||
ld a, $98
|
||||
ld [wd153], a
|
||||
ld [wBGMapAnchor], a
|
||||
ld a, VBGMap0 / $100
|
||||
ld [wBGMapAnchor + 1], a
|
||||
xor a
|
||||
ld [hSCX], a
|
||||
ld [hSCY], a
|
||||
@@ -2188,7 +2188,7 @@ Function6f07: ; 6f07
|
||||
add hl, bc
|
||||
bit 7, [hl]
|
||||
jp nz, Function6fa1
|
||||
ld hl, OBJECT_STANDING_TILE
|
||||
ld hl, OBJECT_NEXT_TILE
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
ld d, a
|
||||
@@ -2202,7 +2202,7 @@ Function6f07: ; 6f07
|
||||
Function6f2c: ; 6f2c
|
||||
call Function6f5f
|
||||
ret c
|
||||
ld hl, OBJECT_STANDING_TILE
|
||||
ld hl, OBJECT_NEXT_TILE
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
call GetTileCollision
|
||||
@@ -2213,7 +2213,7 @@ Function6f2c: ; 6f2c
|
||||
; 6f3e
|
||||
|
||||
Function6f3e: ; 6f3e
|
||||
ld hl, OBJECT_STANDING_TILE
|
||||
ld hl, OBJECT_NEXT_TILE
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
call Function6f7f
|
||||
@@ -2239,7 +2239,7 @@ Function6f3e: ; 6f3e
|
||||
; 6f5f
|
||||
|
||||
Function6f5f: ; 6f5f
|
||||
ld hl, OBJECT_NEXT_TILE
|
||||
ld hl, OBJECT_STANDING_TILE
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
call Function6f7f
|
||||
@@ -3488,7 +3488,7 @@ InitializeVisibleSprites: ; 8177
|
||||
|
||||
Function81ca:: ; 81ca
|
||||
nop
|
||||
ld a, [wd151]
|
||||
ld a, [wPlayerStepDirection]
|
||||
cp $ff
|
||||
ret z
|
||||
ld hl, .jumptable
|
||||
@@ -3651,9 +3651,9 @@ CopyTempObjectToObjectStruct: ; 8286
|
||||
add hl, de
|
||||
ld [hl], a
|
||||
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, de
|
||||
ld [hl], OBJECT_09_VALUE_00
|
||||
ld [hl], STEP_TYPE_00
|
||||
|
||||
ld hl, OBJECT_FACING_STEP
|
||||
add hl, de
|
||||
@@ -3904,9 +3904,9 @@ FollowNotExact:: ; 839e
|
||||
ld hl, OBJECT_MOVEMENTTYPE
|
||||
add hl, de
|
||||
ld [hl], SPRITEMOVEDATA_FOLLOWNOTEXACT
|
||||
ld hl, OBJECT_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, de
|
||||
ld [hl], OBJECT_09_VALUE_00
|
||||
ld [hl], STEP_TYPE_00
|
||||
ret
|
||||
; 8417
|
||||
|
||||
@@ -5381,7 +5381,7 @@ Script_UsedWaterfall: ; 0xcb20
|
||||
CheckContinueWaterfall: ; cb38
|
||||
xor a
|
||||
ld [ScriptVar], a
|
||||
ld a, [PlayerStandingTile]
|
||||
ld a, [PlayerNextTile]
|
||||
call CheckWaterfallTile
|
||||
ret z
|
||||
callba MobileFn_1060c1
|
||||
@@ -6325,7 +6325,7 @@ Script_NotEvenANibble2: ; 0xd027
|
||||
writetext UnknownText_0xd0a9
|
||||
|
||||
Script_NotEvenANibble_FallThrough: ; 0xd02d
|
||||
loademote EMOTE_08
|
||||
loademote EMOTE_SHADOW
|
||||
callasm PutTheRodAway
|
||||
loadmovesprites
|
||||
end
|
||||
@@ -6396,7 +6396,7 @@ Script_FishCastRod: ; 0xd07c
|
||||
reloadmappart
|
||||
loadvar hBGMapMode, $0
|
||||
special UpdateTimePals
|
||||
loademote EMOTE_09
|
||||
loademote EMOTE_ROD
|
||||
callasm LoadFishingGFX
|
||||
loademote EMOTE_SHOCK
|
||||
applymovement PLAYER, MovementData_0xd093
|
||||
@@ -7291,7 +7291,7 @@ GetItemPrice: ; d486
|
||||
|
||||
|
||||
Functiond497:: ; d497 (3:5497)
|
||||
ld a, [wd150]
|
||||
ld a, [wPlayerStepFlags]
|
||||
and a
|
||||
ret z
|
||||
bit 7, a
|
||||
@@ -7311,9 +7311,9 @@ Functiond497:: ; d497 (3:5497)
|
||||
jr .asm_d4b8
|
||||
.asm_d4b8
|
||||
call Functiond4e5
|
||||
ld a, [wd14e]
|
||||
ld a, [wPlayerStepVectorX]
|
||||
ld d, a
|
||||
ld a, [wd14f]
|
||||
ld a, [wPlayerStepVectorY]
|
||||
ld e, a
|
||||
ld a, [wd14c]
|
||||
sub d
|
||||
@@ -7324,9 +7324,9 @@ Functiond497:: ; d497 (3:5497)
|
||||
ret
|
||||
|
||||
Functiond4d2:: ; d4d2 (3:54d2)
|
||||
ld a, [wd14e]
|
||||
ld a, [wPlayerStepVectorX]
|
||||
ld d, a
|
||||
ld a, [wd14f]
|
||||
ld a, [wPlayerStepVectorY]
|
||||
ld e, a
|
||||
ld a, [hSCX]
|
||||
add d
|
||||
@@ -7372,7 +7372,7 @@ Jumptable_d4f2: ; d4f2 (3:54f2)
|
||||
ret
|
||||
|
||||
Functiond511: ; d511 (3:5511)
|
||||
ld a, [wd151]
|
||||
ld a, [wPlayerStepDirection]
|
||||
and a
|
||||
jr nz, .asm_d51c
|
||||
ld hl, YCoord
|
||||
@@ -7398,7 +7398,7 @@ Functiond511: ; d511 (3:5511)
|
||||
ret
|
||||
|
||||
Functiond536: ; d536 (3:5536)
|
||||
ld a, [wd151]
|
||||
ld a, [wPlayerStepDirection]
|
||||
and a
|
||||
jr z, .asm_d549
|
||||
cp $1
|
||||
@@ -7434,24 +7434,24 @@ Functiond536: ; d536 (3:5536)
|
||||
ret
|
||||
|
||||
Functiond571: ; d571 (3:5571)
|
||||
ld a, [wd152]
|
||||
ld a, [wBGMapAnchor]
|
||||
add $40
|
||||
ld [wd152], a
|
||||
jr nc, .asm_d586
|
||||
ld a, [wd153]
|
||||
ld [wBGMapAnchor], a
|
||||
jr nc, .not_overflowed
|
||||
ld a, [wBGMapAnchor + 1]
|
||||
inc a
|
||||
and $3
|
||||
or $98
|
||||
ld [wd153], a
|
||||
.asm_d586
|
||||
or VBGMap0 / $100
|
||||
ld [wBGMapAnchor + 1], a
|
||||
.not_overflowed
|
||||
ld hl, wd196
|
||||
inc [hl]
|
||||
ld a, [hl]
|
||||
cp $2
|
||||
jr nz, .asm_d594
|
||||
cp $2 ; was 1
|
||||
jr nz, .skip
|
||||
ld [hl], $0
|
||||
call Functiond595
|
||||
.asm_d594
|
||||
.skip
|
||||
ret
|
||||
|
||||
Functiond595: ; d595 (3:5595)
|
||||
@@ -7465,24 +7465,24 @@ Functiond595: ; d595 (3:5595)
|
||||
ret
|
||||
|
||||
Functiond5a2: ; d5a2 (3:55a2)
|
||||
ld a, [wd152]
|
||||
ld a, [wBGMapAnchor]
|
||||
sub $40
|
||||
ld [wd152], a
|
||||
jr nc, .asm_d5b7
|
||||
ld a, [wd153]
|
||||
ld [wBGMapAnchor], a
|
||||
jr nc, .not_underflowed
|
||||
ld a, [wBGMapAnchor + 1]
|
||||
dec a
|
||||
and $3
|
||||
or $98
|
||||
ld [wd153], a
|
||||
.asm_d5b7
|
||||
or VBGMap0 / $100
|
||||
ld [wBGMapAnchor + 1], a
|
||||
.not_underflowed
|
||||
ld hl, wd196
|
||||
dec [hl]
|
||||
ld a, [hl]
|
||||
cp $ff
|
||||
jr nz, .asm_d5c5
|
||||
cp $ff ; was 0
|
||||
jr nz, .skip
|
||||
ld [hl], $1
|
||||
call Functiond5c6
|
||||
.asm_d5c5
|
||||
.skip
|
||||
ret
|
||||
|
||||
Functiond5c6: ; d5c6 (3:55c6)
|
||||
@@ -7498,7 +7498,7 @@ Functiond5c6: ; d5c6 (3:55c6)
|
||||
ret
|
||||
|
||||
Functiond5d5: ; d5d5 (3:55d5)
|
||||
ld a, [wd152]
|
||||
ld a, [wBGMapAnchor]
|
||||
ld e, a
|
||||
and $e0
|
||||
ld d, a
|
||||
@@ -7506,7 +7506,7 @@ Functiond5d5: ; d5d5 (3:55d5)
|
||||
sub $2
|
||||
and $1f
|
||||
or d
|
||||
ld [wd152], a
|
||||
ld [wBGMapAnchor], a
|
||||
ld hl, wd197
|
||||
dec [hl]
|
||||
ld a, [hl]
|
||||
@@ -7527,7 +7527,7 @@ Functiond5f4: ; d5f4 (3:55f4)
|
||||
ret
|
||||
|
||||
Functiond5fe: ; d5fe (3:55fe)
|
||||
ld a, [wd152]
|
||||
ld a, [wBGMapAnchor]
|
||||
ld e, a
|
||||
and $e0
|
||||
ld d, a
|
||||
@@ -7535,7 +7535,7 @@ Functiond5fe: ; d5fe (3:55fe)
|
||||
add $2
|
||||
and $1f
|
||||
or d
|
||||
ld [wd152], a
|
||||
ld [wBGMapAnchor], a
|
||||
ld hl, wd197
|
||||
inc [hl]
|
||||
ld a, [hl]
|
||||
@@ -11364,7 +11364,7 @@ Function140ed:: ; 140ed
|
||||
INCLUDE "engine/overworld.asm"
|
||||
|
||||
Function1499a:: ; 1499a
|
||||
ld a, [PlayerStandingTile]
|
||||
ld a, [PlayerNextTile]
|
||||
cp $60
|
||||
jr z, .asm_149ad
|
||||
cp $68
|
||||
@@ -11381,7 +11381,7 @@ Function1499a:: ; 1499a
|
||||
; 149af
|
||||
|
||||
Function149af:: ; 149af
|
||||
ld a, [PlayerStandingTile]
|
||||
ld a, [PlayerNextTile]
|
||||
cp $70
|
||||
jr z, .asm_149c4
|
||||
cp $76
|
||||
@@ -11401,7 +11401,7 @@ Function149af:: ; 149af
|
||||
CheckWarpCollision: ; 149c6
|
||||
ld de, 1
|
||||
ld hl, .blocks
|
||||
ld a, [PlayerStandingTile]
|
||||
ld a, [PlayerNextTile]
|
||||
call IsInArray
|
||||
ret
|
||||
; 149d3
|
||||
@@ -11420,7 +11420,7 @@ CheckWarpCollision: ; 149c6
|
||||
; 149dd
|
||||
|
||||
CheckGrassCollision:: ; 149dd
|
||||
ld a, [PlayerStandingTile]
|
||||
ld a, [PlayerNextTile]
|
||||
ld hl, .blocks
|
||||
ld de, 1
|
||||
call IsInArray
|
||||
@@ -11460,7 +11460,7 @@ CheckCutCollision: ; 149f5
|
||||
; 14a07
|
||||
|
||||
Function14a07:: ; 14a07
|
||||
ld a, [PlayerStandingTile]
|
||||
ld a, [PlayerNextTile]
|
||||
ld de, $1f
|
||||
cp $71 ; door
|
||||
ret z
|
||||
@@ -34139,7 +34139,7 @@ CheckTileMovement: ; 800b7
|
||||
; Tiles such as waterfalls and warps move the player
|
||||
; in a given direction, overriding input.
|
||||
|
||||
ld a, [PlayerStandingTile]
|
||||
ld a, [PlayerNextTile]
|
||||
ld c, a
|
||||
call CheckWhirlpoolTile
|
||||
jr c, .asm_800c4
|
||||
@@ -34300,7 +34300,7 @@ TryStep: ; 8016b
|
||||
cp 2
|
||||
jr z, .bump
|
||||
|
||||
ld a, [PlayerStandingTile]
|
||||
ld a, [PlayerNextTile]
|
||||
call CheckIceTile
|
||||
jr nc, .ice
|
||||
|
||||
@@ -34387,7 +34387,7 @@ TrySurfStep: ; 801c0
|
||||
|
||||
|
||||
TryJumpLedge: ; 801f3
|
||||
ld a, [PlayerStandingTile]
|
||||
ld a, [PlayerNextTile]
|
||||
ld e, a
|
||||
and $f0
|
||||
cp $a0 ; ledge
|
||||
@@ -34439,7 +34439,7 @@ CheckEdgeWarp: ; 80226
|
||||
ld d, 0
|
||||
ld hl, .EdgeWarps
|
||||
add hl, de
|
||||
ld a, [PlayerStandingTile]
|
||||
ld a, [PlayerNextTile]
|
||||
cp [hl]
|
||||
jr nz, .nope
|
||||
|
||||
@@ -34647,7 +34647,7 @@ GetMovementAction: ; 802ec
|
||||
; tile collision pointer
|
||||
.table1
|
||||
db STANDING, FACE_CURRENT, 0, 0
|
||||
dw PlayerStandingTile
|
||||
dw PlayerNextTile
|
||||
.table2
|
||||
db RIGHT, FACE_RIGHT, 1, 0
|
||||
dw TileRight
|
||||
@@ -34859,7 +34859,7 @@ CheckStandingOnIce:: ; 80404
|
||||
jr z, .nope
|
||||
cp $f0
|
||||
jr z, .nope
|
||||
ld a, [PlayerStandingTile]
|
||||
ld a, [PlayerNextTile]
|
||||
call CheckIceTile
|
||||
jr nc, .yep
|
||||
ld a, [PlayerState]
|
||||
@@ -50406,23 +50406,23 @@ Function104309:
|
||||
ret
|
||||
|
||||
Function10433a: ; 10433a (41:433a)
|
||||
ld b, $4
|
||||
.asm_10433c
|
||||
ld c, $14
|
||||
.asm_10433e
|
||||
ld b, 4
|
||||
.outer_loop
|
||||
ld c, 20
|
||||
.inner_loop
|
||||
ld a, [de]
|
||||
ld [hli], a
|
||||
inc de
|
||||
dec c
|
||||
jr nz, .asm_10433e
|
||||
jr nz, .inner_loop
|
||||
ld a, l
|
||||
add $c
|
||||
add $20 - 20
|
||||
ld l, a
|
||||
ld a, h
|
||||
adc $0
|
||||
ld h, a
|
||||
dec b
|
||||
jr nz, .asm_10433c
|
||||
jr nz, .outer_loop
|
||||
ret
|
||||
; 104350
|
||||
|
||||
@@ -50460,7 +50460,7 @@ RunCallback_03: ; 1045c4
|
||||
|
||||
EnterMapConnection: ; 1045d6
|
||||
; Return carry if a connection has been entered.
|
||||
ld a, [wd151]
|
||||
ld a, [wPlayerStepDirection]
|
||||
and a
|
||||
jp z, EnterSouthConnection
|
||||
cp 1
|
||||
@@ -50687,9 +50687,9 @@ LoadMapTimeOfDay: ; 104750
|
||||
|
||||
Function104770: ; 104770 (41:4770)
|
||||
ld a, $98
|
||||
ld [wd153], a
|
||||
ld [wBGMapAnchor + 1], a
|
||||
xor a
|
||||
ld [wd152], a
|
||||
ld [wBGMapAnchor], a
|
||||
ld [hSCY], a
|
||||
ld [hSCX], a
|
||||
callba Function5958
|
||||
@@ -50776,7 +50776,7 @@ RefreshMapSprites: ; 1047f0
|
||||
ret
|
||||
|
||||
CheckMovingOffEdgeOfMap:: ; 104820 (41:4820)
|
||||
ld a, [wd151]
|
||||
ld a, [wPlayerStepDirection]
|
||||
cp STANDING
|
||||
ret z
|
||||
and a ; DOWN
|
||||
|
@@ -1297,7 +1297,7 @@ Function_LoadOpponentTrainerAndPokemonsWithOTSprite: ; 0x170b44
|
||||
ld [hUsedSpriteIndex], a
|
||||
ld a, [hl]
|
||||
ld [hUsedSpriteTile], a
|
||||
callba Function143c8
|
||||
callba GetUsedSprite
|
||||
ret
|
||||
; 170b90
|
||||
|
||||
|
@@ -48,7 +48,7 @@ Tileset03Anim: ; 0xfc01b
|
||||
dw NULL, AnimateFlowerTile
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, CurTileFrame8
|
||||
dw NULL, StandingTileFrame8
|
||||
dw NULL, DoneTileAnimation
|
||||
; 0xfc047
|
||||
|
||||
@@ -62,7 +62,7 @@ Tileset25Anim: ; 0xfc047
|
||||
dw NULL, AnimateFlowerTile
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, CurTileFrame8
|
||||
dw NULL, StandingTileFrame8
|
||||
dw NULL, DoneTileAnimation
|
||||
; 0xfc073
|
||||
|
||||
@@ -77,7 +77,7 @@ Tileset31Anim: ; 0xfc073
|
||||
dw NULL, AnimateFlowerTile
|
||||
dw VTiles2 tile $14, AnimateWaterTile
|
||||
dw NULL, TileAnimationPalette
|
||||
dw NULL, CurTileFrame8
|
||||
dw NULL, StandingTileFrame8
|
||||
dw NULL, DoneTileAnimation
|
||||
; 0xfc0a3
|
||||
|
||||
@@ -93,7 +93,7 @@ Tileset01Anim: ; 0xfc0a3
|
||||
dw WhirlpoolFrames3, AnimateWhirlpoolTile
|
||||
dw WhirlpoolFrames4, AnimateWhirlpoolTile
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, CurTileFrame8
|
||||
dw NULL, StandingTileFrame8
|
||||
dw NULL, DoneTileAnimation
|
||||
; 0xfc0d7
|
||||
|
||||
@@ -136,7 +136,7 @@ Tileset09Anim: ; 0xfc12f
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, CurTileFrame8
|
||||
dw NULL, StandingTileFrame8
|
||||
dw NULL, DoneTileAnimation
|
||||
; 0xfc15f
|
||||
|
||||
@@ -147,7 +147,7 @@ Tileset15Anim: ; 0xfc15f
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, SafariFountainAnim1
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, CurTileFrame8
|
||||
dw NULL, StandingTileFrame8
|
||||
dw NULL, DoneTileAnimation
|
||||
; 0xfc17f
|
||||
|
||||
@@ -239,7 +239,7 @@ Tileset23Anim: ; 0xfc27f
|
||||
dw SproutPillarTilePointer4, AnimateSproutPillarTile
|
||||
dw SproutPillarTilePointer1, AnimateSproutPillarTile
|
||||
dw SproutPillarTilePointer2, AnimateSproutPillarTile
|
||||
dw NULL, CurTileFrame
|
||||
dw NULL, StandingTileFrame
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, WaitTileAnimation
|
||||
@@ -302,7 +302,7 @@ WaitTileAnimation: ; fc2fe
|
||||
ret
|
||||
; fc2ff
|
||||
|
||||
CurTileFrame8: ; fc2ff
|
||||
StandingTileFrame8: ; fc2ff
|
||||
ld a, [TileAnimationTimer]
|
||||
inc a
|
||||
and a, 7
|
||||
@@ -806,7 +806,7 @@ AnimateSproutPillarTile: ; fc645
|
||||
; fc673
|
||||
|
||||
|
||||
CurTileFrame: ; fc673
|
||||
StandingTileFrame: ; fc673
|
||||
ld hl, TileAnimationTimer
|
||||
inc [hl]
|
||||
ret
|
||||
|
21
wram.asm
21
wram.asm
@@ -1735,15 +1735,14 @@ wd14b:: ds 1
|
||||
|
||||
wd14c:: ds 1 ; used in FollowNotExact
|
||||
wd14d:: ds 1 ; used in FollowNotExact
|
||||
|
||||
; Player movement
|
||||
wd14e:: ds 1
|
||||
wd14f:: ds 1
|
||||
wd150:: ds 1
|
||||
wd151:: ds 1
|
||||
wBGMapAnchorLo::
|
||||
wd152:: ds 1
|
||||
wBGMapAnchorHi::
|
||||
wd153:: ds 1
|
||||
wPlayerStepVectorX:: ds 1
|
||||
wPlayerStepVectorY:: ds 1
|
||||
wPlayerStepFlags:: ds 1
|
||||
wPlayerStepDirection:: ds 1
|
||||
|
||||
wBGMapAnchor:: ds 2
|
||||
|
||||
UsedSprites:: ds 64 ; d154
|
||||
UsedSpritesEnd::
|
||||
@@ -2218,13 +2217,13 @@ object_struct: MACRO
|
||||
\1Palette:: ds 1
|
||||
\1Walking:: ds 1
|
||||
\1Direction:: ds 1
|
||||
\1Object09:: ds 1
|
||||
\1StepType:: ds 1
|
||||
\1StepDuration:: ds 1
|
||||
\1Action:: ds 1
|
||||
\1Object12:: ds 1
|
||||
\1Facing:: ds 1
|
||||
\1StandingTile:: ds 1 ; collision
|
||||
\1CurTile:: ds 1 ; collision
|
||||
\1NextTile:: ds 1 ; collision
|
||||
\1StandingTile:: ds 1 ; collision
|
||||
\1NextMapX:: ds 1
|
||||
\1NextMapY:: ds 1
|
||||
\1MapX:: ds 1
|
||||
|
Reference in New Issue
Block a user