ref: caf92984d5a3acabe46fde4e544309d2e3ff9e07
parent: da67a699c50344fb779d068218421b5004519f0a
parent: 14dbeb36b04aa9650e29aadfdfa0b2b190a91fd9
author: yenatch <yenatch@gmail.com>
date: Sat Mar 29 18:51:57 EDT 2014
Merge remote-tracking branch 'huderlem/master' into master Conflicts: main.asm
--- a/main.asm
+++ b/main.asm
@@ -10507,9 +10507,10 @@
ld a, [$cd3e]
ld [$2000], a
ld [H_LOADEDROMBANK], a
- ld de, $3eda
+ ld de, .asm_3eda
push de
jp [hl]
+.asm_3eda
xor a
jr .asm_3eec
.asm_3edd
@@ -14169,9 +14170,9 @@
ld [$d700], a
ld a, [wCurrentMenuItem] ; $cc26
and a
- ld a, $f0
+ ld a, TRADE_CENTER
jr nz, .asm_5cfc
- ld a, $ef
+ ld a, BATTLE_CENTER
.asm_5cfc
ld [$d72d], a
ld hl, UnnamedText_5d48 ; $5d48
@@ -14903,7 +14904,7 @@
Func_62ff: ; 62ff (1:62ff)
ld a, [$d72d]
- cp $ef
+ cp BATTLE_CENTER
jr nz, .asm_6314
ld hl, BattleCenterSpec1 ; $6428
ld a, [$FF00+$aa]
@@ -14912,7 +14913,7 @@
ld hl, BattleCenterSpec2 ; $6430
jr .asm_6334
.asm_6314
- cp $f0
+ cp TRADE_CENTER
jr nz, .asm_6326
ld hl, TradeCenterSpec1 ; $6438
ld a, [$FF00+$aa]
@@ -50923,13 +50924,15 @@
dec hl
ret
-Func_396d3: ; 396d3 (e:56d3)
+_ScrollTrainerPicAfterBattle: ; 396d3 (e:56d3)
+; Load the enemy trainer's pic and scrolls it into
+; the screen from the right.
xor a
ld [W_ENEMYMONID], a
ld b, $1
call GoPAL_SET
- ld hl, Func_3f04b
- ld b, BANK(Func_3f04b)
+ ld hl, _LoadTrainerPic
+ ld b, BANK(_LoadTrainerPic)
call Bankswitch
FuncCoord 19, 0 ; $c3b3
ld hl, Coord
@@ -57175,7 +57178,7 @@
ld a, [W_ISLINKBATTLE] ; $d12b
cp $4
ret z
- call Func_3ed12
+ call ScrollTrainerPicAfterBattle
ld c, $28
call DelayFrames
call Func_3381
@@ -57371,7 +57374,7 @@
ld hl, wTileMap ; sony 1 battle
ld bc, $815
call ClearScreenArea
- call Func_3ed12
+ call ScrollTrainerPicAfterBattle
ld c, $28
call DelayFrames
ld hl, Sony1WinText
@@ -62616,9 +62619,9 @@
ld b, BANK(Func_396a7)
jp Bankswitch
-Func_3ed12: ; 3ed12 (f:6d12)
- ld hl, Func_396d3
- ld b, BANK(Func_396d3)
+ScrollTrainerPicAfterBattle: ; 3ed12 (f:6d12)
+ ld hl, _ScrollTrainerPicAfterBattle
+ ld b, BANK(_ScrollTrainerPicAfterBattle)
jp Bankswitch
Func_3ed1a: ; 3ed1a (f:6d1a)
@@ -63001,7 +63004,7 @@
ld b, BANK(ReadTrainer)
call Bankswitch
call Func_3ec32
- call Func_3f04b
+ call _LoadTrainerPic
xor a
ld [W_ENEMYMONID], a
ld [$FF00+$e1], a
@@ -63114,17 +63117,18 @@
TerminatorText_3f04a: ; 3f04a (f:704a)
db "@"
-Func_3f04b: ; 3f04b (f:704b)
+_LoadTrainerPic: ; 3f04b (f:704b)
+; $d033-$d034 contain pointer to pic
ld a, [$d033]
ld e, a
ld a, [$d034]
- ld d, a
+ ld d, a ; de contains pointer to trainer pic
ld a, [W_ISLINKBATTLE] ; $d12b
and a
- ld a, $13
- jr z, .asm_3f05d
- ld a, $4
-.asm_3f05d
+ ld a, Bank(YoungsterPic) ; this is where all the trainer pics are (not counting Red's)
+ jr z, .loadSprite
+ ld a, Bank(RedPicFront)
+.loadSprite
call UncompressSpriteFromDE
ld de, $9000
ld a, $77