changed more labels

This commit is contained in:
JimB16 2015-09-04 22:30:40 +02:00
parent d6a4dada40
commit c76a3c6ecd
7 changed files with 79 additions and 55 deletions

View File

@ -21,7 +21,7 @@ AI_SwitchOrTryItem: ; 38000
jr nz, DontSwitch jr nz, DontSwitch
ld hl, TrainerClassAttributes + 5 ld hl, TrainerClassAttributes + 5
ld a, [wcfc0] ld a, [InBattleTowerBattle] ; Load always the first TrainerClass for BattleTower-Trainers
and a and a
jr nz, .ok jr nz, .ok
ld a, [TrainerClass] ld a, [TrainerClass]
@ -157,7 +157,8 @@ CheckSubstatusCantRun: ; 380ff
AI_TryItem: ; 38105 AI_TryItem: ; 38105
ld a, [wcfc0] ; items are not allowed in the BattleTower
ld a, [InBattleTowerBattle]
and a and a
ret nz ret nz

View File

@ -2462,7 +2462,7 @@ Function3cfa4: ; 3cfa4
ld a, [InLinkBattle] ld a, [InLinkBattle]
and a and a
ret nz ret nz
ld a, [wcfc0] ld a, [InBattleTowerBattle]
bit 0, a bit 0, a
jr nz, .asm_3d006 jr nz, .asm_3d006
call Function3ebd8 call Function3ebd8
@ -3068,7 +3068,7 @@ LostBattle: ; 3d38e
ld a, 1 ld a, 1
ld [BattleEnded], a ld [BattleEnded], a
ld a, [wcfc0] ld a, [InBattleTowerBattle]
bit 0, a bit 0, a
jr nz, .asm_3d3bd jr nz, .asm_3d3bd
@ -5175,7 +5175,7 @@ BattleMenu_Pack: ; 3e1c7
and a and a
jp nz, ItemsCantBeUsed jp nz, ItemsCantBeUsed
ld a, [wcfc0] ld a, [InBattleTowerBattle]
and a and a
jp nz, ItemsCantBeUsed jp nz, ItemsCantBeUsed
@ -6214,7 +6214,8 @@ LoadEnemyMon: ; 3e8eb
and a and a
jp nz, Function3dabd jp nz, Function3dabd
ld a, [wcfc0] ; ???? ; and also not in a BattleTower-Battle
ld a, [InBattleTowerBattle] ; ????
bit 0, a bit 0, a
jp nz, Function3dabd jp nz, Function3dabd
@ -7107,7 +7108,7 @@ BadgeStatBoosts: ; 3ed45
and a and a
ret nz ret nz
ld a, [wcfc0] ld a, [InBattleTowerBattle]
and a and a
ret nz ret nz
@ -7329,7 +7330,7 @@ Function3ee3b: ; 3ee3b
and a and a
ret nz ret nz
ld a, [wcfc0] ld a, [InBattleTowerBattle]
bit 0, a bit 0, a
ret nz ret nz
@ -8716,7 +8717,7 @@ endr
call Function3d0be call Function3d0be
ld hl, BattleText_0x80730 ld hl, BattleText_0x80730
call StdBattleTextBox call StdBattleTextBox
ld a, [wcfc0] ld a, [InBattleTowerBattle]
bit 0, a bit 0, a
ret z ret z
call ClearTileMap call ClearTileMap

View File

