mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-01-23 09:16:20 -08:00
added comments and labels to BattleTower-Code
This commit is contained in:
parent
a129ba7b43
commit
9772c722ac
@ -1,4 +1,4 @@
|
|||||||
Function1f8000: ; 1f8000
|
Function_LoadOpponentTrainerAndPokemons: ; 1f8000
|
||||||
ld a, [rSVBK]
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $3
|
ld a, $3
|
||||||
@ -52,7 +52,7 @@ ENDC
|
|||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld bc, 11
|
ld bc, 11
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call Function1f8081
|
call Function_LoadRandomBattleTowerPkmn
|
||||||
pop af
|
pop af
|
||||||
ld hl, Unknown_1f0000
|
ld hl, Unknown_1f0000
|
||||||
ld bc, $0024
|
ld bc, $0024
|
||||||
@ -73,7 +73,7 @@ ENDC
|
|||||||
ret
|
ret
|
||||||
; 1f8081
|
; 1f8081
|
||||||
|
|
||||||
Function1f8081: ; 1f8081
|
Function_LoadRandomBattleTowerPkmn: ; 1f8081
|
||||||
ld c, $3
|
ld c, $3
|
||||||
.loop
|
.loop
|
||||||
push bc
|
push bc
|
||||||
@ -81,6 +81,8 @@ Function1f8081: ; 1f8081
|
|||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
|
|
||||||
.asm_1f8089
|
.asm_1f8089
|
||||||
|
; From Which LevelGroup are the Pkmn loaded
|
||||||
|
; a = 1..10
|
||||||
ld a, [$d800]
|
ld a, [$d800]
|
||||||
dec a
|
dec a
|
||||||
ld hl, BattleTowerMons
|
ld hl, BattleTowerMons
|
||||||
@ -97,7 +99,9 @@ Function1f8081: ; 1f8081
|
|||||||
and $1f
|
and $1f
|
||||||
cp (BattleTowerMons2 - BattleTowerMons1) / ($3b)
|
cp (BattleTowerMons2 - BattleTowerMons1) / ($3b)
|
||||||
jr nc, .asm_1f8099
|
jr nc, .asm_1f8099
|
||||||
|
; in register 'a' is the chosen Pkmn of the LevelGroup
|
||||||
|
|
||||||
|
; Check if Pkmn was already loaded before
|
||||||
ld bc, $3b
|
ld bc, $3b
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
|
@ -24179,7 +24179,7 @@ Function170b16: ; 170b16 (5c:4b16)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function170b44: ; 170b44
|
Function170b44: ; 170b44
|
||||||
callba Function1f8000
|
callba Function_LoadOpponentTrainerAndPokemons
|
||||||
ld a, [rSVBK]
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $3
|
ld a, $3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user