Rename/organize part 1 of 4

rename functions, clean up address/wram comments, other misc
only broken up so that all changes are viewable on github
This commit is contained in:
U-Daniel-PC\Daniel 2015-07-03 14:37:53 -05:00
parent ae420a4d8f
commit cd649184f5
90 changed files with 1070 additions and 1066 deletions

View file

@ -357,7 +357,7 @@ BoxNoPCText: ; 21713 (8:5713)
Func_2171b:: ; 2171b (8:571b)
ld hl, wPartyMon1Moves
ld bc, wPartyMon2 - wPartyMon1
jr .asm_21729 ; 0x21721 $6
jr .asm_21729
ld hl, wBoxMon1Moves
ld bc, wBoxMon2 - wBoxMon1
.asm_21729
@ -375,7 +375,7 @@ Func_2171b:: ; 2171b (8:571b)
pop hl
ret c
dec b
jr nz, .asm_21731 ; 0x21741 $ee
jr nz, .asm_21731
and a
ret

View file

@ -7,7 +7,7 @@ DisplayDiploma: ; 566e2 (15:66e2)
ld hl, wd730
set 6, [hl]
call DisableLCD
ld hl, CircleTile ; $7d88
ld hl, CircleTile
ld de, vChars2 + $700
ld bc, $0010
ld a, BANK(CircleTile)
@ -15,7 +15,7 @@ DisplayDiploma: ; 566e2 (15:66e2)
ld hl, wTileMap
ld bc, $1012
predef Diploma_TextBoxBorder
ld hl, DiplomaTextPointersAndCoords ; $6784
ld hl, DiplomaTextPointersAndCoords
ld c, $5
.asm_56715
push bc
@ -32,7 +32,7 @@ DisplayDiploma: ; 566e2 (15:66e2)
inc hl
pop bc
dec c
jr nz, .asm_56715 ; 0x56725 $ee
jr nz, .asm_56715
hlCoord 10, 4
ld de, wPlayerName
call PlaceString
@ -48,7 +48,7 @@ DisplayDiploma: ; 566e2 (15:66e2)
ld [hli], a
inc hl
dec c
jr nz, .asm_5673e ; 0x56747 $f5
jr nz, .asm_5673e
call EnableLCD
callba LoadTrainerInfoTextBoxTiles
ld b, $8
@ -73,7 +73,7 @@ Func_56777: ; 56777 (15:6777)
cp $50
ret z
dec c
jr .asm_5677d ; 0x56782 $f9
jr .asm_5677d
DiplomaTextPointersAndCoords: ; 56784 (15:6784)
dw DiplomaText

View file

