mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-11-11 15:54:49 +13:00
money won and trainer pic constants
This commit is contained in:
parent
9c93ef3bff
commit
9739c26ed7
|
|
@ -1023,10 +1023,11 @@ TrainerBattleVictory: ; 3c696 (f:4696)
|
||||||
ld c, $28
|
ld c, $28
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
call PrintEndBattleText
|
call PrintEndBattleText
|
||||||
|
; win money
|
||||||
ld hl, MoneyForWinningText
|
ld hl, MoneyForWinningText
|
||||||
call PrintText
|
call PrintText
|
||||||
ld de, wPlayerMoney + 2
|
ld de, wPlayerMoney + 2
|
||||||
ld hl, wd07b
|
ld hl, wAmountMoneyWon + 2
|
||||||
ld c, $3
|
ld c, $3
|
||||||
predef_jump AddBCDPredef
|
predef_jump AddBCDPredef
|
||||||
|
|
||||||
|
|
@ -6959,9 +6960,9 @@ InitBattle_Common: ; 3efeb (f:6feb)
|
||||||
|
|
||||||
_LoadTrainerPic: ; 3f04b (f:704b)
|
_LoadTrainerPic: ; 3f04b (f:704b)
|
||||||
; wd033-wd034 contain pointer to pic
|
; wd033-wd034 contain pointer to pic
|
||||||
ld a, [wd033]
|
ld a, [wTrainerPicPointer] ; wd033
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wd034]
|
ld a, [wTrainerPicPointer + 1] ; wd034
|
||||||
ld d, a ; de contains pointer to trainer pic
|
ld d, a ; de contains pointer to trainer pic
|
||||||
ld a, [wLinkState]
|
ld a, [wLinkState]
|
||||||
and a
|
and a
|
||||||
|
|
|
||||||
|
|
@ -141,9 +141,10 @@ ReadTrainer: ; 39c53 (e:5c53)
|
||||||
.GiveStarterMove
|
.GiveStarterMove
|
||||||
ld a,b
|
ld a,b
|
||||||
ld [wEnemyMon6Moves + 2],a
|
ld [wEnemyMon6Moves + 2],a
|
||||||
.FinishUp ; XXX this needs documenting
|
.FinishUp
|
||||||
xor a ; clear D079-D07B
|
; clear wAmountMoneyWon addresses
|
||||||
ld de,wd079
|
xor a
|
||||||
|
ld de,wAmountMoneyWon
|
||||||
ld [de],a
|
ld [de],a
|
||||||
inc de
|
inc de
|
||||||
ld [de],a
|
ld [de],a
|
||||||
|
|
@ -152,13 +153,14 @@ ReadTrainer: ; 39c53 (e:5c53)
|
||||||
ld a,[W_CURENEMYLVL]
|
ld a,[W_CURENEMYLVL]
|
||||||
ld b,a
|
ld b,a
|
||||||
.LastLoop
|
.LastLoop
|
||||||
|
; update wAmountMoneyWon addresses (money to win) based on enemy's level
|
||||||
ld hl,wd047
|
ld hl,wd047
|
||||||
ld c,2
|
ld c,2 ; wAmountMoneyWon is a 3-byte number
|
||||||
push bc
|
push bc
|
||||||
predef AddBCDPredef
|
predef AddBCDPredef
|
||||||
pop bc
|
pop bc
|
||||||
inc de
|
inc de
|
||||||
inc de
|
inc de
|
||||||
dec b
|
dec b
|
||||||
jr nz,.LastLoop
|
jr nz,.LastLoop ; repeat W_CURENEMYLVL times
|
||||||
ret
|
ret
|
||||||
4
home.asm
4
home.asm
|
|
@ -2908,7 +2908,7 @@ GetTrainerInformation:: ; 3566 (0:3566)
|
||||||
ld hl, TrainerPicAndMoneyPointers
|
ld hl, TrainerPicAndMoneyPointers
|
||||||
ld bc, $5
|
ld bc, $5
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld de, wd033
|
ld de, wTrainerPicPointer
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
|
|
@ -2922,7 +2922,7 @@ GetTrainerInformation:: ; 3566 (0:3566)
|
||||||
ld [de], a
|
ld [de], a
|
||||||
jp BankswitchBack
|
jp BankswitchBack
|
||||||
.linkBattle
|
.linkBattle
|
||||||
ld hl, wd033
|
ld hl, wTrainerPicPointer
|
||||||
ld de, RedPicFront
|
ld de, RedPicFront
|
||||||
ld [hl], e
|
ld [hl], e
|
||||||
inc hl
|
inc hl
|
||||||
|
|
|
||||||
2
text.asm
2
text.asm
|
|
@ -1114,7 +1114,7 @@ _EnemyMonFaintedText:: ; 0x896c7
|
||||||
|
|
||||||
_MoneyForWinningText:: ; 896dd (22:56dd)
|
_MoneyForWinningText:: ; 896dd (22:56dd)
|
||||||
text $52, " got ¥@"
|
text $52, " got ¥@"
|
||||||
TX_BCD wd079, $c3
|
TX_BCD wAmountMoneyWon, $c3
|
||||||
db $0
|
db $0
|
||||||
line "for winning!"
|
line "for winning!"
|
||||||
prompt
|
prompt
|
||||||
|
|
|
||||||
12
wram.asm
12
wram.asm
|
|
@ -949,8 +949,9 @@ W_TRAINERCLASS:: ; d031
|
||||||
|
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wd033:: ds 1
|
wTrainerPicPointer:: ; wd033
|
||||||
wd034:: ds 2
|
ds 2
|
||||||
|
ds 1
|
||||||
wd036:: ds 16
|
wd036:: ds 16
|
||||||
wd046:: ds 1
|
wd046:: ds 1
|
||||||
wd047:: ds 1
|
wd047:: ds 1
|
||||||
|
|
@ -1103,15 +1104,16 @@ wPlayerBideAccumulatedDamage:: ; d074
|
||||||
wUnknownSerialCounter2:: ; d075
|
wUnknownSerialCounter2:: ; d075
|
||||||
; 2 bytes
|
; 2 bytes
|
||||||
|
|
||||||
ds 4
|
ds 4
|
||||||
|
|
||||||
wEscapedFromBattle::
|
wEscapedFromBattle::
|
||||||
; non-zero when an item or move that allows escape from battle was used
|
; non-zero when an item or move that allows escape from battle was used
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wd079:: ds 1
|
wd079::
|
||||||
|
wAmountMoneyWon:: ds 1 ; wd079 - wd07b
|
||||||
wd07a:: ds 1
|
wd07a:: ds 1
|
||||||
wd07b:: ds 1
|
ds 1
|
||||||
|
|
||||||
W_ANIMATIONID:: ; d07c
|
W_ANIMATIONID:: ; d07c
|
||||||
; ID number of the current battle animation
|
; ID number of the current battle animation
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue