shithub: pokered

Download patch

ref: 32f7cf12de9f841f76a3f2010caf6d7a80d47bcc
parent: 4fd7a42b235b68ffc11d4f02305b695c2ed05549
author: YamaArashi <shadow962@live.com>
date: Sat Feb 7 13:37:40 EST 2015

Named wram symbols

--- a/engine/battle/4.asm
+++ b/engine/battle/4.asm
@@ -26,9 +26,9 @@
 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 @@
 	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 @@
 	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
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -1899,23 +1899,23 @@
 	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 @@
 	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 @@
 	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 @@
 	; 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 @@
 	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 @@
 	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
--- a/engine/battle/e.asm
+++ b/engine/battle/e.asm
@@ -665,18 +665,18 @@
 .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)
--- a/engine/cable_club.asm
+++ b/engine/cable_club.asm
@@ -578,7 +578,7 @@
 
 ReturnToCableClubRoom: ; 577d (1:577d)
 	call GBPalWhiteOutWithDelay3
-	ld hl, wcfc4
+	ld hl, wCharRAMInUseForText
 	ld a, [hl]
 	push af
 	push hl
@@ -808,7 +808,7 @@
 	ld a, c
 	ld bc, wEnemyMon2 - wEnemyMon1
 	call AddNTimes
-	ld de, wcf98
+	ld de, wLoadedMon
 	ld bc, wEnemyMon2 - wEnemyMon1
 	call CopyData
 	call AddEnemyMonToPlayerParty
--- a/engine/evos_moves.asm
+++ b/engine/evos_moves.asm
@@ -88,7 +88,7 @@
 	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 @@
 .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 @@
 	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 @@
 	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,7 +186,7 @@
 	ld a, [hli]
 	ld b, a
 	ld c, [hl]
-	ld hl, wcfbb
+	ld hl, wLoadedMonMaxHP + 1
 	ld a, [hld]
 	sub c
 	ld c, a
@@ -193,7 +193,7 @@
 	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 @@
 	call Evolution_FlagAction
 	pop de
 	pop hl
-	ld a, [wcf98]
+	ld a, [wLoadedMonSpecies]
 	ld [hl], a
 	push hl
 	ld l, e
--- 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 @@
 	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
--- a/engine/menu/bills_pc.asm
+++ b/engine/menu/bills_pc.asm
@@ -325,9 +325,9 @@
 
 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
--- a/engine/menu/party_menu.asm
+++ b/engine/menu/party_menu.asm
@@ -83,7 +83,7 @@
 	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 @@
 	push hl
 	ld hl,EvosMovesPointerTable
 	ld b,0
-	ld a,[wcf98] ; pokemon ID
+	ld a,[wLoadedMonSpecies]
 	dec a
 	add a
 	rl b
--- a/engine/menu/players_pc.asm
+++ b/engine/menu/players_pc.asm
@@ -97,9 +97,9 @@
 	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 @@
 	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 @@
 	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
--- a/engine/menu/start_sub_menus.asm
+++ b/engine/menu/start_sub_menus.asm
@@ -308,10 +308,10 @@
 	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
--- a/engine/menu/status_screen.asm
+++ b/engine/menu/status_screen.asm
@@ -4,11 +4,11 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	ld [hld], a
 	ret
 .asm_12ca7
-	ld hl, wcfa6
+	ld hl, wLoadedMonExp
 	xor a
 	ld [hli], a
 	ld [hli], a
--- a/engine/overworld/map_sprites.asm
+++ b/engine/overworld/map_sprites.asm
@@ -159,7 +159,7 @@
 	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 @@
 	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 @@
 	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]
--- a/engine/overworld/movement.asm
+++ b/engine/overworld/movement.asm
@@ -52,7 +52,7 @@
 	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 @@
 	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
--- a/engine/overworld/pokemart.asm
+++ b/engine/overworld/pokemart.asm
@@ -50,9 +50,9 @@
 	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 @@
 	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
--- a/engine/predefs7.asm
+++ b/engine/predefs7.asm
@@ -3,9 +3,9 @@
 	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
--- a/home.asm
+++ b/home.asm
@@ -239,7 +239,7 @@
 	ret
 
 
