changed more labels

This commit is contained in:
JimB16
2015-09-10 01:27:07 +02:00
parent 0d4c2776d9
commit a7cb2a5e9b
27 changed files with 473 additions and 435 deletions

View File

@@ -9,7 +9,7 @@ AI_SwitchOrTryItem: ; 38000
and a and a
ret nz ret nz
callba Function3e8d1 callba CheckSubstatus_RechargeChargedRampageBideRollout
ret nz ret nz
ld a, [PlayerSubStatus5] ld a, [PlayerSubStatus5]
@@ -24,6 +24,7 @@ AI_SwitchOrTryItem: ; 38000
ld a, [InBattleTowerBattle] ; Load always the first TrainerClass for BattleTower-Trainers 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]
dec a dec a
ld bc, 7 ld bc, 7
@@ -787,17 +788,17 @@ Function38511: ; 38511
; 3851e ; 3851e
Function3851e: ; 3851e Function3851e: ; 3851e
ld [hMultiplier], a ld [hDivisor], a
ld hl, EnemyMonMaxHP ld hl, EnemyMonMaxHP
ld a, [hli] ld a, [hli]
ld [hProduct], a ld [hDividend + 0], a
ld a, [hl] ld a, [hl]
ld [hMultiplicand], a ld [hDividend + 1], a
ld b, $2 ld b, $2
call Divide call Divide
ld a, [$ffb6] ld a, [hQuotient + 2]
ld c, a ld c, a
ld a, [$ffb5] ld a, [hQuotient + 1]
ld b, a ld b, a
ld hl, EnemyMonHP + 1 ld hl, EnemyMonHP + 1
ld a, [hld] ld a, [hld]

View File

@@ -1783,8 +1783,8 @@ AI_Smart_PriorityHit: ; 38d5a
ld [hBattleTurn], a ld [hBattleTurn], a
push hl push hl
callab EnemyAttackDamage callab EnemyAttackDamage
callab BattleCommand62 callab BattleCommand62_DamageCalcWithStats
callab BattleCommand07 callab BattleCommand07_CalcDamageTypeMultiplier
pop hl pop hl
ld a, [CurDamage + 1] ld a, [CurDamage + 1]
ld c, a ld c, a
@@ -3380,8 +3380,8 @@ AIDamageCalc: ; 393e7
.asm_39400 .asm_39400
callab EnemyAttackDamage callab EnemyAttackDamage
callab BattleCommand62 callab BattleCommand62_DamageCalcWithStats
callab BattleCommand07 callab BattleCommand07_CalcDamageTypeMultiplier
ret ret
.ConstantDamageEffects .ConstantDamageEffects

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,7 @@ BattleCommandPointers: ; 3fd28
dw BattleCommand04 ; 34555 dw BattleCommand04 ; 34555
dw BattleCommand05 ; 34631 dw BattleCommand05 ; 34631
dw BattleCommand06 ; 352dc dw BattleCommand06 ; 352dc
dw BattleCommand07 ; 346d2 dw BattleCommand07_CalcDamageTypeMultiplier ; 346d2
dw BattleCommand08 ; 34cfd dw BattleCommand08 ; 34cfd
dw BattleCommand09 ; 34d32 dw BattleCommand09 ; 34d32
dw BattleCommand0a ; 34eee dw BattleCommand0a ; 34eee
@@ -99,7 +99,7 @@ BattleCommandPointers: ; 3fd28
dw BattleCommand5f ; 377ce dw BattleCommand5f ; 377ce
dw BattleCommand60 ; 3784b dw BattleCommand60 ; 3784b
dw BattleCommand61 ; 37874 dw BattleCommand61 ; 37874
dw BattleCommand62 ; 35612 dw BattleCommand62_DamageCalcWithStats ; 35612
dw BattleCommand63 ; 3790e dw BattleCommand63 ; 3790e
dw BattleCommand64 ; 37939 dw BattleCommand64 ; 37939
dw BattleCommand65 ; 37972 dw BattleCommand65 ; 37972
@@ -170,7 +170,7 @@ BattleCommandPointers: ; 3fd28
dw BattleCommanda6 ; 365af dw BattleCommanda6 ; 365af
dw BattleCommanda7 ; 365c3 dw BattleCommanda7 ; 365c3
dw BattleCommanda8 ; 355b5 dw BattleCommanda8 ; 355b5
dw BattleCommanda9 ; 355d5 dw BattleCommanda9_IfAttackMissedResetDamage ; 355d5
dw BattleCommandaa ; 37e80 dw BattleCommandaa ; 37e80
dw BattleCommandab ; 34f57 dw BattleCommandab ; 34f57
dw BattleCommandac ; 3658f dw BattleCommandac ; 3658f

