# Conflicts:
#	engine/items/mart.asm
This commit is contained in:
Rangi
2018-06-24 21:23:51 -04:00
1206 changed files with 14376 additions and 24565 deletions

View File

@@ -1,4 +1,4 @@
_BasementKey: ; 507b4
_BasementKey:
; Are we even in the right map to use this?
ld a, [wMapGroup]
cp GROUP_GOLDENROD_UNDERGROUND
@@ -26,9 +26,7 @@ _BasementKey: ; 507b4
ld a, FALSE
ld [wItemEffectSucceeded], a
ret
; 507e1
.BasementKeyScript: ; 0x507e1
.BasementKeyScript:
closetext
farjump BasementDoorScript
; 0x507e6

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,7 @@ GetMobileOTTrainerClass: ; mobile function
ld c, a
ret
.GetMobileOTTrainerClass: ; 4e930
.GetMobileOTTrainerClass:
ld a, [hli]
xor [hl]
ld c, a

View File

@@ -1,4 +1,4 @@
Function_LoadOpponentTrainerAndPokemons: ; 1f8000
Function_LoadOpponentTrainerAndPokemons:
ld a, [rSVBK]
push af
ld a, BANK(wBT_OTTrainer)
@@ -92,7 +92,7 @@ endc
ret
Function_LoadRandomBattleTowerMon: ; 1f8081
Function_LoadRandomBattleTowerMon:
ld c, BATTLETOWER_PARTY_LENGTH
.loop
push bc
@@ -207,7 +207,6 @@ Function_LoadRandomBattleTowerMon: ; 1f8081
ld [sBTMonPrevTrainer3], a
call CloseSRAM
ret
; 1f814e
INCLUDE "data/battle_tower/classes.asm"

View File