@ -700,7 +700,7 @@ BattleCommand02: ; 343db
and a and a
ret nz ret nz
ld a, [wcfc0] ld a, [InBattleTowerBattle]
and a and a
ret nz ret nz
@ -3841,7 +3841,7 @@ BattleCommanda1: ; 35461
and a and a
jr nz, .asm_35532 jr nz, .asm_35532
ld a, [wcfc0] ld a, [InBattleTowerBattle]
and a and a
jr nz, .asm_35532 jr nz, .asm_35532
@ -5544,7 +5544,7 @@ BattleCommand14: ; 35e5c
call AnimateCurrentMove call AnimateCurrentMove
ld b, $7 ld b, $7
ld a, [wcfc0] ld a, [InBattleTowerBattle]
and a and a
jr z, .asm_35ea4 jr z, .asm_35ea4
ld b, $3 ld b, $3
@ -5587,7 +5587,7 @@ Function35ece: ; 35ece
and a and a
jr nz, .asm_35eec jr nz, .asm_35eec
ld a, [wcfc0] ld a, [InBattleTowerBattle]
and a and a
jr nz, .asm_35eec jr nz, .asm_35eec
@ -5676,18 +5676,23 @@ BattleCommand2f: ; 35f2c
call GetBattleVar call GetBattleVar
and a and a
jr nz, .asm_35fb8 jr nz, .asm_35fb8
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .asm_35f89 jr z, .asm_35f89
ld a, [InLinkBattle] ld a, [InLinkBattle]
and a and a
jr nz, .asm_35f89 jr nz, .asm_35f89
ld a, [wcfc0]
ld a, [InBattleTowerBattle]
and a and a
jr nz, .asm_35f89 jr nz, .asm_35f89
ld a, [PlayerSubStatus5] ld a, [PlayerSubStatus5]
bit SUBSTATUS_LOCK_ON, a bit SUBSTATUS_LOCK_ON, a
jr nz, .asm_35f89 jr nz, .asm_35f89
call BattleRandom call BattleRandom
cp $40 cp $40
jr c, .asm_35fb8 jr c, .asm_35fb8
@ -6323,11 +6328,12 @@ BattleCommand1d: ; 362e3
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .DidntMiss jr z, .DidntMiss
ld a, [InLinkBattle] ld a, [InLinkBattle]
and a and a
jr nz, .DidntMiss jr nz, .DidntMiss
ld a, [wcfc0] ld a, [InBattleTowerBattle]
and a and a
jr nz, .DidntMiss jr nz, .DidntMiss
@ -8168,18 +8174,23 @@ BattleCommand30: ; 36dc7
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .asm_36e0e jr z, .asm_36e0e
ld a, [InLinkBattle] ld a, [InLinkBattle]
and a and a
jr nz, .asm_36e0e jr nz, .asm_36e0e
ld a, [wcfc0]
ld a, [InBattleTowerBattle]
and a and a
jr nz, .asm_36e0e jr nz, .asm_36e0e
ld a, [PlayerSubStatus5] ld a, [PlayerSubStatus5]
bit SUBSTATUS_LOCK_ON, a bit SUBSTATUS_LOCK_ON, a
jr nz, .asm_36e0e jr nz, .asm_36e0e
call BattleRandom call BattleRandom
cp $40 cp $40
jr c, .asm_36e52 jr c, .asm_36e52
.asm_36e0e .asm_36e0e
ld a, BATTLE_VARS_STATUS_OPP ld a, BATTLE_VARS_STATUS_OPP
call GetBattleVarAddr call GetBattleVarAddr

View File

@ -35575,7 +35575,7 @@ INCLUDE "trainers/attributes.asm"
ReadTrainerParty: ; 39771 ReadTrainerParty: ; 39771
ld a, [wcfc0] ld a, [InBattleTowerBattle]
bit 0, a bit 0, a
ret nz ret nz
@ -35906,7 +35906,7 @@ endr
Battle_GetTrainerName:: ; 39939 Battle_GetTrainerName:: ; 39939
ld a, [wcfc0] ld a, [InBattleTowerBattle]
bit 0, a bit 0, a
ld hl, wd26b ld hl, wd26b
jp nz, CopyTrainerName jp nz, CopyTrainerName
@ -36818,7 +36818,9 @@ endr
.ApplyLayers .ApplyLayers
ld hl, TrainerClassAttributes + 3 ld hl, TrainerClassAttributes + 3
ld a, [wcfc0] ; If we have a battle in BattleTower just load the Attributes of the first TrainerClass (Falkner)
; so we have always the same AI, regardless of the loaded cass of trainer
ld a, [InBattleTowerBattle]
bit 0, a bit 0, a
jr nz, .asm_4412f jr nz, .asm_4412f
@ -87453,7 +87455,7 @@ DoBadgeTypeBoosts: ; fbe24
and a and a
ret nz ret nz
ld a, [wcfc0] ld a, [InBattleTowerBattle]
and a and a
ret nz ret nz

View File