View File

@@ -539,7 +539,7 @@ CheckEnemyTurn: ; 3421f
ld hl, HurtItselfText ld hl, HurtItselfText
call StdBattleTextBox call StdBattleTextBox
call Function355dd call Function355dd
call BattleCommand62 call BattleCommand62_DamageCalcWithStats
call BattleCommand0a call BattleCommand0a
xor a xor a
ld [wcfca], a ld [wcfca], a
@@ -652,7 +652,7 @@ HitConfusion: ; 343a5
ld [CriticalHit], a ld [CriticalHit], a
call Function355dd call Function355dd
call BattleCommand62 call BattleCommand62_DamageCalcWithStats
call BattleCommand0a call BattleCommand0a
xor a xor a
@@ -1336,8 +1336,8 @@ BattleCommand4f: ; 346cd
; 346d2 ; 346d2
BattleCommand07: ; 346d2 BattleCommand07_CalcDamageTypeMultiplier: ; 346d2
; stab ; STAB = Same Type Attack Bonus
ld a, BATTLE_VARS_MOVE_ANIM ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVar call GetBattleVar
cp STRUGGLE cp STRUGGLE
@@ -1354,7 +1354,7 @@ BattleCommand07: ; 346d2
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .go jr z, .go ; Who Attacks and who Defends
ld hl, EnemyMonType1 ld hl, EnemyMonType1
ld a, [hli] ld a, [hli]
@@ -3932,6 +3932,7 @@ BattleCommanda8: ; 355b5
ld a, [wc72d] ld a, [wc72d]
and a and a
ret nz ret nz
jp PrintButItFailed jp PrintButItFailed
; 355bd ; 355bd
@@ -3955,11 +3956,12 @@ Function355bd: ; 355bd
; 355d5 ; 355d5
BattleCommanda9: ; 355d5 BattleCommanda9_IfAttackMissedResetDamage: ; 355d5
; clearmissdamage ; clearmissdamage
ld a, [AttackMissed] ld a, [AttackMissed]
and a and a
ret z ret z
jp ResetDamage jp ResetDamage
; 355dd ; 355dd
@@ -4002,7 +4004,7 @@ endr
; 35612 ; 35612
BattleCommand62: ; 35612 BattleCommand62_DamageCalcWithStats: ; 35612
; damagecalc ; damagecalc
; Return a damage value for move power d, player level e, enemy defense c and player attack b. ; Return a damage value for move power d, player level e, enemy defense c and player attack b.
@@ -4136,12 +4138,12 @@ endr
; Update CurDamage (capped at 997). ; Update CurDamage (capped at 997).
ld hl, CurDamage ld hl, CurDamage
ld b, [hl] ld b, [hl]
ld a, [$ffb6] ld a, [hQuotient + 2]
add b add b
ld [$ffb6], a ld [$ffb6], a
jr nc, .asm_356a5 jr nc, .asm_356a5
ld a, [$ffb5] ld a, [hQuotient + 1]
inc a inc a
ld [$ffb5], a ld [$ffb5], a
and a and a
@@ -4395,22 +4397,22 @@ BattleCommand3f: ; 35726
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
ld a, [hl] ld a, [hl]
jr nz, .asm_357f8 jr nz, .notPlayersTurn
ld hl, wPlayerMoveStruct + MOVE_POWER ld hl, wPlayerMoveStruct + MOVE_POWER
ld [hl], a ld [hl], a
push hl push hl
call PlayerAttackDamage call PlayerAttackDamage
jr .asm_35800 jr .notEnemysTurn
.asm_357f8 .notPlayersTurn
ld hl, wEnemyMoveStruct + MOVE_POWER ld hl, wEnemyMoveStruct + MOVE_POWER
ld [hl], a ld [hl], a
push hl push hl
call EnemyAttackDamage call EnemyAttackDamage
.asm_35800 .notEnemysTurn
call BattleCommand62 call BattleCommand62_DamageCalcWithStats
pop hl pop hl
ld [hl], 1 ld [hl], 1
ret ret
@@ -7200,7 +7202,7 @@ BattleCommand23: ; 3680f
ld a, [BattleType] ld a, [BattleType]
cp BATTLETYPE_SHINY cp BATTLETYPE_SHINY
jp z, .asm_36969 jp z, .asm_36969
cp $9 cp BATTLETYPE_TRAP
jp z, .asm_36969 jp z, .asm_36969
cp BATTLETYPE_CELEBI cp BATTLETYPE_CELEBI
jp z, .asm_36969 jp z, .asm_36969
@@ -9498,7 +9500,7 @@ BattleCommand61: ; 37874
push de push de
.asm_3787d .asm_3787d
call BattleCommand07 call BattleCommand07_CalcDamageTypeMultiplier
ld a, [InLinkBattle] ld a, [InLinkBattle]
cp $3 cp $3
@@ -9746,7 +9748,7 @@ BattleCommand67: ; 379c9
call ClearBox call ClearBox
ld b, 1 ld b, 1
call GetSGBLayout call GetSGBLayout
call Function32f9 call SetPalettes
call BatonPass_LinkPlayerSwitch call BatonPass_LinkPlayerSwitch
; Mobile link battles handle entrances differently ; Mobile link battles handle entrances differently
@@ -9787,7 +9789,7 @@ BattleCommand67: ; 379c9
call CallBattleCore call CallBattleCore
ld a, 1 ld a, 1
ld [wd265], a ld [wd265], a
ld hl, Function3ecab ld hl, ApplyStatLevelMultiplierOnAllStats
call CallBattleCore call CallBattleCore
ld hl, SpikesDamage ld hl, SpikesDamage