@@ -1,35 +1,31 @@
CheckForMobileBattleRules: ; 8b1e1
CheckForMobileBattleRules:
ld de, .PointerTables
call BattleTower_ExecuteJumptable
ret z
call BattleTower_PleaseReturnWhenReady
scf
ret
; 8b1ed
.PointerTables: ; 8b1ed
.PointerTables:
db 2
dw .Functions
dw .TextPointers
.Functions: ; 8b1f2
.Functions:
dw BattleTower_CheckPartyLengthIs3
dw BattleTower_CheckPartyHasThreeMonsThatAreNotEggs
; 8b1f6
.TextPointers: ; 8b1f6
.TextPointers:
dw .ExcuseMeText
dw JumpText_NeedAtLeastThreeMon
dw JumpText_EggDoesNotQualify
; 8b1fc
.ExcuseMeText: ; 0x8b1fc
.ExcuseMeText:
; Excuse me!
text_jump UnknownText_0x1c5937
db "@"
; 0x8b201
_CheckForBattleTowerRules: ; 8b201
_CheckForBattleTowerRules:
ld hl, wStringBuffer2
ld [hl], "3"
inc hl
@@ -40,83 +36,71 @@ _CheckForBattleTowerRules: ; 8b201
call BattleTower_PleaseReturnWhenReady
scf
ret
; 8b215
.PointerTables: ; 8b215
.PointerTables:
db 4
dw .Functions
dw .TextPointers
.Functions: ; 8b21a
.Functions:
dw Function_PartyCountEq3
dw Function_PartySpeciesAreUnique
dw Function_PartyItemsAreUnique
dw Function_HasPartyAnEgg
; 8b222
.TextPointers: ; 8b222
.TextPointers:
dw JumpText_ExcuseMeYoureNotReady
dw JumpText_OnlyThreeMonMayBeEntered
dw JumpText_TheMonMustAllBeDifferentKinds
dw JumpText_TheMonMustNotHoldTheSameItems
dw JumpText_YouCantTakeAnEgg
; 8b22c
JumpText_ExcuseMeYoureNotReady: ; 0x8b22c
JumpText_ExcuseMeYoureNotReady:
; Excuse me. You're not ready.
text_jump Text_ExcuseMeYoureNotReady
db "@"
; 0x8b231
BattleTower_PleaseReturnWhenReady: ; 8b231
BattleTower_PleaseReturnWhenReady:
ld hl, .PleaseReturnWhenReady
call PrintText
ret
; 8b238
.PleaseReturnWhenReady: ; 0x8b238
.PleaseReturnWhenReady:
; Please return when you're ready.
text_jump UnknownText_0x1c5962
db "@"
; 0x8b23d
JumpText_NeedAtLeastThreeMon: ; 0x8b23d
JumpText_NeedAtLeastThreeMon:
; You need at least three #MON.
text_jump UnknownText_0x1c5983
db "@"
; 0x8b242
JumpText_EggDoesNotQualify: ; 0x8b242
JumpText_EggDoesNotQualify:
; Sorry, an EGG doesn't qualify.
text_jump UnknownText_0x1c59a3
db "@"
; 0x8b247
JumpText_OnlyThreeMonMayBeEntered: ; 0x8b247
JumpText_OnlyThreeMonMayBeEntered:
; Only three #MON may be entered.
text_jump Text_OnlyThreeMonMayBeEntered
db "@"
; 0x8b24c
JumpText_TheMonMustAllBeDifferentKinds: ; 0x8b24c
JumpText_TheMonMustAllBeDifferentKinds:
; The @ #MON must all be different kinds.
text_jump Text_TheMonMustAllBeDifferentKinds
db "@"
; 0x8b251
JumpText_TheMonMustNotHoldTheSameItems: ; 0x8b251
JumpText_TheMonMustNotHoldTheSameItems:
; The @ #MON must not hold the same items.
text_jump Text_TheMonMustNotHoldTheSameItems
db "@"
; 0x8b256
JumpText_YouCantTakeAnEgg: ; 0x8b256
JumpText_YouCantTakeAnEgg:
; You can't take an EGG!
text_jump Text_YouCantTakeAnEgg
db "@"
; 0x8b25b
BattleTower_ExecuteJumptable: ; 8b25b
BattleTower_ExecuteJumptable:
ld bc, 0
.loop
call .DoJumptableFunction
@@ -126,9 +110,8 @@ BattleTower_ExecuteJumptable: ; 8b25b
ld a, b
and a
ret
; 8b26c
.DoJumptableFunction: ; 8b26c
.DoJumptableFunction:
push de
push bc
call .GetFunctionPointer
@@ -137,16 +120,14 @@ BattleTower_ExecuteJumptable: ; 8b25b
pop bc
pop de
ret
; 8b276
.Next_CheckReachedEnd: ; 8b276
.Next_CheckReachedEnd:
inc c
ld a, [de]
cp c
ret
; 8b27a
.GetFunctionPointer: ; 8b27a
.GetFunctionPointer:
inc de
ld a, [de]
ld l, a
@@ -154,9 +135,8 @@ BattleTower_ExecuteJumptable: ; 8b25b
ld a, [de]
ld h, a
ret
; 8b281
.GetTextPointers: ; 8b281
.GetTextPointers:
inc de
inc de
inc de
@@ -166,16 +146,14 @@ BattleTower_ExecuteJumptable: ; 8b25b
ld a, [de]
ld h, a
ret
; 8b28a
.LoadTextPointer: ; 8b28a
.LoadTextPointer:
ld a, [hli]
ld h, [hl]
ld l, a
ret
; 8b28e
.PrintFailureText: ; 8b28e
.PrintFailureText:
push de
push bc
ld a, b
@@ -186,18 +164,16 @@ BattleTower_ExecuteJumptable: ; 8b25b
ld b, $1
pop de
ret
; 8b29d
.PrintFirstText: ; 8b29d
.PrintFirstText:
push de
call .GetTextPointers
call .LoadTextPointer
call PrintText
pop de
ret
; 8b2a9
.PrintNthText: ; 8b2a9
.PrintNthText:
push bc
call .GetTextPointers
inc hl
@@ -209,15 +185,13 @@ BattleTower_ExecuteJumptable: ; 8b25b
call PrintText
pop bc
ret
; 8b2bb
BattleTower_CheckPartyLengthIs3: ; 8b2bb
BattleTower_CheckPartyLengthIs3:
ld a, [wPartyCount]
cp BATTLETOWER_PARTY_LENGTH
ret
; 8b2c1
BattleTower_CheckPartyHasThreeMonsThatAreNotEggs: ; 8b2c1
BattleTower_CheckPartyHasThreeMonsThatAreNotEggs:
ld hl, wPartyCount
ld a, [hli]
ld b, $0
@@ -237,23 +211,20 @@ BattleTower_CheckPartyHasThreeMonsThatAreNotEggs: ; 8b2c1
ld a, b
cp BATTLETOWER_PARTY_LENGTH
ret
; 8b2da
Function_PartyCountEq3: ; 8b2da
Function_PartyCountEq3:
ld a, [wPartyCount]
cp BATTLETOWER_PARTY_LENGTH
ret z
scf
ret
; 8b2e2
Function_PartySpeciesAreUnique: ; 8b2e2
Function_PartySpeciesAreUnique:
ld hl, wPartyMon1Species
call VerifyUniqueness
ret
; 8b2e9
VerifyUniqueness: ; 8b2e9
VerifyUniqueness:
ld de, wPartyCount
ld a, [de]
inc de
@@ -296,18 +267,16 @@ VerifyUniqueness: ; 8b2e9
pop hl
scf
ret
; 8b31a
.nextmon ; 8b31a
.nextmon
push bc
ld bc, PARTYMON_STRUCT_LENGTH
add hl, bc
inc de
pop bc
ret
; 8b322
.isegg ; 8b322
.isegg
push bc
ld b, a
ld a, [de]
@@ -315,15 +284,13 @@ VerifyUniqueness: ; 8b2e9
ld a, b
pop bc
ret
; 8b32a
Function_PartyItemsAreUnique: ; 8b32a
Function_PartyItemsAreUnique:
ld hl, wPartyMon1Item
call VerifyUniqueness
ret
; 8b331
Function_HasPartyAnEgg: ; 8b331
Function_HasPartyAnEgg:
ld hl, wPartyCount
ld a, [hli]
ld c, a
@@ -339,4 +306,3 @@ Function_HasPartyAnEgg: ; 8b331
.found
scf
ret
; 8b342

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
BuenasPassword: ; 8af6b
BuenasPassword:
xor a
ld [wWhichIndexSet], a
ld hl, .MenuHeader
@@ -26,25 +26,22 @@ BuenasPassword: ; 8af6b
ld a, b
ld [wScriptVar], a
ret
; 8afa9
.MenuHeader: ; 0x8afa9
.MenuHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 0, 0, 10, 7
dw .MenuData
db 1 ; default option
; 0x8afb1
db 0
.MenuData: ; 0x8afb2
.MenuData:
db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags
db 0 ; items
dw .PasswordIndices
dw .PlacePasswordChoices
; 0x8afb4
.PasswordIndices: ; 8afb8
.PasswordIndices:
db NUM_PASSWORDS_PER_CATEGORY
x = 0
rept NUM_PASSWORDS_PER_CATEGORY
@@ -53,7 +50,7 @@ x = x + 1
endr
db -1
.PlacePasswordChoices: ; 8afbd
.PlacePasswordChoices:
push de
ld a, [wBuenasPassword]
and $f0
@@ -65,9 +62,8 @@ endr
pop hl
call PlaceString
ret
; 8afd4
BuenaPrize: ; 8afd4
BuenaPrize:
xor a
ld [wMenuScrollPosition], a
ld a, $1
@@ -149,56 +145,47 @@ BuenaPrize: ; 8afd4
call JoyWaitAorB
call PlayClickSFX
ret
; 8b072
.Text_AskWhichPrize: ; 0x8b072
.Text_AskWhichPrize:
; Which prize would you like?
text_jump UnknownText_0x1c589f
db "@"
; 0x8b077
.Text_IsThatRight: ; 0x8b077
.Text_IsThatRight:
; ? Is that right?
text_jump UnknownText_0x1c58bc
db "@"
; 0x8b07c
.Text_HereYouGo: ; Here you go!
text_jump UnknownText_0x1c58d1
db "@"
; 0x8b081
.Text_NotEnoughPoints: ; 0x8b081
.Text_NotEnoughPoints:
; You don't have enough points.
text_jump UnknownText_0x1c58e0
db "@"
; 0x8b086
.Text_NoRoom: ; 0x8b086
.Text_NoRoom:
; You have no room for it.
text_jump UnknownText_0x1c58ff
db "@"
; 0x8b08b
.Text_PleaseComeBackAgain: ; 0x8b08b
.Text_PleaseComeBackAgain:
; Oh. Please come back again!
text_jump UnknownText_0x1c591a
db "@"
; 0x8b090
Buena_DisplayBlueCardBalance: ; 8b090
Buena_DisplayBlueCardBalance:
ld hl, BlueCardBalanceMenuHeader
call LoadMenuHeader
ret
; 8b097
PrintBlueCardBalance: ; 8b097
PrintBlueCardBalance:
ld de, wBlueCardBalance
call .DrawBox
ret
; 8b09e
.DrawBox: ; 8b09e
.DrawBox:
push de
xor a
ld [hBGMapMode], a
@@ -221,29 +208,24 @@ PrintBlueCardBalance: ; 8b097
lb bc, 1, 2
call PrintNum
ret
; 8b0ca
.Points_string:
db "Points@"
; 8b0d1
BlueCardBalanceMenuHeader: ; 0x8b0d1
BlueCardBalanceMenuHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 0, 11, 11, 13
; 8b0d6
Buena_PlacePrizeMenuBox: ; 8b0d6
Buena_PlacePrizeMenuBox:
ld hl, .MenuHeader
call LoadMenuHeader
ret
; 8b0dd
.MenuHeader ; 0x8b0dd
.MenuHeader
db MENU_BACKUP_TILES ; flags
menu_coords 0, 0, 17, TEXTBOX_Y - 1
; 8b0e2
Buena_PrizeMenu: ; 8b0e2
Buena_PrizeMenu:
ld hl, .MenuHeader
call CopyMenuHeader
ld a, [wMenuSelection]
@@ -268,29 +250,26 @@ Buena_PrizeMenu: ; 8b0e2
.cancel
xor a
ret
; 8b113
.MenuHeader: ; 0x8b113
.MenuHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 1, 1, 16, 9
dw .MenuData
db 1 ; default option
; 0x8b11b
db 0
.MenuData: ; 0x8b11c
.MenuData:
db SCROLLINGMENU_DISPLAY_ARROWS ; flags
db 4, 13 ; rows, columns
db 1 ; spacing
dba .indices
dba .prizeitem
dba .prizepoints
; 8b129
NUM_BUENA_PRIZES EQU 9 ; ((BuenaPrizeItems.End - BuenaPrizeItems) / 2)
.indices ; 8b129
.indices
db NUM_BUENA_PRIZES
x = 1
rept NUM_BUENA_PRIZES
@@ -298,9 +277,8 @@ rept NUM_BUENA_PRIZES
x = x + 1
endr
db -1
; 8b134
.prizeitem ; 8b134
.prizeitem
ld a, [wMenuSelection]
call Buena_getprize
ld a, [hl]
@@ -310,9 +288,8 @@ endr
pop hl
call PlaceString
ret
; 8b147
.prizepoints ; 8b147
.prizepoints
ld a, [wMenuSelection]
call Buena_getprize
inc hl
@@ -321,9 +298,8 @@ endr
add c
ld [de], a
ret
; 8b154
Buena_getprize: ; 8b154
Buena_getprize:
dec a
ld hl, BuenaPrizeItems
ld b, 0
@@ -331,6 +307,5 @@ Buena_getprize: ; 8b154
add hl, bc
add hl, bc
ret
; 8b15e
INCLUDE "data/items/buena_prizes.asm"

