heavy ball

This commit is contained in:
yenatch 2013-05-27 23:28:21 -04:00
parent 122e243624
commit eb75c58023
2 changed files with 44 additions and 24 deletions

View File

@ -563,30 +563,48 @@ Function_0xec2f: ; ec2f
; ec38 ; ec38
INCBIN "baserom.gbc", $ec38, $ec50 - $ec38 GetPokedexEntryBank: ; ec38
push hl
push de
ld a, [EnemyMonSpecies]
rlca
rlca
and 3
ld hl, .PokedexEntryBanks
ld d, 0
ld e, a
add hl, de
ld a, [hl]
pop de
pop hl
ret
.PokedexEntryBanks
db BANK(PokedexEntries1)
db BANK(PokedexEntries2)
db BANK(PokedexEntries3)
db BANK(PokedexEntries4)
; ec50
Function_0xec50: ; ec50 Function_0xec50: ; ec50
ld a, [EnemyMonSpecies] ld a, [EnemyMonSpecies]
ld hl, $4378 ld hl, PokedexDataPointerTable
dec a dec a
ld e, a ld e, a
ld d, $0 ld d, 0
add hl, de add hl, de
add hl, de add hl, de
ld a, $11 ld a, BANK(PokedexDataPointerTable)
call GetFarHalfword call GetFarHalfword
.asm_ec61 .SkipText
call $6c38 call GetPokedexEntryBank
call GetFarByte call GetFarByte
inc hl inc hl
cp $50 cp "@"
jr nz, .asm_ec61 jr nz, .SkipText
call $6c38
call GetPokedexEntryBank
push bc push bc
inc hl inc hl
inc hl inc hl
@ -604,16 +622,17 @@ Function_0xec50: ; ec50
rr c rr c
srl b srl b
rr c rr c
call $6c99 call .asm_ec99
srl b srl b
rr c rr c
call $6c99 call .asm_ec99
ld a, h ld a, h
pop bc pop bc
jr .asm_eca4 jr .asm_eca4
.asm_ec99
push bc push bc
ld a, b ld a, b
cpl cpl
@ -631,13 +650,11 @@ Function_0xec50: ; ec50
cp $4 cp $4
jr c, .asm_ecbc jr c, .asm_ecbc
ld hl, $6cc4 ld hl, .table_ecc4
.asm_ecac .asm_ecac
ld a, c ld a, c
cp [hl] cp [hl]
jr c, .asm_ecb4 jr c, .asm_ecb4
inc hl inc hl
inc hl inc hl
jr .asm_ecac jr .asm_ecac
@ -653,15 +670,18 @@ Function_0xec50: ; ec50
.asm_ecbc .asm_ecbc
ld a, b ld a, b
sub $14 sub 20
ld b, a ld b, a
ret nc ret nc
ld b, $1 ld b, $1
ret ret
; ecc4
.table_ecc4
INCBIN "baserom.gbc", $ecc4, $eccc - $ecc4 db 8, 0
db 12, 20
db 16, 30
db 255, 40
; eccc
Function_0xeccc: ; eccc Function_0xeccc: ; eccc

View File

@ -20645,7 +20645,7 @@ INCLUDE "maps/HallOfFame.asm"
; Pokedex entries I ; Pokedex entries I
; 001-064 ; 001-064
PokedexEntries1:
INCLUDE "stats/pokedex/entries_1.asm" INCLUDE "stats/pokedex/entries_1.asm"
@ -20925,7 +20925,7 @@ SECTION "bank6E",DATA,BANK[$6E]
; Pokedex entries II ; Pokedex entries II
; 065-128 ; 065-128
PokedexEntries2:
INCLUDE "stats/pokedex/entries_2.asm" INCLUDE "stats/pokedex/entries_2.asm"
@ -21031,7 +21031,7 @@ SECTION "bank73",DATA,BANK[$73]
; Pokedex entries III ; Pokedex entries III
; 129-192 ; 129-192
PokedexEntries3:
INCLUDE "stats/pokedex/entries_3.asm" INCLUDE "stats/pokedex/entries_3.asm"
@ -21039,7 +21039,7 @@ SECTION "bank74",DATA,BANK[$74]
; Pokedex entries IV ; Pokedex entries IV
; 193-251 ; 193-251
PokedexEntries4:
INCLUDE "stats/pokedex/entries_4.asm" INCLUDE "stats/pokedex/entries_4.asm"