View File

@@ -187,7 +187,7 @@ Function109847:: ; 109847
ld [hLCDStatCustom], a ld [hLCDStatCustom], a
call GetCreditsPalette call GetCreditsPalette
call Function32f9 call SetPalettes
ld a, [hVBlank] ld a, [hVBlank]
push af push af
ld a, $5 ld a, $5
@@ -447,7 +447,7 @@ endr
xor a xor a
ld [wcf64], a ; frame ld [wcf64], a ; frame
call GetCreditsPalette call GetCreditsPalette
call Function32f9 ; update hw pal registers call SetPalettes ; update hw pal registers
jr .loop jr .loop
.clear .clear

View File

@@ -33,7 +33,7 @@ Function1dd709: ; 1dd709
call WaitBGMap call WaitBGMap
ld b, $8 ld b, $8
call GetSGBLayout call GetSGBLayout
call Function32f9 call SetPalettes
call DelayFrame call DelayFrame
ret ret
; 1dd760 ; 1dd760

View File

@@ -1021,12 +1021,14 @@ Function96bd3: ; 96bd3
; 96bd7 ; 96bd7
Function96bd7: ; 96bd7 Function96bd7: ; 96bd7
ld a, [wdca1] ld a, [RepelStepsLeft]
and a and a
ret z ret z
dec a dec a
ld [wdca1], a ld [RepelStepsLeft], a
ret nz ret nz
ld a, BANK(RepelWoreOffScript) ld a, BANK(RepelWoreOffScript)
ld hl, RepelWoreOffScript ld hl, RepelWoreOffScript
call CallScript call CallScript

View File

@@ -278,7 +278,7 @@ Function97db5: ; 97db5
call GetMapHeaderPhoneServiceNybble call GetMapHeaderPhoneServiceNybble
and a and a
jr nz, .NoCall jr nz, .NoCall
ld hl, wdca1 + 1 ld hl, wdca2
ld a, [hli] ld a, [hli]
ld d, a ld d, a
ld e, [hl] ld e, [hl]

View File

@@ -594,7 +594,7 @@ Function103fd: ; 103fd
callba WritePartyMenuTilemap callba WritePartyMenuTilemap
callba PrintPartyMenuText callba PrintPartyMenuText
call WaitBGMap call WaitBGMap
call Function32f9 call SetPalettes
call DelayFrame call DelayFrame
callba PartyMenuSelect callba PartyMenuSelect
jr c, .asm_10475 jr c, .asm_10475
@@ -1112,7 +1112,7 @@ Function107bb: ; 107bb
ld a, [InputType] ld a, [InputType]
or a or a
jr z, .asm_107ca jr z, .asm_107ca
callba Function1de28f callba Start_DudeAutoInput_RightA
.asm_107ca .asm_107ca
call Function107d7 call Function107d7
@@ -1507,7 +1507,7 @@ Function10a40: ; 10a40
call WaitBGMap call WaitBGMap
ld b, $14 ld b, $14
call GetSGBLayout call GetSGBLayout
call Function32f9 call SetPalettes
call DelayFrame call DelayFrame
ret ret
; 10a4f ; 10a4f

View File

