Merge pull request #456 from Rangi42/master

OAM data documentation; move more content into data/; move palettes into gfx/; more code+script constants; consistent map naming
This commit is contained in:
yenatch 2018-01-22 01:06:48 -05:00 committed by GitHub
commit c60f1331fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1232 changed files with 20368 additions and 19678 deletions

2
FAQ.md
View File

@ -14,7 +14,7 @@
## What is pokecrystal11.gbc?
Version 1.1 of Pokémon Crystal, which fixed some issues with the initial international release. `make crystal11` defines `CRYSTAL11` so the assembly builds the changed version.
Version 1.1 of Pokémon Crystal, which fixed some issues with the initial international release. `make crystal11` defines `_CRYSTAL11` so the assembly builds the changed version.
## Can't build ROM; "ERROR: `UNION` already defined"

View File

@ -20,8 +20,9 @@ crystal_obj := \
audio.o \
home.o \
main.o \
maps.o \
wram.o \
data/common_text/common_text.o \
data/maps/maps.o \
data/pokemon/dex_entries.o \
data/pokemon/egg_moves.o \
data/pokemon/evos_attacks.o \
@ -29,8 +30,7 @@ engine/credits.o \
engine/events.o \
gfx/pics.o \
gfx/sprites.o \
lib/mobile/main.o \
text/common_text.o
lib/mobile/main.o
crystal11_obj := $(crystal_obj:.o=11.o)
@ -52,7 +52,8 @@ tools:
$(MAKE) -C tools/
$(crystal11_obj): RGBASMFLAGS = -D CRYSTAL11
$(crystal_obj): RGBASMFLAGS = -D _CRYSTAL
$(crystal11_obj): RGBASMFLAGS = -D _CRYSTAL -D _CRYSTAL11
# The dep rules have to be explicit or else missing files won't be reported.
# As a side effect, they're evaluated immediately instead of when the rule is invoked.
@ -77,12 +78,12 @@ endif
pokecrystal11.gbc: $(crystal11_obj) pokecrystal.link
$(RGBLINK) -n pokecrystal11.sym -m pokecrystal11.map -l pokecrystal.link -o $@ $(crystal11_obj)
$(RGBFIX) -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -n 1 -p 0 -r 3 -t PM_CRYSTAL $@
sort pokecrystal11.sym -o pokecrystal11.sym
tools/sort_symfile.sh pokecrystal11.sym
pokecrystal.gbc: $(crystal_obj) pokecrystal.link
$(RGBLINK) -n pokecrystal.sym -m pokecrystal.map -l pokecrystal.link -o $@ $(crystal_obj)
$(RGBFIX) -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@
sort pokecrystal.sym -o pokecrystal.sym
tools/sort_symfile.sh pokecrystal.sym
# For files that the compressor can't match, there will be a .lz file suffixed with the md5 hash of the correct uncompressed file.
@ -119,10 +120,12 @@ gfx/pokemon/girafarig/front.animated.tilemap: gfx/pokemon/girafarig/front.2bpp g
### Pokemon pic graphics rules
gfx/pokemon/%/normal.gbcpal: gfx/pokemon/%/front.png
$(RGBGFX) -p $@ $<
gfx/pokemon/%/front.dimensions: gfx/pokemon/%/front.png
tools/png_dimensions $< $@
gfx/pokemon/%/normal.pal: gfx/pokemon/%/normal.gbcpal
tools/palette -p $< > $@
gfx/pokemon/%/normal.gbcpal: gfx/pokemon/%/front.png
$(RGBGFX) -p $@ $<
gfx/pokemon/%/back.2bpp: gfx/pokemon/%/back.png
$(RGBGFX) -h -o $@ $<
gfx/pokemon/%/bitmask.asm: gfx/pokemon/%/front.animated.tilemap gfx/pokemon/%/front.dimensions
@ -133,19 +136,18 @@ gfx/pokemon/%/front.animated.2bpp: gfx/pokemon/%/front.2bpp gfx/pokemon/%/front.
tools/pokemon_animation_graphics -o $@ $^
gfx/pokemon/%/front.animated.tilemap: gfx/pokemon/%/front.2bpp gfx/pokemon/%/front.dimensions
tools/pokemon_animation_graphics -t $@ $^
# Don't use -h, pokemon_animation_graphics takes care of it
#gfx/pokemon/%/front.2bpp: gfx/pokemon/%/front.png
# $(RGBGFX) -o $@ $<
### Misc file-specific graphics rules
gfx/shrink/shrink1.2bpp: rgbgfx += -h
gfx/shrink/shrink2.2bpp: rgbgfx += -h
gfx/new_game/shrink1.2bpp: rgbgfx += -h
gfx/new_game/shrink2.2bpp: rgbgfx += -h
gfx/trainers/%.2bpp: rgbgfx += -h
gfx/trainers/%.pal: gfx/trainers/%.gbcpal
tools/palette -p $< > $@
gfx/trainers/%.gbcpal: gfx/trainers/%.png
$(RGBGFX) -p $@ $<
gfx/mail/dragonite.1bpp: tools/gfx += --remove-whitespace
gfx/mail/large_note.1bpp: tools/gfx += --remove-whitespace
@ -157,6 +159,11 @@ gfx/pokedex/pokedex.2bpp: tools/gfx += --trim-whitespace
gfx/pokedex/sgb.2bpp: tools/gfx += --trim-whitespace
gfx/pokedex/slowpoke.2bpp: tools/gfx += --trim-whitespace
gfx/pokegear/pokegear.2bpp: rgbgfx += -x2
gfx/pokegear/pokegear_sprites.2bpp: tools/gfx += --trim-whitespace
gfx/mystery_gift/mystery_gift.2bpp: tools/gfx += --trim-whitespace
gfx/title/crystal.2bpp: tools/gfx += --interleave --png=$<
gfx/title/old_fg.2bpp: tools/gfx += --interleave --png=$<
gfx/title/logo.2bpp: rgbgfx += -x 4
@ -194,17 +201,21 @@ gfx/player/kris_back.2bpp: rgbgfx += -h
gfx/trainer_card/chris_card.2bpp: rgbgfx += -h
gfx/trainer_card/kris_card.2bpp: rgbgfx += -h
gfx/trainer_card/leaders.2bpp: tools/gfx += --trim-whitespace
gfx/overworld/chris_fish.2bpp: tools/gfx += --trim-whitespace
gfx/overworld/kris_fish.2bpp: tools/gfx += --trim-whitespace
gfx/battle/dude.2bpp: rgbgfx += -h
gfx/font/unused_bold_font.1bpp: tools/gfx += --trim-whitespace
gfx/pokegear/pokegear.2bpp: rgbgfx += -x2
gfx/pokegear/pokegear_sprites.2bpp: tools/gfx += --trim-whitespace
gfx/sgb/sgb_border.2bpp: tools/gfx += --trim-whitespace
gfx/mobile/ascii_font.2bpp: tools/gfx += --trim-whitespace
gfx/mobile/electro_ball.2bpp: tools/gfx += --trim-whitespace
gfx/mobile/electro_ball_nonmatching.2bpp: tools/gfx += --remove-duplicates --remove-xflip
gfx/mobile/mobile_adapter.2bpp: tools/gfx += --trim-whitespace
gfx/mobile/mobile_splash.2bpp: tools/gfx += --remove-duplicates --remove-xflip
gfx/mobile/pichu_animated.2bpp: tools/gfx += --trim-whitespace
@ -228,7 +239,5 @@ gfx/unknown/unknown_egg.2bpp: rgbgfx += -h
$(RGBGFX) -t $@ $<
%.gbcpal: %.png
$(RGBGFX) -p $@ $<
%.pal: %.gbcpal
tools/palette $< > $@
%.dimensions: %.png
tools/png_dimensions $< $@

