mirror of
https://github.com/pret/pokeyellow.git
synced 2026-03-21 17:34:31 -05:00
Start reorganizing pokeyellow
This commit is contained in:
parent
87131eaa1b
commit
aae999f72b
2
.gitattributes
vendored
2
.gitattributes
vendored
|
|
@ -14,4 +14,4 @@
|
|||
*.tilemap binary
|
||||
*.wav binary
|
||||
*.blk binary
|
||||
*.pic binary
|
||||
*.pic binary
|
||||
|
|
|
|||
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -6,6 +6,9 @@
|
|||
*.2bpp
|
||||
*.pic
|
||||
|
||||
# compiled audio
|
||||
*.pcm
|
||||
|
||||
# compiled roms
|
||||
*.gbc
|
||||
*.gb
|
||||
|
|
@ -21,9 +24,6 @@
|
|||
*.pyc
|
||||
*$py.class
|
||||
|
||||
# converted audio data
|
||||
*.pcm
|
||||
|
||||
# save game files
|
||||
*.sgm
|
||||
*.sav
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ Open **Terminal** and enter the following commands, depending on which distro yo
|
|||
To install the software required for **pokeyellow**:
|
||||
|
||||
```bash
|
||||
sudo apt-get install make gcc git
|
||||
sudo apt-get install make gcc git python
|
||||
```
|
||||
|
||||
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.4.1** from source.
|
||||
|
|
@ -92,7 +92,7 @@ Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source)
|
|||
To install the software required for **pokeyellow**:
|
||||
|
||||
```bash
|
||||
sudo zypper install make gcc git
|
||||
sudo zypper install make gcc git python
|
||||
```
|
||||
|
||||
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.4.1** from source.
|
||||
|
|
@ -102,7 +102,7 @@ Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source)
|
|||
To install the software required for **pokeyellow**:
|
||||
|
||||
```bash
|
||||
sudo pacman -S make gcc git
|
||||
sudo pacman -S make gcc git python
|
||||
```
|
||||
|
||||
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/arch) for Arch Linux to install **rgbds 0.4.1**.
|
||||
|
|
@ -133,6 +133,7 @@ If your distro is not listed here, try to find the required software in its repo
|
|||
- `gcc` (or `clang`)
|
||||
- `git`
|
||||
- `rgbds`
|
||||
- `python`
|
||||
|
||||
If `rgbds` is not available, you'll need to follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.4.1** from source.
|
||||
|
||||
|
|
|
|||
23
Makefile
23
Makefile
|
|
@ -1,6 +1,3 @@
|
|||
PYTHON := python
|
||||
pcm := $(PYTHON) tools/pokemontools/pcm.py pcm
|
||||
|
||||
rom := pokeyellow.gbc
|
||||
|
||||
rom_obj := \
|
||||
|
|
@ -11,6 +8,7 @@ maps.o \
|
|||
text.o \
|
||||
wram.o \
|
||||
gfx/pics.o \
|
||||
gfx/pikachu.o \
|
||||
gfx/sprites.o \
|
||||
gfx/tilesets.o
|
||||
|
||||
|
|
@ -29,6 +27,9 @@ RGBFIX ?= $(RGBDS)rgbfix
|
|||
RGBGFX ?= $(RGBDS)rgbgfx
|
||||
RGBLINK ?= $(RGBDS)rgblink
|
||||
|
||||
PYTHON := python
|
||||
pcm := $(PYTHON) tools/pokemontools/pcm.py pcm
|
||||
|
||||
|
||||
### Build targets
|
||||
|
||||
|
|
@ -42,7 +43,8 @@ all: $(rom)
|
|||
yellow: $(rom)
|
||||
|
||||
clean: tidy
|
||||
find . \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' -o -iname '*.pcm' \) -delete
|
||||
find gfx \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' \) -delete
|
||||
find audio/pikachu_cries \( -iname '*.pcm' \) -delete
|
||||
|
||||
tidy:
|
||||
rm -f $(rom) $(rom_obj) $(rom:.gbc=.map) $(rom:.gbc=.sym) rgbdscheck.o
|
||||
|
|
@ -105,11 +107,14 @@ gfx/slots/slots_1.2bpp: tools/gfx += --trim-whitespace
|
|||
gfx/tilesets/%.2bpp: tools/gfx += --trim-whitespace
|
||||
gfx/tilesets/reds_house.2bpp: tools/gfx += --preserve=0x48
|
||||
|
||||
gfx/title/pokemon_logo.2bpp: tools/gfx += --trim-whitespace
|
||||
|
||||
gfx/trade/game_boy.2bpp: tools/gfx += --remove-duplicates
|
||||
|
||||
gfx/sgb/border.2bpp: tools/gfx += --trim-whitespace
|
||||
gfx/surfing_pikachu_1c.2bpp: tools/gfx += --trim-whitespace
|
||||
gfx/surfing_pikachu_3.2bpp: tools/gfx += --trim-whitespace
|
||||
|
||||
gfx/surfing_pikachu/surfing_pikachu_1c.2bpp: tools/gfx += --trim-whitespace
|
||||
gfx/surfing_pikachu/surfing_pikachu_3.2bpp: tools/gfx += --trim-whitespace
|
||||
|
||||
|
||||
### Catch-all graphics rules
|
||||
|
|
@ -130,5 +135,9 @@ gfx/surfing_pikachu_3.2bpp: tools/gfx += --trim-whitespace
|
|||
tools/pkmncompress $< $@
|
||||
|
||||
|
||||
### Catch-all audio rules
|
||||
|
||||
%.wav: ;
|
||||
%.pcm: %.wav ; @$(pcm) $<
|
||||
|
||||
%.pcm: %.wav
|
||||
@$(pcm) $<
|
||||
|
|
|
|||
14
audio.asm
14
audio.asm
|
|
@ -433,8 +433,6 @@ INCLUDE "audio/sfx/get_item2_4.asm"
|
|||
|
||||
SECTION "Audio Engine 1", ROMX
|
||||
|
||||
AudioEngine1::
|
||||
|
||||
INCLUDE "audio/play_battle_music.asm"
|
||||
INCLUDE "audio/engine_1.asm"
|
||||
INCLUDE "audio/alternate_tempo.asm"
|
||||
|
|
@ -447,25 +445,18 @@ INCLUDE "audio/low_health_alarm.asm"
|
|||
|
||||
SECTION "Audio Engine 2", ROMX
|
||||
|
||||
AudioEngine2::
|
||||
|
||||
INCLUDE "audio/engine_2.asm"
|
||||
|
||||
|
||||
SECTION "Audio Engine 3", ROMX
|
||||
|
||||
AudioEngine3::
|
||||
|
||||
INCLUDE "audio/pokedex_rating_sfx.asm"
|
||||
INCLUDE "audio/engine_3.asm"
|
||||
|
||||
|
||||
SECTION "Audio Engine 4", ROMX
|
||||
|
||||
SurfingPikachu1Graphics1:: INCBIN "gfx/surfing_pikachu_1a.2bpp"
|
||||
SurfingPikachu1Graphics2:: INCBIN "gfx/surfing_pikachu_1b.2bpp"
|
||||
SurfingPikachu1Graphics3:: INCBIN "gfx/surfing_pikachu_1c.2bpp"
|
||||
|
||||
INCLUDE "gfx/surfing_pikachu.asm"
|
||||
INCLUDE "audio/engine_4.asm"
|
||||
|
||||
|
||||
|
|
@ -550,5 +541,6 @@ INCLUDE "audio/music/meetjessiejames.asm"
|
|||
|
||||
INCBIN "audio/unknown_832b9.bin"
|
||||
|
||||
; cries are in different banks
|
||||
|
||||
; Pikachu cries are in different banks
|
||||
INCLUDE "audio/pikachu_cries.asm"
|
||||
|
|
|
|||
|
|
@ -23,18 +23,17 @@ Music_RivalAlternateTempo::
|
|||
ld a, MUSIC_MEET_RIVAL
|
||||
call PlayMusic
|
||||
ld de, Music_MeetRival_branch_b119
|
||||
jr asm_99ed
|
||||
jr FinishAlternateRivalMusic
|
||||
|
||||
; applies both the alternate start and alternate tempo
|
||||
Music_RivalAlternateStartAndTempo::
|
||||
call Music_RivalAlternateStart
|
||||
ld de, Music_MeetRival_branch_b19b
|
||||
asm_99ed:
|
||||
FinishAlternateRivalMusic:
|
||||
ld hl, wChannelCommandPointers
|
||||
jp Audio1_OverwriteChannelPointer
|
||||
|
||||
; XXX
|
||||
ret
|
||||
ret ; unused
|
||||
|
||||
; an alternate tempo for Cities1 which is used for the Hall of Fame room
|
||||
Music_Cities1AlternateTempo::
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
; The first of three duplicated sound engines.
|
||||
; The first of four partially duplicated sound engines.
|
||||
|
||||
Audio1_UpdateMusic::
|
||||
ld c, Ch1
|
||||
|
|
@ -1064,7 +1064,7 @@ Audio1_IsCry:
|
|||
|
||||
Audio1_96c3:
|
||||
ld a, [wAudioROMBank]
|
||||
cp BANK(AudioEngine2)
|
||||
cp BANK("Audio Engine 2")
|
||||
jr nz, .asm_96dc
|
||||
ld a, [wChannelSoundIDs + Ch8]
|
||||
ld b, a
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
; The second of three duplicated sound engines.
|
||||
; The second of four partially duplicated sound engines.
|
||||
; This copy has a few differences relating to battle sound effects
|
||||
; and the low health alarm that plays in battle
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
; The third of three duplicated sound engines.
|
||||
; The third of four partially duplicated sound engines.
|
||||
|
||||
Audio3_PlaySound::
|
||||
ld [wSoundID], a
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
; The fourth of three duplicated sound engines.
|
||||
; The fourth of four partially duplicated sound engines.
|
||||
|
||||
Audio4_PlaySound::
|
||||
ld [wSoundID], a
|
||||
|
|
|
|||
|
|
@ -6,10 +6,8 @@ Music_Dungeon1_Ch1::
|
|||
vibrato 10, 1, 4
|
||||
note_type 12, 4, -5
|
||||
rest 8
|
||||
; stereo_panning %1110, %1101
|
||||
octave 4
|
||||
note F#, 8
|
||||
; stereo_panning %1111, %1111
|
||||
|
||||
Music_Dungeon1_branch_7dee5::
|
||||
note_type 12, 11, 2
|
||||
|
|
|
|||
|
|
@ -5,12 +5,14 @@ pcm: MACRO
|
|||
.End:
|
||||
ENDM
|
||||
|
||||
SECTION "Pikachu Cries 1", ROMX ; BANK $21
|
||||
|
||||
; All of the pcm data has one trailing byte that is never processed.
|
||||
|
||||
SECTION "Pikachu Cries 1", ROMX
|
||||
|
||||
PikachuCry1::
|
||||
pcm INCBIN "audio/pikachu_cries/pikachu_cry_1.pcm"
|
||||
db $77 ; unused
|
||||
; All of the pcm data has one trailing byte that is never processed.
|
||||
|
||||
PikachuCry2::
|
||||
pcm INCBIN "audio/pikachu_cries/pikachu_cry_2.pcm"
|
||||
|
|
@ -25,7 +27,7 @@ PikachuCry4::
|
|||
db $e0 ; unused
|
||||
|
||||
|
||||
SECTION "Pikachu Cries 2", ROMX ; BANK $22
|
||||
SECTION "Pikachu Cries 2", ROMX
|
||||
|
||||
PikachuCry5::
|
||||
pcm INCBIN "audio/pikachu_cries/pikachu_cry_5.pcm"
|
||||
|
|
@ -40,7 +42,7 @@ PikachuCry7::
|
|||
db $ff ; unused
|
||||
|
||||
|
||||
SECTION "Pikachu Cries 3", ROMX ; BANK $23
|
||||
SECTION "Pikachu Cries 3", ROMX
|
||||
|
||||
PikachuCry8::
|
||||
pcm INCBIN "audio/pikachu_cries/pikachu_cry_8.pcm"
|
||||
|
|
@ -55,7 +57,7 @@ PikachuCry10::
|
|||
db $ff ; unused
|
||||
|
||||
|
||||
SECTION "Pikachu Cries 4", ROMX ; BANK $24
|
||||
SECTION "Pikachu Cries 4", ROMX
|
||||
|
||||
PikachuCry11::
|
||||
pcm INCBIN "audio/pikachu_cries/pikachu_cry_11.pcm"
|
||||
|
|
@ -70,7 +72,7 @@ PikachuCry13::
|
|||
db $f0 ; unused
|
||||
|
||||
|
||||
SECTION "Pikachu Cries 5", ROMX ; BANK $25
|
||||
SECTION "Pikachu Cries 5", ROMX
|
||||
|
||||
PikachuCry14::
|
||||
pcm INCBIN "audio/pikachu_cries/pikachu_cry_14.pcm"
|
||||
|
|
@ -80,7 +82,7 @@ PikachuCry15::
|
|||
pcm INCBIN "audio/pikachu_cries/pikachu_cry_15.pcm"
|
||||
db $77 ; unused
|
||||
|
||||
SECTION "Pikachu Cries 6", ROMX ; BANK $31
|
||||
SECTION "Pikachu Cries 6", ROMX
|
||||
|
||||
PikachuCry16::
|
||||
pcm INCBIN "audio/pikachu_cries/pikachu_cry_16.pcm"
|
||||
|
|
@ -95,7 +97,7 @@ PikachuCry22::
|
|||
db $7e ; unused
|
||||
|
||||
|
||||
SECTION "Pikachu Cries 7", ROMX ; BANK $32
|
||||
SECTION "Pikachu Cries 7", ROMX
|
||||
|
||||
PikachuCry20::
|
||||
pcm INCBIN "audio/pikachu_cries/pikachu_cry_20.pcm"
|
||||
|
|
@ -106,7 +108,7 @@ PikachuCry21::
|
|||
db $ff ; unused
|
||||
|
||||
|
||||
SECTION "Pikachu Cries 8", ROMX ; BANK $33
|
||||
SECTION "Pikachu Cries 8", ROMX
|
||||
|
||||
PikachuCry19::
|
||||
pcm INCBIN "audio/pikachu_cries/pikachu_cry_19.pcm"
|
||||
|
|
@ -120,7 +122,7 @@ PikachuCry26::
|
|||
pcm INCBIN "audio/pikachu_cries/pikachu_cry_26.pcm"
|
||||
db $00 ; unused
|
||||
|
||||
SECTION "Pikachu Cries 9", ROMX ; BANK $34
|
||||
SECTION "Pikachu Cries 9", ROMX
|
||||
|
||||
PikachuCry17::
|
||||
pcm INCBIN "audio/pikachu_cries/pikachu_cry_17.pcm"
|
||||
|
|
@ -135,7 +137,7 @@ PikachuCry25::
|
|||
db $03 ; unused
|
||||
|
||||
|
||||
SECTION "Pikachu Cries 10", ROMX ; BANK $35
|
||||
SECTION "Pikachu Cries 10", ROMX
|
||||
|
||||
PikachuCry27::
|
||||
pcm INCBIN "audio/pikachu_cries/pikachu_cry_27.pcm"
|
||||
|
|
@ -157,7 +159,7 @@ PikachuCry31::
|
|||
pcm INCBIN "audio/pikachu_cries/pikachu_cry_31.pcm"
|
||||
db $00 ; unused
|
||||
|
||||
SECTION "Pikachu Cries 11", ROMX ; BANK $36
|
||||
SECTION "Pikachu Cries 11", ROMX
|
||||
|
||||
PikachuCry32::
|
||||
pcm INCBIN "audio/pikachu_cries/pikachu_cry_32.pcm"
|
||||
|
|
@ -176,7 +178,7 @@ PikachuCry41::
|
|||
db $9b ; unused
|
||||
|
||||
|
||||
SECTION "Pikachu Cries 12", ROMX ; BANK $37
|
||||
SECTION "Pikachu Cries 12", ROMX
|
||||
|
||||
PikachuCry35::
|
||||
pcm INCBIN "audio/pikachu_cries/pikachu_cry_35.pcm"
|
||||
|
|
@ -191,7 +193,7 @@ PikachuCry39::
|
|||
db $0f ; unused
|
||||
|
||||
|
||||
SECTION "Pikachu Cries 13", ROMX ; BANK $38
|
||||
SECTION "Pikachu Cries 13", ROMX
|
||||
|
||||
PikachuCry37::
|
||||
pcm INCBIN "audio/pikachu_cries/pikachu_cry_37.pcm"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
dw .wave5 ; used in the Lavender Town and Pokemon Tower themes
|
||||
dw .wave5 ; unused
|
||||
dw .wave5 ; unused
|
||||
; dw .wave5 ; unused
|
||||
|
||||
; these are the definitions for the channel 3 instruments
|
||||
; each instrument definition is made up of 32 points (nibbles) that form
|
||||
|
|
|
|||
|
|
@ -35,4 +35,5 @@ INCLUDE "constants/tileset_constants.asm"
|
|||
INCLUDE "constants/event_constants.asm"
|
||||
INCLUDE "constants/text_constants.asm"
|
||||
INCLUDE "constants/menu_constants.asm"
|
||||
INCLUDE "constants/sprite_anim_constants.asm"
|
||||
INCLUDE "constants/pikachu_emotion_constants.asm"
|
||||
|
|
|
|||
|
|
@ -2,10 +2,18 @@ TILE_WIDTH EQU 8 ; pixels
|
|||
LEN_1BPP_TILE EQU 1 * TILE_WIDTH ; bytes
|
||||
LEN_2BPP_TILE EQU 2 * TILE_WIDTH ; bytes
|
||||
|
||||
NUM_PAL_COLORS EQU 4
|
||||
const_def
|
||||
const SHADE_WHITE ; %00
|
||||
const SHADE_LIGHT ; %01
|
||||
const SHADE_DARK ; %10
|
||||
const SHADE_BLACK ; %11
|
||||
NUM_PAL_COLORS EQU const_value
|
||||
|
||||
PAL_COLOR_SIZE EQU 2
|
||||
PALETTE_SIZE EQU NUM_PAL_COLORS * PAL_COLOR_SIZE
|
||||
|
||||
NUM_ACTIVE_PALS EQU 4
|
||||
|
||||
SCREEN_WIDTH EQU 20
|
||||
SCREEN_HEIGHT EQU 18
|
||||
SCREEN_WIDTH_PX EQU SCREEN_WIDTH * TILE_WIDTH ; pixels
|
||||
|
|
@ -16,6 +24,11 @@ BG_MAP_HEIGHT EQU 32 ; tiles
|
|||
|
||||
SPRITEBUFFERSIZE EQU 7 * 7 * LEN_1BPP_TILE
|
||||
|
||||
; DMGPalToGBCPal
|
||||
CONVERT_BGP EQU 0
|
||||
CONVERT_OBP0 EQU 1
|
||||
CONVERT_OBP1 EQU 2
|
||||
|
||||
; HP bar
|
||||
HP_BAR_GREEN EQU 0
|
||||
HP_BAR_YELLOW EQU 1
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ SHOW EQU $15
|
|||
|
||||
; MissableObjects indexes (see data/maps/hide_show_data.asm)
|
||||
; this is a list of the sprites that can be enabled/disabled during the game
|
||||
; there may be unused sprites, but these will remain unmarked until
|
||||
; the disassembly is complete
|
||||
; TODO: mark sprite constants with an X that are never used
|
||||
|
||||
const_def
|
||||
const HS_PALLET_TOWN_OAK ; 00
|
||||
|
|
@ -33,20 +32,20 @@ SHOW EQU $15
|
|||
const HS_SAFFRON_CITY_D ; 17
|
||||
const HS_SAFFRON_CITY_E ; 18
|
||||
const HS_SAFFRON_CITY_F ; 19
|
||||
const HS_ROUTE_2_ITEM_1 ; 1A X
|
||||
const HS_ROUTE_2_ITEM_2 ; 1B X
|
||||
const HS_ROUTE_4_ITEM ; 1C X
|
||||
const HS_ROUTE_9_ITEM ; 1D X
|
||||
const HS_ROUTE_2_ITEM_1 ; 1A
|
||||
const HS_ROUTE_2_ITEM_2 ; 1B
|
||||
const HS_ROUTE_4_ITEM ; 1C
|
||||
const HS_ROUTE_9_ITEM ; 1D
|
||||
const HS_ROUTE_12_SNORLAX ; 1E
|
||||
const HS_ROUTE_12_ITEM_1 ; 1F X
|
||||
const HS_ROUTE_12_ITEM_2 ; 20 X
|
||||
const HS_ROUTE_15_ITEM ; 21 X
|
||||
const HS_ROUTE_12_ITEM_1 ; 1F
|
||||
const HS_ROUTE_12_ITEM_2 ; 20
|
||||
const HS_ROUTE_15_ITEM ; 21
|
||||
const HS_ROUTE_16_SNORLAX ; 22
|
||||
const HS_ROUTE_22_RIVAL_1 ; 23
|
||||
const HS_ROUTE_22_RIVAL_2 ; 24
|
||||
const HS_NUGGET_BRIDGE_GUY ; 25
|
||||
const HS_ROUTE_24_ITEM ; 26 X
|
||||
const HS_ROUTE_25_ITEM ; 27 X
|
||||
const HS_ROUTE_24_ITEM ; 26
|
||||
const HS_ROUTE_25_ITEM ; 27
|
||||
const HS_DAISY_SITTING ; 28
|
||||
const HS_DAISY_WALKING ; 29
|
||||
const HS_TOWN_MAP ; 2A
|
||||
|
|
@ -57,95 +56,95 @@ SHOW EQU $15
|
|||
const HS_POKEDEX_2 ; 2F
|
||||
const HS_OAKS_LAB_OAK_2 ; 30
|
||||
const HS_VIRIDIAN_GYM_GIOVANNI ; 31
|
||||
const HS_VIRIDIAN_GYM_ITEM ; 32 X
|
||||
const HS_VIRIDIAN_GYM_ITEM ; 32
|
||||
const HS_OLD_AMBER ; 33
|
||||
const HS_CERULEAN_BULBASAUR ; 34
|
||||
const HS_CERULEAN_CAVE_1F_ITEM_1 ; 35 X
|
||||
const HS_CERULEAN_CAVE_1F_ITEM_2 ; 36 X
|
||||
const HS_CERULEAN_CAVE_1F_ITEM_3 ; 37 X
|
||||
const HS_CERULEAN_CAVE_1F_ITEM_4 ; 38 X
|
||||
const HS_CERULEAN_CAVE_1F_ITEM_1 ; 35
|
||||
const HS_CERULEAN_CAVE_1F_ITEM_2 ; 36
|
||||
const HS_CERULEAN_CAVE_1F_ITEM_3 ; 37
|
||||
const HS_CERULEAN_CAVE_1F_ITEM_4 ; 38
|
||||
const HS_POKEMON_TOWER_2F_RIVAL ; 39
|
||||
const HS_POKEMON_TOWER_3F_ITEM ; 3A X
|
||||
const HS_POKEMON_TOWER_4F_ITEM_1 ; 3B X
|
||||
const HS_POKEMON_TOWER_4F_ITEM_2 ; 3C X
|
||||
const HS_POKEMON_TOWER_4F_ITEM_3 ; 3D X
|
||||
const HS_POKEMON_TOWER_5F_ITEM ; 3E X
|
||||
const HS_POKEMON_TOWER_6F_ITEM_1 ; 3F X
|
||||
const HS_POKEMON_TOWER_6F_ITEM_2 ; 40 X
|
||||
const HS_POKEMON_TOWER_3F_ITEM ; 3A
|
||||
const HS_POKEMON_TOWER_4F_ITEM_1 ; 3B
|
||||
const HS_POKEMON_TOWER_4F_ITEM_2 ; 3C
|
||||
const HS_POKEMON_TOWER_4F_ITEM_3 ; 3D
|
||||
const HS_POKEMON_TOWER_5F_ITEM ; 3E
|
||||
const HS_POKEMON_TOWER_6F_ITEM_1 ; 3F
|
||||
const HS_POKEMON_TOWER_6F_ITEM_2 ; 40
|
||||
const HS_POKEMON_TOWER_7F_JESSIE ; 41
|
||||
const HS_POKEMON_TOWER_7F_JAMES ; 42
|
||||
const HS_POKEMON_TOWER_7F_MR_FUJI ; 43
|
||||
const HS_MR_FUJIS_HOUSE_MR_FUJI ; 44
|
||||
const HS_CELADON_MANSION_EEVEE_GIFT ; 45
|
||||
const HS_GAME_CORNER_ROCKET ; 46
|
||||
const HS_WARDENS_HOUSE_ITEM ; 47 X
|
||||
const HS_POKEMON_MANSION_1F_ITEM_1 ; 48 X
|
||||
const HS_POKEMON_MANSION_1F_ITEM_2 ; 49 X
|
||||
const HS_WARDENS_HOUSE_ITEM ; 47
|
||||
const HS_POKEMON_MANSION_1F_ITEM_1 ; 48
|
||||
const HS_POKEMON_MANSION_1F_ITEM_2 ; 49
|
||||
const HS_FIGHTING_DOJO_GIFT_1 ; 4A
|
||||
const HS_FIGHTING_DOJO_GIFT_2 ; 4B
|
||||
const HS_SILPH_CO_1F_RECEPTIONIST ; 4C
|
||||
const HS_VOLTORB_1 ; 4D X
|
||||
const HS_VOLTORB_2 ; 4E X
|
||||
const HS_VOLTORB_3 ; 4F X
|
||||
const HS_ELECTRODE_1 ; 50 X
|
||||
const HS_VOLTORB_4 ; 51 X
|
||||
const HS_VOLTORB_5 ; 52 X
|
||||
const HS_ELECTRODE_2 ; 53 X
|
||||
const HS_VOLTORB_6 ; 54 X
|
||||
const HS_ZAPDOS ; 55 X
|
||||
const HS_POWER_PLANT_ITEM_1 ; 56 X
|
||||
const HS_POWER_PLANT_ITEM_2 ; 57 X
|
||||
const HS_POWER_PLANT_ITEM_3 ; 58 X
|
||||
const HS_POWER_PLANT_ITEM_4 ; 59 X
|
||||
const HS_POWER_PLANT_ITEM_5 ; 5A X
|
||||
const HS_MOLTRES ; 5B X
|
||||
const HS_VICTORY_ROAD_2F_ITEM_1 ; 5C X
|
||||
const HS_VICTORY_ROAD_2F_ITEM_2 ; 5D X
|
||||
const HS_VICTORY_ROAD_2F_ITEM_3 ; 5E X
|
||||
const HS_VICTORY_ROAD_2F_ITEM_4 ; 5F X
|
||||
const HS_VOLTORB_1 ; 4D
|
||||
const HS_VOLTORB_2 ; 4E
|
||||
const HS_VOLTORB_3 ; 4F
|
||||
const HS_ELECTRODE_1 ; 50
|
||||
const HS_VOLTORB_4 ; 51
|
||||
const HS_VOLTORB_5 ; 52
|
||||
const HS_ELECTRODE_2 ; 53
|
||||
const HS_VOLTORB_6 ; 54
|
||||
const HS_ZAPDOS ; 55
|
||||
const HS_POWER_PLANT_ITEM_1 ; 56
|
||||
const HS_POWER_PLANT_ITEM_2 ; 57
|
||||
const HS_POWER_PLANT_ITEM_3 ; 58
|
||||
const HS_POWER_PLANT_ITEM_4 ; 59
|
||||
const HS_POWER_PLANT_ITEM_5 ; 5A
|
||||
const HS_MOLTRES ; 5B
|
||||
const HS_VICTORY_ROAD_2F_ITEM_1 ; 5C
|
||||
const HS_VICTORY_ROAD_2F_ITEM_2 ; 5D
|
||||
const HS_VICTORY_ROAD_2F_ITEM_3 ; 5E
|
||||
const HS_VICTORY_ROAD_2F_ITEM_4 ; 5F
|
||||
const HS_VICTORY_ROAD_2F_BOULDER ; 60
|
||||
const HS_BILL_POKEMON ; 61
|
||||
const HS_BILL_1 ; 62
|
||||
const HS_BILL_2 ; 63
|
||||
const HS_VIRIDIAN_FOREST_ITEM_1 ; 64 X
|
||||
const HS_VIRIDIAN_FOREST_ITEM_2 ; 65 X
|
||||
const HS_VIRIDIAN_FOREST_ITEM_3 ; 66 X
|
||||
const HS_MT_MOON_1F_ITEM_1 ; 67 X
|
||||
const HS_MT_MOON_1F_ITEM_2 ; 68 X
|
||||
const HS_MT_MOON_1F_ITEM_3 ; 69 X
|
||||
const HS_MT_MOON_1F_ITEM_4 ; 6A X
|
||||
const HS_MT_MOON_1F_ITEM_5 ; 6B X
|
||||
const HS_MT_MOON_1F_ITEM_6 ; 6C X
|
||||
const HS_VIRIDIAN_FOREST_ITEM_1 ; 64
|
||||
const HS_VIRIDIAN_FOREST_ITEM_2 ; 65
|
||||
const HS_VIRIDIAN_FOREST_ITEM_3 ; 66
|
||||
const HS_MT_MOON_1F_ITEM_1 ; 67
|
||||
const HS_MT_MOON_1F_ITEM_2 ; 68
|
||||
const HS_MT_MOON_1F_ITEM_3 ; 69
|
||||
const HS_MT_MOON_1F_ITEM_4 ; 6A
|
||||
const HS_MT_MOON_1F_ITEM_5 ; 6B
|
||||
const HS_MT_MOON_1F_ITEM_6 ; 6C
|
||||
const HS_MT_MOON_B2F_JESSIE ; 6D
|
||||
const HS_MT_MOON_B2F_JAMES ; 6E
|
||||
const HS_MT_MOON_B2F_FOSSIL_1 ; 6F
|
||||
const HS_MT_MOON_B2F_FOSSIL_2 ; 70
|
||||
const HS_MT_MOON_B2F_ITEM_1 ; 71 X
|
||||
const HS_MT_MOON_B2F_ITEM_2 ; 72 X
|
||||
const HS_MT_MOON_B2F_ITEM_1 ; 71
|
||||
const HS_MT_MOON_B2F_ITEM_2 ; 72
|
||||
const HS_SS_ANNE_2F_RIVAL ; 73
|
||||
const HS_SS_ANNE_1F_ROOMS_ITEM ; 74 X
|
||||
const HS_SS_ANNE_2F_ROOMS_ITEM_1 ; 75 X
|
||||
const HS_SS_ANNE_2F_ROOMS_ITEM_2 ; 76 X
|
||||
const HS_SS_ANNE_B1F_ROOMS_ITEM_1 ; 77 X
|
||||
const HS_SS_ANNE_B1F_ROOMS_ITEM_2 ; 78 X
|
||||
const HS_SS_ANNE_B1F_ROOMS_ITEM_3 ; 79 X
|
||||
const HS_VICTORY_ROAD_3F_ITEM_1 ; 7A X
|
||||
const HS_VICTORY_ROAD_3F_ITEM_2 ; 7B X
|
||||
const HS_SS_ANNE_1F_ROOMS_ITEM ; 74
|
||||
const HS_SS_ANNE_2F_ROOMS_ITEM_1 ; 75
|
||||
const HS_SS_ANNE_2F_ROOMS_ITEM_2 ; 76
|
||||
const HS_SS_ANNE_B1F_ROOMS_ITEM_1 ; 77
|
||||
const HS_SS_ANNE_B1F_ROOMS_ITEM_2 ; 78
|
||||
const HS_SS_ANNE_B1F_ROOMS_ITEM_3 ; 79
|
||||
const HS_VICTORY_ROAD_3F_ITEM_1 ; 7A
|
||||
const HS_VICTORY_ROAD_3F_ITEM_2 ; 7B
|
||||
const HS_VICTORY_ROAD_3F_BOULDER ; 7C
|
||||
const HS_ROCKET_HIDEOUT_B1F_ITEM_1 ; 7D X
|
||||
const HS_ROCKET_HIDEOUT_B1F_ITEM_2 ; 7E X
|
||||
const HS_ROCKET_HIDEOUT_B2F_ITEM_1 ; 7F X
|
||||
const HS_ROCKET_HIDEOUT_B2F_ITEM_2 ; 80 X
|
||||
const HS_ROCKET_HIDEOUT_B2F_ITEM_3 ; 81 X
|
||||
const HS_ROCKET_HIDEOUT_B2F_ITEM_4 ; 82 X
|
||||
const HS_ROCKET_HIDEOUT_B3F_ITEM_1 ; 83 X
|
||||
const HS_ROCKET_HIDEOUT_B3F_ITEM_2 ; 84 X
|
||||
const HS_ROCKET_HIDEOUT_B1F_ITEM_1 ; 7D
|
||||
const HS_ROCKET_HIDEOUT_B1F_ITEM_2 ; 7E
|
||||
const HS_ROCKET_HIDEOUT_B2F_ITEM_1 ; 7F
|
||||
const HS_ROCKET_HIDEOUT_B2F_ITEM_2 ; 80
|
||||
const HS_ROCKET_HIDEOUT_B2F_ITEM_3 ; 81
|
||||
const HS_ROCKET_HIDEOUT_B2F_ITEM_4 ; 82
|
||||
const HS_ROCKET_HIDEOUT_B3F_ITEM_1 ; 83
|
||||
const HS_ROCKET_HIDEOUT_B3F_ITEM_2 ; 84
|
||||
const HS_ROCKET_HIDEOUT_B4F_GIOVANNI ; 85
|
||||
const HS_ROCKET_HIDEOUT_B4F_JAMES ; 86
|
||||
const HS_ROCKET_HIDEOUT_B4F_JESSIE ; 87
|
||||
const HS_ROCKET_HIDEOUT_B4F_ITEM_1 ; 88 X
|
||||
const HS_ROCKET_HIDEOUT_B4F_ITEM_2 ; 89 X
|
||||
const HS_ROCKET_HIDEOUT_B4F_ITEM_3 ; 8A X
|
||||
const HS_ROCKET_HIDEOUT_B4F_ITEM_1 ; 88
|
||||
const HS_ROCKET_HIDEOUT_B4F_ITEM_2 ; 89
|
||||
const HS_ROCKET_HIDEOUT_B4F_ITEM_3 ; 8A
|
||||
const HS_ROCKET_HIDEOUT_B4F_ITEM_4 ; 8B
|
||||
const HS_ROCKET_HIDEOUT_B4F_ITEM_5 ; 8C
|
||||
const HS_SILPH_CO_2F_1 ; 8D XXX never (de)activated?
|
||||
|
|
@ -155,32 +154,32 @@ SHOW EQU $15
|
|||
const HS_SILPH_CO_2F_5 ; 91
|
||||
const HS_SILPH_CO_3F_1 ; 92
|
||||
const HS_SILPH_CO_3F_2 ; 93
|
||||
const HS_SILPH_CO_3F_ITEM ; 94 X
|
||||
const HS_SILPH_CO_3F_ITEM ; 94
|
||||
const HS_SILPH_CO_4F_1 ; 95
|
||||
const HS_SILPH_CO_4F_2 ; 96
|
||||
const HS_SILPH_CO_4F_3 ; 97
|
||||
const HS_SILPH_CO_4F_ITEM_1 ; 98 X
|
||||
const HS_SILPH_CO_4F_ITEM_2 ; 99 X
|
||||
const HS_SILPH_CO_4F_ITEM_3 ; 9A X
|
||||
const HS_SILPH_CO_4F_ITEM_1 ; 98
|
||||
const HS_SILPH_CO_4F_ITEM_2 ; 99
|
||||
const HS_SILPH_CO_4F_ITEM_3 ; 9A
|
||||
const HS_SILPH_CO_5F_1 ; 9B
|
||||
const HS_SILPH_CO_5F_2 ; 9C
|
||||
const HS_SILPH_CO_5F_3 ; 9D
|
||||
const HS_SILPH_CO_5F_4 ; 9E
|
||||
const HS_SILPH_CO_5F_ITEM_1 ; 9F X
|
||||
const HS_SILPH_CO_5F_ITEM_2 ; A0 X
|
||||
const HS_SILPH_CO_5F_ITEM_3 ; A1 X
|
||||
const HS_SILPH_CO_5F_ITEM_1 ; 9F
|
||||
const HS_SILPH_CO_5F_ITEM_2 ; A0
|
||||
const HS_SILPH_CO_5F_ITEM_3 ; A1
|
||||
const HS_SILPH_CO_6F_1 ; A2
|
||||
const HS_SILPH_CO_6F_2 ; A3
|
||||
const HS_SILPH_CO_6F_3 ; A4
|
||||
const HS_SILPH_CO_6F_ITEM_1 ; A5 X
|
||||
const HS_SILPH_CO_6F_ITEM_2 ; A6 X
|
||||
const HS_SILPH_CO_6F_ITEM_1 ; A5
|
||||
const HS_SILPH_CO_6F_ITEM_2 ; A6
|
||||
const HS_SILPH_CO_7F_1 ; A7
|
||||
const HS_SILPH_CO_7F_2 ; A8
|
||||
const HS_SILPH_CO_7F_3 ; A9
|
||||
const HS_SILPH_CO_7F_4 ; AA
|
||||
const HS_SILPH_CO_7F_RIVAL ; AB
|
||||
const HS_SILPH_CO_7F_ITEM_1 ; AC X
|
||||
const HS_SILPH_CO_7F_ITEM_2 ; AD X
|
||||
const HS_SILPH_CO_7F_ITEM_1 ; AC
|
||||
const HS_SILPH_CO_7F_ITEM_2 ; AD
|
||||
const HS_SILPH_CO_7F_8 ; AE XXX sprite doesn't exist
|
||||
const HS_SILPH_CO_8F_1 ; AF
|
||||
const HS_SILPH_CO_8F_2 ; B0
|
||||
|
|
@ -191,44 +190,44 @@ SHOW EQU $15
|
|||
const HS_SILPH_CO_10F_1 ; B5
|
||||
const HS_SILPH_CO_10F_2 ; B6
|
||||
const HS_SILPH_CO_10F_3 ; B7 XXX never (de)activated?
|
||||
const HS_SILPH_CO_10F_ITEM_1 ; B8 X
|
||||
const HS_SILPH_CO_10F_ITEM_2 ; B9 X
|
||||
const HS_SILPH_CO_10F_ITEM_3 ; BA X
|
||||
const HS_SILPH_CO_10F_ITEM_1 ; B8
|
||||
const HS_SILPH_CO_10F_ITEM_2 ; B9
|
||||
const HS_SILPH_CO_10F_ITEM_3 ; BA
|
||||
const HS_SILPH_CO_11F_1 ; BB
|
||||
const HS_SILPH_CO_11F_JAMES ; BC
|
||||
const HS_SILPH_CO_11F_2 ; BD
|
||||
const HS_SILPH_CO_11F_JESSIE ; BE
|
||||
const HS_UNUSED_MAP_F4_1 ; BF XXX sprite doesn't exist
|
||||
const HS_POKEMON_MANSION_2F_ITEM ; C0 X
|
||||
const HS_POKEMON_MANSION_3F_ITEM_1 ; C1 X
|
||||
const HS_POKEMON_MANSION_3F_ITEM_2 ; C2 X
|
||||
const HS_POKEMON_MANSION_B1F_ITEM_1 ; C3 X
|
||||
const HS_POKEMON_MANSION_B1F_ITEM_2 ; C4 X
|
||||
const HS_POKEMON_MANSION_B1F_ITEM_3 ; C5 X
|
||||
const HS_POKEMON_MANSION_B1F_ITEM_4 ; C6 X
|
||||
const HS_POKEMON_MANSION_B1F_ITEM_5 ; C7 X
|
||||
const HS_SAFARI_ZONE_EAST_ITEM_1 ; C8 X
|
||||
const HS_SAFARI_ZONE_EAST_ITEM_2 ; C9 X
|
||||
const HS_SAFARI_ZONE_EAST_ITEM_3 ; CA X
|
||||
const HS_SAFARI_ZONE_EAST_ITEM_4 ; CB X
|
||||
const HS_SAFARI_ZONE_NORTH_ITEM_1 ; CC X
|
||||
const HS_SAFARI_ZONE_NORTH_ITEM_2 ; CD X
|
||||
const HS_SAFARI_ZONE_WEST_ITEM_1 ; CE X
|
||||
const HS_SAFARI_ZONE_WEST_ITEM_2 ; CF X
|
||||
const HS_SAFARI_ZONE_WEST_ITEM_3 ; D0 X
|
||||
const HS_SAFARI_ZONE_WEST_ITEM_4 ; D1 X
|
||||
const HS_SAFARI_ZONE_CENTER_ITEM ; D2 X
|
||||
const HS_CERULEAN_CAVE_2F_ITEM_1 ; D3 X
|
||||
const HS_CERULEAN_CAVE_2F_ITEM_2 ; D4 X
|
||||
const HS_CERULEAN_CAVE_2F_ITEM_3 ; D5 X
|
||||
const HS_CERULEAN_CAVE_2F_ITEM_4 ; D6 X
|
||||
const HS_MEWTWO ; D7 X
|
||||
const HS_CERULEAN_CAVE_B1F_ITEM_1 ; D8 X
|
||||
const HS_CERULEAN_CAVE_B1F_ITEM_2 ; D9 X
|
||||
const HS_CERULEAN_CAVE_B1F_ITEM_3 ; DA X
|
||||
const HS_CERULEAN_CAVE_B1F_ITEM_4 ; DB X
|
||||
const HS_VICTORY_ROAD_1F_ITEM_1 ; DC X
|
||||
const HS_VICTORY_ROAD_1F_ITEM_2 ; DD X
|
||||
const HS_POKEMON_MANSION_2F_ITEM ; C0
|
||||
const HS_POKEMON_MANSION_3F_ITEM_1 ; C1
|
||||
const HS_POKEMON_MANSION_3F_ITEM_2 ; C2
|
||||
const HS_POKEMON_MANSION_B1F_ITEM_1 ; C3
|
||||
const HS_POKEMON_MANSION_B1F_ITEM_2 ; C4
|
||||
const HS_POKEMON_MANSION_B1F_ITEM_3 ; C5
|
||||
const HS_POKEMON_MANSION_B1F_ITEM_4 ; C6
|
||||
const HS_POKEMON_MANSION_B1F_ITEM_5 ; C7
|
||||
const HS_SAFARI_ZONE_EAST_ITEM_1 ; C8
|
||||
const HS_SAFARI_ZONE_EAST_ITEM_2 ; C9
|
||||
const HS_SAFARI_ZONE_EAST_ITEM_3 ; CA
|
||||
const HS_SAFARI_ZONE_EAST_ITEM_4 ; CB
|
||||
const HS_SAFARI_ZONE_NORTH_ITEM_1 ; CC
|
||||
const HS_SAFARI_ZONE_NORTH_ITEM_2 ; CD
|
||||
const HS_SAFARI_ZONE_WEST_ITEM_1 ; CE
|
||||
const HS_SAFARI_ZONE_WEST_ITEM_2 ; CF
|
||||
const HS_SAFARI_ZONE_WEST_ITEM_3 ; D0
|
||||
const HS_SAFARI_ZONE_WEST_ITEM_4 ; D1
|
||||
const HS_SAFARI_ZONE_CENTER_ITEM ; D2
|
||||
const HS_CERULEAN_CAVE_2F_ITEM_1 ; D3
|
||||
const HS_CERULEAN_CAVE_2F_ITEM_2 ; D4
|
||||
const HS_CERULEAN_CAVE_2F_ITEM_3 ; D5
|
||||
const HS_CERULEAN_CAVE_2F_ITEM_4 ; D6
|
||||
const HS_MEWTWO ; D7
|
||||
const HS_CERULEAN_CAVE_B1F_ITEM_1 ; D8
|
||||
const HS_CERULEAN_CAVE_B1F_ITEM_2 ; D9
|
||||
const HS_CERULEAN_CAVE_B1F_ITEM_3 ; DA
|
||||
const HS_CERULEAN_CAVE_B1F_ITEM_4 ; DB
|
||||
const HS_VICTORY_ROAD_1F_ITEM_1 ; DC
|
||||
const HS_VICTORY_ROAD_1F_ITEM_2 ; DD
|
||||
const HS_CHAMPIONS_ROOM_OAK ; DE
|
||||
const HS_SEAFOAM_ISLANDS_1F_BOULDER_1 ; DF
|
||||
const HS_SEAFOAM_ISLANDS_1F_BOULDER_2 ; E0
|
||||
|
|
@ -242,7 +241,7 @@ SHOW EQU $15
|
|||
const HS_SEAFOAM_ISLANDS_B3F_BOULDER_4 ; E8
|
||||
const HS_SEAFOAM_ISLANDS_B4F_BOULDER_1 ; E9
|
||||
const HS_SEAFOAM_ISLANDS_B4F_BOULDER_2 ; EA
|
||||
const HS_ARTICUNO ; EB X
|
||||
const HS_ARTICUNO ; EB
|
||||
const HS_DAISY_SITTING_COPY ; EC
|
||||
const HS_DAISY_WALKING_COPY ; ED
|
||||
const HS_TOWN_MAP_COPY ; EE
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ FIRST_INDOOR_MAP EQU const_value
|
|||
mapconst LORELEIS_ROOM, 6, 5 ; $F5
|
||||
mapconst BRUNOS_ROOM, 6, 5 ; $F6
|
||||
mapconst AGATHAS_ROOM, 6, 5 ; $F7
|
||||
mapconst BEACH_HOUSE, 4, 7 ; $F8
|
||||
mapconst SUMMER_BEACH_HOUSE, 4, 7 ; $F8
|
||||
|
||||
; Indoor maps, such as houses, use this as the Map ID in their exit warps
|
||||
; This map ID takes the player back to the last outdoor map they were on, stored in wLastMap
|
||||
|
|
|
|||
|
|
@ -7,26 +7,3 @@ TRUE EQU 1
|
|||
const FLAG_RESET ; 0
|
||||
const FLAG_SET ; 1
|
||||
const FLAG_TEST ; 2
|
||||
|
||||
; pikachu happiness modifiers
|
||||
const_def 1
|
||||
const PIKAHAPPY_LEVELUP
|
||||
const PIKAHAPPY_USEDITEM
|
||||
const PIKAHAPPY_USEDXITEM
|
||||
const PIKAHAPPY_GYMLEADER
|
||||
const PIKAHAPPY_USEDTMHM
|
||||
const PIKAHAPPY_WALKING
|
||||
const PIKAHAPPY_DEPOSITED
|
||||
const PIKAHAPPY_FAINTED
|
||||
const PIKAHAPPY_PSNFNT
|
||||
const PIKAHAPPY_CARELESSTRAINER
|
||||
const PIKAHAPPY_TRADE
|
||||
|
||||
; DMGPalToGBCPal
|
||||
CONVERT_BGP EQU 0
|
||||
CONVERT_OBP0 EQU 1
|
||||
CONVERT_OBP1 EQU 2
|
||||
|
||||
NUM_COLORS EQU 4
|
||||
PAL_SIZE EQU NUM_COLORS * 2
|
||||
NUM_ACTIVE_PALS EQU 4
|
||||
|
|
|
|||
|
|
@ -15,18 +15,3 @@ OAM_OBP1 EQU 1 << OAM_OBP_NUM ; OBJ palette 1
|
|||
OAM_HFLIP EQU 1 << OAM_X_FLIP ; horizontal flip
|
||||
OAM_VFLIP EQU 1 << OAM_Y_FLIP ; vertical flip
|
||||
OAM_BEHIND_BG EQU 1 << OAM_PRIORITY ; behind bg (except color 0)
|
||||
|
||||
frame: MACRO
|
||||
db \1
|
||||
x = \2
|
||||
REPT _NARG +- 2
|
||||
x = x | (\3 << 1)
|
||||
shift
|
||||
endr
|
||||
db x
|
||||
endm
|
||||
|
||||
delanim EQUS "db $fc"
|
||||
dorepeat EQUS "db $fd,"
|
||||
dorestart EQUS "db $fe"
|
||||
endanim EQUS "db $ff"
|
||||
|
|
|
|||
|
|
@ -1,29 +1,28 @@
|
|||
dpikapic: macro
|
||||
; pikachu happiness modifiers
|
||||
const_def 1
|
||||
const PIKAHAPPY_LEVELUP
|
||||
const PIKAHAPPY_USEDITEM
|
||||
const PIKAHAPPY_USEDXITEM
|
||||
const PIKAHAPPY_GYMLEADER
|
||||
const PIKAHAPPY_USEDTMHM
|
||||
const PIKAHAPPY_WALKING
|
||||
const PIKAHAPPY_DEPOSITED
|
||||
const PIKAHAPPY_FAINTED
|
||||
const PIKAHAPPY_PSNFNT
|
||||
const PIKAHAPPY_CARELESSTRAINER
|
||||
const PIKAHAPPY_TRADE
|
||||
|
||||
dpikapic: MACRO
|
||||
db (\1_id - PikaPicAnimPointers) / 2
|
||||
endm
|
||||
ENDM
|
||||
|
||||
ldpikapic: macro
|
||||
ld \1, (\2_id - PikaPicAnimPointers) / 2
|
||||
endm
|
||||
|
||||
dpikaemotion: macro
|
||||
dpikaemotion: MACRO
|
||||
db (\1_id - PikachuEmotionTable) / 2
|
||||
endm
|
||||
ENDM
|
||||
|
||||
ldpikaemotion: macro
|
||||
ldpikaemotion: MACRO
|
||||
ld \1, (\2_id - PikachuEmotionTable) / 2
|
||||
endm
|
||||
|
||||
dpikaanim: macro
|
||||
db (\1_id - PikaPicAnimBGFramesPointers) / 2
|
||||
endm
|
||||
|
||||
pikaframeend EQUS "db $e0"
|
||||
pikaframe: macro
|
||||
db (\1_id - PikaPicTilemapPointers) / 2, \2
|
||||
endm
|
||||
|
||||
pikaframedelay EQUS "db 0,"
|
||||
ENDM
|
||||
|
||||
; Starter Pikachu emotion commands constants
|
||||
|
||||
|
|
@ -60,7 +59,7 @@ pikaframedelay EQUS "db 0,"
|
|||
const PIKASTEPDIR_UP_RIGHT
|
||||
|
||||
|
||||
; Macros for commands
|
||||
; MACROs for commands
|
||||
pikaemotion_dummy1: MACRO
|
||||
db PIKAEMOTION_DUMMY1
|
||||
ENDM
|
||||
|
|
@ -117,108 +116,109 @@ pikaemotion_dummy3: MACRO
|
|||
ENDM
|
||||
|
||||
pikacry_def: MACRO
|
||||
\1_id:: dba \1
|
||||
endm
|
||||
\1_id::
|
||||
dba \1
|
||||
ENDM
|
||||
|
||||
dpikacry: MACRO
|
||||
db (\1_id - PikachuCriesPointerTable) / 3
|
||||
endm
|
||||
ENDM
|
||||
|
||||
ldpikacry: MACRO
|
||||
ld \1, (\2_id - PikachuCriesPointerTable) / 3
|
||||
ENDM
|
||||
ENDM
|
||||
|
||||
pikacry: MACRO
|
||||
ldpikacry a, \1
|
||||
endm
|
||||
ENDM
|
||||
|
||||
|
||||
const_def
|
||||
const pikapic_nop_command
|
||||
pikapic_nop: macro
|
||||
pikapic_nop: MACRO
|
||||
db pikapic_nop_command
|
||||
endm
|
||||
ENDM
|
||||
|
||||
const pikapic_writebyte_command
|
||||
pikapic_writebyte: macro
|
||||
pikapic_writebyte: MACRO
|
||||
db pikapic_writebyte_command, \1
|
||||
endm
|
||||
ENDM
|
||||
|
||||
const pikapic_loadgfx_command
|
||||
pikapic_loadgfx: macro
|
||||
pikapic_loadgfx: MACRO
|
||||
db pikapic_loadgfx_command, (\1_id - PikaPicAnimGFXHeaders) / 4
|
||||
endm
|
||||
ENDM
|
||||
|
||||
const pikapic_animation_command
|
||||
pikapic_animation: macro
|
||||
pikapic_animation: MACRO
|
||||
; frameset pointer, starting vtile, y offset, x offset
|
||||
db pikapic_animation_command
|
||||
dpikaanim \1
|
||||
db (\1_id - PikaPicAnimBGFramesPointers) / 2
|
||||
db 0, \2, \3, \4
|
||||
endm
|
||||
ENDM
|
||||
|
||||
const pikapic_nop4_command
|
||||
pikapic_nop4: macro
|
||||
pikapic_nop4: MACRO
|
||||
db pikapic_nop4_command
|
||||
endm
|
||||
ENDM
|
||||
|
||||
const pikapic_nop5_command
|
||||
pikapic_nop5: macro
|
||||
pikapic_nop5: MACRO
|
||||
db pikapic_nop5_command
|
||||
endm
|
||||
ENDM
|
||||
|
||||
const pikapic_waitbgmapeleteobject_command
|
||||
pikapic_waitbgmapeleteobject: macro
|
||||
pikapic_waitbgmapeleteobject: MACRO
|
||||
db pikapic_waitbgmapeleteobject_command, \1
|
||||
endm
|
||||
ENDM
|
||||
|
||||
const pikapic_nop7_command
|
||||
pikapic_nop7: macro
|
||||
pikapic_nop7: MACRO
|
||||
db pikapic_nop7_command
|
||||
endm
|
||||
ENDM
|
||||
|
||||
const pikapic_nop8_command
|
||||
pikapic_nop8: macro
|
||||
pikapic_nop8: MACRO
|
||||
db pikapic_nop8_command
|
||||
endm
|
||||
ENDM
|
||||
|
||||
const pikapic_jump_command
|
||||
pikapic_jump: macro ; 9
|
||||
pikapic_jump: MACRO ; 9
|
||||
dbw pikapic_jump_command, \1
|
||||
endm
|
||||
ENDM
|
||||
|
||||
const pikapic_setduration_command
|
||||
pikapic_setduration: macro ; a
|
||||
pikapic_setduration: MACRO ; a
|
||||
dbw pikapic_setduration_command, \1
|
||||
endm
|
||||
ENDM
|
||||
|
||||
const pikapic_cry_command
|
||||
pikapic_cry: macro ; b
|
||||
pikapic_cry: MACRO ; b
|
||||
db pikapic_cry_command
|
||||
IF _NARG == 0
|
||||
db $ff
|
||||
else
|
||||
dpikacry \1
|
||||
endc
|
||||
endm
|
||||
ENDM
|
||||
|
||||
const pikapic_thunderbolt_command
|
||||
pikapic_thunderbolt: macro ; c
|
||||
pikapic_thunderbolt: MACRO ; c
|
||||
db pikapic_thunderbolt_command
|
||||
endm
|
||||
ENDM
|
||||
|
||||
const pikapic_waitbgmap_command
|
||||
pikapic_waitbgmap: macro ; d
|
||||
pikapic_waitbgmap: MACRO ; d
|
||||
db pikapic_waitbgmap_command
|
||||
endm
|
||||
ENDM
|
||||
|
||||
const pikapic_ret_command
|
||||
pikapic_ret: macro ; e
|
||||
pikapic_ret: MACRO ; e
|
||||
db pikapic_ret_command
|
||||
endm
|
||||
ENDM
|
||||
|
||||
pikapic_looptofinish: macro
|
||||
pikapic_looptofinish: MACRO
|
||||
.loop\@
|
||||
pikapic_waitbgmap
|
||||
pikapic_jump .loop\@
|
||||
endm
|
||||
ENDM
|
||||
|
|
|
|||
17
constants/sprite_anim_constants.asm
Normal file
17
constants/sprite_anim_constants.asm
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
; animated_object struct members (see macros/wram.asm)
|
||||
ANIM_OBJ_INDEX EQUS "wAnimatedObject0Index - wAnimatedObject0"
|
||||
ANIM_OBJ_FRAME_SET EQUS "wAnimatedObject0FramesetID - wAnimatedObject0"
|
||||
ANIM_OBJ_CALLBACK EQUS "wAnimatedObject0AnimSeqID - wAnimatedObject0"
|
||||
ANIM_OBJ_TILE EQUS "wAnimatedObject0TileID - wAnimatedObject0"
|
||||
ANIM_OBJ_X_COORD EQUS "wAnimatedObject0XCoord - wAnimatedObject0"
|
||||
ANIM_OBJ_Y_COORD EQUS "wAnimatedObject0YCoord - wAnimatedObject0"
|
||||
ANIM_OBJ_X_OFFSET EQUS "wAnimatedObject0XOffset - wAnimatedObject0"
|
||||
ANIM_OBJ_Y_OFFSET EQUS "wAnimatedObject0YOffset - wAnimatedObject0"
|
||||
ANIM_OBJ_DURATION EQUS "wAnimatedObject0Duration - wAnimatedObject0"
|
||||
ANIM_OBJ_DURATION_OFFSET EQUS "wAnimatedObject0DurationOffset - wAnimatedObject0"
|
||||
ANIM_OBJ_FRAME_IDX EQUS "wAnimatedObject0FrameIndex - wAnimatedObject0"
|
||||
ANIM_OBJ_FIELD_B EQUS "wAnimatedObject0FieldB - wAnimatedObject0"
|
||||
ANIM_OBJ_FIELD_C EQUS "wAnimatedObject0FieldC - wAnimatedObject0"
|
||||
ANIM_OBJ_FIELD_D EQUS "wAnimatedObject0FieldD - wAnimatedObject0"
|
||||
ANIM_OBJ_FIELD_E EQUS "wAnimatedObject0FieldE - wAnimatedObject0"
|
||||
ANIM_OBJ_FIELD_F EQUS "wAnimatedObject0FieldF - wAnimatedObject0"
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
const SPRITE_MIDDLE_AGED_WOMAN ; $1c
|
||||
const SPRITE_BRUNETTE_GIRL ; $1d
|
||||
const SPRITE_LANCE ; $1e
|
||||
const SPRITE_UNUSED_SCIENTIST ; $1f
|
||||
const SPRITE_UNUSED_RED_1 ; $1f
|
||||
const SPRITE_SCIENTIST ; $20
|
||||
const SPRITE_ROCKER ; $21
|
||||
const SPRITE_SWIMMER ; $22
|
||||
|
|
@ -51,11 +51,11 @@
|
|||
const SPRITE_FISHER ; $2f
|
||||
const SPRITE_KOGA ; $30
|
||||
const SPRITE_GUARD ; $31
|
||||
const SPRITE_UNUSED_GUARD ; $32
|
||||
const SPRITE_UNUSED_RED_2 ; $32
|
||||
const SPRITE_MOM ; $33
|
||||
const SPRITE_BALDING_GUY ; $34
|
||||
const SPRITE_LITTLE_BOY ; $35
|
||||
const SPRITE_UNUSED_GAMEBOY_KID ; $36
|
||||
const SPRITE_UNUSED_RED_3 ; $36
|
||||
const SPRITE_GAMEBOY_KID ; $37
|
||||
const SPRITE_FAIRY ; $38
|
||||
const SPRITE_AGATHA ; $39
|
||||
|
|
|
|||
|
|
@ -25,4 +25,4 @@
|
|||
const CLUB ; 21
|
||||
const FACILITY ; 22
|
||||
const PLATEAU ; 23
|
||||
const BEACH_HOUSE_TILESET ; 24
|
||||
const BEACH_HOUSE ; 24
|
||||
|
|
|
|||
|
|
@ -15,6 +15,6 @@ CreditsMons:
|
|||
db NIDOKING
|
||||
db PARASECT
|
||||
|
||||
rept 9
|
||||
REPT 9
|
||||
db GENGAR
|
||||
endr
|
||||
ENDR
|
||||
|
|
|
|||
30
data/maps/bit_5_maps.asm
Normal file
30
data/maps/bit_5_maps.asm
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
; SetMapSpecificScriptFlagsOnMapReload sets bit 5
|
||||
; of wCurrentMapScriptFlags for these maps.
|
||||
|
||||
Bit5Maps:
|
||||
db SILPH_CO_2F
|
||||
db SILPH_CO_3F
|
||||
db SILPH_CO_4F
|
||||
db SILPH_CO_5F
|
||||
db SILPH_CO_6F
|
||||
db SILPH_CO_7F
|
||||
db SILPH_CO_8F
|
||||
db SILPH_CO_9F
|
||||
db SILPH_CO_10F
|
||||
db SILPH_CO_11F
|
||||
db POKEMON_MANSION_2F
|
||||
db POKEMON_MANSION_3F
|
||||
db POKEMON_MANSION_B1F
|
||||
db POKEMON_MANSION_1F
|
||||
db CINNABAR_GYM
|
||||
db GAME_CORNER
|
||||
db ROCKET_HIDEOUT_B1F
|
||||
db ROCKET_HIDEOUT_B4F
|
||||
db VICTORY_ROAD_3F
|
||||
db VICTORY_ROAD_1F
|
||||
db VICTORY_ROAD_2F
|
||||
db LANCES_ROOM
|
||||
db LORELEIS_ROOM
|
||||
db BRUNOS_ROOM
|
||||
db AGATHAS_ROOM
|
||||
db -1 ; end
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
BeachHouse_h:
|
||||
db BEACH_HOUSE_TILESET
|
||||
db BEACH_HOUSE_HEIGHT, BEACH_HOUSE_WIDTH ; dimensions (y, x)
|
||||
dw BeachHouse_Blocks ; blocks
|
||||
dw BeachHouse_TextPointers ; texts
|
||||
dw BeachHouse_Script ; scripts
|
||||
db 0 ; connections
|
||||
dw BeachHouse_Object ; objects
|
||||
3
data/maps/headers/SummerBeachHouse.asm
Normal file
3
data/maps/headers/SummerBeachHouse.asm
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
map_header SummerBeachHouse, SUMMER_BEACH_HOUSE, BEACH_HOUSE, 0
|
||||
end_map_header
|
||||
|
|
@ -571,11 +571,8 @@ SeafoamIslandsB4FHS:
|
|||
db SEAFOAM_ISLANDS_B4F, $01, HIDE
|
||||
db SEAFOAM_ISLANDS_B4F, $02, HIDE
|
||||
db SEAFOAM_ISLANDS_B4F, $03, SHOW
|
||||
|
||||
BluesHouseHSCopy:
|
||||
; doesn't seem to be referenced
|
||||
BluesHouseHSCopy: ; unreferenced
|
||||
db BLUES_HOUSE, $01, SHOW
|
||||
db BLUES_HOUSE, $02, HIDE
|
||||
db BLUES_HOUSE, $03, SHOW
|
||||
|
||||
db $FF, $01, SHOW
|
||||
db $FF, $01, SHOW ; end
|
||||
|
|
|
|||
|
|
@ -248,4 +248,4 @@ MapHeaderBanks::
|
|||
db BANK(LoreleisRoom_h)
|
||||
db BANK(BrunosRoom_h)
|
||||
db BANK(AgathasRoom_h)
|
||||
db BANK(BeachHouse_h)
|
||||
db BANK(SummerBeachHouse_h)
|
||||
|
|
|
|||
|
|
@ -248,4 +248,4 @@ MapHeaderPointers::
|
|||
dw LoreleisRoom_h
|
||||
dw BrunosRoom_h
|
||||
dw AgathasRoom_h ;247
|
||||
dw BeachHouse_h
|
||||
dw SummerBeachHouse_h
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ Route19_Object:
|
|||
db $43 ; border block
|
||||
|
||||
def_warps
|
||||
warp 5, 9, 0, BEACH_HOUSE
|
||||
warp 5, 9, 0, SUMMER_BEACH_HOUSE
|
||||
|
||||
def_signs
|
||||
sign 11, 11, 11
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@ Route2_Object:
|
|||
|
||||
; unused
|
||||
warp_to 2, 7, 4
|
||||
dw $c712
|
||||
db $9, $7
|
||||
db $12, $c7, $9, $7
|
||||
warp_to 2, 7, 4
|
||||
warp_to 2, 7, 4
|
||||
warp_to 2, 7, 4
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
BeachHouse_Object:
|
||||
SummerBeachHouse_Object:
|
||||
db $a ; border block
|
||||
|
||||
def_warps
|
||||
|
|
@ -15,4 +15,4 @@ BeachHouse_Object:
|
|||
object SPRITE_FISHING_GURU, 2, 3, STAY, DOWN, 1 ; surfin' dude
|
||||
object SPRITE_PIKACHU, 5, 3, WALK, 1, 2 ; pikachu
|
||||
|
||||
def_warps_to BEACH_HOUSE
|
||||
def_warps_to SUMMER_BEACH_HOUSE
|
||||
|
|
@ -247,4 +247,4 @@ MapSongBanks::
|
|||
db MUSIC_GYM, BANK(Music_Gym) ; LORELEIS_ROOM
|
||||
db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; BRUNOS_ROOM
|
||||
db MUSIC_POKEMON_TOWER, BANK(Music_PokemonTower) ; AGATHAS_ROOM
|
||||
db MUSIC_ROUTES3, BANK(Music_Routes3) ; BEACH_HOUSE
|
||||
db MUSIC_ROUTES3, BANK(Music_Routes3) ; SUMMER_BEACH_HOUSE
|
||||
|
|
|
|||
|
|
@ -114,5 +114,5 @@ InternalMapEntries:
|
|||
internal_map ROCK_TUNNEL_B1F, 14, 3, RockTunnelName
|
||||
internal_map SILPH_CO_ELEVATOR, 10, 5, SilphCoName
|
||||
internal_map AGATHAS_ROOM, 0, 2, PokemonLeagueName
|
||||
internal_map BEACH_HOUSE, 6, 15, Route19Name
|
||||
internal_map SUMMER_BEACH_HOUSE, 6, 15, Route19Name
|
||||
db -1 ; end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
ExclamationPointMoveSets:
|
||||
; a grammar mistake was fixed (only concerning japanese)
|
||||
; BIDE is in category 3, moved from category 2
|
||||
; set 0
|
||||
db SWORDS_DANCE
|
||||
db GROWTH
|
||||
|
|
@ -18,7 +16,7 @@ ExclamationPointMoveSets:
|
|||
db TELEPORT
|
||||
db MIMIC
|
||||
db DOUBLE_TEAM
|
||||
db BIDE
|
||||
db BIDE ; corrected JP grammar: moved from set 1 in pokered
|
||||
db BARRAGE
|
||||
db 0 ; end set
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ PikaPicAnimThunderboltPals:
|
|||
db 4, %11100100
|
||||
db 4, %11000000
|
||||
db 4, %11100100
|
||||
db $ff
|
||||
db -1 ; end
|
||||
|
||||
Data_fe26b:
|
||||
pikapic_loadgfx Pic_e4000
|
||||
|
|
@ -326,15 +326,18 @@ PikaPicAnimScript28:
|
|||
pikapic_cry
|
||||
pikapic_looptofinish
|
||||
|
||||
PikaPicAnimGFXHeaders:
|
||||
pikapicanimgfx: MACRO
|
||||
IF _NARG == 2
|
||||
\2_id::
|
||||
db \1 ; size (-1 if compressed)
|
||||
dba \2 ; pointer
|
||||
endm
|
||||
ELSE
|
||||
dbbw \1, \2, \3 ; size, bank, address
|
||||
ENDC
|
||||
ENDM
|
||||
|
||||
PikaPicAnimGFX_Null_id::
|
||||
dbbw 1, $39,$0000 ; 00
|
||||
PikaPicAnimGFXHeaders:
|
||||
pikapicanimgfx 1, $39, NULL ; 00
|
||||
pikapicanimgfx -1, Pic_e4000 ; 01
|
||||
pikapicanimgfx 5, GFX_e40cc ; 02
|
||||
pikapicanimgfx -1, Pic_e411c ; 03
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
PikaPicAnimBGFramesPointers:
|
||||
pikaanim_def: macro
|
||||
\1_id: dw \1
|
||||
endm
|
||||
pikaanim_def: MACRO
|
||||
\1_id:
|
||||
dw \1
|
||||
ENDM
|
||||
|
||||
PikaPicAnimBGFramesPointers:
|
||||
pikaanim_def PikaPicAnimBGFrames_0 ; 00
|
||||
pikaanim_def PikaPicAnimBGFrames_1 ; 01
|
||||
pikaanim_def PikaPicAnimBGFrames_2 ; 02
|
||||
|
|
@ -40,6 +41,13 @@ pikaanim_def: macro
|
|||
pikaanim_def PikaPicAnimBGFrames_34 ; 22
|
||||
pikaanim_def PikaPicAnimBGFrames_35 ; 23
|
||||
|
||||
pikaframe: MACRO
|
||||
db (\1_id - PikaPicTilemapPointers) / 2, \2
|
||||
ENDM
|
||||
|
||||
pikaframedelay EQUS "db 0,"
|
||||
pikaframeend EQUS "db $e0"
|
||||
|
||||
PikaPicAnimBGFrames_0:
|
||||
PikaPicAnimBGFrames_1:
|
||||
; Tilemap idx, duration
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
PikaPicTilemapPointers:
|
||||
pikatilemap_def: macro
|
||||
\1_id: dw \1
|
||||
endm
|
||||
pikatilemap_def: MACRO
|
||||
\1_id:
|
||||
dw \1
|
||||
ENDM
|
||||
|
||||
PikaPicTilemapPointers:
|
||||
pikatilemap_def PikaAnimTilemap_0
|
||||
pikatilemap_def PikaAnimTilemap_1
|
||||
pikatilemap_def PikaAnimTilemap_2
|
||||
|
|
@ -48,10 +49,10 @@ pikatilemap_def: macro
|
|||
pikatilemap_def PikaAnimTilemap_42
|
||||
|
||||
PikaAnimTilemap_0:
|
||||
db $ff ; unused
|
||||
db -1 ; unused
|
||||
|
||||
; $ff inhibits overwriting that tile
|
||||
|
||||
; $ff inhibits overwriting that tile
|
||||
PikaAnimTilemap_1:
|
||||
PikaAnimTilemap_42:
|
||||
db 5, 5
|
||||
70
data/sprite_anims/intro_frames.asm
Normal file
70
data/sprite_anims/intro_frames.asm
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
YellowIntro_AnimatedObjectFramesData:
|
||||
dw Unkn_fa100
|
||||
dw Unkn_fa103
|
||||
dw Unkn_fa10a
|
||||
dw Unkn_fa111
|
||||
dw Unkn_fa118
|
||||
dw Unkn_fa11b
|
||||
dw Unkn_fa11e
|
||||
dw Unkn_fa121
|
||||
dw Unkn_fa124
|
||||
dw Unkn_fa127
|
||||
dw Unkn_fa138
|
||||
|
||||
Unkn_fa100:
|
||||
frame $00, 32
|
||||
endanim
|
||||
|
||||
Unkn_fa103:
|
||||
frame $01, 4
|
||||
frame $02, 4
|
||||
frame $03, 4
|
||||
dorestart
|
||||
|
||||
Unkn_fa10a:
|
||||
frame $04, 4
|
||||
frame $05, 4
|
||||
frame $06, 4
|
||||
dorestart
|
||||
|
||||
Unkn_fa111:
|
||||
frame $07, 4
|
||||
frame $08, 4
|
||||
frame $09, 4
|
||||
dorestart
|
||||
|
||||
Unkn_fa118:
|
||||
frame $0a, 32
|
||||
endanim
|
||||
|
||||
Unkn_fa11b:
|
||||
frame $0b, 32
|
||||
endanim
|
||||
|
||||
Unkn_fa11e:
|
||||
frame $0c, 32
|
||||
endanim
|
||||
|
||||
Unkn_fa121:
|
||||
frame $0d, 32
|
||||
endanim
|
||||
|
||||
Unkn_fa124:
|
||||
frame $0e, 32
|
||||
endanim
|
||||
|
||||
Unkn_fa127:
|
||||
frame $0f, 31
|
||||
frame $11, 2
|
||||
frame $0f, 2
|
||||
frame $11, 2
|
||||
frame $0f, 31
|
||||
frame $11, 2
|
||||
frame $0f, 23
|
||||
frame $10, 32
|
||||
endanim
|
||||
|
||||
Unkn_fa138:
|
||||
frame $12, 4
|
||||
frame $13, 4
|
||||
dorestart
|
||||
71
data/animated_objects_3e_2.asm → data/sprite_anims/intro_oam.asm
Executable file → Normal file
71
data/animated_objects_3e_2.asm → data/sprite_anims/intro_oam.asm
Executable file → Normal file
|
|
@ -1,74 +1,3 @@
|
|||
YellowIntro_AnimatedObjectFramesData:
|
||||
dw Unkn_fa100
|
||||
dw Unkn_fa103
|
||||
dw Unkn_fa10a
|
||||
dw Unkn_fa111
|
||||
dw Unkn_fa118
|
||||
dw Unkn_fa11b
|
||||
dw Unkn_fa11e
|
||||
dw Unkn_fa121
|
||||
dw Unkn_fa124
|
||||
dw Unkn_fa127
|
||||
dw Unkn_fa138
|
||||
|
||||
Unkn_fa100:
|
||||
frame $00, 32
|
||||
endanim
|
||||
|
||||
Unkn_fa103:
|
||||
frame $01, 4
|
||||
frame $02, 4
|
||||
frame $03, 4
|
||||
dorestart
|
||||
|
||||
Unkn_fa10a:
|
||||
frame $04, 4
|
||||
frame $05, 4
|
||||
frame $06, 4
|
||||
dorestart
|
||||
|
||||
Unkn_fa111:
|
||||
frame $07, 4
|
||||
frame $08, 4
|
||||
frame $09, 4
|
||||
dorestart
|
||||
|
||||
Unkn_fa118:
|
||||
frame $0a, 32
|
||||
endanim
|
||||
|
||||
Unkn_fa11b:
|
||||
frame $0b, 32
|
||||
endanim
|
||||
|
||||
Unkn_fa11e:
|
||||
frame $0c, 32
|
||||
endanim
|
||||
|
||||
Unkn_fa121:
|
||||
frame $0d, 32
|
||||
endanim
|
||||
|
||||
Unkn_fa124:
|
||||
frame $0e, 32
|
||||
endanim
|
||||
|
||||
Unkn_fa127:
|
||||
frame $0f, 31
|
||||
frame $11, 2
|
||||
frame $0f, 2
|
||||
frame $11, 2
|
||||
frame $0f, 31
|
||||
frame $11, 2
|
||||
frame $0f, 23
|
||||
frame $10, 32
|
||||
endanim
|
||||
|
||||
Unkn_fa138:
|
||||
frame $12, 4
|
||||
frame $13, 4
|
||||
dorestart
|
||||
|
||||
YellowIntro_AnimatedObjectOAMData:
|
||||
dbw $00, Unkn_fa179
|
||||
dbw $96, Unkn_fa17e
|
||||
200
data/sprite_anims/surfing_pikachu_frames.asm
Executable file
200
data/sprite_anims/surfing_pikachu_frames.asm
Executable file
|
|
@ -0,0 +1,200 @@
|
|||
SurfingPikachuFrames:
|
||||
dw Unkn_f943d ; 00
|
||||
dw Unkn_f9440 ; 01
|
||||
dw Unkn_f9445 ; 02
|
||||
dw Unkn_f944a ; 03
|
||||
dw Unkn_f944f ; 04
|
||||
dw Unkn_f9454 ; 05
|
||||
dw Unkn_f9459 ; 06
|
||||
dw Unkn_f945e ; 07
|
||||
dw Unkn_f9463 ; 08
|
||||
dw Unkn_f9468 ; 09
|
||||
dw Unkn_f946d ; 0a
|
||||
dw Unkn_f9472 ; 0b
|
||||
dw Unkn_f9477 ; 0c
|
||||
dw Unkn_f947c ; 0d
|
||||
dw Unkn_f9481 ; 0e
|
||||
dw Unkn_f9486 ; 0f
|
||||
dw Unkn_f948b ; 10
|
||||
dw Unkn_f9494 ; 11
|
||||
dw Unkn_f9499 ; 12
|
||||
dw Unkn_f949e ; 13
|
||||
dw Unkn_f94fb ; 14
|
||||
dw Unkn_f94a1 ; 15
|
||||
dw Unkn_f94b0 ; 16
|
||||
dw Unkn_f94bf ; 17
|
||||
dw Unkn_f94ce ; 18
|
||||
dw Unkn_f94dd ; 19
|
||||
dw Unkn_f94ec ; 1a
|
||||
dw Unkn_f94fe ; 1b
|
||||
|
||||
Unkn_f943d:
|
||||
frame $00, 32
|
||||
endanim
|
||||
|
||||
Unkn_f9440:
|
||||
frame $01, 8
|
||||
frame $02, 8
|
||||
dorestart
|
||||
|
||||
Unkn_f9445:
|
||||
frame $03, 8
|
||||
frame $04, 8
|
||||
dorestart
|
||||
|
||||
Unkn_f944a:
|
||||
frame $05, 8
|
||||
frame $06, 8
|
||||
dorestart
|
||||
|
||||
Unkn_f944f:
|
||||
frame $07, 8
|
||||
frame $08, 8
|
||||
dorestart
|
||||
|
||||
Unkn_f9454:
|
||||
frame $09, 8
|
||||
frame $0a, 8
|
||||
dorestart
|
||||
|
||||
Unkn_f9459:
|
||||
frame $0b, 8
|
||||
frame $0c, 8
|
||||
dorestart
|
||||
|
||||
Unkn_f945e:
|
||||
frame $0d, 8
|
||||
frame $0e, 8
|
||||
dorestart
|
||||
|
||||
Unkn_f9463:
|
||||
frame $01, 8, OAM_HFLIP, OAM_VFLIP
|
||||
frame $02, 8, OAM_HFLIP, OAM_VFLIP
|
||||
dorestart
|
||||
|
||||
Unkn_f9468:
|
||||
frame $03, 8, OAM_HFLIP, OAM_VFLIP
|
||||
frame $04, 8, OAM_HFLIP, OAM_VFLIP
|
||||
dorestart
|
||||
|
||||
Unkn_f946d:
|
||||
frame $05, 8, OAM_HFLIP, OAM_VFLIP
|
||||
frame $06, 8, OAM_HFLIP, OAM_VFLIP
|
||||
dorestart
|
||||
|
||||
Unkn_f9472:
|
||||
frame $07, 8, OAM_HFLIP, OAM_VFLIP
|
||||
frame $08, 8, OAM_HFLIP, OAM_VFLIP
|
||||
dorestart
|
||||
|
||||
Unkn_f9477:
|
||||
frame $09, 8, OAM_HFLIP, OAM_VFLIP
|
||||
frame $0a, 8, OAM_HFLIP, OAM_VFLIP
|
||||
dorestart
|
||||
|
||||
Unkn_f947c:
|
||||
frame $0b, 8, OAM_HFLIP, OAM_VFLIP
|
||||
frame $0c, 8, OAM_HFLIP, OAM_VFLIP
|
||||
dorestart
|
||||
|
||||
Unkn_f9481:
|
||||
frame $0d, 8, OAM_HFLIP, OAM_VFLIP
|
||||
frame $0e, 8, OAM_HFLIP, OAM_VFLIP
|
||||
dorestart
|
||||
|
||||
Unkn_f9486:
|
||||
frame $11, 7
|
||||
frame $12, 7
|
||||
dorestart
|
||||
|
||||
Unkn_f948b:
|
||||
frame $13, 2
|
||||
frame $14, 2
|
||||
dorepeat 8
|
||||
frame $15, 2
|
||||
endanim
|
||||
|
||||
Unkn_f9494:
|
||||
frame $16, 32
|
||||
frame $16, 32
|
||||
delanim
|
||||
|
||||
Unkn_f9499:
|
||||
frame $17, 32
|
||||
frame $17, 32
|
||||
delanim
|
||||
|
||||
Unkn_f949e:
|
||||
frame $18, 32
|
||||
endanim
|
||||
|
||||
Unkn_f94a1:
|
||||
frame $1a, 4
|
||||
dorepeat 1
|
||||
frame $1a, 3
|
||||
dorepeat 1
|
||||
frame $1a, 2
|
||||
dorepeat 1
|
||||
frame $1a, 1
|
||||
delanim
|
||||
|
||||
Unkn_f94b0:
|
||||
frame $1b, 4
|
||||
dorepeat 1
|
||||
frame $1b, 3
|
||||
dorepeat 1
|
||||
frame $1b, 2
|
||||
dorepeat 1
|
||||
frame $1b, 1
|
||||
delanim
|
||||
|
||||
Unkn_f94bf:
|
||||
frame $1c, 4
|
||||
dorepeat 1
|
||||
frame $1c, 3
|
||||
dorepeat 1
|
||||
frame $1c, 2
|
||||
dorepeat 1
|
||||
frame $1c, 1
|
||||
delanim
|
||||
|
||||
Unkn_f94ce:
|
||||
frame $1d, 4
|
||||
dorepeat 1
|
||||
frame $1d, 3
|
||||
dorepeat 1
|
||||
frame $1d, 2
|
||||
dorepeat 1
|
||||
frame $1d, 1
|
||||
delanim
|
||||
|
||||
Unkn_f94dd:
|
||||
frame $1e, 4
|
||||
dorepeat 1
|
||||
frame $1e, 3
|
||||
dorepeat 1
|
||||
frame $1e, 2
|
||||
dorepeat 1
|
||||
frame $1e, 1
|
||||
delanim
|
||||
|
||||
Unkn_f94ec:
|
||||
frame $1f, 4
|
||||
dorepeat 1
|
||||
frame $1f, 3
|
||||
dorepeat 1
|
||||
frame $1f, 2
|
||||
dorepeat 1
|
||||
frame $1f, 1
|
||||
delanim
|
||||
|
||||
Unkn_f94fb:
|
||||
frame $19, 1
|
||||
delanim
|
||||
|
||||
Unkn_f94fe:
|
||||
frame $20, 7
|
||||
frame $21, 7
|
||||
frame $22, 7
|
||||
frame $23, 7
|
||||
dorestart
|
||||
201
data/animated_objects_3e_1.asm → data/sprite_anims/surfing_pikachu_oam.asm
Executable file → Normal file
201
data/animated_objects_3e_1.asm → data/sprite_anims/surfing_pikachu_oam.asm
Executable file → Normal file
|
|
@ -1,204 +1,3 @@
|
|||
SurfingPikachuFrames:
|
||||
dw Unkn_f943d ; 00
|
||||
dw Unkn_f9440 ; 01
|
||||
dw Unkn_f9445 ; 02
|
||||
dw Unkn_f944a ; 03
|
||||
dw Unkn_f944f ; 04
|
||||
dw Unkn_f9454 ; 05
|
||||
dw Unkn_f9459 ; 06
|
||||
dw Unkn_f945e ; 07
|
||||
dw Unkn_f9463 ; 08
|
||||
dw Unkn_f9468 ; 09
|
||||
dw Unkn_f946d ; 0a
|
||||
dw Unkn_f9472 ; 0b
|
||||
dw Unkn_f9477 ; 0c
|
||||
dw Unkn_f947c ; 0d
|
||||
dw Unkn_f9481 ; 0e
|
||||
dw Unkn_f9486 ; 0f
|
||||
dw Unkn_f948b ; 10
|
||||
dw Unkn_f9494 ; 11
|
||||
dw Unkn_f9499 ; 12
|
||||
dw Unkn_f949e ; 13
|
||||
dw Unkn_f94fb ; 14
|
||||
dw Unkn_f94a1 ; 15
|
||||
dw Unkn_f94b0 ; 16
|
||||
dw Unkn_f94bf ; 17
|
||||
dw Unkn_f94ce ; 18
|
||||
dw Unkn_f94dd ; 19
|
||||
dw Unkn_f94ec ; 1a
|
||||
dw Unkn_f94fe ; 1b
|
||||
|
||||
Unkn_f943d:
|
||||
frame $00, 32
|
||||
endanim
|
||||
|
||||
Unkn_f9440:
|
||||
frame $01, 8
|
||||
frame $02, 8
|
||||
dorestart
|
||||
|
||||
Unkn_f9445:
|
||||
frame $03, 8
|
||||
frame $04, 8
|
||||
dorestart
|
||||
|
||||
Unkn_f944a:
|
||||
frame $05, 8
|
||||
frame $06, 8
|
||||
dorestart
|
||||
|
||||
Unkn_f944f:
|
||||
frame $07, 8
|
||||
frame $08, 8
|
||||
dorestart
|
||||
|
||||
Unkn_f9454:
|
||||
frame $09, 8
|
||||
frame $0a, 8
|
||||
dorestart
|
||||
|
||||
Unkn_f9459:
|
||||
frame $0b, 8
|
||||
frame $0c, 8
|
||||
dorestart
|
||||
|
||||
Unkn_f945e:
|
||||
frame $0d, 8
|
||||
frame $0e, 8
|
||||
dorestart
|
||||
|
||||
Unkn_f9463:
|
||||
frame $01, 8, OAM_HFLIP, OAM_VFLIP
|
||||
frame $02, 8, OAM_HFLIP, OAM_VFLIP
|
||||
dorestart
|
||||
|
||||
Unkn_f9468:
|
||||
frame $03, 8, OAM_HFLIP, OAM_VFLIP
|
||||
frame $04, 8, OAM_HFLIP, OAM_VFLIP
|
||||
dorestart
|
||||
|
||||
Unkn_f946d:
|
||||
frame $05, 8, OAM_HFLIP, OAM_VFLIP
|
||||
frame $06, 8, OAM_HFLIP, OAM_VFLIP
|
||||
dorestart
|
||||
|
||||
Unkn_f9472:
|
||||
frame $07, 8, OAM_HFLIP, OAM_VFLIP
|
||||
frame $08, 8, OAM_HFLIP, OAM_VFLIP
|
||||
dorestart
|
||||
|
||||
Unkn_f9477:
|
||||
frame $09, 8, OAM_HFLIP, OAM_VFLIP
|
||||
frame $0a, 8, OAM_HFLIP, OAM_VFLIP
|
||||
dorestart
|
||||
|
||||
Unkn_f947c:
|
||||
frame $0b, 8, OAM_HFLIP, OAM_VFLIP
|
||||
frame $0c, 8, OAM_HFLIP, OAM_VFLIP
|
||||
dorestart
|
||||
|
||||
Unkn_f9481:
|
||||
frame $0d, 8, OAM_HFLIP, OAM_VFLIP
|
||||
frame $0e, 8, OAM_HFLIP, OAM_VFLIP
|
||||
dorestart
|
||||
|
||||
Unkn_f9486:
|
||||
frame $11, 7
|
||||
frame $12, 7
|
||||
dorestart
|
||||
|
||||
Unkn_f948b:
|
||||
frame $13, 2
|
||||
frame $14, 2
|
||||
dorepeat 8
|
||||
frame $15, 2
|
||||
endanim
|
||||
|
||||
Unkn_f9494:
|
||||
frame $16, 32
|
||||
frame $16, 32
|
||||
delanim
|
||||
|
||||
Unkn_f9499:
|
||||
frame $17, 32
|
||||
frame $17, 32
|
||||
delanim
|
||||
|
||||
Unkn_f949e:
|
||||
frame $18, 32
|
||||
endanim
|
||||
|
||||
Unkn_f94a1:
|
||||
frame $1a, 4
|
||||
dorepeat 1
|
||||
frame $1a, 3
|
||||
dorepeat 1
|
||||
frame $1a, 2
|
||||
dorepeat 1
|
||||
frame $1a, 1
|
||||
delanim
|
||||
|
||||
Unkn_f94b0:
|
||||
frame $1b, 4
|
||||
dorepeat 1
|
||||
frame $1b, 3
|
||||
dorepeat 1
|
||||
frame $1b, 2
|
||||
dorepeat 1
|
||||
frame $1b, 1
|
||||
delanim
|
||||
|
||||
Unkn_f94bf:
|
||||
frame $1c, 4
|
||||
dorepeat 1
|
||||
frame $1c, 3
|
||||
dorepeat 1
|
||||
frame $1c, 2
|
||||
dorepeat 1
|
||||
frame $1c, 1
|
||||
delanim
|
||||
|
||||
Unkn_f94ce:
|
||||
frame $1d, 4
|
||||
dorepeat 1
|
||||
frame $1d, 3
|
||||
dorepeat 1
|
||||
frame $1d, 2
|
||||
dorepeat 1
|
||||
frame $1d, 1
|
||||
delanim
|
||||
|
||||
Unkn_f94dd:
|
||||
frame $1e, 4
|
||||
dorepeat 1
|
||||
frame $1e, 3
|
||||
dorepeat 1
|
||||
frame $1e, 2
|
||||
dorepeat 1
|
||||
frame $1e, 1
|
||||
delanim
|
||||
|
||||
Unkn_f94ec:
|
||||
frame $1f, 4
|
||||
dorepeat 1
|
||||
frame $1f, 3
|
||||
dorepeat 1
|
||||
frame $1f, 2
|
||||
dorepeat 1
|
||||
frame $1f, 1
|
||||
delanim
|
||||
|
||||
Unkn_f94fb:
|
||||
frame $19, 1
|
||||
delanim
|
||||
|
||||
Unkn_f94fe:
|
||||
frame $20, 7
|
||||
frame $21, 7
|
||||
frame $22, 7
|
||||
frame $23, 7
|
||||
dorestart
|
||||
|
||||
SurfingPikachuOAMData:
|
||||
dbw $00, .Frame0
|
||||
dbw $00, .Frame1
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
SpriteFacingAndAnimationTable:
|
||||
; This table is used for overworld sprites $1-$9.
|
||||
dw .StandingDown ; facing down, walk animation frame 0
|
||||
dw .WalkingDown ; facing down, walk animation frame 1
|
||||
dw .StandingDown ; facing down, walk animation frame 2
|
||||
|
|
@ -35,97 +36,91 @@ SpriteFacingAndAnimationTable:
|
|||
dw .StandingDown
|
||||
dw .StandingDown
|
||||
; special case
|
||||
dw SpriteSpecialCase ; pikachu maybe?
|
||||
dw .SpecialCase ; pikachu maybe?
|
||||
|
||||
; Tables used as a reference to transform OAM data.
|
||||
|
||||
; Format:
|
||||
; db y, x, attributes, tile index
|
||||
|
||||
.StandingDown:
|
||||
db $04
|
||||
; Sprite OAM Parameters
|
||||
db $00, $00, $00, $00 ; top left
|
||||
db $00, $08, $01, $00 ; top right
|
||||
db $08, $00, $02, OAMFLAG_CANBEMASKED ; bottom left
|
||||
db $08, $08, $03, OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
|
||||
db 4 ; #
|
||||
db 0, 0, $00, 0
|
||||
db 0, 8, $01, 0
|
||||
db 8, 0, $02, OAMFLAG_CANBEMASKED
|
||||
db 8, 8, $03, OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA
|
||||
|
||||
.WalkingDown:
|
||||
db $04
|
||||
; Sprite OAM Parameters
|
||||
db $00, $00, $80, $00 ; top left
|
||||
db $00, $08, $81, $00 ; top right
|
||||
db $08, $00, $82, OAMFLAG_CANBEMASKED ; bottom left
|
||||
db $08, $08, $83, OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
|
||||
db 4 ; #
|
||||
db 0, 0, $80, 0
|
||||
db 0, 8, $81, 0
|
||||
db 8, 0, $82, OAMFLAG_CANBEMASKED
|
||||
db 8, 8, $83, OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA
|
||||
|
||||
.WalkingDown2:
|
||||
db $04
|
||||
; Sprite OAM Parameters
|
||||
db $00, $08, $80, OAM_HFLIP ; top left
|
||||
db $00, $00, $81, OAM_HFLIP ; top right
|
||||
db $08, $08, $82, OAM_HFLIP | OAMFLAG_CANBEMASKED ; bottom left
|
||||
db $08, $00, $83, OAM_HFLIP | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
|
||||
db 4 ; #
|
||||
db 0, 8, $80, OAM_HFLIP
|
||||
db 0, 0, $81, OAM_HFLIP
|
||||
db 8, 8, $82, OAM_HFLIP | OAMFLAG_CANBEMASKED
|
||||
db 8, 0, $83, OAM_HFLIP | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA
|
||||
|
||||
.StandingUp:
|
||||
db $04
|
||||
; Sprite OAM Parameters
|
||||
db $00, $00, $04, $00 ; top left
|
||||
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
|
||||
db 4 ; #
|
||||
db 0, 0, $04, 0
|
||||
db 0, 8, $05, 0
|
||||
db 8, 0, $06, OAMFLAG_CANBEMASKED
|
||||
db 8, 8, $07, OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA
|
||||
|
||||
.WalkingUp:
|
||||
db $04
|
||||
; Sprite OAM Parameters
|
||||
db $00, $00, $84, $00 ; top left
|
||||
db $00, $08, $85, $00 ; top right
|
||||
db $08, $00, $86, OAMFLAG_CANBEMASKED ; bottom left
|
||||
db $08, $08, $87, OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
|
||||
db 4 ; #
|
||||
db 0, 0, $84, 0
|
||||
db 0, 8, $85, 0
|
||||
db 8, 0, $86, OAMFLAG_CANBEMASKED
|
||||
db 8, 8, $87, OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA
|
||||
|
||||
.WalkingUp2:
|
||||
db $04
|
||||
; Sprite OAM Parameters
|
||||
db $00, $08, $84, OAM_HFLIP ; top left
|
||||
db $00, $00, $85, OAM_HFLIP ; top right
|
||||
db $08, $08, $86, OAM_HFLIP | OAMFLAG_CANBEMASKED ; bottom left
|
||||
db $08, $00, $87, OAM_HFLIP | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
|
||||
db 4 ; #
|
||||
db 0, 8, $84, OAM_HFLIP
|
||||
db 0, 0, $85, OAM_HFLIP
|
||||
db 8, 8, $86, OAM_HFLIP | OAMFLAG_CANBEMASKED
|
||||
db 8, 0, $87, OAM_HFLIP | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA
|
||||
|
||||
.StandingLeft:
|
||||
db $04
|
||||
; Sprite OAM Parameters
|
||||
db $00, $00, $08, $00 ; top left
|
||||
db $00, $08, $09, $00 ; top right
|
||||
db $08, $00, $0a, OAMFLAG_CANBEMASKED ; bottom left
|
||||
db $08, $08, $0b, OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
|
||||
db 4 ; #
|
||||
db 0, 0, $08, 0
|
||||
db 0, 8, $09, 0
|
||||
db 8, 0, $0a, OAMFLAG_CANBEMASKED
|
||||
db 8, 8, $0b, OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA
|
||||
|
||||
.WalkingLeft:
|
||||
db $04
|
||||
; Sprite OAM Parameters
|
||||
db $00, $00, $88, $00 ; top left
|
||||
db $00, $08, $89, $00 ; top right
|
||||
db $08, $00, $8a, OAMFLAG_CANBEMASKED ; bottom left
|
||||
db $08, $08, $8b, OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
|
||||
db 4 ; #
|
||||
db 0, 0, $88, 0
|
||||
db 0, 8, $89, 0
|
||||
db 8, 0, $8a, OAMFLAG_CANBEMASKED
|
||||
db 8, 8, $8b, OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA
|
||||
|
||||
.StandingRight:
|
||||
db $04
|
||||
; Sprite OAM Parameters
|
||||
db $00, $08, $08, OAM_HFLIP ; top left
|
||||
db $00, $00, $09, OAM_HFLIP ; top right
|
||||
db $08, $08, $0a, OAM_HFLIP | OAMFLAG_CANBEMASKED ; bottom left
|
||||
db $08, $00, $0b, OAM_HFLIP | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
|
||||
db 4 ; #
|
||||
db 0, 8, $08, OAM_HFLIP
|
||||
db 0, 0, $09, OAM_HFLIP
|
||||
db 8, 8, $0a, OAM_HFLIP | OAMFLAG_CANBEMASKED
|
||||
db 8, 0, $0b, OAM_HFLIP | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA
|
||||
|
||||
.WalkingRight:
|
||||
db $04
|
||||
; Sprite OAM Parameters
|
||||
db $00, $08, $88, OAM_HFLIP ; top left
|
||||
db $00, $00, $89, OAM_HFLIP ; top right
|
||||
db $08, $08, $8a, OAM_HFLIP | OAMFLAG_CANBEMASKED ; bottom left
|
||||
db $08, $00, $8b, OAM_HFLIP | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
|
||||
db 4 ; #
|
||||
db 0, 8, $88, OAM_HFLIP
|
||||
db 0, 0, $89, OAM_HFLIP
|
||||
db 8, 8, $8a, OAM_HFLIP | OAMFLAG_CANBEMASKED
|
||||
db 8, 0, $8b, OAM_HFLIP | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA
|
||||
|
||||
SpriteSpecialCase:
|
||||
db $09
|
||||
; Sprite OAM Parameters
|
||||
db -$4, -$4, $00, $00
|
||||
db -$4, $04, $01, $00
|
||||
db -$4, $0c, $00, OAM_HFLIP
|
||||
db $04, -$4, $01, $00
|
||||
db $04, $04, $02, $00
|
||||
db $04, $0c, $01, $00
|
||||
db $0c, -$4, $00, OAM_VFLIP | OAMFLAG_CANBEMASKED
|
||||
db $0c, $04, $01, OAMFLAG_CANBEMASKED
|
||||
db $0c, $0c, $00, OAM_VFLIP | OAM_HFLIP | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA
|
||||
.SpecialCase:
|
||||
db 9 ; #
|
||||
db -4, -4, $00, 0
|
||||
db -4, 4, $01, 0
|
||||
db -4, 12, $00, OAM_HFLIP
|
||||
db 4, -4, $01, 0
|
||||
db 4, 4, $02, 0
|
||||
db 4, 12, $01, 0
|
||||
db 12, -4, $00, OAM_VFLIP | OAMFLAG_CANBEMASKED
|
||||
db 12, 4, $01, OAMFLAG_CANBEMASKED
|
||||
db 12, 12, $00, OAM_VFLIP | OAM_HFLIP | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ SpriteSheetPointerTable:
|
|||
overworld_sprite MiddleAgedWomanSprite, 12 ; SPRITE_MIDDLE_AGED_WOMAN
|
||||
overworld_sprite BrunetteGirlSprite, 12 ; SPRITE_BRUNETTE_GIRL
|
||||
overworld_sprite LanceSprite, 12 ; SPRITE_LANCE
|
||||
overworld_sprite RedSprite, 12 ; SPRITE_UNUSED_SCIENTIST
|
||||
overworld_sprite RedSprite, 12 ; SPRITE_UNUSED_RED_1
|
||||
overworld_sprite ScientistSprite, 12 ; SPRITE_SCIENTIST
|
||||
overworld_sprite RockerSprite, 12 ; SPRITE_ROCKER
|
||||
overworld_sprite SwimmerSprite, 12 ; SPRITE_SWIMMER
|
||||
|
|
@ -55,11 +55,11 @@ SpriteSheetPointerTable:
|
|||
overworld_sprite FisherSprite, 12 ; SPRITE_FISHER
|
||||
overworld_sprite KogaSprite, 12 ; SPRITE_KOGA
|
||||
overworld_sprite GuardSprite, 12 ; SPRITE_GUARD
|
||||
overworld_sprite RedSprite, 12 ; SPRITE_UNUSED_GUARD
|
||||
overworld_sprite RedSprite, 12 ; SPRITE_UNUSED_RED_2
|
||||
overworld_sprite MomSprite, 12 ; SPRITE_MOM
|
||||
overworld_sprite BaldingGuySprite, 12 ; SPRITE_BALDING_GUY
|
||||
overworld_sprite LittleBoySprite, 12 ; SPRITE_LITTLE_BOY
|
||||
overworld_sprite RedSprite, 12 ; SPRITE_UNUSED_GAMEBOY_KID
|
||||
overworld_sprite RedSprite, 12 ; SPRITE_UNUSED_RED_3
|
||||
overworld_sprite GameboyKidSprite, 12 ; SPRITE_GAMEBOY_KID
|
||||
overworld_sprite FairySprite, 12 ; SPRITE_FAIRY
|
||||
overworld_sprite AgathaSprite, 12 ; SPRITE_AGATHA
|
||||
|
|
|
|||
|
|
@ -272,14 +272,6 @@ BikerData:
|
|||
db 33, WEEZING, 0
|
||||
db 26, GRIMER, GRIMER, GRIMER, GRIMER, 0
|
||||
; Route 17
|
||||
; From https://www.smogon.com/smog/issue27/glitch:
|
||||
; 0E:5FC2 is offset of the ending 0 for this first Biker on Route 17.
|
||||
; BaseStats + (MonBaseStatsEnd - MonBaseStats) * (000 - 1) = $5FC2;
|
||||
; that's the formula from GetMonHeader for the base stats of mon #000.
|
||||
; (BaseStats = $43DE and BANK(BaseStats) = $0E.)
|
||||
; Finally, PokedexOrder lists 0 as the dex ID for every MissingNo.
|
||||
; The result is that this data gets interpreted as the base stats
|
||||
; for MissingNo: 0, 33, MUK, 0, 29, VOLTORB, VOLTORB, 0, ..., 28, GRIMER, GRIMER.
|
||||
db 28, WEEZING, KOFFING, WEEZING, 0
|
||||
db 33, MUK, 0
|
||||
db 29, VOLTORB, VOLTORB, 0
|
||||
|
|
@ -600,12 +592,12 @@ RocketData:
|
|||
; Silph Co. 11F
|
||||
db 25, RATTATA, RATTATA, ZUBAT, RATTATA, EKANS, 0
|
||||
db 32, CUBONE, DROWZEE, MAROWAK, 0
|
||||
;JessieJamesData:
|
||||
; Jessie & James
|
||||
db 14, EKANS, MEOWTH, KOFFING, 0
|
||||
db 25, KOFFING, MEOWTH, EKANS, 0
|
||||
db 27, MEOWTH, ARBOK, WEEZING, 0
|
||||
db 31, WEEZING, ARBOK, MEOWTH, 0
|
||||
; unused JessieJames trainers
|
||||
; Unused
|
||||
db 16, KOFFING, 0
|
||||
db 27, KOFFING, 0
|
||||
db 29, WEEZING, 0
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
; yellow has its own format.
|
||||
|
||||
; entry = trainerclass, trainerid, moveset+, 0
|
||||
; moveset = partymon location, partymon's move, moveid
|
||||
; Yellow entry format:
|
||||
; db trainerclass, trainerid
|
||||
; repeat { db partymon location, partymon move, move id }
|
||||
; db 0
|
||||
|
||||
SpecialTrainerMoves:
|
||||
db BUG_CATCHER, 15
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FishingSlots::
|
||||
SuperRodFishingSlots::
|
||||
db PALLET_TOWN, STARYU, 10, TENTACOOL, 10, STARYU, 5, TENTACOOL, 20
|
||||
db VIRIDIAN_CITY, POLIWAG, 5, POLIWAG, 10, POLIWAG, 15, POLIWAG, 10
|
||||
db CERULEAN_CITY, GOLDEEN, 25, GOLDEEN, 30, SEAKING, 30, SEAKING, 40
|
||||
|
|
|
|||
|
|
@ -13,12 +13,13 @@ Fixes are written in the `diff` format. If you've used Git before, this should l
|
|||
|
||||
## Contents
|
||||
|
||||
- [Options Menu Code Fails to Clear Joypad State on Initialization](#options-menu-code-fails-to-clear-joypad-state-on-initialization)
|
||||
- [Battle Transitions Fail to Account for Scripted Battles](#battle-transitions-fail-to-account-for-scripted-battles)
|
||||
- [wPikachuFollowCommandBuffer can Overflow](#wpikachufollowcommandbuffer-can-overflow)
|
||||
- [Unexpected Counter Damage](#unexpected-counter-damage)
|
||||
- [Options menu code fails to clear joypad state on initialization](#options-menu-code-fails-to-clear-joypad-state-on-initialization)
|
||||
- [Battle transitions fail to account for scripted battles](#battle-transitions-fail-to-account-for-scripted-battles)
|
||||
- [`wPikachuFollowCommandBuffer` can overflow](#wpikachufollowcommandbuffer-can-overflow)
|
||||
- [Unexpected Counter damage](#unexpected-counter-damage)
|
||||
|
||||
## Options Menu Code Fails to Clear Joypad State on Initialization
|
||||
|
||||
## Options menu code fails to clear joypad state on initialization
|
||||
|
||||
This bug (or feature!) results in all options being shifted left or right if the respective direction is pressed on the same frame the options menu is opened.
|
||||
The bug also exists in pokegold and pokecrystal.
|
||||
|
|
@ -32,7 +33,8 @@ The bug also exists in pokegold and pokecrystal.
|
|||
call InitOptionsMenu
|
||||
```
|
||||
|
||||
## Battle Transitions Fail to Account for Scripted Battles
|
||||
|
||||
## Battle transitions fail to account for scripted battles
|
||||
|
||||
When Oak Catches Pikachu in the Pallet Town cutscenes you don't yet have any Pokemon in Party.
|
||||
The Battle Transitions code has no error handling for this and reads wPartyMon1HP from wRivalName+6.
|
||||
|
|
@ -41,7 +43,8 @@ A similar series of bugs appears to exist in pokecrystal.
|
|||
|
||||
**Fix:** TBD in [engine/battle/battle_transitions.asm#L93](/engine/battle/battle_transitions.asm#L93)
|
||||
|
||||
## wPikachuFollowCommandBuffer can Overflow
|
||||
|
||||
## `wPikachuFollowCommandBuffer` can overflow
|
||||
|
||||
AppendPikachuFollowCommandToBuffer doesn't have any length checking for the buffer of Pikachu commands.
|
||||
This can be abused to write data into any address past d437, typically by putting pikachu to sleep in the Pewter Center with Jigglypuff.
|
||||
|
|
@ -49,9 +52,10 @@ While in this state, walking down writes 01, up 02, left 03, and right 04.
|
|||
This bug is generally known as "Pikawalk."
|
||||
A typical use for this would be to force the in game time to 255:59.
|
||||
|
||||
**Fix:** TBD in [engine/pikachu_follow.asm#1165](/engine/pikachu_follow.asm#1165)
|
||||
**Fix:** TBD in [engine/pikachu/pikachu_follow.asm#1165](/engine/pikachu/pikachu_follow.asm#1165)
|
||||
|
||||
## Unexpected Counter Damage
|
||||
|
||||
## Unexpected Counter damage
|
||||
|
||||
Counter simply doubles the value of wDamage which can hold the last value of damage dealt whether it was from you, your opponent, a switched out opponent, or a player in another battle.
|
||||
This is because wDamage is used for both the player's damage and opponent's damage, and is not cleared out between switching or battles.
|
||||
|
|
|
|||
|
|
@ -1,189 +0,0 @@
|
|||
INCLUDE "engine/pikachu_pcm.asm"
|
||||
INCLUDE "engine/overworld/advance_player_sprite.asm"
|
||||
|
||||
INCLUDE "engine/events/black_out.asm"
|
||||
|
||||
SetMapSpecificScriptFlagsOnMapReload::
|
||||
ld a, [wCurMap]
|
||||
cp VERMILION_GYM ; ??? new thing about verm gym?
|
||||
jr z, .verm_gym
|
||||
ld c, a
|
||||
ld hl, .MapList
|
||||
.search_loop
|
||||
ld a, [hli]
|
||||
cp c
|
||||
jr z, .in_list
|
||||
cp a, $ff
|
||||
jr nz, .search_loop
|
||||
ret
|
||||
|
||||
.verm_gym
|
||||
ld hl, wCurrentMapScriptFlags
|
||||
set 6, [hl]
|
||||
ret
|
||||
|
||||
.in_list
|
||||
ld hl, wCurrentMapScriptFlags
|
||||
set 5, [hl]
|
||||
ret
|
||||
|
||||
.MapList
|
||||
db SILPH_CO_2F
|
||||
db SILPH_CO_3F
|
||||
db SILPH_CO_4F
|
||||
db SILPH_CO_5F
|
||||
db SILPH_CO_6F
|
||||
db SILPH_CO_7F
|
||||
db SILPH_CO_8F
|
||||
db SILPH_CO_9F
|
||||
db SILPH_CO_10F
|
||||
db SILPH_CO_11F
|
||||
db POKEMON_MANSION_2F
|
||||
db POKEMON_MANSION_3F
|
||||
db POKEMON_MANSION_B1F
|
||||
db POKEMON_MANSION_1F
|
||||
db CINNABAR_GYM
|
||||
db GAME_CORNER
|
||||
db ROCKET_HIDEOUT_B1F
|
||||
db ROCKET_HIDEOUT_B4F
|
||||
db VICTORY_ROAD_3F
|
||||
db VICTORY_ROAD_1F
|
||||
db VICTORY_ROAD_2F
|
||||
db LANCES_ROOM
|
||||
db LORELEIS_ROOM
|
||||
db BRUNOS_ROOM
|
||||
db AGATHAS_ROOM
|
||||
db $ff
|
||||
|
||||
BeachHouse_GFX:
|
||||
INCBIN "gfx/tilesets/beachhouse.2bpp"
|
||||
ds 384
|
||||
|
||||
BeachHouse_Block:
|
||||
INCBIN "gfx/blocksets/beachhouse.bst"
|
||||
|
||||
Func_f0a54:
|
||||
ret
|
||||
|
||||
LoadUnusedBluesHouseMissableObjectData::
|
||||
; referenced in an unused function
|
||||
ld hl, .MissableObjectsMaps
|
||||
.loop
|
||||
ld a, [hli]
|
||||
cp a, $ff
|
||||
ret z
|
||||
ld b, a
|
||||
ld a, [wCurMap]
|
||||
cp b
|
||||
jr z, .found
|
||||
inc hl
|
||||
inc hl
|
||||
inc hl
|
||||
jr .loop
|
||||
|
||||
.found
|
||||
ld a, [hli]
|
||||
ld c, a
|
||||
ld b, 0
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ld de, wMissableObjectList
|
||||
call CopyData
|
||||
ret
|
||||
|
||||
.MissableObjectsMaps:
|
||||
dbbw BLUES_HOUSE, .End - .Start, .Start
|
||||
db $ff
|
||||
|
||||
.Start:
|
||||
db 1, HS_DAISY_SITTING_COPY
|
||||
db 2, HS_DAISY_WALKING_COPY
|
||||
db 3, HS_TOWN_MAP_COPY
|
||||
db $ff
|
||||
.End:
|
||||
|
||||
TryApplyPikachuMovementData:
|
||||
ld a, [wd472]
|
||||
bit 7, a
|
||||
ret z
|
||||
ld a, [wWalkBikeSurfState]
|
||||
and a
|
||||
ret nz
|
||||
push hl
|
||||
push bc
|
||||
callfar 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
|
||||
callfar LoadPikachuShadowIntoVRAM
|
||||
pop af
|
||||
ld [wUpdateSpritesEnabled], a
|
||||
pop hl
|
||||
call ApplyPikachuMovementData
|
||||
callfar RefreshPikachuFollow
|
||||
ret
|
||||
|
||||
Pic_f0abf:
|
||||
INCBIN "gfx/pikachu/unknown_f0abf.pic"
|
||||
GFX_f0b64:
|
||||
INCBIN "gfx/pikachu/unknown_f0b64.2bpp"
|
||||
Pic_f0cf4:
|
||||
INCBIN "gfx/pikachu/unknown_f0cf4.pic"
|
||||
GFX_f0d82:
|
||||
INCBIN "gfx/pikachu/unknown_f0d82.2bpp"
|
||||
|
||||
PokecenterChanseyText::
|
||||
ld hl, NurseChanseyText
|
||||
call PrintText
|
||||
ld a, CHANSEY
|
||||
call PlayCry
|
||||
call WaitForSoundToFinish
|
||||
ret
|
||||
|
||||
NurseChanseyText:
|
||||
text_far _NurseChanseyText
|
||||
text_end
|
||||
|
||||
INCLUDE "engine/movie/credits.asm"
|
||||
INCLUDE "scripts/ViridianCity2.asm"
|
||||
INCLUDE "scripts/VermilionCity2.asm"
|
||||
INCLUDE "scripts/CeladonCity2.asm"
|
||||
INCLUDE "scripts/Route1_2.asm"
|
||||
INCLUDE "scripts/Route22_2.asm"
|
||||
INCLUDE "scripts/RedsHouse1F2.asm"
|
||||
INCLUDE "scripts/OaksLab2.asm"
|
||||
INCLUDE "scripts/ViridianSchoolHouse2.asm"
|
||||
INCLUDE "scripts/Museum1F2.asm"
|
||||
INCLUDE "scripts/PewterPokecenter2.asm"
|
||||
INCLUDE "scripts/PokemonTower2F_2.asm"
|
||||
INCLUDE "scripts/CeladonMart3F_2.asm"
|
||||
INCLUDE "scripts/CeladonMansion1F_2.asm"
|
||||
INCLUDE "scripts/CeladonMansion3F_2.asm"
|
||||
INCLUDE "scripts/GameCorner2.asm"
|
||||
INCLUDE "scripts/CeladonDiner2.asm"
|
||||
INCLUDE "scripts/SafariZoneGate2.asm"
|
||||
INCLUDE "scripts/CinnabarGym3.asm"
|
||||
INCLUDE "scripts/MtMoonPokecenter2.asm"
|
||||
|
||||
INCLUDE "data/maps/headers/BeachHouse.asm"
|
||||
INCLUDE "scripts/BeachHouse.asm"
|
||||
BeachHouse_Blocks:
|
||||
INCBIN "maps/BeachHouse.blk"
|
||||
INCLUDE "data/maps/objects/BeachHouse.asm"
|
||||
|
||||
INCLUDE "scripts/BeachHouse2.asm"
|
||||
INCLUDE "scripts/BillsHouse2.asm"
|
||||
INCLUDE "scripts/ViridianForest2.asm"
|
||||
INCLUDE "scripts/SSAnne2FRooms_2.asm"
|
||||
INCLUDE "scripts/SilphCo11F_2.asm"
|
||||
|
||||
INCLUDE "engine/overworld/hidden_objects.asm"
|
||||
INCLUDE "engine/vermilion_gym_trash_cans.asm"
|
||||
|
|
@ -1,491 +0,0 @@
|
|||
INCLUDE "engine/battle/common_text.asm"
|
||||
INCLUDE "engine/battle/link_battle_versus_text.asm"
|
||||
INCLUDE "engine/battle/unused_stats_functions.asm"
|
||||
INCLUDE "engine/battle/scroll_draw_trainer_pic.asm"
|
||||
|
||||
StarterPikachuBattleEntranceAnimation:
|
||||
hlcoord 0, 5
|
||||
ld c, 0
|
||||
.loop1
|
||||
inc c
|
||||
ld a, c
|
||||
cp 9
|
||||
ret z
|
||||
ld d, 7 * 13
|
||||
push bc
|
||||
push hl
|
||||
.loop2
|
||||
call .PlaceColumn
|
||||
dec hl
|
||||
ld a, d
|
||||
sub 7
|
||||
ld d, a
|
||||
dec c
|
||||
jr nz, .loop2
|
||||
ld c, 2
|
||||
call DelayFrames
|
||||
pop hl
|
||||
pop bc
|
||||
inc hl
|
||||
jr .loop1
|
||||
|
||||
.PlaceColumn:
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
ld e, 7
|
||||
.loop3
|
||||
ld a, d
|
||||
cp 7 * 7
|
||||
jr nc, .okay
|
||||
ld a, $7f
|
||||
.okay
|
||||
ld [hl], a
|
||||
ld bc, SCREEN_WIDTH
|
||||
add hl, bc
|
||||
inc d
|
||||
dec e
|
||||
jr nz, .loop3
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
|
||||
INCLUDE "engine/battle/decrement_pp.asm"
|
||||
|
||||
ModifyPikachuHappiness::
|
||||
ld a, d
|
||||
cp PIKAHAPPY_GYMLEADER
|
||||
jr z, .checkanywhereinparty
|
||||
cp PIKAHAPPY_WALKING
|
||||
jr z, .checkanywhereinparty
|
||||
push de
|
||||
callfar IsThisPartymonStarterPikachu_Party
|
||||
pop de
|
||||
ret nc
|
||||
jr .proceed
|
||||
|
||||
.checkanywhereinparty
|
||||
push de
|
||||
callfar IsStarterPikachuInOurParty
|
||||
pop de
|
||||
ret nc
|
||||
|
||||
.proceed
|
||||
push de
|
||||
; Divide [wPikachuHappiness] by 100. Hold the integer part in e.
|
||||
ld e, $0
|
||||
ld a, [wPikachuHappiness]
|
||||
cp 100
|
||||
jr c, .wPikachuHappiness_div_100
|
||||
inc e
|
||||
cp 200
|
||||
jr c, .wPikachuHappiness_div_100
|
||||
inc e
|
||||
.wPikachuHappiness_div_100
|
||||
; Get the (d, e) entry from HappinessChangeTable.
|
||||
ld c, d
|
||||
dec c
|
||||
ld b, $0
|
||||
ld hl, HappinessChangeTable
|
||||
add hl, bc
|
||||
add hl, bc
|
||||
add hl, bc
|
||||
ld d, $0
|
||||
add hl, de
|
||||
ld a, [hl]
|
||||
; If [hl] is positive, take min(0xff, [hl] + [wPikachuHappiness]).
|
||||
; If [hl] is negative, take max(0x00, [hl] + [wPikachuHappiness]).
|
||||
; Inexplicably, we're using 100 as the threshold for comparison.
|
||||
cp 100
|
||||
ld a, [wPikachuHappiness]
|
||||
jr nc, .negative
|
||||
add [hl]
|
||||
jr nc, .okay
|
||||
ld a, -1
|
||||
jr .okay
|
||||
|
||||
.negative
|
||||
add [hl]
|
||||
jr c, .okay
|
||||
xor a
|
||||
.okay
|
||||
ld [wPikachuHappiness], a
|
||||
|
||||
; Restore d and get the d'th entry in PikachuMoods.
|
||||
pop de
|
||||
dec d
|
||||
ld hl, PikachuMoods
|
||||
ld e, d
|
||||
ld d, $0
|
||||
add hl, de
|
||||
ld a, [hl]
|
||||
ld b, a
|
||||
; Modify Pikachu's mood
|
||||
cp $80
|
||||
jr z, .done
|
||||
ld a, [wPikachuMood]
|
||||
jr c, .decreased
|
||||
cp b
|
||||
jr nc, .done
|
||||
ld a, [wd49c]
|
||||
and a
|
||||
jr nz, .done
|
||||
jr .update_mood
|
||||
|
||||
.decreased
|
||||
cp b
|
||||
jr c, .done
|
||||
.update_mood
|
||||
ld a, b
|
||||
ld [wPikachuMood], a
|
||||
.done
|
||||
ret
|
||||
|
||||
HappinessChangeTable:
|
||||
; Increase
|
||||
db 5, 3, 2 ; Gained a level
|
||||
db 5, 3, 2 ; HP restore
|
||||
db 1, 1, 0 ; Used X item
|
||||
db 3, 2, 1 ; Challenged Gym Leader
|
||||
db 1, 1, 0 ; Teach TM/HM
|
||||
db 2, 1, 1 ; Walking around
|
||||
; Decrease
|
||||
db -3, -3, -5 ; Deposited
|
||||
db -1, -1, -1 ; Fainted in battle
|
||||
db -5, -5, -10 ; Fainted due to Poison outside of battle
|
||||
db -5, -5, -10 ; Fainted to opponent at least 30 levels higher
|
||||
db -10, -10, -20 ; Traded away
|
||||
|
||||
PikachuMoods:
|
||||
; Increase
|
||||
db $8a ; Gained a level
|
||||
db $83 ; HP restore
|
||||
db $80 ; Teach TM/HM
|
||||
db $80 ; Challenged Gym Leader
|
||||
db $94 ; Unknown (d = 5)
|
||||
db $80 ; Unknown (d = 6)
|
||||
; Decrease
|
||||
db $62 ; Deposited
|
||||
db $6c ; Fainted
|
||||
db $62 ; Unknown (d = 9)
|
||||
db $6c ; Unknown (d = 10)
|
||||
db $00 ; Unknown (d = 11)
|
||||
|
||||
RedPicBack: INCBIN "gfx/player/redb.pic"
|
||||
OldManPic: INCBIN "gfx/battle/oldman.pic"
|
||||
ProfOakPicBack: INCBIN "gfx/battle/prof.oakb.pic"
|
||||
|
||||
LoadYellowTitleScreenGFX:
|
||||
ld hl, PokemonLogoGraphics
|
||||
ld de, vChars2
|
||||
ld bc, 115 * $10
|
||||
ld a, BANK(PokemonLogoGraphics) ; redundant because this function is in bank3d
|
||||
call FarCopyData
|
||||
ld hl, YellowLogoGraphics + 35 * $10
|
||||
ld de, vChars0 + 253 * $10
|
||||
ld bc, 3 * $10
|
||||
ld a, BANK(YellowLogoGraphics)
|
||||
call FarCopyData
|
||||
ld hl, YellowLogoGraphics + 38 * $10
|
||||
ld de, vChars1
|
||||
ld bc, 64 * $10
|
||||
ld a, BANK(YellowLogoGraphics)
|
||||
call FarCopyData
|
||||
ld hl, YellowLogoGraphics + 102 * $10
|
||||
ld de, vChars0 + 240 * $10
|
||||
ld bc, 12 * $10
|
||||
ld a, BANK(YellowLogoGraphics)
|
||||
call FarCopyData
|
||||
ret
|
||||
|
||||
TitleScreen_PlacePokemonLogo:
|
||||
hlcoord 2, 1
|
||||
ld de, TitleScreenPokemonLogoTilemap
|
||||
lb bc, 7, 16
|
||||
call Bank3D_CopyBox
|
||||
ret
|
||||
|
||||
TitleScreen_PlacePikaSpeechBubble:
|
||||
hlcoord 6, 4
|
||||
ld de, TitleScreenPikaBubbleTilemap
|
||||
lb bc, 4, 7
|
||||
call Bank3D_CopyBox
|
||||
hlcoord 9, 8
|
||||
ld [hl], $64
|
||||
inc hl
|
||||
ld [hl], $65
|
||||
ret
|
||||
|
||||
TitleScreen_PlacePikachu:
|
||||
hlcoord 4, 8
|
||||
ld de, TitleScreenPikachuTilemap
|
||||
lb bc, 9, 12
|
||||
call Bank3D_CopyBox
|
||||
hlcoord 16, 10
|
||||
ld [hl], $96
|
||||
hlcoord 16, 11
|
||||
ld [hl], $9d
|
||||
hlcoord 16, 12
|
||||
ld [hl], $a7
|
||||
hlcoord 16, 13
|
||||
ld [hl], $b1
|
||||
ld hl, TitleScreenPikachuEyesOAMData
|
||||
ld de, wOAMBuffer
|
||||
ld bc, $20
|
||||
call CopyData
|
||||
ret
|
||||
|
||||
TitleScreenPikachuEyesOAMData:
|
||||
db $60, $40, $f1, $22
|
||||
db $60, $48, $f0, $22
|
||||
db $68, $40, $f3, $22
|
||||
db $68, $48, $f2, $22
|
||||
db $60, $60, $f0, $02
|
||||
db $60, $68, $f1, $02
|
||||
db $68, $60, $f2, $02
|
||||
db $68, $68, $f3, $02
|
||||
|
||||
Bank3D_CopyBox:
|
||||
; copy cxb (xy) screen area from de to hl
|
||||
.row
|
||||
push bc
|
||||
push hl
|
||||
.col
|
||||
ld a, [de]
|
||||
inc de
|
||||
ld [hli], a
|
||||
dec c
|
||||
jr nz, .col
|
||||
pop hl
|
||||
ld bc, SCREEN_WIDTH
|
||||
add hl, bc
|
||||
pop bc
|
||||
dec b
|
||||
jr nz, .row
|
||||
ret
|
||||
|
||||
TitleScreenPokemonLogoTilemap:
|
||||
; 16x7 (xy)
|
||||
db $f4, $f4, $f4, $f4, $f4, $f4, $49, $f4, $72, $30, $f4, $f4, $f4, $f4, $f4, $f4
|
||||
db $fd, $01, $02, $03, $04, $05, $06, $07, $08, $09, $0a, $0b, $f4, $0d, $0e, $0f
|
||||
db $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $1a, $1b, $1c, $1d, $1e, $1f
|
||||
db $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $2a, $2b, $2c, $2d, $2e, $2f
|
||||
db $f4, $31, $32, $33, $34, $35, $36, $37, $38, $39, $3a, $3b, $3c, $3d, $3e, $3f
|
||||
db $f4, $41, $42, $43, $44, $45, $46, $47, $48, $f4, $4a, $4b, $4c, $4d, $4e, $4f
|
||||
db $f4, $6a, $6b, $6c, $6d, $f4, $f4, $f4, $f4, $f4, $f4, $6e, $6f, $70, $71, $f4
|
||||
|
||||
Pointer_f4669:
|
||||
; Unreferenced
|
||||
db $47, $48, $49, $4a, $4b, $4c, $4d, $4e, $4f, $5f
|
||||
|
||||
TitleScreenPikaBubbleTilemap:
|
||||
; 7x4 (xy)
|
||||
db $24, $25, $66, $67, $68, $69, $2a
|
||||
db $50, $51, $52, $53, $54, $55, $56
|
||||
db $57, $58, $59, $5a, $5b, $5c, $5d
|
||||
db $6d, $5e, $5f, $60, $61, $62, $63
|
||||
|
||||
TitleScreenPikachuTilemap:
|
||||
; 12x9 (xy)
|
||||
db $80, $81, $82, $83, $00, $00, $00, $00, $84, $85, $86, $87
|
||||
db $88, $89, $8a, $8b, $8c, $8d, $8d, $8e, $8f, $8a, $90, $91
|
||||
db $00, $92, $93, $8a, $8a, $8a, $8a, $8a, $8a, $94, $95, $00
|
||||
db $00, $00, $97, $8a, $8a, $98, $99, $8a, $8a, $9a, $9b, $9c
|
||||
db $00, $00, $9e, $9f, $a0, $a1, $a2, $a3, $a4, $a5, $a6, $8a
|
||||
db $00, $a8, $a9, $aa, $8a, $ab, $ac, $8a, $ad, $ae, $af, $b0
|
||||
db $00, $b2, $b3, $b4, $8a, $8a, $8a, $8a, $b5, $b6, $b7, $b8
|
||||
db $00, $b9, $ba, $8a, $8a, $8a, $8a, $8a, $8a, $bb, $bc, $00
|
||||
db $00, $00, $bd, $8a, $8a, $8a, $8a, $8a, $8a, $be, $bf, $00
|
||||
|
||||
PokemonLogoGraphics: INCBIN "gfx/title/pokemon_logo.2bpp"
|
||||
PokemonLogoGraphicsEnd:
|
||||
YellowLogoGraphics: INCBIN "gfx/yellow_titlescreen.2bpp"
|
||||
YellowLogoGraphicsEnd:
|
||||
|
||||
INCLUDE "engine/menus/link_menu.asm"
|
||||
|
||||
HandleMenuInputDouble:
|
||||
xor a
|
||||
ld [wPartyMenuAnimMonEnabled], a
|
||||
|
||||
HandleMenuInputPokemonSelectionDouble:
|
||||
ldh a, [hDownArrowBlinkCount1]
|
||||
push af
|
||||
ldh a, [hDownArrowBlinkCount2]
|
||||
push af ; save existing values on stack
|
||||
xor a
|
||||
ldh [hDownArrowBlinkCount1], a ; blinking down arrow timing value 1
|
||||
ld a, $06
|
||||
ldh [hDownArrowBlinkCount2], a ; blinking down arrow timing value 2
|
||||
.loop1
|
||||
xor a
|
||||
ld [wAnimCounter], a ; counter for pokemon shaking animation
|
||||
call .UpdateCursorTile
|
||||
call JoypadLowSensitivity
|
||||
ldh a, [hJoy5]
|
||||
and a ; was a key pressed?
|
||||
jr nz, .keyPressed
|
||||
pop af
|
||||
ldh [hDownArrowBlinkCount2], a
|
||||
pop af
|
||||
ldh [hDownArrowBlinkCount1], a ; restore previous values
|
||||
xor a
|
||||
ld [wMenuWrappingEnabled], a ; disable menu wrapping
|
||||
ret
|
||||
.keyPressed
|
||||
xor a
|
||||
ld [wCheckFor180DegreeTurn], a
|
||||
ldh a, [hJoy5]
|
||||
ld b, a
|
||||
bit 6, a ; pressed Up key?
|
||||
jr z, .checkIfDownPressed
|
||||
.upPressed
|
||||
ld a, [wCurrentMenuItem] ; selected menu item
|
||||
and a ; already at the top of the menu?
|
||||
jr z, .checkOtherKeys
|
||||
.notAtTop
|
||||
dec a
|
||||
ld [wCurrentMenuItem], a ; move selected menu item up one space
|
||||
jr .checkOtherKeys
|
||||
.checkIfDownPressed
|
||||
bit 7, a
|
||||
jr z, .checkOtherKeys
|
||||
.downPressed
|
||||
ld a, [wCurrentMenuItem]
|
||||
inc a
|
||||
ld c, a
|
||||
ld a, [wMaxMenuItem]
|
||||
cp c
|
||||
jr c, .checkOtherKeys
|
||||
ld a, c
|
||||
ld [wCurrentMenuItem], a
|
||||
.checkOtherKeys
|
||||
ld a, [wMenuWatchedKeys]
|
||||
and b ; does the menu care about any of the pressed keys?
|
||||
jp z, .loop1
|
||||
.checkIfAButtonOrBButtonPressed
|
||||
ldh a, [hJoy5]
|
||||
and A_BUTTON | B_BUTTON
|
||||
jr z, .skipPlayingSound
|
||||
.AButtonOrBButtonPressed
|
||||
ld a, SFX_PRESS_AB
|
||||
call PlaySound ; play sound
|
||||
.skipPlayingSound
|
||||
pop af
|
||||
ldh [hDownArrowBlinkCount2], a
|
||||
pop af
|
||||
ldh [hDownArrowBlinkCount1], a ; restore previous values
|
||||
ldh a, [hJoy5]
|
||||
ret
|
||||
|
||||
.UpdateCursorTile:
|
||||
ld a, [wTopMenuItemY]
|
||||
and a
|
||||
jr z, .asm_f5ac0
|
||||
hlcoord 0, 0
|
||||
ld bc, SCREEN_WIDTH
|
||||
.loop
|
||||
add hl, bc
|
||||
dec a
|
||||
jr nz, .loop
|
||||
.asm_f5ac0
|
||||
ld a, [wTopMenuItemX]
|
||||
ld b, $0
|
||||
ld c, a
|
||||
add hl, bc
|
||||
push hl
|
||||
ld a, [wLastMenuItem]
|
||||
and a
|
||||
jr z, .asm_f5ad5
|
||||
ld bc, $28
|
||||
.loop2
|
||||
add hl, bc
|
||||
dec a
|
||||
jr nz, .loop2
|
||||
.asm_f5ad5
|
||||
ld a, [hl]
|
||||
cp "▶"
|
||||
jr nz, .asm_f5ade
|
||||
ld a, [wTileBehindCursor]
|
||||
ld [hl], a
|
||||
.asm_f5ade
|
||||
pop hl
|
||||
ld a, [wCurrentMenuItem]
|
||||
and a
|
||||
jr z, .asm_f5aec
|
||||
ld bc, $28
|
||||
.loop3
|
||||
add hl, bc
|
||||
dec a
|
||||
jr nz, .loop3
|
||||
.asm_f5aec
|
||||
ld a, [hl]
|
||||
cp "▶"
|
||||
jr z, .asm_f5af4
|
||||
ld [wTileBehindCursor], a
|
||||
.asm_f5af4
|
||||
ld a, "▶"
|
||||
ld [hl], a
|
||||
ld a, l
|
||||
ld [wMenuCursorLocation], a
|
||||
ld a, h
|
||||
ld [wMenuCursorLocation + 1], a
|
||||
ld a, [wCurrentMenuItem]
|
||||
ld [wLastMenuItem], a
|
||||
ret
|
||||
|
||||
INCLUDE "engine/overworld/field_move_messages.asm"
|
||||
|
||||
INCLUDE "engine/items/inventory.asm"
|
||||
|
||||
INCLUDE "gfx/trainer_card.asm"
|
||||
|
||||
ReadSuperRodData:
|
||||
ld a, [wCurMap]
|
||||
ld c, a
|
||||
ld hl, FishingSlots
|
||||
.loop
|
||||
ld a, [hli]
|
||||
cp $ff
|
||||
jr z, .notfound
|
||||
cp c
|
||||
jr z, .found
|
||||
ld de, $8
|
||||
add hl, de
|
||||
jr .loop
|
||||
.found
|
||||
call GenerateRandomFishingEncounter
|
||||
ret
|
||||
.notfound
|
||||
ld de, $0
|
||||
ret
|
||||
|
||||
GenerateRandomFishingEncounter:
|
||||
call Random
|
||||
cp $66
|
||||
jr c, .asm_f5ed6
|
||||
inc hl
|
||||
inc hl
|
||||
cp $b2
|
||||
jr c, .asm_f5ed6
|
||||
inc hl
|
||||
inc hl
|
||||
cp $e5
|
||||
jr c, .asm_f5ed6
|
||||
inc hl
|
||||
inc hl
|
||||
.asm_f5ed6
|
||||
ld e, [hl]
|
||||
inc hl
|
||||
ld d, [hl]
|
||||
ret
|
||||
|
||||
INCLUDE "data/wild/super_rod.asm"
|
||||
INCLUDE "engine/battle/bank3d_battle.asm"
|
||||
INCLUDE "engine/items/tm_prices.asm"
|
||||
INCLUDE "engine/math/multiply_divide.asm"
|
||||
INCLUDE "engine/events/give_pokemon.asm"
|
||||
INCLUDE "engine/battle/get_trainer_name.asm"
|
||||
INCLUDE "engine/math/random.asm"
|
||||
INCLUDE "engine/predefs.asm"
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
INCLUDE "engine/surfing_minigame.asm"
|
||||
INCLUDE "engine/yellow_intro.asm"
|
||||
INCLUDE "data/animated_objects_3e_2.asm"
|
||||
YellowIntroGraphics: INCBIN "gfx/yellow_intro.2bpp"
|
||||
INCLUDE "engine/animated_objects_3e.asm"
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
INCLUDE "data/maps/songs.asm"
|
||||
INCLUDE "data/maps/map_header_pointers.asm"
|
||||
INCLUDE "data/maps/map_header_banks.asm"
|
||||
INCLUDE "engine/pikachu_follow.asm"
|
||||
INCLUDE "engine/pikachu_status.asm"
|
||||
INCLUDE "engine/pikachu_emotions.asm"
|
||||
INCLUDE "engine/pikachu_movement.asm"
|
||||
INCLUDE "engine/pikachu_pic_animation.asm"
|
||||
|
||||
Func_fe66e:
|
||||
ret
|
||||
|
||||
OfficerJennySprite: INCBIN "gfx/sprites/officer_jenny.2bpp"
|
||||
PikachuSprite: INCBIN "gfx/sprites/pikachu.2bpp"
|
||||
SandshrewSprite: INCBIN "gfx/sprites/sandshrew.2bpp"
|
||||
OddishSprite: INCBIN "gfx/sprites/oddish.2bpp"
|
||||
BulbasaurSprite: INCBIN "gfx/sprites/bulbasaur.2bpp"
|
||||
JigglypuffSprite: INCBIN "gfx/sprites/jigglypuff.2bpp"
|
||||
ClefairySprite: INCBIN "gfx/sprites/clefairy.2bpp"
|
||||
ChanseySprite: INCBIN "gfx/sprites/chansey.2bpp"
|
||||
SurfingPikachuSprite:: INCBIN "gfx/sprites/surfing_pikachu.2bpp"
|
||||
JessieSprite: INCBIN "gfx/sprites/jessie.2bpp"
|
||||
JamesSprite: INCBIN "gfx/sprites/james.2bpp"
|
||||
|
|
@ -579,16 +579,16 @@ Func_78e98:
|
|||
xor a
|
||||
ldh [hAutoBGTransferEnabled], a
|
||||
call ClearScreen
|
||||
ld h, vBGMap0 / $100
|
||||
ld h, HIGH(vBGMap0)
|
||||
call WriteLowerByteOfBGMapAndEnableBGTransfer
|
||||
call Delay3
|
||||
xor a
|
||||
ldh [hAutoBGTransferEnabled], a
|
||||
call LoadScreenTilesFromBuffer2
|
||||
ld h, vBGMap1 / $100
|
||||
ld h, HIGH(vBGMap1)
|
||||
|
||||
WriteLowerByteOfBGMapAndEnableBGTransfer:
|
||||
ld l, vBGMap0 & $ff
|
||||
ld l, LOW(vBGMap0)
|
||||
call BattleAnimCopyTileMapToVRAM
|
||||
ld a, $1
|
||||
ldh [hAutoBGTransferEnabled], a
|
||||
|
|
|
|||
|
|
@ -280,13 +280,3 @@ CopyUncompressedPicToHL::
|
|||
dec b
|
||||
jr nz, .asm_f6227
|
||||
ret
|
||||
|
||||
INCLUDE "engine/battle/init_battle_variables.asm"
|
||||
INCLUDE "engine/battle/move_effects/focus_energy.asm"
|
||||
INCLUDE "engine/battle/move_effects/heal.asm"
|
||||
INCLUDE "engine/battle/move_effects/transform.asm"
|
||||
INCLUDE "engine/battle/move_effects/reflect_light_screen.asm"
|
||||
INCLUDE "engine/battle/move_effects/mist.asm"
|
||||
INCLUDE "engine/battle/move_effects/one_hit_ko.asm"
|
||||
INCLUDE "engine/battle/move_effects/pay_day.asm"
|
||||
INCLUDE "engine/battle/move_effects/paralyze.asm"
|
||||
47
engine/battle/pikachu_entrance_anim.asm
Normal file
47
engine/battle/pikachu_entrance_anim.asm
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
StarterPikachuBattleEntranceAnimation:
|
||||
hlcoord 0, 5
|
||||
ld c, 0
|
||||
.loop1
|
||||
inc c
|
||||
ld a, c
|
||||
cp 9
|
||||
ret z
|
||||
ld d, 7 * 13
|
||||
push bc
|
||||
push hl
|
||||
.loop2
|
||||
call .PlaceColumn
|
||||
dec hl
|
||||
ld a, d
|
||||
sub 7
|
||||
ld d, a
|
||||
dec c
|
||||
jr nz, .loop2
|
||||
ld c, 2
|
||||
call DelayFrames
|
||||
pop hl
|
||||
pop bc
|
||||
inc hl
|
||||
jr .loop1
|
||||
|
||||
.PlaceColumn:
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
ld e, 7
|
||||
.loop3
|
||||
ld a, d
|
||||
cp 7 * 7
|
||||
jr nc, .okay
|
||||
ld a, $7f
|
||||
.okay
|
||||
ld [hl], a
|
||||
ld bc, SCREEN_WIDTH
|
||||
add hl, bc
|
||||
inc d
|
||||
dec e
|
||||
jr nz, .loop3
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
|
|
@ -166,3 +166,6 @@ Func_e9beb:
|
|||
dec c
|
||||
jr nz, .asm_e9bed
|
||||
ret
|
||||
|
||||
SurfingPikachu3Graphics: INCBIN "gfx/surfing_pikachu/surfing_pikachu_3.2bpp"
|
||||
SurfingPikachu3GraphicsEnd:
|
||||
0
engine/vermilion_gym_trash_cans.asm → engine/events/hidden_objects/vermilion_gym_trash2.asm
Executable file → Normal file
0
engine/vermilion_gym_trash_cans.asm → engine/events/hidden_objects/vermilion_gym_trash2.asm
Executable file → Normal file
118
engine/events/pikachu_happiness.asm
Normal file
118
engine/events/pikachu_happiness.asm
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
ModifyPikachuHappiness::
|
||||
ld a, d
|
||||
cp PIKAHAPPY_GYMLEADER
|
||||
jr z, .checkanywhereinparty
|
||||
cp PIKAHAPPY_WALKING
|
||||
jr z, .checkanywhereinparty
|
||||
push de
|
||||
callfar IsThisPartymonStarterPikachu_Party
|
||||
pop de
|
||||
ret nc
|
||||
jr .proceed
|
||||
|
||||
.checkanywhereinparty
|
||||
push de
|
||||
callfar IsStarterPikachuInOurParty
|
||||
pop de
|
||||
ret nc
|
||||
|
||||
.proceed
|
||||
push de
|
||||
; Divide [wPikachuHappiness] by 100. Hold the integer part in e.
|
||||
ld e, $0
|
||||
ld a, [wPikachuHappiness]
|
||||
cp 100
|
||||
jr c, .wPikachuHappiness_div_100
|
||||
inc e
|
||||
cp 200
|
||||
jr c, .wPikachuHappiness_div_100
|
||||
inc e
|
||||
.wPikachuHappiness_div_100
|
||||
; Get the (d, e) entry from HappinessChangeTable.
|
||||
ld c, d
|
||||
dec c
|
||||
ld b, $0
|
||||
ld hl, HappinessChangeTable
|
||||
add hl, bc
|
||||
add hl, bc
|
||||
add hl, bc
|
||||
ld d, $0
|
||||
add hl, de
|
||||
ld a, [hl]
|
||||
; If [hl] is positive, take min(0xff, [hl] + [wPikachuHappiness]).
|
||||
; If [hl] is negative, take max(0x00, [hl] + [wPikachuHappiness]).
|
||||
; Inexplicably, we're using 100 as the threshold for comparison.
|
||||
cp 100
|
||||
ld a, [wPikachuHappiness]
|
||||
jr nc, .negative
|
||||
add [hl]
|
||||
jr nc, .okay
|
||||
ld a, -1
|
||||
jr .okay
|
||||
|
||||
.negative
|
||||
add [hl]
|
||||
jr c, .okay
|
||||
xor a
|
||||
.okay
|
||||
ld [wPikachuHappiness], a
|
||||
|
||||
; Restore d and get the d'th entry in PikachuMoods.
|
||||
pop de
|
||||
dec d
|
||||
ld hl, PikachuMoods
|
||||
ld e, d
|
||||
ld d, $0
|
||||
add hl, de
|
||||
ld a, [hl]
|
||||
ld b, a
|
||||
; Modify Pikachu's mood
|
||||
cp $80
|
||||
jr z, .done
|
||||
ld a, [wPikachuMood]
|
||||
jr c, .decreased
|
||||
cp b
|
||||
jr nc, .done
|
||||
ld a, [wd49c]
|
||||
and a
|
||||
jr nz, .done
|
||||
jr .update_mood
|
||||
|
||||
.decreased
|
||||
cp b
|
||||
jr c, .done
|
||||
.update_mood
|
||||
ld a, b
|
||||
ld [wPikachuMood], a
|
||||
.done
|
||||
ret
|
||||
|
||||
HappinessChangeTable:
|
||||
; Increase
|
||||
db 5, 3, 2 ; Gained a level
|
||||
db 5, 3, 2 ; HP restore
|
||||
db 1, 1, 0 ; Used X item
|
||||
db 3, 2, 1 ; Challenged Gym Leader
|
||||
db 1, 1, 0 ; Teach TM/HM
|
||||
db 2, 1, 1 ; Walking around
|
||||
; Decrease
|
||||
db -3, -3, -5 ; Deposited
|
||||
db -1, -1, -1 ; Fainted in battle
|
||||
db -5, -5, -10 ; Fainted due to Poison outside of battle
|
||||
db -5, -5, -10 ; Fainted to opponent at least 30 levels higher
|
||||
db -10, -10, -20 ; Traded away
|
||||
|
||||
PikachuMoods:
|
||||
; Increase
|
||||
db $8a ; Gained a level
|
||||
db $83 ; HP restore
|
||||
db $80 ; Teach TM/HM
|
||||
db $80 ; Challenged Gym Leader
|
||||
db $94 ; Unknown (d = 5)
|
||||
db $80 ; Unknown (d = 6)
|
||||
; Decrease
|
||||
db $62 ; Deposited
|
||||
db $6c ; Fainted
|
||||
db $62 ; Unknown (d = 9)
|
||||
db $6c ; Unknown (d = 10)
|
||||
db $00 ; Unknown (d = 11)
|
||||
11
engine/events/pokecenter_chansey.asm
Normal file
11
engine/events/pokecenter_chansey.asm
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
PokecenterChanseyText::
|
||||
ld hl, NurseChanseyText
|
||||
call PrintText
|
||||
ld a, CHANSEY
|
||||
call PlayCry
|
||||
call WaitForSoundToFinish
|
||||
ret
|
||||
|
||||
NurseChanseyText:
|
||||
text_far _NurseChanseyText
|
||||
text_end
|
||||
27
engine/events/try_pikachu_movement.asm
Normal file
27
engine/events/try_pikachu_movement.asm
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
TryApplyPikachuMovementData::
|
||||
ld a, [wd472]
|
||||
bit 7, a
|
||||
ret z
|
||||
ld a, [wWalkBikeSurfState]
|
||||
and a
|
||||
ret nz
|
||||
push hl
|
||||
push bc
|
||||
callfar 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
|
||||
callfar LoadPikachuShadowIntoVRAM
|
||||
pop af
|
||||
ld [wUpdateSpritesEnabled], a
|
||||
pop hl
|
||||
call ApplyPikachuMovementData
|
||||
callfar RefreshPikachuFollow
|
||||
ret
|
||||
|
|
@ -28,10 +28,10 @@ RunObjectAnimations:
|
|||
jr nz, .loop
|
||||
ld a, [wCurrentAnimatedObjectOAMBufferOffset]
|
||||
ld l, a
|
||||
ld h, wOAMBuffer / $100
|
||||
ld h, HIGH(wOAMBuffer)
|
||||
.deinit_unused_oam_loop
|
||||
ld a, l
|
||||
cp wOAMBufferEnd % $100
|
||||
cp LOW(wOAMBufferEnd)
|
||||
jr nc, .quit
|
||||
xor a
|
||||
ld [hli], a
|
||||
|
|
@ -158,7 +158,7 @@ UpdateCurrentAnimatedObjectFrame:
|
|||
push bc
|
||||
ld a, [wCurrentAnimatedObjectOAMBufferOffset]
|
||||
ld e, a
|
||||
ld d, wOAMBuffer / $100
|
||||
ld d, HIGH(wOAMBuffer)
|
||||
ld a, [hli]
|
||||
ld c, a
|
||||
.loop
|
||||
|
|
@ -205,7 +205,7 @@ UpdateCurrentAnimatedObjectFrame:
|
|||
inc de
|
||||
ld a, e
|
||||
ld [wCurrentAnimatedObjectOAMBufferOffset], a
|
||||
cp wOAMBufferEnd % $100
|
||||
cp LOW(wOAMBufferEnd)
|
||||
jr nc, .oam_is_full
|
||||
dec c
|
||||
jr nz, .loop
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
INCLUDE "data/bg_map_attributes.asm"
|
||||
INCLUDE "data/cgb/bg_map_attributes.asm"
|
||||
|
||||
LoadBGMapAttributes::
|
||||
ld hl, BGMapAttributesPointers
|
||||
|
|
@ -195,9 +195,9 @@ HandlePartyHPBarAttributes:
|
|||
push hl
|
||||
ld a, [de]
|
||||
and $3 ; 4 possible palettes
|
||||
rept 7 ; hp bar length in tiles
|
||||
REPT 7 ; hp bar length in tiles
|
||||
ld [hli], a
|
||||
endr
|
||||
ENDR
|
||||
pop hl
|
||||
ld bc, $40 ; get 2nd party location
|
||||
add hl, bc
|
||||
|
|
@ -752,7 +752,7 @@ index = 0
|
|||
ld a, [hli]
|
||||
inc hl
|
||||
|
||||
IF index < (NUM_ACTIVE_PALS + -1)
|
||||
IF index < NUM_ACTIVE_PALS - 1
|
||||
push hl
|
||||
ENDC
|
||||
|
||||
|
|
@ -823,7 +823,7 @@ DMGPalToGBCPal::
|
|||
ld [wLastOBP1], a
|
||||
.convert
|
||||
color_index = 0
|
||||
REPT NUM_COLORS
|
||||
REPT NUM_PAL_COLORS
|
||||
ld b, a
|
||||
and %11
|
||||
call .GetColorAddress
|
||||
|
|
@ -832,7 +832,7 @@ color_index = 0
|
|||
ld a, [hl]
|
||||
ld [wGBCPal + color_index * 2 + 1], a
|
||||
|
||||
IF color_index < (NUM_COLORS + -1)
|
||||
IF color_index < NUM_PAL_COLORS - 1
|
||||
ld a, b
|
||||
rrca
|
||||
rrca
|
||||
|
|
@ -863,14 +863,14 @@ TransferCurBGPData::
|
|||
ldh a, [rLCDC]
|
||||
and rLCDC_ENABLE_MASK
|
||||
jr nz, .lcdEnabled
|
||||
rept NUM_COLORS
|
||||
call TransferPalColorLCDDisabled
|
||||
endr
|
||||
REPT NUM_PAL_COLORS
|
||||
call TransferPalColorLCDDisabled
|
||||
ENDR
|
||||
jr .done
|
||||
.lcdEnabled
|
||||
rept NUM_COLORS
|
||||
call TransferPalColorLCDEnabled
|
||||
endr
|
||||
REPT NUM_PAL_COLORS
|
||||
call TransferPalColorLCDEnabled
|
||||
ENDR
|
||||
.done
|
||||
pop de
|
||||
ret
|
||||
|
|
@ -887,7 +887,7 @@ BufferBGPPal::
|
|||
ld de, wBGPPalsBuffer
|
||||
add hl, de
|
||||
ld de, wGBCPal
|
||||
ld c, PAL_SIZE
|
||||
ld c, PALETTE_SIZE
|
||||
.loop
|
||||
ld a, [de]
|
||||
ld [hli], a
|
||||
|
|
@ -918,7 +918,7 @@ TransferBGPPals::
|
|||
ldh [rBGPI], a
|
||||
ld de, rBGPD
|
||||
ld hl, wBGPPalsBuffer
|
||||
ld c, 4 * PAL_SIZE
|
||||
ld c, 4 * PALETTE_SIZE
|
||||
.loop
|
||||
ld a, [hli]
|
||||
ld [de], a
|
||||
|
|
@ -939,14 +939,14 @@ TransferCurOBPData:
|
|||
ldh a, [rLCDC]
|
||||
and rLCDC_ENABLE_MASK
|
||||
jr nz, .lcdEnabled
|
||||
rept NUM_COLORS
|
||||
call TransferPalColorLCDDisabled
|
||||
endr
|
||||
REPT NUM_PAL_COLORS
|
||||
call TransferPalColorLCDDisabled
|
||||
ENDR
|
||||
jr .done
|
||||
.lcdEnabled
|
||||
rept NUM_COLORS
|
||||
call TransferPalColorLCDEnabled
|
||||
endr
|
||||
REPT NUM_PAL_COLORS
|
||||
call TransferPalColorLCDEnabled
|
||||
ENDR
|
||||
.done
|
||||
pop de
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ PrepareOAMData::
|
|||
cp c
|
||||
ret nc
|
||||
ld l, a
|
||||
ld h, wOAMBuffer / $100
|
||||
ld h, HIGH(wOAMBuffer)
|
||||
ld a, c
|
||||
ld de, $4 ; entry size
|
||||
ld b, $a0
|
||||
|
|
|
|||
|
|
@ -1037,7 +1037,7 @@ ItemUseMedicine:
|
|||
push hl
|
||||
push de
|
||||
push bc
|
||||
callfar Func_2fd6a
|
||||
callfar RespawnOverworldPikachu
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
|
|
@ -1542,7 +1542,7 @@ ItemUseMedicine:
|
|||
push af
|
||||
ld a, [wUsedItemOnWhichPokemon]
|
||||
ld [wWhichPokemon], a
|
||||
callfar Func_2fd6a ; evolve pokemon, if appropriate
|
||||
callfar RespawnOverworldPikachu ; evolve pokemon, if appropriate
|
||||
pop af
|
||||
ld [wWhichPokemon], a
|
||||
|
||||
|
|
|
|||
41
engine/items/super_rod.asm
Normal file
41
engine/items/super_rod.asm
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
ReadSuperRodData:
|
||||
ld a, [wCurMap]
|
||||
ld c, a
|
||||
ld hl, SuperRodFishingSlots
|
||||
.loop
|
||||
ld a, [hli]
|
||||
cp $ff
|
||||
jr z, .notfound
|
||||
cp c
|
||||
jr z, .found
|
||||
ld de, $8
|
||||
add hl, de
|
||||
jr .loop
|
||||
.found
|
||||
call GenerateRandomFishingEncounter
|
||||
ret
|
||||
.notfound
|
||||
ld de, $0
|
||||
ret
|
||||
|
||||
GenerateRandomFishingEncounter:
|
||||
call Random
|
||||
cp $66
|
||||
jr c, .asm_f5ed6
|
||||
inc hl
|
||||
inc hl
|
||||
cp $b2
|
||||
jr c, .asm_f5ed6
|
||||
inc hl
|
||||
inc hl
|
||||
cp $e5
|
||||
jr c, .asm_f5ed6
|
||||
inc hl
|
||||
inc hl
|
||||
.asm_f5ed6
|
||||
ld e, [hl]
|
||||
inc hl
|
||||
ld d, [hl]
|
||||
ret
|
||||
|
||||
INCLUDE "data/wild/super_rod.asm"
|
||||
|
|
@ -49,8 +49,7 @@ DrawBadges:
|
|||
|
||||
hlcoord 2, 14
|
||||
ld de, wTempObtainedBadgesBooleans + 4
|
||||
; call .DrawBadgeRow
|
||||
; ret
|
||||
; fallthrough
|
||||
|
||||
.DrawBadgeRow
|
||||
; Draw 4 badges.
|
||||
|
|
|
|||
|
|
@ -324,10 +324,11 @@ StartMenu_Item::
|
|||
call PrintText
|
||||
jr .exitMenu
|
||||
.notInCableClubRoom
|
||||
; store item bag pointer in wListPointer (for DisplayListMenuID)
|
||||
ld hl, wListPointer
|
||||
ld [hl], wNumBagItems & $ff
|
||||
ld [hl], LOW(wNumBagItems)
|
||||
inc hl
|
||||
ld [hl], wNumBagItems / $100 ; store item bag pointer in wListPointer (for DisplayListMenuID)
|
||||
ld [hl], HIGH(wNumBagItems)
|
||||
xor a
|
||||
ld [wPrintItemPrices], a
|
||||
ld a, ITEMLISTMENU
|
||||
|
|
|
|||
129
engine/menus/unused_input.asm
Normal file
129
engine/menus/unused_input.asm
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
HandleMenuInputDuplicate: ; unreferenced
|
||||
xor a
|
||||
ld [wPartyMenuAnimMonEnabled], a
|
||||
|
||||
HandleMenuInputPokemonSelectionDuplicate: ; unreferenced
|
||||
ldh a, [hDownArrowBlinkCount1]
|
||||
push af
|
||||
ldh a, [hDownArrowBlinkCount2]
|
||||
push af ; save existing values on stack
|
||||
xor a
|
||||
ldh [hDownArrowBlinkCount1], a ; blinking down arrow timing value 1
|
||||
ld a, 6
|
||||
ldh [hDownArrowBlinkCount2], a ; blinking down arrow timing value 2
|
||||
.loop1
|
||||
xor a
|
||||
ld [wAnimCounter], a ; counter for pokemon shaking animation
|
||||
call PlaceMenuCursorDuplicate
|
||||
call JoypadLowSensitivity
|
||||
ldh a, [hJoy5]
|
||||
and a ; was a key pressed?
|
||||
jr nz, .keyPressed
|
||||
pop af
|
||||
ldh [hDownArrowBlinkCount2], a
|
||||
pop af
|
||||
ldh [hDownArrowBlinkCount1], a ; restore previous values
|
||||
xor a
|
||||
ld [wMenuWrappingEnabled], a ; disable menu wrapping
|
||||
ret
|
||||
.keyPressed
|
||||
xor a
|
||||
ld [wCheckFor180DegreeTurn], a
|
||||
ldh a, [hJoy5]
|
||||
ld b, a
|
||||
bit 6, a ; pressed Up key?
|
||||
jr z, .checkIfDownPressed
|
||||
.upPressed
|
||||
ld a, [wCurrentMenuItem] ; selected menu item
|
||||
and a ; already at the top of the menu?
|
||||
jr z, .checkOtherKeys
|
||||
.notAtTop
|
||||
dec a
|
||||
ld [wCurrentMenuItem], a ; move selected menu item up one space
|
||||
jr .checkOtherKeys
|
||||
.checkIfDownPressed
|
||||
bit 7, a
|
||||
jr z, .checkOtherKeys
|
||||
.downPressed
|
||||
ld a, [wCurrentMenuItem]
|
||||
inc a
|
||||
ld c, a
|
||||
ld a, [wMaxMenuItem]
|
||||
cp c
|
||||
jr c, .checkOtherKeys
|
||||
ld a, c
|
||||
ld [wCurrentMenuItem], a
|
||||
.checkOtherKeys
|
||||
ld a, [wMenuWatchedKeys]
|
||||
and b ; does the menu care about any of the pressed keys?
|
||||
jp z, .loop1
|
||||
.checkIfAButtonOrBButtonPressed
|
||||
ldh a, [hJoy5]
|
||||
and A_BUTTON | B_BUTTON
|
||||
jr z, .skipPlayingSound
|
||||
.AButtonOrBButtonPressed
|
||||
ld a, SFX_PRESS_AB
|
||||
call PlaySound ; play sound
|
||||
.skipPlayingSound
|
||||
pop af
|
||||
ldh [hDownArrowBlinkCount2], a
|
||||
pop af
|
||||
ldh [hDownArrowBlinkCount1], a ; restore previous values
|
||||
ldh a, [hJoy5]
|
||||
ret
|
||||
|
||||
PlaceMenuCursorDuplicate:
|
||||
ld a, [wTopMenuItemY]
|
||||
and a
|
||||
jr z, .asm_f5ac0
|
||||
hlcoord 0, 0
|
||||
ld bc, SCREEN_WIDTH
|
||||
.loop
|
||||
add hl, bc
|
||||
dec a
|
||||
jr nz, .loop
|
||||
.asm_f5ac0
|
||||
ld a, [wTopMenuItemX]
|
||||
ld b, $0
|
||||
ld c, a
|
||||
add hl, bc
|
||||
push hl
|
||||
ld a, [wLastMenuItem]
|
||||
and a
|
||||
jr z, .asm_f5ad5
|
||||
ld bc, $28
|
||||
.loop2
|
||||
add hl, bc
|
||||
dec a
|
||||
jr nz, .loop2
|
||||
.asm_f5ad5
|
||||
ld a, [hl]
|
||||
cp "▶"
|
||||
jr nz, .asm_f5ade
|
||||
ld a, [wTileBehindCursor]
|
||||
ld [hl], a
|
||||
.asm_f5ade
|
||||
pop hl
|
||||
ld a, [wCurrentMenuItem]
|
||||
and a
|
||||
jr z, .asm_f5aec
|
||||
ld bc, $28
|
||||
.loop3
|
||||
add hl, bc
|
||||
dec a
|
||||
jr nz, .loop3
|
||||
.asm_f5aec
|
||||
ld a, [hl]
|
||||
cp "▶"
|
||||
jr z, .asm_f5af4
|
||||
ld [wTileBehindCursor], a
|
||||
.asm_f5af4
|
||||
ld a, "▶"
|
||||
ld [hl], a
|
||||
ld a, l
|
||||
ld [wMenuCursorLocation], a
|
||||
ld a, h
|
||||
ld [wMenuCursorLocation + 1], a
|
||||
ld a, [wCurrentMenuItem]
|
||||
ld [wLastMenuItem], a
|
||||
ret
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
SurfingPikachuMinigame:
|
||||
SurfingPikachuMinigame::
|
||||
call SurfingPikachuMinigame_BlankPals
|
||||
call DelayFrame
|
||||
call DelayFrame
|
||||
|
|
@ -190,33 +190,33 @@ SurfingPikachuMinigame_LoadGFXAndLayout:
|
|||
ld a, BANK(SurfingPikachu1Graphics2)
|
||||
call FarCopyData
|
||||
|
||||
ld a, SurfingPikachuSpawnStateDataPointer % $100
|
||||
ld a, LOW(SurfingPikachuSpawnStateDataPointer)
|
||||
ld [wAnimatedObjectSpawnStateDataPointer], a
|
||||
ld a, SurfingPikachuSpawnStateDataPointer / $100
|
||||
ld a, HIGH(SurfingPikachuSpawnStateDataPointer)
|
||||
ld [wAnimatedObjectSpawnStateDataPointer + 1], a
|
||||
|
||||
ld a, SurfingPikachuObjectJumptable % $100
|
||||
ld a, LOW(SurfingPikachuObjectJumptable)
|
||||
ld [wAnimatedObjectJumptablePointer], a
|
||||
ld a, SurfingPikachuObjectJumptable / $100
|
||||
ld a, HIGH(SurfingPikachuObjectJumptable)
|
||||
ld [wAnimatedObjectJumptablePointer + 1], a
|
||||
|
||||
ld a, SurfingPikachuOAMData % $100
|
||||
ld a, LOW(SurfingPikachuOAMData)
|
||||
ld [wAnimatedObjectOAMDataPointer], a
|
||||
ld a, SurfingPikachuOAMData / $100
|
||||
ld a, HIGH(SurfingPikachuOAMData)
|
||||
ld [wAnimatedObjectOAMDataPointer + 1], a
|
||||
|
||||
ld a, SurfingPikachuFrames % $100
|
||||
ld a, LOW(SurfingPikachuFrames)
|
||||
ld [wAnimatedObjectFramesDataPointer], a
|
||||
ld a, SurfingPikachuFrames / $100
|
||||
ld a, HIGH(SurfingPikachuFrames)
|
||||
ld [wAnimatedObjectFramesDataPointer + 1], a
|
||||
|
||||
ld hl, vBGMap0
|
||||
ld bc, $800
|
||||
ld bc, $80 tiles
|
||||
ld a, $0
|
||||
call FillMemory
|
||||
|
||||
ld hl, $98c0
|
||||
ld bc, $180
|
||||
ld bc, $18 tiles
|
||||
ld a, $b
|
||||
call FillMemory
|
||||
|
||||
|
|
@ -1470,7 +1470,7 @@ SurfingMinigame_DrawResultsScreen:
|
|||
ret
|
||||
|
||||
.BeachTilemap:
|
||||
INCBIN "gfx/unknown_f8946.map"
|
||||
INCBIN "gfx/surfing_pikachu/unknown_f8946.map"
|
||||
.BeachTilemapEnd:
|
||||
|
||||
.PlaceTextbox:
|
||||
|
|
@ -2337,21 +2337,21 @@ SurfingPikachuMinigameIntro:
|
|||
ld bc, $900
|
||||
ld a, BANK(SurfingPikachu1Graphics3)
|
||||
call FarCopyData
|
||||
ld a, SurfingPikachuSpawnStateDataPointer % $100
|
||||
ld a, LOW(SurfingPikachuSpawnStateDataPointer)
|
||||
ld [wAnimatedObjectSpawnStateDataPointer], a
|
||||
ld a, SurfingPikachuSpawnStateDataPointer / $100
|
||||
ld a, HIGH(SurfingPikachuSpawnStateDataPointer)
|
||||
ld [wAnimatedObjectSpawnStateDataPointer + 1], a
|
||||
ld a, SurfingPikachuObjectJumptable % $100
|
||||
ld a, LOW(SurfingPikachuObjectJumptable)
|
||||
ld [wAnimatedObjectJumptablePointer], a
|
||||
ld a, SurfingPikachuObjectJumptable / $100
|
||||
ld a, HIGH(SurfingPikachuObjectJumptable)
|
||||
ld [wAnimatedObjectJumptablePointer + 1], a
|
||||
ld a, SurfingPikachuOAMData % $100
|
||||
ld a, LOW(SurfingPikachuOAMData)
|
||||
ld [wAnimatedObjectOAMDataPointer], a
|
||||
ld a, SurfingPikachuOAMData / $100
|
||||
ld a, HIGH(SurfingPikachuOAMData)
|
||||
ld [wAnimatedObjectOAMDataPointer + 1], a
|
||||
ld a, SurfingPikachuFrames % $100
|
||||
ld a, LOW(SurfingPikachuFrames)
|
||||
ld [wAnimatedObjectFramesDataPointer], a
|
||||
ld a, SurfingPikachuFrames / $100
|
||||
ld a, HIGH(SurfingPikachuFrames)
|
||||
ld [wAnimatedObjectFramesDataPointer + 1], a
|
||||
ld a, $c
|
||||
lb de, $74, $58
|
||||
|
|
@ -2455,10 +2455,10 @@ DrawSurfingPikachuMinigameIntroBackground:
|
|||
jr nz, .fill_row
|
||||
ret
|
||||
|
||||
Tilemap_f90bc: INCBIN "gfx/unknown_f90bc.map"
|
||||
Tilemap_f91ac: INCBIN "gfx/unknown_f91ac.map"
|
||||
Tilemap_f91bb: INCBIN "gfx/unknown_f91bb.map"
|
||||
Tilemap_f91c8: INCBIN "gfx/unknown_f91c8.map"
|
||||
Tilemap_f90bc: INCBIN "gfx/surfing_pikachu/unknown_f90bc.map"
|
||||
Tilemap_f91ac: INCBIN "gfx/surfing_pikachu/unknown_f91ac.map"
|
||||
Tilemap_f91bb: INCBIN "gfx/surfing_pikachu/unknown_f91bb.map"
|
||||
Tilemap_f91c8: INCBIN "gfx/surfing_pikachu/unknown_f91c8.map"
|
||||
|
||||
SurfingMinigame_UpdateLYOverrides:
|
||||
ld hl, wLYOverrides + $10
|
||||
|
|
@ -2767,7 +2767,8 @@ SurfingPikachuObjectJumptable:
|
|||
SurfingMinigameAnimatedObjectFn_nop:
|
||||
ret
|
||||
|
||||
INCLUDE "data/animated_objects_3e_1.asm"
|
||||
INCLUDE "data/sprite_anims/surfing_pikachu_frames.asm"
|
||||
INCLUDE "data/sprite_anims/surfing_pikachu_oam.asm"
|
||||
|
||||
SurfingMinigame_LYOverridesInitialSineWave:
|
||||
; a sine wave with amplitude 2
|
||||
|
|
@ -323,7 +323,7 @@ YellowIntroScene6:
|
|||
call YellowIntro_BlankPalsDelay2AndDisableLCD
|
||||
ld c, $5
|
||||
call UpdateMusicCTimes
|
||||
ld a, rSCY - $ff00
|
||||
ld a, LOW(rSCY)
|
||||
ldh [hLCDCPointer], a
|
||||
call YellowIntro_Copy8BitSineWave
|
||||
ld hl, vBGMap0
|
||||
|
|
@ -456,9 +456,9 @@ YellowIntroScene10:
|
|||
jr nz, .fill_row
|
||||
ret
|
||||
|
||||
Unkn_f9b6e: INCBIN "gfx/unknown_f9b6e.map"
|
||||
Unkn_f9be6: INCBIN "gfx/unknown_f9be6.map"
|
||||
Unkn_f9bf2: INCBIN "gfx/unknown_f9bf2.map"
|
||||
Unkn_f9b6e: INCBIN "gfx/intro/unknown_f9b6e.map"
|
||||
Unkn_f9be6: INCBIN "gfx/intro/unknown_f9be6.map"
|
||||
Unkn_f9bf2: INCBIN "gfx/intro/unknown_f9bf2.map"
|
||||
|
||||
YellowIntroScene11:
|
||||
call YellowIntro_CheckFrameTimerDecrement
|
||||
|
|
@ -473,7 +473,7 @@ YellowIntroScene11:
|
|||
sla a
|
||||
ld e, a
|
||||
ld d, $0
|
||||
ld hl, YellowIntroCloudGFX1
|
||||
ld hl, YellowIntroCloudGFX
|
||||
add hl, de
|
||||
ld a, l
|
||||
ldh [hVBlankCopySource], a
|
||||
|
|
@ -492,8 +492,7 @@ YellowIntroScene11:
|
|||
call YellowIntro_NextScene
|
||||
ret
|
||||
|
||||
YellowIntroCloudGFX1: INCBIN "gfx/unknown_f9c2c.2bpp"
|
||||
YellowIntroCloudGFX2: INCBIN "gfx/unknown_f9c6c.2bpp" ; indirectly referenced
|
||||
YellowIntroCloudGFX: INCBIN "gfx/intro/clouds.2bpp"
|
||||
|
||||
YellowIntroScene12:
|
||||
call YellowIntro_BlankPalsDelay2AndDisableLCD
|
||||
|
|
@ -799,11 +798,11 @@ YellowIntro_Copy8BitSineWave:
|
|||
Request7TileTransferFromC810ToC710:
|
||||
ld a, $10
|
||||
ldh [hVBlankCopySource], a
|
||||
ld a, wLYOverridesBuffer / $100
|
||||
ld a, HIGH(wLYOverridesBuffer)
|
||||
ldh [hVBlankCopySource + 1], a
|
||||
ld a, $10
|
||||
ldh [hVBlankCopyDest], a
|
||||
ld a, wLYOverrides / $100
|
||||
ld a, HIGH(wLYOverrides)
|
||||
ldh [hVBlankCopyDest + 1], a
|
||||
ld a, $7
|
||||
ldh [hVBlankCopySize], a
|
||||
|
|
@ -833,13 +832,13 @@ InitYellowIntroGFXAndMusic:
|
|||
call DelayFrame
|
||||
xor a
|
||||
ldh [hAutoBGTransferEnabled], a
|
||||
ld de, $6b5a
|
||||
ld hl, $8000
|
||||
ld bc, $3eff
|
||||
ld de, YellowIntroGraphics2
|
||||
ld hl, vChars0
|
||||
lb bc, BANK(YellowIntroGraphics2), (YellowIntroGraphics2End - YellowIntroGraphics2 - $10) / $10
|
||||
call CopyVideoData
|
||||
ld de, $635a
|
||||
ld hl, $9000
|
||||
ld bc, $3e80
|
||||
ld de, YellowIntroGraphics1
|
||||
ld hl, vChars2
|
||||
lb bc, BANK(YellowIntroGraphics1), (YellowIntroGraphics1End - YellowIntroGraphics1) / $10
|
||||
call CopyVideoData
|
||||
call ClearObjectAnimationBuffers
|
||||
call LoadYellowIntroObjectAnimationDataPointers
|
||||
|
|
@ -857,21 +856,21 @@ InitYellowIntroGFXAndMusic:
|
|||
ret
|
||||
|
||||
LoadYellowIntroObjectAnimationDataPointers:
|
||||
ld a, YellowIntro_AnimatedObjectSpawnStateData % $100
|
||||
ld a, LOW(YellowIntro_AnimatedObjectSpawnStateData)
|
||||
ld [wAnimatedObjectSpawnStateDataPointer], a
|
||||
ld a, YellowIntro_AnimatedObjectSpawnStateData / $100
|
||||
ld a, HIGH(YellowIntro_AnimatedObjectSpawnStateData)
|
||||
ld [wAnimatedObjectSpawnStateDataPointer + 1], a
|
||||
ld a, YellowIntro_AnimatedObjectJumptable % $100
|
||||
ld a, LOW(YellowIntro_AnimatedObjectJumptable)
|
||||
ld [wAnimatedObjectJumptablePointer], a
|
||||
ld a, YellowIntro_AnimatedObjectJumptable / $100
|
||||
ld a, HIGH(YellowIntro_AnimatedObjectJumptable)
|
||||
ld [wAnimatedObjectJumptablePointer + 1], a
|
||||
ld a, YellowIntro_AnimatedObjectOAMData % $100
|
||||
ld a, LOW(YellowIntro_AnimatedObjectOAMData)
|
||||
ld [wAnimatedObjectOAMDataPointer], a
|
||||
ld a, YellowIntro_AnimatedObjectOAMData / $100
|
||||
ld a, HIGH(YellowIntro_AnimatedObjectOAMData)
|
||||
ld [wAnimatedObjectOAMDataPointer + 1], a
|
||||
ld a, YellowIntro_AnimatedObjectFramesData % $100
|
||||
ld a, LOW(YellowIntro_AnimatedObjectFramesData)
|
||||
ld [wAnimatedObjectFramesDataPointer], a
|
||||
ld a, YellowIntro_AnimatedObjectFramesData / $100
|
||||
ld a, HIGH(YellowIntro_AnimatedObjectFramesData)
|
||||
ld [wAnimatedObjectFramesDataPointer + 1], a
|
||||
ret
|
||||
|
||||
|
|
@ -1079,3 +1078,8 @@ Func_fa08e:
|
|||
|
||||
Unkn_fa0aa:
|
||||
sine_wave $100
|
||||
|
||||
INCLUDE "data/sprite_anims/intro_frames.asm"
|
||||
INCLUDE "data/sprite_anims/intro_oam.asm"
|
||||
|
||||
INCLUDE "gfx/yellow_intro.asm"
|
||||
|
|
@ -38,7 +38,7 @@ DisplayTitleScreen:
|
|||
call FarCopyData
|
||||
ld hl, NineTile
|
||||
ld de, vTitleLogo tile $6e
|
||||
ld bc, $10
|
||||
ld bc, 1 tiles
|
||||
ld a, BANK(NineTile)
|
||||
call FarCopyData
|
||||
ld hl, GamefreakLogoGraphics
|
||||
|
|
|
|||
109
engine/movie/title_yellow.asm
Normal file
109
engine/movie/title_yellow.asm
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
LoadYellowTitleScreenGFX:
|
||||
ld hl, PokemonLogoGraphics
|
||||
ld de, vChars2
|
||||
ld bc, PokemonLogoGraphicsEnd - PokemonLogoGraphics
|
||||
ld a, BANK(PokemonLogoGraphics)
|
||||
call FarCopyData
|
||||
ld hl, PokemonLogoCornerGraphics
|
||||
ld de, vChars1 tile $7d
|
||||
ld bc, PokemonLogoCornerGraphicsEnd - PokemonLogoCornerGraphics
|
||||
ld a, BANK(PokemonLogoCornerGraphics)
|
||||
call FarCopyData
|
||||
ld hl, TitlePikachuBGGraphics
|
||||
ld de, vChars1
|
||||
ld bc, TitlePikachuBGGraphicsEnd - TitlePikachuBGGraphics
|
||||
ld a, BANK(TitlePikachuBGGraphics)
|
||||
call FarCopyData
|
||||
ld hl, TitlePikachuOBGraphics
|
||||
ld de, vChars1 tile $70
|
||||
ld bc, TitlePikachuOBGraphicsEnd - TitlePikachuOBGraphics
|
||||
ld a, BANK(TitlePikachuOBGraphics)
|
||||
call FarCopyData
|
||||
ret
|
||||
|
||||
TitleScreen_PlacePokemonLogo:
|
||||
hlcoord 2, 1
|
||||
ld de, TitleScreenPokemonLogoTilemap
|
||||
lb bc, 7, 16
|
||||
call Bank3D_CopyBox
|
||||
ret
|
||||
|
||||
TitleScreen_PlacePikaSpeechBubble:
|
||||
hlcoord 6, 4
|
||||
ld de, TitleScreenPikaBubbleTilemap
|
||||
lb bc, 4, 7
|
||||
call Bank3D_CopyBox
|
||||
hlcoord 9, 8
|
||||
ld [hl], $64
|
||||
inc hl
|
||||
ld [hl], $65
|
||||
ret
|
||||
|
||||
TitleScreen_PlacePikachu:
|
||||
hlcoord 4, 8
|
||||
ld de, TitleScreenPikachuTilemap
|
||||
lb bc, 9, 12
|
||||
call Bank3D_CopyBox
|
||||
hlcoord 16, 10
|
||||
ld [hl], $96
|
||||
hlcoord 16, 11
|
||||
ld [hl], $9d
|
||||
hlcoord 16, 12
|
||||
ld [hl], $a7
|
||||
hlcoord 16, 13
|
||||
ld [hl], $b1
|
||||
ld hl, TitleScreenPikachuEyesOAMData
|
||||
ld de, wOAMBuffer
|
||||
ld bc, $20
|
||||
call CopyData
|
||||
ret
|
||||
|
||||
TitleScreenPikachuEyesOAMData:
|
||||
db $60, $40, $f1, $22
|
||||
db $60, $48, $f0, $22
|
||||
db $68, $40, $f3, $22
|
||||
db $68, $48, $f2, $22
|
||||
db $60, $60, $f0, $02
|
||||
db $60, $68, $f1, $02
|
||||
db $68, $60, $f2, $02
|
||||
db $68, $68, $f3, $02
|
||||
|
||||
Bank3D_CopyBox:
|
||||
; copy cxb (xy) screen area from de to hl
|
||||
.row
|
||||
push bc
|
||||
push hl
|
||||
.col
|
||||
ld a, [de]
|
||||
inc de
|
||||
ld [hli], a
|
||||
dec c
|
||||
jr nz, .col
|
||||
pop hl
|
||||
ld bc, SCREEN_WIDTH
|
||||
add hl, bc
|
||||
pop bc
|
||||
dec b
|
||||
jr nz, .row
|
||||
ret
|
||||
|
||||
TitleScreenPokemonLogoTilemap: ; 16x7
|
||||
INCBIN "gfx/title/pokemon_logo.tilemap"
|
||||
|
||||
Pointer_f4669: ; unreferenced
|
||||
db $47, $48, $49, $4a, $4b, $4c, $4d, $4e, $4f, $5f
|
||||
|
||||
TitleScreenPikaBubbleTilemap: ; 7x4
|
||||
INCBIN "gfx/title/pika_bubble.tilemap"
|
||||
|
||||
TitleScreenPikachuTilemap: ; 12x9
|
||||
INCBIN "gfx/title/pikachu.tilemap"
|
||||
|
||||
PokemonLogoGraphics: INCBIN "gfx/title/pokemon_logo.2bpp"
|
||||
PokemonLogoGraphicsEnd:
|
||||
PokemonLogoCornerGraphics: INCBIN "gfx/title/pokemon_logo_corner.2bpp"
|
||||
PokemonLogoCornerGraphicsEnd:
|
||||
TitlePikachuBGGraphics: INCBIN "gfx/title/pikachu_bg.2bpp"
|
||||
TitlePikachuBGGraphicsEnd:
|
||||
TitlePikachuOBGraphics: INCBIN "gfx/title/pikachu_ob.2bpp"
|
||||
TitlePikachuOBGraphicsEnd:
|
||||
|
|
@ -34,7 +34,7 @@ AnimateHealingMachine:
|
|||
dec b
|
||||
jr nz, .partyLoop
|
||||
ld a, [wAudioROMBank]
|
||||
cp BANK(AudioEngine3)
|
||||
cp BANK("Audio Engine 3")
|
||||
ld [wAudioSavedROMBank], a
|
||||
jr nz, .next
|
||||
call StopAllMusic
|
||||
|
|
|
|||
|
|
@ -15,17 +15,13 @@ MarkTownVisitedAndLoadMissableObjects::
|
|||
add hl, bc
|
||||
ld a, [hli] ; load missable objects pointer in hl
|
||||
ld h, [hl]
|
||||
; fall through
|
||||
|
||||
; LoadMissableObjects:
|
||||
; seems to not exist in yellow (predef replaced with something near TryPushingBoulder)
|
||||
ld l, a
|
||||
push hl
|
||||
ld a, l
|
||||
sub MissableObjects & $ff ; calculate difference between out pointer and the base pointer
|
||||
sub LOW(MissableObjects) ; calculate difference between out pointer and the base pointer
|
||||
ld l, a
|
||||
ld a, h
|
||||
sbc MissableObjects / $100
|
||||
sbc HIGH(MissableObjects)
|
||||
ld h, a
|
||||
ld a, h
|
||||
ldh [hDividend], a
|
||||
|
|
|
|||
25
engine/overworld/specific_script_flags.asm
Normal file
25
engine/overworld/specific_script_flags.asm
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
SetMapSpecificScriptFlagsOnMapReload::
|
||||
ld a, [wCurMap]
|
||||
cp VERMILION_GYM
|
||||
jr z, .vermilion_gym
|
||||
ld c, a
|
||||
ld hl, Bit5Maps
|
||||
.search_loop
|
||||
ld a, [hli]
|
||||
cp c
|
||||
jr z, .in_list
|
||||
cp a, $ff
|
||||
jr nz, .search_loop
|
||||
ret
|
||||
|
||||
.vermilion_gym
|
||||
ld hl, wCurrentMapScriptFlags
|
||||
set 6, [hl]
|
||||
ret
|
||||
|
||||
.in_list
|
||||
ld hl, wCurrentMapScriptFlags
|
||||
set 5, [hl]
|
||||
ret
|
||||
|
||||
INCLUDE "data/maps/bit_5_maps.asm"
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
_UpdateSprites::
|
||||
ld h, wSpriteStateData1 / $100
|
||||
ld h, HIGH(wSpriteStateData1)
|
||||
inc h
|
||||
ld a, SPRITESTATEDATA2_IMAGEBASEOFFSET
|
||||
.spriteLoop
|
||||
|
|
|
|||
40
engine/overworld/unused_load_missable_object_data.asm
Normal file
40
engine/overworld/unused_load_missable_object_data.asm
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
Func_f0a54: ; unreferenced
|
||||
ret
|
||||
|
||||
LoadMissableObjectData::
|
||||
; farcalled by an unreferenced function
|
||||
ld hl, .MissableObjectsMaps
|
||||
.loop
|
||||
ld a, [hli]
|
||||
cp -1
|
||||
ret z
|
||||
ld b, a
|
||||
ld a, [wCurMap]
|
||||
cp b
|
||||
jr z, .found
|
||||
inc hl
|
||||
inc hl
|
||||
inc hl
|
||||
jr .loop
|
||||
|
||||
.found
|
||||
ld a, [hli]
|
||||
ld c, a
|
||||
ld b, 0
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ld de, wMissableObjectList
|
||||
call CopyData
|
||||
ret
|
||||
|
||||
.MissableObjectsMaps:
|
||||
dbbw BLUES_HOUSE, .BluesHouseEnd - .BluesHouse, .BluesHouse
|
||||
db -1 ; end
|
||||
|
||||
.BluesHouse:
|
||||
db 1, HS_DAISY_SITTING_COPY
|
||||
db 2, HS_DAISY_WALKING_COPY
|
||||
db 3, HS_TOWN_MAP_COPY
|
||||
db -1 ; end
|
||||
.BluesHouseEnd:
|
||||
|
|
@ -10,9 +10,9 @@ IsPlayerTalkingToPikachu::
|
|||
ldh [hSpriteIndexOrTextID], a
|
||||
ld [wd436], a
|
||||
ret
|
||||
|
||||
|
||||
InitializePikachuTextID::
|
||||
ld a, TEXT_PIKACHU_ANIM ; display
|
||||
ld a, TEXT_PIKACHU_ANIM ; display
|
||||
ldh [hSpriteIndexOrTextID], a
|
||||
xor a
|
||||
ld [wPlayerMovingDirection], a
|
||||
|
|
@ -49,7 +49,7 @@ DoStarterPikachuEmotions:
|
|||
|
||||
.done
|
||||
ret
|
||||
|
||||
|
||||
StarterPikachuEmotionsJumptable:
|
||||
dw StarterPikachuEmotionCommand_nop ; 0
|
||||
dw StarterPikachuEmotionCommand_text ; 1
|
||||
|
|
@ -62,7 +62,7 @@ StarterPikachuEmotionsJumptable:
|
|||
dw StarterPikachuEmotionCommand_nop2 ; 8
|
||||
dw StarterPikachuEmotionCommand_9 ; 9
|
||||
dw StarterPikachuEmotionCommand_nop3 ; a
|
||||
|
||||
|
||||
StarterPikachuEmotionCommand_nop:
|
||||
StarterPikachuEmotionCommand_nop3:
|
||||
ret
|
||||
|
|
@ -78,7 +78,7 @@ StarterPikachuEmotionCommand_text:
|
|||
call PrintText
|
||||
pop de
|
||||
ret
|
||||
|
||||
|
||||
StarterPikachuEmotionCommand_pcm:
|
||||
ld a, [de]
|
||||
inc de
|
||||
|
|
@ -94,7 +94,7 @@ PlayPikachuSoundClip_:
|
|||
ret z
|
||||
callfar PlayPikachuSoundClip
|
||||
ret
|
||||
|
||||
|
||||
StarterPikachuEmotionCommand_emote:
|
||||
ld a, [wUpdateSpritesEnabled]
|
||||
push af
|
||||
|
|
@ -108,14 +108,14 @@ StarterPikachuEmotionCommand_emote:
|
|||
pop af
|
||||
ld [wUpdateSpritesEnabled], a
|
||||
ret
|
||||
|
||||
|
||||
ShowPikachuEmoteBubble:
|
||||
ld [wWhichEmotionBubble], a
|
||||
ld a, $f ; Pikachu
|
||||
ld [wEmotionBubbleSpriteIndex], a
|
||||
predef EmotionBubble
|
||||
ret
|
||||
|
||||
|
||||
StarterPikachuEmotionCommand_movement:
|
||||
ld a, [de]
|
||||
inc de
|
||||
|
|
@ -128,7 +128,7 @@ StarterPikachuEmotionCommand_movement:
|
|||
call ApplyPikachuMovementData_
|
||||
pop de
|
||||
ret
|
||||
|
||||
|
||||
StarterPikachuEmotionCommand_delay:
|
||||
ld a, [de]
|
||||
inc de
|
||||
|
|
@ -137,7 +137,7 @@ StarterPikachuEmotionCommand_delay:
|
|||
call DelayFrames
|
||||
pop de
|
||||
ret
|
||||
|
||||
|
||||
StarterPikachuEmotionCommand_subcmd:
|
||||
ld a, [de]
|
||||
inc de
|
||||
|
|
@ -162,10 +162,10 @@ StarterPikachuEmotionCommand_subcmd:
|
|||
dw PikachuPewterPokecenterCheck
|
||||
dw PikachuFanClubCheck
|
||||
dw PikachuBillsHouseCheck
|
||||
|
||||
|
||||
StarterPikachuEmotionCommand_nop2:
|
||||
ret
|
||||
|
||||
|
||||
StarterPikachuEmotionCommand_9:
|
||||
push de
|
||||
call StarterPikachuEmotionCommand_turnawayfromplayer
|
||||
|
|
@ -178,12 +178,12 @@ StarterPikachuEmotionCommand_turnawayfromplayer:
|
|||
xor $4
|
||||
ld [wSpritePikachuStateData1FacingDirection], a
|
||||
ret
|
||||
|
||||
|
||||
DeletedFunction_fcffb:
|
||||
; Inexplicably empty.
|
||||
rept 5
|
||||
REPT 5
|
||||
nop
|
||||
endr
|
||||
ENDR
|
||||
ret
|
||||
|
||||
PlaySpecificPikachuEmotion:
|
||||
|
|
@ -200,12 +200,13 @@ load_expression:
|
|||
ld hl, PikachuEmotionTable
|
||||
call DoStarterPikachuEmotions
|
||||
ret
|
||||
|
||||
PikachuEmotionTable:
|
||||
pikaemotion_def: MACRO
|
||||
\1_id: dw \1
|
||||
endm
|
||||
|
||||
pikaemotion_def: MACRO
|
||||
\1_id:
|
||||
dw \1
|
||||
ENDM
|
||||
|
||||
PikachuEmotionTable:
|
||||
pikaemotion_def PikachuEmotion0
|
||||
pikaemotion_def PikachuEmotion1
|
||||
pikaemotion_def PikachuEmotion2
|
||||
|
|
@ -240,10 +241,10 @@ pikaemotion_def: MACRO
|
|||
pikaemotion_def PikachuEmotion31
|
||||
pikaemotion_def PikachuEmotion32
|
||||
pikaemotion_def PikachuEmotion33
|
||||
|
||||
|
||||
PikachuEmotion33:
|
||||
db $ff
|
||||
|
||||
|
||||
MapSpecificPikachuExpression:
|
||||
ld a, [wCurMap]
|
||||
cp POKEMON_FAN_CLUB
|
||||
|
|
@ -305,14 +306,14 @@ MapSpecificPikachuExpression:
|
|||
.play_emotion
|
||||
scf
|
||||
ret
|
||||
|
||||
|
||||
.Emotions:
|
||||
dpikaemotion PikachuEmotion18
|
||||
dpikaemotion PikachuEmotion21
|
||||
dpikaemotion PikachuEmotion23
|
||||
dpikaemotion PikachuEmotion24
|
||||
dpikaemotion PikachuEmotion25
|
||||
|
||||
|
||||
IsPlayerPikachuAsleepInParty:
|
||||
xor a
|
||||
ld [wWhichPokemon], a
|
||||
|
|
@ -353,8 +354,8 @@ IsPlayerPikachuAsleepInParty:
|
|||
.done
|
||||
and a
|
||||
ret
|
||||
|
||||
INCLUDE "data/pikachu_emotions.asm"
|
||||
|
||||
INCLUDE "data/pikachu/pikachu_emotions.asm"
|
||||
|
||||
PikachuWalksToNurseJoy:
|
||||
ld a, $40
|
||||
|
|
@ -642,10 +642,10 @@ asm_fc87f:
|
|||
ld a, [hl]
|
||||
dec a
|
||||
add a
|
||||
add Pointer_fc8d6 % $100
|
||||
add LOW(Pointer_fc8d6)
|
||||
ld l, a
|
||||
ld a, Pointer_fc8d6 / $100
|
||||
adc $0
|
||||
ld a, HIGH(Pointer_fc8d6)
|
||||
adc 0
|
||||
ld h, a
|
||||
ld a, [hli]
|
||||
ld [wd432], a
|
||||
|
|
@ -1474,7 +1474,7 @@ AreThereAtLeastTwoStepsInPikachuFollowCommandBuffer:
|
|||
ret
|
||||
|
||||
WillPikachuSpawnOnTheScreen:
|
||||
ld h, wSpriteStateData2 / $100
|
||||
ld h, HIGH(wSpriteStateData2)
|
||||
ldh a, [hCurrentSpriteOffset] ; If we're here, this can only be $f0
|
||||
add wSpritePikachuStateData2MapY - wSpritePikachuStateData2
|
||||
ld l, a
|
||||
|
|
@ -1515,7 +1515,7 @@ WillPikachuSpawnOnTheScreen:
|
|||
cp d
|
||||
jr c, .on_screen
|
||||
.not_on_screen
|
||||
ld h, wSpriteStateData1 / $100
|
||||
ld h, HIGH(wSpriteStateData1)
|
||||
ldh a, [hCurrentSpriteOffset]
|
||||
add wSpritePikachuStateData1ImageIndex - wSpritePikachuStateData1
|
||||
ld l, a
|
||||
|
|
@ -1524,7 +1524,7 @@ WillPikachuSpawnOnTheScreen:
|
|||
jr .return
|
||||
|
||||
.on_screen
|
||||
ld h, wSpriteStateData2 / $100
|
||||
ld h, HIGH(wSpriteStateData2)
|
||||
ldh a, [hCurrentSpriteOffset]
|
||||
add wSpritePikachuStateData2GrassPriority - wSpritePikachuStateData2
|
||||
ld l, a
|
||||
|
|
@ -1540,7 +1540,7 @@ WillPikachuSpawnOnTheScreen:
|
|||
ret
|
||||
|
||||
.GetNPCCurrentTile:
|
||||
ld h, wSpriteStateData1 / $100
|
||||
ld h, HIGH(wSpriteStateData1)
|
||||
ldh a, [hCurrentSpriteOffset]
|
||||
add wSpritePikachuStateData1YPixels - wSpritePikachuStateData1
|
||||
ld l, a
|
||||
|
|
@ -1560,9 +1560,9 @@ WillPikachuSpawnOnTheScreen:
|
|||
ld d, 0
|
||||
ld e, a
|
||||
ld hl, wTileMap
|
||||
rept 5
|
||||
REPT 5
|
||||
add hl, bc
|
||||
endr
|
||||
ENDR
|
||||
add hl, de
|
||||
ret
|
||||
|
||||
|
|
@ -237,29 +237,29 @@ PikachuMovementDatabase:
|
|||
|
||||
PikaMovementFunc1Jumptable:
|
||||
dw PikaMovementFunc1_EndCommand_ ; 00
|
||||
dw PikaMovementFunc1_LoadPikachuCurrentPosition ; 01
|
||||
dw PikaMovementFunc1_DelayFrames ; 02
|
||||
dw PikaMovementFunc1_WalkInCurrentFacingDirection ; 03
|
||||
dw PikaMovementFunc1_WalkInOppositeFacingDirection ; 04
|
||||
dw PikaMovementFunc1_StepTurningCounterclockwise ; 05
|
||||
dw PikaMovementFunc1_StepTurningClockwise ; 06
|
||||
dw PikaMovementFunc1_StepForwardLeft ; 07
|
||||
dw PikaMovementFunc1_StepForwardRight ; 08
|
||||
dw PikaMovementFunc1_StepBackwardLeft ; 09
|
||||
dw PikaMovementFunc1_StepBackwardRight ; 0a
|
||||
dw PikaMovementFunc1_MoveDown ; 0b
|
||||
dw PikaMovementFunc1_MoveUp ; 0c
|
||||
dw PikaMovementFunc1_MoveLeft ; 0d
|
||||
dw PikaMovementFunc1_MoveRight ; 0e
|
||||
dw PikaMovementFunc1_MoveDownLeft ; 0f
|
||||
dw PikaMovementFunc1_MoveDownRight ; 10
|
||||
dw PikaMovementFunc1_MoveUpLeft ; 11
|
||||
dw PikaMovementFunc1_MoveUpRight ; 12
|
||||
dw PikaMovementFunc1_LookDown ; 13
|
||||
dw PikaMovementFunc1_LookUp ; 14
|
||||
dw PikaMovementFunc1_LookLeft ; 15
|
||||
dw PikaMovementFunc1_LookRight ; 16
|
||||
dw PikaMovementFunc1_EndCommand_ ; 17
|
||||
dw PikaMovementFunc1_LoadPikachuCurrentPosition ; 01
|
||||
dw PikaMovementFunc1_DelayFrames ; 02
|
||||
dw PikaMovementFunc1_WalkInCurrentFacingDirection ; 03
|
||||
dw PikaMovementFunc1_WalkInOppositeFacingDirection ; 04
|
||||
dw PikaMovementFunc1_StepTurningCounterclockwise ; 05
|
||||
dw PikaMovementFunc1_StepTurningClockwise ; 06
|
||||
dw PikaMovementFunc1_StepForwardLeft ; 07
|
||||
dw PikaMovementFunc1_StepForwardRight ; 08
|
||||
dw PikaMovementFunc1_StepBackwardLeft ; 09
|
||||
dw PikaMovementFunc1_StepBackwardRight ; 0a
|
||||
dw PikaMovementFunc1_MoveDown ; 0b
|
||||
dw PikaMovementFunc1_MoveUp ; 0c
|
||||
dw PikaMovementFunc1_MoveLeft ; 0d
|
||||
dw PikaMovementFunc1_MoveRight ; 0e
|
||||
dw PikaMovementFunc1_MoveDownLeft ; 0f
|
||||
dw PikaMovementFunc1_MoveDownRight ; 10
|
||||
dw PikaMovementFunc1_MoveUpLeft ; 11
|
||||
dw PikaMovementFunc1_MoveUpRight ; 12
|
||||
dw PikaMovementFunc1_LookDown ; 13
|
||||
dw PikaMovementFunc1_LookUp ; 14
|
||||
dw PikaMovementFunc1_LookLeft ; 15
|
||||
dw PikaMovementFunc1_LookRight ; 16
|
||||
dw PikaMovementFunc1_EndCommand_ ; 17
|
||||
|
||||
PikaMovementFunc1_EndCommand:
|
||||
ld a, [wPikachuMovementFlags]
|
||||
|
|
@ -926,8 +926,8 @@ LedgeHoppingShadowGFX_3FEnd:
|
|||
|
||||
LoadPikachuBallIconIntoVRAM:
|
||||
ld hl, vNPCSprites2 + $7e * $10
|
||||
ld de, GFX_fd86b
|
||||
lb bc, BANK(GFX_fd86b), 1
|
||||
ld de, OverworldPikachuBallGFX
|
||||
lb bc, BANK(OverworldPikachuBallGFX), 1
|
||||
jp CopyVideoDataDoubleAlternate
|
||||
|
||||
Func_fd851:
|
||||
|
|
@ -936,8 +936,8 @@ Func_fd851:
|
|||
.loop
|
||||
push af
|
||||
push hl
|
||||
ld de, GFX_fd86b
|
||||
lb bc, BANK(GFX_fd86b), 4
|
||||
ld de, OverworldPikachuBallGFX
|
||||
lb bc, BANK(OverworldPikachuBallGFX), 4
|
||||
call CopyVideoDataAlternate
|
||||
pop hl
|
||||
ld de, 4 * $10
|
||||
|
|
@ -947,8 +947,8 @@ Func_fd851:
|
|||
jr nz, .loop
|
||||
ret
|
||||
|
||||
GFX_fd86b:
|
||||
INCBIN "gfx/unknown_fd86b.2bpp"
|
||||
OverworldPikachuBallGFX:
|
||||
INCBIN "gfx/overworld/pikachu_ball.2bpp"
|
||||
|
||||
LoadPikachuSpriteIntoVRAM:
|
||||
ld de, PikachuSprite
|
||||
|
|
@ -163,11 +163,12 @@ LoadCurrentPikaPicAnimScriptPointer:
|
|||
call UpdatePikaPicAnimPointer
|
||||
ret
|
||||
|
||||
PikaPicAnimPointers:
|
||||
pikapic_def: macro
|
||||
\1_id: dw \1
|
||||
endm
|
||||
pikapic_def: MACRO
|
||||
\1_id:
|
||||
dw \1
|
||||
ENDM
|
||||
|
||||
PikaPicAnimPointers:
|
||||
pikapic_def PikaPicAnimScript0 ; 00
|
||||
pikapic_def PikaPicAnimScript1 ; 01
|
||||
pikapic_def PikaPicAnimScript2 ; 02
|
||||
|
|
@ -406,7 +407,7 @@ LoadPikaPicAnimObjectData:
|
|||
.not_done
|
||||
ret
|
||||
|
||||
INCLUDE "data/pikachu_pic_objects.asm"
|
||||
INCLUDE "data/pikachu/pikachu_pic_objects.asm"
|
||||
|
||||
LoadCurPikaPicObjectTilemap:
|
||||
and a
|
||||
|
|
@ -473,7 +474,7 @@ LoadCurPikaPicObjectTilemap:
|
|||
pop bc
|
||||
ret
|
||||
|
||||
INCLUDE "data/pikachu_pic_tilemaps.asm"
|
||||
INCLUDE "data/pikachu/pikachu_pic_tilemaps.asm"
|
||||
|
||||
LoadPikaPicAnimGFXHeader:
|
||||
push hl
|
||||
|
|
@ -848,4 +849,7 @@ PikaPicAnimCommand_thunderbolt:
|
|||
call DelayFrames
|
||||
ret
|
||||
|
||||
INCLUDE "data/pikachu_pic_animation.asm"
|
||||
INCLUDE "data/pikachu/pikachu_pic_animation.asm"
|
||||
|
||||
Func_fe66e:
|
||||
ret
|
||||
6
engine/pikachu/respawn_overworld_pikachu.asm
Normal file
6
engine/pikachu/respawn_overworld_pikachu.asm
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
RespawnOverworldPikachu:
|
||||
callfar IsThisPartymonStarterPikachu_Party
|
||||
ret nc
|
||||
ld a, $3
|
||||
ld [wPikachuSpawnState], a
|
||||
ret
|
||||
|
|
@ -1,16 +1,3 @@
|
|||
const_def
|
||||
const PRINTER_STATUS_BLANK
|
||||
const PRINTER_STATUS_CHECKING_LINK
|
||||
const PRINTER_STATUS_TRANSMITTING
|
||||
const PRINTER_STATUS_PRINTING
|
||||
const PRINTER_ERROR_1
|
||||
const PRINTER_ERROR_2
|
||||
const PRINTER_ERROR_3
|
||||
const PRINTER_ERROR_4
|
||||
const PRINTER_ERROR_WRONG_DEVICE
|
||||
|
||||
INCLUDE "engine/printer/serial.asm"
|
||||
|
||||
PrintPokedexEntry:
|
||||
ld a, [wUpdateSpritesEnabled]
|
||||
push af
|
||||
|
|
@ -128,7 +115,7 @@ Printer_PrepareDexEntryForPrinting:
|
|||
callfar Pokedex_PrepareDexEntryForPrinting
|
||||
ret
|
||||
|
||||
PrintSurfingMinigameHighScore:
|
||||
PrintSurfingMinigameHighScore::
|
||||
xor a
|
||||
ldh [hCanceledPrinting], a
|
||||
call Printer_PlayPrinterMusic
|
||||
|
|
@ -641,7 +628,7 @@ GBPrinter_UpdateStatusMessage:
|
|||
db "This is not the"
|
||||
next "Game Boy Printer!@"
|
||||
|
||||
Printer_PrepareSurfingMinigameHighScoreTileMap:
|
||||
Printer_PrepareSurfingMinigameHighScoreTileMap::
|
||||
call GBPalWhiteOutWithDelay3
|
||||
call ClearScreen
|
||||
ld de, SurfingPikachu2Graphics
|
||||
|
|
@ -788,7 +775,7 @@ CopySurfingMinigameScore:
|
|||
dec de
|
||||
ret
|
||||
|
||||
SurfingPikachu2Graphics: INCBIN "gfx/surfing_pikachu_2.2bpp"
|
||||
SurfingPikachu2Graphics: INCBIN "gfx/surfing_pikachu/surfing_pikachu_2.2bpp"
|
||||
SurfingPikachu2GraphicsEnd:
|
||||
|
||||
PrintPCBox_DrawPage1:
|
||||
|
|
@ -177,11 +177,11 @@ Printer_GetMonStats:
|
|||
db "--------------@"
|
||||
|
||||
GFX_ea563:
|
||||
INCBIN "gfx/stats_screen_hp.1bpp"
|
||||
INCBIN "gfx/printer/hp.1bpp"
|
||||
GFX_ea563End:
|
||||
|
||||
GFX_ea56b:
|
||||
INCBIN "gfx/stats_screen_lv.1bpp"
|
||||
INCBIN "gfx/printer/lv.1bpp"
|
||||
GFX_ea56bEnd:
|
||||
|
||||
PrinterDebug_LoadGFX:
|
||||
|
|
@ -208,7 +208,7 @@ PrinterDebug_LoadGFX:
|
|||
ret
|
||||
|
||||
GFX_ea597:
|
||||
INCBIN "gfx/zero_one_ea597.2bpp"
|
||||
INCBIN "gfx/printer/01.2bpp"
|
||||
GFX_ea597End:
|
||||
|
||||
PrinterDebug_ConvertStatusFlagsToTiles:
|
||||
|
|
@ -1,3 +1,14 @@
|
|||
const_def
|
||||
const PRINTER_STATUS_BLANK
|
||||
const PRINTER_STATUS_CHECKING_LINK
|
||||
const PRINTER_STATUS_TRANSMITTING
|
||||
const PRINTER_STATUS_PRINTING
|
||||
const PRINTER_ERROR_1
|
||||
const PRINTER_ERROR_2
|
||||
const PRINTER_ERROR_3
|
||||
const PRINTER_ERROR_4
|
||||
const PRINTER_ERROR_WRONG_DEVICE
|
||||
|
||||
StartTransmission_Send9Rows:
|
||||
ld a, 9
|
||||
Printer_StartTransmission:
|
||||
|
|
@ -104,9 +115,9 @@ Printer_StartTransmittingTilemap:
|
|||
ld hl, PrinterDataPacket3
|
||||
call CopyPrinterDataHeader
|
||||
call Printer_Convert2RowsTo2bpp
|
||||
ld a, (wPrinterSendDataSource1End - wPrinterSendDataSource1) % $100
|
||||
ld a, LOW(wPrinterSendDataSource1End - wPrinterSendDataSource1)
|
||||
ld [wPrinterDataSize], a
|
||||
ld a, (wPrinterSendDataSource1End - wPrinterSendDataSource1) / $100
|
||||
ld a, HIGH(wPrinterSendDataSource1End - wPrinterSendDataSource1)
|
||||
ld [wPrinterDataSize + 1], a
|
||||
call ComputePrinterChecksum
|
||||
call Printer_Next
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ NintendoCopyrightLogoGraphics: INCBIN "gfx/splash/copyright.2bpp"
|
|||
GamefreakLogoGraphics: INCBIN "gfx/title/gamefreak_inc.2bpp"
|
||||
GamefreakLogoGraphicsEnd:
|
||||
|
||||
NineTile: INCBIN "gfx/9_tile.2bpp"
|
||||
NineTile: INCBIN "gfx/title/nine.2bpp"
|
||||
|
||||
TextBoxGraphics:: INCBIN "gfx/font/font_extra.2bpp"
|
||||
TextBoxGraphicsEnd::
|
||||
|
|
|
|||
BIN
gfx/intro/clouds.png
Normal file
BIN
gfx/intro/clouds.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 310 B |
BIN
gfx/intro/yellow_intro_1.png
Normal file
BIN
gfx/intro/yellow_intro_1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 826 B |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user