@@ -50,7 +50,7 @@ PredefPointers:: ; 856b
add_predef PrintMoveDesc add_predef PrintMoveDesc
add_predef UpdatePlayerHUD add_predef UpdatePlayerHUD
add_predef FillBox add_predef FillBox
add_predef Function3d873 add_predef CheckPlayerPartyForFitPkmn
add_predef UpdateEnemyHUD add_predef UpdateEnemyHUD
add_predef StartBattle add_predef StartBattle
add_predef FillInExpBar add_predef FillInExpBar

View File

@@ -70,6 +70,7 @@ Function2ebb:: ; 2ebb
ld a, [wc2cc] ld a, [wc2cc]
bit 1, a bit 1, a
ret z ret z
ld a, [hJoyDown] ld a, [hJoyDown]
bit 1, a ; B_BUTTON bit 1, a ; B_BUTTON
ret ret
@@ -212,7 +213,8 @@ HideSprites:: ; 3016
INCLUDE "home/copy2.asm" INCLUDE "home/copy2.asm"
Function309d:: ; 309d LoadTileMapToTempTileMap:: ; 309d
; Load TileMap into TempTileMap
ld a, [rSVBK] ld a, [rSVBK]
push af push af
ld a, BANK(w2_d000) ld a, BANK(w2_d000)
@@ -226,16 +228,17 @@ Function309d:: ; 309d
ret ret
; 30b4 ; 30b4
Function30b4:: ; 30b4 Call_LoadTempTileMapToTileMap:: ; 30b4
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
call Function30bf call LoadTempTileMapToTileMap
ld a, 1 ld a, 1
ld [hBGMapMode], a ld [hBGMapMode], a
ret ret
; 30bf ; 30bf
Function30bf:: ; 30bf LoadTempTileMapToTileMap:: ; 30bf
; Load TempTileMap into TileMap
ld a, [rSVBK] ld a, [rSVBK]
push af push af
ld a, BANK(w2_d000) ld a, BANK(w2_d000)
@@ -676,11 +679,12 @@ endr
; 32f9 ; 32f9
SetPalettes:: ; 32f9
Function32f9:: ; 32f9 ; Inits the Palettes
; depending on the system the monochromes palettes or color palettes
ld a, [hCGB] ld a, [hCGB]
and a and a
jr nz, .asm_3309 jr nz, .SetPalettesForGameBoyColor
ld a, $e4 ld a, $e4
ld [rBGP], a ld [rBGP], a
ld a, $d0 ld a, $d0
@@ -688,7 +692,7 @@ Function32f9:: ; 32f9
ld [rOBP1], a ld [rOBP1], a
ret ret
.asm_3309 .SetPalettesForGameBoyColor
push de push de
ld a, $e4 ld a, $e4
call DmgToCgbBGPals call DmgToCgbBGPals
@@ -959,10 +963,10 @@ GetPokemonName:: ; 343b
ld h, 0 ld h, 0
ld l, a ld l, a
rept 2 rept 2
add hl, hl add hl, hl ; hl = hl * 4
endr endr
add hl, de add hl, de ; hl = (hl*4) + de
add hl, hl add hl, hl ; hl = (5*hl) + (5*hl)
ld de, PokemonNames ld de, PokemonNames
add hl, de add hl, de
@@ -1159,7 +1163,7 @@ Function3524:: ; 3524
ld hl, VramState ld hl, VramState
bit 0, [hl] bit 0, [hl]
jp nz, UpdateTimePals jp nz, UpdateTimePals
jp Function32f9 jp SetPalettes
; 352f ; 352f
Function352f:: ; 352f Function352f:: ; 352f
@@ -1760,7 +1764,7 @@ Function383d:: ; 383d
Function3842:: ; 3842 Function3842:: ; 3842
ld [wd265], a ld [wd265], a
ld de, wd265 ld de, wd265
ld b, 1 << 6 + 1 ld b, 1 << 6 + 1 ; 65
jp PrintNum jp PrintNum
; 384d ; 384d

View File

@@ -410,7 +410,7 @@ Functionac6:: ; ac6
ld a, [InputType] ld a, [InputType]
or a or a
jr z, .asm_ad9 jr z, .asm_ad9
callba Function1de28a callba Start_DudeAutoInput_A
.asm_ad9 .asm_ad9
call Functionaf5 call Functionaf5
call Functiona57 call Functiona57

View File