View File

@ -1,3 +1,5 @@
# Style Guide
Some of the code will disagree with this guide. Older code is less likely to be correct. Use your best judgement.
When you come across an edge case that isn't referenced in this guide, please add it.

View File

@ -1,4 +1,4 @@
INCLUDE "includes.asm"
INCLUDE "constants.asm"
SECTION "Audio", ROMX

View File

@ -40,7 +40,7 @@ _MapSetup_Sound_Off:: ; e8000
ld hl, Channels ; start of channel data
ld de, ChannelsEnd - Channels ; length of area to clear (entire sound wram area)
.clearchannels ; clear Channel1-$c2bf
.clearchannels
xor a
ld [hli], a
dec de
@ -408,7 +408,7 @@ UpdateChannels: ; e8125
ret
.asm_e824d
ld a, $3f
ld a, $3f ; sound length
ld [rNR31], a
xor a
ld [rNR30], a
@ -1304,8 +1304,8 @@ ParseSFXOrRest: ; e8698
ld [hl], a
; are we on the last channel? (noise sampling)
ld a, [CurChannel]
and $3
cp $3
maskbits NUM_MUSIC_CHANS
cp CHAN4
ret z
; update hi frequency from next param
call GetMusicByte
@ -1320,8 +1320,8 @@ GetNoiseSample: ; e86c5
; load ptr to sample header in NoiseSampleAddress
; are we on the last channel?
ld a, [CurChannel]
and $3
cp $3
and NUM_MUSIC_CHANS +- 1
cp CHAN4
; ret if not
ret nz
; update note duration
@ -1668,7 +1668,7 @@ MusicEE; e883e
; if ????, jump
; get channel
ld a, [CurChannel]
and $3 ; ch0-3
maskbits NUM_MUSIC_CHANS
ld e, a
ld d, 0
; hl = Channel1JumpCondition + channel id
@ -1966,8 +1966,8 @@ Music_NoteType: ; e8963
add hl, bc
ld [hl], a
ld a, [CurChannel]
and $3
cp CHAN8 & $3
maskbits NUM_MUSIC_CHANS
cp CHAN4
ret z
; intensity
call Music_Intensity
@ -2414,7 +2414,7 @@ SetLRTracks: ; e8b1b
push de
; store current channel in de
ld a, [CurChannel]
and $3
maskbits NUM_MUSIC_CHANS
ld e, a
ld d, 0
; get this channel's lr tracks
@ -2449,7 +2449,7 @@ _PlayMusic:: ; e8b30
call LoadMusicByte ; store first byte of music header in a
rlca
rlca
and $3 ; get number of channels
maskbits NUM_MUSIC_CHANS
inc a
.loop
; start playing channels
@ -2474,7 +2474,7 @@ _PlayMusic:: ; e8b30
; e8b79
_PlayCryHeader:: ; e8b79
_PlayCry:: ; e8b79
; Play cry de using parameters:
; CryPitch
; CryLength
@ -2505,7 +2505,7 @@ _PlayCryHeader:: ; e8b79
; Top 2 bits contain the number of channels
rlca
rlca
and 3
maskbits NUM_MUSIC_CHANS
; For each channel:
inc a
@ -2530,8 +2530,8 @@ _PlayCryHeader:: ; e8b79
; No tempo for channel 4
ld a, [CurChannel]
and 3
cp 3
maskbits NUM_MUSIC_CHANS
cp CHAN4
jr nc, .start
; Tempo is effectively length
@ -2669,7 +2669,7 @@ _PlaySFX:: ; e8c04
call LoadMusicByte
rlca ; top 2
rlca ; bits
and $3
maskbits NUM_MUSIC_CHANS
inc a ; # channels -> # loops
.startchannels
push af
@ -2722,7 +2722,7 @@ PlayStereoSFX:: ; e8ca6
call LoadMusicByte
rlca
rlca
and 3 ; ch1-4
maskbits NUM_MUSIC_CHANS
inc a
.loop
@ -2736,7 +2736,7 @@ PlayStereoSFX:: ; e8ca6
push de
; get tracks for this channel
ld a, [CurChannel]
and 3 ; ch1-4
maskbits NUM_MUSIC_CHANS
ld e, a
ld d, 0
call GetLRTracks
@ -2749,7 +2749,7 @@ PlayStereoSFX:: ; e8ca6
add hl, bc
ld [hl], a
ld hl, Channel1Field30 - Channel1 ; $c131 - Channel1
ld hl, Channel1Field30 - Channel1
add hl, bc
ld [hl], a
@ -2760,11 +2760,11 @@ PlayStereoSFX:: ; e8ca6
; ch3-4
ld a, [wSFXDuration]
ld hl, Channel1Field2e - Channel1 ; $c12f - Channel1
ld hl, Channel1Field2e - Channel1
add hl, bc
ld [hl], a
ld hl, Channel1Field2f - Channel1 ; $c130 - Channel1
ld hl, Channel1Field2f - Channel1
add hl, bc
ld [hl], a