-; loads pokemon data from one of multiple sources to wcf98
+; loads pokemon data from one of multiple sources to wLoadedMon
 ; loads base stats to W_MONHDEXNUM
 ; INPUT:
 ; [wWhichPokemon] = index of pokemon within party/box
@@ -250,7 +250,7 @@
 ; 03: daycare
 ; OUTPUT:
 ; [wcf91] = pokemon ID
-; wcf98 = base address of pokemon data
+; wLoadedMon = base address of pokemon data
 ; W_MONHDEXNUM = base address of base stats
 LoadMonData:: ; 1372 (0:1372)
 	ld hl, LoadMonData_
@@ -515,12 +515,12 @@
 ; function to print pokemon level, leaving off the ":L" if the level is at least 100
 ; INPUT:
 ; hl = destination address
-; [wcfb9] = level
+; [wLoadedMonLevel] = level
 PrintLevel:: ; 150b (0:150b)
 	ld a,$6e ; ":L" tile ID
 	ld [hli],a
 	ld c,2 ; number of digits
-	ld a,[wcfb9] ; level
+	ld a,[wLoadedMonLevel] ; level
 	cp a,100
 	jr c,PrintLevelCommon
 ; if level at least 100, write over the ":L" tile
@@ -531,12 +531,12 @@
 ; prints the level without leaving off ":L" regardless of level
 ; INPUT:
 ; hl = destination address
-; [wcfb9] = level
+; [wLoadedMonLevel] = level
 PrintLevelFull:: ; 151b (0:151b)
 	ld a,$6e ; ":L" tile ID
 	ld [hli],a
 	ld c,3 ; number of digits
-	ld a,[wcfb9] ; level
+	ld a,[wLoadedMonLevel] ; level
 
 PrintLevelCommon:: ; 1523 (0:1523)
 	ld [wd11e],a
@@ -1183,7 +1183,7 @@
 	ld [H_LOADEDROMBANK],a
 	ld [$2000],a
 	call InitMapSprites ; reload sprite tile pattern data (since it was partially overwritten by text tile patterns)
-	ld hl,wcfc4
+	ld hl,wCharRAMInUseForText
 	res 0,[hl]
 	ld a,[wd732]
 	bit 3,a ; used fly warp
@@ -1372,7 +1372,7 @@
 
 ; INPUT:
 ; [wListMenuID] = list menu ID
-; [wcf8b] = address of the list (2 bytes)
+; [wList] = address of the list (2 bytes)
 DisplayListMenuID:: ; 2be6 (0:2be6)
 	xor a
 	ld [H_AUTOBGTRANSFERENABLED],a ; disable auto-transfer
@@ -1392,9 +1392,9 @@
 	xor a
 	ld [wMenuItemToSwap],a ; 0 means no item is currently being swapped
 	ld [wd12a],a
-	ld a,[wcf8b]
+	ld a,[wList]
 	ld l,a
-	ld a,[wcf8c]
+	ld a,[wList + 1]
 	ld h,a ; hl = address of the list
 	ld a,[hl]
 	ld [wd12a],a ; [wd12a] = number of list entries
@@ -1485,9 +1485,9 @@
 ; if it's an item menu
 	sla c ; item entries are 2 bytes long, so multiply by 2
 .skipMultiplying
-	ld a,[wcf8b]
+	ld a,[wList]
 	ld l,a
-	ld a,[wcf8c]
+	ld a,[wList + 1]
 	ld h,a
 	inc hl ; hl = beginning of list entries
 	ld b,0
@@ -1516,7 +1516,7 @@
 	jr .storeChosenEntry
 .pokemonList
 	ld hl,wPartyCount
-	ld a,[wcf8b]
+	ld a,[wList]
 	cp l ; is it a list of party pokemon or box pokemon?
 	ld hl,wPartyMonNicks
 	jr z,.getPokemonName
@@ -1707,9 +1707,9 @@
 	ld b,$09
 	ld c,$0e
 	call ClearScreenArea
-	ld a,[wcf8b]
+	ld a,[wList]
 	ld e,a