View File

@@ -1,4 +1,4 @@
AskRememberPassword: ; 4ae12
AskRememberPassword:
call .DoMenu
ld a, $0
jr c, .okay
@@ -8,7 +8,7 @@ AskRememberPassword: ; 4ae12
ld [wScriptVar], a
ret
.DoMenu: ; 4ae1f
.DoMenu:
lb bc, 14, 7
push bc
ld hl, YesNoMenuHeader
@@ -42,7 +42,7 @@ AskRememberPassword: ; 4ae12
scf
ret
Buena_ExitMenu: ; 4ae5e
Buena_ExitMenu:
ld a, [hOAMUpdate]
push af
call ExitMenu

View File

@@ -1,4 +1,4 @@
BugContest_SetCaughtContestMon: ; e6ce
BugContest_SetCaughtContestMon:
ld a, [wContestMon]
and a
jr z, .firstcatch
@@ -18,7 +18,7 @@ BugContest_SetCaughtContestMon: ; e6ce
call PrintText
ret
.generatestats ; e6fd
.generatestats
ld a, [wTempEnemyMonSpecies]
ld [wCurSpecies], a
ld [wCurPartySpecies], a
@@ -32,7 +32,7 @@ BugContest_SetCaughtContestMon: ; e6ce
ld hl, wContestMon
jp GeneratePartyMonStats
.caughttext ; 0xe71d
.caughttext
; Caught @ !
text_jump UnknownText_0x1c10c0
db "@"

