Skip to content

Commit

Permalink
Minor optimizations in src/scripts files
Browse files Browse the repository at this point in the history
  • Loading branch information
Sha0den committed Aug 29, 2024
1 parent 66b1e80 commit 4366d41
Show file tree
Hide file tree
Showing 24 changed files with 92 additions and 113 deletions.
124 changes: 65 additions & 59 deletions CHANGELOG.md

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions src/scripts/deck_machine_room.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
DeckMachineRoomAfterDuel:
ld hl, .after_duel_table
call FindEndOfDuelScript
ret
jp FindEndOfDuelScript

.after_duel_table
db NPC_AARON
Expand Down
3 changes: 1 addition & 2 deletions src/scripts/fighting_club.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FightingClubAfterDuel:
ld hl, .after_duel_table
call FindEndOfDuelScript
ret
jp FindEndOfDuelScript

.after_duel_table
db NPC_CHRIS
Expand Down
3 changes: 1 addition & 2 deletions src/scripts/fighting_club_lobby.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FightingClubLobbyAfterDuel:
ld hl, .after_duel_table
call FindEndOfDuelScript
ret
jp FindEndOfDuelScript

.after_duel_table
db NPC_IMAKUNI
Expand Down
3 changes: 1 addition & 2 deletions src/scripts/fire_club.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FireClubAfterDuel:
ld hl, .after_duel_table
call FindEndOfDuelScript
ret
jp FindEndOfDuelScript

.after_duel_table
db NPC_JOHN
Expand Down
12 changes: 5 additions & 7 deletions src/scripts/fire_club_lobby.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FireClubLobbyAfterDuel:
ld hl, .after_duel_table
call FindEndOfDuelScript
ret
jp FindEndOfDuelScript

.after_duel_table
db NPC_JESSICA
Expand All @@ -10,16 +9,15 @@ FireClubLobbyAfterDuel:
dw Script_LostToJessicaInFireClubLobby
db $00

FireClubPressedA:
ld hl, SlowpokePaintingObjectTable
call FindExtraInteractableObjects
ret

SlowpokePaintingObjectTable:
db 16, 2, NORTH
dw Script_ee76
db $00

FireClubPressedA:
ld hl, SlowpokePaintingObjectTable
; fallthrough

; Given a table with data of the form:
; X, Y, Dir, Script
; Searches to try to find a match, and starts a Script if possible
Expand Down
3 changes: 1 addition & 2 deletions src/scripts/grass_club.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
GrassClubAfterDuel:
ld hl, .after_duel_table
call FindEndOfDuelScript
ret
jp FindEndOfDuelScript

.after_duel_table
db NPC_KRISTIN
Expand Down
3 changes: 1 addition & 2 deletions src/scripts/grass_club_entrance.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
GrassClubEntranceAfterDuel:
ld hl, GrassClubEntranceAfterDuelTable
call FindEndOfDuelScript
ret
; fallthrough

FindEndOfDuelScript:
ld c, 0
Expand Down
3 changes: 1 addition & 2 deletions src/scripts/grass_club_lobby.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
GrassClubLobbyAfterDuel:
ld hl, .after_duel_table
call FindEndOfDuelScript
ret
jp FindEndOfDuelScript

.after_duel_table
db NPC_BRITTANY
Expand Down
3 changes: 1 addition & 2 deletions src/scripts/hall_of_honor.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
HallOfHonorLoadMap:
ld a, SFX_LEGENDARY_CARDS
call PlaySFX
ret
jp PlaySFX

Script_fbe1:
start_script
Expand Down
4 changes: 0 additions & 4 deletions src/scripts/ishiharas_house.asm
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,3 @@ Script_Ronald:

.ows_dc60
print_text_quit_fully Text0743

; could be a commented function, or could be placed by mistake from
; someone thinking that the Ronald script ended with more code execution
ret
3 changes: 1 addition & 2 deletions src/scripts/lightning_club.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
LightningClubAfterDuel:
ld hl, .after_duel_table
call FindEndOfDuelScript
ret
jp FindEndOfDuelScript

.after_duel_table
db NPC_JENNIFER
Expand Down
3 changes: 1 addition & 2 deletions src/scripts/lightning_club_lobby.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
LightningClubLobbyAfterDuel:
ld hl, .after_duel_table
call FindEndOfDuelScript
ret
jp FindEndOfDuelScript

