summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2015-02-07 18:37:40 -0800
committerYamaArashi <shadow962@live.com>2015-02-07 18:37:40 -0800
commit32f7cf12de9f841f76a3f2010caf6d7a80d47bcc (patch)
tree3568312441db2bbd4acf0f6885913980f4c0eaad /engine
parent4fd7a42b235b68ffc11d4f02305b695c2ed05549 (diff)
Named wram symbols
Diffstat (limited to 'engine')
-rwxr-xr-xengine/battle/4.asm12
-rwxr-xr-xengine/battle/core.asm22
-rwxr-xr-xengine/battle/e.asm10
-rwxr-xr-xengine/cable_club.asm4
-rwxr-xr-xengine/evos_moves.asm16
-rwxr-xr-xengine/experience.asm4
-rw-r--r--engine/menu/bills_pc.asm4
-rwxr-xr-xengine/menu/party_menu.asm4
-rwxr-xr-xengine/menu/players_pc.asm12
-rwxr-xr-xengine/menu/start_sub_menus.asm4
-rwxr-xr-xengine/menu/status_screen.asm40
-rwxr-xr-xengine/overworld/map_sprites.asm6
-rw-r--r--engine/overworld/movement.asm4
-rwxr-xr-xengine/overworld/pokemart.asm8
-rwxr-xr-xengine/predefs7.asm4
15 files changed, 77 insertions, 77 deletions
diff --git a/engine/battle/4.asm b/engine/battle/4.asm
index 37ffaa05..97db1ba3 100755
--- a/engine/battle/4.asm
+++ b/engine/battle/4.asm
@@ -26,9 +26,9 @@ Func_128f6: ; 128f6 (4:68f6)
asm_128fb: ; 128fb (4:68fb)
ld [wListMenuID], a
push hl
- ld a, [wcf99]
+ ld a, [wLoadedMonHP]
ld b, a
- ld a, [wcf9a]
+ ld a, [wLoadedMonHP + 1]
ld c, a
or b
jr nz, .asm_12913
@@ -39,9 +39,9 @@ asm_128fb: ; 128fb (4:68fb)
ld d, a
jp DrawHPBarAndFraction
.asm_12913
- ld a, [wcfba]
+ ld a, [wLoadedMonMaxHP]
ld d, a
- ld a, [wcfbb]
+ ld a, [wLoadedMonMaxHP + 1]
ld e, a
predef HPBarLength
ld a, $6
@@ -64,12 +64,12 @@ DrawHPBarAndFraction: ; 12924 (4:6924)
ld bc, SCREEN_WIDTH + 1 ; below bar
.printHPFraction
add hl, bc
- ld de, wcf99
+ ld de, wLoadedMonHP
ld bc, $203
call PrintNumber
ld a, "/"
ld [hli], a
- ld de, wcfba
+ ld de, wLoadedMonMaxHP
ld bc, $203
call PrintNumber
pop hl
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 6ea2c55b..a502ed7c 100755
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -1899,23 +1899,23 @@ DrawPlayerHUDAndHPBar: ; 3cd60 (f:4d60)
call CenterMonName
call PlaceString
ld hl, wBattleMonSpecies
- ld de, wcf98
+ ld de, wLoadedMon
ld bc, $c
call CopyData
ld hl, wBattleMonLevel
- ld de, wcfb9
+ ld de, wLoadedMonLevel
ld bc, $b
call CopyData
hlCoord 14, 8
push hl
inc hl
- ld de, wcf9c
+ ld de, wLoadedMonStatus
call PrintStatusConditionNotFainted
pop hl
jr nz, .asm_3cdae
call PrintLevel
.asm_3cdae
- ld a, [wcf98]
+ ld a, [wLoadedMonSpecies]
ld [wcf91], a
hlCoord 10, 9
predef DrawHP
@@ -1965,7 +1965,7 @@ DrawEnemyHUDAndHPBar: ; 3cdec (f:4dec)
pop hl
jr nz, .skipPrintLevel ; if the mon has a status condition, skip printing the level
ld a, [wEnemyMonLevel]
- ld [wcfb9], a
+ ld [wLoadedMonLevel], a
call PrintLevel
.skipPrintLevel
ld hl, wEnemyMonHP
@@ -2270,9 +2270,9 @@ BagWasSelected:
jr nz, DisplayPlayerBag ; no, it is a normal battle
ld hl, OldManItemList
ld a, l
- ld [wcf8b], a
+ ld [wList], a
ld a, h
- ld [wcf8c], a
+ ld [wList + 1], a
jr DisplayBagMenu
OldManItemList:
@@ -2284,9 +2284,9 @@ DisplayPlayerBag:
; get the pointer to player's bag when in a normal battle
ld hl, wNumBagItems
ld a, l
- ld [wcf8b], a
+ ld [wList], a
ld a, h
- ld [wcf8c], a
+ ld [wList + 1], a
DisplayBagMenu:
xor a
@@ -4451,7 +4451,7 @@ GetEnemyMonStat: ; 3df1c (f:5f1c)
ld [wd0b5], a
call GetMonHeader
ld hl, wEnemyMonDVs
- ld de, wcfaf
+ ld de, wLoadedMonSpeedExp
ld a, [hli]
ld [de], a
inc de
@@ -4459,7 +4459,7 @@ GetEnemyMonStat: ; 3df1c (f:5f1c)
ld [de], a
pop bc
ld b, $0
- ld hl, wcfa4
+ ld hl, wLoadedMonSpeedExp - $b ; this base address makes CalcStat look in [wLoadedMonSpeedExp] for DVs
call CalcStat
pop de
ret
diff --git a/engine/battle/e.asm b/engine/battle/e.asm
index 9f93baa6..ff3ac839 100755
--- a/engine/battle/e.asm
+++ b/engine/battle/e.asm
@@ -665,18 +665,18 @@ Func_39bd5: ; 39bd5 (e:5bd5)
.asm_39c18
ld [W_LISTTYPE], a
ld a, l
- ld [wcf8b], a
+ ld [wList], a
ld a, h
- ld [wcf8c], a
+ ld [wList + 1], a
ld a, e
ld [wcf8d], a
ld a, d
ld [wcf8e], a
- ld bc, ItemPrices ; $4608
+ ld bc, ItemPrices
ld a, c
- ld [wcf8f], a
+ ld [wItemPrices], a
ld a, b
- ld [wcf90], a
+ ld [wItemPrices + 1], a
ret
Func_39c37: ; 39c37 (e:5c37)
diff --git a/engine/cable_club.asm b/engine/cable_club.asm
index 68c6a8dc..ff25fd5e 100755
--- a/engine/cable_club.asm
+++ b/engine/cable_club.asm
@@ -578,7 +578,7 @@ TradeCenter_SelectMon:
ReturnToCableClubRoom: ; 577d (1:577d)
call GBPalWhiteOutWithDelay3
- ld hl, wcfc4
+ ld hl, wCharRAMInUseForText
ld a, [hl]
push af
push hl
@@ -808,7 +808,7 @@ TradeCenter_Trade:
ld a, c
ld bc, wEnemyMon2 - wEnemyMon1
call AddNTimes
- ld de, wcf98
+ ld de, wLoadedMon
ld bc, wEnemyMon2 - wEnemyMon1
call CopyData
call AddEnemyMonToPlayerParty
diff --git a/engine/evos_moves.asm b/engine/evos_moves.asm
index 2c504104..2eef7ba7 100755
--- a/engine/evos_moves.asm
+++ b/engine/evos_moves.asm
@@ -88,7 +88,7 @@ Evolution_PartyMonLoop: ; loop over party mons
jp nz, .nextEvoEntry1 ; if not trading, go to the next evolution entry
ld a, [hli] ; level requirement
ld b, a
- ld a, [wcfb9]
+ ld a, [wLoadedMonLevel]
cp b ; is the mon's level greater than the evolution requirement?
jp c, Evolution_PartyMonLoop ; if so, go the next mon
jr .asm_3adb6
@@ -101,7 +101,7 @@ Evolution_PartyMonLoop: ; loop over party mons
.checkLevel
ld a, [hli] ; level requirement
ld b, a
- ld a, [wcfb9]
+ ld a, [wLoadedMonLevel]
cp b ; is the mon's level greater than the evolution requirement?
jp c, .nextEvoEntry2 ; if so, go the next evolution entry
.asm_3adb6
@@ -136,7 +136,7 @@ Evolution_PartyMonLoop: ; loop over party mons
pop hl
ld a, [hl]
ld [wd0b5], a
- ld [wcf98], a
+ ld [wLoadedMonSpecies], a
ld [wHPBarMaxHP + 1], a
ld a, MONSTER_NAME
ld [W_LISTTYPE], a
@@ -169,8 +169,8 @@ Evolution_PartyMonLoop: ; loop over party mons
ld [W_MONHDEXNUM], a
pop af
ld [wd11e], a
- ld hl, wcfa8
- ld de, wcfba
+ ld hl, wLoadedMonHPExp - 1
+ ld de, wLoadedMonStats
ld b, $1
call CalcStats
ld a, [wWhichPokemon]
@@ -186,14 +186,14 @@ Evolution_PartyMonLoop: ; loop over party mons
ld a, [hli]
ld b, a
ld c, [hl]
- ld hl, wcfbb
+ ld hl, wLoadedMonMaxHP + 1
ld a, [hld]
sub c
ld c, a
ld a, [hl]
sbc b
ld b, a
- ld hl, wcf9a
+ ld hl, wLoadedMonHP + 1
ld a, [hl]
add c
ld [hld], a
@@ -226,7 +226,7 @@ Evolution_PartyMonLoop: ; loop over party mons
call Evolution_FlagAction
pop de
pop hl
- ld a, [wcf98]
+ ld a, [wLoadedMonSpecies]
ld [hl], a
push hl
ld l, e
diff --git a/engine/experience.asm b/engine/experience.asm
index 91f1dd5d..68d22843 100755
--- a/engine/experience.asm
+++ b/engine/experience.asm
@@ -1,6 +1,6 @@
; calculates the level a mon should be based on its current exp
CalcLevelFromExperience: ; 58f43 (16:4f43)
- ld a, [wcf98]
+ ld a, [wLoadedMonSpecies]
ld [wd0b5], a
call GetMonHeader
ld d, $1 ; init level to 1
@@ -8,7 +8,7 @@ CalcLevelFromExperience: ; 58f43 (16:4f43)
inc d ; increment level
call CalcExperience
push hl
- ld hl, wcfa8 ; current exp
+ ld hl, wLoadedMonExp + 2 ; current exp
; compare exp needed for level d with current exp
ld a, [H_MULTIPLICAND + 2]
ld c, a
diff --git a/engine/menu/bills_pc.asm b/engine/menu/bills_pc.asm
index a26c5aed..9e8422c0 100644
--- a/engine/menu/bills_pc.asm
+++ b/engine/menu/bills_pc.asm
@@ -325,9 +325,9 @@ Func_216b3: ; 216b3 (8:56b3)
Func_216be: ; 216be (8:56be)
ld a, l
- ld [wcf8b], a
+ ld [wList], a
ld a, h
- ld [wcf8c], a
+ ld [wList + 1], a
xor a
ld [wcf93], a
ld [wListMenuID], a ; wListMenuID
diff --git a/engine/menu/party_menu.asm b/engine/menu/party_menu.asm
index a2c02481..86474be9 100755
--- a/engine/menu/party_menu.asm
+++ b/engine/menu/party_menu.asm
@@ -83,7 +83,7 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3)
push hl
ld bc,14 ; 14 columns to the right
add hl,bc
- ld de,wcf9c
+ ld de,wLoadedMonStatus
call PrintStatusCondition
pop hl
push hl
@@ -134,7 +134,7 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3)
push hl
ld hl,EvosMovesPointerTable
ld b,0
- ld a,[wcf98] ; pokemon ID
+ ld a,[wLoadedMonSpecies]
dec a
add a
rl b
diff --git a/engine/menu/players_pc.asm b/engine/menu/players_pc.asm
index 5f1175eb..5217befa 100755
--- a/engine/menu/players_pc.asm
+++ b/engine/menu/players_pc.asm
@@ -97,9 +97,9 @@ Func_79ab: ; 79ab (1:79ab)
call PrintText
ld hl, wNumBagItems ; wNumBagItems
ld a, l
- ld [wcf8b], a
+ ld [wList], a
ld a, h
- ld [wcf8c], a
+ ld [wList + 1], a
xor a
ld [wcf93], a
ld a, $3
@@ -151,9 +151,9 @@ Func_7a28: ; 7a28 (1:7a28)
call PrintText
ld hl, wNumBoxItems ; wNumBoxItems
ld a, l
- ld [wcf8b], a
+ ld [wList], a
ld a, h
- ld [wcf8c], a
+ ld [wList + 1], a
xor a
ld [wcf93], a
ld a, $3
@@ -205,9 +205,9 @@ Func_7aa5: ; 7aa5 (1:7aa5)
call PrintText
ld hl, wNumBoxItems ; wNumBoxItems
ld a, l
- ld [wcf8b], a
+ ld [wList], a
ld a, h
- ld [wcf8c], a
+ ld [wList + 1], a
xor a
ld [wcf93], a
ld a, $3
diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm
index 1bedb0ea..589224ab 100755
--- a/engine/menu/start_sub_menus.asm
+++ b/engine/menu/start_sub_menus.asm
@@ -308,10 +308,10 @@ StartMenu_Item: ; 13302 (4:7302)
jr .exitMenu
.notInCableClubRoom
ld bc,wNumBagItems
- ld hl,wcf8b
+ ld hl,wList
ld a,c
ld [hli],a
- ld [hl],b ; store item bag pointer at wcf8b (for DisplayListMenuID)
+ ld [hl],b ; store item bag pointer at wList (for DisplayListMenuID)
xor a
ld [wcf93],a
ld a,ITEMLISTMENU
diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm
index 2fc5e713..79daa0c0 100755
--- a/engine/menu/status_screen.asm
+++ b/engine/menu/status_screen.asm
@@ -4,11 +4,11 @@ StatusScreen: ; 12953 (4:6953)
ld a, [wcc49]
cp $2 ; 2 means we're in a PC box
jr c, .DontRecalculate ; 0x1295b $14
- ld a, [wcf9b]
- ld [wcfb9], a
+ ld a, [wLoadedMonBoxLevel]
+ ld [wLoadedMonLevel], a
ld [W_CURENEMYLVL], a
- ld hl, wcfa8
- ld de, wcfba
+ ld hl, wLoadedMonHPExp - 1
+ ld de, wLoadedMonStats
ld b, $1
call CalcStats ; Recalculate stats
.DontRecalculate
@@ -61,7 +61,7 @@ StatusScreen: ; 12953 (4:6953)
ld b, $3
call GoPAL_SET ; SGB palette
hlCoord 16, 6
- ld de, wcf9c
+ ld de, wLoadedMonStatus
call PrintStatusCondition
jr nz, .StatusWritten ; 0x129fc $9
hlCoord 16, 6
@@ -96,7 +96,7 @@ StatusScreen: ; 12953 (4:6953)
hlCoord 12, 16
call PlaceString ; OT
hlCoord 12, 14
- ld de, wcfa4
+ ld de, wLoadedMonOTID
ld bc, $8205 ; 5
call PrintNumber ; ID Number
ld d, $0
@@ -203,14 +203,14 @@ PrintStatsBox: ; 12ae4 (4:6ae4)
pop hl
pop bc
add hl, bc
- ld de, wcfbc
+ ld de, wLoadedMonAttack
ld bc, $0203 ; three digits
call PrintStat
- ld de, wcfbe
+ ld de, wLoadedMonDefense
call PrintStat
- ld de, wcfc0
+ ld de, wLoadedMonSpeed
call PrintStat
- ld de, wcfc2
+ ld de, wLoadedMonSpecial
jp PrintNumber
PrintStat
push hl
@@ -235,7 +235,7 @@ StatusScreen2: ; 12b57 (4:6b57)
ld bc, $0005
ld hl, wd0dc
call FillMemory
- ld hl, wcfa0
+ ld hl, wLoadedMonMoves
ld de, wd0dc
ld bc, $0004
call CopyData
@@ -269,7 +269,7 @@ StatusScreen2: ; 12b57 (4:6b57)
ld a, "-"
call Func_12ccb ; Fill the rest with --
.InitPP ; 12bbb
- ld hl, wcfa0
+ ld hl, wLoadedMonMoves
deCoord 14, 10
ld b, $0
.PrintPP ; 12bc3
@@ -323,12 +323,12 @@ StatusScreen2: ; 12b57 (4:6b57)
hlCoord 9, 3
ld de, EXPPointsText
call PlaceString
- ld a, [wcfb9] ; level
+ ld a, [wLoadedMonLevel] ; level
push af
cp MAX_LEVEL
jr z, .Level100 ; 0x12c20 $4
inc a
- ld [wcfb9], a ; Increase temporarily if not 100
+ ld [wLoadedMonLevel], a ; Increase temporarily if not 100
.Level100
hlCoord 14, 6
ld [hl], $70 ; 1-tile "to"
@@ -336,13 +336,13 @@ StatusScreen2: ; 12b57 (4:6b57)
inc hl
call PrintLevel
pop af
- ld [wcfb9], a
- ld de, wcfa6
+ ld [wLoadedMonLevel], a
+ ld de, wLoadedMonExp
hlCoord 12, 4
ld bc, $0307
call PrintNumber ; exp
call .asm_12c86
- ld de, wcfa6
+ ld de, wLoadedMonExp
hlCoord 7, 6
ld bc, $0307
call PrintNumber
@@ -368,13 +368,13 @@ StatusScreen2: ; 12b57 (4:6b57)
call GBPalWhiteOut
jp ClearScreen
.asm_12c86 ; This does some magic with lvl/exp?
- ld a, [wcfb9] ; Load level
+ ld a, [wLoadedMonLevel] ; Load level
cp MAX_LEVEL
jr z, .asm_12ca7 ; 0x12c8b $1a ; If 100
inc a
ld d, a
callab CalcExperience
- ld hl, wcfa8
+ ld hl, wLoadedMonExp + 2
ld a, [$ff98]
sub [hl]
ld [hld], a
@@ -386,7 +386,7 @@ StatusScreen2: ; 12b57 (4:6b57)
ld [hld], a
ret
.asm_12ca7
- ld hl, wcfa6
+ ld hl, wLoadedMonExp
xor a
ld [hli], a
ld [hli], a
diff --git a/engine/overworld/map_sprites.asm b/engine/overworld/map_sprites.asm
index 81443c9f..16403759 100755
--- a/engine/overworld/map_sprites.asm
+++ b/engine/overworld/map_sprites.asm
@@ -159,7 +159,7 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871)
ld l,e
pop de
ld b,a
- ld a,[wcfc4]
+ ld a,[wCharRAMInUseForText]
bit 0,a ; reloading upper half of tile patterns after displaying text?
jr nz,.skipFirstLoad ; if so, skip loading data into the lower half
ld a,b
@@ -180,7 +180,7 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871)
jr nc,.noCarry3
inc d
.noCarry3
- ld a,[wcfc4]
+ ld a,[wCharRAMInUseForText]
bit 0,a ; reloading upper half of tile patterns after displaying text?
jr nz,.loadWhileLCDOn
pop af
@@ -264,7 +264,7 @@ InitOutsideMapSprites: ; 1797b (5:797b)
cp a,$f0 ; does the map have 2 sprite sets?
call nc,GetSplitMapSpriteSetID ; if so, choose the appropriate one
ld b,a ; b = spriteSetID
- ld a,[wcfc4]
+ ld a,[wCharRAMInUseForText]
bit 0,a ; reloading upper half of tile patterns after displaying text?
jr nz,.loadSpriteSet ; if so, forcibly reload the sprite set
ld a,[W_SPRITESETID]
diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm
index 3b9cac7d..1658b0e9 100644
--- a/engine/overworld/movement.asm
+++ b/engine/overworld/movement.asm
@@ -52,7 +52,7 @@ UpdatePlayerSprite: ; 4e31 (1:4e31)
jr .asm_4eab
.asm_4e86
ld [wSpriteStateData1 + 9], a
- ld a, [wcfc4]
+ ld a, [wCharRAMInUseForText]
bit 0, a
jr nz, .asm_4e7d
.asm_4e90
@@ -130,7 +130,7 @@ Func_4ed1: ; 4ed1 (1:4ed1)
bit 7, a
jp nz, InitializeSpriteFacingDirection ; c1x1 >= $80
ld b, a
- ld a, [wcfc4]
+ ld a, [wCharRAMInUseForText]
bit 0, a
jp nz, notYetMoving
ld a, b
diff --git a/engine/overworld/pokemart.asm b/engine/overworld/pokemart.asm
index 4bc4c341..8325b93f 100755
--- a/engine/overworld/pokemart.asm
+++ b/engine/overworld/pokemart.asm
@@ -50,9 +50,9 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20)
call DisplayTextBoxID ; draw money text box
ld hl,wNumBagItems
ld a,l
- ld [wcf8b],a
+ ld [wList],a
ld a,h
- ld [wcf8c],a
+ ld [wList + 1],a
xor a
ld [wcf93],a
ld [wCurrentMenuItem],a
@@ -124,9 +124,9 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20)
call DisplayTextBoxID ; draw money text box
ld hl,wStringBuffer2 + 11
ld a,l
- ld [wcf8b],a
+ ld [wList],a
ld a,h
- ld [wcf8c],a
+ ld [wList + 1],a
xor a
ld [wCurrentMenuItem],a
inc a
diff --git a/engine/predefs7.asm b/engine/predefs7.asm
index b6c3bbbc..e2f58ca8 100755
--- a/engine/predefs7.asm
+++ b/engine/predefs7.asm
@@ -3,9 +3,9 @@ Func_1c9c6: ; 1c9c6 (7:49c6)
call PrintText
ld hl, wStringBuffer2 + 11
ld a, l
- ld [wcf8b], a
+ ld [wList], a
ld a, h
- ld [wcf8c], a
+ ld [wList + 1], a
ld a, [wListScrollOffset] ; wcc36
push af
xor a