summaryrefslogtreecommitdiff
path: root/home/trainers.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2018-02-03 18:21:53 -0500
committerRangi <remy.oukaour+rangi42@gmail.com>2018-02-03 19:42:56 -0500
commit32ed487a476e01759d3d9dbc818d8566ae2c9cb7 (patch)
tree669e90b56d36f17efff5f673235193f5298c0ceb /home/trainers.asm
parent6ff2cb20e67db2054486fc5dc48eb9263298d4ad (diff)
parentb35eb72290b964b98844afbe741bb7ede34b9ef3 (diff)
Merge branch 'master' of https://github.com/pret/pokecrystal
# Conflicts: # audio/engine.asm # constants/gfx_constants.asm # constants/map_data_constants.asm # constants/pokemon_data_constants.asm # constants/sprite_constants.asm # constants/wram_constants.asm # data/maps/data.asm # engine/battle/ai/scoring.asm # engine/battle/core.asm # engine/battle/effect_commands.asm # engine/battle/misc.asm # engine/battle_anims/getpokeballwobble.asm # engine/breeding.asm # engine/buy_sell_toss.asm # engine/decorations.asm # engine/events/battle_tower/battle_tower.asm # engine/events/battle_tower/rules.asm # engine/events/buena.asm # engine/events/bug_contest/contest_2.asm # engine/events/daycare.asm # engine/events/dratini.asm # engine/events/halloffame.asm # engine/events/happiness_egg.asm # engine/events/kurt.asm # engine/events/lucky_number.asm # engine/events/magnet_train.asm # engine/events/overworld.asm # engine/events/pokerus/pokerus.asm # engine/events/print_unown.asm # engine/events/print_unown_2.asm # engine/events/unown_walls.asm # engine/item_effects.asm # engine/link.asm # engine/mon_menu.asm # engine/player_object.asm # engine/routines/playslowcry.asm # engine/scripting.asm # engine/search.asm # engine/search2.asm # engine/specials.asm # engine/start_menu.asm # engine/timeset.asm # home/battle_vars.asm # home/map.asm # maps/GoldenrodUndergroundSwitchRoomEntrances.asm # maps/IlexForest.asm # maps/KrissHouse2F.asm # maps/Route39Barn.asm # mobile/mobile_12_2.asm # mobile/mobile_40.asm # mobile/mobile_5f.asm # wram.asm
Diffstat (limited to 'home/trainers.asm')
-rw-r--r--home/trainers.asm26
1 files changed, 13 insertions, 13 deletions
diff --git a/home/trainers.asm b/home/trainers.asm
index 4eabfbcbb..575af65a7 100644
--- a/home/trainers.asm
+++ b/home/trainers.asm
@@ -16,7 +16,7 @@ CheckTrainerBattle:: ; 360d
; Skip the player object.
ld a, 1
- ld de, MapObjects + OBJECT_LENGTH
+ ld de, wMapObjects + OBJECT_LENGTH
.loop
@@ -97,32 +97,32 @@ CheckTrainerBattle:: ; 360d
pop af
ld [hLastTalked], a
ld a, b
- ld [EngineBuffer2], a
+ ld [wEngineBuffer2], a
ld a, c
- ld [EngineBuffer3], a
+ ld [wEngineBuffer3], a
jr LoadTrainer_continue
; 3674
TalkToTrainer:: ; 3674
ld a, 1
- ld [EngineBuffer2], a
+ ld [wEngineBuffer2], a
ld a, -1
- ld [EngineBuffer3], a
+ ld [wEngineBuffer3], a
LoadTrainer_continue:: ; 367e
call GetMapScriptsBank
- ld [EngineBuffer1], a
+ ld [wEngineBuffer1], a
ld a, [hLastTalked]
call GetMapObject
ld hl, MAPOBJECT_SCRIPT_POINTER
add hl, bc
- ld a, [EngineBuffer1]
+ ld a, [wEngineBuffer1]
call GetFarHalfword
ld de, wTempTrainer
ld bc, wTempTrainerEnd - wTempTrainer
- ld a, [EngineBuffer1]
+ ld a, [wEngineBuffer1]
call FarCopyBytes
xor a
ld [wRunningTrainerBattleScript], a
@@ -152,11 +152,11 @@ FacingPlayerDistance:: ; 36ad
add hl, bc
ld e, [hl]
- ld a, [PlayerStandingMapX]
+ ld a, [wPlayerStandingMapX]
cp d
jr z, .CheckY
- ld a, [PlayerStandingMapY]
+ ld a, [wPlayerStandingMapY]
cp e
jr z, .CheckX
@@ -164,7 +164,7 @@ FacingPlayerDistance:: ; 36ad
ret
.CheckY:
- ld a, [PlayerStandingMapY]
+ ld a, [wPlayerStandingMapY]
sub e
jr z, .NotFacing
jr nc, .Above
@@ -182,7 +182,7 @@ FacingPlayerDistance:: ; 36ad
jr .CheckFacing
.CheckX:
- ld a, [PlayerStandingMapX]
+ ld a, [wPlayerStandingMapX]
sub d
jr z, .NotFacing
jr nc, .Left
@@ -236,7 +236,7 @@ CheckTrainerFlag:: ; 36f5
; 3718
PrintWinLossText:: ; 3718
- ld a, [BattleType]
+ ld a, [wBattleType]
cp BATTLETYPE_CANLOSE
jr .canlose ; ??????????