View File

@@ -1,4 +1,4 @@
GiveParkBalls: ; 135db
GiveParkBalls:
xor a
ld [wContestMon], a
ld a, 20
@@ -6,7 +6,7 @@ GiveParkBalls: ; 135db
farcall StartBugContestTimer
ret
BugCatchingContestBattleScript:: ; 0x135eb
BugCatchingContestBattleScript::
writecode VAR_BATTLETYPE, BATTLETYPE_CONTEST
randomwildmon
startbattle
@@ -15,29 +15,29 @@ BugCatchingContestBattleScript:: ; 0x135eb
iffalse BugCatchingContestOutOfBallsScript
end
BugCatchingContestOverScript:: ; 0x135f8
BugCatchingContestOverScript::
playsound SFX_ELEVATOR_END
opentext
writetext BugCatchingContestText_BeeepTimesUp
waitbutton
jump BugCatchingContestReturnToGateScript
BugCatchingContestOutOfBallsScript: ; 0x13603
BugCatchingContestOutOfBallsScript:
playsound SFX_ELEVATOR_END
opentext
writetext BugCatchingContestText_ContestIsOver
waitbutton
BugCatchingContestReturnToGateScript: ; 0x1360b
BugCatchingContestReturnToGateScript:
closetext
jumpstd bugcontestresultswarp
BugCatchingContestText_BeeepTimesUp: ; 0x1360f
BugCatchingContestText_BeeepTimesUp:
; ANNOUNCER: BEEEP! Time's up!
text_jump UnknownText_0x1bd2ca
db "@"
BugCatchingContestText_ContestIsOver: ; 0x13614
BugCatchingContestText_ContestIsOver:
; ANNOUNCER: The Contest is over!
text_jump UnknownText_0x1bd2e7
db "@"

