aboutsummaryrefslogtreecommitdiffstats
path: root/engine/pokemon
diff options
context:
space:
mode:
authorSylvie <35663410+Rangi42@users.noreply.github.com>2024-07-16 13:02:54 -0400
committerGitHub <noreply@github.com>2024-07-16 13:02:54 -0400
commit8fafca714c07500d1d87bba224f12cf9cc2c8789 (patch)
tree273ca88fcfcd80df9c318c9cb8d17a1f7aa240cb /engine/pokemon
parentBuild with RGBDS 0.8.0, though it is not yet required (diff)
downloadpokeyellow-8fafca714c07500d1d87bba224f12cf9cc2c8789.tar.gz
pokeyellow-8fafca714c07500d1d87bba224f12cf9cc2c8789.tar.xz
pokeyellow-8fafca714c07500d1d87bba224f12cf9cc2c8789.zip
Identify various flag labels and bit constants (#454)
Diffstat (limited to 'engine/pokemon')
-rw-r--r--engine/pokemon/add_mon.asm6
-rw-r--r--engine/pokemon/bills_pc.asm20
-rw-r--r--engine/pokemon/evos_moves.asm8
-rw-r--r--engine/pokemon/status_screen.asm10
4 files changed, 22 insertions, 22 deletions
diff --git a/engine/pokemon/add_mon.asm b/engine/pokemon/add_mon.asm
index 6fb074ac..0b7fb96c 100644
--- a/engine/pokemon/add_mon.asm
+++ b/engine/pokemon/add_mon.asm
@@ -199,7 +199,7 @@ _AddPartyMon::
inc de
ld [de], a
push de
- ld a, [wCurEnemyLVL]
+ ld a, [wCurEnemyLevel]
ld d, a
callfar CalcExperience
pop de
@@ -224,7 +224,7 @@ _AddPartyMon::
pop hl
call AddPartyMon_WriteMovePP
inc de
- ld a, [wCurEnemyLVL]
+ ld a, [wCurEnemyLevel]
ld [de], a
inc de
ld a, [wIsInBattle]
@@ -500,7 +500,7 @@ _MoveMon::
call LoadMonData
farcall CalcLevelFromExperience
ld a, d
- ld [wCurEnemyLVL], a
+ ld [wCurEnemyLevel], a
pop hl
ld bc, wBoxMon2 - wBoxMon1
add hl, bc
diff --git a/engine/pokemon/bills_pc.asm b/engine/pokemon/bills_pc.asm
index 8684b761..59933762 100644
--- a/engine/pokemon/bills_pc.asm
+++ b/engine/pokemon/bills_pc.asm
@@ -93,8 +93,8 @@ PKMNLeaguePCText: db "<PKMN>LEAGUE@"
LogOffPCText: db "LOG OFF@"
BillsPC_::
- ld hl, wd730
- set 6, [hl]
+ ld hl, wStatusFlags5
+ set BIT_NO_TEXT_DELAY, [hl]
xor a
ld [wParentMenuItem], a
inc a ; MONSTER_NAME
@@ -102,8 +102,8 @@ BillsPC_::
call LoadHpBarAndStatusTilePatterns
ld a, [wListScrollOffset]
push af
- ld a, [wFlags_0xcd60]
- bit 3, a ; accessing Bill's PC through another PC?
+ ld a, [wMiscFlags]
+ bit BIT_USING_GENERIC_PC, a
jr nz, BillsPCMenu
; accessing it directly
ld a, SFX_TURN_ON_PC
@@ -186,8 +186,8 @@ BillsPCMenu:
jp z, BillsPCChangeBox ; change box
ExitBillsPC:
- ld a, [wFlags_0xcd60]
- bit 3, a ; accessing Bill's PC through another PC?
+ ld a, [wMiscFlags]
+ bit BIT_USING_GENERIC_PC, a
jr nz, .next
; accessing it directly
call LoadTextBoxTilePatterns
@@ -195,13 +195,13 @@ ExitBillsPC:
call PlaySound
call WaitForSoundToFinish
.next
- ld hl, wFlags_0xcd60
- res 5, [hl]
+ ld hl, wMiscFlags
+ res BIT_NO_MENU_BUTTON_SOUND, [hl]
call LoadScreenTilesFromBuffer2
pop af
ld [wListScrollOffset], a
- ld hl, wd730
- res 6, [hl]
+ ld hl, wStatusFlags5
+ res BIT_NO_TEXT_DELAY, [hl]
ret
BillsPCDeposit:
diff --git a/engine/pokemon/evos_moves.asm b/engine/pokemon/evos_moves.asm
index d6b51ee5..fa6930c1 100644
--- a/engine/pokemon/evos_moves.asm
+++ b/engine/pokemon/evos_moves.asm
@@ -105,7 +105,7 @@ Evolution_PartyMonLoop: ; loop over party mons
cp b ; is the mon's level greater than the evolution requirement?
jp c, .nextEvoEntry2 ; if so, go the next evolution entry
.doEvolution
- ld [wCurEnemyLVL], a
+ ld [wCurEnemyLevel], a
ld a, 1
ld [wEvolutionOccurred], a
push hl
@@ -340,7 +340,7 @@ LearnMoveFromLevelUp:
and a ; have we reached the end of the learn set?
jr z, .done ; if we've reached the end of the learn set, jump
ld b, a ; level the move is learnt at
- ld a, [wCurEnemyLVL]
+ ld a, [wCurEnemyLevel]
cp b ; is the move learnt at the mon's current level?
ld a, [hli] ; move ID
jr nz, .learnSetLoop
@@ -375,7 +375,7 @@ LearnMoveFromLevelUp:
ld [wd11e], a
ret
-; writes the moves a mon has at level [wCurEnemyLVL] to [de]
+; writes the moves a mon has at level [wCurEnemyLevel] to [de]
; move slots are being filled up sequentially and shifted if all slots are full
WriteMonMoves:
call GetPredefRegisters
@@ -407,7 +407,7 @@ WriteMonMoves:
and a
jp z, .done ; end of list
ld b, a
- ld a, [wCurEnemyLVL]
+ ld a, [wCurEnemyLevel]
cp b
jp c, .done ; mon level < move level (assumption: learnset is sorted by level)
ld a, [wLearningMovesFromDayCare]
diff --git a/engine/pokemon/status_screen.asm b/engine/pokemon/status_screen.asm
index ac03514a..d29c23fe 100644
--- a/engine/pokemon/status_screen.asm
+++ b/engine/pokemon/status_screen.asm
@@ -71,14 +71,14 @@ StatusScreen:
; mon is in a box or daycare
ld a, [wLoadedMonBoxLevel]
ld [wLoadedMonLevel], a
- ld [wCurEnemyLVL], a
+ ld [wCurEnemyLevel], a
ld hl, wLoadedMonHPExp - 1
ld de, wLoadedMonStats
ld b, $1
call CalcStats ; Recalculate stats
.DontRecalculate
- ld hl, wd72c
- set 1, [hl]
+ ld hl, wStatusFlags2
+ set BIT_NO_AUDIO_FADE_OUT, [hl]
ld a, $33
ldh [rNR50], a ; Reduce the volume
call GBPalWhiteOutWithDelay3
@@ -430,8 +430,8 @@ StatusScreen2:
call WaitForTextScrollButtonPress ; wait for button
pop af
ldh [hTileAnimations], a
- ld hl, wd72c
- res 1, [hl]
+ ld hl, wStatusFlags2
+ res BIT_NO_AUDIO_FADE_OUT, [hl]
ld a, $77
ldh [rNR50], a
call GBPalWhiteOut