@ -52,7 +52,7 @@ MainMenu: ; 5af2 (1:5af2)
.next2
ld hl,wd730
res 6,[hl]
call UpdateSprites ; OAM?
call UpdateSprites
xor a
ld [wCurrentMenuItem],a
ld [wLastMenuItem],a
@ -208,7 +208,7 @@ LinkMenu: ; 5c0a (1:5c0a)
ld a, b
ld [wLinkMenuSelectionSendBuffer], a
and $3
ld [wCurrentMenuItem], a ; wCurrentMenuItem
ld [wCurrentMenuItem], a
.doneChoosingMenuSelection
ld a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
@ -261,14 +261,14 @@ LinkMenu: ; 5c0a (1:5c0a)
ld [wd72d], a
ld hl, PleaseWaitText
call PrintText
ld c, $32
ld c, 50
call DelayFrames
ld hl, wd732
res 1, [hl]
ld a, [W_ANIMATIONID]
ld [wDestinationMap], a
call SpecialWarpIn
ld c, $14
ld c, 20
call DelayFrames
xor a
ld [wMenuJoypadPollCount], a
@ -304,7 +304,7 @@ Func_5d52: ; 5d52 (1:5d52)
ld hl, wd732
res 1, [hl]
call OakSpeech
ld c, $14
ld c, 20
call DelayFrames
; enter map after using a special warp or loading the game from the main menu
@ -338,7 +338,7 @@ TradeCenterText: ; 5d97 (1:5d97)
ContinueGame: ; 5db5 (1:5db5)
xor a
ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
ld [H_AUTOBGTRANSFERENABLED], a
hlCoord 4, 7
ld b, $8
ld c, $e
@ -347,7 +347,7 @@ ContinueGame: ; 5db5 (1:5db5)
ld de, SaveScreenInfoText
call PlaceString
hlCoord 12, 9
ld de, wPlayerName ; wd158
ld de, wPlayerName
call PlaceString
hlCoord 17, 11
call Func_5e2f
@ -356,8 +356,8 @@ ContinueGame: ; 5db5 (1:5db5)
hlCoord 13, 15
call Func_5e55
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
ld c, $1e
ld [H_AUTOBGTRANSFERENABLED], a
ld c, 30
jp DelayFrames
PrintSaveScreenText: ; 5def (1:5def)
@ -383,7 +383,7 @@ PrintSaveScreenText: ; 5def (1:5def)
call Func_5e55
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a
ld c, $1e
ld c, 30
jp DelayFrames
Func_5e2f: ; 5e2f (1:5e2f)
@ -398,7 +398,7 @@ Func_5e2f: ; 5e2f (1:5e2f)
Func_5e42: ; 5e42 (1:5e42)
push hl
ld hl, wPokedexOwned ; wPokedexOwned
ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned
call CountSetBits
pop hl
@ -481,7 +481,7 @@ DisplayOptionMenu: ; 5e8a (1:5e8a)
jr nz,.loop
.exitMenu
ld a,(SFX_02_40 - SFX_Headers_02) / 3
call PlaySound ; play sound
call PlaySound
ret
.eraseOldMenuCursor
ld [wTopMenuItemX],a

View file

@ -195,7 +195,7 @@ DisplayNamingScreen: ; 6596 (1:6596)
.asm_667e
pop de
ld de, .asm_65ed ; $65ed
ld de, .asm_65ed
push de
.asm_6683
ld a, [wHPBarOldHP]
@ -231,10 +231,10 @@ DisplayNamingScreen: ; 6596 (1:6596)
call CalcStringLength
ld a, [wHPBarNewHP]
cp $e5
ld de, Dakutens ; $6885
ld de, Dakutens
jr z, .asm_66e3
cp $e4
ld de, Handakutens ; $68d6
ld de, Handakutens
jr z, .asm_66e3
ld a, [wd07d]
cp $2
@ -332,12 +332,12 @@ ED_Tile: ; 6767 (1:6767)
PrintAlphabet: ; 676f (1:676f)
xor a
ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
ld [H_AUTOBGTRANSFERENABLED], a
ld a, [wHPBarOldHP]
and a
ld de, LowerCaseAlphabet ; $679e
ld de, LowerCaseAlphabet
jr nz, .asm_677e
ld de, UpperCaseAlphabet ; $67d6
ld de, UpperCaseAlphabet
.asm_677e
hlCoord 2, 5
ld bc, $509
@ -357,7 +357,7 @@ PrintAlphabet: ; 676f (1:676f)
jr nz, .asm_6784
call PlaceString
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
ld [H_AUTOBGTRANSFERENABLED], a
jp Delay3
LowerCaseAlphabet: ; 679e (1:679e)

View file

@ -5,7 +5,7 @@ OpenOaksPC: ; 1e915 (7:6915)
ld hl, GetDexRatedText
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem] ; wCurrentMenuItem
ld a, [wCurrentMenuItem]
and a
jr nz, .asm_1e932
predef DisplayDexRating

View file

