Renamed some unused specials

This commit is contained in:
PikalaxALT 2015-10-01 16:55:24 -04:00
parent ebfa8e2639
commit c50b49bd62
5 changed files with 106 additions and 104 deletions

View File

@ -382,7 +382,7 @@ CheckTileEvent: ; 96874
call CheckBit4_ScriptFlags3 call CheckBit4_ScriptFlags3
jr z, .ok jr z, .ok
call Function97cc0 call RockSmashEncounter
ret c ret c
jr .ok jr .ok
@ -582,7 +582,7 @@ CheckAPressOW: ; 96999
ret c ret c
call TryReadSign call TryReadSign
ret c ret c
call Function97c5f call CheckFacingTileEvent
ret c ret c
xor a xor a
ret ret

View File

@ -44,7 +44,7 @@ Function97c4f:: ; 97c4f
ret ret
; 97c5f ; 97c5f
Function97c5f:: ; 97c5f CheckFacingTileEvent:: ; 97c5f
call GetFacingTileCoord call GetFacingTileCoord
ld [EngineBuffer1], a ld [EngineBuffer1], a
ld c, a ld c, a
@ -95,41 +95,41 @@ Function97c5f:: ; 97c5f
; 97cc0 ; 97cc0
Function97cc0:: ; 97cc0 RockSmashEncounter:: ; 97cc0
; Rock Smash encounter ; Rock Smash encounter
call Function968c7 call Function968c7
jr c, .asm_97ce2 jr c, .nope
call Function97cfd call CanUseSweetScent
jr nc, .asm_97ce2 jr nc, .nope
ld hl, StatusFlags2 ld hl, StatusFlags2
bit 2, [hl] bit 2, [hl]
jr nz, .asm_97cdb jr nz, .bug_contest
callba TryWildEncounter callba TryWildEncounter
jr nz, .asm_97ce2 jr nz, .nope
jr .asm_97ce6 jr .ok
.asm_97cdb .bug_contest
call Function97d23 call _TryWildEncounter_BugContest
jr nc, .asm_97ce2 jr nc, .nope
jr .asm_97ced jr .ok_bug_contest
.asm_97ce2 .nope
ld a, 1 ld a, 1
and a and a
ret ret
.asm_97ce6 .ok
ld a, BANK(RockSmashBattleScript) ld a, BANK(RockSmashBattleScript)
ld hl, RockSmashBattleScript ld hl, RockSmashBattleScript
jr .asm_97cf4 jr .done
.asm_97ced .ok_bug_contest
ld a, BANK(BugCatchingContestBattleScript) ld a, BANK(BugCatchingContestBattleScript)
ld hl, BugCatchingContestBattleScript ld hl, BugCatchingContestBattleScript
jr .asm_97cf4 jr .done
.asm_97cf4 .done
call CallScript call CallScript
scf scf
ret ret
@ -142,45 +142,45 @@ RockSmashBattleScript: ; 97cf9
end end
; 97cfd ; 97cfd
Function97cfd:: ; 97cfd CanUseSweetScent:: ; 97cfd
ld hl, StatusFlags ld hl, StatusFlags
bit 5, [hl] bit 5, [hl]
jr nz, .asm_97d21 jr nz, .no
ld a, [wPermission] ld a, [wPermission]
cp $4 cp $4
jr z, .asm_97d17 jr z, .ice_check
cp $7 cp $7
jr z, .asm_97d17 jr z, .ice_check
callba Function149dd callba Function149dd
jr nc, .asm_97d21 jr nc, .no
.asm_97d17 .ice_check
ld a, [StandingTile] ld a, [StandingTile]
call CheckIceTile call CheckIceTile
jr z, .asm_97d21 jr z, .no
scf scf
ret ret
.asm_97d21 .no
and a and a
ret ret
; 97d23 ; 97d23
Function97d23: ; 97d23 _TryWildEncounter_BugContest: ; 97d23
call TryWildEncounter_BugContest call TryWildEncounter_BugContest
ret nc ret nc
call Function97d31 call ChooseWildEncounter_BugContest
callba CheckRepelEffect callba CheckRepelEffect
ret ret
; 97d31 ; 97d31
Function97d31:: ; 97d31 ChooseWildEncounter_BugContest:: ; 97d31
; Pick a random mon out of ContestMons. ; Pick a random mon out of ContestMons.
.asm_97d31 .loop
call Random call Random
cp 100 << 1 cp 100 << 1
jr nc, .asm_97d31 jr nc, .loop
srl a srl a
ld hl, ContestMons ld hl, ContestMons
@ -232,10 +232,10 @@ TryWildEncounter_BugContest: ; 97d64
ld a, [StandingTile] ld a, [StandingTile]
call CheckSuperTallGrassTile call CheckSuperTallGrassTile
ld b, $66 ld b, $66
jr z, .asm_97d70 jr z, .ok
ld b, $33 ld b, $33
.asm_97d70 .ok
callba ApplyMusicEffectOnEncounterRate callba ApplyMusicEffectOnEncounterRate
callba ApplyCleanseTagEffectOnEncounterRate callba ApplyCleanseTagEffectOnEncounterRate
call Random call Random