View File

@@ -1,4 +1,4 @@
SelectRandomBugContestContestants: ; 139a8
SelectRandomBugContestContestants:
; Select five random people to participate in the current contest.
; First we have to make sure that any old data is cleared away.
@@ -54,9 +54,8 @@ SelectRandomBugContestContestants: ; 139a8
dec c
jr nz, .loop2
ret
; 139ed
CheckBugContestContestantFlag: ; 139ed
CheckBugContestContestantFlag:
; Checks the flag of the Bug Catching Contestant whose index is loaded in a.
; Bug: If a >= NUM_BUG_CONTESTANTS when this is called,
@@ -73,11 +72,10 @@ CheckBugContestContestantFlag: ; 139ed
ld b, CHECK_FLAG
call EventFlagAction
ret
; 139fe
INCLUDE "data/events/bug_contest_flags.asm"
ContestDropOffMons: ; 13a12
ContestDropOffMons:
ld hl, wPartyMon1HP
ld a, [hli]
or [hl]
@@ -100,9 +98,8 @@ ContestDropOffMons: ; 13a12
ld a, $1
ld [wScriptVar], a
ret
; 13a31
ContestReturnMons: ; 13a31
ContestReturnMons:
; Restore the species of the second mon.
ld hl, wPartySpecies + 1
ld a, [wBugContestSecondPartySpecies]
@@ -120,4 +117,3 @@ ContestReturnMons: ; 13a31
ld a, b
ld [wPartyCount], a
ret
; 13a47

View File

@@ -1,4 +1,4 @@
DisplayCaughtContestMonStats: ; cc000
DisplayCaughtContestMonStats:
call ClearBGPalettes
call ClearTileMap
call ClearSprites
@@ -86,22 +86,22 @@ DisplayCaughtContestMonStats: ; cc000
.This:
db " THIS <PKMN> @"
SwitchMonText: ; cc0c2
SwitchMonText:
; Switch #MON?
text_jump UnknownText_0x1c10cf
db "@"
DisplayAlreadyCaughtText: ; cc0c7
DisplayAlreadyCaughtText:
call GetPokemonName
ld hl, .AlreadyCaughtText
jp PrintText
.AlreadyCaughtText: ; 0xcc0d0
.AlreadyCaughtText:
; You already caught a @ .
text_jump UnknownText_0x1c10dd
db "@"
DummyPredef2F:
DummyPredef38:
DummyPredef39: ; cc0d5
DummyPredef39:
ret

View File