@ -21,7 +21,7 @@ DrawPartyMenu_: ; 12cd2 (4:6cd2)
xor a
ld [H_AUTOBGTRANSFERENABLED],a
call ClearScreen
call UpdateSprites ; move sprites
call UpdateSprites
callba LoadMonPartySpriteGfxWithLCDDisabled ; load pokemon icon graphics
RedrawPartyMenu_: ; 12ce3 (4:6ce3)

View file

@ -1,13 +1,13 @@
ActivatePC: ; 17e2c (5:7e2c)
call SaveScreenTilesToBuffer2 ;XXX: copy background from wTileMap to wTileMapBackup2
call SaveScreenTilesToBuffer2
ld a, (SFX_02_45 - SFX_Headers_02) / 3
call PlaySound ;XXX: play sound or stop music
call PlaySound
ld hl, TurnedOnPC1Text
call PrintText
call WaitForSoundToFinish ;XXX: wait for sound to be done
call WaitForSoundToFinish
ld hl, wFlags_0xcd60
set 3, [hl]
call LoadScreenTilesFromBuffer2 ;XXX: restore saved screen
call LoadScreenTilesFromBuffer2
call Delay3
PCMainMenu: ; 17e48 (5:7e48)
callba Func_213c8
@ -52,28 +52,28 @@ PCMainMenu: ; 17e48 (5:7e48)
res 5, [hl]
set 3, [hl]
ld a, (SFX_02_47 - SFX_Headers_02) / 3
call PlaySound ;XXX: play sound or stop music
call WaitForSoundToFinish ;XXX: wait for sound to be done
call PlaySound
call WaitForSoundToFinish
ld hl, AccessedMyPCText
call PrintText
callba PlayerPC
jr ReloadMainMenu
OaksPC: ; 17ec0 (5:7ec0)
ld a, (SFX_02_47 - SFX_Headers_02) / 3
call PlaySound ;XXX: play sound or stop music
call WaitForSoundToFinish ;XXX: wait for sound to be done
call PlaySound
call WaitForSoundToFinish
callba OpenOaksPC
jr ReloadMainMenu
PKMNLeague: ; 17ed2 (5:7ed2)
ld a, (SFX_02_47 - SFX_Headers_02) / 3
call PlaySound ;XXX: play sound or stop music
call WaitForSoundToFinish ;XXX: wait for sound to be done
call PlaySound
call WaitForSoundToFinish
callba PKMNLeaguePC
jr ReloadMainMenu
BillsPC: ; 17ee4 (5:7ee4)
ld a, (SFX_02_47 - SFX_Headers_02) / 3
call PlaySound ;XXX: play sound or stop music
call WaitForSoundToFinish ;XXX: wait for sound to be done
call PlaySound
call WaitForSoundToFinish
ld a, [wd7f1] ;has to do with having met Bill
bit 0, a
jr nz, .billsPC ;if you've met bill, use that bill's instead of someone's
@ -88,12 +88,12 @@ ReloadMainMenu: ; 17f06 (5:7f06)
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
call ReloadMapData
call UpdateSprites ;XXX: moves sprites
call UpdateSprites
jp PCMainMenu
LogOff: ; 17f13 (5:7f13)
ld a, (SFX_02_46 - SFX_Headers_02) / 3
call PlaySound ;XXX: play sound or stop music
call WaitForSoundToFinish ;XXX: wait for sound to be done
call PlaySound
call WaitForSoundToFinish
ld hl, wFlags_0xcd60
res 3, [hl]
res 5, [hl]
@ -117,7 +117,7 @@ AccessedMyPCText: ; 17f32 (5:7f32)
; removes one of the specified item ID [$FFdb] from bag (if existent)
RemoveItemByID: ; 17f37 (5:7f37)
ld hl, wBagItems ; wd31e
ld hl, wBagItems
ld a, [$ffdb]
ld b, a
xor a
@ -137,6 +137,6 @@ RemoveItemByID: ; 17f37 (5:7f37)
ld a, $1
ld [wcf96], a
ld a, [$ffdc]
ld [wWhichPokemon], a ; wWhichPokemon
ld hl, wNumBagItems ; wNumBagItems
ld [wWhichPokemon], a
ld hl, wNumBagItems
jp RemoveItemFromInventory

