Use "battle_anims" and "sprite_anims" for clarity, not just "anims"

This commit is contained in:
Remy Oukaour
2017-12-26 18:45:04 -05:00
parent b5417fafec
commit 35a3a19fda
132 changed files with 1967 additions and 1969 deletions

View File

@@ -1,3 +0,0 @@
BattleStart_CopyTilemapAtOnce: ; 8cf4f
call CGBOnly_CopyTilemapAtOnce
ret

View File

@@ -1,47 +0,0 @@
CheckBattleScene: ; 4ea44
; Return carry if battle scene is turned off.
ld a, 0
ld hl, wLinkMode
call GetFarWRAMByte
cp LINK_MOBILE
jr z, .mobile
ld a, [Options]
bit BATTLE_SCENE, a
jr nz, .off
and a
ret
.mobile
ld a, [wcd2f]
and a
jr nz, .from_wram
ld a, $4
call GetSRAMBank
ld a, [$a60c]
ld c, a
call CloseSRAM
ld a, c
bit 0, c
jr z, .off
and a
ret
.from_wram
ld a, $5
ld hl, w5_dc00
call GetFarWRAMByte
bit 0, a
jr z, .off
and a
ret
.off
scf
ret

View File

@@ -1,80 +0,0 @@
ConsumeHeldItem: ; 27192
push hl
push de
push bc
ld a, [hBattleTurn]
and a
ld hl, OTPartyMon1Item
ld de, EnemyMonItem
ld a, [CurOTMon]
jr z, .theirturn
ld hl, PartyMon1Item
ld de, BattleMonItem
ld a, [CurBattleMon]
.theirturn
push hl
push af
ld a, [de]
ld b, a
farcall GetItemHeldEffect
ld hl, .ConsumableEffects
.loop
ld a, [hli]
cp b
jr z, .ok
inc a
jr nz, .loop
pop af
pop hl
pop bc
pop de
pop hl
ret
.ok
xor a
ld [de], a
pop af
pop hl
call GetPartyLocation
ld a, [hBattleTurn]
and a
jr nz, .ourturn
ld a, [wBattleMode]
dec a
jr z, .done
.ourturn
ld [hl], $0
.done
pop bc
pop de
pop hl
ret
.ConsumableEffects: ; 271de
; Consumable items?
db HELD_BERRY
db HELD_2
db HELD_5
db HELD_HEAL_POISON
db HELD_HEAL_FREEZE
db HELD_HEAL_BURN
db HELD_HEAL_SLEEP
db HELD_HEAL_PARALYZE
db HELD_HEAL_STATUS
db HELD_30
db HELD_ATTACK_UP
db HELD_DEFENSE_UP
db HELD_SPEED_UP
db HELD_SP_ATTACK_UP
db HELD_SP_DEFENSE_UP
db HELD_ACCURACY_UP
db HELD_EVASION_UP
db HELD_38
db HELD_71
db HELD_ESCAPE
db HELD_CRITICAL_UP
db -1

View File

@@ -1,88 +0,0 @@
GetPokeBallWobble: ; f971 (3:7971)
; Returns whether a Poke Ball will wobble in the catch animation.
; Whether a Pokemon is caught is determined beforehand.
push de
ld a, [rSVBK]
ld d, a
push de
ld a, 1 ; BANK(Buffer2)
ld [rSVBK], a
ld a, [Buffer2]
inc a
ld [Buffer2], a
; Wobble up to 3 times.
cp 3 + 1
jr z, .finished
ld a, [wWildMon]
and a
ld c, 0 ; next
jr nz, .done
ld hl, .WobbleProbabilities
ld a, [Buffer1]
ld b, a
.loop
ld a, [hli]
cp b
jr nc, .checkwobble
inc hl
jr .loop
.checkwobble
ld b, [hl]
call Random
cp b
ld c, 0 ; next
jr c, .done
ld c, 2 ; escaped
jr .done
.finished
ld a, [wWildMon]
and a
ld c, 1 ; caught
jr nz, .done
ld c, 2 ; escaped
.done
pop de
ld e, a
ld a, d
ld [rSVBK], a
ld a, e
pop de
ret
.WobbleProbabilities: ; f9ba
; catch rate, chance of wobbling / 255
; nLeft/255 = (nRight/255) ** 4
db 1, 63
db 2, 75
db 3, 84
db 4, 90
db 5, 95
db 7, 103
db 10, 113
db 15, 126
db 20, 134
db 30, 149
db 40, 160
db 50, 169
db 60, 177
db 80, 191
db 100, 201
db 120, 211
db 140, 220
db 160, 227
db 180, 234
db 200, 240
db 220, 246
db 240, 251
db 254, 253
db 255, 255

View File

@@ -1,4 +0,0 @@
Kurt_SelectQuantity_InterpretJoypad: ; 27a28
call BuySellToss_InterpretJoypad
ld b, a
ret

View File

@@ -1,19 +0,0 @@
_ReturnToBattle_UseBall: ; 2715c
call ClearBGPalettes
call ClearTileMap
ld a, [BattleType]
cp BATTLETYPE_TUTORIAL
jr z, .gettutorialbackpic
farcall GetBattleMonBackpic
jr .continue
.gettutorialbackpic
farcall GetTrainerBackpic
.continue
farcall GetEnemyMonFrontpic
farcall _LoadBattleFontsHPBar
call GetMemSGBLayout
call CloseWindow
call LoadStandardMenuDataHeader
call WaitBGMap
jp SetPalettes

View File

@@ -1,9 +0,0 @@
_UpdateBattleHUDs:
farcall DrawPlayerHUD
ld hl, PlayerHPPal
call SetHPPal
farcall DrawEnemyHUD
ld hl, EnemyHPPal
call SetHPPal
farcall FinishBattleAnim
ret