View File

@ -83,11 +83,11 @@ SpecialsPointers:: ; c029
add_special PlayMapMusic add_special PlayMapMusic
add_special RestartMapMusic add_special RestartMapMusic
add_special HealMachineAnim add_special HealMachineAnim
add_special Function8379 add_special Special_SurfStartStep
add_special Functionc25a add_special Special_FindGreaterThanThatLevel
add_special Functionc268 add_special Special_FindAtLeastThatHappy
add_special Functionc276 add_special Special_FindThatSpecies
add_special Functionc284 add_special Special_FindThatSpeciesYourTrainerID
add_special Functionc3ef add_special Functionc3ef
add_special Function17421 add_special Function17421
add_special Function17440 add_special Function17440
@ -163,7 +163,7 @@ SpecialsPointers:: ; c029
add_special Function103612 add_special Function103612
add_special SpecialHoOhChamber add_special SpecialHoOhChamber
add_special Function102142 add_special Function102142
add_special Function4989a add_special Special_CelebiShrineEvent
add_special Function49bf9 add_special Function49bf9
add_special SpecialPokeSeer add_special SpecialPokeSeer
add_special SpecialBuenasPassword add_special SpecialBuenasPassword
@ -225,40 +225,40 @@ SpecialSeenMon: ; c252
ret ret
; c25a ; c25a
Functionc25a: ; c25a Special_FindGreaterThanThatLevel: ; c25a
ld a, [ScriptVar] ld a, [ScriptVar]
ld b, a ld b, a
callba Function4dbd2 callba _FindGreaterThanThatLevel
jr z, Functionc298 jr z, FoundNone
jr Functionc292 jr FoundOne
Functionc268: ; c268 Special_FindAtLeastThatHappy: ; c268
ld a, [ScriptVar] ld a, [ScriptVar]
ld b, a ld b, a
callba Function4dbd9 callba _FindAtLeastThatHappy
jr z, Functionc298 jr z, FoundNone
jr Functionc292 jr FoundOne
Functionc276: ; c276 Special_FindThatSpecies: ; c276
ld a, [ScriptVar] ld a, [ScriptVar]
ld b, a ld b, a
callba Function4dbe0 callba _FindThatSpecies
jr z, Functionc298 jr z, FoundNone
jr Functionc292 jr FoundOne
Functionc284: ; c284 Special_FindThatSpeciesYourTrainerID: ; c284
ld a, [ScriptVar] ld a, [ScriptVar]
ld b, a ld b, a
callba Function4dbe6 callba _FindThatSpeciesYourTrainerID
jr z, Functionc298 jr z, FoundNone
jr Functionc292 jr FoundOne
Functionc292: ; c292 FoundOne: ; c292
ld a, $1 ld a, $1
ld [ScriptVar], a ld [ScriptVar], a
ret ret
Functionc298: ; c298 FoundNone: ; c298
xor a xor a
ld [ScriptVar], a ld [ScriptVar], a
ret ret

View File

