diff options
Diffstat (limited to 'engine/events/bug_contest')
-rw-r--r-- | engine/events/bug_contest/caught_mon.asm | 6 | ||||
-rw-r--r-- | engine/events/bug_contest/contest.asm | 14 | ||||
-rw-r--r-- | engine/events/bug_contest/contest_2.asm | 12 | ||||
-rw-r--r-- | engine/events/bug_contest/display_stats.asm | 10 | ||||
-rw-r--r-- | engine/events/bug_contest/judging.asm | 51 |
5 files changed, 35 insertions, 58 deletions
diff --git a/engine/events/bug_contest/caught_mon.asm b/engine/events/bug_contest/caught_mon.asm index 4bad01829..45212ae3e 100644 --- a/engine/events/bug_contest/caught_mon.asm +++ b/engine/events/bug_contest/caught_mon.asm @@ -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 "@" diff --git a/engine/events/bug_contest/contest.asm b/engine/events/bug_contest/contest.asm index c25da1658..4cf4f949a 100644 --- a/engine/events/bug_contest/contest.asm +++ b/engine/events/bug_contest/contest.asm @@ -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 "@" diff --git a/engine/events/bug_contest/contest_2.asm b/engine/events/bug_contest/contest_2.asm index 3e3b16b21..9cf70a03e 100644 --- a/engine/events/bug_contest/contest_2.asm +++ b/engine/events/bug_contest/contest_2.asm @@ -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 diff --git a/engine/events/bug_contest/display_stats.asm b/engine/events/bug_contest/display_stats.asm index 9f6eb50d0..94a5e9511 100644 --- a/engine/events/bug_contest/display_stats.asm +++ b/engine/events/bug_contest/display_stats.asm @@ -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 diff --git a/engine/events/bug_contest/judging.asm b/engine/events/bug_contest/judging.asm index a338e83ec..d8f9d7657 100644 --- a/engine/events/bug_contest/judging.asm +++ b/engine/events/bug_contest/judging.asm @@ -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,10 @@ 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 +141,8 @@ BugContest_GetPlayersResult: ; 13807 .done ret -; 13819 -BugContest_JudgeContestants: ; 13819 +BugContest_JudgeContestants: call ClearContestResults call ComputeAIContestantScores ld hl, wBugContestTempWinnerID @@ -168,9 +156,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 +166,8 @@ ClearContestResults: ; 13833 dec b jr nz, .loop ret -; 1383e -DetermineContestWinners: ; 1383e +DetermineContestWinners: ld de, wBugContestTempScore ld hl, wBugContestFirstPlaceScore ld c, 2 @@ -224,9 +210,8 @@ DetermineContestWinners: ; 1383e .done ret -; 138a0 -CopyTempContestant: ; 138a0 +CopyTempContestant: ; Could've just called CopyBytes. ld de, wBugContestTempWinnerID rept BUG_CONTESTANT_SIZE + -1 @@ -238,9 +223,8 @@ endr inc de ld [hl], a ret -; 138b0 -ComputeAIContestantScores: ; 138b0 +ComputeAIContestantScores: ld e, 0 .loop push de @@ -298,9 +282,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 +366,8 @@ ContestScore: ; 13900 .done ret -; 1397f -.AddContestStat: ; 1397f +.AddContestStat: ld hl, hMultiplicand add [hl] ld [hl], a @@ -393,4 +375,3 @@ ContestScore: ; 13900 dec hl inc [hl] ret -; 13988 |