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

@ -1,7 +1,7 @@
DrawAllPokeballs: ; 3a849 (e:6849)
call LoadPartyPokeballGfx
call SetupOwnPartyPokeballs
ld a, [W_ISINBATTLE] ; W_ISINBATTLE
ld a, [W_ISINBATTLE]
dec a
ret z ; return if wild pokémon
jp SetupEnemyPartyPokeballs
@ -11,7 +11,7 @@ DrawEnemyPokeballs: ; 0x3a857
jp SetupEnemyPartyPokeballs
LoadPartyPokeballGfx: ; 3a85d (e:685d)
ld de, PokeballTileGraphics ; $697e
ld de, PokeballTileGraphics
ld hl, vSprites + $310
ld bc, (BANK(PokeballTileGraphics) << 8) + $04
jp CopyVideoData
@ -19,10 +19,10 @@ LoadPartyPokeballGfx: ; 3a85d (e:685d)
SetupOwnPartyPokeballs: ; 3a869 (e:6869)
call PlacePlayerHUDTiles
ld hl, wPartyMon1
ld de, wPartyCount ; wPartyCount
ld de, wPartyCount
call SetupPokeballs
ld a, $60
ld hl, W_BASECOORDX ; wd081
ld hl, W_BASECOORDX
ld [hli], a
ld [hl], a
ld a, $8
@ -33,9 +33,9 @@ SetupOwnPartyPokeballs: ; 3a869 (e:6869)
SetupEnemyPartyPokeballs: ; 3a887 (e:6887)
call PlaceEnemyHUDTiles
ld hl, wEnemyMons
ld de, wEnemyPartyCount ; wEnemyPartyCount
ld de, wEnemyPartyCount
call SetupPokeballs
ld hl, W_BASECOORDX ; wd081
ld hl, W_BASECOORDX
ld a, $48
ld [hli], a
ld [hl], $20
@ -98,31 +98,31 @@ WritePokeballOAMData: ; 3a8e1 (e:68e1)
ld de, wBuffer
ld c, PARTY_LENGTH
.loop
ld a, [W_BASECOORDY] ; wd082
ld a, [W_BASECOORDY]
ld [hli], a
ld a, [W_BASECOORDX] ; wd081
ld a, [W_BASECOORDX]
ld [hli], a
ld a, [de]
ld [hli], a
xor a
ld [hli], a
ld a, [W_BASECOORDX] ; wd081
ld a, [W_BASECOORDX]
ld b, a
ld a, [wTrainerEngageDistance]
add b
ld [W_BASECOORDX], a ; wd081
ld [W_BASECOORDX], a
inc de
dec c
jr nz, .loop
ret
PlacePlayerHUDTiles: ; 3a902 (e:6902)
ld hl, PlayerBattleHUDGraphicsTiles ; $6916
ld hl, PlayerBattleHUDGraphicsTiles
ld de, wTrainerFacingDirection
ld bc, $3
call CopyData
hlCoord 18, 10
ld de, rIE ; $ffff
ld de, rIE
jr PlaceHUDTiles
PlayerBattleHUDGraphicsTiles: ; 3a916 (e:6916)
@ -132,7 +132,7 @@ PlayerBattleHUDGraphicsTiles: ; 3a916 (e:6916)
db $6F ; lower-left triangle tile of the HUD
PlaceEnemyHUDTiles: ; 3a919 (e:6919)
ld hl, EnemyBattleHUDGraphicsTiles ; $692d
ld hl, EnemyBattleHUDGraphicsTiles
ld de, wTrainerFacingDirection
ld bc, $3
call CopyData
@ -165,10 +165,10 @@ PlaceHUDTiles: ; 3a930 (e:6930)
SetupPlayerAndEnemyPokeballs: ; 3a948 (e:6948)
call LoadPartyPokeballGfx
ld hl, wPartyMon1Species ; wPartyMon1Species (aliases: wPartyMon1)
ld de, wPartyCount ; wPartyCount
ld hl, wPartyMons
ld de, wPartyCount
call SetupPokeballs
ld hl, W_BASECOORDX ; wd081
ld hl, W_BASECOORDX
ld a, $50
ld [hli], a
ld [hl], $40
@ -176,10 +176,10 @@ SetupPlayerAndEnemyPokeballs: ; 3a948 (e:6948)
ld [wTrainerEngageDistance], a
ld hl, wOAMBuffer
call WritePokeballOAMData
ld hl, wEnemyMons ; wEnemyMon1Species
ld de, wEnemyPartyCount ; wEnemyPartyCount
ld hl, wEnemyMons
ld de, wEnemyPartyCount
call SetupPokeballs
ld hl, W_BASECOORDX ; wd081
ld hl, W_BASECOORDX
ld a, $50
ld [hli], a
ld [hl], $68