View file

@ -1,7 +1,7 @@
ShowPokedexMenu: ; 40000 (10:4000)
call GBPalWhiteOut
call ClearScreen
call UpdateSprites ; move sprites
call UpdateSprites
ld a,[wListScrollOffset]
push af
xor a
@ -140,7 +140,7 @@ HandlePokedexSideMenu: ; 4006d (10:406d)
.choseCry
ld a,[wd11e]
call GetCryData ; get cry data
call PlaySound ; play sound
call PlaySound
jr .handleMenuInput
.choseArea
predef LoadTownMap_Nest ; display pokemon areas

View file

@ -79,7 +79,7 @@ GetPrizeMenuId: ; 5278e (14:678e)
inc hl
push hl
ld hl,W_PRIZE1
call CopyString ; XXX what does this do
call CopyString
pop hl
ld a,[hli]
ld h,[hl]
@ -152,7 +152,7 @@ PrintPrizePrice: ; 5287a (14:687a)
ld b,$01
ld c,$07
call TextBoxBorder
call UpdateSprites ; XXX save OAM?
call UpdateSprites
hlCoord 12, 0
ld de,.CoinText
call PlaceString

View file

@ -1,7 +1,7 @@
DisplayStartMenu:: ; 2acd (0:2acd)
ld a,$04 ; hardcoded Bank, not sure what's it refers to
ld a,BANK(StartMenu_Pokedex)
ld [H_LOADEDROMBANK],a
ld [$2000],a ; ROM bank 4
ld [MBC1RomBank],a
ld a,[wWalkBikeSurfState] ; walking/biking/surfing
ld [wWalkBikeSurfStateCopy],a
ld a, (SFX_02_3f - SFX_Headers_02) / 3 ; Start menu sound
@ -10,7 +10,7 @@ DisplayStartMenu:: ; 2acd (0:2acd)
RedisplayStartMenu:: ; 2adf (0:2adf)
callba DrawStartMenu
callba PrintSafariZoneSteps ; print Safari Zone info, if in Safari Zone
call UpdateSprites ; move sprites
call UpdateSprites
.loop
call HandleMenuInput
ld b,a

View file

