aboutsummaryrefslogtreecommitdiffstats
path: root/engine/pokemon/status_screen.asm
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2026-01-17 22:38:33 -0600
committerdannye <33dannye@gmail.com>2026-01-17 22:38:33 -0600
commitbc2354dd6626ce28bb9561547ed2107cfa56c18e (patch)
tree5902d4c3389253c76b7c3351e0d7dfecb551c28d /engine/pokemon/status_screen.asm
parentIdentify characters in `_OakSpeechText2B` and `Printer_GetMonStats.IDNo` (#144) (diff)
parentUse macros for `WildMonEncounterSlotChances` (#562) (diff)
downloadpokeyellow-bc2354dd6626ce28bb9561547ed2107cfa56c18e.tar.gz
pokeyellow-bc2354dd6626ce28bb9561547ed2107cfa56c18e.tar.xz
pokeyellow-bc2354dd6626ce28bb9561547ed2107cfa56c18e.zip
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'engine/pokemon/status_screen.asm')
-rw-r--r--engine/pokemon/status_screen.asm72
1 files changed, 33 insertions, 39 deletions
diff --git a/engine/pokemon/status_screen.asm b/engine/pokemon/status_screen.asm
index 638f4c41..7e8ad615 100644
--- a/engine/pokemon/status_screen.asm
+++ b/engine/pokemon/status_screen.asm
@@ -61,8 +61,6 @@ DrawHP_:
pop de
ret
-
-; Predef 0x37
StatusScreen:
call LoadMonData
ld a, [wMonDataLocation]
@@ -75,7 +73,7 @@ StatusScreen:
ld hl, wLoadedMonHPExp - 1
ld de, wLoadedMonStats
ld b, $1
- call CalcStats ; Recalculate stats
+ call CalcStats
.DontRecalculate
ld hl, wStatusFlags2
set BIT_NO_AUDIO_FADE_OUT, [hl]
@@ -117,8 +115,8 @@ StatusScreen:
lb bc, 8, 6
call DrawLineBox ; Draws the box around types, ID No. and OT
hlcoord 10, 9
- ld de, Type1Text
- call PlaceString ; "TYPE1/"
+ ld de, TypesIDNoOTText
+ call PlaceString
hlcoord 11, 3
predef DrawHP
ld hl, wStatusScreenHPBarColor
@@ -137,7 +135,7 @@ StatusScreen:
ld de, StatusText
call PlaceString ; "STATUS/"
hlcoord 14, 2
- call PrintLevel ; Pokémon level
+ call PrintLevel
ld a, [wMonHIndex]
ld [wPokedexNum], a
ld [wCurSpecies], a
@@ -164,7 +162,7 @@ StatusScreen:
ld de, wLoadedMonOTID
lb bc, LEADING_ZEROES | 2, 5
call PrintNumber ; ID Number
- ld d, $0
+ ld d, STATUS_SCREEN_STATS_BOX
call PrintStatsBox
call Delay3
call GBPalNormal
@@ -221,20 +219,11 @@ NamePointers2:
dw wBoxMonNicks
dw wDayCareMonName
-Type1Text:
+TypesIDNoOTText:
db "TYPE1/"
- next ""
- ; fallthrough
-Type2Text:
- db "TYPE2/"
- next ""
- ; fallthrough
-IDNoText:
- db "<ID>№/"
- next ""
- ; fallthrough
-OTText:
- db "OT/"
+ next "TYPE2/"
+ next "<ID>№/"
+ next "OT/"
next "@"
StatusText:
@@ -265,38 +254,40 @@ PTile: INCBIN "gfx/font/P.1bpp"
PrintStatsBox:
ld a, d
- and a ; a is 0 from the status screen
- jr nz, .DifferentBox
+ ASSERT STATUS_SCREEN_STATS_BOX == 0
+ and a
+ jr nz, .LevelUpStatsBox ; battle or Rare Candy
hlcoord 0, 8
lb bc, 8, 8
- call TextBoxBorder ; Draws the box
- hlcoord 1, 9 ; Start printing stats from here
- ld bc, $19 ; Number offset
+ call TextBoxBorder
+ hlcoord 1, 9
+ ld bc, SCREEN_WIDTH + 5 ; one row down and 5 columns right
jr .PrintStats
-.DifferentBox
+.LevelUpStatsBox
hlcoord 9, 2
lb bc, 8, 9
call TextBoxBorder
hlcoord 11, 3
- ld bc, $18
+ ld bc, SCREEN_WIDTH + 4 ; one row down and 4 columns right
.PrintStats
push bc
push hl
- ld de, StatsText
+ ld de, .StatsText
call PlaceString
pop hl
pop bc
add hl, bc
ld de, wLoadedMonAttack
lb bc, 2, 3
- call PrintStat
+ call .PrintStat
ld de, wLoadedMonDefense
- call PrintStat
+ call .PrintStat
ld de, wLoadedMonSpeed
- call PrintStat
+ call .PrintStat
ld de, wLoadedMonSpecial
jp PrintNumber
-PrintStat:
+
+.PrintStat:
push hl
call PrintNumber
pop hl
@@ -304,7 +295,7 @@ PrintStat:
add hl, de
ret
-StatsText:
+.StatsText:
db "ATTACK"
next "DEFENSE"
next "SPEED"
@@ -337,10 +328,10 @@ StatusScreen2:
call PlaceString ; Print moves
ld a, [wNumMovesMinusOne]
inc a
- ld c, a
- ld a, $4
+ ld c, a ; number of known moves
+ ld a, NUM_MOVES
sub c
- ld b, a ; Number of moves ?
+ ld b, a ; number of blank moves
hlcoord 11, 10
ld de, SCREEN_WIDTH * 2
ld a, '<BOLD_P>'
@@ -375,7 +366,7 @@ StatusScreen2:
pop de
pop hl
push hl
- ld bc, wPartyMon1PP - wPartyMon1Moves - 1
+ ld bc, MON_PP - MON_MOVES - 1
add hl, bc
ld a, [hl]
and PP_MASK
@@ -400,7 +391,7 @@ StatusScreen2:
pop bc
inc b
ld a, b
- cp $4
+ cp NUM_MOVES
jr nz, .PrintPP
.PPDone
hlcoord 9, 3
@@ -429,8 +420,11 @@ StatusScreen2:
hlcoord 7, 6
lb bc, 3, 7
call PrintNumber ; exp needed to level up
+
+ ; unneeded, this clears the diacritic characters in JPN versions
hlcoord 9, 0
call StatusScreen_ClearName
+
hlcoord 9, 1
call StatusScreen_ClearName
ld a, [wMonHIndex]
@@ -482,7 +476,7 @@ StatusScreenExpText:
next "LEVEL UP@"
StatusScreen_ClearName:
- ld bc, 10
+ ld bc, NAME_LENGTH - 1
ld a, ' '
jp FillMemory