summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorJimB16 <f1@jimb.de>2015-08-23 07:09:36 +0200
committerJimB16 <f1@jimb.de>2015-08-23 07:09:36 +0200
commit9772c722ac8fc6c41c5427ce7ca0d106a19db36e (patch)
tree77faf525c08b9fc59aaed3bfd5b4e32dfaba32ab /data
parenta129ba7b43b743efacf2926f4443b5f1d6305ef8 (diff)
added comments and labels to BattleTower-Code
Diffstat (limited to 'data')
-rw-r--r--data/battle_tower.asm12
1 files changed, 8 insertions, 4 deletions
diff --git a/data/battle_tower.asm b/data/battle_tower.asm
index 025807ac8..aea1df2dd 100644
--- a/data/battle_tower.asm
+++ b/data/battle_tower.asm
@@ -1,4 +1,4 @@
-Function1f8000: ; 1f8000
+Function_LoadOpponentTrainerAndPokemons: ; 1f8000
ld a, [rSVBK]
push af
ld a, $3
@@ -52,7 +52,7 @@ ENDC
call AddNTimes
ld bc, 11
call CopyBytes
- call Function1f8081
+ call Function_LoadRandomBattleTowerPkmn
pop af
ld hl, Unknown_1f0000
ld bc, $0024
@@ -73,14 +73,16 @@ ENDC
ret
; 1f8081
-Function1f8081: ; 1f8081
- ld c, $3
+Function_LoadRandomBattleTowerPkmn: ; 1f8081
+ ld c, $3
.loop
push bc
ld a, BANK(sbe51)
call GetSRAMBank
.asm_1f8089
+ ; From Which LevelGroup are the Pkmn loaded
+ ; a = 1..10
ld a, [$d800]
dec a
ld hl, BattleTowerMons
@@ -97,7 +99,9 @@ Function1f8081: ; 1f8081
and $1f
cp (BattleTowerMons2 - BattleTowerMons1) / ($3b)
jr nc, .asm_1f8099
+ ; in register 'a' is the chosen Pkmn of the LevelGroup
+ ; Check if Pkmn was already loaded before
ld bc, $3b
call AddNTimes
ld a, [hli]