You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Move battle start animation functions to its own file
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
AI_SwitchOrTryItem: ; 38000
|
AI_SwitchOrTryItem: ; 38000
|
||||||
and a
|
and a
|
||||||
|
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
@@ -731,7 +731,7 @@ AI_Switch: ; 3846c
|
|||||||
callba Function3d57a
|
callba Function3d57a
|
||||||
xor a
|
xor a
|
||||||
ld [wd264], a
|
ld [wd264], a
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
scf
|
scf
|
||||||
|
140
battle/core.asm
140
battle/core.asm
File diff suppressed because it is too large
Load Diff
@@ -12,7 +12,7 @@ DoPlayerTurn: ; 34000
|
|||||||
DoEnemyTurn: ; 3400a
|
DoEnemyTurn: ; 3400a
|
||||||
call SetEnemyTurn
|
call SetEnemyTurn
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr z, DoTurn
|
jr z, DoTurn
|
||||||
|
|
||||||
@@ -696,7 +696,7 @@ BattleCommand02: ; 343db
|
|||||||
|
|
||||||
; No obedience in link battles
|
; No obedience in link battles
|
||||||
; (since no handling exists for enemy)
|
; (since no handling exists for enemy)
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
@@ -1080,7 +1080,7 @@ endr
|
|||||||
jr z, .asm_345a4
|
jr z, .asm_345a4
|
||||||
|
|
||||||
; skip this part entirely if wildbattle
|
; skip this part entirely if wildbattle
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jr z, .asm_345c5
|
jr z, .asm_345c5
|
||||||
|
|
||||||
@@ -3521,7 +3521,7 @@ Function3534d: ; 3534d
|
|||||||
inc l
|
inc l
|
||||||
|
|
||||||
.asm_3536b
|
.asm_3536b
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
cp 3
|
cp 3
|
||||||
jr z, .done
|
jr z, .done
|
||||||
|
|
||||||
@@ -3835,11 +3835,11 @@ BattleCommanda1: ; 35461
|
|||||||
sub b
|
sub b
|
||||||
ld [DefaultFlypoint], a
|
ld [DefaultFlypoint], a
|
||||||
.asm_3550d
|
.asm_3550d
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jr z, .asm_3556b
|
jr z, .asm_3556b
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_35532
|
jr nz, .asm_35532
|
||||||
|
|
||||||
@@ -4825,7 +4825,7 @@ BattleCommand46: ; 35a74
|
|||||||
|
|
||||||
call Function372d8
|
call Function372d8
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_35a83
|
jr z, .asm_35a83
|
||||||
call AnimateFailedMove
|
call AnimateFailedMove
|
||||||
@@ -4888,7 +4888,7 @@ BattleCommand46: ; 35a74
|
|||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_35af6
|
jr z, .asm_35af6
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jr nz, .asm_35af6
|
jr nz, .asm_35af6
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@@ -5180,7 +5180,7 @@ endr
|
|||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_35c81
|
jr nz, .asm_35c81
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jr nz, .asm_35c81
|
jr nz, .asm_35c81
|
||||||
ld hl, wc739
|
ld hl, wc739
|
||||||
@@ -5585,7 +5585,7 @@ Function35ece: ; 35ece
|
|||||||
jr z, .asm_35eec
|
jr z, .asm_35eec
|
||||||
|
|
||||||
; Not in link battle
|
; Not in link battle
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_35eec
|
jr nz, .asm_35eec
|
||||||
|
|
||||||
@@ -5683,7 +5683,7 @@ BattleCommand2f: ; 35f2c
|
|||||||
and a
|
and a
|
||||||
jr z, .asm_35f89
|
jr z, .asm_35f89
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_35f89
|
jr nz, .asm_35f89
|
||||||
|
|
||||||
@@ -6331,7 +6331,7 @@ BattleCommand1d: ; 362e3
|
|||||||
and a
|
and a
|
||||||
jr z, .DidntMiss
|
jr z, .DidntMiss
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .DidntMiss
|
jr nz, .DidntMiss
|
||||||
|
|
||||||
@@ -7124,7 +7124,7 @@ BattleCommanda0: ; 36778
|
|||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_367bf
|
jr nz, .asm_367bf
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jr nz, .failed
|
jr nz, .failed
|
||||||
ld a, [CurPartyLevel]
|
ld a, [CurPartyLevel]
|
||||||
@@ -7149,7 +7149,7 @@ BattleCommanda0: ; 36778
|
|||||||
jp PrintButItFailed
|
jp PrintButItFailed
|
||||||
|
|
||||||
.asm_367bf
|
.asm_367bf
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jr nz, .failed
|
jr nz, .failed
|
||||||
ld a, [BattleMonLevel]
|
ld a, [BattleMonLevel]
|
||||||
@@ -7214,7 +7214,7 @@ BattleCommand23: ; 3680f
|
|||||||
ld a, [AttackMissed]
|
ld a, [AttackMissed]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_36852 ; 36830 $20
|
jr nz, .asm_36852 ; 36830 $20
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jr nz, .asm_36869 ; 36836 $31
|
jr nz, .asm_36869 ; 36836 $31
|
||||||
ld a, [CurPartyLevel]
|
ld a, [CurPartyLevel]
|
||||||
@@ -7300,7 +7300,7 @@ BattleCommand23: ; 3680f
|
|||||||
and a
|
and a
|
||||||
jr nz, .asm_368f3
|
jr nz, .asm_368f3
|
||||||
|
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jr nz, .asm_36908
|
jr nz, .asm_36908
|
||||||
|
|
||||||
@@ -7496,7 +7496,7 @@ BattleCommand24: ; 369b6
|
|||||||
dec a
|
dec a
|
||||||
jr .asm_36a3a
|
jr .asm_36a3a
|
||||||
.asm_36a0b
|
.asm_36a0b
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
cp $1
|
cp $1
|
||||||
jp z, .asm_36a1e
|
jp z, .asm_36a1e
|
||||||
ld a, [OTPartyCount]
|
ld a, [OTPartyCount]
|
||||||
@@ -8177,7 +8177,7 @@ BattleCommand30: ; 36dc7
|
|||||||
and a
|
and a
|
||||||
jr z, .asm_36e0e
|
jr z, .asm_36e0e
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_36e0e
|
jr nz, .asm_36e0e
|
||||||
|
|
||||||
@@ -9281,7 +9281,7 @@ BattleCommand53: ; 37563
|
|||||||
and a
|
and a
|
||||||
jr z, .party
|
jr z, .party
|
||||||
|
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jr z, .done
|
jr z, .done
|
||||||
|
|
||||||
@@ -9493,7 +9493,7 @@ BattleCommand60: ; 3784b
|
|||||||
BattleCommand61: ; 37874
|
BattleCommand61: ; 37874
|
||||||
; present
|
; present
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
cp $3
|
cp $3
|
||||||
jr z, .asm_3787d
|
jr z, .asm_3787d
|
||||||
push bc
|
push bc
|
||||||
@@ -9502,7 +9502,7 @@ BattleCommand61: ; 37874
|
|||||||
|
|
||||||
call BattleCommand07
|
call BattleCommand07
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
cp $3
|
cp $3
|
||||||
jr z, .asm_37889
|
jr z, .asm_37889
|
||||||
pop de
|
pop de
|
||||||
@@ -9765,7 +9765,7 @@ BattleCommand67: ; 379c9
|
|||||||
.Enemy
|
.Enemy
|
||||||
|
|
||||||
; Wildmons don't have anything to switch to
|
; Wildmons don't have anything to switch to
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a ; WILDMON
|
dec a ; WILDMON
|
||||||
jp z, FailedBatonPass
|
jp z, FailedBatonPass
|
||||||
|
|
||||||
@@ -9800,7 +9800,7 @@ BattleCommand67: ; 379c9
|
|||||||
|
|
||||||
|
|
||||||
BatonPass_LinkPlayerSwitch: ; 37a67
|
BatonPass_LinkPlayerSwitch: ; 37a67
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
@@ -9819,7 +9819,7 @@ BatonPass_LinkPlayerSwitch: ; 37a67
|
|||||||
|
|
||||||
|
|
||||||
BatonPass_LinkEnemySwitch: ; 37a82
|
BatonPass_LinkEnemySwitch: ; 37a82
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
@@ -10057,7 +10057,7 @@ BattleCommand6a6c: ; 37b7e
|
|||||||
jr z, .Full
|
jr z, .Full
|
||||||
|
|
||||||
; Don't factor in time of day in link battles.
|
; Don't factor in time of day in link battles.
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .Weather
|
jr nz, .Weather
|
||||||
|
|
||||||
|
@@ -30,11 +30,11 @@ BattleCommand50: ; 37492
|
|||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr z, .stealenemyitem
|
jr z, .stealenemyitem
|
||||||
|
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
|
@@ -161,7 +161,7 @@ endr
|
|||||||
|
|
||||||
|
|
||||||
DoBadgeTypeBoosts: ; fbe24
|
DoBadgeTypeBoosts: ; fbe24
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
|
@@ -315,3 +315,32 @@ SUBSTATUS_CURLED EQU 0
|
|||||||
const EFFECT_BEAT_UP
|
const EFFECT_BEAT_UP
|
||||||
const EFFECT_FLY
|
const EFFECT_FLY
|
||||||
const EFFECT_DEFENSE_CURL
|
const EFFECT_DEFENSE_CURL
|
||||||
|
|
||||||
|
; Battle vars used in home/battle.asm
|
||||||
|
const_def
|
||||||
|
const PLAYER_SUBSTATUS_1
|
||||||
|
const ENEMY_SUBSTATUS_1
|
||||||
|
const PLAYER_SUBSTATUS_2
|
||||||
|
const ENEMY_SUBSTATUS_2
|
||||||
|
const PLAYER_SUBSTATUS_3
|
||||||
|
const ENEMY_SUBSTATUS_3
|
||||||
|
const PLAYER_SUBSTATUS_4
|
||||||
|
const ENEMY_SUBSTATUS_4
|
||||||
|
const PLAYER_SUBSTATUS_5
|
||||||
|
const ENEMY_SUBSTATUS_5
|
||||||
|
const PLAYER_STATUS
|
||||||
|
const ENEMY_STATUS
|
||||||
|
const PLAYER_MOVE_ANIMATION
|
||||||
|
const ENEMY_MOVE_ANIMATION
|
||||||
|
const PLAYER_MOVE_EFFECT
|
||||||
|
const ENEMY_MOVE_EFFECT
|
||||||
|
const PLAYER_MOVE_POWER
|
||||||
|
const ENEMY_MOVE_POWER
|
||||||
|
const PLAYER_MOVE_TYPE
|
||||||
|
const ENEMY_MOVE_TYPE
|
||||||
|
const PLAYER_CUR_MOVE
|
||||||
|
const ENEMY_CUR_MOVE
|
||||||
|
const PLAYER_COUNTER_MOVE
|
||||||
|
const ENEMY_COUNTER_MOVE
|
||||||
|
const PLAYER_LAST_MOVE
|
||||||
|
const ENEMY_LAST_MOVE
|
||||||
|
872
engine/battle_start.asm
Normal file
872
engine/battle_start.asm
Normal file
File diff suppressed because it is too large
Load Diff
@@ -506,7 +506,7 @@ endr
|
|||||||
; 9693a
|
; 9693a
|
||||||
|
|
||||||
Function9693a: ; 9693a
|
Function9693a: ; 9693a
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .nothing
|
jr nz, .nothing
|
||||||
|
|
||||||
@@ -957,7 +957,7 @@ SelectMenuCallback: ; 96b66
|
|||||||
|
|
||||||
|
|
||||||
CountStep: ; 96b79
|
CountStep: ; 96b79
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .done
|
jr nz, .done
|
||||||
|
|
||||||
|
@@ -1112,7 +1112,7 @@ Function107bb: ; 107bb
|
|||||||
ld a, [InputType]
|
ld a, [InputType]
|
||||||
or a
|
or a
|
||||||
jr z, .asm_107ca
|
jr z, .asm_107ca
|
||||||
callba Function1de28f
|
callba _DudeAutoInput_RightA
|
||||||
|
|
||||||
.asm_107ca
|
.asm_107ca
|
||||||
call Function107d7
|
call Function107d7
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Functiond0000: ; d0000
|
Functiond0000: ; d0000
|
||||||
hlcoord 12, 0
|
hlcoord 12, 0
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
cp $1
|
cp $1
|
||||||
jr z, .asm_d0012
|
jr z, .asm_d0012
|
||||||
ld e, $0
|
ld e, $0
|
||||||
|
@@ -106,7 +106,7 @@ UpdateEnemyMonInParty:: ; 39b0
|
|||||||
; Update level, status, current HP
|
; Update level, status, current HP
|
||||||
|
|
||||||
; No wildmons.
|
; No wildmons.
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
@@ -194,34 +194,6 @@ endr
|
|||||||
dw .status, .statusopp, .animation, .effect, .power, .type
|
dw .status, .statusopp, .animation, .effect, .power, .type
|
||||||
dw .curmove, .lastcounter, .lastcounteropp, .lastmove, .lastmoveopp
|
dw .curmove, .lastcounter, .lastcounteropp, .lastmove, .lastmoveopp
|
||||||
|
|
||||||
const_def
|
|
||||||
const PLAYER_SUBSTATUS_1
|
|
||||||
const ENEMY_SUBSTATUS_1
|
|
||||||
const PLAYER_SUBSTATUS_2
|
|
||||||
const ENEMY_SUBSTATUS_2
|
|
||||||
const PLAYER_SUBSTATUS_3
|
|
||||||
const ENEMY_SUBSTATUS_3
|
|
||||||
const PLAYER_SUBSTATUS_4
|
|
||||||
const ENEMY_SUBSTATUS_4
|
|
||||||
const PLAYER_SUBSTATUS_5
|
|
||||||
const ENEMY_SUBSTATUS_5
|
|
||||||
const PLAYER_STATUS
|
|
||||||
const ENEMY_STATUS
|
|
||||||
const PLAYER_MOVE_ANIMATION
|
|
||||||
const ENEMY_MOVE_ANIMATION
|
|
||||||
const PLAYER_MOVE_EFFECT
|
|
||||||
const ENEMY_MOVE_EFFECT
|
|
||||||
const PLAYER_MOVE_POWER
|
|
||||||
const ENEMY_MOVE_POWER
|
|
||||||
const PLAYER_MOVE_TYPE
|
|
||||||
const ENEMY_MOVE_TYPE
|
|
||||||
const PLAYER_CUR_MOVE
|
|
||||||
const ENEMY_CUR_MOVE
|
|
||||||
const PLAYER_COUNTER_MOVE
|
|
||||||
const ENEMY_COUNTER_MOVE
|
|
||||||
const PLAYER_LAST_MOVE
|
|
||||||
const ENEMY_LAST_MOVE
|
|
||||||
|
|
||||||
; player enemy
|
; player enemy
|
||||||
.substatus1 db PLAYER_SUBSTATUS_1, ENEMY_SUBSTATUS_1
|
.substatus1 db PLAYER_SUBSTATUS_1, ENEMY_SUBSTATUS_1
|
||||||
.substatus1opp db ENEMY_SUBSTATUS_1, PLAYER_SUBSTATUS_1
|
.substatus1opp db ENEMY_SUBSTATUS_1, PLAYER_SUBSTATUS_1
|
||||||
@@ -293,8 +265,8 @@ CELL_PHONE_TOP EQU $5e
|
|||||||
CELL_PHONE_BOTTOM EQU $5f
|
CELL_PHONE_BOTTOM EQU $5f
|
||||||
|
|
||||||
; For mobile link battles only.
|
; For mobile link battles only.
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
cp 4
|
cp LINK_MOBILE
|
||||||
ret c
|
ret c
|
||||||
|
|
||||||
; Draw a cell phone icon at the
|
; Draw a cell phone icon at the
|
||||||
|
@@ -227,7 +227,7 @@ Request2bpp:: ; eba
|
|||||||
|
|
||||||
ld a, $8
|
ld a, $8
|
||||||
ld [$ffd3], a
|
ld [$ffd3], a
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
cp $4
|
cp $4
|
||||||
jr nz, .okay
|
jr nz, .okay
|
||||||
ld a, [$ffe9]
|
ld a, [$ffe9]
|
||||||
@@ -301,7 +301,7 @@ Request1bpp:: ; f1e
|
|||||||
|
|
||||||
ld a, $8
|
ld a, $8
|
||||||
ld [$ffd3], a
|
ld [$ffd3], a
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
cp $4
|
cp $4
|
||||||
jr nz, .NotMobile
|
jr nz, .NotMobile
|
||||||
ld a, [$ffe9]
|
ld a, [$ffe9]
|
||||||
|
@@ -198,14 +198,14 @@ GetJoypad:: ; 984
|
|||||||
.updateauto
|
.updateauto
|
||||||
; An input of $ff will end the stream.
|
; An input of $ff will end the stream.
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp a, $ff
|
cp a, -1
|
||||||
jr z, .stopauto
|
jr z, .stopauto
|
||||||
ld b, a
|
ld b, a
|
||||||
|
|
||||||
; A duration of $ff will end the stream indefinitely.
|
; A duration of $ff will end the stream indefinitely.
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [AutoInputLength], a
|
ld [AutoInputLength], a
|
||||||
cp a, $ff
|
cp a, -1
|
||||||
jr nz, .next
|
jr nz, .next
|
||||||
|
|
||||||
; The current input is overwritten.
|
; The current input is overwritten.
|
||||||
@@ -362,17 +362,20 @@ Functiona80:: ; a80
|
|||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ld [hConnectionStripLength], a
|
ld [hConnectionStripLength], a
|
||||||
ld a, $6
|
ld a, 6
|
||||||
ld [hConnectedMapWidth], a
|
ld [hConnectedMapWidth], a
|
||||||
.asm_a8d
|
|
||||||
|
.loop
|
||||||
push hl
|
push hl
|
||||||
hlcoord 18, 17
|
hlcoord 18, 17
|
||||||
call Functionb06
|
call Functionb06
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
call JoyTextDelay
|
call JoyTextDelay
|
||||||
ld a, [hJoyLast]
|
ld a, [hJoyLast]
|
||||||
and $3
|
and A_BUTTON | B_BUTTON
|
||||||
jr z, .asm_a8d
|
jr z, .loop
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [hConnectedMapWidth], a
|
ld [hConnectedMapWidth], a
|
||||||
pop af
|
pop af
|
||||||
@@ -381,67 +384,69 @@ Functiona80:: ; a80
|
|||||||
; aa5
|
; aa5
|
||||||
|
|
||||||
Functionaa5:: ; aa5
|
Functionaa5:: ; aa5
|
||||||
|
.loop
|
||||||
call JoyTextDelay
|
call JoyTextDelay
|
||||||
ld a, [hJoyLast]
|
ld a, [hJoyLast]
|
||||||
and A_BUTTON | B_BUTTON
|
and A_BUTTON | B_BUTTON
|
||||||
jr z, Functionaa5
|
jr z, .loop
|
||||||
ret
|
ret
|
||||||
; aaf
|
; aaf
|
||||||
|
|
||||||
KeepTextOpen:: ; aaf
|
KeepTextOpen:: ; aaf
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_ac1
|
jr nz, .link
|
||||||
call Functionac6
|
call .wait_input
|
||||||
push de
|
push de
|
||||||
ld de, SFX_READ_TEXT_2
|
ld de, SFX_READ_TEXT_2
|
||||||
call PlaySFX
|
call PlaySFX
|
||||||
pop de
|
pop de
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_ac1
|
.link
|
||||||
ld c, 65
|
ld c, 65
|
||||||
jp DelayFrames
|
jp DelayFrames
|
||||||
; ac6
|
; ac6
|
||||||
|
|
||||||
Functionac6:: ; ac6
|
.wait_input: ; ac6
|
||||||
ld a, [hOAMUpdate]
|
ld a, [hOAMUpdate]
|
||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hOAMUpdate], a
|
ld [hOAMUpdate], a
|
||||||
ld a, [InputType]
|
ld a, [InputType]
|
||||||
or a
|
or a
|
||||||
jr z, .asm_ad9
|
jr z, .input_wait_loop
|
||||||
callba Function1de28a
|
callba _DudeAutoInput_A
|
||||||
.asm_ad9
|
|
||||||
call Functionaf5
|
.input_wait_loop
|
||||||
|
call .blink_cursor
|
||||||
call JoyTextDelay
|
call JoyTextDelay
|
||||||
ld a, [hJoyPressed]
|
ld a, [hJoyPressed]
|
||||||
and $3
|
and A_BUTTON | B_BUTTON
|
||||||
jr nz, .asm_af1
|
jr nz, .received_input
|
||||||
call RTC
|
call RTC
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
jr .asm_ad9
|
jr .input_wait_loop
|
||||||
|
|
||||||
.asm_af1
|
.received_input
|
||||||
pop af
|
pop af
|
||||||
ld [hOAMUpdate], a
|
ld [hOAMUpdate], a
|
||||||
ret
|
ret
|
||||||
; af5
|
; af5
|
||||||
|
|
||||||
Functionaf5:: ; af5
|
.blink_cursor: ; af5
|
||||||
ld a, [$ff9b]
|
ld a, [$ff9b]
|
||||||
and $10
|
and %00010000 ; bit 4, a
|
||||||
jr z, .asm_aff
|
jr z, .cursor_off
|
||||||
ld a, $ee
|
ld a, "▼"
|
||||||
jr .asm_b02
|
jr .load_cursor_state
|
||||||
|
|
||||||
.asm_aff
|
.cursor_off
|
||||||
ld a, [TileMap + 17 + 17 * SCREEN_WIDTH]
|
ld a, [TileMap + 17 + 17 * SCREEN_WIDTH]
|
||||||
|
|
||||||
.asm_b02
|
.load_cursor_state
|
||||||
ld [TileMap + 18 + 17 * SCREEN_WIDTH], a
|
ld [TileMap + 18 + 17 * SCREEN_WIDTH], a
|
||||||
ret
|
ret
|
||||||
; b06
|
; b06
|
||||||
@@ -450,7 +455,7 @@ Functionb06:: ; b06
|
|||||||
push bc
|
push bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, $ee
|
ld a, "▼"
|
||||||
cp b
|
cp b
|
||||||
pop bc
|
pop bc
|
||||||
jr nz, .asm_b27
|
jr nz, .asm_b27
|
||||||
@@ -462,11 +467,11 @@ Functionb06:: ; b06
|
|||||||
dec a
|
dec a
|
||||||
ld [hConnectedMapWidth], a
|
ld [hConnectedMapWidth], a
|
||||||
ret nz
|
ret nz
|
||||||
ld a, $7a
|
ld a, "─"
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld a, $ff
|
ld a, -1
|
||||||
ld [hConnectionStripLength], a
|
ld [hConnectionStripLength], a
|
||||||
ld a, $6
|
ld a, 6
|
||||||
ld [hConnectedMapWidth], a
|
ld [hConnectedMapWidth], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@@ -334,7 +334,7 @@ Function87d:: ; 87d
|
|||||||
Function8c1:: ; 8c1
|
Function8c1:: ; 8c1
|
||||||
push bc
|
push bc
|
||||||
ld b, $60
|
ld b, $60
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
cp $1
|
cp $1
|
||||||
jr z, .asm_8d7
|
jr z, .asm_8d7
|
||||||
ld b, $60
|
ld b, $60
|
||||||
@@ -391,7 +391,7 @@ Function908:: ; 908
|
|||||||
; 919
|
; 919
|
||||||
|
|
||||||
Function919:: ; 919
|
Function919:: ; 919
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
ld a, $2
|
ld a, $2
|
||||||
|
186
home/text.asm
186
home/text.asm
@@ -389,7 +389,7 @@ PlaceMoveTargetsName_5A: ; 1205
|
|||||||
PlaceEnemysName:: ; 121b
|
PlaceEnemysName:: ; 121b
|
||||||
push de
|
push de
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .linkbattle
|
jr nz, .linkbattle
|
||||||
|
|
||||||
@@ -428,9 +428,9 @@ PlaceGenderedPlayerName:: ; 1252
|
|||||||
ld l, c
|
ld l, c
|
||||||
ld a, [PlayerGender]
|
ld a, [PlayerGender]
|
||||||
bit 0, a
|
bit 0, a
|
||||||
ld de, String12a5
|
ld de, String_kun
|
||||||
jr z, PlaceCommandCharacter
|
jr z, PlaceCommandCharacter
|
||||||
ld de, String12a6
|
ld de, String_chan
|
||||||
jr PlaceCommandCharacter
|
jr PlaceCommandCharacter
|
||||||
|
|
||||||
|
|
||||||
@@ -456,8 +456,8 @@ String12a2:: db " @" ; 12a2
|
|||||||
Char35Text::
|
Char35Text::
|
||||||
Char36Text::
|
Char36Text::
|
||||||
Char37Text:: db "@" ; 12a4
|
Char37Text:: db "@" ; 12a4
|
||||||
String12a5:: db "@" ; 12a5
|
String_kun:: db "@" ; 12a5
|
||||||
String12a6:: db "@" ; 12a6
|
String_chan:: db "@" ; 12a6
|
||||||
; 12a7
|
; 12a7
|
||||||
|
|
||||||
NextLineChar:: ; 12a7
|
NextLineChar:: ; 12a7
|
||||||
@@ -483,31 +483,31 @@ TextFar:: ; 12b9
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld de, -SCREEN_WIDTH
|
ld de, -SCREEN_WIDTH
|
||||||
ld c, 1
|
ld c, 1
|
||||||
.asm_12c4
|
.loop
|
||||||
ld a, h
|
ld a, h
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_12cd
|
jr nz, .next
|
||||||
ld a, l
|
ld a, l
|
||||||
cp SCREEN_WIDTH
|
cp SCREEN_WIDTH
|
||||||
jr c, .asm_12d1
|
jr c, .done
|
||||||
|
|
||||||
.asm_12cd
|
.next
|
||||||
add hl, de
|
add hl, de
|
||||||
inc c
|
inc c
|
||||||
jr .asm_12c4
|
jr .loop
|
||||||
|
|
||||||
.asm_12d1
|
.done
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
ld de, SCREEN_WIDTH
|
ld de, SCREEN_WIDTH
|
||||||
ld a, c
|
ld a, c
|
||||||
.asm_12d8
|
.loop2
|
||||||
and a
|
and a
|
||||||
jr z, .asm_12df
|
jr z, .done2
|
||||||
add hl, de
|
add hl, de
|
||||||
dec a
|
dec a
|
||||||
jr .asm_12d8
|
jr .loop2
|
||||||
|
|
||||||
.asm_12df
|
.done2
|
||||||
pop de
|
pop de
|
||||||
inc de
|
inc de
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
@@ -529,20 +529,20 @@ LineChar:: ; 12ea
|
|||||||
Paragraph:: ; 12f2
|
Paragraph:: ; 12f2
|
||||||
push de
|
push de
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
cp $3
|
cp LINK_COLOSSEUM
|
||||||
jr z, .asm_1301
|
jr z, .linkbattle
|
||||||
cp $4
|
cp LINK_MOBILE
|
||||||
jr z, .asm_1301
|
jr z, .linkbattle
|
||||||
call Function13c7
|
call LoadBlinkingCursor
|
||||||
.asm_1301
|
|
||||||
|
|
||||||
|
.linkbattle
|
||||||
call Function13b6
|
call Function13b6
|
||||||
call KeepTextOpen
|
call KeepTextOpen
|
||||||
hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY
|
hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY
|
||||||
lb bc, TEXTBOX_INNERH - 1, TEXTBOX_INNERW
|
lb bc, TEXTBOX_INNERH - 1, TEXTBOX_INNERW
|
||||||
call ClearBox
|
call ClearBox
|
||||||
call Function13cd
|
call UnloadBlinkingCursor
|
||||||
ld c, 20
|
ld c, 20
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY
|
hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY
|
||||||
@@ -552,26 +552,26 @@ Paragraph:: ; 12f2
|
|||||||
|
|
||||||
|
|
||||||
Char4B:: ; 131f
|
Char4B:: ; 131f
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
or a
|
or a
|
||||||
jr nz, .asm_1328
|
jr nz, .communication
|
||||||
call Function13c7
|
call LoadBlinkingCursor
|
||||||
.asm_1328
|
|
||||||
|
|
||||||
|
.communication
|
||||||
call Function13b6
|
call Function13b6
|
||||||
|
|
||||||
push de
|
push de
|
||||||
call KeepTextOpen
|
call KeepTextOpen
|
||||||
pop de
|
pop de
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
or a
|
or a
|
||||||
call z, Function13cd
|
call z, UnloadBlinkingCursor
|
||||||
|
|
||||||
Char4C:: ; 1337
|
Char4C:: ; 1337
|
||||||
push de
|
push de
|
||||||
call Function138c
|
call TextScroll
|
||||||
call Function138c
|
call TextScroll
|
||||||
hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2
|
hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2
|
||||||
pop de
|
pop de
|
||||||
jp NextChar
|
jp NextChar
|
||||||
@@ -602,22 +602,22 @@ PlaceDexEnd:: ; 1356
|
|||||||
; 135a
|
; 135a
|
||||||
|
|
||||||
PromptText:: ; 135a
|
PromptText:: ; 135a
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
cp $3
|
cp LINK_COLOSSEUM
|
||||||
jr z, .ok
|
jr z, .ok
|
||||||
cp $4
|
cp LINK_MOBILE
|
||||||
jr z, .ok
|
jr z, .ok
|
||||||
call Function13c7
|
call LoadBlinkingCursor
|
||||||
.ok
|
|
||||||
|
|
||||||
|
.ok
|
||||||
call Function13b6
|
call Function13b6
|
||||||
call KeepTextOpen
|
call KeepTextOpen
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
cp $3
|
cp LINK_COLOSSEUM
|
||||||
jr z, DoneText
|
jr z, DoneText
|
||||||
cp $4
|
cp LINK_MOBILE
|
||||||
jr z, DoneText
|
jr z, DoneText
|
||||||
call Function13cd
|
call UnloadBlinkingCursor
|
||||||
|
|
||||||
DoneText:: ; 137c
|
DoneText:: ; 137c
|
||||||
pop hl
|
pop hl
|
||||||
@@ -634,19 +634,22 @@ NullChar:: ; 1383
|
|||||||
jp NextChar
|
jp NextChar
|
||||||
; 138c
|
; 138c
|
||||||
|
|
||||||
Function138c:: ; 138c
|
TextScroll:: ; 138c
|
||||||
hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY
|
hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY
|
||||||
decoord TEXTBOX_INNERX, TEXTBOX_INNERY - 1
|
decoord TEXTBOX_INNERX, TEXTBOX_INNERY - 1
|
||||||
ld a, TEXTBOX_INNERH - 1
|
ld a, TEXTBOX_INNERH - 1
|
||||||
|
|
||||||
.col
|
.col
|
||||||
push af
|
push af
|
||||||
ld c, TEXTBOX_INNERW
|
ld c, TEXTBOX_INNERW
|
||||||
|
|
||||||
.row
|
.row
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
dec c
|
dec c
|
||||||
jr nz, .row
|
jr nz, .row
|
||||||
|
|
||||||
rept 2
|
rept 2
|
||||||
inc de
|
inc de
|
||||||
endr
|
endr
|
||||||
@@ -656,6 +659,7 @@ endr
|
|||||||
pop af
|
pop af
|
||||||
dec a
|
dec a
|
||||||
jr nz, .col
|
jr nz, .col
|
||||||
|
|
||||||
hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2
|
hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2
|
||||||
ld a, " "
|
ld a, " "
|
||||||
ld bc, TEXTBOX_INNERW
|
ld bc, TEXTBOX_INNERW
|
||||||
@@ -671,7 +675,9 @@ Function13b6:: ; 13b6
|
|||||||
push af
|
push af
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [hOAMUpdate], a
|
ld [hOAMUpdate], a
|
||||||
|
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [hOAMUpdate], a
|
ld [hOAMUpdate], a
|
||||||
pop bc
|
pop bc
|
||||||
@@ -682,15 +688,15 @@ Diacritic:: ; 13c6
|
|||||||
ret
|
ret
|
||||||
; 13c7
|
; 13c7
|
||||||
|
|
||||||
Function13c7:: ; 13c7
|
LoadBlinkingCursor:: ; 13c7
|
||||||
ld a, "▼"
|
ld a, "▼"
|
||||||
ld [TileMap + 18 + 17 * SCREEN_WIDTH], a
|
ldcoord_a 18, 17
|
||||||
ret
|
ret
|
||||||
; 13cd
|
; 13cd
|
||||||
|
|
||||||
Function13cd:: ; 13cd
|
UnloadBlinkingCursor:: ; 13cd
|
||||||
ld a, [TileMap + 17 + 17 * SCREEN_WIDTH]
|
lda_coord 17, 17
|
||||||
ld [TileMap + 18 + 17 * SCREEN_WIDTH], a
|
ldcoord_a 18, 17
|
||||||
ret
|
ret
|
||||||
; 13d4
|
; 13d4
|
||||||
|
|
||||||
@@ -722,19 +728,19 @@ PlaceWholeStringInBoxAtOnce:: ; 13e5
|
|||||||
set 1, a
|
set 1, a
|
||||||
ld [TextBoxFrame + 1], a
|
ld [TextBoxFrame + 1], a
|
||||||
|
|
||||||
call Function13f6
|
call DoTextUntilTerminator
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [TextBoxFrame + 1], a
|
ld [TextBoxFrame + 1], a
|
||||||
ret
|
ret
|
||||||
; 13f6
|
; 13f6
|
||||||
|
|
||||||
Function13f6:: ; 13f6
|
DoTextUntilTerminator:: ; 13f6
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp "@"
|
cp "@"
|
||||||
ret z
|
ret z
|
||||||
call .TextCommand
|
call .TextCommand
|
||||||
jr Function13f6
|
jr DoTextUntilTerminator
|
||||||
|
|
||||||
.TextCommand:
|
.TextCommand:
|
||||||
push hl
|
push hl
|
||||||
@@ -757,19 +763,19 @@ endr
|
|||||||
; 1410
|
; 1410
|
||||||
|
|
||||||
TextCommands:: ; 1410
|
TextCommands:: ; 1410
|
||||||
dw Text_00
|
dw Text_TX
|
||||||
dw Text_01
|
dw Text_TX_RAM
|
||||||
dw Text_02
|
dw Text_TX_BCD
|
||||||
dw Text_03
|
dw Text_TX_MOVE
|
||||||
dw Text_04
|
dw Text_TX_BOX
|
||||||
dw Text_05
|
dw Text_TX_LOW
|
||||||
dw Text_06
|
dw Text_WAIT_BUTTON
|
||||||
dw Text_07
|
dw Text_TX_SCROLL
|
||||||
dw Text_08
|
dw Text_START_ASM
|
||||||
dw Text_09
|
dw Text_TX_NUM
|
||||||
dw Text_0A
|
dw Text_TX_EXIT
|
||||||
dw Text_PlaySound ; $0b
|
dw Text_PlaySound ; $0b
|
||||||
dw Text_0C
|
dw Text_TX_DOTS
|
||||||
dw Text_0D
|
dw Text_0D
|
||||||
dw Text_PlaySound ; $0e
|
dw Text_PlaySound ; $0e
|
||||||
dw Text_PlaySound ; $0f
|
dw Text_PlaySound ; $0f
|
||||||
@@ -777,12 +783,12 @@ TextCommands:: ; 1410
|
|||||||
dw Text_PlaySound ; $11
|
dw Text_PlaySound ; $11
|
||||||
dw Text_PlaySound ; $12
|
dw Text_PlaySound ; $12
|
||||||
dw Text_PlaySound ; $13
|
dw Text_PlaySound ; $13
|
||||||
dw Text_14
|
dw Text_TX_STRINGBUFFER
|
||||||
dw Text_15
|
dw Text_TX_DAY
|
||||||
dw Text_16
|
dw Text_TX_FAR
|
||||||
; 143e
|
; 143e
|
||||||
|
|
||||||
Text_00:: ; 143e
|
Text_TX:: ; 143e
|
||||||
; TX
|
; TX
|
||||||
; write text until "@"
|
; write text until "@"
|
||||||
; [$00]["...@"]
|
; [$00]["...@"]
|
||||||
@@ -798,7 +804,7 @@ Text_00:: ; 143e
|
|||||||
ret
|
ret
|
||||||
; 1449
|
; 1449
|
||||||
|
|
||||||
Text_01:: ; 1449
|
Text_TX_RAM:: ; 1449
|
||||||
; text_from_ram
|
; text_from_ram
|
||||||
; write text from a ram address
|
; write text from a ram address
|
||||||
; little endian
|
; little endian
|
||||||
@@ -816,7 +822,7 @@ Text_01:: ; 1449
|
|||||||
ret
|
ret
|
||||||
; 1455
|
; 1455
|
||||||
|
|
||||||
Text_16:: ; 1455
|
Text_TX_FAR:: ; 1455
|
||||||
; text_jump
|
; text_jump
|
||||||
; write text from a different bank
|
; write text from a different bank
|
||||||
; little endian
|
; little endian
|
||||||
@@ -837,7 +843,7 @@ Text_16:: ; 1455
|
|||||||
push hl
|
push hl
|
||||||
ld h, d
|
ld h, d
|
||||||
ld l, e
|
ld l, e
|
||||||
call Function13f6
|
call DoTextUntilTerminator
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
@@ -846,7 +852,7 @@ Text_16:: ; 1455
|
|||||||
ret
|
ret
|
||||||
; 1470
|
; 1470
|
||||||
|
|
||||||
Text_02:: ; 1470
|
Text_TX_BCD:: ; 1470
|
||||||
; TX_BCD
|
; TX_BCD
|
||||||
; write bcd from address, typically ram
|
; write bcd from address, typically ram
|
||||||
; [$02][addr][flags]
|
; [$02][addr][flags]
|
||||||
@@ -868,7 +874,7 @@ Text_02:: ; 1470
|
|||||||
ret
|
ret
|
||||||
; 1480
|
; 1480
|
||||||
|
|
||||||
Text_03:: ; 1480
|
Text_TX_MOVE:: ; 1480
|
||||||
; TX_MOVE
|
; TX_MOVE
|
||||||
; move to a new tile
|
; move to a new tile
|
||||||
; [$03][addr]
|
; [$03][addr]
|
||||||
@@ -882,7 +888,7 @@ Text_03:: ; 1480
|
|||||||
ret
|
ret
|
||||||
; 148b
|
; 148b
|
||||||
|
|
||||||
Text_04:: ; 148b
|
Text_TX_BOX:: ; 148b
|
||||||
; TX_BOX
|
; TX_BOX
|
||||||
; draw a box
|
; draw a box
|
||||||
; little endian
|
; little endian
|
||||||
@@ -904,7 +910,7 @@ Text_04:: ; 148b
|
|||||||
ret
|
ret
|
||||||
; 149b
|
; 149b
|
||||||
|
|
||||||
Text_05:: ; 149b
|
Text_TX_LOW:: ; 149b
|
||||||
; TX_LOW
|
; TX_LOW
|
||||||
; write text at (1,16)
|
; write text at (1,16)
|
||||||
; [$05]
|
; [$05]
|
||||||
@@ -913,39 +919,41 @@ Text_05:: ; 149b
|
|||||||
ret
|
ret
|
||||||
; 149f
|
; 149f
|
||||||
|
|
||||||
Text_06:: ; 149f
|
Text_WAIT_BUTTON:: ; 149f
|
||||||
; TX_WAITBUTTON
|
; TX_WAITBUTTON
|
||||||
; wait for button press
|
; wait for button press
|
||||||
; show arrow
|
; show arrow
|
||||||
; [06]
|
; [06]
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
cp $3
|
cp LINK_COLOSSEUM
|
||||||
jp z, Text_0D
|
jp z, Text_0D
|
||||||
cp $4
|
cp LINK_MOBILE
|
||||||
jp z, Text_0D
|
jp z, Text_0D
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
call Function13c7
|
call LoadBlinkingCursor
|
||||||
push bc
|
push bc
|
||||||
call KeepTextOpen
|
call KeepTextOpen
|
||||||
pop bc
|
pop bc
|
||||||
call Function13cd
|
call UnloadBlinkingCursor
|
||||||
pop hl
|
pop hl
|
||||||
ret
|
ret
|
||||||
; 14ba
|
; 14ba
|
||||||
|
|
||||||
Text_07:: ; 14ba
|
Text_TX_SCROLL:: ; 14ba
|
||||||
|
; pushes text up two lines and sets the BC cursor to the border tile
|
||||||
|
; below the first character column of the text box.
|
||||||
push hl
|
push hl
|
||||||
call Function13cd
|
call UnloadBlinkingCursor
|
||||||
call Function138c
|
call TextScroll
|
||||||
call Function138c
|
call TextScroll
|
||||||
pop hl
|
pop hl
|
||||||
bccoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2
|
bccoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2
|
||||||
ret
|
ret
|
||||||
; 14c9
|
; 14c9
|
||||||
|
|
||||||
Text_08:: ; 14c9
|
Text_START_ASM:: ; 14c9
|
||||||
; TX_ASM
|
; TX_ASM
|
||||||
|
|
||||||
bit 7, h
|
bit 7, h
|
||||||
@@ -958,7 +966,7 @@ Text_08:: ; 14c9
|
|||||||
ret
|
ret
|
||||||
; 14d2
|
; 14d2
|
||||||
|
|
||||||
Text_09:: ; 14d2
|
Text_TX_NUM:: ; 14d2
|
||||||
; TX_NUM
|
; TX_NUM
|
||||||
; [$09][addr][hi:bytes lo:digits]
|
; [$09][addr][hi:bytes lo:digits]
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@@ -984,7 +992,7 @@ Text_09:: ; 14d2
|
|||||||
ret
|
ret
|
||||||
; 14ed
|
; 14ed
|
||||||
|
|
||||||
Text_0A:: ; 14ed
|
Text_TX_EXIT:: ; 14ed
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
call GetJoypad
|
call GetJoypad
|
||||||
@@ -1059,13 +1067,14 @@ TextSFX:: ; 152d
|
|||||||
db -1
|
db -1
|
||||||
; 1543
|
; 1543
|
||||||
|
|
||||||
Text_0C:: ; 1543
|
Text_TX_DOTS:: ; 1543
|
||||||
; [$0C][num]
|
; [$0C][num]
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld d, a
|
ld d, a
|
||||||
push hl
|
push hl
|
||||||
ld h, b
|
ld h, b
|
||||||
ld l, c
|
ld l, c
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
push de
|
push de
|
||||||
ld a, "…"
|
ld a, "…"
|
||||||
@@ -1080,6 +1089,7 @@ Text_0C:: ; 1543
|
|||||||
pop de
|
pop de
|
||||||
dec d
|
dec d
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
|
|
||||||
ld b, h
|
ld b, h
|
||||||
ld c, l
|
ld c, l
|
||||||
pop hl
|
pop hl
|
||||||
@@ -1097,7 +1107,7 @@ Text_0D:: ; 1562
|
|||||||
ret
|
ret
|
||||||
; 156a
|
; 156a
|
||||||
|
|
||||||
Text_14:: ; 156a
|
Text_TX_STRINGBUFFER:: ; 156a
|
||||||
; Print a string from one of the following:
|
; Print a string from one of the following:
|
||||||
; 0: StringBuffer3
|
; 0: StringBuffer3
|
||||||
; 1: StringBuffer4
|
; 1: StringBuffer4
|
||||||
@@ -1127,7 +1137,7 @@ endr
|
|||||||
ret
|
ret
|
||||||
; 1582
|
; 1582
|
||||||
|
|
||||||
Text_15:: ; 1582
|
Text_TX_DAY:: ; 1582
|
||||||
; TX_DAY
|
; TX_DAY
|
||||||
|
|
||||||
call GetWeekday
|
call GetWeekday
|
||||||
|
@@ -208,7 +208,7 @@ FriendBall:
|
|||||||
MoonBall:
|
MoonBall:
|
||||||
LoveBall:
|
LoveBall:
|
||||||
ParkBall: ; e8a2
|
ParkBall: ; e8a2
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jp nz, Functionf7a0
|
jp nz, Functionf7a0
|
||||||
|
|
||||||
@@ -1657,7 +1657,7 @@ Functionf0d6: ; f0d6
|
|||||||
call Functionf30d
|
call Functionf30d
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ret nz
|
ret nz
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_f104
|
jr z, .asm_f104
|
||||||
|
|
||||||
@@ -1936,7 +1936,7 @@ Functionf2a2: ; f2a2 (3:72a2)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Functionf2a6: ; f2a6 (3:72a6)
|
Functionf2a6: ; f2a6 (3:72a6)
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
@@ -2280,7 +2280,7 @@ XAccuracy: ; f482
|
|||||||
|
|
||||||
|
|
||||||
PokeDoll: ; f48f
|
PokeDoll: ; f48f
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jr nz, .asm_f4a6
|
jr nz, .asm_f4a6
|
||||||
inc a
|
inc a
|
||||||
@@ -2362,7 +2362,7 @@ Tablef504: ; f504
|
|||||||
|
|
||||||
|
|
||||||
PokeFlute: ; f50c
|
PokeFlute: ; f50c
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_f512
|
jr nz, .asm_f512
|
||||||
.asm_f512
|
.asm_f512
|
||||||
@@ -2375,7 +2375,7 @@ PokeFlute: ; f50c
|
|||||||
ld hl, PartyMon1Status
|
ld hl, PartyMon1Status
|
||||||
call .Functionf554
|
call .Functionf554
|
||||||
|
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
cp WILD_BATTLE
|
cp WILD_BATTLE
|
||||||
jr z, .asm_f52b
|
jr z, .asm_f52b
|
||||||
ld hl, OTPartyMon1Status
|
ld hl, OTPartyMon1Status
|
||||||
@@ -2448,7 +2448,7 @@ UnknownText_0xf576: ; 0xf576
|
|||||||
|
|
||||||
|
|
||||||
Function_0xf57b: ; f57b
|
Function_0xf57b: ; f57b
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_f58c
|
jr nz, .asm_f58c
|
||||||
|
|
||||||
@@ -2600,7 +2600,7 @@ Functionf64c: ; f64c
|
|||||||
; f652
|
; f652
|
||||||
|
|
||||||
Functionf652: ; f652
|
Functionf652: ; f652
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_f66c
|
jr z, .asm_f66c
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
|
10
macros.asm
10
macros.asm
@@ -111,7 +111,7 @@ dwcoord: MACRO
|
|||||||
endr
|
endr
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
ldcoord: MACRO
|
ldcoord_a: MACRO
|
||||||
if _NARG < 3
|
if _NARG < 3
|
||||||
ld [TileMap + SCREEN_WIDTH * (\2) + (\1)], a
|
ld [TileMap + SCREEN_WIDTH * (\2) + (\1)], a
|
||||||
else
|
else
|
||||||
@@ -119,6 +119,14 @@ ldcoord: MACRO
|
|||||||
endc
|
endc
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
|
lda_coord: MACRO
|
||||||
|
if _NARG < 3
|
||||||
|
ld a, [TileMap + SCREEN_WIDTH * (\2) + (\1)]
|
||||||
|
else
|
||||||
|
ld a, [\3 + SCREEN_WIDTH * (\2) + (\1)]
|
||||||
|
endc
|
||||||
|
ENDM
|
||||||
|
|
||||||
; pic animations
|
; pic animations
|
||||||
frame: MACRO
|
frame: MACRO
|
||||||
db \1
|
db \1
|
||||||
|
@@ -19,6 +19,7 @@ Function17a68f:: ; 17a68f (5e:668f)
|
|||||||
pop de
|
pop de
|
||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a6a6
|
.asm_17a6a6
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
@@ -82,6 +83,7 @@ Function17a713: ; 17a713 (5e:6713)
|
|||||||
inc c
|
inc c
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a71d
|
.asm_17a71d
|
||||||
ld [hl], $ff
|
ld [hl], $ff
|
||||||
scf
|
scf
|
||||||
@@ -113,10 +115,12 @@ Function17a721: ; 17a721 (5e:6721)
|
|||||||
dec b
|
dec b
|
||||||
jr nz, .asm_17a732
|
jr nz, .asm_17a732
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a748
|
.asm_17a748
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a74c
|
.asm_17a74c
|
||||||
ld a, $f0
|
ld a, $f0
|
||||||
or c
|
or c
|
||||||
@@ -167,6 +171,7 @@ Function17a78f: ; 17a78f (5e:678f)
|
|||||||
jr nz, .asm_17a79f
|
jr nz, .asm_17a79f
|
||||||
callba Function10402d
|
callba Function10402d
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a79f
|
.asm_17a79f
|
||||||
callba Function104061
|
callba Function104061
|
||||||
ret
|
ret
|
||||||
@@ -297,41 +302,49 @@ Function17a848: ; 17a848 (5e:6848)
|
|||||||
jr nz, .asm_17a8a7
|
jr nz, .asm_17a8a7
|
||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a876
|
.asm_17a876
|
||||||
ld a, $9
|
ld a, $9
|
||||||
call Function17aad0
|
call Function17aad0
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a87d
|
.asm_17a87d
|
||||||
ld a, $a
|
ld a, $a
|
||||||
call Function17aad0
|
call Function17aad0
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a884
|
.asm_17a884
|
||||||
ld a, $b
|
ld a, $b
|
||||||
call Function17aad0
|
call Function17aad0
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a88b
|
.asm_17a88b
|
||||||
ld a, $c
|
ld a, $c
|
||||||
call Function17aad0
|
call Function17aad0
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a892
|
.asm_17a892
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call Function17aad0
|
call Function17aad0
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a899
|
.asm_17a899
|
||||||
ld a, $6
|
ld a, $6
|
||||||
call Function17aad0
|
call Function17aad0
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a8a0
|
.asm_17a8a0
|
||||||
ld a, $7
|
ld a, $7
|
||||||
call Function17aad0
|
call Function17aad0
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a8a7
|
.asm_17a8a7
|
||||||
ld a, $8
|
ld a, $8
|
||||||
call Function17aad0
|
call Function17aad0
|
||||||
@@ -347,6 +360,7 @@ Function17a8ae: ; 17a8ae (5e:68ae)
|
|||||||
jr nz, .asm_17a8d7
|
jr nz, .asm_17a8d7
|
||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a8bc
|
.asm_17a8bc
|
||||||
ld a, $b
|
ld a, $b
|
||||||
ld [$d08a], a
|
ld [$d08a], a
|
||||||
@@ -355,12 +369,14 @@ Function17a8ae: ; 17a8ae (5e:68ae)
|
|||||||
call Function17aa88
|
call Function17aa88
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a8cc
|
.asm_17a8cc
|
||||||
call Function17aad7
|
call Function17aad7
|
||||||
call Function17aa98
|
call Function17aa98
|
||||||
call Function17a8de
|
call Function17a8de
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a8d7
|
.asm_17a8d7
|
||||||
ld a, $c
|
ld a, $c
|
||||||
call Function17aad3
|
call Function17aad3
|
||||||
@@ -383,16 +399,19 @@ Function17a8de: ; 17a8de (5e:68de)
|
|||||||
ld [$d087], a
|
ld [$d087], a
|
||||||
call Function17aa88
|
call Function17aa88
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a8fd
|
.asm_17a8fd
|
||||||
call Function17a943
|
call Function17a943
|
||||||
call Function17aa88
|
call Function17aa88
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a904
|
.asm_17a904
|
||||||
call Function17aad7
|
call Function17aad7
|
||||||
call Function17aa98
|
call Function17aa98
|
||||||
call Function17a91e
|
call Function17a91e
|
||||||
call Function17aa88
|
call Function17aa88
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a911
|
.asm_17a911
|
||||||
call Function17aa98
|
call Function17aa98
|
||||||
ld a, $5
|
ld a, $5
|
||||||
@@ -409,6 +428,7 @@ Function17a91e: ; 17a91e (5e:691e)
|
|||||||
ld [$d087], a
|
ld [$d087], a
|
||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a92c
|
.asm_17a92c
|
||||||
call Function1d6e
|
call Function1d6e
|
||||||
call Function17a99e
|
call Function17a99e
|
||||||
@@ -436,6 +456,7 @@ Function17a943: ; 17a943 (5e:6943)
|
|||||||
ld [$d087], a
|
ld [$d087], a
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a95d
|
.asm_17a95d
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [$d087], a
|
ld [$d087], a
|
||||||
@@ -455,6 +476,7 @@ Function17a964: ; 17a964 (5e:6964)
|
|||||||
ld [hl], e
|
ld [hl], e
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a979
|
.asm_17a979
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
@@ -479,6 +501,7 @@ Function17a97b: ; 17a97b (5e:697b)
|
|||||||
dec c
|
dec c
|
||||||
jr nz, .asm_17a990
|
jr nz, .asm_17a990
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_17a99d
|
.asm_17a99d
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@@ -503,12 +526,13 @@ Function17a9cb: ; 17a9cb (5e:69cb)
|
|||||||
ld de, Sprites ; $c400
|
ld de, Sprites ; $c400
|
||||||
ld hl, $d088
|
ld hl, $d088
|
||||||
bit 6, [hl]
|
bit 6, [hl]
|
||||||
jr nz, .asm_17a9df
|
jr nz, .bit_6_set
|
||||||
call Function17a9e3
|
call Function17a9e3
|
||||||
call Function17aa22
|
call Function17aa22
|
||||||
call Function17a9f5
|
call Function17a9f5
|
||||||
ret
|
ret
|
||||||
.asm_17a9df
|
|
||||||
|
.bit_6_set
|
||||||
call Function17a9e3
|
call Function17a9e3
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@@ -533,9 +557,9 @@ Function17a9f5: ; 17a9f5 (5e:69f5)
|
|||||||
ld [$d08e], a
|
ld [$d08e], a
|
||||||
ld a, [$d08c]
|
ld a, [$d08c]
|
||||||
cp $10
|
cp $10
|
||||||
jr c, .asm_17aa0f
|
jr c, .okay
|
||||||
dec a
|
dec a
|
||||||
.asm_17aa0f
|
.okay
|
||||||
ld c, $8
|
ld c, $8
|
||||||
call SimpleMultiply
|
call SimpleMultiply
|
||||||
add $18
|
add $18
|
||||||
@@ -581,7 +605,7 @@ Function17aa4a: ; 17aa4a (5e:6a4a)
|
|||||||
add $10
|
add $10
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
.asm_17aa56
|
.loop
|
||||||
push af
|
push af
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
add c
|
add c
|
||||||
@@ -603,7 +627,7 @@ Function17aa4a: ; 17aa4a (5e:6a4a)
|
|||||||
inc de
|
inc de
|
||||||
pop af
|
pop af
|
||||||
dec a
|
dec a
|
||||||
jr nz, .asm_17aa56
|
jr nz, .loop
|
||||||
ret
|
ret
|
||||||
; 17aa72 (5e:6a72)
|
; 17aa72 (5e:6a72)
|
||||||
|
|
||||||
@@ -662,7 +686,7 @@ rept 2
|
|||||||
ld [hli], a
|
ld [hli], a
|
||||||
endr
|
endr
|
||||||
pop hl
|
pop hl
|
||||||
ld de, $14
|
ld de, SCREEN_WIDTH
|
||||||
add hl, de
|
add hl, de
|
||||||
rept 2
|
rept 2
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@@ -721,16 +745,20 @@ Function17aba0: ; 17aba0 (5e:6ba0)
|
|||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rVBK], a ; $ff00+$4f
|
ld [rVBK], a ; $ff00+$4f
|
||||||
ld hl, VTiles2 tile $00
|
|
||||||
|
ld hl, VTiles5 tile $00
|
||||||
ld de, GFX_17afa5
|
ld de, GFX_17afa5
|
||||||
lb bc, BANK(GFX_17afa5), $80
|
lb bc, BANK(GFX_17afa5), $80
|
||||||
call Get2bpp
|
call Get2bpp
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [rVBK], a ; $ff00+$4f
|
ld [rVBK], a ; $ff00+$4f
|
||||||
|
|
||||||
ld hl, VTiles0 tile $00
|
ld hl, VTiles0 tile $00
|
||||||
ld de, GFX_17afa5 + $4c0
|
ld de, GFX_17afa5 + $4c0
|
||||||
lb bc, BANK(GFX_17afa5), 5
|
lb bc, BANK(GFX_17afa5), 5
|
||||||
call Get2bpp
|
call Get2bpp
|
||||||
|
|
||||||
ld hl, VTiles0 tile $05
|
ld hl, VTiles0 tile $05
|
||||||
ld de, GFX_11601a
|
ld de, GFX_11601a
|
||||||
lb bc, BANK(GFX_11601a), 4
|
lb bc, BANK(GFX_11601a), 4
|
||||||
@@ -740,25 +768,30 @@ Function17aba0: ; 17aba0 (5e:6ba0)
|
|||||||
Function17abcf: ; 17abcf (5e:6bcf)
|
Function17abcf: ; 17abcf (5e:6bcf)
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK] ; $ff00+$70
|
||||||
push af
|
push af
|
||||||
ld a, $5
|
ld a, BANK(Unkn1Pals)
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a ; $ff00+$70
|
||||||
|
|
||||||
ld hl, Palette_17ac55
|
ld hl, Palette_17ac55
|
||||||
ld de, Unkn1Pals ; $d000
|
ld de, Unkn1Pals ; $d000
|
||||||
ld bc, $30
|
ld bc, $30
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
ld hl, Palette_17ac95
|
ld hl, Palette_17ac95
|
||||||
ld de, Unkn2Pals
|
ld de, Unkn2Pals
|
||||||
ld bc, $40
|
ld bc, $40
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
ld hl, GFX_17afa5 + $510
|
ld hl, GFX_17afa5 + $510
|
||||||
ld de, $d048
|
ld de, Unkn2Pals + 2 * 4
|
||||||
ld bc, $10
|
ld bc, $10
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
ld hl, MapObjectPals + 8
|
ld hl, MapObjectPals + 8
|
||||||
ld de, $d058
|
ld de, Unkn2Pals + 6 * 4
|
||||||
ld bc, $8
|
ld bc, $8
|
||||||
ld a, BANK(MapObjectPals)
|
ld a, BANK(MapObjectPals)
|
||||||
call FarCopyBytes
|
call FarCopyBytes
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a ; $ff00+$70
|
||||||
ret
|
ret
|
||||||
@@ -767,42 +800,43 @@ Function17ac0c: ; 17ac0c (5e:6c0c)
|
|||||||
call Function17ac1d
|
call Function17ac1d
|
||||||
call Function17ac2a
|
call Function17ac2a
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
ld b, $2
|
ld b, 2
|
||||||
ld c, $12
|
ld c, SCREEN_WIDTH - 2
|
||||||
call Function17ac46
|
call Function17ac46
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function17ac1d: ; 17ac1d (5e:6c1d)
|
Function17ac1d: ; 17ac1d (5e:6c1d)
|
||||||
ld hl, Tilemap_17acd5
|
ld hl, Tilemap_17acd5
|
||||||
decoord 0, 4
|
decoord 0, 4
|
||||||
ld bc, $118
|
ld bc, (SCREEN_HEIGHT - 4) * SCREEN_WIDTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function17ac2a: ; 17ac2a (5e:6c2a)
|
Function17ac2a: ; 17ac2a (5e:6c2a)
|
||||||
ld hl, Tilemap_17ae3d
|
ld hl, Tilemap_17ae3d
|
||||||
decoord 0, 4, AttrMap
|
decoord 0, 4, AttrMap
|
||||||
ld bc, $118
|
ld bc, (SCREEN_HEIGHT - 4) * SCREEN_WIDTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
hlcoord 0, 4, AttrMap
|
hlcoord 0, 4, AttrMap
|
||||||
ld bc, $118
|
ld bc, (SCREEN_HEIGHT - 4) * SCREEN_WIDTH
|
||||||
.asm_17ac3c
|
.loop
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
or $8
|
or $8
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
dec bc
|
dec bc
|
||||||
ld a, b
|
ld a, b
|
||||||
or c
|
or c
|
||||||
jr nz, .asm_17ac3c
|
jr nz, .loop
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function17ac46: ; 17ac46 (5e:6c46)
|
Function17ac46: ; 17ac46 (5e:6c46)
|
||||||
ld a, [$d088]
|
ld a, [$d088]
|
||||||
bit 4, a
|
bit 4, a
|
||||||
jr nz, .asm_17ac51
|
jr nz, .bit_4_set
|
||||||
call TextBox
|
call TextBox
|
||||||
ret
|
ret
|
||||||
.asm_17ac51
|
|
||||||
|
.bit_4_set
|
||||||
call Function3eea
|
call Function3eea
|
||||||
ret
|
ret
|
||||||
; 17ac55 (5e:6c55)
|
; 17ac55 (5e:6c55)
|
||||||
@@ -812,30 +846,37 @@ Palette_17ac55: ; 17ac55
|
|||||||
RGB 9, 10, 25
|
RGB 9, 10, 25
|
||||||
RGB 16, 19, 31
|
RGB 16, 19, 31
|
||||||
RGB 31, 31, 31
|
RGB 31, 31, 31
|
||||||
|
|
||||||
RGB 5, 11, 9
|
RGB 5, 11, 9
|
||||||
RGB 7, 14, 12
|
RGB 7, 14, 12
|
||||||
RGB 17, 24, 22
|
RGB 17, 24, 22
|
||||||
RGB 28, 31, 31
|
RGB 28, 31, 31
|
||||||
|
|
||||||
RGB 0, 0, 0
|
RGB 0, 0, 0
|
||||||
RGB 3, 0, 10
|
RGB 3, 0, 10
|
||||||
RGB 3, 3, 16
|
RGB 3, 3, 16
|
||||||
RGB 6, 8, 25
|
RGB 6, 8, 25
|
||||||
|
|
||||||
RGB 5, 11, 9
|
RGB 5, 11, 9
|
||||||
RGB 28, 31, 31
|
RGB 28, 31, 31
|
||||||
RGB 7, 14, 12
|
RGB 7, 14, 12
|
||||||
RGB 17, 24, 22
|
RGB 17, 24, 22
|
||||||
|
|
||||||
RGB 0, 0, 0
|
RGB 0, 0, 0
|
||||||
RGB 5, 2, 16
|
RGB 5, 2, 16
|
||||||
RGB 8, 8, 26
|
RGB 8, 8, 26
|
||||||
RGB 13, 9, 17
|
RGB 13, 9, 17
|
||||||
|
|
||||||
RGB 0, 0, 0
|
RGB 0, 0, 0
|
||||||
RGB 0, 0, 0
|
RGB 0, 0, 0
|
||||||
RGB 0, 0, 0
|
RGB 0, 0, 0
|
||||||
RGB 0, 0, 0
|
RGB 0, 0, 0
|
||||||
|
|
||||||
RGB 0, 0, 0
|
RGB 0, 0, 0
|
||||||
RGB 0, 0, 0
|
RGB 0, 0, 0
|
||||||
RGB 0, 0, 0
|
RGB 0, 0, 0
|
||||||
RGB 0, 0, 0
|
RGB 0, 0, 0
|
||||||
|
|
||||||
RGB 0, 0, 0
|
RGB 0, 0, 0
|
||||||
RGB 0, 0, 0
|
RGB 0, 0, 0
|
||||||
RGB 0, 0, 0
|
RGB 0, 0, 0
|
||||||
@@ -846,30 +887,37 @@ Palette_17ac95: ; 17ac95
|
|||||||
RGB 4, 3, 3
|
RGB 4, 3, 3
|
||||||
RGB 31, 13, 0
|
RGB 31, 13, 0
|
||||||
RGB 31, 31, 31
|
RGB 31, 31, 31
|
||||||
|
|
||||||
RGB 31, 31, 31
|
RGB 31, 31, 31
|
||||||
RGB 0, 0, 0
|
RGB 0, 0, 0
|
||||||
RGB 31, 31, 31
|
RGB 31, 31, 31
|
||||||
RGB 31, 31, 31
|
RGB 31, 31, 31
|
||||||
|
|
||||||
RGB 31, 0, 0
|
RGB 31, 0, 0
|
||||||
RGB 16, 3, 0
|
RGB 16, 3, 0
|
||||||
RGB 28, 19, 11
|
RGB 28, 19, 11
|
||||||
RGB 31, 31, 31
|
RGB 31, 31, 31
|
||||||
|
|
||||||
RGB 31, 16, 0
|
RGB 31, 16, 0
|
||||||
RGB 9, 6, 4
|
RGB 9, 6, 4
|
||||||
RGB 31, 16, 0
|
RGB 31, 16, 0
|
||||||
RGB 31, 24, 0
|
RGB 31, 24, 0
|
||||||
|
|
||||||
RGB 31, 18, 6
|
RGB 31, 18, 6
|
||||||
RGB 0, 3, 0
|
RGB 0, 3, 0
|
||||||
RGB 0, 9, 0
|
RGB 0, 9, 0
|
||||||
RGB 0, 12, 0
|
RGB 0, 12, 0
|
||||||
|
|
||||||
RGB 0, 16, 0
|
RGB 0, 16, 0
|
||||||
RGB 0, 22, 0
|
RGB 0, 22, 0
|
||||||
RGB 0, 25, 0
|
RGB 0, 25, 0
|
||||||
RGB 0, 27, 0
|
RGB 0, 27, 0
|
||||||
|
|
||||||
RGB 0, 31, 0
|
RGB 0, 31, 0
|
||||||
RGB 3, 31, 0
|
RGB 3, 31, 0
|
||||||
RGB 8, 31, 0
|
RGB 8, 31, 0
|
||||||
RGB 14, 31, 0
|
RGB 14, 31, 0
|
||||||
|
|
||||||
RGB 16, 31, 0
|
RGB 16, 31, 0
|
||||||
RGB 22, 31, 0
|
RGB 22, 31, 0
|
||||||
RGB 27, 31, 0
|
RGB 27, 31, 0
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user