mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
SPRITE_ANIM_FRAME_IDX constants
This commit is contained in:
parent
a5f5418fae
commit
87b733994b
@ -2832,11 +2832,11 @@ PlayerAttackDamage: ; 352e2
|
|||||||
call GetDamageStatsCritical
|
call GetDamageStatsCritical
|
||||||
jr c, .thickclub
|
jr c, .thickclub
|
||||||
|
|
||||||
ld hl, EnemyStats + 2
|
ld hl, EnemyDefense
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld c, [hl]
|
ld c, [hl]
|
||||||
ld hl, PlayerStats
|
ld hl, PlayerAttack
|
||||||
jr .thickclub
|
jr .thickclub
|
||||||
|
|
||||||
.special
|
.special
|
||||||
@ -2856,11 +2856,11 @@ PlayerAttackDamage: ; 352e2
|
|||||||
call GetDamageStatsCritical
|
call GetDamageStatsCritical
|
||||||
jr c, .lightball
|
jr c, .lightball
|
||||||
|
|
||||||
ld hl, EnemyStats + SP_DEFENSE * 2
|
ld hl, EnemySpDef
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld c, [hl]
|
ld c, [hl]
|
||||||
ld hl, PlayerStats + SP_ATTACK * 2
|
ld hl, PlayerSpAtk
|
||||||
|
|
||||||
.lightball
|
.lightball
|
||||||
; Note: Returns player special attack at hl in hl.
|
; Note: Returns player special attack at hl in hl.
|
||||||
@ -3098,11 +3098,11 @@ EnemyAttackDamage: ; 353f6
|
|||||||
call GetDamageStatsCritical
|
call GetDamageStatsCritical
|
||||||
jr c, .thickclub
|
jr c, .thickclub
|
||||||
|
|
||||||
ld hl, PlayerStats + 2
|
ld hl, PlayerDefense
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld c, [hl]
|
ld c, [hl]
|
||||||
ld hl, EnemyStats
|
ld hl, EnemyAttack
|
||||||
jr .thickclub
|
jr .thickclub
|
||||||
|
|
||||||
.Special:
|
.Special:
|
||||||
@ -3121,11 +3121,11 @@ EnemyAttackDamage: ; 353f6
|
|||||||
ld hl, EnemyMonSpclAtk
|
ld hl, EnemyMonSpclAtk
|
||||||
call GetDamageStatsCritical
|
call GetDamageStatsCritical
|
||||||
jr c, .lightball
|
jr c, .lightball
|
||||||
ld hl, PlayerStats + 8
|
ld hl, PlayerSpDef
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld c, [hl]
|
ld c, [hl]
|
||||||
ld hl, EnemyStats + 6
|
ld hl, EnemySpAtk
|
||||||
|
|
||||||
.lightball
|
.lightball
|
||||||
call LightBallBoost
|
call LightBallBoost
|
||||||
|
@ -517,3 +517,146 @@ MAX_OUTDOOR_SPRITES EQU 23
|
|||||||
const SPRITE_ANIM_INDEX_2A
|
const SPRITE_ANIM_INDEX_2A
|
||||||
const SPRITE_ANIM_INDEX_2B
|
const SPRITE_ANIM_INDEX_2B
|
||||||
const SPRITE_ANIM_INDEX_2C
|
const SPRITE_ANIM_INDEX_2C
|
||||||
|
|
||||||
|
const_def
|
||||||
|
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_00
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_01
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_02
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_03
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_04
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_05
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_06
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_07
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_08
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_09
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_0A
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_0B
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_0C
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_0D
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_0E
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_0F
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_10
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_11
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_12
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_13
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_14
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_15
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_16
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_17
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_18
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_19
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_1A
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_1B
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_1C
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_1D
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_1E
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_1F
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_20
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_21
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_22
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_23
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_24
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_25
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_26
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_27
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_28
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_29
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_2A
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_2B
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_2C
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_2D
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_2E
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_2F
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_30
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_31
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_32
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_33
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_34
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_35
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_36
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_37
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_38
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_39
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_3A
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_3B
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_3C
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_3D
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_3E
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_3F
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_40
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_41
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_42
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_43
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_44
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_45
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_46
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_47
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_48
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_49
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_4A
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_4B
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_4C
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_4D
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_4E
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_4F
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_50
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_51
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_52
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_53
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_54
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_55
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_56
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_57
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_58
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_59
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_5A
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_5B
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_5C
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_5D
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_5E
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_5F
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_60
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_61
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_62
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_63
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_64
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_65
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_66
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_67
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_68
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_69
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_6A
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_6B
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_6C
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_6D
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_6E
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_6F
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_70
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_71
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_72
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_73
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_74
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_75
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_76
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_77
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_78
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_79
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_7A
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_7B
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_7C
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_7D
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_7E
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_7F
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_80
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_81
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_82
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_83
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_84
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_85
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_86
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_87
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_88
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_89
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_8A
|
||||||
|
const SPRITE_ANIM_FRAME_IDX_8B
|
||||||
|
@ -68,205 +68,223 @@ SpriteAnimFrameData: ; 8d6e6
|
|||||||
; 8d76a
|
; 8d76a
|
||||||
; OAM idx (see SpriteAnimOAMData), flip flags/duration
|
; OAM idx (see SpriteAnimOAMData), flip flags/duration
|
||||||
.Frameset_00:
|
.Frameset_00:
|
||||||
db $00, $20
|
db SPRITE_ANIM_FRAME_IDX_00, $20
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_01:
|
.Frameset_01:
|
||||||
db $00, $08
|
db SPRITE_ANIM_FRAME_IDX_00, $08
|
||||||
db $01, $08
|
db SPRITE_ANIM_FRAME_IDX_01, $08
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_02:
|
.Frameset_02:
|
||||||
db $3d, $08
|
db SPRITE_ANIM_FRAME_IDX_3D, $08
|
||||||
db $3e, $08
|
db SPRITE_ANIM_FRAME_IDX_3E, $08
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_03:
|
.Frameset_03:
|
||||||
db $3f, $08
|
db SPRITE_ANIM_FRAME_IDX_3F, $08
|
||||||
db $40, $08
|
db SPRITE_ANIM_FRAME_IDX_40, $08
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_04:
|
.Frameset_04:
|
||||||
db $00, $04
|
db SPRITE_ANIM_FRAME_IDX_00, $04
|
||||||
db $01, $04
|
db SPRITE_ANIM_FRAME_IDX_01, $04
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_05:
|
.Frameset_05:
|
||||||
db $3d, $04
|
db SPRITE_ANIM_FRAME_IDX_3D, $04
|
||||||
db $3e, $04
|
db SPRITE_ANIM_FRAME_IDX_3E, $04
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_06:
|
.Frameset_06:
|
||||||
db $3f, $04
|
db SPRITE_ANIM_FRAME_IDX_3F, $04
|
||||||
db $40, $04
|
db SPRITE_ANIM_FRAME_IDX_40, $04
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_11:
|
.Frameset_11:
|
||||||
db $00, $08
|
db SPRITE_ANIM_FRAME_IDX_00, $08
|
||||||
db $01, $08
|
db SPRITE_ANIM_FRAME_IDX_01, $08
|
||||||
db $00, $08
|
db SPRITE_ANIM_FRAME_IDX_00, $08
|
||||||
db $01, $48
|
db SPRITE_ANIM_FRAME_IDX_01, $48
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_2d:
|
.Frameset_2d:
|
||||||
db $63, $08
|
db SPRITE_ANIM_FRAME_IDX_63, $08
|
||||||
db $64, $08
|
db SPRITE_ANIM_FRAME_IDX_64, $08
|
||||||
db $63, $08
|
db SPRITE_ANIM_FRAME_IDX_63, $08
|
||||||
db $64, $48
|
db SPRITE_ANIM_FRAME_IDX_64, $48
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_2e:
|
.Frameset_2e:
|
||||||
db $65, $08
|
db SPRITE_ANIM_FRAME_IDX_65, $08
|
||||||
db $66, $08
|
db SPRITE_ANIM_FRAME_IDX_66, $08
|
||||||
db $65, $08
|
db SPRITE_ANIM_FRAME_IDX_65, $08
|
||||||
db $66, $48
|
db SPRITE_ANIM_FRAME_IDX_66, $48
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_07:
|
.Frameset_07:
|
||||||
db $1e, $01
|
db SPRITE_ANIM_FRAME_IDX_1E, $01
|
||||||
db $1f, $01
|
db SPRITE_ANIM_FRAME_IDX_1F, $01
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_08:
|
.Frameset_08:
|
||||||
db $20, $01
|
db SPRITE_ANIM_FRAME_IDX_20, $01
|
||||||
db -3, $01
|
db -3, $01
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_09:
|
.Frameset_09:
|
||||||
db $21, $01
|
db SPRITE_ANIM_FRAME_IDX_21, $01
|
||||||
db -3, $01
|
db -3, $01
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_0a:
|
.Frameset_0a:
|
||||||
db $81, $0c
|
db SPRITE_ANIM_FRAME_IDX_81, $0c
|
||||||
db $82, $01
|
db SPRITE_ANIM_FRAME_IDX_82, $01
|
||||||
db $83, $01
|
db SPRITE_ANIM_FRAME_IDX_83, $01
|
||||||
db $82, $04
|
db SPRITE_ANIM_FRAME_IDX_82, $04
|
||||||
db $81, $0c
|
db SPRITE_ANIM_FRAME_IDX_81, $0c
|
||||||
db $82, $0c
|
db SPRITE_ANIM_FRAME_IDX_82, $0c
|
||||||
db $83, $04
|
db SPRITE_ANIM_FRAME_IDX_83, $04
|
||||||
db $84, $20
|
db SPRITE_ANIM_FRAME_IDX_84, $20
|
||||||
db $85, $03
|
db SPRITE_ANIM_FRAME_IDX_85, $03
|
||||||
db $86, $03
|
db SPRITE_ANIM_FRAME_IDX_86, $03
|
||||||
db $87, $04
|
db SPRITE_ANIM_FRAME_IDX_87, $04
|
||||||
db $88, $04
|
db SPRITE_ANIM_FRAME_IDX_88, $04
|
||||||
db $89, $04
|
db SPRITE_ANIM_FRAME_IDX_89, $04
|
||||||
db $8a, $0a
|
db SPRITE_ANIM_FRAME_IDX_8A, $0a
|
||||||
db $8b, $07
|
db SPRITE_ANIM_FRAME_IDX_8B, $07
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_0b:
|
.Frameset_0b:
|
||||||
db $23, $03
|
db SPRITE_ANIM_FRAME_IDX_23, $03
|
||||||
db $23, $83
|
db SPRITE_ANIM_FRAME_IDX_23, $83
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_0c:
|
.Frameset_0c:
|
||||||
db $24, $02
|
db SPRITE_ANIM_FRAME_IDX_24, $02
|
||||||
db $25, $02
|
db SPRITE_ANIM_FRAME_IDX_25, $02
|
||||||
db $26, $02
|
db SPRITE_ANIM_FRAME_IDX_26, $02
|
||||||
db $25, $02
|
db SPRITE_ANIM_FRAME_IDX_25, $02
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_0d:
|
.Frameset_0d:
|
||||||
db $27, $07
|
db SPRITE_ANIM_FRAME_IDX_27, $07
|
||||||
db $28, $07
|
db SPRITE_ANIM_FRAME_IDX_28, $07
|
||||||
db $27, $87
|
db SPRITE_ANIM_FRAME_IDX_27, $87
|
||||||
db $28, $47
|
db SPRITE_ANIM_FRAME_IDX_28, $47
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_0e:
|
.Frameset_0e:
|
||||||
db $29, $07
|
db SPRITE_ANIM_FRAME_IDX_29, $07
|
||||||
db $2a, $07
|
db SPRITE_ANIM_FRAME_IDX_2A, $07
|
||||||
db $29, $07
|
db SPRITE_ANIM_FRAME_IDX_29, $07
|
||||||
db $2b, $07
|
db SPRITE_ANIM_FRAME_IDX_2B, $07
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_0f:
|
.Frameset_0f:
|
||||||
db $29, $07
|
db SPRITE_ANIM_FRAME_IDX_29, $07
|
||||||
db $2c, $07
|
db SPRITE_ANIM_FRAME_IDX_2C, $07
|
||||||
db $2d, $07
|
db SPRITE_ANIM_FRAME_IDX_2D, $07
|
||||||
db $2c, $07
|
db SPRITE_ANIM_FRAME_IDX_2C, $07
|
||||||
db $29, $07
|
db SPRITE_ANIM_FRAME_IDX_29, $07
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_10:
|
.Frameset_10:
|
||||||
db $2e, $14
|
db SPRITE_ANIM_FRAME_IDX_2E, $14
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_12:
|
.Frameset_12:
|
||||||
db $2f, $20
|
db SPRITE_ANIM_FRAME_IDX_2F, $20
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_13:
|
.Frameset_13:
|
||||||
db $30, $20
|
db SPRITE_ANIM_FRAME_IDX_30, $20
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_14:
|
.Frameset_14:
|
||||||
db $30, $03
|
db SPRITE_ANIM_FRAME_IDX_30, $03
|
||||||
db $31, $03
|
db SPRITE_ANIM_FRAME_IDX_31, $03
|
||||||
db $30, $03
|
db SPRITE_ANIM_FRAME_IDX_30, $03
|
||||||
db $31, $43
|
db SPRITE_ANIM_FRAME_IDX_31, $43
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_15:
|
.Frameset_15:
|
||||||
db $32, $04
|
db SPRITE_ANIM_FRAME_IDX_32, $04
|
||||||
db $33, $04
|
db SPRITE_ANIM_FRAME_IDX_33, $04
|
||||||
db $34, $04
|
db SPRITE_ANIM_FRAME_IDX_34, $04
|
||||||
db -4
|
db -4
|
||||||
|
|
||||||
.Frameset_16:
|
.Frameset_16:
|
||||||
db $35, $03
|
db SPRITE_ANIM_FRAME_IDX_35, $03
|
||||||
db $36, $03
|
db SPRITE_ANIM_FRAME_IDX_36, $03
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_17:
|
.Frameset_17:
|
||||||
db $37, $07
|
db SPRITE_ANIM_FRAME_IDX_37, $07
|
||||||
db $38, $07
|
db SPRITE_ANIM_FRAME_IDX_38, $07
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_18:
|
.Frameset_18:
|
||||||
db $39, $20
|
db SPRITE_ANIM_FRAME_IDX_39, $20
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_19:
|
.Frameset_19:
|
||||||
db $3b, $02
|
db SPRITE_ANIM_FRAME_IDX_3B, $02
|
||||||
db $3a, $02
|
db SPRITE_ANIM_FRAME_IDX_3A, $02
|
||||||
db $3b, $02
|
db SPRITE_ANIM_FRAME_IDX_3B, $02
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_1a:
|
.Frameset_1a:
|
||||||
db $3c, $20
|
db SPRITE_ANIM_FRAME_IDX_3C, $20
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_1b:
|
.Frameset_1b:
|
||||||
db $41, $08
|
db SPRITE_ANIM_FRAME_IDX_41, $08
|
||||||
db $42, $08
|
db SPRITE_ANIM_FRAME_IDX_42, $08
|
||||||
db $41, $08
|
db SPRITE_ANIM_FRAME_IDX_41, $08
|
||||||
db $42, $48
|
db SPRITE_ANIM_FRAME_IDX_42, $48
|
||||||
db -2
|
db -2
|
||||||
db $43, $08
|
|
||||||
db $44, $08
|
; XXX
|
||||||
|
db SPRITE_ANIM_FRAME_IDX_43, $08
|
||||||
|
db SPRITE_ANIM_FRAME_IDX_44, $08
|
||||||
db -2
|
db -2
|
||||||
db $45, $08
|
|
||||||
db $46, $08
|
; XXX
|
||||||
|
db SPRITE_ANIM_FRAME_IDX_45, $08
|
||||||
|
db SPRITE_ANIM_FRAME_IDX_46, $08
|
||||||
db -2
|
db -2
|
||||||
db $47, $08
|
|
||||||
db $48, $08
|
; XXX
|
||||||
|
db SPRITE_ANIM_FRAME_IDX_47, $08
|
||||||
|
db SPRITE_ANIM_FRAME_IDX_48, $08
|
||||||
db -2
|
db -2
|
||||||
db $49, $01
|
|
||||||
db $49, $41
|
; XXX
|
||||||
db $49, $c1
|
db SPRITE_ANIM_FRAME_IDX_49, $01
|
||||||
db $49, $81
|
db SPRITE_ANIM_FRAME_IDX_49, $41
|
||||||
|
db SPRITE_ANIM_FRAME_IDX_49, $c1
|
||||||
|
db SPRITE_ANIM_FRAME_IDX_49, $81
|
||||||
db -2
|
db -2
|
||||||
db $4a, $20
|
|
||||||
|
; XXX
|
||||||
|
db SPRITE_ANIM_FRAME_IDX_4A, $20
|
||||||
db -1
|
db -1
|
||||||
db $4b, $20
|
|
||||||
|
; XXX
|
||||||
|
db SPRITE_ANIM_FRAME_IDX_4B, $20
|
||||||
db -1
|
db -1
|
||||||
db $4c, $20
|
|
||||||
|
; XXX
|
||||||
|
db SPRITE_ANIM_FRAME_IDX_4C, $20
|
||||||
db -1
|
db -1
|
||||||
db $4d, $20
|
|
||||||
|
; XXX
|
||||||
|
db SPRITE_ANIM_FRAME_IDX_4D, $20
|
||||||
db -1
|
db -1
|
||||||
db $4e, $03
|
|
||||||
|
; XXX
|
||||||
|
db SPRITE_ANIM_FRAME_IDX_4E, $03
|
||||||
db -3, $03
|
db -3, $03
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
@ -275,193 +293,193 @@ SpriteAnimFrameData: ; 8d6e6
|
|||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_1d:
|
.Frameset_1d:
|
||||||
db $4f, $20
|
db SPRITE_ANIM_FRAME_IDX_4F, $20
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_1e:
|
.Frameset_1e:
|
||||||
db $50, $02
|
db SPRITE_ANIM_FRAME_IDX_50, $02
|
||||||
db $51, $10
|
db SPRITE_ANIM_FRAME_IDX_51, $10
|
||||||
db -3, $01
|
db -3, $01
|
||||||
db $52, $01
|
db SPRITE_ANIM_FRAME_IDX_52, $01
|
||||||
db -3, $01
|
db -3, $01
|
||||||
db $53, $01
|
db SPRITE_ANIM_FRAME_IDX_53, $01
|
||||||
db -4
|
db -4
|
||||||
|
|
||||||
.Frameset_1f:
|
.Frameset_1f:
|
||||||
db $54, $20
|
db SPRITE_ANIM_FRAME_IDX_54, $20
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_20:
|
.Frameset_20:
|
||||||
db $55, $20
|
db SPRITE_ANIM_FRAME_IDX_55, $20
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_21:
|
.Frameset_21:
|
||||||
db $55, $60
|
db SPRITE_ANIM_FRAME_IDX_55, $60
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_22:
|
.Frameset_22:
|
||||||
db $55, $a0
|
db SPRITE_ANIM_FRAME_IDX_55, $a0
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_23:
|
.Frameset_23:
|
||||||
db $55, $e0
|
db SPRITE_ANIM_FRAME_IDX_55, $e0
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_24:
|
.Frameset_24:
|
||||||
db $56, $0a
|
db SPRITE_ANIM_FRAME_IDX_56, $0a
|
||||||
db $57, $09
|
db SPRITE_ANIM_FRAME_IDX_57, $09
|
||||||
db $58, $0a
|
db SPRITE_ANIM_FRAME_IDX_58, $0a
|
||||||
db $59, $0a
|
db SPRITE_ANIM_FRAME_IDX_59, $0a
|
||||||
db $58, $09
|
db SPRITE_ANIM_FRAME_IDX_58, $09
|
||||||
db $5a, $0a
|
db SPRITE_ANIM_FRAME_IDX_5A, $0a
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_25:
|
.Frameset_25:
|
||||||
db $50, $02
|
db SPRITE_ANIM_FRAME_IDX_50, $02
|
||||||
db $5b, $02
|
db SPRITE_ANIM_FRAME_IDX_5B, $02
|
||||||
db $50, $02
|
db SPRITE_ANIM_FRAME_IDX_50, $02
|
||||||
db $5b, $42
|
db SPRITE_ANIM_FRAME_IDX_5B, $42
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_26:
|
.Frameset_26:
|
||||||
db $5c, $02
|
db SPRITE_ANIM_FRAME_IDX_5C, $02
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_27:
|
.Frameset_27:
|
||||||
db $5d, $02
|
db SPRITE_ANIM_FRAME_IDX_5D, $02
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_28:
|
.Frameset_28:
|
||||||
db $5e, $02
|
db SPRITE_ANIM_FRAME_IDX_5E, $02
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_29:
|
.Frameset_29:
|
||||||
db $5f, $02
|
db SPRITE_ANIM_FRAME_IDX_5F, $02
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_2a:
|
.Frameset_2a:
|
||||||
db $60, $02
|
db SPRITE_ANIM_FRAME_IDX_60, $02
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_2b:
|
.Frameset_2b:
|
||||||
db $61, $02
|
db SPRITE_ANIM_FRAME_IDX_61, $02
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_2c:
|
.Frameset_2c:
|
||||||
db $62, $02
|
db SPRITE_ANIM_FRAME_IDX_62, $02
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_2f:
|
.Frameset_2f:
|
||||||
db $32, $03
|
db SPRITE_ANIM_FRAME_IDX_32, $03
|
||||||
db $33, $03
|
db SPRITE_ANIM_FRAME_IDX_33, $03
|
||||||
db $34, $03
|
db SPRITE_ANIM_FRAME_IDX_34, $03
|
||||||
db $30, $03
|
db SPRITE_ANIM_FRAME_IDX_30, $03
|
||||||
db $31, $03
|
db SPRITE_ANIM_FRAME_IDX_31, $03
|
||||||
db $30, $03
|
db SPRITE_ANIM_FRAME_IDX_30, $03
|
||||||
db $31, $43
|
db SPRITE_ANIM_FRAME_IDX_31, $43
|
||||||
db $30, $03
|
db SPRITE_ANIM_FRAME_IDX_30, $03
|
||||||
db $31, $03
|
db SPRITE_ANIM_FRAME_IDX_31, $03
|
||||||
db $30, $03
|
db SPRITE_ANIM_FRAME_IDX_30, $03
|
||||||
db $31, $43
|
db SPRITE_ANIM_FRAME_IDX_31, $43
|
||||||
db $30, $03
|
db SPRITE_ANIM_FRAME_IDX_30, $03
|
||||||
db $31, $03
|
db SPRITE_ANIM_FRAME_IDX_31, $03
|
||||||
db $30, $03
|
db SPRITE_ANIM_FRAME_IDX_30, $03
|
||||||
db $31, $43
|
db SPRITE_ANIM_FRAME_IDX_31, $43
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_30:
|
.Frameset_30:
|
||||||
db $30, $03
|
db SPRITE_ANIM_FRAME_IDX_30, $03
|
||||||
db $31, $03
|
db SPRITE_ANIM_FRAME_IDX_31, $03
|
||||||
db $30, $03
|
db SPRITE_ANIM_FRAME_IDX_30, $03
|
||||||
db $31, $43
|
db SPRITE_ANIM_FRAME_IDX_31, $43
|
||||||
db $30, $03
|
db SPRITE_ANIM_FRAME_IDX_30, $03
|
||||||
db $31, $03
|
db SPRITE_ANIM_FRAME_IDX_31, $03
|
||||||
db $30, $03
|
db SPRITE_ANIM_FRAME_IDX_30, $03
|
||||||
db $31, $43
|
db SPRITE_ANIM_FRAME_IDX_31, $43
|
||||||
db $30, $03
|
db SPRITE_ANIM_FRAME_IDX_30, $03
|
||||||
db $31, $03
|
db SPRITE_ANIM_FRAME_IDX_31, $03
|
||||||
db $30, $03
|
db SPRITE_ANIM_FRAME_IDX_30, $03
|
||||||
db $31, $43
|
db SPRITE_ANIM_FRAME_IDX_31, $43
|
||||||
db $32, $03
|
db SPRITE_ANIM_FRAME_IDX_32, $03
|
||||||
db $33, $03
|
db SPRITE_ANIM_FRAME_IDX_33, $03
|
||||||
db $34, $03
|
db SPRITE_ANIM_FRAME_IDX_34, $03
|
||||||
db -4
|
db -4
|
||||||
|
|
||||||
.Frameset_31:
|
.Frameset_31:
|
||||||
db $67, $03
|
db SPRITE_ANIM_FRAME_IDX_67, $03
|
||||||
db $68, $03
|
db SPRITE_ANIM_FRAME_IDX_68, $03
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_32:
|
.Frameset_32:
|
||||||
db $6c, $03
|
db SPRITE_ANIM_FRAME_IDX_6C, $03
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_33:
|
.Frameset_33:
|
||||||
db $6d, $03
|
db SPRITE_ANIM_FRAME_IDX_6D, $03
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_34:
|
.Frameset_34:
|
||||||
db $69, $02
|
db SPRITE_ANIM_FRAME_IDX_69, $02
|
||||||
db $6a, $02
|
db SPRITE_ANIM_FRAME_IDX_6A, $02
|
||||||
db $6b, $02
|
db SPRITE_ANIM_FRAME_IDX_6B, $02
|
||||||
db -4
|
db -4
|
||||||
|
|
||||||
.Frameset_35:
|
.Frameset_35:
|
||||||
db $6e, $03
|
db SPRITE_ANIM_FRAME_IDX_6E, $03
|
||||||
db $6f, $03
|
db SPRITE_ANIM_FRAME_IDX_6F, $03
|
||||||
db $70, $03
|
db SPRITE_ANIM_FRAME_IDX_70, $03
|
||||||
db $71, $03
|
db SPRITE_ANIM_FRAME_IDX_71, $03
|
||||||
db -2
|
db -2
|
||||||
|
|
||||||
.Frameset_36:
|
.Frameset_36:
|
||||||
db $71, $03
|
db SPRITE_ANIM_FRAME_IDX_71, $03
|
||||||
db $6e, $07
|
db SPRITE_ANIM_FRAME_IDX_6E, $07
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_37:
|
.Frameset_37:
|
||||||
db $72, $20
|
db SPRITE_ANIM_FRAME_IDX_72, $20
|
||||||
db $73, $07
|
db SPRITE_ANIM_FRAME_IDX_73, $07
|
||||||
db $74, $07
|
db SPRITE_ANIM_FRAME_IDX_74, $07
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_38:
|
.Frameset_38:
|
||||||
db $75, $03
|
db SPRITE_ANIM_FRAME_IDX_75, $03
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_39:
|
.Frameset_39:
|
||||||
db $76, $03
|
db SPRITE_ANIM_FRAME_IDX_76, $03
|
||||||
db $77, $03
|
db SPRITE_ANIM_FRAME_IDX_77, $03
|
||||||
db $78, $07
|
db SPRITE_ANIM_FRAME_IDX_78, $07
|
||||||
db -4
|
db -4
|
||||||
|
|
||||||
.Frameset_3a:
|
.Frameset_3a:
|
||||||
db $76, $43
|
db SPRITE_ANIM_FRAME_IDX_76, $43
|
||||||
db $77, $43
|
db SPRITE_ANIM_FRAME_IDX_77, $43
|
||||||
db $78, $47
|
db SPRITE_ANIM_FRAME_IDX_78, $47
|
||||||
db -4
|
db -4
|
||||||
|
|
||||||
.Frameset_3b:
|
.Frameset_3b:
|
||||||
db $76, $83
|
db SPRITE_ANIM_FRAME_IDX_76, $83
|
||||||
db $77, $83
|
db SPRITE_ANIM_FRAME_IDX_77, $83
|
||||||
db $78, $87
|
db SPRITE_ANIM_FRAME_IDX_78, $87
|
||||||
db -4
|
db -4
|
||||||
|
|
||||||
.Frameset_3c:
|
.Frameset_3c:
|
||||||
db $76, $c3
|
db SPRITE_ANIM_FRAME_IDX_76, $c3
|
||||||
db $77, $c3
|
db SPRITE_ANIM_FRAME_IDX_77, $c3
|
||||||
db $78, $c7
|
db SPRITE_ANIM_FRAME_IDX_78, $c7
|
||||||
db -4
|
db -4
|
||||||
|
|
||||||
.Frameset_3d:
|
.Frameset_3d:
|
||||||
db $79, $03
|
db SPRITE_ANIM_FRAME_IDX_79, $03
|
||||||
db $7a, $03
|
db SPRITE_ANIM_FRAME_IDX_7A, $03
|
||||||
db $7b, $03
|
db SPRITE_ANIM_FRAME_IDX_7B, $03
|
||||||
db $7c, $07
|
db SPRITE_ANIM_FRAME_IDX_7C, $07
|
||||||
db $7d, $07
|
db SPRITE_ANIM_FRAME_IDX_7D, $07
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_3e:
|
.Frameset_3e:
|
||||||
db $7e, $03
|
db SPRITE_ANIM_FRAME_IDX_7E, $03
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_3f:
|
.Frameset_3f:
|
||||||
@ -469,13 +487,13 @@ SpriteAnimFrameData: ; 8d6e6
|
|||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_40:
|
.Frameset_40:
|
||||||
db $7f, $08
|
db SPRITE_ANIM_FRAME_IDX_7F, $08
|
||||||
db $80, $08
|
db SPRITE_ANIM_FRAME_IDX_80, $08
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
.Frameset_41:
|
.Frameset_41:
|
||||||
db $7f, $48
|
db SPRITE_ANIM_FRAME_IDX_7F, $48
|
||||||
db $80, $48
|
db SPRITE_ANIM_FRAME_IDX_80, $48
|
||||||
db -1
|
db -1
|
||||||
; 8d94d
|
; 8d94d
|
||||||
|
|
||||||
|
103
engine/link.asm
103
engine/link.asm
@ -25,7 +25,7 @@ LinkCommunications: ; 28000
|
|||||||
hlcoord 4, 10
|
hlcoord 4, 10
|
||||||
ld de, String_PleaseWait
|
ld de, String_PleaseWait
|
||||||
call PlaceString
|
call PlaceString
|
||||||
call Function28eff
|
call SetTradeRoomBGPals
|
||||||
call WaitBGMap2
|
call WaitBGMap2
|
||||||
ld hl, wcf5d
|
ld hl, wcf5d
|
||||||
xor a
|
xor a
|
||||||
@ -41,7 +41,7 @@ TimeCapsule: ; 2805d
|
|||||||
call FixDataForLinkTransfer
|
call FixDataForLinkTransfer
|
||||||
xor a
|
xor a
|
||||||
ld [wPlayerLinkAction], a
|
ld [wPlayerLinkAction], a
|
||||||
call Function87d
|
call WaitLinkTransfer
|
||||||
ld a, [hLinkPlayerNumber]
|
ld a, [hLinkPlayerNumber]
|
||||||
cp $2
|
cp $2
|
||||||
jr nz, .player_1
|
jr nz, .player_1
|
||||||
@ -1936,7 +1936,7 @@ LinkTrade: ; 28b87
|
|||||||
callab EvolvePokemon
|
callab EvolvePokemon
|
||||||
call ClearScreen
|
call ClearScreen
|
||||||
call LoadTradeScreenBorder
|
call LoadTradeScreenBorder
|
||||||
call Function28eff
|
call SetTradeRoomBGPals
|
||||||
callba Link_WaitBGMap
|
callba Link_WaitBGMap
|
||||||
ld b, $1
|
ld b, $1
|
||||||
pop af
|
pop af
|
||||||
@ -2029,8 +2029,8 @@ LoadTradeScreenBorder: ; 28ef8
|
|||||||
ret
|
ret
|
||||||
; 28eff
|
; 28eff
|
||||||
|
|
||||||
Function28eff: ; 28eff
|
SetTradeRoomBGPals: ; 28eff
|
||||||
callba Function16d6a7 ; just a nested farcall; so wasteful
|
callba LoadTradeRoomBGPals_ ; just a nested farcall; so wasteful
|
||||||
call SetPalettes
|
call SetPalettes
|
||||||
ret
|
ret
|
||||||
; 28f09
|
; 28f09
|
||||||
@ -2150,7 +2150,7 @@ Special_EnterTimeCapsule: ; 29c7b
|
|||||||
ld c, 10
|
ld c, 10
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
ld a, $4
|
ld a, $4
|
||||||
call Function29f17
|
call Link_EnsureSync
|
||||||
ld c, 40
|
ld c, 40
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
xor a
|
xor a
|
||||||
@ -2199,7 +2199,7 @@ WaitForOtherPlayerToExit: ; 29c92
|
|||||||
ld [rIE], a
|
ld [rIE], a
|
||||||
pop af
|
pop af
|
||||||
ld [rIF], a
|
ld [rIF], a
|
||||||
ld hl, wcf5b
|
ld hl, wLinkTimeoutFrames
|
||||||
xor a
|
xor a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
@ -2240,7 +2240,7 @@ Special_SetBitsForTimeCapsuleRequest: ; 29cfa
|
|||||||
Special_WaitForLinkedFriend: ; 29d11
|
Special_WaitForLinkedFriend: ; 29d11
|
||||||
ld a, [wPlayerLinkAction]
|
ld a, [wPlayerLinkAction]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_29d2f
|
jr z, .no_link_action
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [rSB], a
|
ld [rSB], a
|
||||||
xor a
|
xor a
|
||||||
@ -2253,17 +2253,17 @@ Special_WaitForLinkedFriend: ; 29d11
|
|||||||
call DelayFrame
|
call DelayFrame
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
|
|
||||||
.asm_29d2f
|
.no_link_action
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [wcf5b + 1], a
|
ld [wLinkTimeoutFrames + 1], a
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
ld [wcf5b], a
|
ld [wLinkTimeoutFrames], a
|
||||||
.asm_29d39
|
.loop
|
||||||
ld a, [hLinkPlayerNumber]
|
ld a, [hLinkPlayerNumber]
|
||||||
cp $2
|
cp $2
|
||||||
jr z, .asm_29d79
|
jr z, .connected
|
||||||
cp $1
|
cp $1
|
||||||
jr z, .asm_29d79
|
jr z, .connected
|
||||||
ld a, -1
|
ld a, -1
|
||||||
ld [hLinkPlayerNumber], a
|
ld [hLinkPlayerNumber], a
|
||||||
ld a, $2
|
ld a, $2
|
||||||
@ -2274,16 +2274,16 @@ Special_WaitForLinkedFriend: ; 29d11
|
|||||||
ld [rSC], a
|
ld [rSC], a
|
||||||
ld a, $80
|
ld a, $80
|
||||||
ld [rSC], a
|
ld [rSC], a
|
||||||
ld a, [wcf5b]
|
ld a, [wLinkTimeoutFrames]
|
||||||
dec a
|
dec a
|
||||||
ld [wcf5b], a
|
ld [wLinkTimeoutFrames], a
|
||||||
jr nz, .asm_29d68
|
jr nz, .not_done
|
||||||
ld a, [wcf5b + 1]
|
ld a, [wLinkTimeoutFrames + 1]
|
||||||
dec a
|
dec a
|
||||||
ld [wcf5b + 1], a
|
ld [wLinkTimeoutFrames + 1], a
|
||||||
jr z, .asm_29d8d
|
jr z, .done
|
||||||
|
|
||||||
.asm_29d68
|
.not_done
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rSB], a
|
ld [rSB], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
@ -2291,19 +2291,19 @@ Special_WaitForLinkedFriend: ; 29d11
|
|||||||
ld a, $81
|
ld a, $81
|
||||||
ld [rSC], a
|
ld [rSC], a
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
jr .asm_29d39
|
jr .loop
|
||||||
|
|
||||||
.asm_29d79
|
.connected
|
||||||
call LinkDataReceived
|
call LinkDataReceived
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call LinkDataReceived
|
call LinkDataReceived
|
||||||
ld c, $32
|
ld c, 50
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_29d8d
|
.done
|
||||||
xor a
|
xor a
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
ret
|
ret
|
||||||
@ -2312,7 +2312,7 @@ Special_WaitForLinkedFriend: ; 29d11
|
|||||||
Special_CheckLinkTimeout: ; 29d92
|
Special_CheckLinkTimeout: ; 29d92
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wPlayerLinkAction], a
|
ld [wPlayerLinkAction], a
|
||||||
ld hl, wcf5b
|
ld hl, wLinkTimeoutFrames
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
xor a
|
xor a
|
||||||
@ -2322,19 +2322,19 @@ Special_CheckLinkTimeout: ; 29d92
|
|||||||
ld [hVBlank], a
|
ld [hVBlank], a
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call Function29e0c
|
call Link_CheckCommunicationError
|
||||||
xor a
|
xor a
|
||||||
ld [hVBlank], a
|
ld [hVBlank], a
|
||||||
ld a, [ScriptVar]
|
ld a, [ScriptVar]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
jp Function29f04
|
jp Link_ResetSerialRegistersAfterLinkClosure
|
||||||
; 29dba
|
; 29dba
|
||||||
|
|
||||||
Function29dba: ; 29dba
|
Function29dba: ; 29dba
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [wPlayerLinkAction], a
|
ld [wPlayerLinkAction], a
|
||||||
ld hl, wcf5b
|
ld hl, wLinkTimeoutFrames
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
xor a
|
xor a
|
||||||
@ -2344,7 +2344,7 @@ Function29dba: ; 29dba
|
|||||||
ld [hVBlank], a
|
ld [hVBlank], a
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call Function29e0c
|
call Link_CheckCommunicationError
|
||||||
ld a, [ScriptVar]
|
ld a, [ScriptVar]
|
||||||
and a
|
and a
|
||||||
jr z, .vblank
|
jr z, .vblank
|
||||||
@ -2359,11 +2359,11 @@ Function29dba: ; 29dba
|
|||||||
jr nz, .script_var
|
jr nz, .script_var
|
||||||
ld a, $6
|
ld a, $6
|
||||||
ld [wPlayerLinkAction], a
|
ld [wPlayerLinkAction], a
|
||||||
ld hl, wcf5b
|
ld hl, wLinkTimeoutFrames
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], $32
|
ld [hl], $32
|
||||||
call Function29e0c
|
call Link_CheckCommunicationError
|
||||||
ld a, [wOtherPlayerLinkMode]
|
ld a, [wOtherPlayerLinkMode]
|
||||||
cp $6
|
cp $6
|
||||||
jr z, .vblank
|
jr z, .vblank
|
||||||
@ -2379,12 +2379,12 @@ Function29dba: ; 29dba
|
|||||||
ret
|
ret
|
||||||
; 29e0c
|
; 29e0c
|
||||||
|
|
||||||
Function29e0c: ; 29e0c
|
Link_CheckCommunicationError: ; 29e0c
|
||||||
xor a
|
xor a
|
||||||
ld [hFFCA], a
|
ld [hFFCA], a
|
||||||
ld a, [wcf5b]
|
ld a, [wLinkTimeoutFrames]
|
||||||
ld h, a
|
ld h, a
|
||||||
ld a, [wcf5b + 1]
|
ld a, [wLinkTimeoutFrames + 1]
|
||||||
ld l, a
|
ld l, a
|
||||||
push hl
|
push hl
|
||||||
call .CheckConnected
|
call .CheckConnected
|
||||||
@ -2403,7 +2403,7 @@ Function29e0c: ; 29e0c
|
|||||||
|
|
||||||
.load_scriptvar
|
.load_scriptvar
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
ld hl, wcf5b
|
ld hl, wLinkTimeoutFrames
|
||||||
xor a
|
xor a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
@ -2411,8 +2411,8 @@ Function29e0c: ; 29e0c
|
|||||||
; 29e3b
|
; 29e3b
|
||||||
|
|
||||||
.CheckConnected: ; 29e3b
|
.CheckConnected: ; 29e3b
|
||||||
call Function87d
|
call WaitLinkTransfer
|
||||||
ld hl, wcf5b
|
ld hl, wLinkTimeoutFrames
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
inc a
|
inc a
|
||||||
ret nz
|
ret nz
|
||||||
@ -2432,8 +2432,8 @@ Function29e0c: ; 29e0c
|
|||||||
; 29e53
|
; 29e53
|
||||||
|
|
||||||
.ConvertDW: ; 29e53
|
.ConvertDW: ; 29e53
|
||||||
; hl = ((hl - $100) / 4) + $100
|
; [wLinkTimeoutFrames] = ((hl - $100) / 4) + $100
|
||||||
; = (hl / 4) + $c0
|
; = (hl / 4) + $c0
|
||||||
dec h
|
dec h
|
||||||
srl h
|
srl h
|
||||||
rr l
|
rr l
|
||||||
@ -2441,9 +2441,9 @@ Function29e0c: ; 29e0c
|
|||||||
rr l
|
rr l
|
||||||
inc h
|
inc h
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [wcf5b], a
|
ld [wLinkTimeoutFrames], a
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [wcf5b + 1], a
|
ld [wLinkTimeoutFrames + 1], a
|
||||||
ret
|
ret
|
||||||
; 29e66
|
; 29e66
|
||||||
|
|
||||||
@ -2452,12 +2452,11 @@ Special_TryQuickSave: ; 29e66
|
|||||||
push af
|
push af
|
||||||
callba Link_SaveGame
|
callba Link_SaveGame
|
||||||
ld a, $1
|
ld a, $1
|
||||||
jr nc, .asm_29e75
|
jr nc, .return_result
|
||||||
xor a
|
xor a
|
||||||
|
.return_result
|
||||||
.asm_29e75
|
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
ld c, $1e
|
ld c, 30
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
pop af
|
pop af
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
@ -2466,7 +2465,7 @@ Special_TryQuickSave: ; 29e66
|
|||||||
|
|
||||||
Special_CheckBothSelectedSameRoom: ; 29e82
|
Special_CheckBothSelectedSameRoom: ; 29e82
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
call Function29f17
|
call Link_EnsureSync
|
||||||
push af
|
push af
|
||||||
call LinkDataReceived
|
call LinkDataReceived
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
@ -2527,19 +2526,19 @@ Special_Colosseum: ; 29ed9
|
|||||||
Special_CloseLink: ; 29eee
|
Special_CloseLink: ; 29eee
|
||||||
xor a
|
xor a
|
||||||
ld [wLinkMode], a
|
ld [wLinkMode], a
|
||||||
ld c, $3
|
ld c, 3
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
jp Function29f04
|
jp Link_ResetSerialRegistersAfterLinkClosure
|
||||||
; 29efa
|
; 29efa
|
||||||
|
|
||||||
Special_FailedLinkToPast: ; 29efa
|
Special_FailedLinkToPast: ; 29efa
|
||||||
ld c, 40
|
ld c, 40
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
ld a, $e
|
ld a, $e
|
||||||
jp Function29f17
|
jp Link_EnsureSync
|
||||||
; 29f04
|
; 29f04
|
||||||
|
|
||||||
Function29f04: ; 29f04
|
Link_ResetSerialRegistersAfterLinkClosure: ; 29f04
|
||||||
ld c, 3
|
ld c, 3
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
ld a, -1
|
ld a, -1
|
||||||
@ -2552,7 +2551,7 @@ Function29f04: ; 29f04
|
|||||||
ret
|
ret
|
||||||
; 29f17
|
; 29f17
|
||||||
|
|
||||||
Function29f17: ; 29f17
|
Link_EnsureSync: ; 29f17
|
||||||
add $d0
|
add $d0
|
||||||
ld [wPlayerLinkAction], a
|
ld [wPlayerLinkAction], a
|
||||||
ld [wcf57], a
|
ld [wcf57], a
|
||||||
|
@ -145,8 +145,8 @@ LinkComms_LoadPleaseWaitTextboxBorderGFX: ; 16d69a
|
|||||||
ret
|
ret
|
||||||
; 16d6a7
|
; 16d6a7
|
||||||
|
|
||||||
Function16d6a7: ; 16d6a7
|
LoadTradeRoomBGPals_: ; 16d6a7
|
||||||
callba Function49811
|
callba LoadTradeRoomBGPals
|
||||||
ret
|
ret
|
||||||
; 16d6ae
|
; 16d6ae
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ LinkTextbox: ; 16d6ca
|
|||||||
Function16d6ce: ; 16d6ce
|
Function16d6ce: ; 16d6ce
|
||||||
call LoadStandardMenuDataHeader
|
call LoadStandardMenuDataHeader
|
||||||
call Function16d6e1
|
call Function16d6e1
|
||||||
callba Function87d
|
callba WaitLinkTransfer
|
||||||
call Call_ExitMenu
|
call Call_ExitMenu
|
||||||
call WaitBGMap2
|
call WaitBGMap2
|
||||||
ret
|
ret
|
||||||
|
@ -38,11 +38,11 @@ LoadMenuMonIcon: ; 8e83f
|
|||||||
|
|
||||||
|
|
||||||
.Jumptable: ; 8e854 (23:6854)
|
.Jumptable: ; 8e854 (23:6854)
|
||||||
dw Function8e8d5 ; party menu
|
dw PartyMenu_InitAnimatedMonIcon ; party menu
|
||||||
dw Function8e961 ; naming screen
|
dw NamingScreen_InitAnimatedMonIcon ; naming screen
|
||||||
dw Function8e97d ; moves (?)
|
dw MoveList_InitAnimatedMonIcon ; moves (?)
|
||||||
dw Trade_LoadMonIconGFX ; trade
|
dw Trade_LoadMonIconGFX ; trade
|
||||||
dw Function8e898 ; mobile
|
dw Mobile_InitAnimatedMonIcon ; mobile
|
||||||
dw Mobile_InitPartyMenuBGPal71 ; mobile
|
dw Mobile_InitPartyMenuBGPal71 ; mobile
|
||||||
dw .GetPartyMenuMonIcon ; unused
|
dw .GetPartyMenuMonIcon ; unused
|
||||||
|
|
||||||
@ -84,8 +84,8 @@ LoadMenuMonIcon: ; 8e83f
|
|||||||
ld [hl], a
|
ld [hl], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function8e898: ; 8e898 (23:6898)
|
Mobile_InitAnimatedMonIcon: ; 8e898 (23:6898)
|
||||||
call Function8e8d5
|
call PartyMenu_InitAnimatedMonIcon
|
||||||
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
|
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, SPRITE_ANIM_SEQ_NULL
|
ld a, SPRITE_ANIM_SEQ_NULL
|
||||||
@ -121,7 +121,7 @@ Mobile_InitPartyMenuBGPal71: ; 8e8b1 (23:68b1)
|
|||||||
ld [wc608 + 1], a
|
ld [wc608 + 1], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function8e8d5: ; 8e8d5 (23:68d5)
|
PartyMenu_InitAnimatedMonIcon: ; 8e8d5 (23:68d5)
|
||||||
call InitPartyMenuIcon
|
call InitPartyMenuIcon
|
||||||
call .SpawnItemIcon
|
call .SpawnItemIcon
|
||||||
call SetPartyMonIconAnimSpeed
|
call SetPartyMonIconAnimSpeed
|
||||||
@ -144,11 +144,11 @@ Function8e8d5: ; 8e8d5 (23:68d5)
|
|||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
jr c, .mail
|
jr c, .mail
|
||||||
ld a, $3
|
ld a, SPRITE_ANIM_FRAMESET_03
|
||||||
jr .okay
|
jr .okay
|
||||||
|
|
||||||
.mail
|
.mail
|
||||||
ld a, $2
|
ld a, SPRITE_ANIM_FRAMESET_02
|
||||||
.okay
|
.okay
|
||||||
ld hl, SPRITEANIMSTRUCT_FRAMESET_ID
|
ld hl, SPRITEANIMSTRUCT_FRAMESET_ID
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -218,7 +218,7 @@ SetPartyMonIconAnimSpeed: ; 8e936 (23:6936)
|
|||||||
db $00, $40, $80
|
db $00, $40, $80
|
||||||
; 8e961
|
; 8e961
|
||||||
|
|
||||||
Function8e961: ; 8e961 (23:6961)
|
NamingScreen_InitAnimatedMonIcon: ; 8e961 (23:6961)
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
call ReadMonMenuIcon
|
call ReadMonMenuIcon
|
||||||
ld [CurIcon], a
|
ld [CurIcon], a
|
||||||
@ -232,7 +232,7 @@ Function8e961: ; 8e961 (23:6961)
|
|||||||
ld [hl], SPRITE_ANIM_SEQ_NULL
|
ld [hl], SPRITE_ANIM_SEQ_NULL
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function8e97d: ; 8e97d (23:697d)
|
MoveList_InitAnimatedMonIcon: ; 8e97d (23:697d)
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
call ReadMonMenuIcon
|
call ReadMonMenuIcon
|
||||||
ld [CurIcon], a
|
ld [CurIcon], a
|
||||||
|
@ -201,10 +201,11 @@ OaksPkmnTalk3:
|
|||||||
|
|
||||||
OaksPkmnTalk4:
|
OaksPkmnTalk4:
|
||||||
; Choose a random route, and a random Pokemon from that route.
|
; Choose a random route, and a random Pokemon from that route.
|
||||||
|
.sample
|
||||||
call Random
|
call Random
|
||||||
and $1f
|
and $1f
|
||||||
cp $f
|
cp $f ; so wasteful
|
||||||
jr nc, OaksPkmnTalk4
|
jr nc, .sample
|
||||||
; We now have a number between 0 and 14.
|
; We now have a number between 0 and 14.
|
||||||
ld hl, .routes
|
ld hl, .routes
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -1576,7 +1577,8 @@ BuenasPassword4:
|
|||||||
; There are only 11 groups to choose from.
|
; There are only 11 groups to choose from.
|
||||||
.greater_than_11
|
.greater_than_11
|
||||||
call Random
|
call Random
|
||||||
and $f
|
maskbits NUM_PASSWORD_CATEGORIES
|
||||||
|
and x
|
||||||
cp NUM_PASSWORD_CATEGORIES
|
cp NUM_PASSWORD_CATEGORIES
|
||||||
jr nc, .greater_than_11
|
jr nc, .greater_than_11
|
||||||
; Store it in the high nybble of e.
|
; Store it in the high nybble of e.
|
||||||
|
@ -1457,7 +1457,7 @@ ChooseMoveToDelete: ; 12f5b
|
|||||||
push af
|
push af
|
||||||
set NO_TEXT_SCROLL, [hl]
|
set NO_TEXT_SCROLL, [hl]
|
||||||
call LoadFontsBattleExtra
|
call LoadFontsBattleExtra
|
||||||
call .asm_12f73
|
call .ChooseMoveToDelete
|
||||||
pop bc
|
pop bc
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [Options], a
|
ld [Options], a
|
||||||
@ -1467,36 +1467,36 @@ ChooseMoveToDelete: ; 12f5b
|
|||||||
ret
|
ret
|
||||||
; 12f73
|
; 12f73
|
||||||
|
|
||||||
.asm_12f73
|
.ChooseMoveToDelete
|
||||||
call SetUpMoveScreenBG
|
call SetUpMoveScreenBG
|
||||||
ld de, DeleteMoveScreenAttrs
|
ld de, DeleteMoveScreenAttrs
|
||||||
call SetMenuAttributes
|
call SetMenuAttributes
|
||||||
call SetUpMoveList
|
call SetUpMoveList
|
||||||
ld hl, w2DMenuFlags1
|
ld hl, w2DMenuFlags1
|
||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
jr .asm_12f93
|
jr .enter_loop
|
||||||
|
|
||||||
.asm_12f86
|
.loop
|
||||||
call ScrollingMenuJoypad
|
call ScrollingMenuJoypad
|
||||||
bit 1, a
|
bit B_BUTTON_F, a
|
||||||
jp nz, .asm_12f9f
|
jp nz, .b_button
|
||||||
bit 0, a
|
bit A_BUTTON_F, a
|
||||||
jp nz, .asm_12f9c
|
jp nz, .a_button
|
||||||
|
|
||||||
.asm_12f93
|
.enter_loop
|
||||||
call PrepareToPlaceMoveData
|
call PrepareToPlaceMoveData
|
||||||
call PlaceMoveData
|
call PlaceMoveData
|
||||||
jp .asm_12f86
|
jp .loop
|
||||||
; 12f9c
|
; 12f9c
|
||||||
|
|
||||||
.asm_12f9c
|
.a_button
|
||||||
and a
|
and a
|
||||||
jr .asm_12fa0
|
jr .finish
|
||||||
|
|
||||||
.asm_12f9f
|
.b_button
|
||||||
scf
|
scf
|
||||||
|
|
||||||
.asm_12fa0
|
.finish
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ld [wSwitchMon], a
|
ld [wSwitchMon], a
|
||||||
|
@ -143,12 +143,12 @@ Function78a:: ; 78a
|
|||||||
jr nz, .reset_ffca
|
jr nz, .reset_ffca
|
||||||
ld a, [hLinkPlayerNumber]
|
ld a, [hLinkPlayerNumber]
|
||||||
cp $1
|
cp $1
|
||||||
jr nz, .not_player_1_or_wcf5b_zero
|
jr nz, .not_player_1_or_wLinkTimeoutFrames_zero
|
||||||
call Checkwcf5bNonzero
|
call CheckwLinkTimeoutFramesNonzero
|
||||||
jr z, .not_player_1_or_wcf5b_zero
|
jr z, .not_player_1_or_wLinkTimeoutFrames_zero
|
||||||
call .delay_15_cycles
|
call .delay_15_cycles
|
||||||
push hl
|
push hl
|
||||||
ld hl, wcf5b + 1
|
ld hl, wLinkTimeoutFrames + 1
|
||||||
inc [hl]
|
inc [hl]
|
||||||
jr nz, .no_rollover_up
|
jr nz, .no_rollover_up
|
||||||
dec hl
|
dec hl
|
||||||
@ -156,11 +156,11 @@ Function78a:: ; 78a
|
|||||||
|
|
||||||
.no_rollover_up
|
.no_rollover_up
|
||||||
pop hl
|
pop hl
|
||||||
call Checkwcf5bNonzero
|
call CheckwLinkTimeoutFramesNonzero
|
||||||
jr nz, .loop2
|
jr nz, .loop2
|
||||||
jp SerialDisconnected
|
jp SerialDisconnected
|
||||||
|
|
||||||
.not_player_1_or_wcf5b_zero
|
.not_player_1_or_wLinkTimeoutFrames_zero
|
||||||
ld a, [rIE]
|
ld a, [rIE]
|
||||||
and $f
|
and $f
|
||||||
cp $8
|
cp $8
|
||||||
@ -176,6 +176,7 @@ Function78a:: ; 78a
|
|||||||
ld a, [hLinkPlayerNumber]
|
ld a, [hLinkPlayerNumber]
|
||||||
cp $1
|
cp $1
|
||||||
jr z, .reset_ffca
|
jr z, .reset_ffca
|
||||||
|
|
||||||
ld a, 255
|
ld a, 255
|
||||||
.delay_255_cycles
|
.delay_255_cycles
|
||||||
dec a
|
dec a
|
||||||
@ -188,6 +189,7 @@ Function78a:: ; 78a
|
|||||||
and $f
|
and $f
|
||||||
sub $8
|
sub $8
|
||||||
jr nz, .rIE_not_equal_8
|
jr nz, .rIE_not_equal_8
|
||||||
|
|
||||||
ld [wcf5d], a
|
ld [wcf5d], a
|
||||||
ld a, $50
|
ld a, $50
|
||||||
ld [wcf5d + 1], a
|
ld [wcf5d + 1], a
|
||||||
@ -196,10 +198,10 @@ Function78a:: ; 78a
|
|||||||
ld a, [hSerialReceive]
|
ld a, [hSerialReceive]
|
||||||
cp $fe
|
cp $fe
|
||||||
ret nz
|
ret nz
|
||||||
call Checkwcf5bNonzero
|
call CheckwLinkTimeoutFramesNonzero
|
||||||
jr z, .wcf5b_zero
|
jr z, .wLinkTimeoutFrames_zero
|
||||||
push hl
|
push hl
|
||||||
ld hl, wcf5b + 1
|
ld hl, wLinkTimeoutFrames + 1
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
dec a
|
dec a
|
||||||
ld [hld], a
|
ld [hld], a
|
||||||
@ -209,10 +211,10 @@ Function78a:: ; 78a
|
|||||||
|
|
||||||
.no_rollover
|
.no_rollover
|
||||||
pop hl
|
pop hl
|
||||||
call Checkwcf5bNonzero
|
call CheckwLinkTimeoutFramesNonzero
|
||||||
jr z, SerialDisconnected
|
jr z, SerialDisconnected
|
||||||
|
|
||||||
.wcf5b_zero
|
.wLinkTimeoutFrames_zero
|
||||||
ld a, [rIE]
|
ld a, [rIE]
|
||||||
and $f
|
and $f
|
||||||
cp $8
|
cp $8
|
||||||
@ -231,9 +233,9 @@ Function78a:: ; 78a
|
|||||||
ret
|
ret
|
||||||
; 82b
|
; 82b
|
||||||
|
|
||||||
Checkwcf5bNonzero:: ; 82b
|
CheckwLinkTimeoutFramesNonzero:: ; 82b
|
||||||
push hl
|
push hl
|
||||||
ld hl, wcf5b
|
ld hl, wLinkTimeoutFrames
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
or [hl]
|
or [hl]
|
||||||
pop hl
|
pop hl
|
||||||
@ -242,8 +244,8 @@ Checkwcf5bNonzero:: ; 82b
|
|||||||
|
|
||||||
SerialDisconnected:: ; 833
|
SerialDisconnected:: ; 833
|
||||||
dec a
|
dec a
|
||||||
ld [wcf5b], a
|
ld [wLinkTimeoutFrames], a
|
||||||
ld [wcf5b + 1], a
|
ld [wLinkTimeoutFrames + 1], a
|
||||||
ret
|
ret
|
||||||
; 83b
|
; 83b
|
||||||
|
|
||||||
@ -276,7 +278,7 @@ Function83b:: ; 83b
|
|||||||
Function862:: ; 862
|
Function862:: ; 862
|
||||||
call LoadTileMapToTempTileMap
|
call LoadTileMapToTempTileMap
|
||||||
callab PlaceWaitingText
|
callab PlaceWaitingText
|
||||||
call Function87d
|
call WaitLinkTransfer
|
||||||
jp Call_LoadTempTileMapToTileMap
|
jp Call_LoadTempTileMapToTileMap
|
||||||
; 871
|
; 871
|
||||||
|
|
||||||
@ -284,21 +286,21 @@ Function862:: ; 862
|
|||||||
Function871:: ; 871
|
Function871:: ; 871
|
||||||
call LoadTileMapToTempTileMap
|
call LoadTileMapToTempTileMap
|
||||||
callab PlaceWaitingText
|
callab PlaceWaitingText
|
||||||
jp Function87d
|
jp WaitLinkTransfer
|
||||||
; 87d
|
; 87d
|
||||||
|
|
||||||
; One "giant" leap for machinekind
|
; One "giant" leap for machinekind
|
||||||
|
|
||||||
Function87d:: ; 87d
|
WaitLinkTransfer:: ; 87d
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
ld [wOtherPlayerLinkAction], a
|
ld [wOtherPlayerLinkAction], a
|
||||||
.loop
|
.loop
|
||||||
call LinkTransfer
|
call LinkTransfer
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call Checkwcf5bNonzero
|
call CheckwLinkTimeoutFramesNonzero
|
||||||
jr z, .check
|
jr z, .check
|
||||||
push hl
|
push hl
|
||||||
ld hl, wcf5b + 1
|
ld hl, wLinkTimeoutFrames + 1
|
||||||
dec [hl]
|
dec [hl]
|
||||||
jr nz, .skip
|
jr nz, .skip
|
||||||
dec hl
|
dec hl
|
||||||
|
@ -48,17 +48,20 @@ GetClock:: ; 5b7
|
|||||||
|
|
||||||
ld [hl], RTC_S
|
ld [hl], RTC_S
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
and $3f
|
maskbits 60
|
||||||
|
and x
|
||||||
ld [hRTCSeconds], a
|
ld [hRTCSeconds], a
|
||||||
|
|
||||||
ld [hl], RTC_M
|
ld [hl], RTC_M
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
and $3f
|
maskbits 60
|
||||||
|
and x
|
||||||
ld [hRTCMinutes], a
|
ld [hRTCMinutes], a
|
||||||
|
|
||||||
ld [hl], RTC_H
|
ld [hl], RTC_H
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
and $1f
|
maskbits 24
|
||||||
|
and x
|
||||||
ld [hRTCHours], a
|
ld [hRTCHours], a
|
||||||
|
|
||||||
ld [hl], RTC_DL
|
ld [hl], RTC_DL
|
||||||
|
19
macros.asm
19
macros.asm
@ -270,3 +270,22 @@ jumptable: MACRO
|
|||||||
ld l, a
|
ld l, a
|
||||||
jp [hl]
|
jp [hl]
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
maskbits: macro
|
||||||
|
; returns to x
|
||||||
|
; usage in rejection sampling
|
||||||
|
; .loop
|
||||||
|
; call Random
|
||||||
|
; maskbits 30
|
||||||
|
; and x
|
||||||
|
; cp 30
|
||||||
|
; jr nc, .loop
|
||||||
|
|
||||||
|
x = 1
|
||||||
|
rept 8
|
||||||
|
IF \1 > x
|
||||||
|
x = (x + 1) * 2 +- 1
|
||||||
|
ENDC
|
||||||
|
endr
|
||||||
|
endm
|
||||||
|
|
||||||
|
2
main.asm
2
main.asm
@ -2507,7 +2507,7 @@ LinkMonStatsScreen: ; 4d319
|
|||||||
callba LoadTradeScreenBorder
|
callba LoadTradeScreenBorder
|
||||||
callba Link_WaitBGMap
|
callba Link_WaitBGMap
|
||||||
callba InitTradeSpeciesList
|
callba InitTradeSpeciesList
|
||||||
callba Function28eff
|
callba SetTradeRoomBGPals
|
||||||
call WaitBGMap2
|
call WaitBGMap2
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -566,7 +566,7 @@ _InitMG_Mobile_LinkTradePalMap: ; 49797
|
|||||||
ret
|
ret
|
||||||
; 49811
|
; 49811
|
||||||
|
|
||||||
Function49811: ; 49811
|
LoadTradeRoomBGPals: ; 49811
|
||||||
ld hl, Palette_49826
|
ld hl, Palette_49826
|
||||||
ld de, UnknBGPals + $10
|
ld de, UnknBGPals + $10
|
||||||
ld bc, $30
|
ld bc, $30
|
||||||
|
14
wram.asm
14
wram.asm
@ -536,10 +536,18 @@ wTurnEnded:: ds 1 ; c6b4
|
|||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
PlayerStats:: ; c6b6
|
PlayerStats:: ; c6b6
|
||||||
ds 10
|
PlayerAttack:: ds 2
|
||||||
|
PlayerDefense:: ds 2
|
||||||
|
PlayerSpeed:: ds 2
|
||||||
|
PlayerSpAtk:: ds 2
|
||||||
|
PlayerSpDef:: ds 2
|
||||||
ds 1
|
ds 1
|
||||||
EnemyStats:: ; c6c1
|
EnemyStats:: ; c6c1
|
||||||
ds 10
|
EnemyAttack:: ds 2
|
||||||
|
EnemyDefense:: ds 2
|
||||||
|
EnemySpeed:: ds 2
|
||||||
|
EnemySpAtk:: ds 2
|
||||||
|
EnemySpDef:: ds 2
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
PlayerStatLevels:: ; c6cc
|
PlayerStatLevels:: ; c6cc
|
||||||
@ -1270,7 +1278,7 @@ wOtherPlayerLinkMode:: ds 1
|
|||||||
wOtherPlayerLinkAction:: ds 4
|
wOtherPlayerLinkAction:: ds 4
|
||||||
wPlayerLinkAction:: ds 1
|
wPlayerLinkAction:: ds 1
|
||||||
wcf57:: ds 4
|
wcf57:: ds 4
|
||||||
wcf5b:: dw
|
wLinkTimeoutFrames:: dw ; cf5b
|
||||||
wcf5d:: ds 2
|
wcf5d:: ds 2
|
||||||
|
|
||||||
MonType:: ; cf5f
|
MonType:: ; cf5f
|
||||||
|
Loading…
Reference in New Issue
Block a user