@@ -1,4 +1,4 @@
_BugContestJudging: ; 1369d
_BugContestJudging:
call ContestScore
farcall StubbedTrainerRankings_BugContestScore
call BugContest_JudgeContestants
@@ -24,9 +24,8 @@ _BugContestJudging: ; 1369d
ld hl, BugContest_FirstPlaceText
call PrintText
jp BugContest_GetPlayersResult
; 136eb
BugContest_FirstPlaceText: ; 0x136eb
BugContest_FirstPlaceText:
text_jump ContestJudging_FirstPlaceText
start_asm
ld de, SFX_1ST_PLACE
@@ -34,15 +33,13 @@ BugContest_FirstPlaceText: ; 0x136eb
call WaitSFX
ld hl, BugContest_FirstPlaceScoreText
ret
; 136fd
BugContest_FirstPlaceScoreText: ; 0x136fd
BugContest_FirstPlaceScoreText:
; The winning score was @ points!
text_jump ContestJudging_FirstPlaceScoreText
db "@"
; 0x13702
BugContest_SecondPlaceText: ; 0x13702
BugContest_SecondPlaceText:
; Placing second was @ , who caught a @ !@ @
text_jump ContestJudging_SecondPlaceText
start_asm
@@ -51,15 +48,13 @@ BugContest_SecondPlaceText: ; 0x13702
call WaitSFX
ld hl, BugContest_SecondPlaceScoreText
ret
; 13714
BugContest_SecondPlaceScoreText: ; 0x13714
BugContest_SecondPlaceScoreText:
; The score was @ points!
text_jump ContestJudging_SecondPlaceScoreText
db "@"
; 0x13719
BugContest_ThirdPlaceText: ; 0x13719
BugContest_ThirdPlaceText:
; Placing third was @ , who caught a @ !@ @
text_jump ContestJudging_ThirdPlaceText
start_asm
@@ -68,15 +63,13 @@ BugContest_ThirdPlaceText: ; 0x13719
call WaitSFX
ld hl, BugContest_ThirdPlaceScoreText
ret
; 1372b
BugContest_ThirdPlaceScoreText: ; 0x1372b
BugContest_ThirdPlaceScoreText:
; The score was @ points!
text_jump ContestJudging_ThirdPlaceScoreText
db "@"
; 0x13730
LoadContestantName: ; 13730
LoadContestantName:
; If a = 1, get your name.
dec a ; BUG_CONTEST_PLAYER
jr z, .player
@@ -131,14 +124,12 @@ LoadContestantName: ; 13730
ld de, wBugContestWinnerName
ld bc, NAME_LENGTH
jp CopyBytes
; 13783
INCLUDE "data/events/bug_contest_winners.asm"
; 13807
BugContest_GetPlayersResult: ; 13807
BugContest_GetPlayersResult:
ld hl, wBugContestThirdPlaceWinnerID
ld de, - BUG_CONTESTANT_SIZE
ld b, 3 ; 3rd, 2nd, or 1st
@@ -152,9 +143,8 @@ BugContest_GetPlayersResult: ; 13807
.done
ret
; 13819
BugContest_JudgeContestants: ; 13819
BugContest_JudgeContestants:
call ClearContestResults
call ComputeAIContestantScores
ld hl, wBugContestTempWinnerID
@@ -168,9 +158,8 @@ BugContest_JudgeContestants: ; 13819
ld [hl], a
call DetermineContestWinners
ret
; 13833
ClearContestResults: ; 13833
ClearContestResults:
ld hl, wBugContestResults
ld b, wBugContestWinnersEnd - wBugContestResults
xor a
@@ -179,9 +168,8 @@ ClearContestResults: ; 13833
dec b
jr nz, .loop
ret
; 1383e
DetermineContestWinners: ; 1383e
DetermineContestWinners:
ld de, wBugContestTempScore
ld hl, wBugContestFirstPlaceScore
ld c, 2
@@ -224,9 +212,8 @@ DetermineContestWinners: ; 1383e
.done
ret
; 138a0
CopyTempContestant: ; 138a0
CopyTempContestant:
; Could've just called CopyBytes.
ld de, wBugContestTempWinnerID
rept BUG_CONTESTANT_SIZE + -1
@@ -238,9 +225,8 @@ endr
inc de
ld [hl], a
ret
; 138b0
ComputeAIContestantScores: ; 138b0
ComputeAIContestantScores:
ld e, 0
.loop
push de
@@ -298,9 +284,8 @@ ComputeAIContestantScores: ; 138b0
cp NUM_BUG_CONTESTANTS
jr nz, .loop
ret
; 13900
ContestScore: ; 13900
ContestScore:
; Determine the player's score in the Bug Catching Contest.
xor a
@@ -383,9 +368,8 @@ ContestScore: ; 13900
.done
ret
; 1397f
.AddContestStat: ; 1397f
.AddContestStat:
ld hl, hMultiplicand
add [hl]
ld [hl], a
@@ -393,4 +377,3 @@ ContestScore: ; 13900
dec hl
inc [hl]
ret
; 13988