-	ld a,[wcf8c]
+	ld a,[wList + 1]
 	ld d,a
 	inc de ; de = beginning of list entries
 	ld a,[wListScrollOffset]
@@ -1753,7 +1753,7 @@
 .pokemonPCMenu
 	push hl
 	ld hl,wPartyCount
-	ld a,[wcf8b]
+	ld a,[wList]
 	cp l ; is it a list of party pokemon or box pokemon?
 	ld hl,wPartyMonNicks
 	jr z,.getPokemonName
@@ -1798,7 +1798,7 @@
 	push af
 	push hl
 	ld hl,wPartyCount
-	ld a,[wcf8b]
+	ld a,[wList]
 	cp l ; is it a list of party pokemon or box pokemon?
 	ld a,$00
 	jr z,.next
@@ -1819,8 +1819,8 @@
 	and a ; is it a list of party pokemon or box pokemon?
 	jr z,.skipCopyingLevel
 .copyLevel
-	ld a,[wcf9b]
-	ld [wcfb9],a
+	ld a,[wLoadedMonBoxLevel]
+	ld [wLoadedMonLevel],a
 .skipCopyingLevel
 	pop hl
 	ld bc,$001c
@@ -3335,11 +3335,11 @@
 	ret
 
 GetItemPrice:: ; 37df (0:37df)
-; Stores item's price as BCD in [H_DOWNARROWBLINKCNT1] and [[H_DOWNARROWBLINKCNT2]
+; Stores item's price as BCD at hItemPrice (3 bytes)
 ; Input: [wcf91] = item id
 	ld a, [H_LOADEDROMBANK]
 	push af
-	ld a, [wListMenuID] ; wListMenuID
+	ld a, [wListMenuID]
 	cp MOVESLISTMENU
 	ld a, BANK(ItemPrices)
 	jr nz, .asm_37ed
@@ -3347,7 +3347,7 @@
 .asm_37ed
 	ld [H_LOADEDROMBANK], a
 	ld [$2000], a
-	ld hl, wcf8f
+	ld hl, wItemPrices
 	ld a, [hli]
 	ld h, [hl]
 	ld l, a
@@ -3361,11 +3361,11 @@
 	jr nz, .asm_3802
 	dec hl
 	ld a, [hld]
-	ld [$ff8d], a
+	ld [hItemPrice + 2], a
 	ld a, [hld]
-	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+	ld [hItemPrice + 1], a
 	ld a, [hl]
-	ld [H_DOWNARROWBLINKCNT1], a ; $ff8b
+	ld [hItemPrice], a
 	jr .asm_381c
 .getTMPrice
 	ld a, Bank(GetMachinePrice)
@@ -3373,7 +3373,7 @@
 	ld [$2000], a
 	call GetMachinePrice
 .asm_381c
-	ld de, H_DOWNARROWBLINKCNT1 ; $ff8b
+	ld de, hItemPrice
 	pop af
 	ld [H_LOADEDROMBANK], a
 	ld [$2000], a
@@ -4540,7 +4540,7 @@
 ; Copy the current map's sprites' tile patterns to VRAM again after they have
 ; been overwritten by other tile patterns.
 ReloadMapSpriteTilePatterns:: ; 3e08 (0:3e08)
-	ld hl, wcfc4
+	ld hl, wCharRAMInUseForText
 	ld a, [hl]
 	push af
 	res 0, [hl]
--- a/hram.asm
+++ b/hram.asm
@@ -12,6 +12,8 @@
 
 hBaseTileID EQU $FF8B
 
+hItemPrice EQU $FF8B
+
 ; counters for blinking down arrow
 H_DOWNARROWBLINKCNT1 EQU $FF8B
 H_DOWNARROWBLINKCNT2 EQU $FF8C
@@ -152,6 +154,7 @@
 H_WHOSETURN EQU $FFF3 ; 0 on player’s turn, 1 on enemy’s turn
 
 ; bit 0: draw HP fraction to the right of bar instead of below (for party menu)
+; bit 1: menu is double spaced
 hFlags_0xFFF6 EQU $FFF6
 
 hJoyInput EQU $FFF8
