Merge pull request #414 from roukaour/master

Improve sprite constants and documentation
This commit is contained in:
yenatch
2017-12-12 19:13:53 -05:00
committed by GitHub
80 changed files with 1958 additions and 1583 deletions

32
FAQ.md Normal file
View File

@@ -0,0 +1,32 @@
# FAQ
## 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.
## Can't build ROM; "ERROR: `UNION` already defined"
Download [**rgbds 0.3.3**](rgbds). Earlier versions will not work.
## Can't build ROM; "Segmentation fault" from `rgbgfx`
If you are using 64-bit Windows, download [**64-bit Cygwin**](cygwin) and [**64-bit rgbds**](rgbds).
## Can't build ROM; "Section is too big" or "Unable to place section in bank"
If you have not changed any of the asm, make sure you have the latest version of pokecrystal and the correct version of rgbds (see [INSTALL.md](INSTALL.md)).
If you added or changed any code, it has to fit in the **memory banks**. The 2MB ROM is divided into 128 banks of 4KB each, numbered $00 to $7F. The linkerscript **pokecrystal.link** lists which **`SECTION`**s go in which banks. Try moving some code into a new section.
## How do I edit maps?
For `asm` scripts, read [docs/map_scripts.md](docs/map_scripts.md). For `blk` layouts, try [crowdmap](crowdmap) or [Polished Map](polished-map).
## I need more help!
Try asking on IRC or Discord (see [README.md](README.md)).
[cygwin]: https://cygwin.com/install.html
[rgbds]: https://github.com/rednex/rgbds/releases
[crowdmap]: https://github.com/yenatch/crowdmap/
[polished-map]: https://github.com/roukaour/polished-map

View File

