mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-17 02:40:50 +12:00
Use more screen dimension constants
This commit is contained in:
parent
e25a7148d0
commit
ef9e59101e
|
@ -202,7 +202,7 @@ Credits: ; 7418e (1d:418e)
|
||||||
add hl, bc
|
add hl, bc
|
||||||
call PlaceString
|
call PlaceString
|
||||||
pop hl
|
pop hl
|
||||||
ld bc, $28
|
ld bc, SCREEN_WIDTH * 2
|
||||||
add hl, bc
|
add hl, bc
|
||||||
pop de
|
pop de
|
||||||
jr .asm_7419b
|
jr .asm_7419b
|
||||||
|
|
|
@ -1712,9 +1712,9 @@ _AnimationSquishMonPic: ; 794d4 (1e:54d4)
|
||||||
call Func_79862
|
call Func_79862
|
||||||
inc hl
|
inc hl
|
||||||
.asm_794eb
|
.asm_794eb
|
||||||
ld [hl], $7f
|
ld [hl], " "
|
||||||
pop hl
|
pop hl
|
||||||
ld de, $14
|
ld de, SCREEN_WIDTH
|
||||||
add hl, de
|
add hl, de
|
||||||
pop bc
|
pop bc
|
||||||
dec c
|
dec c
|
||||||
|
|
|
@ -233,12 +233,12 @@ BattleTransition_InwardSpiral: ; 70aaa (1c:4aaa)
|
||||||
ld [wWhichTrade], a
|
ld [wWhichTrade], a
|
||||||
hlCoord 0, 0
|
hlCoord 0, 0
|
||||||
ld c, $11
|
ld c, $11
|
||||||
ld de, $14
|
ld de, SCREEN_WIDTH
|
||||||
call BattleTransition_InwardSpiral_
|
call BattleTransition_InwardSpiral_
|
||||||
inc c
|
inc c
|
||||||
jr .skip
|
jr .skip
|
||||||
.loop
|
.loop
|
||||||
ld de, $14
|
ld de, SCREEN_WIDTH
|
||||||
call BattleTransition_InwardSpiral_
|
call BattleTransition_InwardSpiral_
|
||||||
.skip
|
.skip
|
||||||
inc c
|
inc c
|
||||||
|
@ -246,10 +246,10 @@ BattleTransition_InwardSpiral: ; 70aaa (1c:4aaa)
|
||||||
call BattleTransition_InwardSpiral_
|
call BattleTransition_InwardSpiral_
|
||||||
dec c
|
dec c
|
||||||
dec c
|
dec c
|
||||||
ld de, $ffec
|
ld de, -SCREEN_WIDTH
|
||||||
call BattleTransition_InwardSpiral_
|
call BattleTransition_InwardSpiral_
|
||||||
inc c
|
inc c
|
||||||
ld de, rIE
|
ld de, -1
|
||||||
call BattleTransition_InwardSpiral_
|
call BattleTransition_InwardSpiral_
|
||||||
dec c
|
dec c
|
||||||
dec c
|
dec c
|
||||||
|
@ -278,8 +278,8 @@ BattleTransition_InwardSpiral_: ; 70ae0 (1c:4ae0)
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleTransition_OutwardSpiral_: ; 70af9 (1c:4af9)
|
BattleTransition_OutwardSpiral_: ; 70af9 (1c:4af9)
|
||||||
ld bc, $ffec
|
ld bc, -SCREEN_WIDTH
|
||||||
ld de, $14
|
ld de, SCREEN_WIDTH
|
||||||
ld a, [wd09b]
|
ld a, [wd09b]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, [wd09a]
|
ld a, [wd09a]
|
||||||
|
@ -366,22 +366,22 @@ BattleTransition_FlashScreenPalettes: ; 70b72 (1c:4b72)
|
||||||
|
|
||||||
; used for low level trainer dungeon battles
|
; used for low level trainer dungeon battles
|
||||||
BattleTransition_Shrink: ; 70b7f (1c:4b7f)
|
BattleTransition_Shrink: ; 70b7f (1c:4b7f)
|
||||||
ld c, $9
|
ld c, SCREEN_HEIGHT / 2
|
||||||
.loop
|
.loop
|
||||||
push bc
|
push bc
|
||||||
xor a
|
xor a
|
||||||
ld [H_AUTOBGTRANSFERENABLED], a
|
ld [H_AUTOBGTRANSFERENABLED], a
|
||||||
hlCoord 0, 7
|
hlCoord 0, 7
|
||||||
deCoord 0, 8
|
deCoord 0, 8
|
||||||
ld bc, $ffd8
|
ld bc, -SCREEN_WIDTH * 2
|
||||||
call BattleTransition_CopyTiles1
|
call BattleTransition_CopyTiles1
|
||||||
hlCoord 0, 10
|
hlCoord 0, 10
|
||||||
deCoord 0, 9
|
deCoord 0, 9
|
||||||
ld bc, $28
|
ld bc, SCREEN_WIDTH * 2
|
||||||
call BattleTransition_CopyTiles1
|
call BattleTransition_CopyTiles1
|
||||||
hlCoord 8, 0
|
hlCoord 8, 0
|
||||||
deCoord 9, 0
|
deCoord 9, 0
|
||||||
ld bc, $fffe
|
ld bc, -2
|
||||||
call BattleTransition_CopyTiles2
|
call BattleTransition_CopyTiles2
|
||||||
hlCoord 11, 0
|
hlCoord 11, 0
|
||||||
deCoord 10, 0
|
deCoord 10, 0
|
||||||
|
@ -400,22 +400,22 @@ BattleTransition_Shrink: ; 70b7f (1c:4b7f)
|
||||||
|
|
||||||
; used for high level trainer dungeon battles
|
; used for high level trainer dungeon battles
|
||||||
BattleTransition_Split: ; 70bca (1c:4bca)
|
BattleTransition_Split: ; 70bca (1c:4bca)
|
||||||
ld c, $9
|
ld c, SCREEN_HEIGHT / 2
|
||||||
xor a
|
xor a
|
||||||
ld [H_AUTOBGTRANSFERENABLED], a
|
ld [H_AUTOBGTRANSFERENABLED], a
|
||||||
.loop
|
.loop
|
||||||
push bc
|
push bc
|
||||||
hlCoord 0, 16
|
hlCoord 0, 16
|
||||||
deCoord 0, 17
|
deCoord 0, 17
|
||||||
ld bc, $ffd8
|
ld bc, -SCREEN_WIDTH * 2
|
||||||
call BattleTransition_CopyTiles1
|
call BattleTransition_CopyTiles1
|
||||||
hlCoord 0, 1
|
hlCoord 0, 1
|
||||||
deCoord 0, 0
|
deCoord 0, 0
|
||||||
ld bc, $28
|
ld bc, SCREEN_WIDTH * 2
|
||||||
call BattleTransition_CopyTiles1
|
call BattleTransition_CopyTiles1
|
||||||
hlCoord 18, 0
|
hlCoord 18, 0
|
||||||
deCoord 19, 0
|
deCoord 19, 0
|
||||||
ld bc, $fffe
|
ld bc, -2
|
||||||
call BattleTransition_CopyTiles2
|
call BattleTransition_CopyTiles2
|
||||||
hlCoord 1, 0
|
hlCoord 1, 0
|
||||||
deCoord 0, 0
|
deCoord 0, 0
|
||||||
|
@ -440,7 +440,7 @@ BattleTransition_CopyTiles1: ; 70c12 (1c:4c12)
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
ld bc, $14
|
ld bc, SCREEN_WIDTH
|
||||||
call CopyData
|
call CopyData
|
||||||
pop hl
|
pop hl
|
||||||
pop de
|
pop de
|
||||||
|
@ -455,7 +455,7 @@ BattleTransition_CopyTiles1: ; 70c12 (1c:4c12)
|
||||||
ld l, e
|
ld l, e
|
||||||
ld h, d
|
ld h, d
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
ld c, $14
|
ld c, SCREEN_WIDTH
|
||||||
.loop2
|
.loop2
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
dec c
|
dec c
|
||||||
|
@ -467,23 +467,23 @@ BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f)
|
||||||
ld [wWhichTrade], a
|
ld [wWhichTrade], a
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wTrainerEngageDistance], a
|
ld [wTrainerEngageDistance], a
|
||||||
ld c, $9
|
ld c, SCREEN_HEIGHT / 2
|
||||||
.loop1
|
.loop1
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
ld c, $12
|
ld c, SCREEN_HEIGHT
|
||||||
.loop2
|
.loop2
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld a, e
|
ld a, e
|
||||||
add $14
|
add SCREEN_WIDTH
|
||||||
jr nc, .noCarry1
|
jr nc, .noCarry1
|
||||||
inc d
|
inc d
|
||||||
.noCarry1
|
.noCarry1
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, l
|
ld a, l
|
||||||
add $14
|
add SCREEN_WIDTH
|
||||||
jr nc, .noCarry2
|
jr nc, .noCarry2
|
||||||
inc h
|
inc h
|
||||||
.noCarry2
|
.noCarry2
|
||||||
|
@ -502,8 +502,8 @@ BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f)
|
||||||
jr nz, .loop1
|
jr nz, .loop1
|
||||||
ld l, e
|
ld l, e
|
||||||
ld h, d
|
ld h, d
|
||||||
ld de, $14
|
ld de, SCREEN_WIDTH
|
||||||
ld c, $12
|
ld c, SCREEN_HEIGHT
|
||||||
.loop3
|
.loop3
|
||||||
ld [hl], $ff
|
ld [hl], $ff
|
||||||
add hl, de
|
add hl, de
|
||||||
|
@ -513,7 +513,7 @@ BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f)
|
||||||
|
|
||||||
; used for high level wild dungeon battles
|
; used for high level wild dungeon battles
|
||||||
BattleTransition_VerticalStripes: ; 70c7e (1c:4c7e)
|
BattleTransition_VerticalStripes: ; 70c7e (1c:4c7e)
|
||||||
ld c, $12
|
ld c, SCREEN_HEIGHT
|
||||||
hlCoord 0, 0
|
hlCoord 0, 0
|
||||||
deCoord 1, 17
|
deCoord 1, 17
|
||||||
xor a
|
xor a
|
||||||
|
@ -528,12 +528,12 @@ BattleTransition_VerticalStripes: ; 70c7e (1c:4c7e)
|
||||||
call BattleTransition_VerticalStripes_
|
call BattleTransition_VerticalStripes_
|
||||||
call BattleTransition_TransferDelay3
|
call BattleTransition_TransferDelay3
|
||||||
pop hl
|
pop hl
|
||||||
ld bc, $ffec
|
ld bc, -SCREEN_WIDTH
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld e, l
|
ld e, l
|
||||||
ld d, h
|
ld d, h
|
||||||
pop hl
|
pop hl
|
||||||
ld bc, $14
|
ld bc, SCREEN_WIDTH
|
||||||
add hl, bc
|
add hl, bc
|
||||||
pop bc
|
pop bc
|
||||||
dec c
|
dec c
|
||||||
|
@ -541,7 +541,7 @@ BattleTransition_VerticalStripes: ; 70c7e (1c:4c7e)
|
||||||
jp BattleTransition_BlackScreen
|
jp BattleTransition_BlackScreen
|
||||||
|
|
||||||
BattleTransition_VerticalStripes_: ; 70caa (1c:4caa)
|
BattleTransition_VerticalStripes_: ; 70caa (1c:4caa)
|
||||||
ld c, $a
|
ld c, SCREEN_WIDTH / 2
|
||||||
.loop
|
.loop
|
||||||
ld [hl], $ff
|
ld [hl], $ff
|
||||||
inc hl
|
inc hl
|
||||||
|
@ -552,7 +552,7 @@ BattleTransition_VerticalStripes_: ; 70caa (1c:4caa)
|
||||||
|
|
||||||
; used for low level wild dungeon battles
|
; used for low level wild dungeon battles
|
||||||
BattleTransition_HorizontalStripes: ; 70cb4 (1c:4cb4)
|
BattleTransition_HorizontalStripes: ; 70cb4 (1c:4cb4)
|
||||||
ld c, $14
|
ld c, SCREEN_WIDTH
|
||||||
hlCoord 0, 0
|
hlCoord 0, 0
|
||||||
deCoord 19, 1
|
deCoord 19, 1
|
||||||
xor a
|
xor a
|
||||||
|
@ -576,8 +576,8 @@ BattleTransition_HorizontalStripes: ; 70cb4 (1c:4cb4)
|
||||||
jp BattleTransition_BlackScreen
|
jp BattleTransition_BlackScreen
|
||||||
|
|
||||||
BattleTransition_HorizontalStripes_: ; 70cd8 (1c:4cd8)
|
BattleTransition_HorizontalStripes_: ; 70cd8 (1c:4cd8)
|
||||||
ld c, $9
|
ld c, SCREEN_HEIGHT / 2
|
||||||
ld de, $28
|
ld de, SCREEN_WIDTH * 2
|
||||||
.loop
|
.loop
|
||||||
ld [hl], $ff
|
ld [hl], $ff
|
||||||
add hl, de
|
add hl, de
|
||||||
|
@ -590,10 +590,10 @@ BattleTransition_HorizontalStripes_: ; 70cd8 (1c:4cd8)
|
||||||
; by animating each half circle one at a time
|
; by animating each half circle one at a time
|
||||||
BattleTransition_Circle: ; 70ce4 (1c:4ce4)
|
BattleTransition_Circle: ; 70ce4 (1c:4ce4)
|
||||||
call BattleTransition_FlashScreen
|
call BattleTransition_FlashScreen
|
||||||
ld bc, $000a
|
ld bc, SCREEN_WIDTH / 2
|
||||||
ld hl, BattleTransition_HalfCircle1
|
ld hl, BattleTransition_HalfCircle1
|
||||||
call BattleTransition_Circle_Sub1
|
call BattleTransition_Circle_Sub1
|
||||||
ld c, $a
|
ld c, SCREEN_WIDTH / 2
|
||||||
ld b, $1
|
ld b, $1
|
||||||
ld hl, BattleTransition_HalfCircle2
|
ld hl, BattleTransition_HalfCircle2
|
||||||
call BattleTransition_Circle_Sub1
|
call BattleTransition_Circle_Sub1
|
||||||
|
@ -633,7 +633,7 @@ BattleTransition_TransferDelay3: ; 70d19 (1c:4d19)
|
||||||
; by animating both half circles at the same time
|
; by animating both half circles at the same time
|
||||||
BattleTransition_DoubleCircle: ; 70d24 (1c:4d24)
|
BattleTransition_DoubleCircle: ; 70d24 (1c:4d24)
|
||||||
call BattleTransition_FlashScreen
|
call BattleTransition_FlashScreen
|
||||||
ld c, $a
|
ld c, SCREEN_WIDTH / 2
|
||||||
ld hl, BattleTransition_HalfCircle1
|
ld hl, BattleTransition_HalfCircle1
|
||||||
ld de, BattleTransition_HalfCircle2
|
ld de, BattleTransition_HalfCircle2
|
||||||
.loop
|
.loop
|
||||||
|
@ -774,9 +774,9 @@ BattleTransition_Circle_Sub3: ; 70dc5 (1c:4dc5)
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [wWhichTrade]
|
ld a, [wWhichTrade]
|
||||||
and a
|
and a
|
||||||
ld bc, $14
|
ld bc, SCREEN_WIDTH
|
||||||
jr z, .skip3
|
jr z, .skip3
|
||||||
ld bc, $ffec
|
ld bc, -SCREEN_WIDTH
|
||||||
.skip3
|
.skip3
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
|
|
|
@ -7047,7 +7047,7 @@ CopyUncompressedPicToTilemap: ; 3f0c6 (f:70c6)
|
||||||
ld a, [$ffe1]
|
ld a, [$ffe1]
|
||||||
CopyUncompressedPicToHL: ; 3f0d0 (f:70d0)
|
CopyUncompressedPicToHL: ; 3f0d0 (f:70d0)
|
||||||
ld bc, $707
|
ld bc, $707
|
||||||
ld de, $14
|
ld de, SCREEN_WIDTH
|
||||||
push af
|
push af
|
||||||
ld a, [W_SPRITEFLIPPED]
|
ld a, [W_SPRITEFLIPPED]
|
||||||
and a
|
and a
|
||||||
|
|
|
@ -148,7 +148,7 @@ EnemyBattleHUDGraphicsTiles: ; 3a92d (e:692d)
|
||||||
|
|
||||||
PlaceHUDTiles: ; 3a930 (e:6930)
|
PlaceHUDTiles: ; 3a930 (e:6930)
|
||||||
ld [hl], $73
|
ld [hl], $73
|
||||||
ld bc, $14
|
ld bc, SCREEN_WIDTH
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [wTrainerScreenY]
|
ld a, [wTrainerScreenY]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
|
@ -714,10 +714,10 @@ SwitchPartyMon: ; 13613 (4:7613)
|
||||||
SwitchPartyMon_OAM: ; 13625 (4:7625)
|
SwitchPartyMon_OAM: ; 13625 (4:7625)
|
||||||
push af
|
push af
|
||||||
hlCoord 0, 0
|
hlCoord 0, 0
|
||||||
ld bc, $28
|
ld bc, SCREEN_WIDTH * 2
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld c, $28
|
ld c, SCREEN_WIDTH * 2
|
||||||
ld a, $7f
|
ld a, " "
|
||||||
.asm_13633
|
.asm_13633
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
dec c
|
dec c
|
||||||
|
|
|
@ -280,7 +280,7 @@ PrintStat
|
||||||
push hl
|
push hl
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
pop hl
|
pop hl
|
||||||
ld de, $0028
|
ld de, SCREEN_WIDTH * 2
|
||||||
add hl, de
|
add hl, de
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -323,15 +323,15 @@ StatusScreen2: ; 12b57 (4:6b57)
|
||||||
sub c
|
sub c
|
||||||
ld b, a ; Number of moves ?
|
ld b, a ; Number of moves ?
|
||||||
hlCoord 11, 10
|
hlCoord 11, 10
|
||||||
ld de, $0028
|
ld de, SCREEN_WIDTH * 2
|
||||||
ld a, $72
|
ld a, $72 ; special P tile id
|
||||||
call Func_12ccb ; Print "PP"
|
call StatusScreen_PrintPP ; Print "PP"
|
||||||
ld a, b
|
ld a, b
|
||||||
and a
|
and a
|
||||||
jr z, .InitPP
|
jr z, .InitPP
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, "-"
|
ld a, "-"
|
||||||
call Func_12ccb ; Fill the rest with --
|
call StatusScreen_PrintPP ; Fill the rest with --
|
||||||
.InitPP ; 12bbb
|
.InitPP ; 12bbb
|
||||||
ld hl, wLoadedMonMoves
|
ld hl, wLoadedMonMoves
|
||||||
deCoord 14, 10
|
deCoord 14, 10
|
||||||
|
@ -373,7 +373,7 @@ StatusScreen2: ; 12b57 (4:6b57)
|
||||||
ld bc, $0102
|
ld bc, $0102
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
pop hl
|
pop hl
|
||||||
ld de, $0028
|
ld de, SCREEN_WIDTH * 2
|
||||||
add hl, de
|
add hl, de
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
|
@ -411,9 +411,9 @@ StatusScreen2: ; 12b57 (4:6b57)
|
||||||
ld bc, $0307
|
ld bc, $0307
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
hlCoord 9, 0
|
hlCoord 9, 0
|
||||||
call Func_12cc3
|
call StatusScreen_ClearName
|
||||||
hlCoord 9, 1
|
hlCoord 9, 1
|
||||||
call Func_12cc3
|
call StatusScreen_ClearName
|
||||||
ld a, [W_MONHDEXNUM]
|
ld a, [W_MONHDEXNUM]
|
||||||
ld [wd11e], a
|
ld [wd11e], a
|
||||||
call GetMonName
|
call GetMonName
|
||||||
|
@ -463,15 +463,16 @@ EXPPointsText: ; 12caf (4:6caf)
|
||||||
LevelUpText: ; 12cba (4:6cba)
|
LevelUpText: ; 12cba (4:6cba)
|
||||||
db "LEVEL UP@"
|
db "LEVEL UP@"
|
||||||
|
|
||||||
Func_12cc3: ; 12cc3 (4:6cc3)
|
StatusScreen_ClearName: ; 12cc3 (4:6cc3)
|
||||||
ld bc, $a
|
ld bc, 10
|
||||||
ld a, $7f
|
ld a, " "
|
||||||
jp FillMemory
|
jp FillMemory
|
||||||
|
|
||||||
Func_12ccb: ; 12ccb (4:6ccb)
|
StatusScreen_PrintPP: ; 12ccb (4:6ccb)
|
||||||
|
; print PP or -- c times, going down two rows each time
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hld], a
|
ld [hld], a
|
||||||
add hl, de
|
add hl, de
|
||||||
dec c
|
dec c
|
||||||
jr nz, Func_12ccb
|
jr nz, StatusScreen_PrintPP
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -250,6 +250,7 @@ Func_6ad6: ; 6ad6 (1:6ad6)
|
||||||
ld de, wcd6d
|
ld de, wcd6d
|
||||||
ld bc, $14
|
ld bc, $14
|
||||||
jp CopyData
|
jp CopyData
|
||||||
|
|
||||||
IF DEF(_RED)
|
IF DEF(_RED)
|
||||||
DefaultNamesPlayerList: ; 6af2 (1:6af2)
|
DefaultNamesPlayerList: ; 6af2 (1:6af2)
|
||||||
db "NEW NAME@RED@ASH@JACK@"
|
db "NEW NAME@RED@ASH@JACK@"
|
||||||
|
|
|
@ -19,7 +19,8 @@ DMARoutine:
|
||||||
|
|
||||||
; wait for DMA to finish
|
; wait for DMA to finish
|
||||||
ld a, $28
|
ld a, $28
|
||||||
.wait dec a
|
.wait
|
||||||
|
dec a
|
||||||
jr nz, .wait
|
jr nz, .wait
|
||||||
ret
|
ret
|
||||||
DMARoutineEnd:
|
DMARoutineEnd:
|
||||||
|
|
|
@ -103,7 +103,7 @@ Func_610c2: ; 610c2 (18:50c2)
|
||||||
call GetItemName
|
call GetItemName
|
||||||
hlCoord 2, 2
|
hlCoord 2, 2
|
||||||
ld a, [$ffdb]
|
ld a, [$ffdb]
|
||||||
ld bc, $28
|
ld bc, SCREEN_WIDTH * 2
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld de, wcd6d
|
ld de, wcd6d
|
||||||
call PlaceString
|
call PlaceString
|
||||||
|
|
|
@ -690,8 +690,8 @@ getTileSpriteStandsOn: ; 5207 (1:5207)
|
||||||
ld a, [hl] ; c1x6: screen Y position
|
ld a, [hl] ; c1x6: screen Y position
|
||||||
srl a
|
srl a
|
||||||
srl a
|
srl a
|
||||||
srl a ; screen X tile
|
srl a ; screen X tile
|
||||||
add $14 ; screen X tile + 20
|
add SCREEN_WIDTH ; screen X tile + 20
|
||||||
ld d, $0
|
ld d, $0
|
||||||
ld e, a
|
ld e, a
|
||||||
hlCoord 0, 0
|
hlCoord 0, 0
|
||||||
|
|
|
@ -462,7 +462,7 @@ Func_7393f: ; 7393f (1c:793f)
|
||||||
call Func_73a84
|
call Func_73a84
|
||||||
hlCoord 18, 1
|
hlCoord 18, 1
|
||||||
ld de, wWhichTrade
|
ld de, wWhichTrade
|
||||||
ld bc, $14
|
ld bc, SCREEN_WIDTH
|
||||||
ld a, $c
|
ld a, $c
|
||||||
.asm_739c2
|
.asm_739c2
|
||||||
push af
|
push af
|
||||||
|
|
|
@ -70,7 +70,7 @@ ENDC
|
||||||
call Func_4519
|
call Func_4519
|
||||||
hlCoord 2, 1
|
hlCoord 2, 1
|
||||||
ld a, $80
|
ld a, $80
|
||||||
ld de, $14
|
ld de, SCREEN_WIDTH
|
||||||
ld c, $6
|
ld c, $6
|
||||||
.asm_434d
|
.asm_434d
|
||||||
ld b, $10
|
ld b, $10
|
||||||
|
|
6
home.asm
6
home.asm
|
@ -3176,7 +3176,7 @@ UncompressSpriteFromDE:: ; 36eb (0:36eb)
|
||||||
SaveScreenTilesToBuffer2:: ; 36f4 (0:36f4)
|
SaveScreenTilesToBuffer2:: ; 36f4 (0:36f4)
|
||||||
hlCoord 0, 0
|
hlCoord 0, 0
|
||||||
ld de, wTileMapBackup2
|
ld de, wTileMapBackup2
|
||||||
ld bc, $168
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||||
call CopyData
|
call CopyData
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -3199,7 +3199,7 @@ LoadScreenTilesFromBuffer2DisableBGTransfer:: ; 3709 (0:3709)
|
||||||
SaveScreenTilesToBuffer1:: ; 3719 (0:3719)
|
SaveScreenTilesToBuffer1:: ; 3719 (0:3719)
|
||||||
hlCoord 0, 0
|
hlCoord 0, 0
|
||||||
ld de, wTileMapBackup
|
ld de, wTileMapBackup
|
||||||
ld bc, $168
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||||
jp CopyData
|
jp CopyData
|
||||||
|
|
||||||
LoadScreenTilesFromBuffer1:: ; 3725 (0:3725)
|
LoadScreenTilesFromBuffer1:: ; 3725 (0:3725)
|
||||||
|
@ -3207,7 +3207,7 @@ LoadScreenTilesFromBuffer1:: ; 3725 (0:3725)
|
||||||
ld [H_AUTOBGTRANSFERENABLED], a
|
ld [H_AUTOBGTRANSFERENABLED], a
|
||||||
ld hl, wTileMapBackup
|
ld hl, wTileMapBackup
|
||||||
deCoord 0, 0
|
deCoord 0, 0
|
||||||
ld bc, $168
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||||
call CopyData
|
call CopyData
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [H_AUTOBGTRANSFERENABLED], a
|
ld [H_AUTOBGTRANSFERENABLED], a
|
||||||
|
|
|
@ -1753,7 +1753,7 @@ ScheduleEastColumnRedraw:: ; 0ed3 (0:0ed3)
|
||||||
|
|
||||||
ScheduleColumnRedrawHelper:: ; 0ef2 (0:0ef2)
|
ScheduleColumnRedrawHelper:: ; 0ef2 (0:0ef2)
|
||||||
ld de,wScreenEdgeTiles
|
ld de,wScreenEdgeTiles
|
||||||
ld c,$12
|
ld c,SCREEN_HEIGHT
|
||||||
.loop
|
.loop
|
||||||
ld a,[hli]
|
ld a,[hli]
|
||||||
ld [de],a
|
ld [de],a
|
||||||
|
|
|
@ -61,16 +61,16 @@ PlaceNextChar:: ; 1956 (0:1956)
|
||||||
.PlaceText
|
.PlaceText
|
||||||
cp $4E
|
cp $4E
|
||||||
jr nz,.next
|
jr nz,.next
|
||||||
ld bc,$0028
|
ld bc,SCREEN_WIDTH * 2
|
||||||
ld a,[hFlags_0xFFF6]
|
ld a,[hFlags_0xFFF6]
|
||||||
bit 2,a
|
bit 2,a
|
||||||
jr z,.next2
|
jr z,.next2
|
||||||
ld bc,$14
|
ld bc,SCREEN_WIDTH
|
||||||
.next2
|
.next2
|
||||||
pop hl
|
pop hl
|
||||||
add hl,bc
|
add hl,bc
|
||||||
push hl
|
push hl
|
||||||
jp Next19E8
|
jp PlaceNextChar_inc
|
||||||
|
|
||||||
.next
|
.next
|
||||||
cp $4F
|
cp $4F
|
||||||
|
@ -78,7 +78,7 @@ PlaceNextChar:: ; 1956 (0:1956)
|
||||||
pop hl
|
pop hl
|
||||||
hlCoord 1, 16
|
hlCoord 1, 16
|
||||||
push hl
|
push hl
|
||||||
jp Next19E8
|
jp PlaceNextChar_inc
|
||||||
|
|
||||||
.next3 ; Check against a dictionary
|
.next3 ; Check against a dictionary
|
||||||
and a
|
and a
|
||||||
|
@ -123,7 +123,7 @@ PlaceNextChar:: ; 1956 (0:1956)
|
||||||
jp z,Char5A
|
jp z,Char5A
|
||||||
ld [hli],a
|
ld [hli],a
|
||||||
call PrintLetterDelay
|
call PrintLetterDelay
|
||||||
Next19E8:: ; 19e8 (0:19e8)
|
PlaceNextChar_inc:: ; 19e8 (0:19e8)
|
||||||
inc de
|
inc de
|
||||||
jp PlaceNextChar
|
jp PlaceNextChar
|
||||||
|
|
||||||
|
@ -273,7 +273,7 @@ Char58:: ; 1a95 (0:1a95)
|
||||||
Next1AA2:: ; 1aa2 (0:1aa2)
|
Next1AA2:: ; 1aa2 (0:1aa2)
|
||||||
call ProtectedDelay3
|
call ProtectedDelay3
|
||||||
call ManualTextScroll
|
call ManualTextScroll
|
||||||
ld a,$7F
|
ld a, " "
|
||||||
Coorda 18, 16
|
Coorda 18, 16
|
||||||
Char57:: ; 1aad (0:1aad)
|
Char57:: ; 1aad (0:1aad)
|
||||||
pop hl
|
pop hl
|
||||||
|
@ -297,7 +297,7 @@ Char51:: ; 1ab4 (0:1ab4)
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
pop de
|
pop de
|
||||||
hlCoord 1, 14
|
hlCoord 1, 14
|
||||||
jp Next19E8
|
jp PlaceNextChar_inc
|
||||||
|
|
||||||
Char49:: ; 1ad5 (0:1ad5)
|
Char49:: ; 1ad5 (0:1ad5)
|
||||||
push de
|
push de
|
||||||
|
@ -314,7 +314,7 @@ Char49:: ; 1ad5 (0:1ad5)
|
||||||
pop hl
|
pop hl
|
||||||
hlCoord 1, 11
|
hlCoord 1, 11
|
||||||
push hl
|
push hl
|
||||||
jp Next19E8
|
jp PlaceNextChar_inc
|
||||||
|
|
||||||
Char4B:: ; 1af8 (0:1af8)
|
Char4B:: ; 1af8 (0:1af8)
|
||||||
ld a,$EE
|
ld a,$EE
|
||||||
|
@ -323,7 +323,7 @@ Char4B:: ; 1af8 (0:1af8)
|
||||||
push de
|
push de
|
||||||
call ManualTextScroll
|
call ManualTextScroll
|
||||||
pop de
|
pop de
|
||||||
ld a,$7F
|
ld a, " "
|
||||||
Coorda 18, 16
|
Coorda 18, 16
|
||||||
;fall through
|
;fall through
|
||||||
Char4C:: ; 1b0a (0:1b0a)
|
Char4C:: ; 1b0a (0:1b0a)
|
||||||
|
@ -332,12 +332,12 @@ Char4C:: ; 1b0a (0:1b0a)
|
||||||
call Next1B18
|
call Next1B18
|
||||||
hlCoord 1, 16
|
hlCoord 1, 16
|
||||||
pop de
|
pop de
|
||||||
jp Next19E8
|
jp PlaceNextChar_inc
|
||||||
|
|
||||||
Next1B18:: ; 1b18 (0:1b18)
|
Next1B18:: ; 1b18 (0:1b18)
|
||||||
hlCoord 0, 14
|
hlCoord 0, 14
|
||||||
deCoord 0, 13
|
deCoord 0, 13
|
||||||
ld b,$3C
|
ld b,60
|
||||||
.next
|
.next
|
||||||
ld a,[hli]
|
ld a,[hli]
|
||||||
ld [de],a
|
ld [de],a
|
||||||
|
@ -345,8 +345,8 @@ Next1B18:: ; 1b18 (0:1b18)
|
||||||
dec b
|
dec b
|
||||||
jr nz,.next
|
jr nz,.next
|
||||||
hlCoord 1, 16
|
hlCoord 1, 16
|
||||||
ld a,$7F
|
ld a, " "
|
||||||
ld b,$12
|
ld b,SCREEN_WIDTH - 2
|
||||||
.next2
|
.next2
|
||||||
ld [hli],a
|
ld [hli],a
|
||||||
dec b
|
dec b
|
||||||
|
|
12
main.asm
12
main.asm
|
@ -1157,7 +1157,7 @@ PrintStartMenuItem: ; 71bb (1:71bb)
|
||||||
push hl
|
push hl
|
||||||
call PlaceString
|
call PlaceString
|
||||||
pop hl
|
pop hl
|
||||||
ld de,$28
|
ld de,SCREEN_WIDTH * 2
|
||||||
add hl,de
|
add hl,de
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -1755,14 +1755,14 @@ DisplayFieldMoveMonMenu: ; 76e1 (1:36e1)
|
||||||
sub e
|
sub e
|
||||||
ld c, a
|
ld c, a
|
||||||
pop af
|
pop af
|
||||||
ld de, $ffd8
|
ld de, -SCREEN_WIDTH * 2
|
||||||
.asm_7725
|
.asm_7725
|
||||||
add hl, de
|
add hl, de
|
||||||
inc b
|
inc b
|
||||||
inc b
|
inc b
|
||||||
dec a
|
dec a
|
||||||
jr nz, .asm_7725
|
jr nz, .asm_7725
|
||||||
ld de, $ffec
|
ld de, -SCREEN_WIDTH
|
||||||
add hl, de
|
add hl, de
|
||||||
inc b
|
inc b
|
||||||
call TextBoxBorder
|
call TextBoxBorder
|
||||||
|
@ -1773,7 +1773,7 @@ DisplayFieldMoveMonMenu: ; 76e1 (1:36e1)
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, $0
|
ld d, $0
|
||||||
add hl, de
|
add hl, de
|
||||||
ld de, $ffd8
|
ld de, -SCREEN_WIDTH * 2
|
||||||
ld a, [wTrainerScreenX]
|
ld a, [wTrainerScreenX]
|
||||||
.asm_7747
|
.asm_7747
|
||||||
add hl, de
|
add hl, de
|
||||||
|
@ -1806,7 +1806,7 @@ DisplayFieldMoveMonMenu: ; 76e1 (1:36e1)
|
||||||
ld d, b
|
ld d, b
|
||||||
ld e, c
|
ld e, c
|
||||||
call PlaceString
|
call PlaceString
|
||||||
ld bc, $28
|
ld bc, SCREEN_WIDTH * 2
|
||||||
add hl, bc
|
add hl, bc
|
||||||
pop de
|
pop de
|
||||||
jr .asm_7752
|
jr .asm_7752
|
||||||
|
@ -4031,7 +4031,7 @@ _MoveMon: ; f51e (3:751e)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld bc, $ffee
|
ld bc, -18
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld b, $1
|
ld b, $1
|
||||||
call CalcStats
|
call CalcStats
|
||||||
|
|
|
@ -202,7 +202,7 @@ CeladonMartRoofScript_48532: ; 48532 (12:4532)
|
||||||
call GetItemName
|
call GetItemName
|
||||||
hlCoord 2, 2
|
hlCoord 2, 2
|
||||||
ld a, [$ffdb]
|
ld a, [$ffdb]
|
||||||
ld bc, $28
|
ld bc, SCREEN_WIDTH * 2
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld de, wcd6d
|
ld de, wcd6d
|
||||||
call PlaceString
|
call PlaceString
|
||||||
|
|
Loading…
Reference in a new issue