diff options
author | pikalaxalt <PikalaxALT@gmail.com> | 2016-06-08 00:35:33 -0400 |
---|---|---|
committer | pikalaxalt <PikalaxALT@gmail.com> | 2016-06-08 00:35:33 -0400 |
commit | 5da4ad3d5c62292f062d4f7b4382e6c09b7faaea (patch) | |
tree | 97319f45578efa0901fb1986678c16bbdeda6bcc | |
parent | e181c27c5e396aea254b471b182df3237eeb03ce (diff) | |
parent | 2bb64d11e6015e39e934e7359697c08636645994 (diff) |
Merge branch 'master' of github.com:pret/pokeyellow
103 files changed, 560 insertions, 1348 deletions
@@ -1,85 +1,56 @@ -# Build Yellow. -roms := pokeyellow.gbc - - -.PHONY: all clean yellow compare - -all: $(roms) -yellow: pokeyellow.gbc - -versions := yellow - - -# Header options for rgbfix. -cgb_opt = -cjsv -k 01 -l 0x33 -m 0x1b -p 0 -r 03 - -yellow_opt = $(cgb_opt) -t "POKEMON YELLOW" - - -# If your default python is 3, you may want to change this to python27. PYTHON := python - -# md5sum -c is used to compare rom hashes. The options may vary across platforms. MD5 := md5sum -c --quiet +2bpp := $(PYTHON) gfx.py 2bpp +1bpp := $(PYTHON) gfx.py 1bpp +pcm := $(PYTHON) extras/pokemontools/pcm.py pcm +pic := $(PYTHON) extras/pokemontools/pic.py compress +includes := $(PYTHON) extras/pokemontools/scan_includes.py -# The compare target is a shortcut to check that the build matches the original roms exactly. -# This is for contributors to make sure a change didn't affect the contents of the rom. -# More thorough comparison can be made by diffing the output of hexdump -C against both roms. -compare: yellow - @$(MD5) roms.md5 +objs := \ + audio.o \ + main.o \ + text.o \ + wram.o +$(foreach obj, $(objs:.o=), \ + $(eval $(obj)_dep := $(shell $(includes) $(obj).asm)) \ +) -# Clear the default suffixes. .SUFFIXES: .SUFFIXES: .asm .o .gbc .png .2bpp .1bpp .pic .wav .pcm - -# Secondary expansion is required for dependency variables in object rules. .SECONDEXPANSION: - # Suppress annoying intermediate file deletion messages. .PRECIOUS: %.2bpp +.PHONY: all clean yellow compare -# Filepath shortcuts to avoid overly long recipes. -poketools := extras/pokemontools -gfx := $(PYTHON) gfx.py -pcm := $(PYTHON) $(poketools)/pcm.py -pic := $(PYTHON) $(poketools)/pic.py -includes := $(PYTHON) $(poketools)/scan_includes.py +rom := pokeyellow.gbc +all: $(rom) +yellow: $(rom) -# Collect file dependencies for objects in yellow/. -$(foreach ver, $(versions), \ - $(eval $(ver)_asm := $(shell find $(ver) -iname '*.asm')) \ - $(eval $(ver)_obj := $($(ver)_asm:.asm=.o)) \ - $(eval all_obj += $($(ver)_obj)) \ -) -$(foreach obj, $(all_obj), \ - $(eval $(obj:.o=)_dep := $(shell $(includes) $(obj:.o=.asm))) \ -) - - -%.png: ; -%.2bpp: %.png ; @$(gfx) 2bpp $< -%.1bpp: %.png ; @$(gfx) 1bpp $< -%.pic: %.2bpp ; @$(pic) compress $< +# For contributors to make sure a change didn't affect the contents of the rom. +compare: yellow + @$(MD5) roms.md5 -%.wav: ; -%.pcm: %.wav $(poketools)/pcm.py ; @$(pcm) pcm $< +clean: + rm -f $(rom) $(objs) $(rom:.gbc=.sym) + find . \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' -o -iname '*.pcm' \) -exec rm {} + -# Assemble source files into objects. -$(all_obj): $$*.asm $$($$*_dep) +%.asm: ; +$(objs): %.o: %.asm $$(%_dep) rgbasm -h -o $@ $*.asm -# Make a symfile for debugging. -link_opt = -n poke$*.sym +opts = -cjsv -k 01 -l 0x33 -m 0x1b -p 0 -r 03 -t "POKEMON YELLOW" -# Link objects together to build a rom. -poke%.gbc: $$(%_obj) - rgblink $(link_opt) -o $@ $^ - rgbfix $($*_opt) $@ +$(rom): $(objs) + rgblink -n $*.sym -o $@ $^ + rgbfix $(opts) $@ +%.png: ; +%.2bpp: %.png ; @$(2bpp) $< +%.1bpp: %.png ; @$(1bpp) $< +%.pic: %.2bpp ; @$(pic) $< -clean: - rm -f $(roms) $(all_obj) poke*.sym - find . \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' -o -iname '*.pcm' \) -exec rm {} + +%.wav: ; +%.pcm: %.wav ; @$(pcm) $< @@ -1,3 +1,4 @@ +INCLUDE "charmap.asm" AUDIO_1 EQU $2 AUDIO_2 EQU $8 @@ -448,7 +449,7 @@ INCLUDE "audio/music/printer.asm" INCLUDE "audio/sfx/unknown_80e5a.asm" INCLUDE "audio/sfx/unknown_80e91.asm" INCLUDE "audio/sfx/get_item2_4.asm" - + SECTION "Audio Engine 1", ROMX, BANK[AUDIO_1] PlayBattleMusic:: ; 9064 (2:5064) @@ -514,7 +515,7 @@ Music_RivalAlternateTempo:: ; 99db (2:59db) call PlayMusic ld de, Music_MeetRival_branch_b119 jr asm_99ed - + ; applies both the alternate start and alternate tempo Music_RivalAlternateStartAndTempo:: ; 99e7 (2:59e7) call Music_RivalAlternateStart @@ -661,7 +662,7 @@ PokedexRatingSfxPointers: ; 7d0f8 (1f:50f8) OwnedMonValues: ; 7d106 (1f:5106) db 10, 40, 60, 90, 120, 150, $ff - + INCLUDE "audio/engine_3.asm" SECTION "Audio Engine 4", ROMX, BANK[AUDIO_4] @@ -745,10 +746,10 @@ 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" - + SECTION "Pikachu Cries 1",ROMX,BANK[PCM_1] PikachuCry1:: ; 84000 (21:4000) dw (PikachuCry1_End - PikachuCry1) - 2 ; length of pcm data diff --git a/audio/engine_1.asm b/audio/engine_1.asm index 0eb4d5d7..adf4cfde 100644 --- a/audio/engine_1.asm +++ b/audio/engine_1.asm @@ -967,7 +967,7 @@ Audio1_ApplyWavePatternAndFrequency: ; 0x964b ld a, $80 ld [wTempoModifier], a ret - + Audio1_SetSfxTempo: ; 9657 (2:5657) call Audio1_IsCry jr c, .isCry @@ -1070,7 +1070,7 @@ Audio1_96c3: ; 96c3 (2:56c3) .asm_96de scf ret - + Audio1_ApplyPitchBend: ; 0x96f9 ld hl, wChannelFlags1 add hl, bc @@ -1566,7 +1566,7 @@ Audio1_9972: ; 9972 (2:5972) pop bc pop af ret - + Audio1_HWChannelEnableMasks: ; 9985 (2:5985) db HW_CH1_ENABLE_MASK, HW_CH2_ENABLE_MASK, HW_CH3_ENABLE_MASK, HW_CH4_ENABLE_MASK ; channels 0-3 db HW_CH1_ENABLE_MASK, HW_CH2_ENABLE_MASK, HW_CH3_ENABLE_MASK, HW_CH4_ENABLE_MASK ; channels 4-7 diff --git a/audio/engine_2.asm b/audio/engine_2.asm index a5cec3ee..b09e3d1e 100644 --- a/audio/engine_2.asm +++ b/audio/engine_2.asm @@ -207,7 +207,7 @@ Audio2_OverwriteChannelPointer: ; 219e6 (8:59e6) ret INCLUDE "audio/sfx/pokeflute_ch1_ch2.asm" - + Audio2_InitMusicVariables:: ; 219f8 (8:59f8) xor a ld [wUnusedC000], a @@ -407,7 +407,7 @@ Audio2_StopAllAudio:: ; 21b3f (8:5b3f) ld a, $ff ld [wStereoPanning], a ret - + FillAudioRAM2: ; 21b94 (8:5b94) ld b, d .loop 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 Binary files differindex 96a64283..1c14816a 100755 --- a/audio/unknown_832b9.bin +++ b/audio/unknown_832b9.bin diff --git a/compare.sh b/compare.sh deleted file mode 100644 index 6ef030bb..00000000 --- a/compare.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# Compares baserom.gbc and pokeyellow.gbc - -# create baserom.txt if necessary -if [ ! -f baserom.txt ]; then - hexdump -C baserom.gbc > baserom.txt -fi - -hexdump -C pokeyellow.gbc > pokeyellow.txt - -diff -u baserom.txt pokeyellow.txt | less
\ No newline at end of file diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm index e5d27d1b..c6945a42 100644 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -59,7 +59,7 @@ const_value set $0 const SAFARI_BATTLE ; $2 const HURRY_RUN_AWAY_BATTLE ; $3 const STARTER_PIKACHU_BATTLE ; $4 - + ; text box IDs MESSAGE_BOX EQU $01 FIELD_MOVE_MON_MENU EQU $04 diff --git a/constants/music_constants.asm b/constants/music_constants.asm index 74d747ba..71ff1aba 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/constants/pikachu_emotion_constants.asm b/constants/pikachu_emotion_constants.asm index ff56082a..c34a08f7 100644 --- a/constants/pikachu_emotion_constants.asm +++ b/constants/pikachu_emotion_constants.asm @@ -1,5 +1,5 @@ ; Starter Pikachu emotion commands constants - + const_value = 0 const PIKAEMOTION_DUMMY1 const PIKAEMOTION_PRINTTEXT @@ -12,7 +12,7 @@ const_value = 0 const PIKAEMOTION_DUMMY2 const PIKAEMOTION_9 const PIKAEMOTION_DUMMY3 - + const_value = 0 const PIKAEMOTION_SUBCMD_LOADEXTRAPIKASPRITES const PIKAEMOTION_SUBCMD_LOADFONT diff --git a/constants/tilesets.asm b/constants/tilesets.asm index b0bfade7..aa81f774 100644 --- a/constants/tilesets.asm +++ b/constants/tilesets.asm @@ -1,5 +1,5 @@ const_value = 0 - + const OVERWORLD ; 0 const REDS_HOUSE_1 ; 1 const MART ; 2 diff --git a/data/facing.asm b/data/facing.asm index 138a0162..7a3dfacd 100644 --- a/data/facing.asm +++ b/data/facing.asm @@ -13,12 +13,12 @@ SpriteFacingAndAnimationTable: ; 4000 (1:4000) dw SpriteFacingLeftAndWalking ; facing left, walk animation frame 1 dw SpriteFacingLeftAndStanding ; facing left, walk animation frame 2 dw SpriteFacingLeftAndWalking ; facing left, walk animation frame 3 - + dw SpriteFacingRightAndStanding ; facing right, walk animation frame 0 dw SpriteFacingRightAndWalking ; facing right, walk animation frame 1 dw SpriteFacingRightAndStanding ; facing right, walk animation frame 2 dw SpriteFacingRightAndWalking ; facing right, walk animation frame 3 - + dw SpriteFacingDownAndStanding ; --- dw SpriteFacingDownAndStanding ; This table is used for sprites $a and $b. dw SpriteFacingDownAndStanding ; All orientation and animation parameters @@ -69,7 +69,7 @@ SpriteFacingUpAndStanding: ; 4075 (1:4075) db $00,$08,$05,$00 ; top right db $08,$00,$06,OAMFLAG_CANBEMASKED ; bottom left db $08,$08,$07,OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right - + SpriteFacingUpAndWalking: ; 4086 (1:4086) db $04 ; Sprite OAM Parameters @@ -85,7 +85,7 @@ SpriteFacingUpAndWalking2: ; 4097 (1:4097) db $00,$00,$85,OAMFLAG_VFLIPPED ; top right db $08,$08,$86,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED ; bottom left db $08,$00,$87,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right - + SpriteFacingLeftAndStanding: ; 40a8 (1:40a8) db $04 ; Sprite OAM Parameters @@ -109,7 +109,7 @@ SpriteFacingRightAndStanding: ; 40ca (1:40ca) db $00,$00,$09,OAMFLAG_VFLIPPED ; top right db $08,$08,$0a,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED ; bottom left db $08,$00,$0b,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right - + SpriteFacingRightAndWalking: ; 40db (1:40db) db $04 ; Sprite OAM Parameters @@ -117,14 +117,14 @@ SpriteFacingRightAndWalking: ; 40db (1:40db) db $00,$00,$89,OAMFLAG_VFLIPPED ; top right db $08,$08,$8a,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED ; bottom left db $08,$00,$8b,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right - + SpriteSpecialCase ; 40ec (1:40ec) db $09 ; Sprite OAM Parameters - db -$4,-$4,$00,$00 - db -$4,$04,$01,$00 - db -$4,$0c,$00,OAMFLAG_VFLIPPED - db $04,-$4,$01,$00 + db -$4,-$4,$00,$00 + db -$4,$04,$01,$00 + db -$4,$0c,$00,OAMFLAG_VFLIPPED + db $04,-$4,$01,$00 db $04,$04,$02,$00 db $04,$0c,$01,$00 db $0c,-$4,$00,OAM_VFLIP | OAMFLAG_CANBEMASKED diff --git a/data/hide_show_data.asm b/data/hide_show_data.asm index 2387218b..5b522f8e 100755 --- a/data/hide_show_data.asm +++ b/data/hide_show_data.asm @@ -1,7 +1,7 @@ ; data for default hidden/shown ; objects for each map ($00-$F8) -; Table of 2-Byte pointers, one pointer per map, +; Table of 2-Byte pointers, one pointer per map, ; goes up to Map_F7, ends with $FFFF. ; points to table listing all missable object in the area MapHSPointers: ; c69b (3:469b) @@ -589,5 +589,5 @@ MapHS27Copy: ; cb56 (3:4b56) db BLUES_HOUSE, $01, Show db BLUES_HOUSE, $02, Hide db BLUES_HOUSE, $03, Show - + db $FF, $01, Show
\ No newline at end of file diff --git a/data/mapObjects/route19.asm b/data/mapObjects/route19.asm index ec2b8774..151cc4a8 100755 --- a/data/mapObjects/route19.asm +++ b/data/mapObjects/route19.asm @@ -8,7 +8,7 @@ Route19Object: ; 0x54e9a (size=87) db $b,$b,$b db $a ; objects - + object SPRITE_BLACK_HAIR_BOY_1, $09, $07, STAY, RIGHT, $1, OPP_SWIMMER, $2 object SPRITE_BLACK_HAIR_BOY_1, $0c, $09, STAY, LEFT, $2, OPP_SWIMMER, $3 object SPRITE_SWIMMER, $0d, $19, STAY, LEFT, $3, OPP_SWIMMER, $4 diff --git a/data/sgb_packets.asm b/data/sgb_packets.asm index a0af4a44..c00a7f58 100755 --- a/data/sgb_packets.asm +++ b/data/sgb_packets.asm @@ -118,41 +118,41 @@ UnknownPacket_72751: ; 72751 (1c:6751) PalPacket_Empty: ; 72761 (1c:6761) PAL_SET 0, 0, 0, 0 - + PalPacket_PartyMenu: ; 72771 (1c:6771) PAL_SET PAL_MEWMON, PAL_GREENBAR, PAL_YELLOWBAR, PAL_REDBAR - + PalPacket_Black: ; 72781 (1c:6781) PAL_SET PAL_BLACK, PAL_BLACK, PAL_BLACK, PAL_BLACK - + PalPacket_TownMap: ; 72791 (1c:6791) PAL_SET PAL_TOWNMAP, 0, 0, 0 - + PalPacket_Pokedex: ; 727a1 (1c:67a1) PAL_SET PAL_BROWNMON, 0, 0, 0 - + PalPacket_Slots: ; 727b1 (1c:67b1) PAL_SET PAL_SLOTS1, PAL_SLOTS2, PAL_SLOTS3, PAL_SLOTS4 - + PalPacket_Titlescreen: ; 727c1 (1c:67c1) PAL_SET PAL_LOGO2, PAL_LOGO1, PAL_MEWMON, PAL_PURPLEMON - + PalPacket_TrainerCard: ; 727d1 (1c:67d1) PAL_SET PAL_MEWMON, PAL_BADGE, PAL_REDMON, PAL_YELLOWMON - + PalPacket_Generic: ; 727e1 (1c:67e1) PAL_SET PAL_MEWMON, 0, 0, 0 - + PalPacket_NidorinoIntro: ; 727f1 (1c:67f1) PAL_SET PAL_PURPLEMON, PAL_BLACK, 0, 0 - + PalPacket_GameFreakIntro: ; 72801 (1c:6801) PAL_SET PAL_GAMEFREAK, PAL_REDMON, PAL_VIRIDIAN, PAL_BLUEMON - + UnknownPalPacket_72811: ; 72811 (1c:6811) db $51,$25,$0,$25,$0,$25,$0,$25,$0,$0,$0,$0,$0,$0,$0,$0 - -UnknownPalPacket_72821: ; 72821 (1c:6821) + +UnknownPalPacket_72821: ; 72821 (1c:6821) db $51,$25,$0,$27,$0,$25,$0,$25,$0,$0,$0,$0,$0,$0,$0,$0 PalTrnPacket: ; 72831 (1c:6831) diff --git a/data/sprite_sets.asm b/data/sprite_sets.asm index e529b506..50e50e07 100755 --- a/data/sprite_sets.asm +++ b/data/sprite_sets.asm @@ -494,52 +494,52 @@ SpriteSheetPointerTable: ; 142a9 (5:42a9) dw PikachuSprite db $c0 db BANK(PikachuSprite) - + ; SPRITE_OFFICER_JENNY dw OfficerJennySprite db $c0 db BANK(OfficerJennySprite) - + ; SPRITE_SANDSHREW dw SandshrewSprite db $c0 db BANK(SandshrewSprite) - + ; SPRITE_ODDISH dw OddishSprite db $c0 db BANK(OddishSprite) - + ; SPRITE_BULBASAUR dw BulbasaurSprite db $c0 db BANK(BulbasaurSprite) - + ; SPRITE_JIGGLYPUFF dw JigglypuffSprite db $c0 db BANK(JigglypuffSprite) - + ; SPRITE_CLEFAIRY_2 dw Clefairy2Sprite db $c0 db BANK(Clefairy2Sprite) - + ; SPRITE_CHANSEY dw ChanseySprite db $c0 db BANK(ChanseySprite) - + ; SPRITE_JESSIE dw JessieSprite db $c0 db BANK(JessieSprite) - + ; SPRITE_JAMES dw JamesSprite db $c0 db BANK(JamesSprite) - + ; SPRITE_BALL dw BallSprite db $40 ; byte count diff --git a/data/tileset_headers.asm b/data/tileset_headers.asm index d6c6a2c9..e81d11ff 100755 --- a/data/tileset_headers.asm +++ b/data/tileset_headers.asm @@ -1,6 +1,6 @@ Tilesets: ; c558 (3:4558) ; dr $c558,$c684 - + tileset Overworld_Block, Overworld_GFX, Overworld_Coll, $FF,$FF,$FF, $52, OUTDOOR tileset RedsHouse1_Block, RedsHouse1_GFX, RedsHouse1_Coll, $FF,$FF,$FF, $FF, INDOOR tileset Mart_Block, Mart_GFX, Mart_Coll, $18,$19,$1E, $FF, INDOOR 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/data/trainer_types.asm b/data/trainer_types.asm index 24cb3a8c..bb8bd0ec 100755 --- a/data/trainer_types.asm +++ b/data/trainer_types.asm @@ -14,5 +14,5 @@ EvilTrainerList:: ; 33c8 (0:33c8) db OPP_SCIENTIST db OPP_GIOVANNI db OPP_ROCKET - + db $ff diff --git a/data/warp_tile_ids.asm b/data/warp_tile_ids.asm index 1e40c9ce..672d7382 100755 --- a/data/warp_tile_ids.asm +++ b/data/warp_tile_ids.asm @@ -24,7 +24,7 @@ WarpTileIDPointers: ; c215 (3:4215) dw FacilityWarpTileIDs dw PlateauWarpTileIDs dw BeachHouseWarpTileIDs - + OverworldWarpTileIDs: ; c247 (3:4247) db $1B,$58,$FF diff --git a/engine/bank3c.asm b/engine/bank3c.asm index 0028d1fc..83e010ff 100644 --- a/engine/bank3c.asm +++ b/engine/bank3c.asm @@ -242,7 +242,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/battle/animations.asm b/engine/battle/animations.asm index 52d2ee6e..4f7cd2c8 100755 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -573,7 +573,7 @@ SetAnimationPalette: ; 78e5c (1e:4e5c) call UpdateGBCPal_OBP0 call UpdateGBCPal_OBP1 ret - + Func_78e98: ; 78e98 (1e:4e98) call SaveScreenTilesToBuffer2 xor a @@ -586,14 +586,14 @@ Func_78e98: ; 78e98 (1e:4e98) ld [H_AUTOBGTRANSFERENABLED], a call LoadScreenTilesFromBuffer2 ld h, vBGMap1 / $100 - + WriteLowerByteOfBGMapAndEnableBGTransfer: ; 78eb1 (1e:4eb1) ld l, vBGMap0 & $ff call BattleAnimCopyTileMapToVRAM ld a, $1 ld [H_AUTOBGTRANSFERENABLED], a ret - + PlaySubanimation: ; 78ebb (1e:4ebb) ld a,[wAnimSoundID] cp a,$FF @@ -1207,7 +1207,7 @@ FlashScreenLongDelay: ; 79216 (1e:5216) ld c,1 .delayFrames jp DelayFrames - + AnimationFlashScreen: ; 7922c (1e:522c) ld a,[rBGP] push af ; save initial palette @@ -1273,14 +1273,14 @@ SetAnimationBGPalette: ; 79273 (1e:5273) ret ld b, $5 - + AnimationShakeScreenVertically: ; 79283 (1e:5283) predef_jump PredefShakeScreenVertically AnimationShakeScreen: ; 79288 (1e:5288) ; Shakes the screen for a while. Used in Earthquake/Fissure/etc. animations. ld b, $8 - + AnimationShakeScreenHorizontallyFast: ; 7928a (1e:528a) predef_jump PredefShakeScreenHorizontally @@ -1384,19 +1384,19 @@ AnimationSlideMonDown: ; 79331 (1e:5331) dec b jr nz, .loop ret - + AnimationSlideMonOff: ; 79349 (1e:5349) ; Slides the mon's sprite off the screen horizontally. ld e, 8 ld a, 3 ld [wSlideMonDelay], a jp _AnimationSlideMonOff - + AnimationSlideEnemyMonOff: ; 79353 (1e:5353) ; Slides the enemy mon off the screen horizontally. ld hl, AnimationSlideMonOff jp CallWithTurnFlipped - + _AnimationSlideMonUp: ; 79359 (1e:5359) push de push hl @@ -1553,7 +1553,7 @@ AdjustOAMBlockYPos2: ; 7940d (1e:540d) dec c jr nz, .loop ret - + AnimationBlinkEnemyMon: ; 79421 (1e:5421) ; Make the enemy mon's sprite blink on and off for a second or two ld hl, AnimationBlinkMon @@ -1933,7 +1933,7 @@ UpwardBallsAnimXCoordinatesEnemyTurn: ; 79667 (1e:5667) ; AnimationShootManyBallsUpward animation. It's unused in the game. db $60, $90, $78, $68, $88, $80 db $FF ; list terminator - + AnimationMinimizeMon: ; 7966e (1e:566e) ; Changes the mon's sprite to a mini black sprite. Used by the ; Minimize animation. @@ -1961,7 +1961,7 @@ AnimationMinimizeMon: ; 7966e (1e:566e) MinimizedMonSprite: ; 79693 (1e:5693) INCBIN "gfx/minimized_mon_sprite.1bpp" MinimizedMonSpriteEnd: - + AnimationSlideMonDownAndHide: ; 79698 (1e:5698) ; Slides the mon's sprite down and disappears. Used in Acid Armor. ld a, $1 @@ -1971,7 +1971,7 @@ AnimationSlideMonDownAndHide: ; 79698 (1e:5698) push af call AnimationHideMonPic pop af - push af + push af call GetTileIDList call GetMonSpriteTileMapPointerFromRowCount call CopyPicTiles @@ -2138,7 +2138,7 @@ WavyScreenLineOffsets: ; 7978e (1e:578e) db 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1 db 0, 0, 0, 0, 0, -1, -1, -1, -2, -2, -2, -2, -2, -1, -1, -1 db $80 ; terminator - + AnimationSubstitute: ; 797af (1e:57af) ; Changes the pokemon's sprite to the mini sprite ld hl, wTempPic @@ -2182,7 +2182,7 @@ CopySlowbroSpriteData: ; 7980e (1e:580e) ld bc, $0010 ld a, BANK(SlowbroSprite) jp FarCopyData - + HideSubstituteShowMonAnim: ; 79816 (1e:5816) ld a, [H_WHOSETURN] and a @@ -2291,7 +2291,7 @@ AnimationTransformMon: ; 798c8 (1e:58c8) ld [wChangeMonPicPlayerTurnSpecies], a ld a, [wBattleMonSpecies] ld [wChangeMonPicEnemyTurnSpecies], a - + ChangeMonPic: ; 798d4 (1e:58d4) ld a, [H_WHOSETURN] and a @@ -2332,7 +2332,7 @@ AnimationHideEnemyMonPic: ; 79919 (1e:5919) ld a, $1 ld [H_AUTOBGTRANSFERENABLED], a jp Delay3 - + Func_79929: ; 79929 (1e:5929) ld hl, wPlayerMonMinimized ld a, [H_WHOSETURN] @@ -2349,7 +2349,7 @@ Func_79929: ; 79929 (1e:5929) call AnimationFlashMonPic call AnimationShowMonPic ret - + InitMultipleObjectsOAM: ; 79943 (1e:5943) ; Writes c OAM entries with tile d. ; Sets their Y coordinates to sequential multiples of 8, starting from 0. @@ -2370,9 +2370,9 @@ InitMultipleObjectsOAM: ; 79943 (1e:5943) dec c jr nz, .loop ret - + ret ; unreferenced - + AnimationHideMonPic: ; 7995d (1e:595d) ; Hides the mon's sprite. ld a, [H_WHOSETURN] @@ -2382,7 +2382,7 @@ AnimationHideMonPic: ; 7995d (1e:595d) jr ClearMonPicFromTileMap .playerTurn ld a, 5 * SCREEN_WIDTH + 1 - + ClearMonPicFromTileMap: ; 79968 (1e:5968) push hl push de @@ -2397,7 +2397,7 @@ ClearMonPicFromTileMap: ; 79968 (1e:5968) pop de pop hl ret - + ; puts the tile map destination address of a mon sprite in hl, given the row count in b ; The usual row count is 7, but it may be smaller when sliding a mon sprite in/out, ; in order to show only a portion of the mon sprite. @@ -2473,7 +2473,7 @@ AnimCopyRowRight: ; 799be (1e:59be) jr nz, AnimCopyRowRight ret -; get the sound of the move id in b +; get the sound of the move id in b GetMoveSoundB: ; 799c5 (1e:59c5) ld a, b call GetMoveSound @@ -2859,7 +2859,7 @@ AnimationLeavesFalling: ; 79dd0 (1e:5dd0) ld a, 3 ; number of leaves ld [wNumFallingObjects], a jp AnimationFallingObjects - + AnimationPetalsFalling: ; 79de2 (1e:5de2) ; Makes lots of petals fall down from the top of the screen. It's used in ; the animation for Petal Dance. @@ -3153,7 +3153,7 @@ BattleAnimCopyTileMapToVRAM: ; 79fae (1e:5fae) ld a, l ld [H_AUTOBGTRANSFERDEST], a jp Delay3 - + TossBallAnimation: ; 79fb7 (1e:5fb7) ld a,[wIsInBattle] cp a,2 @@ -3210,7 +3210,7 @@ TossBallAnimation: ; 79fb7 (1e:5fb7) ld a,BLOCKBALL_ANIM ld [wAnimationID],a jp PlayAnimation - + PlayApplyingAttackSound: ; 7a00b (1e:600b) ; play a different sound depending if move is not very effective, neutral, or super-effective ; don't play any sound at all if move is ineffective diff --git a/engine/battle/bank3d_battle.asm b/engine/battle/bank3d_battle.asm index 4fd37bc4..2b2809d9 100644 --- a/engine/battle/bank3d_battle.asm +++ b/engine/battle/bank3d_battle.asm @@ -166,7 +166,7 @@ _LoadTrainerPic: ; f615a (3d:615a) ld a, $77 ld c, a jp LoadUncompressedSpriteData - + LoadMonBackPic: ; f6178 (3d:6178) ; Assumes the monster's attributes have ; been loaded with GetMonHeader. @@ -186,7 +186,7 @@ LoadMonBackPic: ; f6178 (3d:6178) ld a, [H_LOADEDROMBANK] ld b, a jp CopyVideoData - + AnimateSendingOutMon: ; f61a6 (3d:f61a6) ld a, [wPredefRegisters] ld h, a @@ -256,7 +256,7 @@ CopyUncompressedPicToHL: ; f6203 (3d:6203) dec b jr nz, .asm_f6211 ret - + .asm_f6220 push bc ld b, $0 @@ -279,7 +279,7 @@ CopyUncompressedPicToHL: ; f6203 (3d:6203) dec b jr nz, .asm_f6227 ret - + INCLUDE "engine/battle/init_battle_variables.asm" INCLUDE "engine/battle/moveEffects/focus_energy_effect.asm" INCLUDE "engine/battle/moveEffects/heal_effect.asm" diff --git a/engine/battle/common_text.asm b/engine/battle/common_text.asm index a09241d4..0ca9ce96 100644 --- a/engine/battle/common_text.asm +++ b/engine/battle/common_text.asm @@ -142,7 +142,7 @@ PrintSendOutMonMessage: ; f40e0 (3d:40e5) ld a, [H_QUOTIENT + 3] ; a = (enemy mon current HP * 25) / (enemy max HP / 4); this approximates the current percentage of max HP ld hl, GoText ; 70% or greater cp 70 - jr nc, .printText + jr nc, .printText ld hl, DoItText ; 40% - 69% cp 40 jr nc, .printText diff --git a/engine/battle/core.asm b/engine/battle/core.asm index cb81bf04..565525ea 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -565,7 +565,7 @@ MainInBattleLoop: ; 3c249 (f:4249) call DrawHUDsAndHPBars call CheckNumAttacksLeft jp MainInBattleLoop - + HandlePoisonBurnLeechSeed: ; 3c3d3 (f:43d3) ld hl, wBattleMonHP ld de, wBattleMonStatus @@ -1162,7 +1162,7 @@ RemoveFaintedPlayerMon: ; 3c75e (f:475e) sub b ; enemylevel - playerlevel ; are we stronger than the opposing pokemon? jr c, .regularFaint ; if so, deduct happiness regularly - + cp 30 ; is the enemy 30 levels greater than us? jr nc, .carelessTrainer ; if so, punish the player for being careless, as they shouldn't be fighting a very high leveled trainer with such a level difference .regularFaint @@ -1171,7 +1171,7 @@ RemoveFaintedPlayerMon: ; 3c75e (f:475e) .carelessTrainer callabd_ModifyPikachuHappiness PIKAHAPPY_CARELESSTRAINER ret - + PlayerMonFaintedText: ; 3c7fa (f:47fa) TX_FAR _PlayerMonFaintedText db "@" @@ -2350,11 +2350,11 @@ DisplayBattleMenu: ; 3cf78 (f:4f78) .RunAwayText ; 3d0df (f:50df) TX_FAR _RunAwayText db "@" - + .upperLeftMenuItemWasNotSelected ; a menu item other than the upper left item was selected cp $2 jp nz, PartyMenuOrRockOrRun - + ; either the bag (normal battle) or bait (safari battle) was selected ld a, [wLinkState] cp LINK_STATE_BATTLING @@ -2911,7 +2911,7 @@ Func_3d4f5: ; 3d4f5 (f:54f5) predef MoveAnimation callab Func_78e98 jp MoveSelectionMenu - + Func_3d523: ; 3d523 (f:5523) ld a, [wTestBattlePlayerSelectedMove] dec a @@ -2977,7 +2977,7 @@ AnyMoveToSelect: ; 3d55f (f:555f) .allMovesChecked ; bugfix: only check PP value and not PP up bits ; in case all other moves have no PP left and a move has a PP up used on it -; and a non-PP up move is disabled +; and a non-PP up move is disabled and $3f ; any PP left? ret nz ; return if a move has PP left .noMovesLeft @@ -4150,7 +4150,7 @@ UnaffectedText: ; 3ddbe (f:5dbe) PrintDoesntAffectText: ; 3ddc3 (f:5dc3) ld hl, DoesntAffectMonText jp PrintText - + DoesntAffectMonText: ; 3ddc9 (f:5dc9) TX_FAR _DoesntAffectMonText db "@" @@ -5554,7 +5554,7 @@ AdjustDamageForMoveType: ; 3e517 (f:6517) jp .loop .done ret - + AIGetTypeEffectiveness: ; 3e5bb (f:65bb) ld a,[wEnemyMoveType] ld d,a ; d = type of enemy move diff --git a/engine/battle/moveEffects/one_hit_ko_effect.asm b/engine/battle/moveEffects/one_hit_ko_effect.asm index 28973356..a60d573a 100644 --- a/engine/battle/moveEffects/one_hit_ko_effect.asm +++ b/engine/battle/moveEffects/one_hit_ko_effect.asm @@ -1,5 +1,5 @@ OneHitKOEffect_: ; f64db (3d:64db) - ld hl, wDamage + ld hl, wDamage xor a ld [hli], a ld [hl], a ; set the damage output to zero diff --git a/engine/battle/scale_sprites.asm b/engine/battle/scale_sprites.asm index 3d4c0e0b..03495c82 100644 --- a/engine/battle/scale_sprites.asm +++ b/engine/battle/scale_sprites.asm @@ -7,7 +7,7 @@ ScaleSpriteByTwo: ; 2fd79 (b:7d79) call ScaleSpriteByTwo_ call PrepareRTCDataAndDisableSRAM ret - + ScaleSpriteByTwo_: ; 2fd85 (b:7d85) ld de, S_SPRITEBUFFER1 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped ld hl, S_SPRITEBUFFER0 + SPRITEBUFFERSIZE - 1 ; end of destination buffer diff --git a/engine/bg_map_attributes.asm b/engine/bg_map_attributes.asm index c8076728..b2c4c3f1 100644 --- a/engine/bg_map_attributes.asm +++ b/engine/bg_map_attributes.asm @@ -34,7 +34,7 @@ LoadBGMapAttributes:: ; bf450 (2f:7450) ld [rHDMA3], a ld a, e ld [rHDMA4], a - + ld a, [rLCDC] and rLCDC_ENABLE_MASK ; is LCD off? jr z, .lcdOff ; if off, transfer immediately @@ -47,7 +47,7 @@ LoadBGMapAttributes:: ; bf450 (2f:7450) ld a, [rSTAT] and %10 ; are we in HBlank or VBlank? jr nz, .waitForAccessibleVRAMLoop1 ; loop until we're in a safe period to transfer to VRAM -.lcdOff +.lcdOff ld a, c ; number of BG attributes to transfer, plus 1 times 16 ld [rHDMA5], a ; initiate transfer call Func_3082 ; update audio so it doesn't "lag" @@ -104,7 +104,7 @@ LoadBGMapAttributes:: ; bf450 (2f:7450) ld [rVBK], a ei ret - + BGMapAttributesPointers: ; bf4de (2f:74de) dw BGMapAttributes_Unknown1 dw BGMapAttributes_Unknown2 @@ -121,7 +121,7 @@ BGMapAttributesPointers: ; bf4de (2f:74de) dw BGMapAttributes_Unknown13 HandleBadgeFaceAttributes: ; bf4f8 (2f:74f8) -; zero out the attributes if the player doesn't have the respective badge +; zero out the attributes if the player doesn't have the respective badge ; BOULDERBADGE ld hl, vBGMap1 + $183 ld de, wTrainerCardBadgeAttributes + 6 * 0 @@ -174,7 +174,7 @@ HandleBadgeFaceAttributes: ; bf4f8 (2f:74f8) ZeroOutCurrentBadgeAttributes: ; bf551 (2f:7551) push hl - xor a + xor a ld [hli], a ld [hl], a ld bc, $1f @@ -202,16 +202,16 @@ HandlePartyHPBarAttributes: ; bf55d (2f:755d) ld bc, $40 ; get 2nd party location add hl, bc push hl - + push de ; (inefficiently) copy de to hl pop hl - + ld bc, $6 add hl, bc ; get the next palette - + push hl pop de ; copy back to de - + pop hl pop bc dec c diff --git a/engine/cable_club.asm b/engine/cable_club.asm index bafc2b93..3c75b340 100755 --- a/engine/cable_club.asm +++ b/engine/cable_club.asm @@ -978,7 +978,7 @@ CableClub_DrawHorizontalLine: ; 5b94 (1:5b94) dec d jr nz, .drawHorizontalLineLoop ret - + LoadTrainerInfoTextBoxTiles: ; 5b9a (1:5b9a) ld de, TrainerInfoTextBoxTileGraphics ld hl, vChars2 + $760 diff --git a/engine/draw_badges.asm b/engine/draw_badges.asm index bd4aeaa8..3134ae0a 100644 --- a/engine/draw_badges.asm +++ b/engine/draw_badges.asm @@ -115,6 +115,6 @@ DrawBadges: ; e880 (3:6880) .FaceBadgeTiles db $20, $28, $30, $38, $40, $48, $50, $58 - + GymLeaderFaceAndBadgeTileGraphics: ; e91b (3:691b) INCBIN "gfx/badges.2bpp"
\ No newline at end of file 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/evos_moves.asm b/engine/evos_moves.asm index 2e0c3cc9..289c76ed 100755 --- a/engine/evos_moves.asm +++ b/engine/evos_moves.asm @@ -99,7 +99,7 @@ Evolution_PartyMonLoop: ; 3add8 (e:6dd8) and a ld a, [hli] jp nz, .nextEvoEntry1 ; don't evolve if we're in a battle as wcf91 could be holding the last mon sent out - + ld b, a ; evolution item ld a, [wcf91] ; last item used cp b ; was the evolution item in this entry used? @@ -387,16 +387,16 @@ Func_3b079: ; 3b079 (e:7079) push af call Func_3b0a2 jr c, .asm_3b09c - + call Func_3b10f jr nc, .asm_3b096 - + call Func_3b0a2 jr c, .asm_3b09c - + call Func_3b10f jr nc, .asm_3b096 - + call Func_3b0a2 jr c, .asm_3b09c .asm_3b096 @@ -452,7 +452,7 @@ Func_3b0a2: ; 3b0a2 (e:70a2) .asm_3b0ec scf ret - + Pointer_3b0ee: ; 3b0ee (e:70ee) db NIDOKING db IVYSAUR @@ -487,7 +487,7 @@ Pointer_3b0ee: ; 3b0ee (e:70ee) db VILEPLUME db VICTREEBEL db $ff - + Func_3b10f: ; 3b10f (e:710f) ld c, $0 .asm_3b111 @@ -665,5 +665,5 @@ GetMonLearnset: ; 3b1d1 (e:71d1) and a ; have we reached the end of the evolution data? jr nz, .skipEvolutionDataLoop ; if not, jump back up ret - + INCLUDE "data/evos_moves.asm" diff --git a/engine/gamefreak.asm b/engine/gamefreak.asm index 77ce6133..e2db39de 100755 --- a/engine/gamefreak.asm +++ b/engine/gamefreak.asm @@ -70,7 +70,7 @@ AnimateShootingStar: ; 7004a (1c:404a) add hl, de dec c jr nz, .clearOAMLoop - + ; Make Gamefreak logo flash. ld b, 3 .flashLogoLoop @@ -95,7 +95,7 @@ AnimateShootingStar: ; 7004a (1c:404a) pop af dec a jr nz, .initSmallStarsOAMLoop - + ; Animate the small stars falling from the Gamefreak logo. xor a ld [wMoveDownSmallStarsOAMCount], a ; wWhichTrade diff --git a/engine/give_pokemon.asm b/engine/give_pokemon.asm index 31587672..5b506be2 100755 --- a/engine/give_pokemon.asm +++ b/engine/give_pokemon.asm @@ -72,7 +72,7 @@ SetPokedexOwnedFlag: ; f676c (3d:676c) UnknownTerminator_f6794: ; f6794 (3d:6794) db "@" - + GotMonText: ; f6795 (3d:6795) TX_FAR _GotMonText db $0b diff --git a/engine/hall_of_fame.asm b/engine/hall_of_fame.asm index d5c8b2f2..9649da5d 100755 --- a/engine/hall_of_fame.asm +++ b/engine/hall_of_fame.asm @@ -166,12 +166,12 @@ HoFDisplayAndRecordMonInfo: ; 7030e (1c:430e) call PlayCry .asm_7033c jp HoFRecordMonInfo - + Func_7033f: ; 7033f (1c:433f) call HoFDisplayMonInfo ld a,[wHoFMonSpecies] jp PlayCry - + HoFDisplayMonInfo: ; 70348 (1c:4348) coord hl, 0, 2 lb bc, 9, 10 diff --git a/engine/hidden_object_functions7.asm b/engine/hidden_object_functions7.asm index c49c04bd..6e232664 100755 --- a/engine/hidden_object_functions7.asm +++ b/engine/hidden_object_functions7.asm @@ -161,7 +161,7 @@ CinnabarGymQuiz: ; 1e3be (7:63be) CinnabarGymQuizDummyIntroText: ; 1e401 (7:6401) TX_FAR _CinnabarGymQuizDummyIntroText db "@" - + CinnabarGymQuizIntroText: ; 1e406 (7:6406) TX_FAR _CinnabarGymQuizIntroText db "@" @@ -169,7 +169,7 @@ CinnabarGymQuizIntroText: ; 1e406 (7:6406) CinnabarGymQuizShortIntroText: ; 1e40b (7:640b) TX_FAR _CinnabarGymQuizShortIntroText db "@" - + CinnabarQuizQuestions: ; 1e410 (7:6410) dw CinnabarQuizQuestionsText1 dw CinnabarQuizQuestionsText2 @@ -327,7 +327,7 @@ CinnabarGymGateCoords: ; 1e503 (7:6503) db $02,$06,$54,$00 db $02,$03,$54,$00 - + CinnabarGym_ReplaceTileBlock: ; 1e51b (7:651b) ; basically a copy of the first half of ReplaceTileBlock ; before checking if it is necessary to redraw the map view diff --git a/engine/in_game_trades.asm b/engine/in_game_trades.asm index 80cb27f3..ff739ef0 100755 --- a/engine/in_game_trades.asm +++ b/engine/in_game_trades.asm @@ -223,7 +223,7 @@ InGameTrade_FlagActionPredef: ; 71ded (1c:5ded) ld a,[wWhichTrade] ld c,a predef_jump FlagActionPredef - + InGameTrade_CheckForTradeEvo: ; 71df9 (1c:5df9) ld a,[wInGameTradeReceiveMonSpecies] cp KADABRA @@ -235,7 +235,7 @@ InGameTrade_CheckForTradeEvo: ; 71df9 (1c:5df9) cp HAUNTER jr z,.tradeEvo ret - + .tradeEvo ld a,[wPartyCount] dec a @@ -248,7 +248,7 @@ InGameTrade_CheckForTradeEvo: ; 71df9 (1c:5df9) xor a ; LINK_STATE_NONE ld [wLinkState],a jp PlayDefaultMusic - + InGameTrade_TrainerString: ; 71e2d (1c:5e2d) ; "TRAINER@@@@@@@@@@" db $5d, "@@@@@@@@@@" diff --git a/engine/init_player_data.asm b/engine/init_player_data.asm index c1b93505..f240b5db 100644 --- a/engine/init_player_data.asm +++ b/engine/init_player_data.asm @@ -11,12 +11,12 @@ InitPlayerData2: ld a, $ff ld [wUnusedD71B], a - + ld a, 90 ; initialize happiness to 90 ld [wPikachuHappiness], a ld a, $80 ld [wPikachuMood], a ; initialize mood - + ld hl, wPartyCount call InitializeEmptyList ld hl, wNumInBox diff --git a/engine/items/items.asm b/engine/items/items.asm index e147f5a5..cffcb5b3 100755 --- a/engine/items/items.asm +++ b/engine/items/items.asm @@ -484,7 +484,7 @@ ItemUseBall: ; d3ad (3:53ad) .emptyString db "@" - + ItemUseBallText00: ; d697 (3:5697) ;"It dodged the thrown ball!" ;"This pokemon can't be caught" @@ -744,7 +744,7 @@ Func_d85d: ; d85d (3:585d) ld hl, wcd6d .loop ld a, [hli] - and a + and a jr z, .cannotEvolveWithUsedStone inc hl inc hl @@ -919,7 +919,7 @@ ItemUseMedicine: ; d8ae (3:58ae) pop hl pop af ld [wWhichPokemon], a - + ld a, [wIsInBattle] and a jr z, .compareCurrentHPToMaxHP @@ -1410,7 +1410,7 @@ ItemUseMedicine: ; d8ae (3:58ae) xor a ; PLAYER_PARTY_DATA ld [wMonDataLocation], a predef LearnMoveFromLevelUp ; learn level up move, if any - + xor a ld [wForceEvolution], a callabd_ModifyPikachuHappiness PIKAHAPPY_LEVELUP @@ -1421,7 +1421,7 @@ ItemUseMedicine: ; d8ae (3:58ae) callab Func_2fd6a ; evolve pokemon, if appropriate pop af ld [wWhichPokemon], a - + callab TryEvolvingMon ld a, $01 ld [wUpdateSpritesEnabled], a @@ -1628,7 +1628,7 @@ ItemUseCardKey: ; de57 (3:de57) set 7, [hl] ret -; These tables are probably supposed to be door locations in Silph Co., +; These tables are probably supposed to be door locations in Silph Co., ; but they are unused. ; The reason there are 3 tables is unknown. @@ -1681,7 +1681,7 @@ ItemUseGuardSpec: ; df11 (3:5f11) ld a, [wIsInBattle] and a jp z, ItemUseNotTime - + ld a, [wWhichPokemon] push af ld a, [wPlayerMonNumber] @@ -1689,7 +1689,7 @@ ItemUseGuardSpec: ; df11 (3:5f11) callabd_ModifyPikachuHappiness PIKAHAPPY_USEDXITEM pop af ld [wWhichPokemon], a - + ld hl, wPlayerBattleStatus2 set ProtectedByMist, [hl] ; Mist bit jp PrintItemUseTextAndRemoveItem @@ -1706,7 +1706,7 @@ ItemUseDireHit: ; df42 (3:5f42) ld a, [wIsInBattle] and a jp z, ItemUseNotTime - + ld a, [wWhichPokemon] push af ld a, [wPlayerMonNumber] @@ -1714,7 +1714,7 @@ ItemUseDireHit: ; df42 (3:5f42) callabd_ModifyPikachuHappiness PIKAHAPPY_USEDXITEM pop af ld [wWhichPokemon], a - + ld hl, wPlayerBattleStatus2 set GettingPumped, [hl] ; Focus Energy bit jp PrintItemUseTextAndRemoveItem @@ -1746,7 +1746,7 @@ ItemUseXStat: ; df69 (3:df69) xor a ld [H_WHOSETURN], a ; set turn to player's turn callba StatModifierUpEffect ; do stat increase move - + ld a, [wWhichPokemon] push af ld a, [wPlayerMonNumber] @@ -1754,7 +1754,7 @@ ItemUseXStat: ; df69 (3:df69) callabd_ModifyPikachuHappiness PIKAHAPPY_USEDXITEM pop af ld [wWhichPokemon], a - + pop hl pop af ld [hld], a ; restore [wPlayerMoveEffect] @@ -2005,10 +2005,9 @@ ItemUseSuperRod: ; e130 (3:6130) ld [wRodResponse], a jr DoNotGenerateFishingEncounter - RodResponse: ; e15b (3:615b) ld [wRodResponse], a - + dec a ; is there a bite? jr nz, DoNotGenerateFishingEncounter ; if yes, store level and species data @@ -2234,7 +2233,7 @@ ItemUsePPRestore: ; e1f7 (3:61f7) ret z ; if so, return add a, 10 ; increase current PP by 10 ; b holds the max PP amount and b will hold the new PP amount. -; So, if the new amount meets or exceeds the max amount, +; So, if the new amount meets or exceeds the max amount, ; cap the amount to the max amount by leaving b unchanged. ; Otherwise, store the new amount in b. cp b ; does the new amount meet or exceed the maximum? @@ -2420,7 +2419,7 @@ ItemUseTMHM: ; e374 (3:6374) ld a, b and a ret z - + ld a, [wWhichPokemon] push af ld a, d @@ -2494,7 +2493,6 @@ Func_e4bf: ; e4bf (3:64bf) ld hl, DontHavePokemonText jp PrintText - ThrowBallAtTrainerMon: ; e4ca (3:64ca) call RunDefaultPaletteCommand call LoadScreenTilesFromBuffer1 ; restore saved screen @@ -2559,7 +2557,7 @@ BoxFullCannotThrowBallText: ; e522 (3:6522) DontHavePokemonText: ; e527 (3:6527) TX_FAR _DontHavePokemonText db "@" - + ItemUseText00: ; e52c (3:652c) TX_FAR _ItemUseText001 db $05 diff --git a/engine/items/tms.asm b/engine/items/tms.asm index 9621e550..ff10d134 100755 --- a/engine/items/tms.asm +++ b/engine/items/tms.asm @@ -25,7 +25,7 @@ CanLearnTM: ; 122f0 (4:62f0) pop hl ld c, 0 ret - + ; converts TM/HM number in wd11e into move number ; HMs start at 51 TMToMove: ; 1231d (4:631d) diff --git a/engine/load_mon_data.asm b/engine/load_mon_data.asm index 41ba65b1..4a1e3097 100644 --- a/engine/load_mon_data.asm +++ b/engine/load_mon_data.asm @@ -16,7 +16,7 @@ LoadMonData_: ; 442b (1:442b) ld a, [wWhichPokemon] ld e, a call GetMonSpecies - + .GetMonHeader ld a, [wcf91] ld [wd0b5], a ; input for GetMonHeader @@ -47,7 +47,7 @@ LoadMonData_: ; 442b (1:442b) ld de, wLoadedMon ld bc, wPartyMon2 - wPartyMon1 jp CopyData - + ; get species of mon e in list [wMonDataLocation] for LoadMonData GetMonSpecies: ; 4478 (1:4478) ld hl, wPartySpecies diff --git a/engine/menu/bills_pc.asm b/engine/menu/bills_pc.asm index 9055a9d2..e104f693 100644 --- a/engine/menu/bills_pc.asm +++ b/engine/menu/bills_pc.asm @@ -183,7 +183,7 @@ BillsPCMenu: ; 21495 (8:5495) jp z, BillsPCChangeBox ; change box cp $4 jp z, BillsPCPrintBox - + ExitBillsPC: ; 2153e (8:553e) ld a, [wFlags_0xcd60] bit 3, a ; accessing Bill's PC through another PC? @@ -356,7 +356,7 @@ BillsPCRelease: ; 21690 (8:5690) ld hl, PikachuUnhappyText call PrintText jp BillsPCMenu - + BillsPCChangeBox: ; 216e7 (8:56e7) callba ChangeBox jp BillsPCMenu @@ -540,7 +540,7 @@ PikachuUnhappyText: ; 21853 (8:5853) ReleaseWhichMonText: ; 21858 (8:5858) TX_FAR _ReleaseWhichMonText db "@" - + OnceReleasedText: ; 2185d (8:585d) TX_FAR _OnceReleasedText db "@" diff --git a/engine/menu/link_menu.asm b/engine/menu/link_menu.asm index 73e19038..becefd47 100644 --- a/engine/menu/link_menu.asm +++ b/engine/menu/link_menu.asm @@ -175,7 +175,7 @@ Func_f531b:: ; f531b (3d:531b) ld [wUnknownSerialCounter+1],a and a ret - + Func_f5476:: ; f5476 (3d:5476) ld hl,ColosseumIneligibleText call PrintText @@ -207,7 +207,7 @@ PokeCup:: ; f548e (3d:548e) dec b jr nz,.loop dec hl - dec hl + dec hl cp [hl] ; is third mon second mon? jp z,DuplicateSpecies dec hl ; wPartySpecies @@ -253,7 +253,7 @@ PikaCup:: ; f54e4 (3d:54e4) dec b jr nz,.loop dec hl - dec hl + dec hl cp [hl] ; is third mon second mon? jp z,DuplicateSpecies dec hl ; wPartySpecies @@ -285,7 +285,7 @@ PikaCup:: ; f54e4 (3d:54e4) jp nc,CombinedLevelsAbove50 xor a ret - + PetitCup:: ; f553a (3d:553a) ld hl,wPartyCount ld a,[hli] @@ -299,7 +299,7 @@ PetitCup:: ; f553a (3d:553a) dec b jr nz,.loop dec hl - dec hl + dec hl cp [hl] ; is third mon second mon? jp z,DuplicateSpecies dec hl ; wPartySpecies @@ -406,7 +406,7 @@ PetitCup:: ; f553a (3d:553a) jp nc,CombinedLevelsAbove80 xor a ret - + NotThreeMonsInParty:: ; f561d (3d:516d) ld hl,Colosseum3MonsText call PrintText @@ -418,67 +418,67 @@ MewInParty:: ; f5626 (3d:f5626) call PrintText ld a,$2 ret - + DuplicateSpecies:: ; f562f (3d:f562f) ld hl,ColosseumDifferentMonsText call PrintText ld a,$3 ret - + LevelAbove55:: ; f5638 (3d:5638) ld hl,ColosseumMaxL55Text call PrintText ld a,$4 ret - + LevelUnder50:: ; f5641 (3d:5641) ld hl,ColosseumMinL50Text call PrintText ld a,$5 ret - + CombinedLevelsGreaterThan155:: ; f5641 (3d:564a) ld hl,ColosseumTotalL155Text call PrintText ld a,$6 ret - + LevelAbove30:: ; f5653 (3d:5653) ld hl,ColosseumMaxL30Text call PrintText ld a,$7 ret - + LevelUnder25:: ; f565c (3d:565c) ld hl,ColosseumMinL25Text call PrintText ld a,$8 ret - + CombinedLevelsAbove80:: ; f5665 (3d:5665) ld hl,ColosseumTotalL80Text call PrintText ld a,$9 ret - + LevelAbove20:: ; f566e (3d:566e) ld hl,ColosseumMaxL20Text call PrintText ld a,$a ret - + LevelUnder15:: ; f5677 (3d:5677) ld hl,ColosseumMinL15Text call PrintText ld a,$b ret - + CombinedLevelsAbove50:: ; f5680 (3d:5680) ld hl,ColosseumTotalL50Text call PrintText ld a,$c ret - + asm_f5689:: ; f5689 (3d:5689) pop af pop bc @@ -489,7 +489,7 @@ asm_f5689:: ; f5689 (3d:5689) call PrintText ld a,$d ret - + asm_f569b:: ; f569b (3d:569b) pop af pop bc @@ -500,7 +500,7 @@ asm_f569b:: ; f569b (3d:569b) call PrintText ld a,$e ret - + asm_f56ad:: ; f56ad (3d:56ad) ld a,[hl] ld [wd11e],a @@ -509,7 +509,7 @@ asm_f56ad:: ; f56ad (3d:56ad) call PrintText ld a,$f ret - + Func_f56bd:: ; f56bd (3d:56bd) xor a ld [H_AUTOBGTRANSFERENABLED],a @@ -537,31 +537,31 @@ Func_f56bd:: ; f56bd (3d:56bd) ld a,$1 ld [H_AUTOBGTRANSFERENABLED],a ret - + PointerTable_f56ee:: ; f56ee (3d:56ee) dw Text_f56f4 dw Text_f5728 dw Text_f575b - + Text_f56f4:: ; f56f4 (3d:56f4) db "LVs of 3<pkmn>:50-55" next "Sum of LVs:155 MAX" next "MEW can't attend.@" - + Text_f5728:: ; f5728 (3d:5728) db "LVs of 3<pkmn>:15-20" next "Sum of LVs:50 MAX" next "MEW can't attend.@" - + Text_f575b:: ; f575b (3d:575b) db "3 Basic <pkmn>.LV25-30" next "Sum of LVs:80 MAX" next "6′8″ and 44lb MAX@" - + Text_f5791:: ; f5791 (3d:5791) db "View" next "Rules@" - + Text_f579c:: ; f579c (3d:579c) db "# Cup" next "Pika Cup" @@ -623,7 +623,7 @@ ColosseumHeightText:: ; f57f8 (3d:57f8) ColosseumWeightText:: ; f57fd (3d:57fd) TX_FAR _ColosseumWeightText ; a0b9f db "@" - + ColosseumEvolvedText:: ; f5802 (3d:5802) TX_FAR _ColosseumEvolvedText ; a0bbb db "@" @@ -631,7 +631,7 @@ ColosseumEvolvedText:: ; f5802 (3d:5802) ColosseumIneligibleText:: ; f5807 (3d:5807) TX_FAR _ColosseumIneligibleText ; a0bd4 db "@" - + LinkMenu: ; f580c (3d:580c) xor a ld [wLetterPrintingDelayFlags], a @@ -854,7 +854,7 @@ LinkMenu: ; f580c (3d:580c) ld e,"▷" call Func_f59ec jp .choseCancel - + .asm_f59cd ld hl,ColosseumVersionText call PrintText @@ -870,7 +870,7 @@ LinkMenu: ; f580c (3d:580c) jp c,.choseCancel ld a,$f0 jp .next - + Func_f59ec:: ; f59ec (3d:59ec) ld a, b Coorda 6, 5 @@ -883,7 +883,7 @@ Func_f59ec:: ; f59ec (3d:59ec) ld c, 40 call DelayFrames ret - + ColosseumWhereToText: ; f5a02 (3d:5a02) TX_FAR _ColosseumWhereToText db "@" @@ -899,7 +899,7 @@ ColosseumCanceledText: ; f5a0c (3d:5a0c) ColosseumVersionText: ; f5a11 (3d:5a11) TX_FAR _ColosseumVersionText ; 28:4c47 db "@" - + TextTerminator_f5a16: ; f5a16 (3d:5a16) db "@" diff --git a/engine/menu/main_menu.asm b/engine/menu/main_menu.asm index 3f1ca0e8..fb3fb6b9 100755 --- a/engine/menu/main_menu.asm +++ b/engine/menu/main_menu.asm @@ -139,11 +139,11 @@ Func_5cc1: ; 5cc1 (1:5cc1) ld hl, NotEnoughMemoryText call PrintText ret - -NotEnoughMemoryText: ; 5ccd (1:5ccd) + +NotEnoughMemoryText: ; 5ccd (1:5ccd) TX_FAR _NotEnoughMemoryText db "@" - + StartNewGame: ; 5cd2 (1:5cd2) ld hl, wd732 res 1, [hl] diff --git a/engine/menu/options.asm b/engine/menu/options.asm index 4b8eb883..86a55bd2 100644 --- a/engine/menu/options.asm +++ b/engine/menu/options.asm @@ -39,7 +39,7 @@ OptionMenuJumpTable: ; 41ca4 (10:5ca4) dw OptionsMenu_Dummy dw OptionsMenu_Dummy dw OptionsMenu_Cancel - + OptionsMenu_TextSpeed: ; 41cb4 (10:5cb4) call Func_41d07 ld a, [hJoy5] @@ -83,19 +83,19 @@ OptionsMenu_TextSpeed: ; 41cb4 (10:5cb4) call PlaceString and a ret - + TextSpeedStringsPointerTable: ; 41cf2 (10:5cf2) dw FastText dw MidText dw SlowText - + FastText: ; 41cf9 (10:5cf9) db "FAST@" MidText: ; 41cfd (10:5cfd) db "MID @" SlowText: ; 41d02 (10:5d02) db "SLOW@" - + Func_41d07: ; 41d07 (10:5d07) ld a, [wOptions] and $f @@ -115,7 +115,7 @@ Func_41d07: ; 41d07 (10:5d07) ld c, $0 lb de, 5, 3 ret - + OptionsMenu_BattleAnimations: ; 41d26 (10:5d26) ld a, [hJoy5] and D_RIGHT | D_LEFT @@ -141,16 +141,16 @@ OptionsMenu_BattleAnimations: ; 41d26 (10:5d26) call PlaceString and a ret - + AnimationOptionStringsPointerTable: ; 41d52 (10:5d52) dw AnimationOnText dw AnimationOffText - + AnimationOnText: ; 41d56 (10:5d56) db "ON @" AnimationOffText: ; 41d5a (10:5d5a) db "OFF@" - + OptionsMenu_BattleStyle: ; 41d5e (10:5d5e) ld a, [hJoy5] and D_LEFT | D_RIGHT @@ -177,16 +177,16 @@ OptionsMenu_BattleStyle: ; 41d5e (10:5d5e) call PlaceString and a ret - + BattleStyleOptionStringsPointerTable: ; 41d8c (10:5d8c) dw BattleStyleShiftText dw BattleStyleSetText - + BattleStyleShiftText: ; 41d90 (10:5d90) db "SHIFT@" BattleStyleSetText: ; 41d96 (10:5d96) db "SET @" - + OptionsMenu_SpeakerSettings: ; 41d9c (10:5d9c) ld a, [wOptions] and $30 @@ -235,7 +235,7 @@ SpeakerOptionStringsPointerTable: ; 41ddc (10:5ddc) dw Earphone1SoundText dw Earphone2SoundText dw Earphone3SoundText - + MonoSoundText: ; 41de4 (10:5de4) db "MONO @" Earphone1SoundText: ; 41dee (10:5dee) @@ -244,7 +244,7 @@ Earphone2SoundText: ; 41df8 (10:5df8) db "EARPHONE2@" Earphone3SoundText: ; 41e02 (10:5e02) db "EARPHONE3@" - + OptionsMenu_GBPrinterBrightness: ; 41e0c (10:5e0c) call Func_41e7b ld a, [hJoy5] @@ -285,14 +285,14 @@ OptionsMenu_GBPrinterBrightness: ; 41e0c (10:5e0c) call PlaceString and a ret - + GBPrinterOptionStringsPointerTable: ; 41e44 (10:5e44) dw LightestPrintText dw LighterPrintText dw NormalPrintText dw DarkerPrintText dw DarkestPrintText - + LightestPrintText: ; 41e4e (10:5e4e) db "LIGHTEST@" LighterPrintText: ; 41e57 (10:5e57) @@ -303,7 +303,7 @@ DarkerPrintText: ; 41e69 (10:5e69) db "DARKER @" DarkestPrintText: ; 41e72 (10:5e72) db "DARKEST @" - + Func_41e7b: ; 41e7b (10:5e7b) ld a, [wPrinterSettings] and a @@ -347,7 +347,7 @@ OptionsMenu_Cancel: ; 41ead (10:5ead) .pressedCancel scf ret - + Func_41eb7: ; 41eb7 (10:5eb7) ld hl, wOptionsCursorLocation ld a, [hJoy5] @@ -387,7 +387,7 @@ Func_41eb7: ; 41eb7 (10:5eb7) dec [hl] scf ret - + Func_41ee9: ; 41ee9 (10:5ee9) coord hl, 1, 1 ld de, SCREEN_WIDTH @@ -431,13 +431,13 @@ Func_41f06: ; 41f06 (10:5f06) ld [H_AUTOBGTRANSFERENABLED], a call Delay3 ret - + AllOptionsText: ; 41f3e (10:5f3e) db "TEXT SPEED :" next "ANIMATION :" next "BATTLESTYLE:" next "SOUND:" next "PRINT:@" - + OptionMenuCancelText: ; 41f73 (10:5f73) db "CANCEL@"
\ No newline at end of file diff --git a/engine/menu/players_pc.asm b/engine/menu/players_pc.asm index 1fcf1f49..38cdf2f6 100755 --- a/engine/menu/players_pc.asm +++ b/engine/menu/players_pc.asm @@ -13,7 +13,7 @@ PlayerPC: ; 778e (1:778e) call PlaySound ld hl, TurnedOnPC2Text call PrintText - + PlayerPCMenu: ; 790c (1:790c) ld hl, wd730 set 6, [hl] diff --git a/engine/menu/pokedex.asm b/engine/menu/pokedex.asm index c8a37f2e..7715500b 100755 --- a/engine/menu/pokedex.asm +++ b/engine/menu/pokedex.asm @@ -475,7 +475,6 @@ ShowPokedexDataInternal: ; 40323 (10:4323) ld [rNR50], a ret - HeightWeightText: ; 40370 (10:4370) db "HT ?", $60, "??", $61 next "WT ???lb@" @@ -690,7 +689,6 @@ Pokedex_PrepareDexEntryForPrinting: ; 404bc (10:44bc) ld [hFlags_0xFFFA], a ret - ; draws a line of tiles ; INPUT: ; b = tile ID diff --git a/engine/mon_party_sprites.asm b/engine/mon_party_sprites.asm index 09d1cb4c..b4091d9c 100755 --- a/engine/mon_party_sprites.asm +++ b/engine/mon_party_sprites.asm @@ -227,12 +227,12 @@ MonPartySpritePointers: ; 7184d (1c:584d) db $10 / $10 ; $10 bytes db BANK(MonPartySprites) dw vSprites + $260 - + dw PikachuSprite db $40 / $10 ; $40 bytes db BANK(PikachuSprite) dw vSprites + $280 - + dw MonPartySprites + $100 db $40 / $10 ; $40 bytes db BANK(MonPartySprites) diff --git a/engine/oak_speech.asm b/engine/oak_speech.asm index 346df99b..925ff913 100755 --- a/engine/oak_speech.asm +++ b/engine/oak_speech.asm @@ -39,7 +39,7 @@ SetDefaultNames: ; 5e27 (1:5e27) ld bc, NAME_LENGTH call CopyData ; rip optimizations ret - + OakSpeech: ; 5e85 (1:5e85) call StopAllMusic ; stop music ld a, BANK(Music_Routes2) @@ -157,7 +157,7 @@ OakSpeech: ; 5e85 (1:5e85) call GBFadeOutToWhite call ClearScreen ; rip more tail-end optimizations ret - + OakSpeechText1: ; 5fb9 (1:5fb9) TX_FAR _OakSpeechText1 db "@" diff --git a/engine/oak_speech2.asm b/engine/oak_speech2.asm index 911a4ed0..37c998a9 100755 --- a/engine/oak_speech2.asm +++ b/engine/oak_speech2.asm @@ -224,7 +224,7 @@ GetDefaultName: ; 6858 (1:6858) ld de, wcd6d ld bc, $14 jp CopyData - + DefaultNamesPlayerList: ; 687d (1:687d) db "NEW NAME@YELLOW@ASH@JACK@" DefaultNamesRivalList: ; 688d (1:688d) diff --git a/engine/overworld/cable_club_npc.asm b/engine/overworld/cable_club_npc.asm index f60042de..bc1a553a 100755 --- a/engine/overworld/cable_club_npc.asm +++ b/engine/overworld/cable_club_npc.asm @@ -165,7 +165,7 @@ Serial_SyncAndExchangeNybbleDouble: ; 7131 (1:7131) ld [wUnknownSerialCounter], a ld [wUnknownSerialCounter + 1], a ret - + CableClubNPCAreaReservedFor2FriendsLinkedByCableText: ; 7188 (1:7188) TX_FAR _CableClubNPCAreaReservedFor2FriendsLinkedByCableText db "@" diff --git a/engine/overworld/check_player_state.asm b/engine/overworld/check_player_state.asm index 0fc73bc7..5dd91c4c 100644 --- a/engine/overworld/check_player_state.asm +++ b/engine/overworld/check_player_state.asm @@ -83,7 +83,7 @@ CheckForceBikeOrSurf: ; c0d2 (3:40d2) ld [wWalkBikeSurfStateCopy], a call ForceBikeOrSurf ret - + INCLUDE "data/force_bike_surf.asm" IsPlayerFacingEdgeOfMap: ; c148 (3:4148) diff --git a/engine/overworld/get_coords_tile_in_front_of_player.asm b/engine/overworld/get_coords_tile_in_front_of_player.asm index ce45e79c..1003570b 100644 --- a/engine/overworld/get_coords_tile_in_front_of_player.asm +++ b/engine/overworld/get_coords_tile_in_front_of_player.asm @@ -1,6 +1,6 @@ GetTileAndCoordsInFrontOfPlayer: ; c2d4 (3:42d1) call GetPredefRegisters - + _GetTileAndCoordsInFrontOfPlayer: ; c2d4 (3:42d4) ld a, [wYCoord] ld d, a @@ -37,7 +37,7 @@ _GetTileAndCoordsInFrontOfPlayer: ; c2d4 (3:42d4) ld c, a ld [wTileInFrontOfPlayer], a ret - + GetTileTwoStepsInFrontOfPlayer: ; c309 (3:4309) xor a ld [$ffdb], a 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/overworld/load_wild_data.asm b/engine/overworld/load_wild_data.asm index 083e08bf..71e3fe2a 100644 --- a/engine/overworld/load_wild_data.asm +++ b/engine/overworld/load_wild_data.asm @@ -29,5 +29,5 @@ LoadWildData: ; cb62 (3:4b62) ld de,wWaterMons ; otherwise, load surfing data ld bc,$0014 jp CopyData - + INCLUDE "data/wild_mons.asm"
\ No newline at end of file diff --git a/engine/overworld/map_sprite_functions1.asm b/engine/overworld/map_sprite_functions1.asm index 46479a9f..722fc14e 100644 --- a/engine/overworld/map_sprite_functions1.asm +++ b/engine/overworld/map_sprite_functions1.asm @@ -55,7 +55,7 @@ UpdateNonPlayerSprite: ; 4be3 (1:4be3) ; multiple of $10 to make comparisons easier. DetectCollisionBetweenSprites: ; 4bf7 (1:4bf7) ; nop - + ld h, wSpriteStateData1 / $100 ld a, [H_CURRENTSPRITEOFFSET] ld l, a @@ -355,7 +355,7 @@ Func_4d0a: ; 4d0a (1:4d0a) inc l inc l ret - + SetSpriteCollisionValues: ; 4d22 (1:4d22) and a ld b, 0 diff --git a/engine/overworld/map_sprites.asm b/engine/overworld/map_sprites.asm index 68f6b006..10f0362e 100755 --- a/engine/overworld/map_sprites.asm +++ b/engine/overworld/map_sprites.asm @@ -16,7 +16,7 @@ _InitMapSprites: ; 1401b (5:401b) call LoadMapSpriteTilePatterns call Func_14150 ret - + ; Loads sprite set for outside maps (cities and routes) and sets VRAM slots. ; sets carry if the map is a city or route, unsets carry if not InitOutsideMapSprites: ; 14029 (5:4029) @@ -49,7 +49,7 @@ InitOutsideMapSprites: ; 14029 (5:4029) call Func_14150 scf ret - + LoadSpriteSetFromMapHeader: ; 14061 (5:4061) ; This loop stores the correct VRAM tile pattern slots according the sprite ; data from the map's header. Since the VRAM tile pattern slots are filled in @@ -81,7 +81,7 @@ LoadSpriteSetFromMapHeader: ; 14061 (5:4061) jr .continue .isFourTileSprite -; loop through the space reserved for regular picture IDs +; loop through the space reserved for regular picture IDs ld de, wSpriteSet ld b, 9 call CheckIfPictureIDAlreadyLoaded @@ -100,11 +100,11 @@ CheckIfPictureIDAlreadyLoaded: ; 1409b (5:409b) .loop ld a, [de] and a ; is sprite set slot not taken up yet? - jr z, .spriteSlotNotTaken ; if so, load it as it signifies we've reached + jr z, .spriteSlotNotTaken ; if so, load it as it signifies we've reached ; the end of data for the last sprite set cp c ; is the tile pattern already loaded? - ret z ; don't redundantly load + ret z ; don't redundantly load dec b ; have we reached the end of the sprite set? jr z, .spriteNotAlreadyLoaded ; if so, we're done here inc de @@ -124,7 +124,7 @@ CheckForFourTileSprite: ; 140ac (5:40ac) ; Else, returns carry if the sprite uses 4 tiles cp SPRITE_PIKACHU ; is this the Pikachu Sprite? ret z ; return if yes - + cp SPRITE_BALL ; is this a four tile sprite? jr nc, .notYellowSprite ; set carry if yes ; regular sprite @@ -132,7 +132,7 @@ CheckForFourTileSprite: ; 140ac (5:40ac) ret .notYellowSprite - scf + scf ret LoadMapSpriteTilePatterns: ; 140b7 (5:40b7) @@ -153,7 +153,7 @@ LoadMapSpriteTilePatterns: ; 140b7 (5:40b7) cp 11 jr nz, .loop ret - + ReloadWalkingTilePatterns: ; 140d2 (5:40d2) xor a .loop @@ -167,7 +167,7 @@ ReloadWalkingTilePatterns: ; 140d2 (5:40d2) cp 11 jr nz, .loop ret - + LoadStillTilePattern: ; 140e4 (5:40e4) ld a, [wFontLoaded] bit 0, a ; reloading upper half of tile patterns after displaying text? @@ -177,7 +177,7 @@ LoadStillTilePattern: ; 140e4 (5:40e4) call GetSpriteVRAMAddress call CopyVideoDataAlternate ; new yellow function ret - + LoadWalkingTilePattern: ; 140f5 (5:40f5) call ReadSpriteSheetData ret nc @@ -189,7 +189,7 @@ LoadWalkingTilePattern: ; 140f5 (5:40f5) set 3, h ; add $800 to hl call CopyVideoDataAlternate ret - + GetSpriteVRAMAddress: ; 14018 (5:4108) push bc ld a, [hVRAMSlot] @@ -203,7 +203,7 @@ GetSpriteVRAMAddress: ; 14018 (5:4108) ld l, a pop bc ret - + SpriteVRAMAddresses: ; 14118 (5:4118) ; Equivalent to multiplying $C0 (number of bytes in 12 tiles) times the VRAM ; slot and adding the result to $8000 (the VRAM base address). @@ -218,7 +218,7 @@ SpriteVRAMAddresses: ; 14118 (5:4118) dw vChars0 + $6c0 dw vChars0 + $780 ; 4-tile sprites dw vChars0 + $7c0 ; 4-tile sprites - + ReadSpriteSheetData: ; 1412e (5:412e) ld a, [hVRAMSlot] ld e, a @@ -248,13 +248,12 @@ ReadSpriteSheetData: ; 1412e (5:412e) inc hl scf ret - + Func_14150: ; 14150 (5:4150) ld a, $1 ld [wPlayerSpriteImageBaseOffset], a ; vram slot for player ld a, $2 ld [wPikachuSpriteImageBaseOffset], a ; vram slot for Pikachu - ld a, $e ld hl, wSprite01SpriteStateData1 .loop @@ -275,7 +274,7 @@ Func_14150: ; 14150 (5:4150) dec a jr nz, .loop ret - + Func_14179: ; 14179 (5:4179) push de push bc diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm index 6bd28dad..5f929ce3 100644 --- a/engine/overworld/movement.asm +++ b/engine/overworld/movement.asm @@ -93,7 +93,7 @@ Func_4e32: ; 4e32 (1:4e32) add b ld [wSpriteStateData1 + 2], a ret - + UpdateNPCSprite: ; 4e3e (1:4e3e) ld a, [H_CURRENTSPRITEOFFSET] swap a @@ -836,7 +836,7 @@ AdvanceScriptedNPCAnimFrameCounter: ; 5264 (1:5264) and $3 ld [hSpriteAnimFrameCounter], a ret - + Func_5274: ; 5274 (1:5274) ld a, [H_CURRENTSPRITEOFFSET] add $7 @@ -853,7 +853,7 @@ Func_5274: ; 5274 (1:5274) and $3 ld [hl], a ; advance to next animation frame every 4 ticks (16 ticks total for one step) ret - + Func_5288: ; 5288 (1:5288) ; nice lookup table ; a is supposedly [wNPCMovementDirections + $fe] @@ -914,7 +914,7 @@ Func_5288: ; 5288 (1:5288) .asm_52e1 call Func_532b jr .asm_530b - + .asm_52e6 call Func_5337 call Func_5349 @@ -939,7 +939,7 @@ Func_5288: ; 5288 (1:5288) call UpdateSpriteImage scf ret - + .asm_530b call Func_5337 call Func_5349 @@ -952,27 +952,27 @@ Func_5288: ; 5288 (1:5288) call UpdateSpriteImage scf ret - + Func_531f: ; 531f (1:531f) lb de, 1, 0 ld c, SPRITE_FACING_DOWN ret - + Func_5325: ; 5325 (1:5325) lb de, -1, 0 ld c, SPRITE_FACING_UP ret - + Func_532b: ; 532b (1:532b) lb de, 0, 1 ld c, SPRITE_FACING_RIGHT ret - + Func_5331: ; 5331 (1:5331) lb de, 0, -1 ld c, SPRITE_FACING_LEFT ret - + Func_5337: ; 5337 (1:5337) ld a, [H_CURRENTSPRITEOFFSET] add $9 @@ -987,7 +987,7 @@ Func_5337: ; 5337 (1:5337) inc l ld [hl], e ; c1x5 (update X movement delta) ret - + Func_5349: ; 5349 (1:5349) ld h, wSpriteStateData2 / $100 ld a, [H_CURRENTSPRITEOFFSET] @@ -1000,7 +1000,7 @@ Func_5349: ; 5349 (1:5349) add e ld [hl], a ; update X position ret - + Func_5357: ; 5357 (1:5357) call Func_5274 ld a, [H_CURRENTSPRITEOFFSET] 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/overworld/oam.asm b/engine/overworld/oam.asm index f51c839f..ede025cd 100644 --- a/engine/overworld/oam.asm +++ b/engine/overworld/oam.asm @@ -19,10 +19,10 @@ PrepareOAMData: ; 499b (1:499b) .spriteLoop ld [hSpriteOffset2], a - + ld e, a ld d, wSpriteStateData1 / $100 - + ld a, [de] ; c1x0 and a jp z, .nextSprite @@ -42,7 +42,7 @@ PrepareOAMData: ; 499b (1:499b) jr c, .usefacing ; unchanging - ld a, $0 + ld a, $0 jr .next .usefacing @@ -81,7 +81,7 @@ PrepareOAMData: ; 499b (1:499b) call Func_4a7b ld [wd5cd], a ld a, [hOAMBufferOffset] - + ld e, a ld d, wOAMBuffer / $100 @@ -185,7 +185,7 @@ GetSpriteScreenXY: ; 4a5f (1:4a5f) and $f0 ld [de], a ; c1xb (x) ret - + Func_4a7b: ; 4a7b (1:4a7b) push bc ld a, [wd5cd] ; temp copy of c1x2 @@ -228,5 +228,5 @@ _IsTilePassable:: ; 4aaa (1:4aaa) .tileNotPassable scf ret - + INCLUDE "data/collision.asm" ; probably
\ No newline at end of file diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm index d0b1cde4..bea43308 100755 --- a/engine/overworld/player_animations.asm +++ b/engine/overworld/player_animations.asm @@ -418,7 +418,7 @@ FishingAnim: ; 70816 (1c:4816) cp $2 ld hl, NothingHereText jr z, .done - + ; there was a bite ; shake the player's sprite vertically @@ -432,7 +432,7 @@ FishingAnim: ; 70816 (1c:4816) call Delay3 dec b jr nz, .loop - + ; If the player is facing up, hide the fishing rod so it doesn't overlap with ; the exclamation bubble that will be shown next. ld a, [wSpriteStateData1 + 2] diff --git a/engine/overworld/pokecenter.asm b/engine/overworld/pokecenter.asm index 63137433..65dfcd87 100755 --- a/engine/overworld/pokecenter.asm +++ b/engine/overworld/pokecenter.asm @@ -106,7 +106,7 @@ Func_6eaa: ; 6eaa (1:6eaa) ld c, 64 call DelayFrames ret - + Func_6ebb: ; 6ebb (1:6ebb) ld a, b ld [H_SPRITEINDEX], a @@ -121,7 +121,7 @@ Func_6ebb: ; 6ebb (1:6ebb) ld [hSpriteImageIndex], a call SpriteFunc_34a1 ret - + PokemonCenterWelcomeText: ; 6de0 (1:6de0) TX_FAR _PokemonCenterWelcomeText db "@" @@ -143,7 +143,7 @@ PokemonCenterFarewellText: ; 6ee5 (1:6ee5) db $a TX_FAR _PokemonCenterFarewellText db "@" - + LooksContentText: ; 6eeb (1:6eeb) TX_FAR _LooksContentText db "@"
\ No newline at end of file diff --git a/engine/overworld/step_functions.asm b/engine/overworld/step_functions.asm index 64d215a1..bc1a74aa 100644 --- a/engine/overworld/step_functions.asm +++ b/engine/overworld/step_functions.asm @@ -123,7 +123,7 @@ ApplyOutOfBattlePoisonDamage: ; c3de (3:43de) .done ld [wOutOfBattleBlackout], a ret - + Func_c4c7: ; c4c7 (3:44c7) ld a, [wStepCounter] and a diff --git a/engine/predefs17_2.asm b/engine/predefs17_2.asm index c0df7d0a..49818543 100755 --- a/engine/predefs17_2.asm +++ b/engine/predefs17_2.asm @@ -1,5 +1,5 @@ ; updates the types of a party mon (pointed to in hl) to the ones of the mon specified in wd11e -SetPartyMonTypes: ; 5db5e (17:5b5e) +SetPartyMonTypes: ; 5db93 (17:5b93) call GetPredefRegisters ld bc, wPartyMon1Type - wPartyMon1 ; $5 add hl, bc diff --git a/engine/save.asm b/engine/save.asm index 5a144d10..b684c1be 100755 --- a/engine/save.asm +++ b/engine/save.asm @@ -182,7 +182,7 @@ WouldYouLikeToSaveText: ; 73ad1 (1c:7ad1) SavingText: ; 73ad6 (1c:7ad6) TX_FAR _SavingText db "@" - + GameSavedText: ; 73adb (1c:7adb) TX_FAR _GameSavedText db "@" @@ -190,7 +190,7 @@ GameSavedText: ; 73adb (1c:7adb) OlderFileWillBeErasedText: ; 73ae0 (1c:7ae0) TX_FAR _OlderFileWillBeErasedText db "@" - + SaveSAVtoSRAM0: ; 73ae5 (1c:7ae5) call EnableSRAMAndLatchClockData ld a, $1 @@ -257,7 +257,7 @@ SaveSAVtoSRAM2: ; 73b56 (1c:7b56) ld [de], a ld hl, sPlayerName ld bc, sMainDataCheckSum - sPlayerName - call SAVCheckSum + call SAVCheckSum ld [sMainDataCheckSum], a call DisableSRAMAndPrepareClockData ret @@ -674,7 +674,7 @@ EnableSRAMAndLatchClockData: ; 73e9f (1c:7e9f) ld a, SRAM_ENABLE ld [MBC1SRamEnable], a ret - + DisableSRAMAndPrepareClockData: ; 73eaa (1c:7eaa) ld a, SRAM_DISABLE ld [MBC1SRamBankingMode], a diff --git a/engine/titlescreen.asm b/engine/titlescreen.asm index a8a65dba..c10e0315 100755 --- a/engine/titlescreen.asm +++ b/engine/titlescreen.asm @@ -222,7 +222,6 @@ DisplayTitleScreen: ; 4171 (1:4171) jr nz, .audioFadeLoop jp Init - .doClearSaveDialogue ; 432a (1:432a) jpba DoClearSaveDialogue @@ -255,7 +254,6 @@ CopyrightTextString: ; 4355 (1:4355) TitleScreen_PlayPikachuPCM: ; 4387 (1:4387) callab PlayPikachuSoundClip ret - DoTitleScreenFunction: ; 4390 (1:4390) call .CheckTimer @@ -290,7 +288,6 @@ DoTitleScreenFunction: ; 4390 (1:4390) ld [wTitleScreenScene], a .Nop ret - .BlinkOpen: ; 43bf (1:43bf) ld e, 0 @@ -319,7 +316,6 @@ DoTitleScreenFunction: ; 4390 (1:4390) ld hl, wTitleScreenScene inc [hl] ret - .CheckTimer: ; 43de (1:43de) ld hl, wTitleScreenTimer @@ -341,7 +337,6 @@ CopyFixedLengthText: ; 43f3 (1:43f3) ld bc, NAME_LENGTH jp CopyData - NintenText: db "NINTEN@" SonyText: db "SONY@" @@ -364,7 +359,6 @@ IncrementResetCounter: ; 4405 (1:4405) scf ret - FillSpriteBuffer0WithAA: ; 4418 (1:4418) xor a call SwitchSRAMBankAndLatchClockData diff --git a/engine/town_map.asm b/engine/town_map.asm index 2d4f0023..82e24d75 100755 --- a/engine/town_map.asm +++ b/engine/town_map.asm @@ -587,12 +587,12 @@ LoadTownMapEntry: ; 7137a (1c:537a) ld h, [hl] ld l, a ret - + ; ExternalMapEntries: ; 7139c (1c:539c) ; dr $7139c,$7140b ; InternalMapEntries: ; 7140b (1c:540b) ; dr $7140b,$7174b - + INCLUDE "data/town_map_entries.asm" INCLUDE "text/map_names.asm" ; TODO: relabel addresses 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 Binary files differdeleted file mode 100644 index e41b4295..00000000 --- a/gfx/redgreenversion.png +++ /dev/null diff --git a/gfx/sgbborder.png b/gfx/sgbborder.png Binary files differdeleted file mode 100644 index 7549bb47..00000000 --- a/gfx/sgbborder.png +++ /dev/null diff --git a/gfx/unknown_ea563.png b/gfx/unknown_ea563.png Binary files differdeleted file mode 100644 index adf086ca..00000000 --- a/gfx/unknown_ea563.png +++ /dev/null diff --git a/home/audio.asm b/home/audio.asm index 69e81dd8..f71aa3d0 100644 --- a/home/audio.asm +++ b/home/audio.asm @@ -136,7 +136,7 @@ PlayMusic:: ; 2211 (0:2211) ld [wAudioSavedROMBank], a ld a, b jr PlaySound - + Func_2223:: ; 2223 (0:2223) xor a ld [wChannelSoundIDs + CH4], a @@ -145,7 +145,7 @@ Func_2223:: ; 2223 (0:2223) ld [wChannelSoundIDs + CH7], a ld [rNR10], a ret - + StopAllMusic:: ; 2233 (0:2233) ld a, $FF ld [wNewSoundID], a @@ -232,7 +232,7 @@ InitMusicVariables:: ; 22aa (0:22aa) pop de pop hl ret - + InitSFXVariables:: ; 22c0 (0:22c0) push hl push de @@ -242,7 +242,7 @@ InitSFXVariables:: ; 22c0 (0:22c0) pop de pop hl ret - + StopAllAudio:: ; 22d6 (0:22d6) push hl push de @@ -252,7 +252,7 @@ StopAllAudio:: ; 22d6 (0:22d6) pop de pop hl ret - + DetermineAudioFunction:: ; 22ec (0:22ec) ld a, [H_LOADEDROMBANK] push af diff --git a/home/copy.asm b/home/copy.asm index 8dc2acea..d073f54c 100644 --- a/home/copy.asm +++ b/home/copy.asm @@ -24,7 +24,7 @@ CopyData:: ; 00b1 (0:00b1) dec b jr nz,.loop ret - + .copybytes ; 00c1 ld a, [hli] ld [de], a @@ -52,7 +52,7 @@ CopyVideoDataAlternate:: ; 00c8 (0:00c8) ld c,a pop af jp FarCopyData - + CopyVideoDataDoubleAlternate:: ; 00e3 (0:00e3) ld a, [rLCDC] bit 7,a ; LCD enabled? diff --git a/home/copy2.asm b/home/copy2.asm index 5318dc35..07eeb6b2 100644 --- a/home/copy2.asm +++ b/home/copy2.asm @@ -148,7 +148,7 @@ FillMemory:: ; 166e (0:166e) dec b jr nz, .loop ret - + GetFarByte:: ; 1681 (0:1681) ; get a byte from a:hl ; and return it in a diff --git a/home/overworld.asm b/home/overworld.asm index de062f46..e1312df1 100644 --- a/home/overworld.asm +++ b/home/overworld.asm @@ -414,7 +414,6 @@ CheckWarpsNoCollisionLoop:: ; 04d5 (0:04d5) jr z, CheckWarpsNoCollisionRetry2 ; if directional buttons aren't being pressed, do not pass through the warp jr WarpFound1 - CheckWarpsNoCollisionRetry1:: ; 050f (0:050f) inc hl CheckWarpsNoCollisionRetry2:: ; 0510 (0:0510) @@ -426,7 +425,6 @@ ContinueCheckWarpsNoCollisionLoop:: ; 0512 (0:0512) jp nz, CheckWarpsNoCollisionLoop jp CheckMapConnections - ; check if the player has stepped onto a warp after having collided CheckWarpsCollision:: ; 051a (0:051a) ld a, [wNumberOfWarps] @@ -791,8 +789,8 @@ HandleFlyWarpOrDungeonWarp:: ; 0794 (0:0794) LeaveMapAnim:: ; 07bc (0:07bc) jpba _LeaveMapAnim - -Func_07c4:: ; 07c4 (0:07c4) + +Func_07c4:: ; 07c4 (0:07c4) ld a, [wWalkBikeSurfState] and a ret z @@ -804,7 +802,6 @@ Func_07c4:: ; 07c4 (0:07c4) call PlayDefaultMusic ret - LoadPlayerSpriteGraphics:: ; 07d7 (0:07d7) ; Load sprite graphics based on whether the player is standing, biking, or surfing. @@ -822,7 +819,7 @@ LoadPlayerSpriteGraphics:: ; 07d7 (0:07d7) jr .startWalking .ridingBike - ; If the bike can't be used, + ; If the bike can't be used, ; start walking instead. call IsBikeRidingAllowed jr c, .determineGraphics @@ -844,7 +841,7 @@ LoadPlayerSpriteGraphics:: ; 07d7 (0:07d7) jp LoadWalkingPlayerSpriteGraphics IsBikeRidingAllowed:: ; 0805 (0:0805) -; The bike can be used on Route 23 and Indigo Plateau, +; The bike can be used on Route 23 and Indigo Plateau, ; or maps with tilesets in BikeRidingTilesets. ; Return carry if biking is allowed. @@ -1187,7 +1184,6 @@ IsSpriteInFrontOfPlayer2:: ; 0985 (0:0985) scf ret - SignLoop:: ; 09f2 (0:09f2) ; search if a player is facing a sign ld hl, wSignCoords ; start of sign coordinates @@ -1518,7 +1514,6 @@ CopyToRedrawRowOrColumnSrcTiles:: ; 0baa (0:0baa) jr nz, .loop ret - ScheduleSouthRowRedraw:: ; 0bb6 (0:0bb6) coord hl, 0, 16 call CopyToRedrawRowOrColumnSrcTiles @@ -1640,7 +1635,6 @@ JoypadOverworld:: ; 0c51 (0:0c51) call AreInputsSimulated ret - ForceBikeDown:: ; 0c65 (0:0c65) ld a, [wFlags_D733] bit 3, a ; check if a trainer wants a challenge @@ -1655,7 +1649,6 @@ ForceBikeDown:: ; 0c65 (0:0c65) ld [hJoyHeld], a ; on the cycling road, if there isn't a trainer and the player isn't pressing buttons, simulate a down press ret - AreInputsSimulated:: ; 0c7b (0:0c7b) ld a, [wd730] bit 7, a @@ -1675,7 +1668,6 @@ AreInputsSimulated:: ; 0c7b (0:0c7b) ld [hJoyReleased], a ret - ; if done simulating button presses .doneSimulating xor a @@ -1692,7 +1684,6 @@ AreInputsSimulated:: ; 0c7b (0:0c7b) res 7, [hl] ret - GetSimulatedInput:: ; 0cb3 (0:0cb3) ld hl, wSimulatedJoypadStatesIndex dec [hl] @@ -1719,8 +1710,8 @@ GetSimulatedInput:: ; 0cb3 (0:0cb3) ; It seems that this function has a bug in it, but due to luck, it doesn't ; show up. After detecting a sprite collision, it jumps to the code that ; checks if the next tile is passable instead of just directly jumping to the -; "collision detected" code. However, it doesn't store the next tile in c, -; so the old value of c is used. 2429 is always called before this function, +; "collision detected" code. However, it doesn't store the next tile in c, +; so the old value of c is used. 2429 is always called before this function, ; and 2429 always sets c to 0xF0. There is no 0xF0 background tile, so it ; is considered impassable and it is detected as a collision. CollisionCheckOnWater:: ; 0cca (0:0cca) @@ -1770,7 +1761,7 @@ CollisionCheckOnWater:: ; 0cca (0:0cca) .noCollision ; ...and they do the same mistake twice and a -.done +.done ret ; function to run the current map's script @@ -1808,7 +1799,6 @@ LoadWalkingPlayerSpriteGraphics:: ; 0d5e (0:0d5e) ld de, RedSprite ; $4180 jr LoadPlayerSpriteGraphicsCommon - LoadSurfingPlayerSpriteGraphics2:: ; 0d69 (0:0d69) ld a, [wd473] and a @@ -1826,7 +1816,6 @@ LoadSurfingPlayerSpriteGraphics2:: ; 0d69 (0:0d69) ld de, SurfingPikachuSprite ; 3f:6def jr LoadPlayerSpriteGraphicsCommon - LoadSurfingPlayerSpriteGraphics:: ; 0d83 (0:0d83) ld b, BANK(RedSprite) ; not sure, but probably same bank (5) ld de, SeelSprite @@ -2018,7 +2007,6 @@ CopySignData:: ; 0eb3 (0:0eb3) jr nz, .signcopyloop ret - ; function to load map data LoadMapData:: ; 1241 (0:1241) ld a, [H_LOADEDROMBANK] @@ -2083,7 +2071,7 @@ ReloadMapAfterPrinter:: ; 0f3d (0:0f3d) asm_0f4d: ; 0f4d (0:0f4d) jpab Func_f02da ret ; useless? - + ResetMapVariables:: ; 0f56 (0:0f56) ld a, $98 ld [wMapViewVRAMPointer + 1], a @@ -2178,9 +2166,9 @@ ForceBikeOrSurf:: ; 0fd6 (0:0fd6) ld hl, LoadPlayerSpriteGraphics call Bankswitch jp PlayDefaultMusic ; update map/player state? - + ; Handle the player jumping down -; a ledge in the overworld. +; a ledge in the overworld. HandleMidJump:: ; 0fe1 (0:0fe1) ld a, [wd736] bit 6, a ; jumping down a ledge? @@ -2193,7 +2181,7 @@ IsSpinning:: ; 0ff0 (0:0ff0) bit 7, a ret z ; no spinning jpba LoadSpinnerArrowTiles ; spin while moving - + Func_0ffe:: ; 0ffe (0:0ffe) jpab IsPlayerTalkingToPikachu @@ -2266,7 +2254,6 @@ ZeroSpriteStateData:: ; 1050 (0:1050) jr nz, .loop ret - DisableRegularSprites:: ; 1060 (0:1060) ; initialize all C100-C1FF sprite entries to disabled (other than player's and pikachu) ld hl, wSpriteStateData1 + 1 * $10 + 2 @@ -2279,7 +2266,6 @@ DisableRegularSprites:: ; 1060 (0:1060) jr nz, .loop ret - LoadSprite:: ; 106f (0:106f) push hl ld b, $0 @@ -2310,7 +2296,6 @@ LoadSprite:: ; 106f (0:106f) pop hl ret - .trainerSprite ld a, [hli] ld [$ff8d], a ; save trainer class @@ -2326,7 +2311,6 @@ LoadSprite:: ; 106f (0:106f) pop hl ret - .itemBallSprite ld a, [hli] ld [$ff8d], a ; save item number @@ -2338,4 +2322,4 @@ LoadSprite:: ; 106f (0:106f) xor a ld [hl], a ; zero byte 1, since it is not used pop hl - ret ; end of home/overworld.asm = 10b9 (0:10b9) + ret ; end of home/overworld.asm = 10b9 (0:10b9) diff --git a/home/pikachu.asm b/home/pikachu.asm index f3ab9b8e..e79fdb1b 100755 --- a/home/pikachu.asm +++ b/home/pikachu.asm @@ -20,7 +20,7 @@ Func_1525:: ; 1525 (0:1525) res 3, [hl] pop hl ret - + Func_152d:: ; 152d (0:152d) push hl ld hl, wPikachuOverworldStateFlags @@ -29,7 +29,7 @@ Func_152d:: ; 152d (0:152d) ld [hl], $ff pop hl ret - + DisablePikachuFollowingPlayer:: ; 153a (0:153a) push hl ld hl, wPikachuOverworldStateFlags @@ -43,14 +43,14 @@ EnablePikachuFollowingPlayer:: ; 1542 (0:1542) res 1, [hl] pop hl ret - + CheckPikachuFollowingPlayer:: ; 154a (0:154a) push hl ld hl, wPikachuOverworldStateFlags bit 1, [hl] pop hl ret - + SpawnPikachu:: ; 1552 (0:1552) ld a, [hl] dec a @@ -79,7 +79,7 @@ Pikachu_IsInArray:: ; 1568 (0:1568) dec hl and a ret - + GetPikachuMovementScriptByte:: ; 157c (0:157c) push hl push bc diff --git a/home/text.asm b/home/text.asm index a0e860d9..eadaf0b3 100644 --- a/home/text.asm +++ b/home/text.asm @@ -58,7 +58,7 @@ PlaceNextChar:: ; 1724 (0:1724) pop hl ret -Char4ETest:: ; 172d (0:172d) +Char4ETest:: ; 172d (0:172d) cp $4E jr nz, .next ld bc, $0028 @@ -304,7 +304,7 @@ Char49:: ; 18a3 (0:18a3) jr z, .Char49 ld a, $4e jp Char4ETest - + .Char49 push de ld a, $EE diff --git a/home/vblank.asm b/home/vblank.asm index cab6f944..24159a4c 100644 --- a/home/vblank.asm +++ b/home/vblank.asm @@ -9,7 +9,7 @@ VBlank:: ; 1de5 (0:1de5) push af xor a ld [rVBK], a ; reset vram bank to 0 - + ld a, [H_LOADEDROMBANK] ld [wVBlankSavedROMBank], a @@ -39,7 +39,7 @@ VBlank:: ; 1de5 (0:1de5) ; VBlank-sensitive operations end. call TrackPlayTime ; keep track of time played - + call Random call ReadJoypad @@ -58,10 +58,10 @@ VBlank:: ; 1de5 (0:1de5) .skipDec call FadeOutAudio - + callbs Music_DoLowHealthAlarm callbs Audio1_UpdateMusic - + call SerialFunction ld a, [wVBlankSavedROMBank] @@ -70,7 +70,7 @@ VBlank:: ; 1de5 (0:1de5) pop af ld [rVBK],a - + pop hl pop de pop bc diff --git a/home/vcopy.asm b/home/vcopy.asm index da85e3e7..464faf51 100644 --- a/home/vcopy.asm +++ b/home/vcopy.asm @@ -335,7 +335,7 @@ VBlankCopy:: ; 1c21 (0:1c21) ld [H_VBCOPYSRC],sp ld sp,hl ld [H_VBCOPYDEST],sp - + ld a, [H_SPTEMP] ld l, a ld a, [H_SPTEMP + 1] @@ -356,7 +356,7 @@ UpdateMovingBgTiles:: ; 1c75 (0:1c75) ld a,[rLY] cp $90 ; check if not in vblank period??? (maybe if vblank is too long) ret c - + ld a, [hMovingBGTilesCounter1] inc a ld [hMovingBGTilesCounter1], a @@ -44,10 +44,6 @@ const: MACRO const_value = const_value + 1 ENDM -dr: MACRO -INCBIN "baserom.gbc",\1,\2 - \1 -ENDM - homecall_jump: MACRO ld a, [H_LOADEDROMBANK] push af @@ -68,7 +64,7 @@ homecall_jump_sf: MACRO ld a,b jp BankswitchCommon ENDM - + homecall: MACRO ld a, [H_LOADEDROMBANK] push af @@ -94,13 +90,13 @@ switchbank: MACRO ld a, BANK(\1) call BankswitchCommon ENDM - + callbs: MACRO ld a, BANK(\1) call BankswitchCommon call \1 ENDM - + callba: MACRO ld b, BANK(\1) ld hl, \1 @@ -119,7 +115,7 @@ calladb_ModifyPikachuHappiness: MACRO ld b, BANK(ModifyPikachuHappiness) call Bankswitch ENDM - + callabd_ModifyPikachuHappiness: MACRO ld hl, ModifyPikachuHappiness ld b, BANK(ModifyPikachuHappiness) @@ -383,11 +379,11 @@ predef_jump: MACRO predef_id \1 jp Predef ENDM - + tx_pre_const: MACRO const \1_id ENDM - + add_tx_pre: MACRO \1_id:: dw \1 ENDM @@ -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 ApplyPikachuMovementData - 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,24 +1647,13 @@ 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_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" @@ -1798,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: @@ -1816,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" @@ -1838,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" @@ -1854,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" @@ -1934,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" @@ -2012,6 +1972,7 @@ INCLUDE "engine/overworld/elevator.asm" INCLUDE "engine/overworld/hidden_items.asm" + SECTION "bank1E",ROMX,BANK[$1E] INCLUDE "engine/battle/animations.asm" @@ -2027,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 @@ -2152,23 +2117,12 @@ 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" -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" @@ -2178,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.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/mtmoon3_2.asm b/scripts/mtmoon3_2.asm new file mode 100755 index 00000000..c6ec92b4 --- /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 ApplyPikachuMovementData + ret 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 585d0ae4..71e900eb 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 f29eacd1..41b3eb4f 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/pokemontower7.asm b/scripts/pokemontower7.asm index 77394447..32050e25 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/scripts/viridiancity2.asm b/scripts/viridiancity2.asm index 8e8b51db..2b6a4001 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 @@ -1,3 +1,4 @@ +INCLUDE "charmap.asm" INCLUDE "constants/text_constants.asm" TEXT_1 EQU $26 TEXT_2 EQU $27 @@ -1482,7 +1483,7 @@ _WithExpAllText:: _BoostedText:: text "a boosted" cont "@@" - + _ExpPointsText:: TX_NUM wExpAmountGained, 2, 4 text " EXP. Points!" 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 - @@ -1285,7 +1285,7 @@ wPlayerSpinWhileMovingUpOrDownAnimFrameDelay:: ; cd3f wHiddenObjectIndex:: ; cd3f wTrainerFacingDirection:: ; cd3f - + ds 1 wHoFMonOrPlayer:: ; cd40 @@ -1639,7 +1639,7 @@ wScriptedNPCWalkCounter:: ; cf18 wOnSGB:: ; cf1b ; if running on SGB, it's 1, else it's 0 ds 1 - + wDefaultPaletteCommand:: ; cf1c ds 1 @@ -2859,9 +2859,9 @@ wPikachuHappiness:: ds 1 ; d46f wPikachuMood:: ds 1 ; d470 wd472:: ds 1 wd473:: ds 1 - + ds 1 - + wd475:: ds 1 ds 4 @@ -2876,8 +2876,8 @@ wd492:: ds 1 ; d492 wSurfingMinigameHiScore:: ds 2 ; 4-digit BCD little-endian ds 1 + wPrinterSettings:: ds 1 - wUnknownSerialFlag_d499:: ds 1 ; d498 wPrinterConnectionOpen:: ds 1 ; d499 wPrinterOpcode:: ds 1 ; d49a @@ -3402,7 +3402,7 @@ wSecondLockTrashCanIndex:: ; d744 ds 1 ds 2 - + wEventFlags:: wd747:: ds 3 ; below here are mostly in game flags wd74a:: ds 1 @@ -3562,7 +3562,7 @@ wWaterRate:: db ; d8a4 wWaterMons:: db ; d8a5 ds wWaterRate - @ - + wEnemyMons:: ; d8a4 wEnemyMon1:: party_struct wEnemyMon1 wEnemyMon2:: party_struct wEnemyMon2 diff --git a/yellow/audio.asm b/yellow/audio.asm deleted file mode 100755 index b61fccd8..00000000 --- a/yellow/audio.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "charmap.asm" -INCLUDE "audio.asm"
\ No newline at end of file diff --git a/yellow/main.asm b/yellow/main.asm deleted file mode 100755 index e071bfde..00000000 --- a/yellow/main.asm +++ /dev/null @@ -1 +0,0 @@ -INCLUDE "main.asm"
\ No newline at end of file diff --git a/yellow/text.asm b/yellow/text.asm deleted file mode 100755 index 6c118c73..00000000 --- a/yellow/text.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "charmap.asm" -INCLUDE "text.asm" diff --git a/yellow/wram.asm b/yellow/wram.asm deleted file mode 100755 index 98057cd2..00000000 --- a/yellow/wram.asm +++ /dev/null @@ -1 +0,0 @@ -INCLUDE "wram.asm" |