named more variables

This commit is contained in:
YamaArashi 2015-08-12 22:14:31 -07:00
parent 64cfbcce7a
commit 132d036752
33 changed files with 185 additions and 142 deletions

View file

@ -76,11 +76,11 @@ GainExperience: ; 5524f (15:524f)
ld b, [hl]
ld a, [wPlayerID + 1]
cp b
ld a, $0
ld a, 0
jr z, .next
.tradedMon
call BoostExp ; traded mon exp boost
ld a, $1
ld a, 1
.next
ld [wGainBoostedExp], a
ld a, [W_ISINBATTLE]
@ -92,12 +92,12 @@ GainExperience: ; 5524f (15:524f)
; add the gained exp to the party mon's exp
ld b, [hl]
ld a, [H_QUOTIENT + 3]
ld [wcf4c], a
ld [wExpAmountGained + 1], a
add b
ld [hld], a
ld b, [hl]
ld a, [H_QUOTIENT + 2]
ld [wcf4b], a
ld [wExpAmountGained], a
adc b
ld [hl], a
jr nc, .noCarry

View file

@ -836,7 +836,7 @@ TradeCenter_Trade:
call ClearScreen
call LoadHpBarAndStatusTilePatterns
xor a
ld [wcc5b], a
ld [wUnusedCC5B], a
ld a, [hSerialConnectionStatus]
cp USING_EXTERNAL_CLOCK
jr z, .usingExternalClock

View file

@ -3,7 +3,7 @@ AbleToPlaySlotsCheck: ; 2ff09 (b:7f09)
and $8
jr z, .done ; not able
ld b, COIN_CASE
predef IsItemInBag_ ; IsItemInBag_
predef GetQuantityOfItemInBag
ld a, b
and a
ld b, (GameCornerCoinCaseText_id - TextPredefs) / 2 + 1

View file

@ -243,7 +243,7 @@ HoFDisplayPlayerStats: ; 70377 (1c:4377)
call HoFPrintTextAndDelay
ld hl, DexRatingText
call HoFPrintTextAndDelay
ld hl, wcc5d
ld hl, wDexRatingText
HoFPrintTextAndDelay: ; 703e2 (1c:43e2)
call PrintText

View file

@ -1324,7 +1324,7 @@ ItemUseRock: ; df67 (3:5f67)
BaitRockCommon: ; df7f (3:5f7f)
ld [W_ANIMATIONID],a
xor a
ld [wcc5b],a
ld [wAnimationType],a
ld [H_WHOSETURN],a
ld [de],a ; zero escape factor (for bait), zero bait factor (for rock)
.randomLoop ; loop until a random number less than 5 is generated

View file

@ -150,7 +150,7 @@ LinkMenu: ; 5c0a (1:5c0a)
ld de, CableClubOptionsText
call PlaceString
xor a
ld [wcd37], a
ld [wUnusedCD37], a
ld [wd72d], a
ld hl, wTopMenuItemY
ld a, $7

View file

@ -13,7 +13,7 @@ AnimatePartyMon: ; 716ff (1c:56ff)
ld hl, wPartyMenuHPBarColors
ld a, [wCurrentMenuItem]
ld c, a
ld b, $0
ld b, 0
add hl, bc
ld a, [hl]
@ -42,7 +42,7 @@ GetAnimationSpeed: ; 7170a (1c:570a)
jp DelayFrame
.resetSprites
push bc
ld hl, wcc5b
ld hl, wMonPartySpritesSavedOAM
ld de, wOAMBuffer
ld bc, $60
call CopyData
@ -86,7 +86,7 @@ GetAnimationSpeed: ; 7170a (1c:570a)
; that each frame lasts for green HP, yellow HP, and red HP in order.
; On the naming screen, the yellow HP speed is always used.
PartyMonSpeeds: ; 71769 (1c:5769)
db $05,$10,$20
db 5, 16, 32
LoadMonPartySpriteGfx: ; 7176c (1c:576c)
; Load mon party sprite tile patterns into VRAM during V-blank.
@ -372,7 +372,7 @@ UnusedPartyMonSpriteFunction: ; 71890 (1c:5890)
WriteMonPartySpriteOAM: ; 718c3 (1c:58c3)
; Write the OAM blocks for the first animation frame into the OAM buffer and
; make a copy at wcc5b.
; make a copy at wMonPartySpritesSavedOAM.
push af
ld c, $10
ld h, wOAMBuffer / $100
@ -392,7 +392,7 @@ WriteMonPartySpriteOAM: ; 718c3 (1c:58c3)
; we can flip back to it from the second frame by copying it back.
.makeCopy
ld hl, wOAMBuffer
ld de, wcc5b
ld de, wMonPartySpritesSavedOAM
ld bc, $60
jp CopyData

View file