View File

@ -2,8 +2,8 @@ Sfx_PokeballsPlacedOnTable: ; f0941
musicheader 1, 5, Sfx_PokeballsPlacedOnTable_Ch5
; f0944
Sfx_BallWiggle: ; f0944
musicheader 1, 5, Sfx_BallWiggle_Ch5
Sfx_BallWobble: ; f0944
musicheader 1, 5, Sfx_BallWobble_Ch5
; f0947
Sfx_Potion: ; f0947
@ -4075,7 +4075,7 @@ Sfx_PokeballsPlacedOnTable_Ch5: ; f1d21
endchannel
; f1d32
Sfx_BallWiggle_Ch5: ; f1d32
Sfx_BallWobble_Ch5: ; f1d32
dutycycle $2
soundinput $3a
sound __, 5, $f2, $0400

View File

@ -180,7 +180,7 @@ SFX: ; e927c
dba Sfx_Encore
dba Sfx_BeatUp
dba Sfx_BatonPass
dba Sfx_BallWiggle
dba Sfx_BallWobble
dba Sfx_SweetScent
dba Sfx_SweetScent2
dba Sfx_HitEndOfExpBar

View File

@ -1,34 +1,35 @@
; Control characters
charmap "<START>", $00
charmap "<PLAY_G>", $14 ; gendered PlayerName; same as "<PLAYER>" in English
charmap "<DAY>", $15
; $00-$16 are TX_* constants (see macros/scripts/text.asm)
; Control characters (see home/text.asm)
charmap "<PLAY_G>", $14 ; "<PLAYER>くん" or "<PLAYER>ちゃん"; same as "<PLAYER>" in English
charmap "¯", $1f ; soft linebreak
charmap "<LNBRK>", $22
charmap "<KOUGEKI>", $23 ; "こうげき"
charmap "<POKE>", $24 ; "<PO><KE>"
charmap "%", $25
charmap "%", $25 ; soft linebreak in landmark names
charmap "<RED>", $38 ; RedsName
charmap "<GREEN>", $39 ; GreensName
charmap "<ENEMY>", $3f
charmap "<MOM>", $49 ; MomsName
charmap "<PKMN>", $4a ; "<PK><MN>"
charmap "<_CONT>", $4b ; implements "<CONT>"
charmap "<SCROLL>", $4c
charmap "<NEXT>", $4e
charmap "<LINE>", $4f
charmap "@", $50 ; string terminator
charmap "<PARA>", $51
charmap "<PLAYER>", $52 ; PlayerName
charmap "<RIVAL>", $53
charmap "<RIVAL>", $53 ; RivalName
charmap "#", $54 ; "POKé"
charmap "<CONT>", $55
charmap "<......>", $56 ; "……"
charmap "<……>", $56 ; "……"
charmap "<DONE>", $57
charmap "<PROMPT>", $58
charmap "<TARGET>", $59
charmap "<USER>", $5a
charmap "<PC>", $5b ; "PC"
charmap "<TM>", $5c ; "TM"
charmap "<TRNER>", $5d ; "TRAINER"
charmap "<TRAINER>", $5d ; "TRAINER"
charmap "<ROCKET>", $5e ; "ROCKET"
charmap "<DEXEND>", $5f
@ -52,8 +53,8 @@
charmap "ぅ", $6f ; hiragana small u, unused
charmap "<PO>", $70
charmap "<KE>", $71
charmap "<``>", $72 ; opening quote
charmap "<''>", $73 ; closing quote
charmap "“", $72 ; opening quote
charmap "”", $73 ; closing quote
charmap "·", $74 ; middle dot, unused
charmap "…", $75 ; ellipsis
charmap "ぁ", $76 ; hiragana small a, unused
@ -72,7 +73,7 @@
charmap "<LV>", $6e
charmap "<ど>", $70 ; hiragana small do, unused
charmap "<DO>", $70 ; hiragana small do, unused
charmap "◀", $71
charmap "『", $72 ; Japanese opening quote, unused
charmap "<ID>", $73
@ -80,18 +81,18 @@
; Actual characters (from other graphics files)
charmap "|", $31 ; from gfx/stats/stats_tiles
charmap "<SHINY>", $3f ; gfx/stats/shiny
charmap "<BLACK>", $60 ; from gfx/mobile/phone_tiles.2bpp
; needed for _LoadFontsExtra1 (see engine/load_font.asm)
charmap "■", $60 ; gfx/font/black.2bpp
charmap "▲", $61 ; gfx/font/up_arrow.png
charmap "<PHONE>", $62 ; gfx/font/overworld_phone_icon.2bpp
charmap "_", $62 ; from gfx/battle/hp_exp_bar_border.1bpp
charmap "☎", $62 ; gfx/font/phone_icon.2bpp
; needed for Special_MagikarpHouseSign (see engine/events/magikarp.asm)
charmap "", $6e ; gfx/font/feet_inches.png
charmap "″", $6f ; gfx/font/feet_inches.png
; needed for StatsScreen_PlaceShinyIcon and PrintPartyMonPage1
charmap "⁂", $3f ; gfx/stats/stats_tiles.png, tile 14
; Actual characters (from gfx/font/font.png)
charmap "A", $80
@ -189,7 +190,7 @@
charmap "♂", $ef
charmap "¥", $f0
charmap "×", $f1
charmap "<DOT>", $f2 ; same as "." in English
charmap "<DOT>", $f2 ; decimal point; same as "." in English
charmap "/", $f3
charmap ",", $f4
charmap "♀", $f5
@ -205,19 +206,34 @@
charmap "8", $fe
charmap "9", $ff
; Japanese control characters (see home/text.asm)
charmap "<JP_18>", $18 ; "ノ゛"? (ungrammatical)
charmap "<NI>", $1d ; "に "
charmap "<TTE>", $1e ; "って"
charmap "<WO>", $1f ; "を "
charmap "<TA!>", $22 ; "た!"
charmap "<KOUGEKI>", $23 ; "こうげき"
charmap "<WA>", $24 ; "は "
charmap "<NO>", $25 ; "の "
charmap "<ROUTE>", $35 ; "ばん どうろ"
charmap "<WATASHI>", $36 ; "わたし"
charmap "<KOKO_WA>", $37 ; "ここは"
charmap "<GA>", $4a ; "が "
; Japanese kana, for those bits of text that were not translated to English
charmap "ガ", $5
charmap "ギ", $6
charmap "グ", $7
charmap "ゲ", $8
charmap "ゴ", $9
charmap "ザ", $a
charmap "ジ", $b
charmap "ズ", $c
charmap "ゼ", $d
charmap "ゾ", $e
charmap "ダ", $f
charmap "ガ", $05
charmap "ギ", $06
charmap "グ", $07
charmap "ゲ", $08
charmap "ゴ", $09
charmap "ザ", $0a
charmap "ジ", $0b
charmap "ズ", $0c
charmap "ゼ", $0d
charmap "ゾ", $0e
charmap "ダ", $0f
charmap "ヂ", $10
charmap "ヅ", $11
charmap "デ", $12
@ -227,7 +243,6 @@
charmap "ビ", $1a
charmap "ブ", $1b
charmap "ボ", $1c
; charmap "ベ", $1d
charmap "が", $26
charmap "ぎ", $27
@ -261,11 +276,18 @@
charmap "ぺ", $47
charmap "ぽ", $48
charmap "「", $70
charmap "」", $71
charmap "』", $73
charmap "⋯", $75
charmap " ", $7f
charmap "ア", $80
charmap "イ", $81
charmap "ウ", $82
charmap "エ", $83
charmap "ォ", $84
charmap "", $84
charmap "カ", $85
charmap "キ", $86
charmap "ク", $87
@ -316,7 +338,6 @@
charmap "う", $b3
charmap "え", $b4
charmap "お", $b5
charmap "か", $b6
charmap "き", $b7
charmap "く", $b8
@ -342,7 +363,6 @@
charmap "ふ", $cc
charmap "へ", $cd
charmap "ほ", $ce
charmap "ま", $cf
charmap "み", $d0
charmap "む", $d1
@ -365,8 +385,31 @@
charmap "ょ", $e2
charmap "ー", $e3
charmap "゚", $e4
charmap "゙", $e5
charmap "", $e6
charmap "", $e7
charmap "。", $e8
charmap "ァ", $e9
charmap "ゥ", $ea
charmap "ェ", $eb
charmap "円", $f0
charmap "", $f2
charmap "", $f3
charmap "ォ", $f4
charmap "", $f6
charmap "", $f7
charmap "", $f8
charmap "", $f9
charmap "", $fa
charmap "", $fb
charmap "", $fc
charmap "", $fd
charmap "", $fe
charmap "", $ff

