diff options
author | Rangi <35663410+Rangi42@users.noreply.github.com> | 2020-07-07 19:48:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-07 19:48:22 -0400 |
commit | 9571c550b6a0dcb3a4f54513c881661a87271024 (patch) | |
tree | d73507228a57e4f3cece2fb93fe7df3a9439553f /home/trainers.asm | |
parent | c480632d5494d04f7f5f0298a31877a2293b564e (diff) | |
parent | bbf2f51a02b2544f1bef32a5868503b474ae2fef (diff) |
Merge pull request #263 from Rangi42/master
Syncing style with pokecrystal
Diffstat (limited to 'home/trainers.asm')
-rw-r--r-- | home/trainers.asm | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/home/trainers.asm b/home/trainers.asm index 22601db8..039c4ec8 100644 --- a/home/trainers.asm +++ b/home/trainers.asm @@ -144,7 +144,7 @@ CheckFightingMapTrainers:: ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN ld [wJoyIgnore], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a call TrainerWalkUpToPlayer_Bank0 ld hl, wCurMapScript inc [hl] ; increment map script index (next script function is usually DisplayEnemyTrainerTextAndStartBattle) @@ -157,7 +157,7 @@ DisplayEnemyTrainerTextAndStartBattle:: ret nz ; return if the enemy trainer hasn't finished walking to the player's sprite ld [wJoyIgnore], a ld a, [wSpriteIndex] - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ; fall through @@ -211,15 +211,15 @@ EndTrainerBattle:: ResetButtonPressedAndMapScript:: xor a ld [wJoyIgnore], a - ld [hJoyHeld], a - ld [hJoyPressed], a - ld [hJoyReleased], a + ldh [hJoyHeld], a + ldh [hJoyPressed], a + ldh [hJoyReleased], a ld [wCurMapScript], a ; reset battle status ret ; calls TrainerWalkUpToPlayer TrainerWalkUpToPlayer_Bank0:: - jpba TrainerWalkUpToPlayer + farjp TrainerWalkUpToPlayer ; sets opponent type and mon set/lvl based on the engaging trainer data InitBattleEnemyParameters:: @@ -302,7 +302,7 @@ CheckForEngagingTrainers:: ; hl = text if the player wins ; de = text if the player loses SaveEndBattleTextPointers:: - ld a, [hLoadedROMBank] + ldh a, [hLoadedROMBank] ld [wEndBattleTextRomBank], a ld a, h ld [wEndBattleWinTextPointer], a @@ -337,20 +337,20 @@ PrintEndBattleText:: res 7, [hl] pop hl ret z - ld a, [hLoadedROMBank] + ldh a, [hLoadedROMBank] push af ld a, [wEndBattleTextRomBank] - ld [hLoadedROMBank], a + ldh [hLoadedROMBank], a ld [MBC1RomBank], a push hl - callba SaveTrainerName + farcall SaveTrainerName ld hl, TrainerEndBattleText call PrintText pop hl pop af - ld [hLoadedROMBank], a + ldh [hLoadedROMBank], a ld [MBC1RomBank], a - callba FreezeEnemyTrainerSprite + farcall FreezeEnemyTrainerSprite jp WaitForSoundToFinish GetSavedEndBattleTextPointer:: |