@ -3728,7 +3728,7 @@ Function8341: ; 8341
ret ret
; 8379 ; 8379
Function8379: ; 8379 Special_SurfStartStep: ; 8379
call Function1b1e call Function1b1e
call Function8388 call Function8388
call Function1b3f call Function1b3f
@ -5008,7 +5008,7 @@ UsedSurfScript: ; c986
special Special_ReplaceKrisSprite special Special_ReplaceKrisSprite
special PlayMapMusic special PlayMapMusic
; step into the water ; step into the water
special Function8379 ; (slow_step_x, step_end) special Special_SurfStartStep ; (slow_step_x, step_end)
applymovement PLAYER, MovementBuffer ; PLAYER, MovementBuffer applymovement PLAYER, MovementBuffer ; PLAYER, MovementBuffer
end end
; c9a2 ; c9a2
@ -40555,13 +40555,13 @@ Unknown_4985a: ; unreferenced
db $a8, $00, $b5, $b0, $de, $e8, $fc, $1c db $a8, $00, $b5, $b0, $de, $e8, $fc, $1c
db $ba, $66, $f7, $0e, $ba, $5e, $43, $bd db $ba, $66, $f7, $0e, $ba, $5e, $43, $bd
Function4989a: ; 4989a Special_CelebiShrineEvent: ; 4989a
call DelayFrame call DelayFrame
ld a, [VramState] ld a, [VramState]
push af push af
xor a xor a
ld [VramState], a ld [VramState], a
call Function49912 call LoadCelebiGFX
ld de, $0750 ld de, $0750
ld a, $2c ld a, $2c
call Function3b2a call Function3b2a
@ -40623,7 +40623,7 @@ endr
ret ret
; 49912 ; 49912
Function49912: ; 49912 LoadCelebiGFX: ; 49912
callba Function8cf53 callba Function8cf53
ld de, SpecialCelebiLeafGFX ld de, SpecialCelebiLeafGFX
ld hl, VTiles1 ld hl, VTiles1
@ -45031,26 +45031,26 @@ Function4dbb8: ; 4dbb8 (13:5bb8)
ld [CurPartyLevel], a ld [CurPartyLevel], a
ret ret
Function4dbd2: ; 4dbd2 _FindGreaterThanThatLevel: ; 4dbd2
ld hl, PartyMon1Level ld hl, PartyMon1Level
call Function4dc31 call FindGreaterThanThatLevel
ret ret
; 4dbd9 ; 4dbd9
Function4dbd9: ; 4dbd9 _FindAtLeastThatHappy: ; 4dbd9
ld hl, PartyMon1Happiness ld hl, PartyMon1Happiness
call Function4dc0a call FindAtLeastThatHappy
ret ret
; 4dbe0 ; 4dbe0
Function4dbe0: ; 4dbe0 _FindThatSpecies: ; 4dbe0
ld hl, PartyMon1Species ld hl, PartyMon1Species
jp Function4dc56 jp FindThatSpecies
; 4dbe6 ; 4dbe6
Function4dbe6: ; 4dbe6 _FindThatSpeciesYourTrainerID: ; 4dbe6
ld hl, PartyMon1Species ld hl, PartyMon1Species
call Function4dc56 call FindThatSpecies
ret z ret z
ld a, c ld a, c
ld hl, PartyMon1ID ld hl, PartyMon1ID
@ -45058,25 +45058,27 @@ Function4dbe6: ; 4dbe6
call AddNTimes call AddNTimes
ld a, [PlayerID] ld a, [PlayerID]
cp [hl] cp [hl]
jr nz, .asm_4dc08 jr nz, .nope
inc hl inc hl
ld a, [PlayerID + 1] ld a, [PlayerID + 1]
cp [hl] cp [hl]
jr nz, .asm_4dc08 jr nz, .nope
ld a, $1 ld a, $1
and a and a
ret ret
.asm_4dc08 .nope
xor a xor a
ret ret
; 4dc0a ; 4dc0a
Function4dc0a: ; 4dc0a FindAtLeastThatHappy: ; 4dc0a
; Sets the bits for the Pokemon that have a happiness greater than or equal to b.
; The lowest bits are used. Sets z if no Pokemon in your party is at least that happy.
ld c, $0 ld c, $0
ld a, [PartyCount] ld a, [PartyCount]
ld d, a ld d, a
.asm_4dc10 .loop
ld a, d ld a, d
dec a dec a
push hl push hl
@ -45087,29 +45089,29 @@ Function4dc0a: ; 4dc0a
ld a, b ld a, b
cp [hl] cp [hl]
pop hl pop hl
jr z, .asm_4dc22 jr z, .greater_equal
jr nc, .asm_4dc26 jr nc, .lower
.asm_4dc22 .greater_equal
ld a, c ld a, c
or $1 or $1
ld c, a ld c, a
.asm_4dc26 .lower
sla c sla c
dec d dec d
jr nz, .asm_4dc10 jr nz, .loop
call Function4dc67 call RetroactivelyIgnoreEggs
ld a, c ld a, c
and a and a
ret ret
; 4dc31 ; 4dc31
Function4dc31: ; 4dc31 FindGreaterThanThatLevel: ; 4dc31
ld c, $0 ld c, $0
ld a, [PartyCount] ld a, [PartyCount]
ld d, a ld d, a
.asm_4dc37 .loop
ld a, d ld a, d
dec a dec a
push hl push hl
@ -45120,52 +45122,52 @@ Function4dc31: ; 4dc31
ld a, b ld a, b
cp [hl] cp [hl]
pop hl pop hl
jr c, .asm_4dc4b jr c, .greater
ld a, c ld a, c
or $1 or $1
ld c, a ld c, a
.asm_4dc4b .greater
sla c sla c
dec d dec d
jr nz, .asm_4dc37 jr nz, .loop
call Function4dc67 call RetroactivelyIgnoreEggs
ld a, c ld a, c
and a and a
ret ret
; 4dc56 ; 4dc56
Function4dc56: ; 4dc56 FindThatSpecies: ; 4dc56
ld c, $ff ld c, -1
ld hl, PartySpecies ld hl, PartySpecies
.asm_4dc5b .loop
ld a, [hli] ld a, [hli]
cp $ff cp -1
ret z ret z
inc c inc c
cp b cp b
jr nz, .asm_4dc5b jr nz, .loop
ld a, $1 ld a, $1
and a and a
ret ret
; 4dc67 ; 4dc67
Function4dc67: ; 4dc67 RetroactivelyIgnoreEggs: ; 4dc67
ld e, $fe ld e, -2
ld hl, PartySpecies ld hl, PartySpecies
.asm_4dc6c .loop
ld a, [hli] ld a, [hli]
cp $ff cp -1
ret z ret z
cp EGG cp EGG
jr nz, .asm_4dc77 jr nz, .skip_notegg
ld a, c ld a, c
and e and e
ld c, a ld c, a
.asm_4dc77 .skip_notegg
rlc e rlc e
jr .asm_4dc6c jr .loop
; 4dc7b ; 4dc7b
@ -48282,7 +48284,7 @@ UnknownScript_0x506e9: ; 0x506e9
; 0x506ef ; 0x506ef
SweetScentEncounter: ; 506ef SweetScentEncounter: ; 506ef
callba Function97cfd callba CanUseSweetScent
jr nc, .no_battle jr nc, .no_battle
ld hl, StatusFlags2 ld hl, StatusFlags2
bit 2, [hl] bit 2, [hl]
@ -48296,7 +48298,7 @@ SweetScentEncounter: ; 506ef
jr .start_battle jr .start_battle
.not_in_bug_contest .not_in_bug_contest
callba Function97d31 callba ChooseWildEncounter_BugContest
.start_battle .start_battle
ld a, $1 ld a, $1

View File

@ -455,7 +455,7 @@ UnknownScript_0x6ee42:
spriteface PLAYER, DOWN spriteface PLAYER, DOWN
pause 20 pause 20
clearflag ENGINE_HAVE_EXAMINED_GS_BALL clearflag ENGINE_HAVE_EXAMINED_GS_BALL
special Function4989a special Special_CelebiShrineEvent
loadpokedata CELEBI, 30 loadpokedata CELEBI, 30
startbattle startbattle
returnafterbattle returnafterbattle