@@ -1,10 +1,12 @@
The source files are assembled into a rom using [**rgbds**](https://github.com/rednex/rgbds). # Instructions
The source files are assembled into a ROM using [**rgbds**](https://github.com/rednex/rgbds).
These instructions explain how to set up the tools required to build. These instructions explain how to set up the tools required to build.
If you run into trouble, ask for help on irc or discord (see [README.md](README.md)). If you run into trouble, ask for help on IRC or Discord (see [README.md](README.md)).
# Linux ## Linux
```bash ```bash
sudo apt-get install make gcc bison git libpng-dev sudo apt-get install make gcc bison git libpng-dev
@@ -25,7 +27,7 @@ make
``` ```
# Mac ## Mac
In **Terminal**, run: In **Terminal**, run:
@@ -48,24 +50,23 @@ make
``` ```
# Windows ## Windows
To build on Windows, install [**Cygwin**](http://cygwin.com/install.html) with the default settings. Download [**Cygwin**](http://cygwin.com/install.html): **setup-x86_64.exe** for 64-bit Windows, **setup-x86.exe** for 32-bit.
Run setup and leave the default settings. At "Select Packages", choose to install the following:
In the installer, select the following packages:
- `make` - `make`
- `git` - `git`
- `gcc-core` - `gcc-core`
Then download [**rgbds**](https://github.com/rednex/rgbds/releases/). Then download [**rgbds**](https://github.com/rednex/rgbds/releases/): the latest **win64.tar.gz** or **win32.tar.gz** release. Extract it and put all the `exe` and `dll` files individually in **C:\Cygwin64\usr\local\bin**.
Extract rgbds-0.3.3-win64.tar.gz and put all the `exe` and `dll` files individually in **C:\Cygwin64\usr\local\bin**. If you are using 32-bit Windows and Cygwin, extract **rgbds-0.3.3-win32.tar.gz** to **C:\Cygwin\usr\local\bin**.
**Note: If you have an older rgbds, you will need to update to 0.3.3 or newer.** Ignore this if you have never installed rgbds before. **Note: If you have an older rgbds, you will need to update to 0.3.3 or newer.** Ignore this if you have never installed rgbds before.
In the **Cygwin terminal**: In the **Cygwin terminal**, enter these commands:
```bash ```bash
git clone https://github.com/pret/pokecrystal git clone https://github.com/pret/pokecrystal
cd pokecrystal cd pokecrystal
``` ```
@@ -75,3 +76,9 @@ To build **pokecrystal.gbc**:
```bash ```bash
make make
``` ```
To build **pokecrystal11.gbc**:
```bash
make crystal11
```

View File

@@ -10,6 +10,7 @@ It builds the following roms:
To set up the repository, see [INSTALL.md](INSTALL.md). To set up the repository, see [INSTALL.md](INSTALL.md).
## See also ## See also
* Disassembly of [**Pokémon Red/Blue**][pokered] * Disassembly of [**Pokémon Red/Blue**][pokered]
* Disassembly of [**Pokémon Yellow**][pokeyellow] * Disassembly of [**Pokémon Yellow**][pokeyellow]
* Disassembly of [**Pokémon Pinball**][pokepinball] * Disassembly of [**Pokémon Pinball**][pokepinball]

View File

@@ -1394,8 +1394,7 @@ ParseMusicCommand: ; e870f
; e8720 ; e8720
MusicCommands: ; e8720 MusicCommands: ; e8720
; pointer to each command in order ; entries correspond to macros/sound.asm enumeration
; octaves
dw Music_Octave8 ; octave 8 dw Music_Octave8 ; octave 8
dw Music_Octave7 ; octave 7 dw Music_Octave7 ; octave 7
dw Music_Octave6 ; octave 6 dw Music_Octave6 ; octave 6

View File

@@ -352,6 +352,7 @@ RunBattleAnimCommand: ; cc25f
BattleAnimCommands:: ; cc2a4 (33:42a4) BattleAnimCommands:: ; cc2a4 (33:42a4)
; entries correspond to macros/move_anim.asm enumeration
dw BattleAnimCmd_Obj dw BattleAnimCmd_Obj
dw BattleAnimCmd_1GFX dw BattleAnimCmd_1GFX
dw BattleAnimCmd_2GFX dw BattleAnimCmd_2GFX

View File

@@ -33,6 +33,7 @@ INCLUDE "constants/deco_constants.asm"
INCLUDE "constants/radio_constants.asm" INCLUDE "constants/radio_constants.asm"
INCLUDE "constants/npctrade_constants.asm" INCLUDE "constants/npctrade_constants.asm"
INCLUDE "constants/sprite_constants.asm" INCLUDE "constants/sprite_constants.asm"
INCLUDE "constants/sprite_data_constants.asm"
INCLUDE "constants/tileset_constants.asm" INCLUDE "constants/tileset_constants.asm"
INCLUDE "constants/cgb_constants.asm" INCLUDE "constants/cgb_constants.asm"
INCLUDE "constants/battle_tower_constants.asm" INCLUDE "constants/battle_tower_constants.asm"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -2,36 +2,36 @@
; Maps with permission ROUTE or TOWN can only use these sprites. ; Maps with permission ROUTE or TOWN can only use these sprites.
OutdoorSprites: ; 144b8 OutdoorSprites: ; 144b8
dw Group1Sprites dw OlivineGroupSprites
dw Group2Sprites dw MahoganyGroupSprites
dw Group3Sprites dw DungeonsGroupSprites
dw Group4Sprites dw EcruteakGroupSprites
dw Group5Sprites dw BlackthornGroupSprites
dw Group6Sprites dw CinnabarGroupSprites
dw Group7Sprites dw CeruleanGroupSprites
dw Group8Sprites dw AzaleaGroupSprites
dw Group9Sprites dw LakeOfRageGroupSprites
dw Group10Sprites dw VioletGroupSprites
dw Group11Sprites dw GoldenrodGroupSprites
dw Group12Sprites dw VermilionGroupSprites
dw Group13Sprites dw PalletGroupSprites
dw Group14Sprites dw PewterGroupSprites
dw Group15Sprites dw FastShipGroupSprites
dw Group16Sprites dw IndigoGroupSprites
dw Group17Sprites dw FuchsiaGroupSprites
dw Group18Sprites dw LavenderGroupSprites
dw Group19Sprites dw SilverGroupSprites
dw Group20Sprites dw CableClubGroupSprites
dw Group21Sprites dw CeladonGroupSprites
dw Group22Sprites dw CianwoodGroupSprites
dw Group23Sprites dw ViridianGroupSprites
dw Group24Sprites dw NewBarkGroupSprites
dw Group25Sprites dw SaffronGroupSprites
dw Group26Sprites dw CherrygroveGroupSprites
; 144ec ; 144ec
Group13Sprites: ; 144ec PalletGroupSprites: ; 144ec
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -57,7 +57,7 @@ Group13Sprites: ; 144ec
db SPRITE_FRUIT_TREE db SPRITE_FRUIT_TREE
; 14503 ; 14503
Group23Sprites: ; 14503 ViridianGroupSprites: ; 14503
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -83,7 +83,7 @@ Group23Sprites: ; 14503
db SPRITE_FRUIT_TREE db SPRITE_FRUIT_TREE
; 1451a ; 1451a
Group14Sprites: ; 1451a PewterGroupSprites: ; 1451a
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -109,7 +109,7 @@ Group14Sprites: ; 1451a
db SPRITE_FRUIT_TREE db SPRITE_FRUIT_TREE
; 14531 ; 14531
Group6Sprites: ; 14531 CinnabarGroupSprites: ; 14531
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -135,7 +135,7 @@ Group6Sprites: ; 14531
db SPRITE_FRUIT_TREE db SPRITE_FRUIT_TREE
; 14548 ; 14548
Group7Sprites: ; 14548 CeruleanGroupSprites: ; 14548
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -161,7 +161,7 @@ Group7Sprites: ; 14548
db SPRITE_SLOWPOKE db SPRITE_SLOWPOKE
; 1455f ; 1455f
Group25Sprites: ; 1455f SaffronGroupSprites: ; 1455f
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -187,7 +187,7 @@ Group25Sprites: ; 1455f
db SPRITE_SLOWPOKE db SPRITE_SLOWPOKE
; 14576 ; 14576
Group21Sprites: ; 14576 CeladonGroupSprites: ; 14576
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -213,7 +213,7 @@ Group21Sprites: ; 14576
db SPRITE_FRUIT_TREE db SPRITE_FRUIT_TREE
; 1458d ; 1458d
Group18Sprites: ; 1458d LavenderGroupSprites: ; 1458d
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -239,7 +239,7 @@ Group18Sprites: ; 1458d
db SPRITE_FRUIT_TREE db SPRITE_FRUIT_TREE
; 145a4 ; 145a4
Group12Sprites: ; 145a4 VermilionGroupSprites: ; 145a4
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -265,7 +265,7 @@ Group12Sprites: ; 145a4
db SPRITE_FRUIT_TREE db SPRITE_FRUIT_TREE
; 145bb ; 145bb
Group17Sprites: ; 145bb FuchsiaGroupSprites: ; 145bb
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -291,7 +291,7 @@ Group17Sprites: ; 145bb
db SPRITE_FRUIT_TREE db SPRITE_FRUIT_TREE
; 145d2 ; 145d2
Group16Sprites: ; 145d2 IndigoGroupSprites: ; 145d2
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -317,7 +317,7 @@ Group16Sprites: ; 145d2
db SPRITE_BOULDER db SPRITE_BOULDER
; 145e9 ; 145e9
Group24Sprites: ; 145e9 NewBarkGroupSprites: ; 145e9
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -343,7 +343,7 @@ Group24Sprites: ; 145e9
db SPRITE_FRUIT_TREE db SPRITE_FRUIT_TREE
; 14600 ; 14600
Group26Sprites: ; 14600 CherrygroveGroupSprites: ; 14600
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -369,7 +369,7 @@ Group26Sprites: ; 14600
db SPRITE_FRUIT_TREE db SPRITE_FRUIT_TREE
; 14617 ; 14617
Group19Sprites: ; 14617 SilverGroupSprites: ; 14617
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -395,7 +395,7 @@ Group19Sprites: ; 14617
db SPRITE_FRUIT_TREE db SPRITE_FRUIT_TREE
; 1462e ; 1462e
Group10Sprites: ; 1462e VioletGroupSprites: ; 1462e
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -421,7 +421,7 @@ Group10Sprites: ; 1462e
db SPRITE_FRUIT_TREE db SPRITE_FRUIT_TREE
; 14645 ; 14645
Group4Sprites: ; 14645 EcruteakGroupSprites: ; 14645
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -447,7 +447,7 @@ Group4Sprites: ; 14645
db SPRITE_FRUIT_TREE db SPRITE_FRUIT_TREE
; 1465c ; 1465c
Group8Sprites: ; 1465c AzaleaGroupSprites: ; 1465c
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -473,7 +473,7 @@ Group8Sprites: ; 1465c
db SPRITE_SLOWPOKE db SPRITE_SLOWPOKE
; 14673 ; 14673
Group11Sprites: ; 14673 GoldenrodGroupSprites: ; 14673
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_POKE_BALL db SPRITE_POKE_BALL
@@ -499,7 +499,7 @@ Group11Sprites: ; 14673
db SPRITE_SLOWPOKE db SPRITE_SLOWPOKE
; 1468a ; 1468a
Group22Sprites: ; 1468a CianwoodGroupSprites: ; 1468a
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -525,7 +525,7 @@ Group22Sprites: ; 1468a
db SPRITE_ROCK db SPRITE_ROCK
; 146a1 ; 146a1
Group1Sprites: ; 146a1 OlivineGroupSprites: ; 146a1
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -551,7 +551,7 @@ Group1Sprites: ; 146a1
db SPRITE_ROCK db SPRITE_ROCK
; 146b8 ; 146b8
Group9Sprites: ; 146b8 LakeOfRageGroupSprites: ; 146b8
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -577,7 +577,7 @@ Group9Sprites: ; 146b8
db SPRITE_POKE_BALL db SPRITE_POKE_BALL
; 146cf ; 146cf
Group2Sprites: ; 146cf MahoganyGroupSprites: ; 146cf
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -603,7 +603,7 @@ Group2Sprites: ; 146cf
db SPRITE_POKE_BALL db SPRITE_POKE_BALL
; 146e6 ; 146e6
Group5Sprites: ; 146e6 BlackthornGroupSprites: ; 146e6
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -629,7 +629,7 @@ Group5Sprites: ; 146e6
db SPRITE_POKE_BALL db SPRITE_POKE_BALL
; 146fd ; 146fd
Group3Sprites: ; 146fd DungeonsGroupSprites: ; 146fd
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -655,7 +655,7 @@ Group3Sprites: ; 146fd
db SPRITE_BOULDER db SPRITE_BOULDER
; 14714 ; 14714
Group15Sprites: ; 14714 FastShipGroupSprites: ; 14714
db SPRITE_SUICUNE db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY db SPRITE_SILVER_TROPHY
db SPRITE_FAMICOM db SPRITE_FAMICOM
@@ -681,7 +681,7 @@ Group15Sprites: ; 14714
db SPRITE_ROCK db SPRITE_ROCK
; 1472b ; 1472b
Group20Sprites: ; 1472b CableClubGroupSprites: ; 1472b
db SPRITE_OAK db SPRITE_OAK
db SPRITE_FISHER db SPRITE_FISHER
db SPRITE_TEACHER db SPRITE_TEACHER

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -3,8 +3,8 @@ SpriteAnimSeqData: ; 8d1c4
; frameset sequence, tile ; frameset sequence, tile
; SPRITE_ANIM_INDEX_PARTY_MON ; SPRITE_ANIM_INDEX_PARTY_MON
db SPRITE_ANIM_FRAMESET_PARTY_MON, SPRITE_ANIM_SEQ_PARTY_MON, $00 db SPRITE_ANIM_FRAMESET_PARTY_MON, SPRITE_ANIM_SEQ_PARTY_MON, $00
; SPRITE_ANIM_INDEX_01 ; SPRITE_ANIM_INDEX_GS_TITLE_TRAIL
db SPRITE_ANIM_FRAMESET_07, SPRITE_ANIM_SEQ_04, $00 db SPRITE_ANIM_FRAMESET_GS_TITLE_TRAIL, SPRITE_ANIM_SEQ_GS_TITLE_TRAIL, $00
; SPRITE_ANIM_INDEX_NAMING_SCREEN_CURSOR ; SPRITE_ANIM_INDEX_NAMING_SCREEN_CURSOR
db SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR, SPRITE_ANIM_SEQ_NAMING_SCREEN_CURSOR, $05 db SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR, SPRITE_ANIM_SEQ_NAMING_SCREEN_CURSOR, $05
; SPRITE_ANIM_INDEX_GAMEFREAK_LOGO ; SPRITE_ANIM_INDEX_GAMEFREAK_LOGO
@@ -23,12 +23,12 @@ SpriteAnimSeqData: ; 8d1c4
db SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR, SPRITE_ANIM_SEQ_MAIL_CURSOR, $05 db SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR, SPRITE_ANIM_SEQ_MAIL_CURSOR, $05
; SPRITE_ANIM_INDEX_RED_WALK ; SPRITE_ANIM_INDEX_RED_WALK
db SPRITE_ANIM_FRAMESET_RED_WALK, SPRITE_ANIM_SEQ_NULL, $00 db SPRITE_ANIM_FRAMESET_RED_WALK, SPRITE_ANIM_SEQ_NULL, $00
; SPRITE_ANIM_INDEX_0B ; SPRITE_ANIM_INDEX_UNUSED_CURSOR
db SPRITE_ANIM_FRAMESET_STILL_CURSOR, SPRITE_ANIM_SEQ_0D, $08 db SPRITE_ANIM_FRAMESET_STILL_CURSOR, SPRITE_ANIM_SEQ_FOR_UNUSED_CURSOR, $08
; SPRITE_ANIM_INDEX_DUMMY_GAME ; SPRITE_ANIM_INDEX_DUMMY_GAME
db SPRITE_ANIM_FRAMESET_STILL_CURSOR, SPRITE_ANIM_SEQ_0E, $08 db SPRITE_ANIM_FRAMESET_STILL_CURSOR, SPRITE_ANIM_SEQ_DUMMY_GAME_CURSOR, $08
; SPRITE_ANIM_INDEX_0D ; SPRITE_ANIM_INDEX_POKEGEAR_ARROW
db SPRITE_ANIM_FRAMESET_STILL_CURSOR, SPRITE_ANIM_SEQ_0F, $08 db SPRITE_ANIM_FRAMESET_STILL_CURSOR, SPRITE_ANIM_SEQ_POKEGEAR_ARROW, $08
; SPRITE_ANIM_INDEX_TRADE_POKE_BALL ; SPRITE_ANIM_INDEX_TRADE_POKE_BALL
db SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL, SPRITE_ANIM_SEQ_TRADE_POKE_BALL, $00 db SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL, SPRITE_ANIM_SEQ_TRADE_POKE_BALL, $00
; SPRITE_ANIM_INDEX_TRADE_POOF ; SPRITE_ANIM_INDEX_TRADE_POOF
@@ -65,18 +65,18 @@ SpriteAnimSeqData: ; 8d1c4
db SPRITE_ANIM_FRAMESET_BLUE_WALK, SPRITE_ANIM_SEQ_NULL, $00 db SPRITE_ANIM_FRAMESET_BLUE_WALK, SPRITE_ANIM_SEQ_NULL, $00
; SPRITE_ANIM_INDEX_MAGNET_TRAIN_BLUE ; SPRITE_ANIM_INDEX_MAGNET_TRAIN_BLUE
db SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_BLUE, SPRITE_ANIM_SEQ_NULL, $00 db SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_BLUE, SPRITE_ANIM_SEQ_NULL, $00
; SPRITE_ANIM_INDEX_20 ; SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_BALL
db SPRITE_ANIM_FRAMESET_2F, SPRITE_ANIM_SEQ_NULL, $00 db SPRITE_ANIM_FRAMESET_MOBILE_TRADE_SENT_BALL, SPRITE_ANIM_SEQ_NULL, $00
; SPRITE_ANIM_INDEX_21 ; SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_BALL
db SPRITE_ANIM_FRAMESET_30, SPRITE_ANIM_SEQ_NULL, $00 db SPRITE_ANIM_FRAMESET_MOBILE_TRADE_OT_BALL, SPRITE_ANIM_SEQ_NULL, $00
; SPRITE_ANIM_INDEX_22 ; SPRITE_ANIM_INDEX_MOBILE_22
db SPRITE_ANIM_FRAMESET_31, SPRITE_ANIM_SEQ_NULL, $00 db SPRITE_ANIM_FRAMESET_FOR_MOBILE_22, SPRITE_ANIM_SEQ_NULL, $00
; SPRITE_ANIM_INDEX_23 ; SPRITE_ANIM_INDEX_MOBILE_23
db SPRITE_ANIM_FRAMESET_32, SPRITE_ANIM_SEQ_1B, $00 db SPRITE_ANIM_FRAMESET_FOR_MOBILE_23, SPRITE_ANIM_SEQ_FOR_MOBILE_23, $00
; SPRITE_ANIM_INDEX_24 ; SPRITE_ANIM_INDEX_MOBILE_24
db SPRITE_ANIM_FRAMESET_33, SPRITE_ANIM_SEQ_1C, $00 db SPRITE_ANIM_FRAMESET_FOR_MOBILE_24, SPRITE_ANIM_SEQ_FOR_MOBILE_24, $00
; SPRITE_ANIM_INDEX_25 ; SPRITE_ANIM_INDEX_MOBILE_25
db SPRITE_ANIM_FRAMESET_34, SPRITE_ANIM_SEQ_NULL, $00 db SPRITE_ANIM_FRAMESET_FOR_MOBILE_25, SPRITE_ANIM_SEQ_NULL, $00
; SPRITE_ANIM_INDEX_INTRO_SUICUNE ; SPRITE_ANIM_INDEX_INTRO_SUICUNE
db SPRITE_ANIM_FRAMESET_INTRO_SUICUNE, SPRITE_ANIM_SEQ_INTRO_SUICUNE, $00 db SPRITE_ANIM_FRAMESET_INTRO_SUICUNE, SPRITE_ANIM_SEQ_INTRO_SUICUNE, $00
; SPRITE_ANIM_INDEX_INTRO_PICHU ; SPRITE_ANIM_INDEX_INTRO_PICHU

View File

@@ -1,4 +1,4 @@
# Scripting Commands # Event Commands
## `$00`: `scall` *script* ## `$00`: `scall` *script*

View File

@@ -3,7 +3,7 @@
## `const_value set 2` ## `const_value set 2`
### `const` *`MAPNAME_PERSONNAME`* - **`const` *`MAPNAME_PERSONNAME`***
## `MapName_MapScriptHeader:` ## `MapName_MapScriptHeader:`
@@ -11,24 +11,45 @@
## `.MapTriggers: db` *N* ## `.MapTriggers: db` *N*
### `maptrigger` *script* - **`maptrigger` *script***
## `.MapCallbacks: db` *N* ## `.MapCallbacks: db` *N*
### `dbw` *type*, *script* - **`dbw` *type*, *script***
Callback types:
- **`MAPCALLBACK_NEWMAP`**
- **`MAPCALLBACK_TILES`**
- **`MAPCALLBACK_OBJECTS`**
- **`MAPCALLBACK_SPRITES`**
- **`MAPCALLBACK_CMDQUEUE`**
**`dbw CMDQUEUE_STONETABLE,` *table_pointer***
**`stonetable` *warp_id*, *person*, *script***
**`db -1 ; end`**
## Scripts ## Event scripts
[Event commands](event_commands.md)
## Text ## Text
- **`text`** [Text commands](text_commands.md)
- **`line`**
- **`cont`**
- **`para`** ## Movement data
- **`done`**
[Movement commands](movement_commands.md)
## `MapName_MapEventHeader:` ## `MapName_MapEventHeader:`
@@ -39,19 +60,19 @@
## `.Warps: db` *N* ## `.Warps: db` *N*
### `warp_def` *y*, *x*, *warp_id*, *map* - **`warp_def` *y*, *x*, *warp_id*, *map***
## `.XYTriggers: db` *N* ## `.XYTriggers: db` *N*
### `xy_trigger` *id*, *y*, *x*, `$0`, *script*, `$0`, `$0` - **`xy_trigger` *id*, *y*, *x*, `$0`, *script*, `$0`, `$0`**
## `.Signposts: db` *N* ## `.Signposts: db` *N*
### `signpost` *y*, *x*, *type*, *script* - **`signpost` *y*, *x*, *type*, *script***
#### Signpost types: Signpost types:
- **`SIGNPOST_READ`** - **`SIGNPOST_READ`**
@@ -69,9 +90,9 @@
## `.PersonEvents: db` *N* ## `.PersonEvents: db` *N*
### `person_event` *sprite*, *y*, *x*, *movement*, *ry*, *rx*, *hour*, *daytime*, *palette*, *type*, *range*, *script*, *event_flag* - **`person_event` *sprite*, *y*, *x*, *movement*, *ry*, *rx*, *hour*, *daytime*, *palette*, *type*, *range*, *script*, *event_flag***
#### Movement types: Movement types:
- **`SPRITEMOVEDATA_ITEM_TREE`** - **`SPRITEMOVEDATA_ITEM_TREE`**
@@ -105,7 +126,7 @@
- **`SPRITEMOVEDATA_LAPRAS`** - **`SPRITEMOVEDATA_LAPRAS`**
#### Person types: Person types:
- **`PERSONTYPE_SCRIPT`** - **`PERSONTYPE_SCRIPT`**

View File

@@ -0,0 +1,99 @@
# Move Animation Commands
## `$00``$EF`: `anim_wait` *length*
## `$D0`: `anim_obj` *object*, *x*, *y*, *param*
## `$D1`: `anim_1gfx` *gfx*
## `$D2`: `anim_2gfx` *gfx1*, *gfx2*
## `$D3`: `anim_3gfx` *gfx1*, *gfx2*, *gfx3*
## `$D4`: `anim_4gfx` *gfx1*, *gfx2*, *gfx3*, *gfx4*
## `$D5`: `anim_5gfx` *gfx1*, *gfx2*, *gfx3*, *gfx4*, *gfx5*
## `$D6`: `anim_incobj` *id*
## `$D7`: `anim_setobj` *id*, *object*
## `$D8`: `anim_incbgeffect` *effect*
## `$D9`: `anim_enemyfeetobj`
## `$DA`: `anim_playerheadobj`
## `$DB`: `anim_checkpokeball`
## `$DC`: `anim_transform`
## `$DD`: `anim_raisesub`
## `$DE`: `anim_dropsub`
## `$DF`: `anim_resetobp0`
## `$E0`: `anim_sound` *duration*, *tracks*, *id*
## `$E1`: `anim_cry` *pitch*
## `$E2`: `anim_minimizeopp`
## `$E3`: `anim_oamon`
## `$E4`: `anim_oamoff`
## `$E5`: `anim_clearobjs`
## `$E6`: `anim_beatup`
## `$E7`: `anim_0xe7`
## `$E8`: `anim_updateactorpic`
## `$E9`: `anim_minimize`
## `$EA`: `anim_0xea`
## `$EB`: `anim_0xeb`
## `$EC`: `anim_0xec`
## `$ED`: `anim_0xed`
## `$EE`: `anim_if_param_and` *value*, *address*
## `$EF`: `anim_jumpuntil` *address*
## `$F0`: `anim_bgeffect` *effect*, *unknown1*, *unknown2*, *unknown3*
## `$F1`: `anim_bgp` *colors*
## `$F2`: `anim_obp0` *colors*
## `$F3`: `anim_obp1` *colors*
## `$F4`: `anim_clearsprites`
## `$F5`: `anim_0xf5`
## `$F6`: `anim_0xf6`
## `$F7`: `anim_0xf7`
## `$F8`: `anim_if_param_equal` *value*, *address*
## `$F9`: `anim_setvar` *value*
## `$FA`: `anim_incvar`
## `$FB`: `anim_if_var_equal` *value*, *address*
## `$FC`: `anim_jump` *address*
## `$FD`: `anim_loop` *count*, *address*
## `$FE`: `anim_call` *address*
## `$FF`: `anim_ret`

81
docs/movement_commands.md Normal file
View File

@@ -0,0 +1,81 @@
# Movement Commands
## `$00``$03`: `turn_head` *direction*
## `$04``$07`: `turn_step` *direction*
## `$08``$0B`: `slow_step` *direction*
## `$0C``$0F`: `step` *direction*
## `$10``$13`: `big_step` *direction*
## `$14``$17`: `slow_slide_step` *direction*
## `$18``$1B`: `slide_step` *direction*
## `$1C``$1F`: `fast_slide_step` *direction*
## `$20``$23`: `turn_away` *direction*
## `$24``$27`: `turn_in` *direction*
## `$28``$2B`: `turn_waterfall` *direction*
## `$2C``$2F`: `slow_jump_step` *direction*
## `$30``$33`: `jump_step` *direction*
## `$34``$37`: `fast_jump_step` *direction*
## `$38`: `remove_sliding`
## `$39`: `set_sliding`
## `$3A`: `remove_fixed_facing`
## `$3B`: `fix_facing`
## `$3C`: `show_person`
## `$3D`: `hide_person`
## `$3E``$46`: `step_sleep` *length*
## `$47`: `step_end`
## `$48`: `step_48` *param*
## `$49`: `remove_person`
## `$4A`: `step_loop`
## `$4B`: `step_4b`
## `$4C`: `teleport_from`
## `$4D`: `teleport_to`
## `$4E`: `skyfall`
## `$4F`: `step_dig` *length*
## `$50`: `step_bump`
## `$51`: `fish_got_bite`
## `$52`: `fish_cast_rod`
## `$53`: `hide_emote`
## `$54`: `show_emote`
## `$55`: `step_shake` *displacement*
## `$56`: `tree_shake`
## `$57`: `rock_smash` *length*
## `$58`: `return_dig` *length*
## `$59`: `skyfall_top`

132
docs/text_commands.md Normal file
View File

@@ -0,0 +1,132 @@
# Text Commands
## `$00`: `text` *text*
Start writing text until `"@"`.
## `$4E`: `next` *text*
Move a line down.
## `$4F`: `line` *text*
Start writing at the bottom line.
## `$50`: `page` *text*
Start a new Pokédex page.
## `$51`: `para` *text*
Start a new paragraph.
## `$55`: `cont` *text*
Scroll to the next line.
## `$57`: `done`
End a text box.
## `$58`: `prompt`
Prompt the player to end a text box (initiating some other event).
## `$01`: `text_from_ram` *address*
Write text from a RAM address.
## `$02`: `text_bcd` *address*, *flags*
Write [BCD](bcd) from an address, typically RAM.
[bcd]: https://en.wikipedia.org/wiki/Binary-coded_decimal
## `$03`: `text_move` *address*
Move to a new tile.
## `$04`: `text_box` *address*, *height*, *width*
Draw a box.
## `$05`: `text_low`
Write text at (1, 16).
## `$06`: `text_waitbutton`
Wait for button press; show arrow.
## `$07`: `text_scroll`
Pushes text up two lines and sets the `bc` cursor to the border tile below the
first character column of the text box.
## `$08`: `start_asm`
Start interpreting assembly code.
## `$09`: `deciram` *address*, *bytes*, *digits*
Read *bytes* bytes from *address* and print them as a *digits*-digit number.
## `$0A`: `interpret_data`
Exit.
## `$0B`: `sound_dex_fanfare_50_79`
Play `SFX_DEX_FANFARE_50_79`.
## `$0C`: `limited_interpret_data` *number*
Print *number* `"…"`s.
## `$0D`: `link_wait_button`
Wait for button press; show arrow.
## `$0E`: `sound_dex_fanfare_20_49`
Play `SFX_DEX_FANFARE_20_49`.
## `$0F`: `sound_item`
Play `SFX_ITEM`.
## `$10`: `sound_caught_mon`
Play `SFX_CAUGHT_MON`.
## `$11`: `sound_dex_fanfare_80_109`
Play `SFX_DEX_FANFARE_80_109`.
## `$12`: `sound_fanfare`
Play `SFX_FANFARE`.
## `$13`: `sound_slot_machine_start`
Play `SFX_SLOT_MACHINE_START`.
## `$14`: `text_buffer` *id*
Write text from one of the following addresses (listed in `StringBufferPointers`):
0. `StringBuffer3`
1. `StringBuffer4`
2. `StringBuffer5`
3. `StringBuffer2`
4. `StringBuffer1`
5. `EnemyMonNick`
6. `BattleMonNick`
## `$15`: `current_day`
Print the weekday.
## `$16`: `text_jump` *address*
Write text from a different bank.

View File

@@ -1341,7 +1341,7 @@ Function639b: ; unreferenced
ld h, 0 ld h, 0
add hl, hl add hl, hl
add hl, hl add hl, hl
ld de, Data63ca ld de, .Data63ca
add hl, de add hl, de
; If bit 2 of [wTitleScreenTimer] is set, get the second dw; else, get the first dw ; If bit 2 of [wTitleScreenTimer] is set, get the second dw; else, get the first dw
ld a, [wTitleScreenTimer] ld a, [wTitleScreenTimer]
@@ -1357,12 +1357,12 @@ Function639b: ; unreferenced
ret z ret z
ld e, a ld e, a
ld d, [hl] ld d, [hl]
ld a, SPRITE_ANIM_INDEX_01 ld a, SPRITE_ANIM_INDEX_GS_TITLE_TRAIL
call _InitSpriteAnimStruct call _InitSpriteAnimStruct
ret ret
; 63ca ; 63ca
Data63ca: ; 63ca .Data63ca: ; 63ca
; frame 0 y, x; frame 1 y, x ; frame 0 y, x; frame 1 y, x
db 11 * 8 + 4, 10 * 8, 0 * 8, 0 * 8 db 11 * 8 + 4, 10 * 8, 0 * 8, 0 * 8
db 11 * 8 + 4, 13 * 8, 11 * 8 + 4, 11 * 8 db 11 * 8 + 4, 13 * 8, 11 * 8 + 4, 11 * 8

View File

@@ -144,11 +144,11 @@ PartyMenu_InitAnimatedMonIcon: ; 8e8d5 (23:68d5)
pop bc pop bc
pop hl pop hl
jr c, .mail jr c, .mail
ld a, SPRITE_ANIM_FRAMESET_03 ld a, SPRITE_ANIM_FRAMESET_PARTY_MON_WITH_ITEM
jr .okay jr .okay
.mail .mail
ld a, SPRITE_ANIM_FRAMESET_02 ld a, SPRITE_ANIM_FRAMESET_PARTY_MON_WITH_MAIL
.okay .okay
ld hl, SPRITEANIMSTRUCT_FRAMESET_ID ld hl, SPRITEANIMSTRUCT_FRAMESET_ID
add hl, bc add hl, bc
@@ -297,7 +297,7 @@ GetMemIconGFX: ; 8e9db (23:69db)
ld a, [wCurIconTile] ld a, [wCurIconTile]
GetIconGFX: ; 8e9de GetIconGFX: ; 8e9de
call GetIcon_a call GetIcon_a
ld de, $80 ; 8 tiles ld de, 8 tiles
add hl, de add hl, de
ld de, HeldItemIcons ld de, HeldItemIcons
lb bc, BANK(HeldItemIcons), 2 lb bc, BANK(HeldItemIcons), 2
@@ -468,9 +468,6 @@ ReadMonMenuIcon: ; 8eab3
INCLUDE "data/mon_menu_icons.asm" INCLUDE "data/mon_menu_icons.asm"
INCLUDE "gfx/icon_pointers.asm" INCLUDE "gfx/icon_pointers.asm"
Icons:
INCLUDE "gfx/icons.asm" INCLUDE "gfx/icons.asm"

View File

@@ -1,4 +1,5 @@
MovementPointers: ; 5075 MovementPointers: ; 5075
; entries correspond to macros/movement.asm enumeration
dw Movement_turn_head_down ; 00 dw Movement_turn_head_down ; 00
dw Movement_turn_head_up ; 01 dw Movement_turn_head_up ; 01
dw Movement_turn_head_left ; 02 dw Movement_turn_head_left ; 02

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