View File

@@ -1,4 +1,4 @@
_CardKey: ; 50779
_CardKey:
; Are we even in the right map to use this?
ld a, [wMapGroup]
cp GROUP_RADIO_TOWER_3F
@@ -31,9 +31,7 @@ _CardKey: ; 50779
ld a, FALSE
ld [wItemEffectSucceeded], a
ret
; 507af
.CardKeyScript: ; 0x507af
.CardKeyScript:
closetext
farjump CardKeySlotScript
; 0x507b4

View File

@@ -1,4 +1,4 @@
CatchTutorial:: ; 4e554
CatchTutorial::
ld a, [wBattleType]
dec a
ld c, a
@@ -11,12 +11,12 @@ CatchTutorial:: ; 4e554
ld l, a
jp hl
.dw ; 4e564 (13:6564)
.dw
dw .DudeTutorial
dw .DudeTutorial
dw .DudeTutorial
.DudeTutorial: ; 4e56a (13:656a)
.DudeTutorial:
; Back up your name to your Mom's name.
ld hl, wPlayerName
ld de, wMomsName
@@ -52,7 +52,7 @@ CatchTutorial:: ; 4e554
call CopyBytes
ret
.LoadDudeData: ; 4e5b7 (13:65b7)
.LoadDudeData:
ld hl, wDudeNumItems
ld [hl], 1
inc hl
@@ -68,14 +68,14 @@ CatchTutorial:: ; 4e554
ld hl, wDudeNumBalls
ld a, 1
ld [hli], a
ld a, POKE_BALL ; 5
ld a, POKE_BALL
ld [hli], a
ld [hli], a
ld [hl], -1
ret
.Dude: ; 4e5da
.Dude:
db "DUDE@"
.AutoInput: ; 4e5df
.AutoInput:
db NO_INPUT, $ff ; end

View File

@@ -1,35 +1,35 @@
_DudeAutoInput_A:: ; 1de28a
_DudeAutoInput_A::
ld hl, DudeAutoInput_A
jr _DudeAutoInput
_DudeAutoInput_RightA: ; 1de28f
_DudeAutoInput_RightA:
ld hl, DudeAutoInput_RightA
jr _DudeAutoInput
_DudeAutoInput_DownA: ; 1de294
_DudeAutoInput_DownA:
ld hl, DudeAutoInput_DownA
jr _DudeAutoInput
_DudeAutoInput: ; 1de299
_DudeAutoInput:
ld a, BANK(DudeAutoInputs)
call StartAutoInput
ret
DudeAutoInputs: ; used only for BANK(DudeAutoInputs)
DudeAutoInput_A: ; 1de29f
DudeAutoInput_A:
db NO_INPUT, $50
db A_BUTTON, $00
db NO_INPUT, $ff ; end
DudeAutoInput_RightA: ; 1de2a5
DudeAutoInput_RightA:
db NO_INPUT, $08
db D_RIGHT, $00
db NO_INPUT, $08
db A_BUTTON, $00
db NO_INPUT, $ff ; end
DudeAutoInput_DownA: ; 1de2af
DudeAutoInput_DownA:
db NO_INPUT, $fe
db NO_INPUT, $fe
db NO_INPUT, $fe

View File