View File

@ -1,3 +1,5 @@
INCLUDE "charmap.asm"
INCLUDE "macros.asm"
INCLUDE "hram.asm"
@ -42,8 +44,9 @@ INCLUDE "constants/sprite_data_constants.asm"
INCLUDE "constants/sprite_anim_constants.asm"
INCLUDE "constants/tileset_constants.asm"
INCLUDE "constants/collision_constants.asm"
INCLUDE "constants/cgb_constants.asm"
INCLUDE "constants/scgb_constants.asm"
INCLUDE "constants/battle_tower_constants.asm"
INCLUDE "constants/cry_constants.asm"
INCLUDE "constants/audio_constants.asm"
INCLUDE "constants/printer_constants.asm"
INCLUDE "constants/menu_constants.asm"

View File

@ -37,13 +37,13 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const ANIM_OBJ_06
const ANIM_OBJ_07
const ANIM_OBJ_08
const ANIM_OBJ_09
const ANIM_OBJ_FANG
const ANIM_OBJ_0A
const ANIM_OBJ_0B
const ANIM_OBJ_0C
const ANIM_OBJ_0D
const ANIM_OBJ_0E
const ANIM_OBJ_0F
const ANIM_OBJ_EMBER
const ANIM_OBJ_DRAGON_RAGE
const ANIM_OBJ_FLAMETHROWER
const ANIM_OBJ_FIRE_SPIN
const ANIM_OBJ_FIRE_BLAST
const ANIM_OBJ_BURNED
const ANIM_OBJ_BLIZZARD
const ANIM_OBJ_12
@ -57,32 +57,32 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const ANIM_OBJ_1A
const ANIM_OBJ_1B
const ANIM_OBJ_BALL_POOF
const ANIM_OBJ_1D
const ANIM_OBJ_1E
const ANIM_OBJ_1F
const ANIM_OBJ_20
const ANIM_OBJ_BIG_ROCK
const ANIM_OBJ_SMALL_ROCK
const ANIM_OBJ_STRENGTH
const ANIM_OBJ_SEISMIC_TOSS
const ANIM_OBJ_BUBBLE
const ANIM_OBJ_22
const ANIM_OBJ_23
const ANIM_OBJ_24
const ANIM_OBJ_25
const ANIM_OBJ_26
const ANIM_OBJ_SURF
const ANIM_OBJ_SING
const ANIM_OBJ_WATER_GUN
const ANIM_OBJ_HYDRO_PUMP
const ANIM_OBJ_POWDER
const ANIM_OBJ_27
const ANIM_OBJ_28
const ANIM_OBJ_ICE_BUILDUP
const ANIM_OBJ_FROZEN
const ANIM_OBJ_MASTER_BALL_SPARKLE
const ANIM_OBJ_2C
const ANIM_OBJ_RECOVER
const ANIM_OBJ_2D
const ANIM_OBJ_2E
const ANIM_OBJ_2F
const ANIM_OBJ_30
const ANIM_OBJ_THUNDER_WAVE
const ANIM_OBJ_31
const ANIM_OBJ_LIGHTNING_BOLT
const ANIM_OBJ_33
const ANIM_OBJ_34
const ANIM_OBJ_35
const ANIM_OBJ_36
const ANIM_OBJ_CLAMP
const ANIM_OBJ_BITE
const ANIM_OBJ_37
const ANIM_OBJ_38
const ANIM_OBJ_39
@ -95,127 +95,127 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const ANIM_OBJ_40
const ANIM_OBJ_41
const ANIM_OBJ_42
const ANIM_OBJ_43
const ANIM_OBJ_SONICBOOM_JP
const ANIM_OBJ_44
const ANIM_OBJ_ABSORB
const ANIM_OBJ_46
const ANIM_OBJ_EGG
const ANIM_OBJ_47
const ANIM_OBJ_48
const ANIM_OBJ_49
const ANIM_OBJ_LEECH_SEED
const ANIM_OBJ_4B
const ANIM_OBJ_4C
const ANIM_OBJ_4D
const ANIM_OBJ_WAVE
const ANIM_OBJ_CONFUSE_RAY
const ANIM_OBJ_4E
const ANIM_OBJ_4F
const ANIM_OBJ_50
const ANIM_OBJ_51
const ANIM_OBJ_SCREEN
const ANIM_OBJ_HARDEN
const ANIM_OBJ_CHICK
const ANIM_OBJ_53
const ANIM_OBJ_54
const ANIM_OBJ_AMNESIA
const ANIM_OBJ_ASLEEP
const ANIM_OBJ_SKULL
const ANIM_OBJ_56
const ANIM_OBJ_57
const ANIM_OBJ_58
const ANIM_OBJ_PARALYZED
const ANIM_OBJ_5A
const ANIM_OBJ_STRING_SHOT
const ANIM_OBJ_HAZE
const ANIM_OBJ_MIST
const ANIM_OBJ_SMOG
const ANIM_OBJ_POISON_GAS
const ANIM_OBJ_HORN
const ANIM_OBJ_60
const ANIM_OBJ_61
const ANIM_OBJ_62
const ANIM_OBJ_63
const ANIM_OBJ_PETAL_DANCE
const ANIM_OBJ_SLUDGE_BOMB
const ANIM_OBJ_PAY_DAY
const ANIM_OBJ_64
const ANIM_OBJ_65
const ANIM_OBJ_66
const ANIM_OBJ_67
const ANIM_OBJ_68
const ANIM_OBJ_69
const ANIM_OBJ_6A
const ANIM_OBJ_6B
const ANIM_OBJ_6C
const ANIM_OBJ_6D
const ANIM_OBJ_SKY_ATTACK_FEAROW
const ANIM_OBJ_MIMIC
const ANIM_OBJ_ATTRACT
const ANIM_OBJ_BONEMERANG
const ANIM_OBJ_BONE_CLUB
const ANIM_OBJ_BONE_RUSH
const ANIM_OBJ_SWIFT
const ANIM_OBJ_KINESIS
const ANIM_OBJ_FLASH
const ANIM_OBJ_SHINY
const ANIM_OBJ_SKY_ATTACK
const ANIM_OBJ_LICK
const ANIM_OBJ_WITHDRAW
const ANIM_OBJ_71
const ANIM_OBJ_72
const ANIM_OBJ_73
const ANIM_OBJ_74
const ANIM_OBJ_75
const ANIM_OBJ_76
const ANIM_OBJ_77
const ANIM_OBJ_78
const ANIM_OBJ_79
const ANIM_OBJ_GROWTH
const ANIM_OBJ_CONVERSION2
const ANIM_OBJ_SMOKE
const ANIM_OBJ_SMOKESCREEN
const ANIM_OBJ_SWORDS_DANCE
const ANIM_OBJ_SPEED_LINE
const ANIM_OBJ_SHARPEN
const ANIM_OBJ_DEFENSE_CURL
const ANIM_OBJ_7A
const ANIM_OBJ_7B
const ANIM_OBJ_7C
const ANIM_OBJ_7D
const ANIM_OBJ_DISABLE
const ANIM_OBJ_AGILITY
const ANIM_OBJ_HEART
const ANIM_OBJ_7F
const ANIM_OBJ_80
const ANIM_OBJ_FLAME_WHEEL
const ANIM_OBJ_SACRED_FIRE
const ANIM_OBJ_COTTON_SPORE
const ANIM_OBJ_82
const ANIM_OBJ_83
const ANIM_OBJ_MILK_DRINK
const ANIM_OBJ_ANGER
const ANIM_OBJ_84
const ANIM_OBJ_85
const ANIM_OBJ_86
const ANIM_OBJ_87
const ANIM_OBJ_88
const ANIM_OBJ_89
const ANIM_OBJ_8A
const ANIM_OBJ_8B
const ANIM_OBJ_8C
const ANIM_OBJ_8D
const ANIM_OBJ_BATON_PASS
const ANIM_OBJ_LOCK_ON
const ANIM_OBJ_MIND_READER
const ANIM_OBJ_SAFEGUARD
const ANIM_OBJ_PROTECT
const ANIM_OBJ_THIEF
const ANIM_OBJ_OCTAZOOKA
const ANIM_OBJ_PRESENT
const ANIM_OBJ_SPIKES
const ANIM_OBJ_8F
const ANIM_OBJ_90
const ANIM_OBJ_91
const ANIM_OBJ_92
const ANIM_OBJ_POWDER_SNOW
const ANIM_OBJ_DRAGONBREATH
const ANIM_OBJ_CONVERSION
const ANIM_OBJ_SPIDER_WEB
const ANIM_OBJ_93
const ANIM_OBJ_94
const ANIM_OBJ_95
const ANIM_OBJ_96
const ANIM_OBJ_97
const ANIM_OBJ_98
const ANIM_OBJ_NIGHTMARE
const ANIM_OBJ_IN_NIGHTMARE
const ANIM_OBJ_LOVELY_KISS
const ANIM_OBJ_SWEET_KISS
const ANIM_OBJ_SKETCH
const ANIM_OBJ_99
const ANIM_OBJ_9A
const ANIM_OBJ_9B
const ANIM_OBJ_9C
const ANIM_OBJ_9D
const ANIM_OBJ_9E
const ANIM_OBJ_9F
const ANIM_OBJ_DESTINY_BOND
const ANIM_OBJ_MORNING_SUN
const ANIM_OBJ_GLIMMER
const ANIM_OBJ_MOONLIGHT
const ANIM_OBJ_HIDDEN_POWER
const ANIM_OBJ_A0
const ANIM_OBJ_A1
const ANIM_OBJ_A2
const ANIM_OBJ_A3
const ANIM_OBJ_A4
const ANIM_OBJ_A5
const ANIM_OBJ_SANDSTORM
const ANIM_OBJ_ZAP_CANNON
const ANIM_OBJ_SPITE
const ANIM_OBJ_CURSE
const ANIM_OBJ_PERISH_SONG
const ANIM_OBJ_A7
const ANIM_OBJ_A8
const ANIM_OBJ_A9
const ANIM_OBJ_FORESIGHT
const ANIM_OBJ_RAPID_SPIN
const ANIM_OBJ_SWAGGER
const ANIM_OBJ_AA
const ANIM_OBJ_AB
const ANIM_OBJ_AC
const ANIM_OBJ_MEAN_LOOK
const ANIM_OBJ_AD
const ANIM_OBJ_AE
const ANIM_OBJ_AF
const ANIM_OBJ_RAIN
const ANIM_OBJ_B0
const ANIM_OBJ_B1
const ANIM_OBJ_B2
const ANIM_OBJ_B3
const ANIM_OBJ_B4
const ANIM_OBJ_B5
const ANIM_OBJ_PSYCH_UP
const ANIM_OBJ_ANCIENTPOWER
const ANIM_OBJ_AEROBLAST
const ANIM_OBJ_SHADOW_BALL
const ANIM_OBJ_ROCK_SMASH
const ANIM_OBJ_FLOWER
const ANIM_OBJ_COTTON
const ANIM_OBJ_PLAYERFEETFOLLOW
const ANIM_OBJ_ENEMYFEETFOLLOW
const ANIM_OBJ_BA
const ANIM_OBJ_BB
const ANIM_OBJ_PLAYERHEADFOLLOW
const ANIM_OBJ_ENEMYHEADFOLLOW
; DoBattleAnimFrame arguments (see engine/battle_anims/functions.asm)
const_def