@ -16530,7 +16530,7 @@ ENDC
sub $19 sub $19
.asm_11c021 .asm_11c021
ld hl, Unknown_11f332 ld hl, BTTrainerTexts
jr .asm_11c033 jr .asm_11c033
.asm_11c026 .asm_11c026
@ -20672,14 +20672,14 @@ Unknown_11f2f0:
db $01, $01, $00, $00, $00, $01 db $01, $01, $00, $00, $00, $01
Unknown_11f332: BTTrainerTexts: ; 11f332
dw Unknown_11f338 dw BTTrainerGreetings
dw Unknown_11f36a dw BTTrainerPlayerLostTexts
dw Unknown_11f39c dw BTTrainerPlayerWonTexts
Unknown_11f338: ; 11f338 BTTrainerGreetings: ; 11f338
dw UnknownText_0x11f42e dw BattleTowerTextJump_0x11f42e
dw UnknownText_0x11f43d dw BattleTowerTextJump_0x11f43d
dw UnknownText_0x11f44c dw UnknownText_0x11f44c
dw UnknownText_0x11f45b dw UnknownText_0x11f45b
dw UnknownText_0x11f46a dw UnknownText_0x11f46a
@ -20704,8 +20704,8 @@ Unknown_11f338: ; 11f338
dw UnknownText_0x11f587 dw UnknownText_0x11f587
dw UnknownText_0x11f596 dw UnknownText_0x11f596
Unknown_11f36a: ; 11f36a BTTrainerPlayerLostTexts: ; 11f36a
dw UnknownText_0x11f433 dw BattleTowerTextJump_0x11f433
dw UnknownText_0x11f442 dw UnknownText_0x11f442
dw UnknownText_0x11f451 dw UnknownText_0x11f451
dw UnknownText_0x11f460 dw UnknownText_0x11f460
@ -20731,7 +20731,7 @@ Unknown_11f36a: ; 11f36a
dw UnknownText_0x11f58c dw UnknownText_0x11f58c
dw UnknownText_0x11f59b dw UnknownText_0x11f59b
Unknown_11f39c: ; 11f39c BTTrainerPlayerWonTexts: ; 11f39c
dw UnknownText_0x11f438 dw UnknownText_0x11f438
dw UnknownText_0x11f447 dw UnknownText_0x11f447
dw UnknownText_0x11f456 dw UnknownText_0x11f456
@ -20816,20 +20816,20 @@ Unknown_11f410: ; 11f410
dw UnknownText_0x11f681 dw UnknownText_0x11f681
UnknownText_0x11f42e: ; 0x11f42e BattleTowerTextJump_0x11f42e: ; 0x11f42e
text_jump UnknownText_0x1ec000 text_jump BattleTowerText_0x1ec000
db "@" db "@"
UnknownText_0x11f433: ; 0x11f433 BattleTowerTextJump_0x11f433: ; 0x11f433
text_jump UnknownText_0x1ec03b text_jump BattleTowerText_0x1ec03b
db "@" db "@"
UnknownText_0x11f438: ; 0x11f438 UnknownText_0x11f438: ; 0x11f438
text_jump UnknownText_0x1ec060 text_jump UnknownText_0x1ec060
db "@" db "@"
UnknownText_0x11f43d: ; 0x11f43d BattleTowerTextJump_0x11f43d: ; 0x11f43d
text_jump UnknownText_0x1ec080 text_jump BattleTowerText_0x1ec080
db "@" db "@"
UnknownText_0x11f442: ; 0x11f442 UnknownText_0x11f442: ; 0x11f442
@ -22804,7 +22804,7 @@ Function17021e: ; 17021e
Function17022c: ; 17022c Function17022c: ; 17022c
.asm_17022c .asm_17022c
call Function17023a call Jumpto_BattleTowerBattleFunction
call DelayFrame call DelayFrame
ld a, [wcf63] ld a, [wcf63]
cp $1 cp $1
@ -22812,11 +22812,11 @@ Function17022c: ; 17022c
ret ret
; 17023a ; 17023a
Function17023a: ; 17023a Jumpto_BattleTowerBattleFunction: ; 17023a
ld a, [wcf63] ld a, [wcf63]
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, Jumptable_170249 ld hl, Jumptable_BattleTowerBattleFunctions
rept 2 rept 2
add hl, de add hl, de
endr endr
@ -22826,20 +22826,20 @@ endr
jp [hl] jp [hl]
; 170249 ; 170249
Jumptable_170249: ; 170249 Jumptable_BattleTowerBattleFunctions: ; 170249
dw Function17024d dw RunBattleTowerBattle
dw Function1704c9 dw SkipBattleTowerBattle
; 17024d ; 17024d
Function17024d: ; 17024d RunBattleTowerBattle: ; 17024d
ld a, [Options] ld a, [Options]
push af push af
ld hl, Options ld hl, Options
set 6, [hl] set 6, [hl]
ld a, [wcfc0] ld a, [InBattleTowerBattle]
push af push af
or $1 or $1
ld [wcfc0], a ld [InBattleTowerBattle], a
xor a xor a
ld [InLinkBattle], a ld [InLinkBattle], a
callba Mobile_HealParty callba Mobile_HealParty
@ -22867,7 +22867,7 @@ Function17024d: ; 17024d
.asm_1702a9 .asm_1702a9
pop af pop af
ld [wcfc0], a ld [InBattleTowerBattle], a
pop af pop af
ld [Options], a ld [Options], a
ld a, $1 ld a, $1
@ -22875,8 +22875,8 @@ Function17024d: ; 17024d
ret ret
; Initialise the BattleTower-Trainer and his Pkmn
Function1702b7: ; 1702b7 Function1702b7: ; 1702b7
; Initialise the BattleTower-Trainer and his Pkmn
call CopyBTTrainer_FromBT_OTrainer_TowBT_OTTempCopy call CopyBTTrainer_FromBT_OTrainer_TowBT_OTTempCopy
ld de, wBT_OTTempCopy + wBT_OTTempCopy_Pkmn1Name ; $c643 ld de, wBT_OTTempCopy + wBT_OTTempCopy_Pkmn1Name ; $c643
ld c, PKMN_NAME_LENGTH ld c, PKMN_NAME_LENGTH
@ -23190,7 +23190,7 @@ CopyBTTrainer_FromBT_OTrainer_TowBT_OTTempCopy: ; 1704a2
ld hl, sNrOfBeatenBattleTowerTrainers ld hl, sNrOfBeatenBattleTowerTrainers
inc [hl] inc [hl]
call CloseSRAM call CloseSRAM
Function1704c9: SkipBattleTowerBattle: ; 1704c9
ret ret
; 1704ca ; 1704ca

