Require rgbds 0.6.0

This commit is contained in:
Rangi
2022-10-02 22:03:53 -04:00
parent 70a3ec1acc
commit 8e135931a6
85 changed files with 93 additions and 429 deletions

View File

@@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@master uses: actions/checkout@master
with: with:
path: rgbds path: rgbds
ref: v0.5.2 ref: v0.6.0
repository: gbdev/rgbds repository: gbdev/rgbds
- name: Install rgbds - name: Install rgbds

View File

@@ -42,9 +42,9 @@ Run setup and leave the default settings. At the "**Select Packages**" step, cho
Double click on the text that says "**Skip**" next to each package to select the most recent version to install. Double click on the text that says "**Skip**" next to each package to select the most recent version to install.
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#pre-built) for Windows with Cygwin to install **rgbds 0.5.2**. Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#pre-built) for Windows with Cygwin to install **rgbds 0.6.0**.
**Note:** If you already have an older rgbds, you will need to update to 0.5.2. Ignore this if you have never installed rgbds before. If a version newer than 0.5.2 does not work, try downloading 0.5.2. **Note:** If you already have an older rgbds, you will need to update to 0.6.0. Ignore this if you have never installed rgbds before. If a version newer than 0.6.0 does not work, try downloading 0.6.0.
Now open the **Cygwin terminal** and enter the following commands. Now open the **Cygwin terminal** and enter the following commands.
@@ -67,7 +67,7 @@ Install [**Homebrew**](https://brew.sh/). Follow the official instructions.
Open **Terminal** and prepare to enter commands. Open **Terminal** and prepare to enter commands.
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#pre-built) for macOS to install **rgbds 0.5.2**. Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#pre-built) for macOS to install **rgbds 0.6.0**.
Now you're ready to [build **pokecrystal**](#build-pokecrystal). Now you're ready to [build **pokecrystal**](#build-pokecrystal).
@@ -84,7 +84,7 @@ To install the software required for **pokecrystal**:
sudo apt-get install make gcc git sudo apt-get install make gcc git
``` ```
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.5.2** from source. Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.6.0** from source.
### OpenSUSE ### OpenSUSE
@@ -94,7 +94,7 @@ To install the software required for **pokecrystal**:
sudo zypper install make gcc git sudo zypper install make gcc git
``` ```
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.5.2** from source. Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.6.0** from source.
### Arch Linux ### Arch Linux
@@ -104,9 +104,9 @@ To install the software required for **pokecrystal**:
sudo pacman -S make gcc git rgbds sudo pacman -S make gcc git rgbds
``` ```
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#pre-built) for Arch Linux to install **rgbds 0.5.2**. Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#pre-built) for Arch Linux to install **rgbds 0.6.0**.
If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.5.2** from source. If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.6.0** from source.
### Termux ### Termux
@@ -122,7 +122,7 @@ To install **rgbds**:
sudo apt install rgbds sudo apt install rgbds
``` ```
If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.5.2** from source. If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.6.0** from source.
### Other distros ### Other distros
@@ -133,7 +133,7 @@ If your distro is not listed here, try to find the required software in its repo
- `git` - `git`
- `rgbds` - `rgbds`
If `rgbds` is not available, you'll need to follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.5.2** from source. If `rgbds` is not available, you'll need to follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.6.0** from source.
Now you're ready to [build **pokecrystal**](#build-pokecrystal). Now you're ready to [build **pokecrystal**](#build-pokecrystal).
@@ -161,12 +161,12 @@ make crystal11
### Build with a local rgbds version ### Build with a local rgbds version
If you have different projects that require different versions of `rgbds`, it might not be convenient to install rgbds 0.5.2 globally. Instead, you can put its files in a directory within pokecrystal, such as `pokecrystal/rgbds-0.5.2/`. Then specify it when you run `make`: If you have different projects that require different versions of `rgbds`, it might not be convenient to install rgbds 0.6.0 globally. Instead, you can put its files in a directory within pokecrystal, such as `pokecrystal/rgbds-0.6.0/`. Then specify it when you run `make`:
```bash ```bash
make RGBDS=rgbds-0.5.2/ make RGBDS=rgbds-0.6.0/
``` ```
```bash ```bash
make RGBDS=rgbds-0.5.2/ crystal11 make RGBDS=rgbds-0.6.0/ crystal11
``` ```

View File

@@ -104,7 +104,7 @@ tools:
$(MAKE) -C tools/ $(MAKE) -C tools/
RGBASMFLAGS = -L -Weverything -Wnumeric-string=2 -Wtruncation=1 RGBASMFLAGS = -hL -Q8 -P includes.asm -Weverything -Wnumeric-string=2 -Wtruncation=1
# Create a sym/map for debug purposes if `make` run with `DEBUG=1` # Create a sym/map for debug purposes if `make` run with `DEBUG=1`
ifeq ($(DEBUG),1) ifeq ($(DEBUG),1)
RGBASMFLAGS += -E RGBASMFLAGS += -E
@@ -121,13 +121,13 @@ $(pokecrystal11_vc_obj): RGBASMFLAGS += -D _CRYSTAL11 -D _CRYSTAL11_VC
tools/make_patch $*_vc.sym $^ $@ tools/make_patch $*_vc.sym $^ $@
rgbdscheck.o: rgbdscheck.asm rgbdscheck.o: rgbdscheck.asm
$(RGBASM) -o $@ $< $(RGBASM) $(RGBASMFLAGS) -o $@ $<
# The dep rules have to be explicit or else missing files won't be reported. # 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. # As a side effect, they're evaluated immediately instead of when the rule is invoked.
# It doesn't look like $(shell) can be deferred so there might not be a better way. # It doesn't look like $(shell) can be deferred so there might not be a better way.
define DEP define DEP
$1: $2 $$(shell tools/scan_includes $2) | rgbdscheck.o $1: $2 $$(shell tools/scan_includes $2) | includes.asm rgbdscheck.o
$$(RGBASM) $$(RGBASMFLAGS) -o $$@ $$< $$(RGBASM) $$(RGBASMFLAGS) -o $$@ $$<
endef endef
@@ -146,8 +146,8 @@ $(foreach obj, $(pokecrystal11_debug_obj), $(eval $(call DEP,$(obj),$(obj:11_deb
$(foreach obj, $(pokecrystal11_vc_obj), $(eval $(call DEP,$(obj),$(obj:11_vc.o=.asm)))) $(foreach obj, $(pokecrystal11_vc_obj), $(eval $(call DEP,$(obj),$(obj:11_vc.o=.asm))))
# Dependencies for VC files that need to run scan_includes # Dependencies for VC files that need to run scan_includes
%.constants.sym: %.constants.asm $(shell tools/scan_includes %.constants.asm) | rgbdscheck.o %.constants.sym: %.constants.asm $(shell tools/scan_includes %.constants.asm) | includes.asm rgbdscheck.o
$(RGBASM) $< > $@ $(RGBASM) $(RGBASMFLAGS) $< > $@
endif endif
@@ -208,14 +208,15 @@ gfx/pokemon/girafarig/front.animated.tilemap: gfx/pokemon/girafarig/front.2bpp g
### Misc file-specific graphics rules ### Misc file-specific graphics rules
gfx/pokemon/%/back.2bpp: rgbgfx += -h gfx/pokemon/%/back.2bpp: rgbgfx += -Z -c embedded
gfx/pokemon/%/front.2bpp: rgbgfx += -c embedded
gfx/trainers/%.2bpp: rgbgfx += -h gfx/trainers/%.2bpp: rgbgfx += -Z -c embedded
gfx/pokemon/egg/unused_front.2bpp: rgbgfx += -h gfx/pokemon/egg/unused_front.2bpp: rgbgfx += -Z
gfx/new_game/shrink1.2bpp: rgbgfx += -h gfx/new_game/shrink1.2bpp: rgbgfx += -Z
gfx/new_game/shrink2.2bpp: rgbgfx += -h gfx/new_game/shrink2.2bpp: rgbgfx += -Z
gfx/mail/dragonite.1bpp: tools/gfx += --remove-whitespace gfx/mail/dragonite.1bpp: tools/gfx += --remove-whitespace
gfx/mail/large_note.1bpp: tools/gfx += --remove-whitespace gfx/mail/large_note.1bpp: tools/gfx += --remove-whitespace
@@ -225,7 +226,7 @@ gfx/mail/litebluemail_border.1bpp: tools/gfx += --remove-whitespace
gfx/pokedex/pokedex.2bpp: tools/gfx += --trim-whitespace gfx/pokedex/pokedex.2bpp: tools/gfx += --trim-whitespace
gfx/pokedex/pokedex_sgb.2bpp: tools/gfx += --trim-whitespace gfx/pokedex/pokedex_sgb.2bpp: tools/gfx += --trim-whitespace
gfx/pokedex/question_mark.2bpp: rgbgfx += -h gfx/pokedex/question_mark.2bpp: rgbgfx += -Z
gfx/pokedex/slowpoke.2bpp: tools/gfx += --trim-whitespace gfx/pokedex/slowpoke.2bpp: tools/gfx += --trim-whitespace
gfx/pokegear/pokegear.2bpp: rgbgfx += -x2 gfx/pokegear/pokegear.2bpp: rgbgfx += -x2
@@ -266,13 +267,13 @@ gfx/battle_anims/rocks.2bpp: tools/gfx += --remove-whitespace
gfx/battle_anims/skyattack.2bpp: tools/gfx += --remove-whitespace gfx/battle_anims/skyattack.2bpp: tools/gfx += --remove-whitespace
gfx/battle_anims/status.2bpp: tools/gfx += --remove-whitespace gfx/battle_anims/status.2bpp: tools/gfx += --remove-whitespace
gfx/player/chris.2bpp: rgbgfx += -h gfx/player/chris.2bpp: rgbgfx += -Z
gfx/player/chris_back.2bpp: rgbgfx += -h gfx/player/chris_back.2bpp: rgbgfx += -Z
gfx/player/kris.2bpp: rgbgfx += -h gfx/player/kris.2bpp: rgbgfx += -Z
gfx/player/kris_back.2bpp: rgbgfx += -h gfx/player/kris_back.2bpp: rgbgfx += -Z
gfx/trainer_card/chris_card.2bpp: rgbgfx += -h gfx/trainer_card/chris_card.2bpp: rgbgfx += -Z
gfx/trainer_card/kris_card.2bpp: rgbgfx += -h gfx/trainer_card/kris_card.2bpp: rgbgfx += -Z
gfx/trainer_card/leaders.2bpp: tools/gfx += --trim-whitespace gfx/trainer_card/leaders.2bpp: tools/gfx += --trim-whitespace
gfx/overworld/chris_fish.2bpp: tools/gfx += --trim-whitespace gfx/overworld/chris_fish.2bpp: tools/gfx += --trim-whitespace
@@ -280,7 +281,7 @@ gfx/overworld/kris_fish.2bpp: tools/gfx += --trim-whitespace
gfx/sprites/big_onix.2bpp: tools/gfx += --remove-whitespace --remove-xflip gfx/sprites/big_onix.2bpp: tools/gfx += --remove-whitespace --remove-xflip
gfx/battle/dude.2bpp: rgbgfx += -h gfx/battle/dude.2bpp: rgbgfx += -Z
gfx/font/unused_bold_font.1bpp: tools/gfx += --trim-whitespace gfx/font/unused_bold_font.1bpp: tools/gfx += --trim-whitespace

View File

@@ -1,6 +1,3 @@
INCLUDE "constants.asm"
SECTION "Audio", ROMX SECTION "Audio", ROMX
INCLUDE "audio/engine.asm" INCLUDE "audio/engine.asm"

View File

@@ -420,5 +420,12 @@
; ASCII charmap, for mobile functions ; ASCII charmap, for mobile functions
pushc pushc
newcharmap ascii newcharmap ascii
DEF PRINTABLE_ASCII EQUS " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz\{|}~"
for i, STRLEN("{PRINTABLE_ASCII}")
charmap STRSUB("{PRINTABLE_ASCII}", i + 1, 1), i + $20
endr
charmap "\t", $09
charmap "\n", $0a
charmap "\r", $0d
popc popc

View File

@@ -1,6 +1,3 @@
INCLUDE "constants.asm"
SECTION "Maps", ROMX SECTION "Maps", ROMX
INCLUDE "data/maps/maps.asm" INCLUDE "data/maps/maps.asm"

View File

@@ -1,6 +1,3 @@
INCLUDE "constants.asm"
SECTION "Pokedex Entries 001-064", ROMX SECTION "Pokedex Entries 001-064", ROMX
BulbasaurPokedexEntry:: INCLUDE "data/pokemon/dex_entries/bulbasaur.asm" BulbasaurPokedexEntry:: INCLUDE "data/pokemon/dex_entries/bulbasaur.asm"

View File

@@ -1,6 +1,3 @@
INCLUDE "constants.asm"
SECTION "Egg Moves", ROMX SECTION "Egg Moves", ROMX
; All instances of Charm, Steel Wing, Sweet Scent, and Lovely Kiss were ; All instances of Charm, Steel Wing, Sweet Scent, and Lovely Kiss were

View File

@@ -1,6 +1,3 @@
INCLUDE "constants.asm"
SECTION "Evolutions and Attacks", ROMX SECTION "Evolutions and Attacks", ROMX
; Evos+attacks data structure: ; Evos+attacks data structure:

View File

@@ -1,6 +1,3 @@
INCLUDE "constants.asm"
SECTION "Text 1", ROMX SECTION "Text 1", ROMX
INCLUDE "data/text/common_1.asm" INCLUDE "data/text/common_1.asm"

View File

@@ -771,11 +771,9 @@ And on `sine_table` in [macros/data.asm](https://github.com/pret/pokecrystal/blo
```asm ```asm
MACRO sine_table MACRO sine_table
; \1 samples of sin(x) from x=0 to x<32768 (pi radians) ; \1 samples of sin(x) from x=0 to x<0.5 turns (pi radians)
DEF x = 0 for x, \1
rept \1 dw sin(x * 0.5 / (\1))
dw (sin(x) + (sin(x) & $ff)) >> 8 ; round up
DEF x += DIV(32768, \1) ; a circle has 65536 "degrees"
endr endr
ENDM ENDM
``` ```

View File

@@ -799,6 +799,7 @@ ReceiveInfraredLEDOn:
xor a xor a
ldh [rIF], a ldh [rIF], a
halt halt
nop
ldh a, [c] ldh a, [c]
bit rRP_RECEIVING, a bit rRP_RECEIVING, a
jr z, .recv_loop jr z, .recv_loop
@@ -813,6 +814,7 @@ ReceiveInfraredLEDOff:
xor a xor a
ldh [rIF], a ldh [rIF], a
halt halt
nop
ldh a, [c] ldh a, [c]
bit rRP_RECEIVING, a bit rRP_RECEIVING, a
jr nz, .no_recv_loop jr nz, .no_recv_loop
@@ -829,6 +831,7 @@ SendInfraredLEDOn:
xor a xor a
ldh [rIF], a ldh [rIF], a
halt halt
nop
jr .wait jr .wait
SendInfraredLEDOff: SendInfraredLEDOff:
@@ -841,6 +844,7 @@ SendInfraredLEDOff:
xor a xor a
ldh [rIF], a ldh [rIF], a
halt halt
nop
jr .wait jr .wait
InitializeIRCommunicationRoles: InitializeIRCommunicationRoles:
@@ -1037,6 +1041,7 @@ SendIRDataMessage:
xor a xor a
ldh [rIF], a ldh [rIF], a
halt halt
nop
ld a, rRP_ENABLE_READ_MASK | (1 << rRP_LED_ON) ld a, rRP_ENABLE_READ_MASK | (1 << rRP_LED_ON)
ldh [rRP], a ldh [rRP], a
; Turn the LED off for longer if the bit is 1 ; Turn the LED off for longer if the bit is 1
@@ -1057,6 +1062,7 @@ SendIRDataMessage:
xor a xor a
ldh [rIF], a ldh [rIF], a
halt halt
nop
.no_halt .no_halt
ldh a, [hMGNumBits] ldh a, [hMGNumBits]
dec a dec a
@@ -1070,6 +1076,7 @@ SendIRDataMessage:
xor a xor a
ldh [rIF], a ldh [rIF], a
halt halt
nop
ld d, 5 ld d, 5
call SendInfraredLEDOn call SendInfraredLEDOn

View File

@@ -1,6 +1,3 @@
INCLUDE "constants.asm"
SECTION "Credits", ROMX SECTION "Credits", ROMX
Credits:: Credits::

View File

@@ -1,6 +1,3 @@
INCLUDE "constants.asm"
SECTION "Events", ROMX SECTION "Events", ROMX
OverworldLoop:: OverworldLoop::

View File

@@ -1,6 +1,3 @@
INCLUDE "constants.asm"
; PokemonPicPointers and UnownPicPointers are assumed to start at the same ; PokemonPicPointers and UnownPicPointers are assumed to start at the same
; address, but in different banks. This is enforced in layout.link. ; address, but in different banks. This is enforced in layout.link.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 B

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 B

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 347 B

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 B

After

Width:  |  Height:  |  Size: 279 B

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