View File

@ -17,8 +17,18 @@ MIN_NEUTRAL_DAMAGE EQU 2
REST_SLEEP_TURNS EQU 2
TREEMON_SLEEP_TURNS EQU 7
; PlayerStatLevels and EnemyStatLevels indexes
; used for GetStatName
; default move priority
BASE_PRIORITY EQU 1
; type effectiveness factors, scaled by 10
SUPER_EFFECTIVE EQU 20
MORE_EFFECTIVE EQU 15
EFFECTIVE EQU 10
NOT_VERY_EFFECTIVE EQU 05
NO_EFFECT EQU 00
; PlayerStatLevels and EnemyStatLevels indexes (see wram.asm)
; GetStatName arguments (see data/battle/stat_names.asm)
const_def
const ATTACK
const DEFENSE
@ -53,6 +63,7 @@ const_value set 1
const STAT_SATK
const STAT_SDEF
NUM_STATS EQU const_value
STAT_SPC EQU STAT_SATK
; stat formula constants
STAT_MIN_NORMAL EQU 5

View File

@ -1,4 +1,13 @@
; BattleTowerAction arguments (see mobile/battle_tower_5c.asm)
BATTLETOWER_PARTY_LENGTH EQU 3
BATTLETOWER_STREAK_LENGTH EQU 7
BATTLETOWER_NUM_UNIQUE_PKMN EQU 21
BATTLETOWER_NUM_UNIQUE_TRAINERS EQU 70
BATTLETOWER_TRAINERDATALENGTH EQU $24
BATTLE_TOWER_STRUCT_LENGTH EQU $e0 ; NAME_LENGTH + BATTLETOWER_PARTY_LENGTH * (PARTYMON_STRUCT_LENGTH + MON_NAME_LENGTH) + BATTLETOWER_TRAINERDATALENGTH
; BattleTowerAction writebyte arguments (see engine/events/battle_tower/battle_tower.asm)
const_def
const BATTLETOWERACTION_CHECK_EXPLANATION_READ
const BATTLETOWERACTION_SET_EXPLANATION_READ
@ -33,19 +42,20 @@
const BATTLETOWERACTION_CHOOSEREWARD ; save options
const BATTLETOWERACTION_SAVEOPTIONS
; sBattleTowerChallengeState
; BattleTowerAction return values
; - from BATTLETOWERACTION_CHECKMOBILEEVENT
MOBILE_EVENT_OBJECT_GS_BALL EQU $b
; BattleTowerText arguments (see engine/events/battle_tower/trainer_text.asm)
const_value set 1
const BATTLETOWERTEXT_INTRO
const BATTLETOWERTEXT_WIN_TEXT
const BATTLETOWERTEXT_LOSS_TEXT
; sBattleTowerChallengeState values
const_def
const BATTLETOWER_NO_CHALLENGE
const BATTLETOWER_SAVED_AND_LEFT
const BATTLETOWER_CHALLENGE_IN_PROGESS
const BATTLETOWER_WON_CHALLENGE
const BATTLETOWER_RECEIVED_REWARD
BATTLETOWER_NROFPKMNS EQU 3
BATTLETOWER_TRAINERDATALENGTH EQU $24
BATTLETOWER_NROFTRAINERS EQU 7
BATTLETOWER_NRMONSPERLEVELBRACKET EQU BATTLETOWER_NROFPKMNS * BATTLETOWER_NROFTRAINERS
BATTLE_TOWER_STRUCT_LENGTH EQU $e0 ; NAME_LENGTH + 3 * (PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH) + BATTLETOWER_TRAINERDATALENGTH
; return value from BattleTowerAction(BATTLETOWERACTION_CHECKMOBILEEVENT)
MOBILE_EVENT_OBJECT_GS_BALL EQU $b