@@ -1967,14 +1967,14 @@ Function2b3c:: ; 2b3c
call WhiteBGMap call WhiteBGMap
call Function2bae call Function2bae
call UpdateSprites call UpdateSprites
call Function1d7d call Call_ExitMenu
call Functiond90 call Functiond90
jr Function2b5c jr Function2b5c
; 2b4d ; 2b4d
Function2b4d:: ; 2b4d Function2b4d:: ; 2b4d
call WhiteBGMap call WhiteBGMap
call Function1d7d call Call_ExitMenu
call Function2bae call Function2bae
call UpdateSprites call UpdateSprites
call Functiond90 call Functiond90

View File

@@ -66,7 +66,7 @@ MenuDataHeader_0x1d75:: ; 1d75
db 1 ; default option db 1 ; default option
; 1d7d ; 1d7d
Function1d7d:: ; 1d7d Call_ExitMenu:: ; 1d7d
call ExitMenu call ExitMenu
ret ret
; 1d81 ; 1d81

View File

@@ -273,15 +273,15 @@ Function83b:: ; 83b
; 862 ; 862
Function862:: ; 862 Function862:: ; 862
call Function309d call LoadTileMapToTempTileMap
callab Function4000 callab Function4000
call Function87d call Function87d
jp Function30b4 jp Call_LoadTempTileMapToTileMap
; 871 ; 871
Function871:: ; 871 Function871:: ; 871
call Function309d call LoadTileMapToTempTileMap
callab Function4000 callab Function4000
jp Function87d jp Function87d
; 87d ; 87d

View File

@@ -73,7 +73,7 @@ hRandom EQU $ffe1
hRandomAdd EQU $ffe1 hRandomAdd EQU $ffe1
hRandomSub EQU $ffe2 hRandomSub EQU $ffe2
hBattleTurn EQU $ffe4 hBattleTurn EQU $ffe4 ; Which trainers turn is it? 0: Player, 1: Opponent Trainer
hCGBPalUpdate EQU $ffe5 hCGBPalUpdate EQU $ffe5
hCGB EQU $ffe6 hCGB EQU $ffe6
hSGB EQU $ffe7 hSGB EQU $ffe7

View File

@@ -705,7 +705,7 @@ endr
ld a, [BattleType] ld a, [BattleType]
cp BATTLETYPE_TUTORIAL cp BATTLETYPE_TUTORIAL
ret z ret z
cp 2 cp BATTLETYPE_DEBUG
ret z ret z
cp BATTLETYPE_CONTEST cp BATTLETYPE_CONTEST
jr z, .used_park_ball jr z, .used_park_ball
@@ -1880,7 +1880,7 @@ Functionf21c: ; f21c (3:721c)
callba WritePartyMenuTilemap callba WritePartyMenuTilemap
callba PrintPartyMenuText callba PrintPartyMenuText
call WaitBGMap call WaitBGMap
call Function32f9 call SetPalettes
call DelayFrame call DelayFrame
callba PartyMenuSelect callba PartyMenuSelect
ret ret
@@ -1897,7 +1897,7 @@ Functionf24a: ; f24a (3:724a)
callba WritePartyMenuTilemap callba WritePartyMenuTilemap
callba Function50566 callba Function50566
call WaitBGMap call WaitBGMap
call Function32f9 call SetPalettes
call DelayFrame call DelayFrame
pop bc pop bc
pop de pop de
@@ -2254,18 +2254,19 @@ Repel: ; f46a
; f46c ; f46c
Function_0xf46c: ; f46c Function_0xf46c: ; f46c
ld a, [wdca1] ld a, [RepelStepsLeft]
and a and a
ld hl, UnknownText_0xf47d ld hl, TextJump_RepelUsedEarlierIsStillInEffect
jp nz, PrintText jp nz, PrintText
ld a, b
ld [wdca1], a
jp Functionf789
; f47d
UnknownText_0xf47d: ; 0xf47d ld a, b
ld [RepelStepsLeft], a
jp Functionf789
TextJump_RepelUsedEarlierIsStillInEffect: ; 0xf47d
; The REPEL used earlier is still in effect. ; The REPEL used earlier is still in effect.
text_jump UnknownText_0x1c5bcd text_jump Text_RepelUsedEarlierIsStillInEffect
db "@" db "@"
; 0xf482 ; 0xf482

241
main.asm

File diff suppressed because it is too large Load Diff

View File

@@ -50,7 +50,7 @@ Function17a6a8: ; 17a6a8 (5e:66a8)
call Function17abcf call Function17abcf
callba Function49409 callba Function49409
callba Function49420 callba Function49420
call Function32f9 call SetPalettes
call DelayFrame call DelayFrame
ret ret

Some files were not shown because too many files have changed in this diff Show More