--- a/main.asm
+++ b/main.asm
@@ -85,7 +85,7 @@
 ;  1: enemymon
 ;  2: boxmon
 ;  3: daycaremon
-; Return monster id at wcf91 and its data at wcf98.
+; Return monster id at wcf91 and its data at wLoadedMon.
 ; Also load base stats at W_MONHDEXNUM for convenience.
 
 	ld a, [wDayCareMonSpecies]
@@ -125,7 +125,7 @@
 	call AddNTimes
 
 .copyMonData
-	ld de, wcf98
+	ld de, wLoadedMon
 	ld bc, wPartyMon2 - wPartyMon1
 	jp CopyData
 
@@ -808,7 +808,7 @@
 	cp a,ITEMLISTMENU
 	jp nz,DisplayListMenuIDLoop ; only rearrange item list menus
 	push hl
-	ld hl,wcf8b
+	ld hl,wList
 	ld a,[hli]
 	ld h,[hl]
 	ld l,a
@@ -854,7 +854,7 @@
 	call DelayFrames
 	push hl
 	push de
-	ld hl,wcf8b
+	ld hl,wList
 	ld a,[hli]
 	ld h,[hl]
 	ld l,a
@@ -916,7 +916,7 @@
 	jr .done
 .combineItemSlots
 	ld [hl],a ; put the sum in the second item slot
-	ld hl,wcf8b
+	ld hl,wList
 	ld a,[hli]
 	ld h,[hl]
 	ld l,a
@@ -1022,7 +1022,7 @@
 .drawTextBoxBorder
 	call TextBoxBorder
 .skipDrawingTextBoxBorder
-	ld hl,wcfc4
+	ld hl,wCharRAMInUseForText
 	set 0,[hl]
 	ld hl,wFlags_0xcd60
 	bit 4,[hl]
@@ -3823,8 +3823,8 @@
 	call AddNTimes
 	ld e, l
 	ld d, h
-	ld hl, wcf98
-	call CopyData    ; write new mon's data (from wcf98)
+	ld hl, wLoadedMon
+	call CopyData    ; write new mon's data (from wLoadedMon)
 	ld hl, wPartyMonOT
 	ld a, [wPartyCount]
 	dec a
--- a/scripts/ceruleanhouse2.asm
+++ b/scripts/ceruleanhouse2.asm
@@ -22,9 +22,9 @@
 	call LoadItemList
 	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 [wcf93], a
 	ld [wMenuItemToSwap], a
--- a/wram.asm
+++ b/wram.asm
@@ -786,12 +786,15 @@
 wStringBuffer3:: ; cf81
 	ds 9 + 1
 
-wcf8b:: ds 1
-wcf8c:: ds 1
+wList:: ; cf8b
+	ds 2
+
 wcf8d:: ds 1
 wcf8e:: ds 1
-wcf8f:: ds 1
-wcf90:: ds 1
+
+wItemPrices:: ; cf8f
+	ds 2
+
 wcf91:: ds 1
 
 wWhichPokemon:: ; cf92
@@ -807,25 +810,15 @@
 wcf95:: ds 1
 wcf96:: ds 1
 wcf97:: ds 1
-wcf98:: ds 1
-wcf99:: ds 1
-wcf9a:: ds 1
-wcf9b:: ds 1
-wcf9c:: ds 4
-wcfa0:: ds 4
-wcfa4:: ds 2
-wcfa6:: ds 2
-wcfa8:: ds 7
-wcfaf:: ds 10
-wcfb9:: ds 1
-wcfba:: ds 1
-wcfbb:: ds 1
-wcfbc:: ds 2
-wcfbe:: ds 2
-wcfc0:: ds 2
-wcfc2:: ds 2
 
-wcfc4:: ds 1
+; LoadMonData copies mon data here
+wLoadedMon:: party_struct wLoadedMon ; cf98
+
+wCharRAMInUseForText:: ; cfc4
+; bit 0: the space in VRAM that is used to store walking tile patterns for
+;        the player and NPCs is in use for text tile patterns. this means
+;        that movement must be disabled.
+	ds 1
 
 wWalkCounter:: ; cfc5
 ; walk animation counter