View File

@ -1,36 +0,0 @@
; GetSGBLayout arguments (see engine/cgb_layouts.asm and engine/sgb_layouts.asm)
const_def
const SCGB_BATTLE_GRAYSCALE
const SCGB_BATTLE_COLORS
const SCGB_POKEGEAR_PALS
const SCGB_STATS_SCREEN_HP_PALS
const SCGB_POKEDEX
const SCGB_SLOT_MACHINE
const SCGB_06
const SCGB_07
const SCGB_DIPLOMA
const SCGB_MAPPALS
const SCGB_PARTY_MENU
const SCGB_EVOLUTION
const SCGB_0C
const SCGB_0D
const SCGB_MOVE_LIST
const SCGB_0F
const SCGB_POKEDEX_SEARCH_OPTION
const SCGB_11
const SCGB_POKEPIC
const SCGB_13
const SCGB_PACKPALS
const SCGB_TRAINER_CARD
const SCGB_POKEDEX_UNOWN_MODE
const SCGB_BILLS_PC
const SCGB_UNOWN_PUZZLE
const SCGB_GAMEFREAK_LOGO
const SCGB_PLAYER_OR_MON_FRONTPIC_PALS
const SCGB_TRADE_TUBE
const SCGB_TRAINER_OR_MON_FRONTPIC_PALS
const SCGB_MYSTERY_GIFT
const SCGB_1E
SCGB_PARTY_MENU_HP_PALS EQU -4
SCGB_RAM EQU -1

