From a070bdcb21310c7d17b4fd057852f788fdfd61ca Mon Sep 17 00:00:00 2001 From: dannye Date: Mon, 6 Jun 2016 01:22:22 -0500 Subject: Clean up white space --- scripts/museum1f2.asm | 2 +- scripts/oakslab.asm | 4 ++-- scripts/pallettown.asm | 6 +++--- scripts/viridiancity2.asm | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'scripts') diff --git a/scripts/museum1f2.asm b/scripts/museum1f2.asm index f6dfa509..cefc0fce 100755 --- a/scripts/museum1f2.asm +++ b/scripts/museum1f2.asm @@ -104,7 +104,7 @@ Func_f1c1b: call PrintText .asm_f1cfc ret - + Museum1FText_f1cfd: TX_FAR _Museum1FText_5c21a db "@" diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm index 43464d77..6fd540d0 100755 --- a/scripts/oakslab.asm +++ b/scripts/oakslab.asm @@ -604,7 +604,7 @@ OaksLabScript20: callba Music_RivalAlternateStart ld a, $1 ld [hSpriteIndexOrTextID], a - ld de, wNPCMovementDirections2 + ld de, wNPCMovementDirections2 call MoveSprite ld a, $15 ld [W_OAKSLABCURSCRIPT], a @@ -887,7 +887,7 @@ OaksLabText3: call PrintText .asm_1ca6f jp TextScriptEnd - + OaksLabText_1ca72: TX_FAR _OaksLabPikachuText db "@" diff --git a/scripts/pallettown.asm b/scripts/pallettown.asm index 73f50e3e..0b383110 100755 --- a/scripts/pallettown.asm +++ b/scripts/pallettown.asm @@ -127,7 +127,7 @@ PalletTownScript3: ; 18f12 (6:4f12) ld a, SPRITE_FACING_LEFT .asm_18f01 ld [wSpriteStateData1 + 1 * $10 + 9], a - + ; trigger the next script ld a, 4 ld [W_PALLETTOWNCURSCRIPT], a @@ -188,7 +188,7 @@ PalletTownScript6: ; 18f87 (6:4f87) ld a, 7 ld [W_PALLETTOWNCURSCRIPT], a ret - + PalletTownScript7: ld a, [wNPCMovementScriptPointerTableNum] and a @@ -198,7 +198,7 @@ PalletTownScript7: ld a, 8 ld [W_PALLETTOWNCURSCRIPT], a ret - + PalletTownScript8: CheckEvent EVENT_DAISY_WALKING jr nz, .asm_18f9e diff --git a/scripts/viridiancity2.asm b/scripts/viridiancity2.asm index 80ae3924..8feffe59 100755 --- a/scripts/viridiancity2.asm +++ b/scripts/viridiancity2.asm @@ -84,7 +84,7 @@ Func_f192c: ViridianCityText_f1945: TX_FAR _ViridianCityText_19191 db "@" - + Func_f194a: CheckEvent EVENT_GOT_TM42 jr nz, .asm_f1972 @@ -157,7 +157,7 @@ ViridianCityText_f19bb: ViridianCityText_f19c0: TX_FAR _OldManAgainText3 db "@" - + Func_f19c5: ld hl, ViridianCityText_f19cc call PrintText -- cgit v1.3.1-sl0p From a33f356461e29559950f51dbef2e2d83235ea98f Mon Sep 17 00:00:00 2001 From: dannye Date: Mon, 6 Jun 2016 03:22:40 -0500 Subject: Remove unused source files --- audio.asm | 2 +- audio/headers/musicheaders4.asm | 8 +- audio/music/jessieandjames.asm | 303 ------------------------ audio/sfx/unknown_80e71.asm | 45 ---- audio/unknown_832b9.bin | Bin 3399 -> 3398 bytes constants/music_constants.asm | 2 +- data/title_mons.asm | 18 -- engine/evolve_trade.asm | 44 ---- engine/overworld/is_player_just_outside_map.asm | 2 +- engine/predefs17.asm | 22 +- engine/predefs17_2.asm | 15 -- engine/turn_sprite.asm | 25 -- gfx/redgreenversion.png | Bin 126 -> 0 bytes gfx/sgbborder.png | Bin 1048 -> 0 bytes gfx/unknown_ea563.png | Bin 82 -> 0 bytes main.asm | 32 +-- scripts/mtmoon3.asm | 8 +- scripts/pokemontower7.asm | 8 +- scripts/rockethideout4.asm | 8 +- scripts/safarizoneentrance-yellow.asm | 255 -------------------- scripts/safarizoneentrance2.asm | 6 +- scripts/silphco11.asm | 8 +- text/maps/fuchsia_gym_1.asm | 27 --- 23 files changed, 43 insertions(+), 795 deletions(-) delete mode 100755 audio/music/jessieandjames.asm delete mode 100644 audio/sfx/unknown_80e71.asm delete mode 100755 data/title_mons.asm delete mode 100755 engine/evolve_trade.asm delete mode 100755 engine/predefs17_2.asm delete mode 100755 engine/turn_sprite.asm delete mode 100644 gfx/redgreenversion.png delete mode 100644 gfx/sgbborder.png delete mode 100644 gfx/unknown_ea563.png delete mode 100644 scripts/safarizoneentrance-yellow.asm delete mode 100644 text/maps/fuchsia_gym_1.asm (limited to 'scripts') diff --git a/audio.asm b/audio.asm index 16d2f64d..a9eed760 100644 --- a/audio.asm +++ b/audio.asm @@ -746,7 +746,7 @@ INCLUDE "audio/music/yellowintro.asm" SECTION "Music 4", ROMX, BANK[AUDIO_4] INCLUDE "audio/music/surfingpikachu.asm" INCLUDE "audio/music/yellowunusedsong.asm" -INCLUDE "audio/music/jessieandjames.asm" +INCLUDE "audio/music/meetjessiejames.asm" INCBIN "audio/unknown_832b9.bin" diff --git a/audio/headers/musicheaders4.asm b/audio/headers/musicheaders4.asm index 7f26601e..be5d822a 100644 --- a/audio/headers/musicheaders4.asm +++ b/audio/headers/musicheaders4.asm @@ -3,10 +3,10 @@ Music_SurfingPikachu:: dbw CH1, Music_SurfingPikachu_Ch2 dbw CH2, Music_SurfingPikachu_Ch3 -Music_JessieAndJames:: - dbw ((3 - 1) << 6) | CH0, Music_JessieAndJames_Ch1 - dbw CH1, Music_JessieAndJames_Ch2 - dbw CH2, Music_JessieAndJames_Ch3 +Music_MeetJessieJames:: + dbw ((3 - 1) << 6) | CH0, Music_MeetJessieJames_Ch1 + dbw CH1, Music_MeetJessieJames_Ch2 + dbw CH2, Music_MeetJessieJames_Ch3 Music_YellowUnusedSong:: dbw ((4 - 1) << 6) | CH0, Music_YellowUnusedSong_Ch1 diff --git a/audio/music/jessieandjames.asm b/audio/music/jessieandjames.asm deleted file mode 100755 index 0d349ddb..00000000 --- a/audio/music/jessieandjames.asm +++ /dev/null @@ -1,303 +0,0 @@ -Music_JessieAndJames_Ch1: - tempo 144 - volume 7, 7 - duty 3 - vibrato 8, 1, 4 - notetype 12, 11, 2 - octave 3 - G# 1 - G_ 1 - F# 2 - F_ 2 - E_ 2 - D# 2 - D_ 2 - C# 2 - C_ 2 - notetype 12, 11, 6 - D# 12 - C_ 4 -.loop - notetype 12, 11, 2 - octave 4 - D_ 16 - rest 12 - notetype 12, 11, 4 - octave 3 - A# 4 - rest 16 - rest 8 - notetype 12, 11, 2 - octave 2 - A_ 2 - octave 3 - A# 2 - A_ 4 - D_ 1 - D# 1 - D# 2 - D# 2 - D_ 2 - D# 2 - D_ 2 - D# 2 - F_ 2 - D_ 1 - D# 1 - D# 2 - D# 2 - D_ 2 - octave 2 - A# 4 - notetype 12, 11, 4 - octave 3 - B_ 4 - notetype 12, 11, 2 - D_ 1 - D# 1 - D# 2 - D# 2 - D_ 2 - D# 2 - D_ 2 - D# 2 - F_ 2 - D_ 1 - D# 1 - D# 2 - D# 2 - D_ 2 - octave 2 - A# 2 - octave 3 - B_ 2 - notetype 12, 11, 4 - A# 4 - loopchannel 0, .loop - -Music_JessieAndJames_Ch2: - duty 3 - vibrato 6, 1, 5 - notetype 12, 12, 2 - octave 4 - D_ 1 - C# 1 - C_ 2 - octave 3 - B_ 2 - A# 2 - A_ 2 - G# 2 - G_ 2 - F# 2 - notetype 12, 12, 7 - A_ 12 - octave 4 - C# 4 -.loop - notetype 12, 12, 2 - octave 3 - C# 1 - D_ 1 - D_ 2 - D_ 2 - C# 2 - D_ 2 - C# 2 - D_ 2 - E_ 2 - C# 1 - D_ 1 - D_ 2 - D_ 2 - C# 2 - octave 2 - A_ 4 - notetype 12, 12, 5 - octave 4 - C# 4 - notetype 12, 12, 2 - D_ 1 - octave 3 - D_ 1 - D_ 2 - D_ 2 - C# 2 - D_ 2 - C# 2 - D_ 2 - E_ 2 - C# 1 - D_ 1 - D_ 2 - D_ 2 - C# 2 - notetype 12, 12, 6 - octave 4 - D_ 8 - notetype 12, 12, 2 - D# 6 - F_ 4 - D# 4 - octave 3 - A# 2 - octave 4 - D# 6 - F_ 4 - D# 2 - notetype 12, 12, 5 - D_ 4 - notetype 12, 12, 2 - D# 6 - F_ 4 - D# 4 - octave 3 - A# 2 - octave 4 - D# 4 - F_ 4 - notetype 12, 12, 5 - D# 8 - loopchannel 0, .loop - -Music_JessieAndJames_Ch3: - notetype 12, 1, 0 - rest 16 - rest 8 - octave 4 - D_ 2 - octave 3 - A_ 2 - octave 4 - C_ 2 - D# 2 -.loop - D_ 1 - rest 1 - A_ 1 - rest 1 - D_ 1 - rest 1 - A_ 1 - rest 1 - D_ 1 - rest 1 - A_ 1 - rest 1 - D_ 1 - rest 1 - A_ 1 - rest 1 - D_ 1 - rest 1 - A_ 1 - rest 1 - D_ 1 - rest 1 - A_ 1 - rest 1 - D_ 1 - rest 1 - A# 2 - A_ 2 - D# 2 - D_ 1 - rest 1 - A_ 1 - rest 1 - D_ 1 - rest 1 - A_ 1 - rest 1 - D_ 1 - rest 1 - A_ 1 - rest 1 - D_ 1 - rest 1 - A_ 1 - rest 1 - D_ 1 - rest 1 - A_ 1 - rest 1 - D_ 1 - rest 1 - A_ 1 - rest 1 - D_ 1 - rest 1 - octave 3 - A_ 2 - octave 4 - C_ 2 - D_ 2 - D# 1 - rest 1 - A# 1 - rest 1 - D# 1 - rest 1 - A# 1 - rest 1 - D# 1 - rest 1 - A# 1 - rest 1 - D# 1 - rest 1 - A# 1 - rest 1 - D# 1 - rest 1 - A# 1 - rest 1 - D# 1 - rest 1 - A# 1 - rest 1 - D# 1 - rest 1 - octave 3 - A# 1 - rest 1 - octave 4 - C# 1 - rest 1 - E_ 1 - rest 1 - D# 1 - rest 1 - A# 1 - rest 1 - D# 1 - rest 1 - A# 1 - rest 1 - D# 1 - rest 1 - A# 1 - rest 1 - D# 1 - rest 1 - A# 1 - rest 1 - D# 1 - rest 1 - A# 1 - rest 1 - D# 1 - rest 1 - A# 1 - rest 1 - D# 1 - rest 1 - octave 3 - A# 1 - rest 1 - octave 4 - C# 1 - rest 1 - E_ 1 - rest 1 - loopchannel 0, .loop diff --git a/audio/sfx/unknown_80e71.asm b/audio/sfx/unknown_80e71.asm deleted file mode 100644 index 1b8241fb..00000000 --- a/audio/sfx/unknown_80e71.asm +++ /dev/null @@ -1,45 +0,0 @@ -SFX_80e91_4_Ch4: - executemusic - tempo 256 - volume 7, 7 - vibrato 6, 2, 6 - duty 2 - toggleperfectpitch - notetype 4, 11, 1 - octave 3 - G# 2 - G# 2 - G# 2 - notetype 12, 11, 3 - octave 4 - E_ 4 - endchannel - -SFX_80ea8_4_Ch5: - executemusic - vibrato 8, 2, 7 - duty 2 - notetype 4, 12, 1 - octave 4 - E_ 2 - E_ 2 - E_ 2 - notetype 12, 12, 3 - B_ 4 - endchannel - -SFX_80eb8_4_Ch6: - executemusic - notetype 4, 1, 0 - octave 4 - B_ 1 - rest 1 - B_ 1 - rest 1 - B_ 1 - rest 1 - notetype 12, 1, 0 - octave 4 - B_ 2 - rest 2 - endchannel diff --git a/audio/unknown_832b9.bin b/audio/unknown_832b9.bin index 96a64283..1c14816a 100755 Binary files a/audio/unknown_832b9.bin and b/audio/unknown_832b9.bin differ diff --git a/constants/music_constants.asm b/constants/music_constants.asm index 6e34bc0d..c0ff2b8b 100644 --- a/constants/music_constants.asm +++ b/constants/music_constants.asm @@ -96,7 +96,7 @@ ENDM ; AUDIO_4 music_const MUSIC_SURFING_PIKACHU, Music_SurfingPikachu - music_const MUSIC_JESSIE_AND_JAMES, Music_JessieAndJames + music_const MUSIC_MEET_JESSIE_JAMES, Music_MeetJessieJames music_const MUSIC_YELLOW_UNUSED_SONG, Music_YellowUnusedSong music_const MUSIC_GB_PRINTER, Music_GBPrinter diff --git a/data/title_mons.asm b/data/title_mons.asm deleted file mode 100755 index e27742af..00000000 --- a/data/title_mons.asm +++ /dev/null @@ -1,18 +0,0 @@ -TitleMons: ; 4588 (1:4588) -; mons on the title screen are randomly chosen from here - db CHARMANDER - db SQUIRTLE - db BULBASAUR - db WEEDLE - db NIDORAN_M - db SCYTHER - db PIKACHU - db CLEFAIRY - db RHYDON - db ABRA - db GASTLY - db DITTO - db PIDGEOTTO - db ONIX - db PONYTA - db MAGIKARP diff --git a/engine/evolve_trade.asm b/engine/evolve_trade.asm deleted file mode 100755 index 81e41166..00000000 --- a/engine/evolve_trade.asm +++ /dev/null @@ -1,44 +0,0 @@ -EvolveTradeMon: ; 17d7d (5:7d7d) -; Verify the TradeMon's species name before -; attempting to initiate a trade evolution. - -; The names of the trade evolutions in Blue (JP) -; are checked. In that version, TradeMons that -; can evolve are Graveler and Haunter. - -; In localization, this check was translated -; before monster names were finalized. -; Then, Haunter's name was "Spectre". -; Since its name no longer starts with -; "SP", it is prevented from evolving. - -; This may have been why Red/Green's trades -; were used instead, where none can evolve. - -; This was fixed in Yellow. - - ld a, [wInGameTradeReceiveMonName] - - ; GRAVELER - cp "G" - jr z, .ok - - ; "SPECTRE" (HAUNTER) - cp "S" - ret nz - ld a, [wInGameTradeReceiveMonName + 1] - cp "P" - ret nz - -.ok - ld a, [wPartyCount] - dec a - ld [wWhichPokemon], a - ld a, $1 - ld [wForceEvolution], a - ld a, LINK_STATE_TRADING - ld [wLinkState], a - callab TryEvolvingMon - xor a ; LINK_STATE_NONE - ld [wLinkState], a - jp PlayDefaultMusic diff --git a/engine/overworld/is_player_just_outside_map.asm b/engine/overworld/is_player_just_outside_map.asm index e9ba204a..19823c53 100644 --- a/engine/overworld/is_player_just_outside_map.asm +++ b/engine/overworld/is_player_just_outside_map.asm @@ -1,5 +1,5 @@ ; returns whether the player is one tile outside the map in Z -IsPlayerJustOutsideMap: ; 128d8 (4:68d8) +IsPlayerJustOutsideMap: ; e876c (3a:476c) ld a, [wYCoord] ld b, a ld a, [wCurMapHeight] diff --git a/engine/predefs17.asm b/engine/predefs17.asm index a674b45a..49818543 100755 --- a/engine/predefs17.asm +++ b/engine/predefs17.asm @@ -1,9 +1,15 @@ -; this function temporarily makes the starters (and Ivysaur) seen -; so that the full Pokedex information gets displayed in Oak's lab -StarterDex: ; 5c0dc (17:40dc) - ld a, %01001011 ; set starter flags - ld [wPokedexOwned], a - predef ShowPokedexData - xor a ; unset starter flags - ld [wPokedexOwned], a +; updates the types of a party mon (pointed to in hl) to the ones of the mon specified in wd11e +SetPartyMonTypes: ; 5db93 (17:5b93) + call GetPredefRegisters + ld bc, wPartyMon1Type - wPartyMon1 ; $5 + add hl, bc + ld a, [wd11e] + ld [wd0b5], a + push hl + call GetMonHeader + pop hl + ld a, [wMonHType1] + ld [hli], a + ld a, [wMonHType2] + ld [hl], a ret diff --git a/engine/predefs17_2.asm b/engine/predefs17_2.asm deleted file mode 100755 index c0df7d0a..00000000 --- a/engine/predefs17_2.asm +++ /dev/null @@ -1,15 +0,0 @@ -; updates the types of a party mon (pointed to in hl) to the ones of the mon specified in wd11e -SetPartyMonTypes: ; 5db5e (17:5b5e) - call GetPredefRegisters - ld bc, wPartyMon1Type - wPartyMon1 ; $5 - add hl, bc - ld a, [wd11e] - ld [wd0b5], a - push hl - call GetMonHeader - pop hl - ld a, [wMonHType1] - ld [hli], a - ld a, [wMonHType2] - ld [hl], a - ret diff --git a/engine/turn_sprite.asm b/engine/turn_sprite.asm deleted file mode 100755 index 84037cfe..00000000 --- a/engine/turn_sprite.asm +++ /dev/null @@ -1,25 +0,0 @@ -UpdateSpriteFacingOffsetAndDelayMovement: ; 13074 (4:7074) - ld h, $c2 - ld a, [H_CURRENTSPRITEOFFSET] - add $8 - ld l, a - ld a, $7f ; maximum movement delay - ld [hl], a ; c2x8 (movement delay) - dec h - ld a, [H_CURRENTSPRITEOFFSET] - add $9 - ld l, a - ld a, [hld] ; c1x9 (facing direction) - ld b, a - xor a - ld [hld], a - ld [hl], a ; c1x8 (walk animation frame) - ld a, [H_CURRENTSPRITEOFFSET] - add $2 - ld l, a - ld a, [hl] ; c1x2 (facing and animation table offset) - or b ; or in the facing direction - ld [hld], a - ld a, $2 ; delayed movement status - ld [hl], a ; c1x1 (movement status) - ret diff --git a/gfx/redgreenversion.png b/gfx/redgreenversion.png deleted file mode 100644 index e41b4295..00000000 Binary files a/gfx/redgreenversion.png and /dev/null differ diff --git a/gfx/sgbborder.png b/gfx/sgbborder.png deleted file mode 100644 index 7549bb47..00000000 Binary files a/gfx/sgbborder.png and /dev/null differ diff --git a/gfx/unknown_ea563.png b/gfx/unknown_ea563.png deleted file mode 100644 index adf086ca..00000000 Binary files a/gfx/unknown_ea563.png and /dev/null differ diff --git a/main.asm b/main.asm index cc67186d..f263f4be 100755 --- a/main.asm +++ b/main.asm @@ -1665,20 +1665,7 @@ VictoryRoad1Blocks: INCBIN "maps/victoryroad1.blk" INCLUDE "engine/evolution.asm" -SetPartyMonTypes:: - call GetPredefRegisters - ld bc, 5 - add hl, bc - ld a, [wd11e] - ld [wd0b5], a - push hl - call GetMonHeader - pop hl - ld a, [wMonHType1] - ld [hli], a - ld a, [wMonHType2] - ld [hl], a - ret +INCLUDE "engine/predefs17.asm" INCLUDE "engine/hidden_object_functions17.asm" @@ -2154,21 +2141,8 @@ INCBIN "gfx/pikachu/unknown_e7d13.2bpp" SECTION "bank3A",ROMX,BANK[$3A] INCLUDE "text/monster_names.asm" -IsPlayerJustOutsideMap: ; e876c (3a:476c) - ld a, [wYCoord] - ld b, a - ld a, [wCurMapHeight] - call Func_e877e - ret z - ld a, [wXCoord] - ld b, a - ld a, [wCurMapWidth] -Func_e877e: - add a - cp b - ret z - inc b - ret + +INCLUDE "engine/overworld/is_player_just_outside_map.asm" INCLUDE "engine/printer.asm" INCLUDE "engine/diploma_3a.asm" diff --git a/scripts/mtmoon3.asm b/scripts/mtmoon3.asm index 1de3445d..8aee239c 100755 --- a/scripts/mtmoon3.asm +++ b/scripts/mtmoon3.asm @@ -225,8 +225,8 @@ MtMoon3Script_49e15: cp $5 ret nz call StopAllMusic - ld c, BANK(Music_JessieAndJames) - ld a, MUSIC_JESSIE_AND_JAMES + ld c, BANK(Music_MeetJessieJames) + ld a, MUSIC_MEET_JESSIE_JAMES call PlayMusic xor a ld [hJoyHeld], a @@ -361,8 +361,8 @@ MtMoon3Script13: xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a call StopAllMusic - ld c, BANK(Music_JessieAndJames) - ld a, MUSIC_JESSIE_AND_JAMES + ld c, BANK(Music_MeetJessieJames) + ld a, MUSIC_MEET_JESSIE_JAMES call PlayMusic ld a, $ff ld [wJoyIgnore], a diff --git a/scripts/pokemontower7.asm b/scripts/pokemontower7.asm index abf6104d..58e6d327 100755 --- a/scripts/pokemontower7.asm +++ b/scripts/pokemontower7.asm @@ -45,8 +45,8 @@ PokemonTower7Script_60d2a: SetEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1 .asm_60d47 call StopAllMusic - ld c, BANK(Music_JessieAndJames) - ld a, MUSIC_JESSIE_AND_JAMES + ld c, BANK(Music_MeetJessieJames) + ld a, MUSIC_MEET_JESSIE_JAMES call PlayMusic xor a ld [hJoyHeld], a @@ -182,8 +182,8 @@ PokemonTower7Script8: xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a call StopAllMusic - ld c, BANK(Music_JessieAndJames) - ld a, MUSIC_JESSIE_AND_JAMES + ld c, BANK(Music_MeetJessieJames) + ld a, MUSIC_MEET_JESSIE_JAMES call PlayMusic ld a, $ff ld [wJoyIgnore], a diff --git a/scripts/rockethideout4.asm b/scripts/rockethideout4.asm index 75cb7912..30ed3f24 100755 --- a/scripts/rockethideout4.asm +++ b/scripts/rockethideout4.asm @@ -93,8 +93,8 @@ RocketHideout4Script_455a5: ld a, $fc ld [wJoyIgnore], a call StopAllMusic - ld c, BANK(Music_JessieAndJames) - ld a, MUSIC_JESSIE_AND_JAMES + ld c, BANK(Music_MeetJessieJames) + ld a, MUSIC_MEET_JESSIE_JAMES call PlayMusic call UpdateSprites call Delay3 @@ -237,8 +237,8 @@ RocketHideout4Script11: xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a call StopAllMusic - ld c, BANK(Music_JessieAndJames) - ld a, MUSIC_JESSIE_AND_JAMES + ld c, BANK(Music_MeetJessieJames) + ld a, MUSIC_MEET_JESSIE_JAMES call PlayMusic ld a, $ff ld [wJoyIgnore], a diff --git a/scripts/safarizoneentrance-yellow.asm b/scripts/safarizoneentrance-yellow.asm deleted file mode 100644 index da9a068e..00000000 --- a/scripts/safarizoneentrance-yellow.asm +++ /dev/null @@ -1,255 +0,0 @@ -.xf1f77 - ld hl,.ForJust500Text - call PrintText - ld a,MONEY_BOX - ld [wTextBoxID],a - call DisplayTextBoxID - call YesNoChoice - ld a,[wCurrentMenuItem] - and a - jp nz,.PleaseComeAgain - ld hl,$d346 ; yellow d346 - ld a,[hli] - or [hl] - inc hl - or [hl] - jr nz,.xf1f9f -.xf1f98 - call .xf20ce - jr c,.CantPayWalkDown - jr .xf1ff2 - -.xf1f9f - xor a - ld [hMoney],a - ld a,$05 - ld [hMoney + 1],a - ld a,$00 - ld [hMoney + 2],a - call HasEnoughMoney - jr nc,.success - ld hl,.NotEnoughMoneyText - call PrintText - call .xf2077 - jr c,.CantPayWalkDown - jr .xf1ff2 - -.success - xor a - ld [wPriceTemp],a - ld a,$05 - ld [wPriceTemp + 1],a - ld a,$00 - ld [wPriceTemp + 2],a - ld hl,wPriceTemp + 2 - ld de,wPlayerMoney + 2 - ld c,3 - predef SubBCDPredef - ld a,$b2 - call $3736 - call $373e - ld a,MONEY_BOX - ld [wTextBoxID],a - call DisplayTextBoxID - ld hl,.MakePaymentText - call PrintText - ld a,30 - lb hl, (502 / $100), (502 % $100) -.xf1ff2 - ld [wNumSafariBalls],a - ld a,h - ld [wSafariSteps],a - ld a,l - ld [wSafariSteps + 1],a - ld a,D_UP - ld c,3 - call SafariZoneEntranceAutoWalk - SetEvent EVENT_IN_SAFARI_ZONE - ResetEventReuseHL EVENT_SAFARI_GAME_OVER - ld a,3 - ld [wSafariZoneEntranceCurScript],a - jr .done - -.PleaseComeAgain - ld hl,.PleaseComeAgainText - call PrintText -.CantPayWalkDown - ld a,D_DOWN - ld c,1 - call SafariZoneEntranceAutoWalk - ld a,4 - ld [wSafariZoneEntranceCurScript],a -.done - ret - -.ForJust500Text - TX_FAR SafariZoneEntranceText_9e6e4 - db "@" - -.MakePaymentText - TX_FAR SafariZoneEntranceText_9e747 - db $b - TX_FAR _SafariZoneEntranceText_75360 - db "@" - -.PleaseComeAgainText - TX_FAR _SafariZoneEntranceText_75365 - db "@" - -.NotEnoughMoneyText - TX_FAR _SafariZoneEntranceText_7536a - db "@" - -.SafariZoneEntranceText2 - ld hl,.FirstTimeQuestionText - call PrintText - call YesNoChoice - ld a,[wCurrentMenuItem] - and a - ld hl,.RegularText - jr nz,.Explanation - ld hl,.ExplanationText -.Explanation - call PrintText - ret - -.FirstTimeQuestionText - TX_FAR _SafariZoneEntranceText_753e6 - db "@" - -.ExplanationText - TX_FAR _SafariZoneEntranceText_753eb - db "@" - -.RegularText - TX_FAR _SafariZoneEntranceText_753f0 - db "@" - -SafariZoneEntranceAutoWalk: - push af - ld b,0 - ld a,c - ld [wSimulatedJoypadStatesIndex],a - ld hl,wSimulatedJoypadStatesEnd - pop af - call FillMemory - jp StartSimulatingJoypadStates - -.xf2077 - ld hl,wPlayerMoney - ld de,$ff9f - ld bc,3 - call $b1 ; yellow $00b1 - xor a - ld [$ffa2],a - ld [$ffa3],a - ld a,$17 ; ¥17 per safari ball - ld [$ffa4],a - predef DivideBCDPredef3 - ld a,[$ffa4] - call .xf211e - pop af - ld hl,$d346 - xor a - ld bc,3 - call FillMemory - ld hl,.OhAllRightText - call PrintText_NoCreatingTextBox - ld a,MONEY_BOX - ld a,[$d124] - call DisplayTextBoxID - ld hl,.CantGive30BallsText - call PrintText - pop af - inc a - jr z,.xf20bd - cp 29 - jr c,.xf20bf -.xf20bd - ld a,29 -.xf20bf - ld hl,$1f6 - and a - ret - -.OhAllRightText - TX_FAR _SafariZoneLowCostText1 - db "@" - -.CantGive30BallsText - TX_FAR _SafariZoneLowCostText2 - db "@" - -.xf20ce - ld hl,$d70c - ld a,[hl] - push af - inc [hl] - ld e,a - ld d,0 - ld hl,.lowcosttextpointers - add hl,de - add hl,de - ld a,[hli] - ld h,[hl] - ld l,a - call PrintText - pop af - cp 3 - jr z,.next - scf - ret - -.next - ld hl,.xf20f6 - call $3c46 - ld a,1 - ld hl,$01f6 - and a - ret - -.xf20f6 - TX_FAR _SafariZoneLowCostText3 - db $b - TX_FAR _SafariZoneLowCostText4 - db "@" - -.lowcosttextpointers - dw .xf210a - dw .xf210f - dw .xf2114 - dw .xf2119 - dw .xf2119 - -.xf210a - TX_FAR _SafariZoneLowCostText5 - db "@" - -.xf210f - TX_FAR _SafariZoneLowCostText6 - db "@" - -.xf2114 - TX_FAR _SafariZoneLowCostText7 - db "@" - -.xf2119 - TX_FAR _SafariZoneLowCostText8 - db "@" - -.xf211e - push hl - ld c,a - and $f - ld l,a - ld h,0 - ld a,c - and $f0 - swap a - ld bc,$a - call $3a74 - ld a,l - pop hl - ret - -.xf2133 diff --git a/scripts/safarizoneentrance2.asm b/scripts/safarizoneentrance2.asm index 0eb50790..4a6c23e6 100755 --- a/scripts/safarizoneentrance2.asm +++ b/scripts/safarizoneentrance2.asm @@ -62,7 +62,7 @@ Func_f1f77: ld [wSafariSteps + 1], a ld a, D_UP ld c, 3 - call SafariZoneEntranceStartSimulatiingJoypadStates + call SafariZoneEntranceStartSimulatingJoypadStates SetEvent EVENT_IN_SAFARI_ZONE ResetEventReuseHL EVENT_SAFARI_GAME_OVER ld a, $3 @@ -74,7 +74,7 @@ Func_f1f77: .deny_entry ld a, D_DOWN ld c, 1 - call SafariZoneEntranceStartSimulatiingJoypadStates + call SafariZoneEntranceStartSimulatingJoypadStates ld a, $4 ld [wSafariZoneEntranceCurScript], a .asm_f2024 @@ -123,7 +123,7 @@ Func_f203e: TX_FAR _SafariZoneEntranceText_753f0 db "@" -SafariZoneEntranceStartSimulatiingJoypadStates: +SafariZoneEntranceStartSimulatingJoypadStates: push af ld b, $0 ld a, c diff --git a/scripts/silphco11.asm b/scripts/silphco11.asm index a2354a69..42e8d574 100755 --- a/scripts/silphco11.asm +++ b/scripts/silphco11.asm @@ -229,8 +229,8 @@ SilphCo11Script_6229c: SetEventReuseHL EVENT_781 .asm_622c3 call StopAllMusic - ld c, BANK(Music_JessieAndJames) - ld a, MUSIC_JESSIE_AND_JAMES + ld c, BANK(Music_MeetJessieJames) + ld a, MUSIC_MEET_JESSIE_JAMES call PlayMusic xor a ld [hJoyHeld], a @@ -417,8 +417,8 @@ SilphCo11Script12: xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a call StopAllMusic - ld c, BANK(Music_JessieAndJames) - ld a, MUSIC_JESSIE_AND_JAMES + ld c, BANK(Music_MeetJessieJames) + ld a, MUSIC_MEET_JESSIE_JAMES call PlayMusic ld a, $ff ld [wJoyIgnore], a diff --git a/text/maps/fuchsia_gym_1.asm b/text/maps/fuchsia_gym_1.asm deleted file mode 100644 index a877c0a1..00000000 --- a/text/maps/fuchsia_gym_1.asm +++ /dev/null @@ -1,27 +0,0 @@ -_KogaBeforeBattleText:: ; 9e9b1 (27:69b1) - text "KOGA: Fwahahaha!" - - para "A mere child like" - line "you dares to" - cont "challenge me?" - - para "Very well, I" - line "shall show you" - cont "true terror as a" - cont "ninja master!" - - para "You shall feel" - line "the despair of" - cont "poison and sleep" - cont "techniques!" - done - -_KogaAfterBattleText:: ; 9ea66 (27:6a66) - text "Humph!" - line "You have proven" - cont "your worth!" - - para "Here! Take the" - line "SOULBADGE!" - prompt - -- cgit v1.3.1-sl0p From 2bb64d11e6015e39e934e7359697c08636645994 Mon Sep 17 00:00:00 2001 From: dannye Date: Mon, 6 Jun 2016 11:04:20 -0500 Subject: Clean up main.asm recreated deleted file that never should have been unused --- engine/bank3c.asm | 2 +- engine/overworld/npc_movement_2.asm | 24 +++++++ engine/predefs17.asm | 22 +++---- engine/predefs17_2.asm | 15 +++++ main.asm | 128 +++++++++++++----------------------- scripts/cinnabargym2.asm | 78 +++++----------------- scripts/cinnabargym3.asm | 64 ++++++++++++++++++ scripts/mtmoon3_2.asm | 28 ++++++++ 8 files changed, 200 insertions(+), 161 deletions(-) create mode 100755 engine/overworld/npc_movement_2.asm create mode 100755 engine/predefs17_2.asm create mode 100755 scripts/cinnabargym3.asm create mode 100755 scripts/mtmoon3_2.asm (limited to 'scripts') diff --git a/engine/bank3c.asm b/engine/bank3c.asm index 44382257..2d9671f9 100644 --- a/engine/bank3c.asm +++ b/engine/bank3c.asm @@ -386,7 +386,7 @@ PikachuMovementData_f1f2c: INCLUDE "scripts/celadondiner2.asm" INCLUDE "scripts/safarizoneentrance2.asm" -INCLUDE "scripts/cinnabargym2.asm" +INCLUDE "scripts/cinnabargym3.asm" INCLUDE "scripts/mtmoonpokecenter2.asm" diff --git a/engine/overworld/npc_movement_2.asm b/engine/overworld/npc_movement_2.asm new file mode 100755 index 00000000..c5e11aa0 --- /dev/null +++ b/engine/overworld/npc_movement_2.asm @@ -0,0 +1,24 @@ +FreezeEnemyTrainerSprite: ; eaa02 (3a:6a02) + ld a, [wCurMap] + cp POKEMONTOWER_7 + ret z ; the Rockets on Pokemon Tower 7F leave after battling, so don't freeze them + ld hl, RivalIDs + ld a, [wEngagedTrainerClass] + ld b, a +.loop + ld a, [hli] + cp $ff + jr z, .notRival + cp b + ret z ; the rival leaves after battling, so don't freeze him + jr .loop +.notRival + ld a, [wSpriteIndex] + ld [H_SPRITEINDEX], a + jp SetSpriteMovementBytesToFF + +RivalIDs: ; eaa20 (3a:6a20) + db OPP_SONY1 + db OPP_SONY2 + db OPP_SONY3 + db $ff diff --git a/engine/predefs17.asm b/engine/predefs17.asm index 49818543..a674b45a 100755 --- a/engine/predefs17.asm +++ b/engine/predefs17.asm @@ -1,15 +1,9 @@ -; updates the types of a party mon (pointed to in hl) to the ones of the mon specified in wd11e -SetPartyMonTypes: ; 5db93 (17:5b93) - call GetPredefRegisters - ld bc, wPartyMon1Type - wPartyMon1 ; $5 - add hl, bc - ld a, [wd11e] - ld [wd0b5], a - push hl - call GetMonHeader - pop hl - ld a, [wMonHType1] - ld [hli], a - ld a, [wMonHType2] - ld [hl], a +; this function temporarily makes the starters (and Ivysaur) seen +; so that the full Pokedex information gets displayed in Oak's lab +StarterDex: ; 5c0dc (17:40dc) + ld a, %01001011 ; set starter flags + ld [wPokedexOwned], a + predef ShowPokedexData + xor a ; unset starter flags + ld [wPokedexOwned], a ret diff --git a/engine/predefs17_2.asm b/engine/predefs17_2.asm new file mode 100755 index 00000000..49818543 --- /dev/null +++ b/engine/predefs17_2.asm @@ -0,0 +1,15 @@ +; updates the types of a party mon (pointed to in hl) to the ones of the mon specified in wd11e +SetPartyMonTypes: ; 5db93 (17:5b93) + call GetPredefRegisters + ld bc, wPartyMon1Type - wPartyMon1 ; $5 + add hl, bc + ld a, [wd11e] + ld [wd0b5], a + push hl + call GetMonHeader + pop hl + ld a, [wMonHType1] + ld [hli], a + ld a, [wMonHType2] + ld [hl], a + ret diff --git a/main.asm b/main.asm index f263f4be..ee5b8b25 100755 --- a/main.asm +++ b/main.asm @@ -12,10 +12,9 @@ PICS_3 EQU $B PICS_4 EQU $C PICS_5 EQU $D +INCLUDE "home.asm" -SECTION "home",ROM0 -INCLUDE "home.asm" SECTION "bank01",ROMX,BANK[$01] INCLUDE "data/facing.asm" @@ -67,6 +66,7 @@ INCLUDE "engine/menu/players_pc.asm" INCLUDE "engine/remove_pokemon.asm" INCLUDE "engine/display_pokedex.asm" + SECTION "bank03",ROMX,BANK[$03] INCLUDE "engine/joypad.asm" @@ -108,6 +108,7 @@ INCLUDE "engine/overworld/npc_pathfinding.asm" INCLUDE "engine/hp_bar.asm" INCLUDE "engine/hidden_object_functions3.asm" + SECTION "Graphics", ROMX, BANK[GFX] PokemonLogoJapanGraphics: INCBIN "gfx/pokemon_logo_japan.2bpp" @@ -143,6 +144,7 @@ ShrinkPic2: INCBIN "pic/trainer/shrink2.pic" INCLUDE "engine/menu/start_sub_menus.asm" INCLUDE "engine/items/tms.asm" + SECTION "NPC Sprites 1", ROMX, BANK[NPC_SPRITES_1] OakAideSprite: INCBIN "gfx/sprites/oak_aide.2bpp" @@ -230,6 +232,7 @@ SeelSprite: INCBIN "gfx/sprites/seel.2bpp" INCLUDE "engine/battle/moveEffects/substitute_effect.asm" INCLUDE "engine/menu/pc.asm" + SECTION "bank06",ROMX,BANK[$06] INCLUDE "data/mapHeaders/celadoncity.asm" @@ -302,7 +305,9 @@ INCLUDE "engine/overworld/npc_movement.asm" INCLUDE "engine/overworld/doors.asm" INCLUDE "engine/overworld/ledges.asm" + SECTION "bank07",ROMX,BANK[$07] + INCLUDE "data/mapHeaders/cinnabarisland.asm" INCLUDE "data/mapObjects/cinnabarisland.asm" CinnabarIslandBlocks: INCBIN "maps/cinnabarisland.blk" @@ -345,7 +350,7 @@ INCLUDE "data/mapHeaders/viridianmart.asm" INCLUDE "scripts/viridianmart.asm" INCLUDE "data/mapObjects/viridianmart.asm" ViridianMartBlocks: -CeladonMartBlocks:INCBIN "maps/viridianmart.blk" +CeladonMartBlocks: INCBIN "maps/viridianmart.blk" INCLUDE "data/mapHeaders/school.asm" INCLUDE "scripts/school.asm" @@ -473,6 +478,7 @@ INCLUDE "engine/menu/oaks_pc.asm" INCLUDE "engine/hidden_object_functions7.asm" + SECTION "Pics 1", ROMX, BANK[PICS_1] RhydonPicFront: INCBIN "pic/ymon/rhydon.pic" @@ -539,6 +545,7 @@ TangelaPicBack: INCBIN "pic/monback/tangelab.pic" INCLUDE "engine/battle/print_type.asm" INCLUDE "engine/battle/save_trainer_name.asm" + SECTION "Pics 2", ROMX, BANK[PICS_2] GrowlithePicFront: INCBIN "pic/ymon/growlithe.pic" @@ -609,6 +616,7 @@ MoltresPicBack: INCBIN "pic/monback/moltresb.pic" INCLUDE "engine/predefsA.asm" INCLUDE "engine/battle/moveEffects/leech_seed_effect.asm" + SECTION "Pics 3", ROMX, BANK[PICS_3] ArticunoPicFront: INCBIN "pic/ymon/articuno.pic" @@ -695,6 +703,7 @@ Func_2fd6a: ; 2fd6a (b:7d6a) INCLUDE "engine/battle/scale_sprites.asm" INCLUDE "engine/game_corner_slots2.asm" + SECTION "Pics 4", ROMX, BANK[PICS_4] DodrioPicFront: INCBIN "pic/ymon/dodrio.pic" @@ -818,6 +827,7 @@ INCLUDE "engine/titlescreen2.asm" INCLUDE "engine/slot_machine.asm" INCLUDE "engine/game_corner_slots.asm" + SECTION "bank0E",ROMX,BANK[$0E] INCLUDE "data/moves.asm" @@ -842,6 +852,7 @@ SECTION "bank0F",ROMX,BANK[$0F] INCLUDE "engine/battle/core.asm" + SECTION "bank10",ROMX,BANK[$10] INCLUDE "engine/menu/pokedex.asm" @@ -999,7 +1010,9 @@ SeafoamIslands5Blocks: INCBIN "maps/seafoamislands5.blk" INCLUDE "engine/overworld/dungeon_warps.asm" + SECTION "bank12",ROMX,BANK[$12] + INCLUDE "data/mapHeaders/route7.asm" INCLUDE "data/mapObjects/route7.asm" Route7Blocks: INCBIN "maps/route7.blk" ; 48051 @@ -1159,35 +1172,7 @@ INCLUDE "data/mapHeaders/mtmoon3.asm" INCLUDE "scripts/mtmoon3.asm" INCLUDE "data/mapObjects/mtmoon3.asm" MtMoon3Blocks: INCBIN "maps/mtmoon3.blk" - -MtMoon3Script_4a325: ; pikachu-related function? - ld a, [wd472] - bit 7, a - ret z - ld a, [wWalkBikeSurfState] - and a - ret nz - - push hl - push bc - callab GetPikachuFacingDirectionAndReturnToE - pop bc - pop hl - ld a, b - cp e - ret nz - - push hl - ld a, [wUpdateSpritesEnabled] - push af - ld a, $ff - ld [wUpdateSpritesEnabled], a - callab LoadPikachuShadowIntoVRAM - pop af - ld [wUpdateSpritesEnabled], a - pop hl - call Func_159b - ret +INCLUDE "scripts/mtmoon3_2.asm" INCLUDE "data/mapHeaders/safarizonewest.asm" INCLUDE "scripts/safarizonewest.asm" @@ -1339,7 +1324,9 @@ INCLUDE "engine/menu/prize_menu.asm" INCLUDE "engine/hidden_object_functions14.asm" + SECTION "bank15",ROMX,BANK[$15] + INCLUDE "data/mapHeaders/route2.asm" INCLUDE "data/mapObjects/route2.asm" Route2Blocks: INCBIN "maps/route2.blk" ; 54086 @@ -1514,6 +1501,7 @@ INCLUDE "engine/overworld/saffron_guards.asm" SECTION "bank17",ROMX,BANK[$17] + CeruleanMartBlocks: VermilionMartBlocks: LavenderMartBlocks: @@ -1538,13 +1526,7 @@ INCLUDE "data/mapHeaders/redshouse2f.asm" INCLUDE "scripts/redshouse2f.asm" INCLUDE "data/mapObjects/redshouse2f.asm" -StarterDex: - ld a, %01001011 - ld [wPokedexOwned], a - predef ShowPokedexData - xor a - ld [wPokedexOwned], a - ret +INCLUDE "engine/predefs17.asm" INCLUDE "data/mapHeaders/museum1f.asm" INCLUDE "scripts/museum1f.asm" @@ -1665,11 +1647,13 @@ VictoryRoad1Blocks: INCBIN "maps/victoryroad1.blk" INCLUDE "engine/evolution.asm" -INCLUDE "engine/predefs17.asm" +INCLUDE "engine/predefs17_2.asm" INCLUDE "engine/hidden_object_functions17.asm" + SECTION "bank18",ROMX,BANK[$18] + ViridianForestBlocks: INCBIN "maps/viridianforest.blk" UndergroundPathNSBlocks: INCBIN "maps/undergroundpathns.blk" UndergroundPathWEBlocks: INCBIN "maps/undergroundpathwe.blk" @@ -1785,7 +1769,9 @@ SilphCo11Blocks: INCBIN "maps/silphco11.blk" INCLUDE "engine/hidden_object_functions18.asm" + SECTION "bank19",ROMX,BANK[$19] + Overworld_GFX: INCBIN "gfx/tilesets/overworld.2bpp" Overworld_Block: INCBIN "gfx/blocksets/overworld.bst" RedsHouse1_GFX: @@ -1803,8 +1789,10 @@ Interior_Block: INCBIN "gfx/blocksets/interior.bst" Plateau_GFX: INCBIN "gfx/tilesets/plateau.t10.2bpp" Plateau_Block: INCBIN "gfx/blocksets/plateau.bst" + SECTION "bank1A",ROMX,BANK[$1A] -Unknown_68000: INCBIN "gfx/blueversion.1bpp" + +INCBIN "gfx/blueversion.1bpp" ; unused Dojo_GFX: Gym_GFX: INCBIN "gfx/tilesets/gym.2bpp" @@ -1825,7 +1813,9 @@ Forest_Block: INCBIN "gfx/blocksets/forest.bst" Facility_GFX: INCBIN "gfx/tilesets/facility.2bpp" Facility_Block: INCBIN "gfx/blocksets/facility.bst" + SECTION "bank1B",ROMX,BANK[$1B] + Cemetery_GFX: INCBIN "gfx/tilesets/cemetery.t4.2bpp" Cemetery_Block: INCBIN "gfx/blocksets/cemetery.bst" Cavern_GFX: INCBIN "gfx/tilesets/cavern.t14.2bpp" @@ -1841,6 +1831,7 @@ Club_Block: INCBIN "gfx/blocksets/club.bst" Underground_GFX: INCBIN "gfx/tilesets/underground.t7.2bpp" Underground_Block: INCBIN "gfx/blocksets/underground.bst" + SECTION "bank1C",ROMX,BANK[$1C] INCLUDE "engine/gamefreak.asm" @@ -1921,25 +1912,7 @@ INCLUDE "data/mapHeaders/cinnabargym.asm" INCLUDE "scripts/cinnabargym.asm" INCLUDE "data/mapObjects/cinnabargym.asm" CinnabarGymBlocks: INCBIN "maps/cinnabargym.blk" - -CinnabarGymScript_753de: - callab Func_f2150 - jp TextScriptEnd - -CinnabarGymScript_753e9: - push hl - ld hl, wd475 - bit 7, [hl] - res 7, [hl] - pop hl - ret - -CinnabarGymScript_753f3: - push hl - ld hl, wd475 - bit 7, [hl] - pop hl - ret +INCLUDE "scripts/cinnabargym2.asm" INCLUDE "data/mapHeaders/lab1.asm" INCLUDE "scripts/lab1.asm" @@ -1999,6 +1972,7 @@ INCLUDE "engine/overworld/elevator.asm" INCLUDE "engine/overworld/hidden_items.asm" + SECTION "bank1E",ROMX,BANK[$1E] INCLUDE "engine/battle/animations.asm" @@ -2014,16 +1988,20 @@ RedFishingRodTiles: INCBIN "gfx/red_fishingrod_tiles.2bpp" INCLUDE "data/animations.asm" + SECTION "bank2f",ROMX[$5000],BANK[$2F] INCLUDE "engine/bg_map_attributes.asm" + SECTION "bank30",ROMX,BANK[$30] ; This whole bank is garbage data. INCBIN "engine/bank30.bin" + SECTION "bank39",ROMX,BANK[$39] + Pic_e4000: ; e4000 INCBIN "gfx/pikachu/unknown_e4000.pic" GFX_e40cc: ; e40cc @@ -2139,7 +2117,9 @@ INCBIN "gfx/pikachu/unknown_e7b83.2bpp" GFX_e7d13: ; e7d13 INCBIN "gfx/pikachu/unknown_e7d13.2bpp" + SECTION "bank3A",ROMX,BANK[$3A] + INCLUDE "text/monster_names.asm" INCLUDE "engine/overworld/is_player_just_outside_map.asm" @@ -2152,43 +2132,23 @@ SurfingPikachu3GraphicsEnd: INCLUDE "engine/unknown_ea3ea.asm" -FreezeEnemyTrainerSprite: ; eaa02 (3a:6a02) - ld a, [wCurMap] - cp POKEMONTOWER_7 - ret z ; the Rockets on Pokemon Tower 7F leave after battling, so don't freeze them - ld hl, RivalIDs - ld a, [wEngagedTrainerClass] - ld b, a -.loop - ld a, [hli] - cp $ff - jr z, .notRival - cp b - ret z ; the rival leaves after battling, so don't freeze him - jr .loop -.notRival - ld a, [wSpriteIndex] - ld [H_SPRITEINDEX], a - jp SetSpriteMovementBytesToFF - -RivalIDs: ; eaa20 (3a:6a20) - db OPP_SONY1 - db OPP_SONY2 - db OPP_SONY3 - db $ff +INCLUDE "engine/overworld/npc_movement_2.asm" SECTION "bank3C",ROMX,BANK[$3C] INCLUDE "engine/bank3c.asm" + SECTION "bank3D",ROMX,BANK[$3D] INCLUDE "engine/bank3d.asm" + SECTION "bank3E",ROMX,BANK[$3E] INCLUDE "engine/bank3e.asm" + SECTION "bank3F",ROMX,BANK[$3F] INCLUDE "engine/bank3f.asm" diff --git a/scripts/cinnabargym2.asm b/scripts/cinnabargym2.asm index a85a3206..00118fb5 100755 --- a/scripts/cinnabargym2.asm +++ b/scripts/cinnabargym2.asm @@ -1,64 +1,18 @@ -Func_f2133: - CheckEvent EVENT_BEAT_BLAINE - jr nz, .asm_627d9 - ld hl, CinnabarGymText_75ac2 - jr .asm_0b11d -.asm_627d9 - ld hl, CinnabarGymText_75ac7 -.asm_0b11d - call PrintText +CinnabarGymScript_753de: + callab Func_f2150 + jp TextScriptEnd + +CinnabarGymScript_753e9: + push hl + ld hl, wd475 + bit 7, [hl] + res 7, [hl] + pop hl ret -CinnabarGymText_75ac2: ; 75ac2 (1d:5ac2) - TX_FAR _CinnabarGymText_75ac2 - db "@" - -CinnabarGymText_75ac7: ; 75ac7 (1d:5ac7) - TX_FAR _CinnabarGymText_75ac7 - db "@" - -Func_f2150: - ld hl, TextPointers_f215d - ld d, 0 - add hl, de - add hl, de - ld a, [hli] - ld h, [hl] - ld l, a - jp PrintText - -TextPointers_f215d: - dw CinnabarGymText_f2169 - dw CinnabarGymText_f216e - dw CinnabarGymText_f2173 - dw CinnabarGymText_f2178 - dw CinnabarGymText_f217d - dw CinnabarGymText_f2182 - -CinnabarGymText_f2169: - TX_FAR _CinnabarGymText_1 - db "@" - -CinnabarGymText_f216e: - TX_FAR _CinnabarGymText_2 - db "@" - -CinnabarGymText_f2173: - TX_FAR _CinnabarGymText_3 - db "@" - -CinnabarGymText_f2178: - TX_FAR _CinnabarGymText_4 - db "@" - -CinnabarGymText_f217d: - TX_FAR _CinnabarGymText_5 - db "@" - -CinnabarGymText_f2182: - TX_FAR _CinnabarGymText_6 - db "@" - -CinnabarGymText_f2187: - TX_FAR _CinnabarGymText_7 ; unused - db "@" +CinnabarGymScript_753f3: + push hl + ld hl, wd475 + bit 7, [hl] + pop hl + ret diff --git a/scripts/cinnabargym3.asm b/scripts/cinnabargym3.asm new file mode 100755 index 00000000..a85a3206 --- /dev/null +++ b/scripts/cinnabargym3.asm @@ -0,0 +1,64 @@ +Func_f2133: + CheckEvent EVENT_BEAT_BLAINE + jr nz, .asm_627d9 + ld hl, CinnabarGymText_75ac2 + jr .asm_0b11d +.asm_627d9 + ld hl, CinnabarGymText_75ac7 +.asm_0b11d + call PrintText + ret + +CinnabarGymText_75ac2: ; 75ac2 (1d:5ac2) + TX_FAR _CinnabarGymText_75ac2 + db "@" + +CinnabarGymText_75ac7: ; 75ac7 (1d:5ac7) + TX_FAR _CinnabarGymText_75ac7 + db "@" + +Func_f2150: + ld hl, TextPointers_f215d + ld d, 0 + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp PrintText + +TextPointers_f215d: + dw CinnabarGymText_f2169 + dw CinnabarGymText_f216e + dw CinnabarGymText_f2173 + dw CinnabarGymText_f2178 + dw CinnabarGymText_f217d + dw CinnabarGymText_f2182 + +CinnabarGymText_f2169: + TX_FAR _CinnabarGymText_1 + db "@" + +CinnabarGymText_f216e: + TX_FAR _CinnabarGymText_2 + db "@" + +CinnabarGymText_f2173: + TX_FAR _CinnabarGymText_3 + db "@" + +CinnabarGymText_f2178: + TX_FAR _CinnabarGymText_4 + db "@" + +CinnabarGymText_f217d: + TX_FAR _CinnabarGymText_5 + db "@" + +CinnabarGymText_f2182: + TX_FAR _CinnabarGymText_6 + db "@" + +CinnabarGymText_f2187: + TX_FAR _CinnabarGymText_7 ; unused + db "@" diff --git a/scripts/mtmoon3_2.asm b/scripts/mtmoon3_2.asm new file mode 100755 index 00000000..bb9b25a8 --- /dev/null +++ b/scripts/mtmoon3_2.asm @@ -0,0 +1,28 @@ +MtMoon3Script_4a325: ; pikachu-related function? + ld a, [wd472] + bit 7, a + ret z + ld a, [wWalkBikeSurfState] + and a + ret nz + + push hl + push bc + callab GetPikachuFacingDirectionAndReturnToE + pop bc + pop hl + ld a, b + cp e + ret nz + + push hl + ld a, [wUpdateSpritesEnabled] + push af + ld a, $ff + ld [wUpdateSpritesEnabled], a + callab LoadPikachuShadowIntoVRAM + pop af + ld [wUpdateSpritesEnabled], a + pop hl + call Func_159b + ret -- cgit v1.3.1-sl0p