.after_duel_table
db NPC_IMAKUNI
Expand Down
3 changes: 1 addition & 2 deletions src/scripts/mason_laboratory.asm
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ Script_BeginGame:

MasonLaboratoryAfterDuel:
ld hl, .after_duel_table
call FindEndOfDuelScript
ret
jp FindEndOfDuelScript

.after_duel_table
db NPC_SAM
Expand Down
3 changes: 1 addition & 2 deletions src/scripts/pokemon_dome.asm
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ PokemonDomeMovePlayer:

PokemonDomeAfterDuel:
ld hl, .after_duel_table
call FindEndOfDuelScript
ret
jp FindEndOfDuelScript

.after_duel_table
db NPC_COURTNEY
Expand Down
3 changes: 1 addition & 2 deletions src/scripts/psychic_club.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
PsychicClubAfterDuel:
ld hl, .after_duel_table
call FindEndOfDuelScript
ret
jp FindEndOfDuelScript

.after_duel_table
db NPC_DANIEL
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/psychic_club_entrance.asm
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ NPCMovement_e90f:
Preload_Ronald3InClubEntrance:
get_event_value EVENT_RONALD_SECOND_DUEL_STATE
ld e, 5 ; medal requirement for ronald duel
jp Func_e8a0
jr Func_e8a0

Script_SecondRonaldDuel:
start_script
Expand Down
3 changes: 1 addition & 2 deletions src/scripts/psychic_club_lobby.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
PsychicClubLobbyAfterDuel:
ld hl, .after_duel_table
call FindEndOfDuelScript
ret
jp FindEndOfDuelScript

.after_duel_table
db NPC_ROBERT
Expand Down
4 changes: 1 addition & 3 deletions src/scripts/rock_club.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
RockClubAfterDuel:
ld hl, .after_duel_table
call FindEndOfDuelScript
ret
jp FindEndOfDuelScript

.after_duel_table
db NPC_RYAN
Expand Down Expand Up @@ -119,4 +118,3 @@ Script_LostToGene:

.ows_e09a
print_text_quit_fully Text07b0
ret
3 changes: 1 addition & 2 deletions src/scripts/rock_club_lobby.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
RockClubLobbyAfterDuel:
ld hl, .after_duel_table
call FindEndOfDuelScript
ret
jp FindEndOfDuelScript

.after_duel_table
db NPC_CHRIS
Expand Down
3 changes: 1 addition & 2 deletions src/scripts/science_club.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
ScienceClubAfterDuel:
ld hl, .after_duel_table
call FindEndOfDuelScript
ret
jp FindEndOfDuelScript

.after_duel_table
db NPC_JOSEPH
Expand Down
3 changes: 1 addition & 2 deletions src/scripts/science_club_lobby.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
ScienceClubLobbyAfterDuel:
ld hl, .after_duel_table
call FindEndOfDuelScript
ret
jp FindEndOfDuelScript

.after_duel_table
db NPC_IMAKUNI
Expand Down
5 changes: 2 additions & 3 deletions src/scripts/water_club.asm
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ WaterClubMovePlayer:

WaterClubAfterDuel:
ld hl, .after_duel_table
call FindEndOfDuelScript
ret
jp FindEndOfDuelScript

.after_duel_table
db NPC_SARA
Expand Down Expand Up @@ -77,7 +76,7 @@ Script_BeatAmanda:
start_script
max_out_event_value EVENT_BEAT_AMANDA
print_npc_text AmandaPlayerWon1Text
give_booster_packs BOOSTER_MYSTERY_LIGHTNING_COLORLESS, BOOSTER_MYSTERY_LIGHTNING_COLORLESS, NO_BOOSTER
give_booster_packs BOOSTER_MYSTERY_WATER_COLORLESS, BOOSTER_MYSTERY_WATER_COLORLESS, NO_BOOSTER
print_npc_text AmandaPlayerWon2Text
quit_script_fully

Expand Down
3 changes: 1 addition & 2 deletions src/scripts/water_club_lobby.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
WaterClubLobbyAfterDuel:
ld hl, .after_duel_table
call FindEndOfDuelScript
ret
jp FindEndOfDuelScript

.after_duel_table
db NPC_IMAKUNI
Expand Down

0 comments on commit 4366d41

Please sign in to comment.