View File

@ -1,10 +1,10 @@
; collision permissions (see tilesets/collision_permissions.asm)
; collision permissions (see data/collision_permissions.asm)
LANDTILE EQU $00
WATERTILE EQU $01
WALLTILE EQU $0f
TALK EQU $10
; collision data types (see tilesets/*_collision.asm)
; collision data types (see data/tilesets/*_collision.asm)
; TileCollisionTable indexes (see data/collision_permissions.asm)
COLL_FLOOR EQU $00
COLL_01 EQU $01 ; garbage
@ -28,19 +28,19 @@ COLL_CUT_28 EQU $28 ; garbage
COLL_WATER EQU $29
COLL_ICE_2B EQU $2b ; unused
COLL_WHIRLPOOL_2C EQU $2c ; unused
COLL_WATERFALL_RIGHT EQU $30 ; unused !!!
COLL_WATERFALL_LEFT EQU $31 ; unused !!!
COLL_WATERFALL_UP EQU $32 ; unused !!!
COLL_WATERFALL_RIGHT EQU $30 ; unused
COLL_WATERFALL_LEFT EQU $31 ; unused
COLL_WATERFALL_UP EQU $32 ; unused
COLL_WATERFALL EQU $33
COLL_CURRENT_RIGHT EQU $38 ; unused !!!
COLL_CURRENT_LEFT EQU $39 ; unused !!!
COLL_CURRENT_UP EQU $3a ; unused !!!
COLL_CURRENT_DOWN EQU $3b ; unused !!!
COLL_BRAKE EQU $40 ; unused !!!
COLL_WALK_RIGHT EQU $41 ; unused !!!
COLL_WALK_LEFT EQU $42 ; unused !!!
COLL_WALK_UP EQU $43 ; unused !!!
COLL_WALK_DOWN EQU $44 ; unused !!!
COLL_CURRENT_RIGHT EQU $38 ; unused
COLL_CURRENT_LEFT EQU $39 ; unused
COLL_CURRENT_UP EQU $3a ; unused
COLL_CURRENT_DOWN EQU $3b ; unused
COLL_BRAKE EQU $40 ; unused
COLL_WALK_RIGHT EQU $41 ; unused
COLL_WALK_LEFT EQU $42 ; unused
COLL_WALK_UP EQU $43 ; unused
COLL_WALK_DOWN EQU $44 ; unused
COLL_BRAKE_45 EQU $45 ; garbage
COLL_BRAKE_46 EQU $46 ; unused
COLL_BRAKE_47 EQU $47 ; unused
@ -92,16 +92,16 @@ COLL_WINDOW EQU $9d
COLL_INCENSE_BURNER EQU $9f
COLL_HOP_RIGHT EQU $a0
COLL_HOP_LEFT EQU $a1
COLL_HOP_UP EQU $a2 ; unused !!!
COLL_HOP_UP EQU $a2 ; unused
COLL_HOP_DOWN EQU $a3
COLL_HOP_DOWN_RIGHT EQU $a4
COLL_HOP_DOWN_LEFT EQU $a5
COLL_HOP_UP_RIGHT EQU $a6 ; unused !!!
COLL_HOP_UP_LEFT EQU $a7 ; unused !!!
COLL_HOP_UP_RIGHT EQU $a6 ; unused
COLL_HOP_UP_LEFT EQU $a7 ; unused
COLL_RIGHT_WALL EQU $b0
COLL_LEFT_WALL EQU $b1
COLL_UP_WALL EQU $b2
COLL_DOWN_WALL EQU $b3 ; unused !!!
COLL_DOWN_WALL EQU $b3 ; unused
COLL_FF EQU $ff ; garbage
; collision data type nybbles

View File

@ -1,13 +1,14 @@
LEN_1BPP_TILE EQU 8 ; bytes
LEN_2BPP_TILE EQU 16 ; bytes
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
SCREEN_WIDTH EQU 20 ; tiles
PALRGB_WHITE EQUS "palred 31 + palgreen 31 + palblue 31" ; $7fff
SCREEN_WIDTH EQU 20 ; tiles
SCREEN_HEIGHT EQU 18 ; tiles
SCREEN_WIDTH_PX EQU SCREEN_WIDTH * TILE_WIDTH ; pixels
SCREEN_WIDTH_PX EQU SCREEN_WIDTH * TILE_WIDTH ; pixels
SCREEN_HEIGHT_PX EQU SCREEN_HEIGHT * TILE_WIDTH ; pixels
BG_MAP_WIDTH EQU 32 ; tiles
@ -15,9 +16,16 @@ BG_MAP_HEIGHT EQU 32 ; tiles
WMISC_WIDTH EQU 6 * 4
WMISC_HEIGHT EQU 5 * 4
HP_BAR_LENGTH EQU 6 ; tiles
HP_BAR_LENGTH_PX EQU HP_BAR_LENGTH * TILE_WIDTH ; pixels
HP_BAR_LENGTH EQU 6 ; tiles
EXP_BAR_LENGTH EQU 8 ; tiles
HP_BAR_LENGTH_PX EQU HP_BAR_LENGTH * TILE_WIDTH ; pixels
EXP_BAR_LENGTH_PX EQU EXP_BAR_LENGTH * TILE_WIDTH ; pixels
PALPACKET_LENGTH EQU $10
; sprite_oam_struct members (see macros/wram.asm)
const_def
const SPRITEOAMSTRUCT_YCOORD ; 0
const SPRITEOAMSTRUCT_XCOORD ; 1
const SPRITEOAMSTRUCT_TILE_ID ; 2
const SPRITEOAMSTRUCT_ATTRIBUTES ; 3
SPRITEOAMSTRUCT_LENGTH EQU const_value
NUM_SPRITE_OAM_STRUCTS EQU 40 ; see Sprites

View File

@ -56,7 +56,7 @@ VRAM_BANK_1 EQU 1 << OAM_TILE_BANK ; $08
OBP_NUM EQU 1 << OAM_OBP_NUM ; $10
X_FLIP EQU 1 << OAM_X_FLIP ; $20
Y_FLIP EQU 1 << OAM_Y_FLIP ; $40
BEHIND_BG EQU 1 << OAM_PRIORITY ; $80
PRIORITY EQU 1 << OAM_PRIORITY ; $80
; Other useful constants
LCDC_DEFAULT EQU %11100011

File diff suppressed because it is too large Load Diff

View File

@ -9,21 +9,15 @@
const ITEMATTR_HELP
ITEMATTR_STRUCT_LENGTH EQU const_value
; pack pockets
ITEM EQU 1
KEY_ITEM EQU 2
BALL EQU 3
TM_HM EQU 4
; pack pocket sizes
MAX_ITEMS EQU 20
MAX_KEY_ITEMS EQU 25
MAX_BALLS EQU 12
MAX_PC_ITEMS EQU 50
; item types
const_value set 1
const ITEM ; 1
const KEY_ITEM ; 2
const BALL ; 3
const TM_HM ; 4
; item menu types
; UseItem.dw indexes (see engine/pack.asm)
ITEMMENU_NOUSE EQU 0
ITEMMENU_CURRENT EQU 4
ITEMMENU_PARTY EQU 5
@ -34,7 +28,22 @@ CANT_SELECT EQU 1 << 6
CANT_TOSS EQU 1 << 7
; pack pockets
const_def
const ITEM_POCKET ; 0
const BALL_POCKET ; 1
const KEY_ITEM_POCKET ; 2
const TM_HM_POCKET ; 3
NUM_POCKETS EQU const_value +- 1
MAX_ITEMS EQU 20
MAX_BALLS EQU 12
MAX_KEY_ITEMS EQU 25
MAX_PC_ITEMS EQU 50
; mail
MAIL_LINE_LENGTH EQU $10
MAIL_MSG_LENGTH EQU $20
MAILBOX_CAPACITY EQU 10
MAIL_STRUCT_LENGTH EQU $2f ; mailmsg struct
@ -163,8 +172,7 @@ const_value set 70
const MART_UNDERGROUND
; PartyMenuActionText values
; GetPartyMenuTilemapPointers arguments (see engine/party_menu.asm)
; PartyMenuQualityPointers indexes (see data/party_menu_qualities.asm)
const_def
const PARTYMENUACTION_CHOOSE_POKEMON
const PARTYMENUACTION_HEALING_ITEM

View File

@ -100,3 +100,14 @@ KANTO_LANDMARK EQU const_value
const TOHJO_FALLS ; 5d
const ROUTE_28 ; 5e
const FAST_SHIP ; 5f
; used in CaughtData
GIFT_LOCATION EQU $7e
EVENT_LOCATION EQU $7f
; Regions
const_def
const JOHTO_REGION ; 0
const KANTO_REGION ; 1
NUM_REGIONS EQU const_value

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More