@ -325,7 +325,7 @@ StartMenu_Item: ; 13302 (4:7302)
.exitMenu
call LoadScreenTilesFromBuffer2 ; restore saved screen
call LoadTextBoxTilePatterns
call UpdateSprites ; move sprites
call UpdateSprites
jp RedisplayStartMenu
.choseItem
; erase menu cursor (blank each tile in front of an item name)
@ -499,7 +499,7 @@ UsableItems_CloseMenu: ; 13459 (4:7459)
StartMenu_TrainerInfo: ; 13460 (4:7460)
call GBPalWhiteOut
call ClearScreen
call UpdateSprites ; move sprites
call UpdateSprites
ld a,[hTilesetType]
push af
xor a
@ -535,25 +535,25 @@ DrawTrainerInfo: ; 1349a (4:749a)
ld de,vChars2
ld bc,$70 * 4
call CopyData
ld hl,TrainerInfoTextBoxTileGraphics ; $7b98 ; trainer info text box tile patterns
ld hl,TrainerInfoTextBoxTileGraphics ; trainer info text box tile patterns
ld de,vChars2 + $770
ld bc,$0080
push bc
call TrainerInfo_FarCopyData
ld hl,BlankLeaderNames ; $7c28
ld hl,BlankLeaderNames
ld de,vChars2 + $600
ld bc,$0170
call TrainerInfo_FarCopyData
pop bc
ld hl,BadgeNumbersTileGraphics ; $7d98 ; badge number tile patterns
ld hl,BadgeNumbersTileGraphics ; badge number tile patterns
ld de,vChars1 + $580
call TrainerInfo_FarCopyData
ld hl,GymLeaderFaceAndBadgeTileGraphics ; $6a9e ; gym leader face and badge tile patterns
ld hl,GymLeaderFaceAndBadgeTileGraphics ; gym leader face and badge tile patterns
ld de,vChars2 + $200
ld bc,$0400
ld a,$03
call FarCopyData2
ld hl,TextBoxGraphics ; $6288
ld hl,TextBoxGraphics
ld de,$00d0
add hl,de ; hl = colon tile pattern
ld de,vChars1 + $560
@ -562,7 +562,7 @@ DrawTrainerInfo: ; 1349a (4:749a)
push bc
call FarCopyData2
pop bc
ld hl,TrainerInfoTextBoxTileGraphics + $80 ; $7c18 ; background tile pattern
ld hl,TrainerInfoTextBoxTileGraphics + $80 ; background tile pattern
ld de,vChars1 + $570
call TrainerInfo_FarCopyData
call EnableLCD
@ -705,9 +705,9 @@ StartMenu_Option: ; 135f6 (4:75f6)
SwitchPartyMon: ; 13613 (4:7613)
call SwitchPartyMon_Stats
ld a, [wWhichTrade] ; wWhichTrade
ld a, [wWhichTrade]
call SwitchPartyMon_OAM
ld a, [wCurrentMenuItem] ; wCurrentMenuItem
ld a, [wCurrentMenuItem]
call SwitchPartyMon_OAM
jp RedrawPartyMenu_
@ -741,7 +741,7 @@ SwitchPartyMon_Stats: ; 13653 (4:7653)
ld a, [wMenuItemToSwap]
and a
jr nz, .asm_13661
ld a, [wWhichPokemon] ; wWhichPokemon
ld a, [wWhichPokemon]
inc a
ld [wMenuItemToSwap], a
ret
@ -751,8 +751,8 @@ SwitchPartyMon_Stats: ; 13653 (4:7653)
ld a, [wMenuItemToSwap]
dec a
ld b, a
ld a, [wCurrentMenuItem] ; wCurrentMenuItem
ld [wWhichTrade], a ; wWhichTrade
ld a, [wCurrentMenuItem]
ld [wWhichTrade], a
cp b
jr nz, .asm_1367b
xor a
@ -767,7 +767,7 @@ SwitchPartyMon_Stats: ; 13653 (4:7653)
ld hl, wPartySpecies
ld d, h
ld e, l
ld a, [wCurrentMenuItem] ; wCurrentMenuItem
ld a, [wCurrentMenuItem]
add l
ld l, a
jr nc, .asm_1368e
@ -780,14 +780,14 @@ SwitchPartyMon_Stats: ; 13653 (4:7653)
inc d
.asm_13696
ld a, [hl]
ld [H_DIVIDEND], a ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
ld [H_DIVIDEND], a ; (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
ld a, [de]
ld [hl], a
ld a, [H_DIVIDEND] ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
ld a, [H_DIVIDEND] ; (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
ld [de], a
ld hl, wPartyMons
ld bc, wPartyMon2 - wPartyMon1
ld a, [wCurrentMenuItem] ; wCurrentMenuItem
ld a, [wCurrentMenuItem]
call AddNTimes
push hl
ld de, wSwitchPartyMonTempBuffer
@ -805,14 +805,14 @@ SwitchPartyMon_Stats: ; 13653 (4:7653)
ld hl, wSwitchPartyMonTempBuffer
ld bc, $2c
call CopyData
ld hl, wPartyMonOT ; wd273
ld a, [wCurrentMenuItem] ; wCurrentMenuItem
ld hl, wPartyMonOT
ld a, [wCurrentMenuItem]
call SkipFixedLengthTextEntries
push hl
ld de, wSwitchPartyMonTempBuffer
ld bc, $b
call CopyData
ld hl, wPartyMonOT ; wd273
ld hl, wPartyMonOT
ld a, [wMenuItemToSwap]
call SkipFixedLengthTextEntries
pop de
@ -823,14 +823,14 @@ SwitchPartyMon_Stats: ; 13653 (4:7653)
ld hl, wSwitchPartyMonTempBuffer
ld bc, $b
call CopyData
ld hl, wPartyMonNicks ; wPartyMonNicks
ld a, [wCurrentMenuItem] ; wCurrentMenuItem
ld hl, wPartyMonNicks
ld a, [wCurrentMenuItem]
call SkipFixedLengthTextEntries
push hl
ld de, wSwitchPartyMonTempBuffer
ld bc, $b
call CopyData
ld hl, wPartyMonNicks ; wPartyMonNicks
ld hl, wPartyMonNicks
ld a, [wMenuItemToSwap]
call SkipFixedLengthTextEntries
pop de
@ -842,7 +842,7 @@ SwitchPartyMon_Stats: ; 13653 (4:7653)
ld bc, $b
call CopyData
ld a, [wMenuItemToSwap]
ld [wWhichTrade], a ; wWhichTrade
ld [wWhichTrade], a
xor a
ld [wMenuItemToSwap], a
ld [wd07d], a

View file

@ -67,7 +67,7 @@ StatusScreen: ; 12953 (4:6953)
call LoadMonData
ld a, [wcc49]
cp $2 ; 2 means we're in a PC box
jr c, .DontRecalculate ; 0x1295b $14
jr c, .DontRecalculate
ld a, [wLoadedMonBoxLevel]
ld [wLoadedMonLevel], a
ld [W_CURENEMYLVL], a
@ -82,17 +82,17 @@ StatusScreen: ; 12953 (4:6953)
ld [$ff24], a ; Reduce the volume
call GBPalWhiteOutWithDelay3
call ClearScreen
call UpdateSprites ; move sprites (?)
call UpdateSprites
call LoadHpBarAndStatusTilePatterns
ld de, BattleHudTiles1 ; $6080 ; source
ld de, BattleHudTiles1 ; source
ld hl, vChars2 + $6d0 ; dest
ld bc, (BANK(BattleHudTiles1) << 8) + $03 ; bank bytes/8
call CopyVideoDataDouble ; ·│ :L and halfarrow line end
ld de, BattleHudTiles2 ; $6098
ld de, BattleHudTiles2
ld hl, vChars2 + $780
ld bc, (BANK(BattleHudTiles2) << 8) + $01
call CopyVideoDataDouble ; │
ld de, BattleHudTiles3 ; $60b0
ld de, BattleHudTiles3
ld hl, vChars2 + $760
ld bc, (BANK(BattleHudTiles3) << 8) + $02
call CopyVideoDataDouble ; ─┘
@ -127,7 +127,7 @@ StatusScreen: ; 12953 (4:6953)
hlCoord 16, 6
ld de, wLoadedMonStatus
call PrintStatusCondition
jr nz, .StatusWritten ; 0x129fc $9
jr nz, .StatusWritten
hlCoord 16, 6
ld de, OKText
call PlaceString ; "OK"
@ -147,14 +147,14 @@ StatusScreen: ; 12953 (4:6953)
call PrintNumber ; Pokémon no.
hlCoord 11, 10
predef PrintMonType
ld hl, NamePointers2 ; $6a9d
call .unk_12a7e
ld hl, NamePointers2
call .asm_12a7e
ld d, h
ld e, l
hlCoord 9, 1
call PlaceString ; Pokémon name
ld hl, OTPointers ; $6a95
call .unk_12a7e
ld hl, OTPointers
call .asm_12a7e
ld d, h
ld e, l
hlCoord 12, 16
@ -175,7 +175,7 @@ StatusScreen: ; 12953 (4:6953)
pop af
ld [hTilesetType], a
ret
.unk_12a7e ; 0x12a7e ; I don't know what this does, iterates over pointers?
.asm_12a7e ; I don't know what this does, iterates over pointers?
ld a, [wcc49]
add a
ld c, a
@ -221,20 +221,20 @@ OKText: ; 12ac4 (4:6ac4)
db "OK@"
; Draws a line starting from hl high b and wide c
DrawLineBox ; 0x12ac7
DrawLineBox: ; 0x12ac7
ld de, $0014 ; New line
.PrintVerticalLine
ld [hl], $78 ; │
add hl, de
dec b
jr nz, .PrintVerticalLine ; 0x12ace $fa
jr nz, .PrintVerticalLine
ld [hl], $77 ; ┘
dec hl
.PrintHorizLine
ld [hl], $76 ; ─
dec hl
dec c
jr nz, .PrintHorizLine ; 0x12ad7 $fa
jr nz, .PrintHorizLine
ld [hl], $6f ; ← (halfarrow ending)
ret
@ -244,14 +244,14 @@ PTile: ; 12adc (4:6adc) ; This is a single 1bpp "P" tile
PrintStatsBox: ; 12ae4 (4:6ae4)
ld a, d
and a ; a is 0 from the status screen
jr nz, .DifferentBox ; 0x12ae6 $12
jr nz, .DifferentBox
hlCoord 0, 8
ld b, $8
ld c, $8
call TextBoxBorder ; Draws the box
hlCoord 1, 9 ; Start printing stats from here
ld bc, $0019 ; Number offset
jr .PrintStats ; 0x12af8 $10
jr .PrintStats
.DifferentBox
hlCoord 9, 2
ld b, $8
@ -328,7 +328,7 @@ StatusScreen2: ; 12b57 (4:6b57)
call Func_12ccb ; Print "PP"
ld a, b
and a
jr z, .InitPP ; 0x12bb3 $6
jr z, .InitPP
ld c, a
ld a, "-"
call Func_12ccb ; Fill the rest with --
@ -339,7 +339,7 @@ StatusScreen2: ; 12b57 (4:6b57)
.PrintPP ; 12bc3
ld a, [hli]
and a
jr z, .PPDone ; 0x12bc5 $4a
jr z, .PPDone
push bc
push hl
push de
@ -382,7 +382,7 @@ StatusScreen2: ; 12b57 (4:6b57)
inc b
ld a, b
cp $4
jr nz, .PrintPP ; 0x12c0f $b2
jr nz, .PrintPP
.PPDone
hlCoord 9, 3
ld de, EXPPointsText
@ -390,7 +390,7 @@ StatusScreen2: ; 12b57 (4:6b57)
ld a, [wLoadedMonLevel] ; level
push af
cp MAX_LEVEL
jr z, .Level100 ; 0x12c20 $4
jr z, .Level100
inc a
ld [wLoadedMonLevel], a ; Increase temporarily if not 100
.Level100
@ -434,7 +434,7 @@ StatusScreen2: ; 12b57 (4:6b57)
.asm_12c86 ; This does some magic with lvl/exp?
ld a, [wLoadedMonLevel] ; Load level
cp MAX_LEVEL
jr z, .asm_12ca7 ; 0x12c8b $1a ; If 100
jr z, .asm_12ca7 ; If 100
inc a
ld d, a
callab CalcExperience

View file

@ -52,9 +52,9 @@ VendingMachineMenu: ; 74ee0 (1d:4ee0)
ld c, 1
call GiveItem
jr nc, .BagFull
ld b, $3c ; number of times to play the "brrrrr" sound
.playDeliverySound ; 0x74f63
ld c, $2
ld b, 60 ; number of times to play the "brrrrr" sound
.playDeliverySound
ld c, 2
call DelayFrames
push bc
ld a, (SFX_02_53 - SFX_Headers_02) / 3