mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-17 02:40:50 +12:00
Merge pull request #111 from YamaArashi/master
constants for PrintNumber
This commit is contained in:
commit
1b0404d0dc
|
@ -149,6 +149,14 @@ TEXT_BLACKED_OUT EQU $d1
|
||||||
TEXT_REPEL_WORE_OFF EQU $d2
|
TEXT_REPEL_WORE_OFF EQU $d2
|
||||||
TEXT_SAFARI_GAME_OVER EQU $d3
|
TEXT_SAFARI_GAME_OVER EQU $d3
|
||||||
|
|
||||||
|
; PrintNumber
|
||||||
|
|
||||||
|
BIT_LEFT_ALIGN EQU 6
|
||||||
|
BIT_LEADING_ZEROES EQU 7
|
||||||
|
|
||||||
|
LEFT_ALIGN EQU (1 << BIT_LEFT_ALIGN)
|
||||||
|
LEADING_ZEROES EQU (1 << BIT_LEADING_ZEROES)
|
||||||
|
|
||||||
; serial
|
; serial
|
||||||
|
|
||||||
ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK EQU $01
|
ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK EQU $01
|
||||||
|
|
|
@ -2141,7 +2141,7 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3)
|
||||||
Coorda 13, 16
|
Coorda 13, 16
|
||||||
coord hl, 7, 14
|
coord hl, 7, 14
|
||||||
ld de, W_NUMSAFARIBALLS
|
ld de, W_NUMSAFARIBALLS
|
||||||
ld bc, $102
|
lb bc, 1, 2
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
ld b, $1 ; top menu item X
|
ld b, $1 ; top menu item X
|
||||||
.leftColumn_WaitForInput
|
.leftColumn_WaitForInput
|
||||||
|
@ -2174,7 +2174,7 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3)
|
||||||
Coorda 1, 16 ; clear lower cursor position in left column
|
Coorda 1, 16 ; clear lower cursor position in left column
|
||||||
coord hl, 7, 14
|
coord hl, 7, 14
|
||||||
ld de, W_NUMSAFARIBALLS
|
ld de, W_NUMSAFARIBALLS
|
||||||
ld bc, $102
|
lb bc, 1, 2
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
ld b, $d ; top menu item X
|
ld b, $d ; top menu item X
|
||||||
.rightColumn_WaitForInput
|
.rightColumn_WaitForInput
|
||||||
|
@ -2951,11 +2951,11 @@ PrintMenuItem: ; 3d4b6 (f:54b6)
|
||||||
ld [hl], "/"
|
ld [hl], "/"
|
||||||
coord hl, 5, 11
|
coord hl, 5, 11
|
||||||
ld de, wcd6d
|
ld de, wcd6d
|
||||||
ld bc, $102
|
lb bc, 1, 2
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
coord hl, 8, 11
|
coord hl, 8, 11
|
||||||
ld de, wd11e
|
ld de, wd11e
|
||||||
ld bc, $102
|
lb bc, 1, 2
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
call GetCurrentMove
|
call GetCurrentMove
|
||||||
coord hl, 2, 10
|
coord hl, 2, 10
|
||||||
|
|
|
@ -225,12 +225,12 @@ HoFDisplayPlayerStats: ; 70377 (1c:4377)
|
||||||
call PlaceString
|
call PlaceString
|
||||||
coord hl, 5, 7
|
coord hl, 5, 7
|
||||||
ld de, W_PLAYTIMEHOURS + 1
|
ld de, W_PLAYTIMEHOURS + 1
|
||||||
ld bc, $103
|
lb bc, 1, 3
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
ld [hl], $6d
|
ld [hl], $6d
|
||||||
inc hl
|
inc hl
|
||||||
ld de, W_PLAYTIMEMINUTES + 1
|
ld de, W_PLAYTIMEMINUTES + 1
|
||||||
ld bc, $8102
|
lb bc, LEADING_ZEROES | 1, 2
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
coord hl, 1, 9
|
coord hl, 1, 9
|
||||||
ld de, HoFMoneyText
|
ld de, HoFMoneyText
|
||||||
|
|
|
@ -228,7 +228,7 @@ UpdateHPBar_PrintHPNumber: ; faf5 (3:7af5)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
pop hl
|
pop hl
|
||||||
ld de, wHPBarTempHP
|
ld de, wHPBarTempHP
|
||||||
ld bc, $203
|
lb bc, 2, 3
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
pop hl
|
pop hl
|
||||||
|
|
|
@ -108,7 +108,7 @@ LeaguePCShowMon: ; 76610 (1d:6610)
|
||||||
call PlaceString
|
call PlaceString
|
||||||
coord hl, 16, 15
|
coord hl, 16, 15
|
||||||
ld de, wHoFTeamNo
|
ld de, wHoFTeamNo
|
||||||
ld bc, $0103
|
lb bc, 1, 3
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
jpba HoFDisplayMonInfo
|
jpba HoFDisplayMonInfo
|
||||||
|
|
||||||
|
|
|
@ -396,7 +396,7 @@ PrintNumBadges: ; 5e2f (1:5e2f)
|
||||||
call CountSetBits
|
call CountSetBits
|
||||||
pop hl
|
pop hl
|
||||||
ld de, wd11e
|
ld de, wd11e
|
||||||
ld bc, $102
|
lb bc, 1, 2
|
||||||
jp PrintNumber
|
jp PrintNumber
|
||||||
|
|
||||||
PrintNumOwnedMons: ; 5e42 (1:5e42)
|
PrintNumOwnedMons: ; 5e42 (1:5e42)
|
||||||
|
@ -406,17 +406,17 @@ PrintNumOwnedMons: ; 5e42 (1:5e42)
|
||||||
call CountSetBits
|
call CountSetBits
|
||||||
pop hl
|
pop hl
|
||||||
ld de, wd11e
|
ld de, wd11e
|
||||||
ld bc, $103
|
lb bc, 1, 3
|
||||||
jp PrintNumber
|
jp PrintNumber
|
||||||
|
|
||||||
PrintPlayTime: ; 5e55 (1:5e55)
|
PrintPlayTime: ; 5e55 (1:5e55)
|
||||||
ld de, W_PLAYTIMEHOURS + 1
|
ld de, W_PLAYTIMEHOURS + 1
|
||||||
ld bc, $103
|
lb bc, 1, 3
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
ld [hl], $6d
|
ld [hl], $6d
|
||||||
inc hl
|
inc hl
|
||||||
ld de, W_PLAYTIMEMINUTES + 1
|
ld de, W_PLAYTIMEMINUTES + 1
|
||||||
ld bc, $8102
|
lb bc, LEADING_ZEROES | 1, 2
|
||||||
jp PrintNumber
|
jp PrintNumber
|
||||||
|
|
||||||
SaveScreenInfoText: ; 5e6a (1:5e6a)
|
SaveScreenInfoText: ; 5e6a (1:5e6a)
|
||||||
|
|
|
@ -171,14 +171,14 @@ HandlePokedexListMenu: ; 40111 (10:4111)
|
||||||
call CountSetBits
|
call CountSetBits
|
||||||
ld de,wd11e
|
ld de,wd11e
|
||||||
coord hl, 16, 3
|
coord hl, 16, 3
|
||||||
ld bc,$0103
|
lb bc, 1, 3
|
||||||
call PrintNumber ; print number of seen pokemon
|
call PrintNumber ; print number of seen pokemon
|
||||||
ld hl,wPokedexOwned
|
ld hl,wPokedexOwned
|
||||||
ld b,wPokedexOwnedEnd - wPokedexOwned
|
ld b,wPokedexOwnedEnd - wPokedexOwned
|
||||||
call CountSetBits
|
call CountSetBits
|
||||||
ld de,wd11e
|
ld de,wd11e
|
||||||
coord hl, 16, 6
|
coord hl, 16, 6
|
||||||
ld bc,$0103
|
lb bc, 1, 3
|
||||||
call PrintNumber ; print number of owned pokemon
|
call PrintNumber ; print number of owned pokemon
|
||||||
coord hl, 16, 2
|
coord hl, 16, 2
|
||||||
ld de,PokedexSeenText
|
ld de,PokedexSeenText
|
||||||
|
@ -233,12 +233,12 @@ HandlePokedexListMenu: ; 40111 (10:4111)
|
||||||
push af
|
push af
|
||||||
push de
|
push de
|
||||||
push hl
|
push hl
|
||||||
ld de,-20
|
ld de,-SCREEN_WIDTH
|
||||||
add hl,de
|
add hl,de
|
||||||
ld de,wd11e
|
ld de,wd11e
|
||||||
ld bc,$8103
|
lb bc, LEADING_ZEROES | 1, 3
|
||||||
call PrintNumber ; print the pokedex number
|
call PrintNumber ; print the pokedex number
|
||||||
ld de,20
|
ld de,SCREEN_WIDTH
|
||||||
add hl,de
|
add hl,de
|
||||||
dec hl
|
dec hl
|
||||||
push hl
|
push hl
|
||||||
|
@ -466,7 +466,7 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
|
||||||
ld a,$f2
|
ld a,$f2
|
||||||
ld [hli],a
|
ld [hli],a
|
||||||
ld de,wd11e
|
ld de,wd11e
|
||||||
ld bc,$8103
|
lb bc, LEADING_ZEROES | 1, 3
|
||||||
call PrintNumber ; print pokedex number
|
call PrintNumber ; print pokedex number
|
||||||
ld hl,wPokedexOwned
|
ld hl,wPokedexOwned
|
||||||
call IsPokemonBitSet
|
call IsPokemonBitSet
|
||||||
|
@ -496,14 +496,14 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
|
||||||
inc de ; de = address of feet (height)
|
inc de ; de = address of feet (height)
|
||||||
ld a,[de] ; reads feet, but a is overwritten without being used
|
ld a,[de] ; reads feet, but a is overwritten without being used
|
||||||
coord hl, 12, 6
|
coord hl, 12, 6
|
||||||
ld bc,$0102
|
lb bc, 1, 2
|
||||||
call PrintNumber ; print feet (height)
|
call PrintNumber ; print feet (height)
|
||||||
ld a,$60 ; feet symbol tile (one tick)
|
ld a,$60 ; feet symbol tile (one tick)
|
||||||
ld [hl],a
|
ld [hl],a
|
||||||
inc de
|
inc de
|
||||||
inc de ; de = address of inches (height)
|
inc de ; de = address of inches (height)
|
||||||
coord hl, 15, 6
|
coord hl, 15, 6
|
||||||
ld bc,$8102
|
lb bc, LEADING_ZEROES | 1, 2
|
||||||
call PrintNumber ; print inches (height)
|
call PrintNumber ; print inches (height)
|
||||||
ld a,$61 ; inches symbol tile (two ticks)
|
ld a,$61 ; inches symbol tile (two ticks)
|
||||||
ld [hl],a
|
ld [hl],a
|
||||||
|
@ -525,7 +525,7 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
|
||||||
ld [hl],a ; store lower byte of weight in [hDexWeight + 1]
|
ld [hl],a ; store lower byte of weight in [hDexWeight + 1]
|
||||||
ld de,hDexWeight
|
ld de,hDexWeight
|
||||||
coord hl, 11, 8
|
coord hl, 11, 8
|
||||||
ld bc,$0205 ; no leading zeroes, right-aligned, 2 bytes, 5 digits
|
lb bc, 2, 5 ; 2 bytes, 5 digits
|
||||||
call PrintNumber ; print weight
|
call PrintNumber ; print weight
|
||||||
coord hl, 14, 8
|
coord hl, 14, 8
|
||||||
ld a,[hDexWeight + 1]
|
ld a,[hDexWeight + 1]
|
||||||
|
|
|
@ -602,12 +602,12 @@ DrawTrainerInfo: ; 1349a (4:749a)
|
||||||
call PrintBCDNumber
|
call PrintBCDNumber
|
||||||
coord hl, 9, 6
|
coord hl, 9, 6
|
||||||
ld de,W_PLAYTIMEHOURS + 1 ; hours
|
ld de,W_PLAYTIMEHOURS + 1 ; hours
|
||||||
ld bc,$4103
|
lb bc, LEFT_ALIGN | 1, 3
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
ld [hl],$d6 ; colon tile ID
|
ld [hl],$d6 ; colon tile ID
|
||||||
inc hl
|
inc hl
|
||||||
ld de,W_PLAYTIMEMINUTES + 1 ; minutes
|
ld de,W_PLAYTIMEMINUTES + 1 ; minutes
|
||||||
ld bc,$8102
|
lb bc, LEADING_ZEROES | 1, 2
|
||||||
jp PrintNumber
|
jp PrintNumber
|
||||||
|
|
||||||
TrainerInfo_FarCopyData: ; 1357f (4:757f)
|
TrainerInfo_FarCopyData: ; 1357f (4:757f)
|
||||||
|
|
|
@ -50,12 +50,12 @@ DrawHP_: ; 128fb (4:68fb)
|
||||||
.printFraction
|
.printFraction
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld de, wLoadedMonHP
|
ld de, wLoadedMonHP
|
||||||
ld bc, $203
|
lb bc, 2, 3
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
ld a, "/"
|
ld a, "/"
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld de, wLoadedMonMaxHP
|
ld de, wLoadedMonMaxHP
|
||||||
ld bc, $203
|
lb bc, 2, 3
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
pop hl
|
pop hl
|
||||||
pop de
|
pop de
|
||||||
|
@ -144,7 +144,7 @@ StatusScreen: ; 12953 (4:6953)
|
||||||
predef IndexToPokedex
|
predef IndexToPokedex
|
||||||
coord hl, 3, 7
|
coord hl, 3, 7
|
||||||
ld de, wd11e
|
ld de, wd11e
|
||||||
ld bc, $8103 ; Zero-padded, 3
|
lb bc, LEADING_ZEROES | 1, 3
|
||||||
call PrintNumber ; Pokémon no.
|
call PrintNumber ; Pokémon no.
|
||||||
coord hl, 11, 10
|
coord hl, 11, 10
|
||||||
predef PrintMonType
|
predef PrintMonType
|
||||||
|
@ -162,7 +162,7 @@ StatusScreen: ; 12953 (4:6953)
|
||||||
call PlaceString ; OT
|
call PlaceString ; OT
|
||||||
coord hl, 12, 14
|
coord hl, 12, 14
|
||||||
ld de, wLoadedMonOTID
|
ld de, wLoadedMonOTID
|
||||||
ld bc, $8205 ; 5
|
lb bc, LEADING_ZEROES | 2, 5
|
||||||
call PrintNumber ; ID Number
|
call PrintNumber ; ID Number
|
||||||
ld d, $0
|
ld d, $0
|
||||||
call PrintStatsBox
|
call PrintStatsBox
|
||||||
|
@ -270,7 +270,7 @@ PrintStatsBox: ; 12ae4 (4:6ae4)
|
||||||
pop bc
|
pop bc
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld de, wLoadedMonAttack
|
ld de, wLoadedMonAttack
|
||||||
ld bc, $0203 ; three digits
|
lb bc, 2, 3
|
||||||
call PrintStat
|
call PrintStat
|
||||||
ld de, wLoadedMonDefense
|
ld de, wLoadedMonDefense
|
||||||
call PrintStat
|
call PrintStat
|
||||||
|
@ -367,12 +367,12 @@ StatusScreen2: ; 12b57 (4:6b57)
|
||||||
ld l, e
|
ld l, e
|
||||||
push hl
|
push hl
|
||||||
ld de, wStatusScreenCurrentPP
|
ld de, wStatusScreenCurrentPP
|
||||||
ld bc, $0102
|
lb bc, 1, 2
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
ld a, "/"
|
ld a, "/"
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld de, wd11e
|
ld de, wd11e
|
||||||
ld bc, $0102
|
lb bc, 1, 2
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
pop hl
|
pop hl
|
||||||
ld de, SCREEN_WIDTH * 2
|
ld de, SCREEN_WIDTH * 2
|
||||||
|
@ -405,12 +405,12 @@ StatusScreen2: ; 12b57 (4:6b57)
|
||||||
ld [wLoadedMonLevel], a
|
ld [wLoadedMonLevel], a
|
||||||
ld de, wLoadedMonExp
|
ld de, wLoadedMonExp
|
||||||
coord hl, 12, 4
|
coord hl, 12, 4
|
||||||
ld bc, $0307
|
lb bc, 3, 7
|
||||||
call PrintNumber ; exp
|
call PrintNumber ; exp
|
||||||
call CalcExpToLevelUp
|
call CalcExpToLevelUp
|
||||||
ld de, wLoadedMonExp
|
ld de, wLoadedMonExp
|
||||||
coord hl, 7, 6
|
coord hl, 7, 6
|
||||||
ld bc, $0307
|
lb bc, 3, 7
|
||||||
call PrintNumber ; exp needed to level up
|
call PrintNumber ; exp needed to level up
|
||||||
coord hl, 9, 0
|
coord hl, 9, 0
|
||||||
call StatusScreen_ClearName
|
call StatusScreen_ClearName
|
||||||
|
|
|
@ -649,7 +649,7 @@ SlotMachine_PrintCreditCoins: ; 37754 (d:7754)
|
||||||
SlotMachine_PrintPayoutCoins: ; 3775f (d:775f)
|
SlotMachine_PrintPayoutCoins: ; 3775f (d:775f)
|
||||||
coord hl, 11, 1
|
coord hl, 11, 1
|
||||||
ld de, wPayoutCoins
|
ld de, wPayoutCoins
|
||||||
ld bc, $8204 ; 2 bytes, 4 digits, leading zeroes
|
lb bc, LEADING_ZEROES | 2, 4 ; 2 bytes, 4 digits
|
||||||
jp PrintNumber
|
jp PrintNumber
|
||||||
|
|
||||||
SlotMachine_PayCoinsToPlayer: ; 3776b (d:776b)
|
SlotMachine_PayCoinsToPlayer: ; 3776b (d:776b)
|
||||||
|
|
|
@ -7,7 +7,7 @@ Trade_PrintPlayerMonInfoText: ; 42769 (10:6769)
|
||||||
predef IndexToPokedex
|
predef IndexToPokedex
|
||||||
coord hl, 9, 0
|
coord hl, 9, 0
|
||||||
ld de,wd11e
|
ld de,wd11e
|
||||||
ld bc,$8103
|
lb bc, LEADING_ZEROES | 1, 3
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
coord hl, 5, 2
|
coord hl, 5, 2
|
||||||
ld de,wcf4b
|
ld de,wcf4b
|
||||||
|
@ -17,7 +17,7 @@ Trade_PrintPlayerMonInfoText: ; 42769 (10:6769)
|
||||||
call PlaceString
|
call PlaceString
|
||||||
coord hl, 8, 6
|
coord hl, 8, 6
|
||||||
ld de,wTradedPlayerMonOTID
|
ld de,wTradedPlayerMonOTID
|
||||||
ld bc,$8205
|
lb bc, LEADING_ZEROES | 2, 5
|
||||||
jp PrintNumber
|
jp PrintNumber
|
||||||
|
|
||||||
Trade_PrintEnemyMonInfoText: ; 427a7 (10:67a7)
|
Trade_PrintEnemyMonInfoText: ; 427a7 (10:67a7)
|
||||||
|
@ -29,7 +29,7 @@ Trade_PrintEnemyMonInfoText: ; 427a7 (10:67a7)
|
||||||
predef IndexToPokedex
|
predef IndexToPokedex
|
||||||
coord hl, 9, 10
|
coord hl, 9, 10
|
||||||
ld de,wd11e
|
ld de,wd11e
|
||||||
ld bc,$8103
|
lb bc, LEADING_ZEROES | 1, 3
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
coord hl, 5, 12
|
coord hl, 5, 12
|
||||||
ld de,wcd6d
|
ld de,wcd6d
|
||||||
|
@ -39,7 +39,7 @@ Trade_PrintEnemyMonInfoText: ; 427a7 (10:67a7)
|
||||||
call PlaceString
|
call PlaceString
|
||||||
coord hl, 8, 16
|
coord hl, 8, 16
|
||||||
ld de,wTradedEnemyMonOTID
|
ld de,wTradedEnemyMonOTID
|
||||||
ld bc,$8205
|
lb bc, LEADING_ZEROES | 2, 5
|
||||||
jp PrintNumber
|
jp PrintNumber
|
||||||
|
|
||||||
Trade_MonInfoText: ; 427e5 (10:67e5)
|
Trade_MonInfoText: ; 427e5 (10:67e5)
|
||||||
|
|
15
home.asm
15
home.asm
|
@ -539,7 +539,7 @@ PrintLevelFull:: ; 151b (0:151b)
|
||||||
PrintLevelCommon:: ; 1523 (0:1523)
|
PrintLevelCommon:: ; 1523 (0:1523)
|
||||||
ld [wd11e],a
|
ld [wd11e],a
|
||||||
ld de,wd11e
|
ld de,wd11e
|
||||||
ld b,$41 ; no leading zeroes, left-aligned, one byte
|
ld b,LEFT_ALIGN | 1 ; 1 byte
|
||||||
jp PrintNumber
|
jp PrintNumber
|
||||||
|
|
||||||
GetwMoves:: ; 152e (0:152e)
|
GetwMoves:: ; 152e (0:152e)
|
||||||
|
@ -1668,7 +1668,7 @@ DisplayChooseQuantityMenu:: ; 2d57 (0:2d57)
|
||||||
coord hl, 9, 10
|
coord hl, 9, 10
|
||||||
.printQuantity
|
.printQuantity
|
||||||
ld de,wItemQuantity ; current quantity
|
ld de,wItemQuantity ; current quantity
|
||||||
ld bc,$8102 ; print leading zeroes, 1 byte, 2 digits
|
lb bc,LEADING_ZEROES | 1, 2 ; 1 byte, 2 digits
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
jp .waitForKeyPressLoop
|
jp .waitForKeyPressLoop
|
||||||
.buttonAPressed ; the player chose to make the transaction
|
.buttonAPressed ; the player chose to make the transaction
|
||||||
|
@ -1855,7 +1855,7 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a)
|
||||||
push de
|
push de
|
||||||
ld de,wd11e
|
ld de,wd11e
|
||||||
ld [de],a
|
ld [de],a
|
||||||
ld bc,$0102
|
lb bc, 1, 2
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
pop de
|
pop de
|
||||||
pop af
|
pop af
|
||||||
|
@ -4197,9 +4197,6 @@ PrintNumber:: ; 3c5f
|
||||||
; the value to char "0" instead of calling PrintNumber.
|
; the value to char "0" instead of calling PrintNumber.
|
||||||
; Flags LEADING_ZEROES and LEFT_ALIGN can be given
|
; Flags LEADING_ZEROES and LEFT_ALIGN can be given
|
||||||
; in bits 7 and 6 of b respectively.
|
; in bits 7 and 6 of b respectively.
|
||||||
LEADING_ZEROES EQU 7
|
|
||||||
LEFT_ALIGN EQU 6
|
|
||||||
|
|
||||||
push bc
|
push bc
|
||||||
xor a
|
xor a
|
||||||
ld [H_PASTLEADINGZEROES], a
|
ld [H_PASTLEADINGZEROES], a
|
||||||
|
@ -4392,7 +4389,7 @@ endm
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.PrintLeadingZero:
|
.PrintLeadingZero:
|
||||||
bit LEADING_ZEROES, d
|
bit BIT_LEADING_ZEROES, d
|
||||||
ret z
|
ret z
|
||||||
ld [hl], "0"
|
ld [hl], "0"
|
||||||
ret
|
ret
|
||||||
|
@ -4401,9 +4398,9 @@ endm
|
||||||
; Increment unless the number is left-aligned,
|
; Increment unless the number is left-aligned,
|
||||||
; leading zeroes are not printed, and no digits
|
; leading zeroes are not printed, and no digits
|
||||||
; have been printed yet.
|
; have been printed yet.
|
||||||
bit LEADING_ZEROES, d
|
bit BIT_LEADING_ZEROES, d
|
||||||
jr nz, .inc
|
jr nz, .inc
|
||||||
bit LEFT_ALIGN, d
|
bit BIT_LEFT_ALIGN, d
|
||||||
jr z, .inc
|
jr z, .inc
|
||||||
ld a, [H_PASTLEADINGZEROES]
|
ld a, [H_PASTLEADINGZEROES]
|
||||||
and a
|
and a
|
||||||
|
|
|
@ -561,7 +561,7 @@ TextCommand09:: ; 1bff (0:1bff)
|
||||||
ld a,b
|
ld a,b
|
||||||
and a,$f0
|
and a,$f0
|
||||||
swap a
|
swap a
|
||||||
set 6,a
|
set BIT_LEFT_ALIGN,a
|
||||||
ld b,a
|
ld b,a
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
ld b,h
|
ld b,h
|
||||||
|
|
12
main.asm
12
main.asm
|
@ -2314,12 +2314,12 @@ PrintSafariZoneSteps: ; c52f (3:452f)
|
||||||
cp UNKNOWN_DUNGEON_2
|
cp UNKNOWN_DUNGEON_2
|
||||||
ret nc
|
ret nc
|
||||||
coord hl, 0, 0
|
coord hl, 0, 0
|
||||||
ld b, $3
|
ld b, 3
|
||||||
ld c, $7
|
ld c, 7
|
||||||
call TextBoxBorder
|
call TextBoxBorder
|
||||||
coord hl, 1, 1
|
coord hl, 1, 1
|
||||||
ld de, wSafariSteps
|
ld de, wSafariSteps
|
||||||
ld bc, $203
|
lb bc, 2, 3
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
coord hl, 4, 1
|
coord hl, 4, 1
|
||||||
ld de, SafariSteps
|
ld de, SafariSteps
|
||||||
|
@ -2328,15 +2328,15 @@ PrintSafariZoneSteps: ; c52f (3:452f)
|
||||||
ld de, SafariBallText
|
ld de, SafariBallText
|
||||||
call PlaceString
|
call PlaceString
|
||||||
ld a, [W_NUMSAFARIBALLS]
|
ld a, [W_NUMSAFARIBALLS]
|
||||||
cp $a
|
cp 10
|
||||||
jr nc, .asm_c56d
|
jr nc, .asm_c56d
|
||||||
coord hl, 5, 3
|
coord hl, 5, 3
|
||||||
ld a, $7f
|
ld a, " "
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
.asm_c56d
|
.asm_c56d
|
||||||
coord hl, 6, 3
|
coord hl, 6, 3
|
||||||
ld de, W_NUMSAFARIBALLS
|
ld de, W_NUMSAFARIBALLS
|
||||||
ld bc, $102
|
lb bc, 1, 2
|
||||||
jp PrintNumber
|
jp PrintNumber
|
||||||
|
|
||||||
SafariSteps: ; c579 (3:4579)
|
SafariSteps: ; c579 (3:4579)
|
||||||
|
|
Loading…
Reference in a new issue