View File

@ -1,5 +1,5 @@
UnknownText_0x1ec000: ; 0x1ec000 BattleTowerText_0x1ec000: ; 0x1ec000
text "Hello, glad to" text "Hello, glad to"
line "meet you!" line "meet you!"
@ -8,7 +8,7 @@ UnknownText_0x1ec000: ; 0x1ec000
done done
; 0x1ec03b ; 0x1ec03b
UnknownText_0x1ec03b: ; 0x1ec03b BattleTowerText_0x1ec03b: ; 0x1ec03b
text "Thank you! A most" text "Thank you! A most"
line "enjoyable battle!" line "enjoyable battle!"
done done
@ -20,7 +20,7 @@ UnknownText_0x1ec060: ; 0x1ec060
done done
; 0x1ec080 ; 0x1ec080
UnknownText_0x1ec080: ; 0x1ec080 BattleTowerText_0x1ec080: ; 0x1ec080
text "Work, work, work…" text "Work, work, work…"
line "I'm always busy!" line "I'm always busy!"
done done

View File

@ -1279,7 +1279,13 @@ GameTimerPause:: ; cfbc
ds 1 ds 1
wcfbe:: ds 2 wcfbe:: ds 2
wcfc0:: ds 2
InBattleTowerBattle:: ; cfc0
; 0 not in BattleTower-Battle
; 1 BattleTower-Battle
ds 1
ds 1
FXAnimID:: FXAnimID::
FXAnimIDLo:: ; cfc2 FXAnimIDLo:: ; cfc2
@ -2618,6 +2624,7 @@ w2_d188:: ds 1
SECTION "WRAM 3", WRAMX, BANK [3] SECTION "WRAM 3", WRAMX, BANK [3]
w3_d000:: ; d000
ds $100 ds $100
BT_OTrainer:: BT_OTrainer::
@ -2640,9 +2647,11 @@ BT_OTPkmn3Item::
ds $3b-1 ds $3b-1
ds $24 ds $24
BT_OTrainerEnd:: BT_OTrainerEnd:: ; we_d1e0
ds $620 ds $20
ds $600
wBTChoiceOfLvlGroup:: wBTChoiceOfLvlGroup::
w3_d800:: ds 1 w3_d800:: ds 1