@@ -1,6 +1,6 @@
SPECIALCELEBIEVENT_CELEBI EQU $84
CelebiShrineEvent: ; 4989a
CelebiShrineEvent:
call DelayFrame
ld a, [wVramState]
push af
@@ -49,9 +49,8 @@ CelebiShrineEvent: ; 4989a
call CelebiEvent_SetBattleType
ret
; 498f9
.RestorePlayerSprite_DespawnLeaves: ; 498f9
.RestorePlayerSprite_DespawnLeaves:
ld hl, wVirtualOAMSprite00TileID
xor a
ld c, 4
@@ -69,9 +68,8 @@ endr
call ByteFill
ret
; 49912
LoadCelebiGFX: ; 49912
LoadCelebiGFX:
farcall ClearSpriteAnims
ld de, SpecialCelebiLeafGFX
ld hl, vTiles1
@@ -85,9 +83,8 @@ LoadCelebiGFX: ; 49912
ld [wJumptableIndex], a
ret
; 49935
CelebiEvent_CountDown: ; 49935
CelebiEvent_CountDown:
ld hl, wFrameCounter
ld a, [hl]
and a
@@ -101,9 +98,8 @@ CelebiEvent_CountDown: ; 49935
set 7, [hl]
ret
; 49944
CelebiEvent_SpawnLeaf: ; 49944
CelebiEvent_SpawnLeaf:
; unused
ld hl, wcf65
ld a, [hl]
@@ -123,19 +119,18 @@ CelebiEvent_SpawnLeaf: ; 49944
ld [hl], $80
ret
; 49962
SpecialCelebiLeafGFX: ; 49962
SpecialCelebiLeafGFX:
INCBIN "gfx/overworld/cut_grass.2bpp"
SpecialCelebiGFX: ; 499a2
SpecialCelebiGFX:
INCBIN "gfx/overworld/celebi/1.2bpp"
INCBIN "gfx/overworld/celebi/2.2bpp"
INCBIN "gfx/overworld/celebi/3.2bpp"
INCBIN "gfx/overworld/celebi/4.2bpp"
UpdateCelebiPosition: ; 49aa2 (12:5aa2)
UpdateCelebiPosition:
ld hl, SPRITEANIMSTRUCT_XOFFSET
add hl, bc
ld a, [hl]
@@ -230,7 +225,7 @@ UpdateCelebiPosition: ; 49aa2 (12:5aa2)
ret
.FreezeCelebiPosition: ; 49b30 (12:5b30)
.FreezeCelebiPosition:
pop af
ld hl, SPRITEANIMSTRUCT_FRAMESET_ID
add hl, bc
@@ -239,13 +234,12 @@ UpdateCelebiPosition: ; 49aa2 (12:5aa2)
ret
CelebiEvent_Cosine: ; 49b3b (12:5b3b)
CelebiEvent_Cosine:
; a = d * cos(a * pi/32)
add %010000 ; cos(x) = sin(x + pi/2)
calc_sine_wave
; 49bae
GetCelebiSpriteTile: ; 49bae
GetCelebiSpriteTile:
push hl
push bc
push de
@@ -304,9 +298,8 @@ GetCelebiSpriteTile: ; 49bae
pop hl
ret
; 49bed
.AddE: ; 49bed
.AddE:
push af
ld a, d
add e
@@ -314,16 +307,14 @@ GetCelebiSpriteTile: ; 49bae
pop af
ret
; 49bf3
CelebiEvent_SetBattleType: ; 49bf3
CelebiEvent_SetBattleType:
ld a, BATTLETYPE_CELEBI
ld [wBattleType], a
ret
; 49bf9
CheckCaughtCelebi: ; 49bf9
CheckCaughtCelebi:
ld a, [wBattleResult]
bit BATTLERESULT_CAUGHT_CELEBI, a
jr z, .false
@@ -339,4 +330,3 @@ CheckCaughtCelebi: ; 49bf9
.done
ret
; 49c0c

View File

@@ -1,4 +1,4 @@
CheckForHiddenItems: ; b8172
CheckForHiddenItems:
; Checks to see if there are hidden items on the screen that have not yet been found. If it finds one, returns carry.
call GetMapScriptsBank
ld [wBuffer1], a
@@ -75,11 +75,9 @@ CheckForHiddenItems: ; b8172
pop hl
scf
ret
; b81e2
.GetFarByte: ; b81e2
.GetFarByte:
ld a, [wBuffer1]
call GetFarByte
inc hl
ret
; b81ea

View File

@@ -1,4 +1,4 @@
CheckSave:: ; 4cffe
CheckSave::
ld a, BANK(sCheckValue1) ; BANK(sCheckValue2)
call GetSRAMBank
ld a, [sCheckValue1]

View File

@@ -1,4 +1,4 @@
CheckTime:: ; c000
CheckTime::
ld a, [wTimeOfDay]
ld hl, .TimeOfDayTable
ld de, 2
@@ -11,7 +11,7 @@ CheckTime:: ; c000
ld c, a
ret
.TimeOfDayTable: ; c012
.TimeOfDayTable:
db MORN_F, MORN
db DAY_F, DAY
db NITE_F, NITE

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