base stat labels + GetCurNick

This commit is contained in:
yenatch 2013-04-29 14:04:25 -04:00
parent c80b2e376e
commit 652d26bb05
2 changed files with 60 additions and 22 deletions

View File

@ -3506,11 +3506,8 @@ GetBaseStats: ; 3856
push bc push bc
push de push de
push hl push hl
; Save bank
ld a, [hROMBank] ld a, [hROMBank]
push af push af
; Bankswitch
ld a, BANK(BaseStats) ld a, BANK(BaseStats)
rst Bankswitch rst Bankswitch
@ -3534,12 +3531,12 @@ GetBaseStats: ; 3856
ld de, $7d9c ld de, $7d9c
; Sprite dimensions ; Sprite dimensions
ld b, $55 ld b, $55 ; 5x5
ld hl, $d247 ld hl, BasePicSize
ld [hl], b ld [hl], b
; ???? ; ????
ld hl, $d248 ld hl, BasePadding
ld [hl], e ld [hl], e
inc hl inc hl
ld [hl], d ld [hl], d
@ -3554,42 +3551,41 @@ GetBaseStats: ; 3856
ld a, [CurSpecies] ld a, [CurSpecies]
ld [CurBaseStats], a ld [CurBaseStats], a
; Restore bank
pop af pop af
rst Bankswitch rst Bankswitch
pop hl pop hl
pop de pop de
pop bc pop bc
ret ret
; 389c ; 389c
INCBIN "baserom.gbc", $389c, $38a2 - $389c
GetCurNick; 389c
ld a, [CurPartyMon]
ld hl, PartyMonNicknames
GetNick: ; 38a2 GetNick: ; 38a2
; get the nickname of a partymon ; Get nickname a from list hl.
; write nick to StringBuffer1
; input: a = which mon (0-5)
push hl push hl
push bc push bc
; skip [a] nicks
call SkipNames call SkipNames
ld de, StringBuffer1 ld de, StringBuffer1
; write nick
push de push de
ld bc, PKMN_NAME_LENGTH ld bc, PKMN_NAME_LENGTH
call CopyBytes call CopyBytes
; error-check
pop de pop de
callab CheckNickErrors callab CheckNickErrors
; we're done
pop bc pop bc
pop hl pop hl
ret ret
; 38bb ; 38bb
PrintBCDNumber: ; 38bb PrintBCDNumber: ; 38bb
; function to print a BCD (Binary-coded decimal) number ; function to print a BCD (Binary-coded decimal) number
; de = address of BCD number ; de = address of BCD number
@ -6775,16 +6771,16 @@ LoadEnemyMon: ; 3e8eb
; 25% chance of getting an item ; 25% chance of getting an item
call FarBattleRNG call FarBattleRNG
cp a, $c0 ; $c0/$100 = 75% cp a, $c0
ld a, NO_ITEM ld a, NO_ITEM
jr c, .UpdateItem jr c, .UpdateItem
; From there, an 8% chance for Item2 ; From there, an 8% chance for Item2
call FarBattleRNG call FarBattleRNG
cp a, $14 ; 8% of 25% = 2% Item2 cp a, $14 ; 8% of 25% = 2% Item2
ld a, [$d241] ; BaseStatsItem1 ld a, [BaseItems]
jr nc, .UpdateItem jr nc, .UpdateItem
ld a, [$d242] ; BaseStatsItem2 ld a, [BaseItems+1]
.UpdateItem .UpdateItem

View File

@ -1166,11 +1166,52 @@ UnownLetter: ; d234
ds 1 ds 1
CurBaseStats: ; d236 CurBaseStats: ; d236
ds 32 BaseDexNo: ; d236
ds 1
BaseHP: ; d237
ds 1
BaseAttack: ; d238
ds 1
BaseDefense: ; d239
ds 1
BaseSpeed: ; d23a
ds 1
BaseSpecialAttack: ; d23b
ds 1
BaseSpecialDefense: ; d23c
ds 1
BaseType: ; d23d
ds 2
BaseCatchRate: ; d23f
ds 1
BaseExp: ; d240
ds 1
BaseItems: ; d241
ds 2
BaseGender: ; d243
ds 1
BaseUnknown1: ; d244
ds 1
BaseEggSteps: ; d245
ds 1
BaseUnknown2: ; d246
ds 1
BasePicSize: ; d247
ds 1
BasePadding: ; d248
ds 4
BaseGrowthRate: ; d24c
ds 1
BaseEggGroups: ; d24d
ds 1
BaseTMHM: ; d24e
ds 8
CurDamage: ; d256 CurDamage: ; d256
ds 2 ds 2
SECTION "TimeOfDay",BSS[$d269] SECTION "TimeOfDay",BSS[$d269]
TimeOfDay: ; d269 TimeOfDay: ; d269
@ -1620,6 +1661,7 @@ PartyMon5OT: ; de2b
PartyMon6OT: ; de36 PartyMon6OT: ; de36
ds 11 ds 11
PartyMonNicknames:
PartyMon1Nickname: ; de41 PartyMon1Nickname: ; de41
ds 11 ds 11
PartyMon2Nickname: ; de4c PartyMon2Nickname: ; de4c