@ -5,14 +5,14 @@ GiveFossilToCinnabarLab: ; 61006 (18:5006)
ld [wCurrentMenuItem], a
ld a, A_BUTTON | B_BUTTON
ld [wMenuWatchedKeys], a
ld a, [wcd37]
ld a, [wFilteredBagItemsCount]
dec a
ld [wMaxMenuItem], a
ld a, 2
ld [wTopMenuItemY], a
ld a, 1
ld [wTopMenuItemX], a
ld a, [wcd37]
ld a, [wFilteredBagItemsCount]
dec a
ld bc, 2
ld hl, 3
@ -29,9 +29,9 @@ GiveFossilToCinnabarLab: ; 61006 (18:5006)
call HandleMenuInput
bit 1, a ; pressed B?
jr nz, .cancelledGivingFossil
ld hl, wcc5b
ld hl, wFilteredBagItems
ld a, [wCurrentMenuItem]
ld d, $0
ld d, 0
ld e, a
add hl, de
ld a, [hl]
@ -90,9 +90,9 @@ LabFossil_610bd: ; 610bd (18:50bd)
PrintFossilsInBag: ; 610c2 (18:50c2)
; Prints each fossil in the player's bag on a separate line in the menu.
ld hl, wcc5b
ld hl, wFilteredBagItems
xor a
ld [hFossilCounter], a
ld [hItemCounter], a
.loop
ld a, [hli]
cp $ff
@ -101,12 +101,12 @@ PrintFossilsInBag: ; 610c2 (18:50c2)
ld [wd11e], a
call GetItemName
coord hl, 2, 2
ld a, [hFossilCounter]
ld a, [hItemCounter]
ld bc, SCREEN_WIDTH * 2
call AddNTimes
ld de, wcd6d
call PlaceString
ld hl, hFossilCounter
ld hl, hItemCounter
inc [hl]
pop hl
jr .loop

View file

@ -51,7 +51,7 @@ HiddenItemBagFullText: ; 76794 (1d:6794)
HiddenCoins: ; 76799 (1d:6799)
ld b, COIN_CASE
predef IsItemInBag_
predef GetQuantityOfItemInBag
ld a, b
and a
ret z

View file

@ -18,7 +18,7 @@ OaksAideScript: ; 0x59035
.giveItem
ld hl, OaksAideHereYouGoText
call PrintText
ld a, [hOaksAideItemReward]
ld a, [hOaksAideRewardItem]
ld b, a
ld c, 1
call GiveItem

View file

@ -33,7 +33,7 @@ DisplayDexRating: ; 44169 (11:4169)
callba PlayPokedexRatingSfx
jp WaitForTextScrollButtonPress
.hallOfFame
ld de, wcc5b
ld de, wDexRatingNumMonsSeen
ld a, [hDexRatingNumMonsSeen]
ld [de], a
inc de

View file

@ -80,7 +80,7 @@ PredefPointers:: ; 4fe79 (13:7e79)
add_predef LoadTilesetHeader
add_predef LearnMoveFromLevelUp
add_predef LearnMove
add_predef IsItemInBag_
add_predef GetQuantityOfItemInBag
dbw $03,CheckForHiddenObjectOrBookshelfOrCardKeyDoor ; for these two, the bank number is actually 0
dbw $03,GiveItem
add_predef ChangeBGPalColor0_4Frames

View file

@ -21,7 +21,7 @@ DisplayElevatorFloorMenu: ; 1c9c6 (7:49c6)
ret c
ld hl, wd126
set 7, [hl]
ld hl, wcc5b
ld hl, wElevatorWarpMaps
ld a, [wWhichPokemon]
add a
ld d, 0

View file

@ -644,7 +644,7 @@ SaveHallOfFameTeams: ; 73b0d (1c:7b0d)
call AddNTimes
ld e, l
ld d, h
ld hl, wcc5b
ld hl, wHallOfFame
ld bc, HOF_TEAM
jr HallOfFame_Copy
@ -653,7 +653,7 @@ SaveHallOfFameTeams: ; 73b0d (1c:7b0d)
ld de, sHallOfFame
ld bc, HOF_TEAM * (HOF_TEAM_CAPACITY - 1)
call HallOfFame_Copy
ld hl, wcc5b
ld hl, wHallOfFame
ld de, sHallOfFame + HOF_TEAM * (HOF_TEAM_CAPACITY - 1)
ld bc, HOF_TEAM
jr HallOfFame_Copy
@ -663,7 +663,7 @@ LoadHallOfFameTeams: ; 73b3f (1c:7b3f)
ld bc, HOF_TEAM
ld a, [wHoFTeamIndex]
call AddNTimes
ld de, wcc5b
ld de, wHallOfFame
ld bc, HOF_TEAM
; fallthrough

View file

@ -215,7 +215,7 @@ ENDC
ld [wNewSoundID], a
call PlaySound
xor a
ld [wcc5b], a
ld [wUnusedCC5B], a
; Keep scrolling in new mons indefinitely until the user performs input.
.awaitUserInterruptionLoop

View file

@ -849,5 +849,5 @@ TradeforText: ; 41671 (10:5671)
Trade_ShowAnimation: ; 41676 (10:5676)
ld [W_ANIMATIONID], a
xor a
ld [wcc5b], a
ld [wAnimationType], a
predef_jump MoveAnimation