From bbf2f51a02b2544f1bef32a5868503b474ae2fef Mon Sep 17 00:00:00 2001 From: Rangi Date: Tue, 7 Jul 2020 18:50:58 -0400 Subject: Move all code out of home.asm into home/ This results in 64 home/*.asm files, comparable to pokecrystal's 57. --- home/trainers2.asm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 home/trainers2.asm (limited to 'home/trainers2.asm') diff --git a/home/trainers2.asm b/home/trainers2.asm new file mode 100644 index 00000000..950eabb2 --- /dev/null +++ b/home/trainers2.asm @@ -0,0 +1,35 @@ +GetTrainerInformation:: + call GetTrainerName + ld a, [wLinkState] + and a + jr nz, .linkBattle + ld a, BANK(TrainerPicAndMoneyPointers) + call BankswitchHome + ld a, [wTrainerClass] + dec a + ld hl, TrainerPicAndMoneyPointers + ld bc, $5 + call AddNTimes + ld de, wTrainerPicPointer + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + ld de, wTrainerBaseMoney + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + jp BankswitchBack +.linkBattle + ld hl, wTrainerPicPointer + ld de, RedPicFront + ld [hl], e + inc hl + ld [hl], d + ret + +GetTrainerName:: + farjp GetTrainerName_ -- cgit v1.3.1-sl0p