Skip to content

Commit

Permalink
Require rgbds 0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Oct 3, 2022
1 parent 2b52ceb commit f58dbe3
Show file tree
Hide file tree
Showing 18 changed files with 43 additions and 373 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@master
with:
path: rgbds
ref: v0.5.2
ref: v0.6.0
repository: gbdev/rgbds

- name: Install rgbds
Expand Down
22 changes: 11 additions & 11 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Then follow the [**rgbds** install instructions](https://rgbds.gbdev.io/install#pre-built) for Windows with Cygwin to install **rgbds 0.5.2**.
Then follow the [**rgbds** install 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.

Expand All @@ -67,7 +67,7 @@ Install [**Homebrew**](https://brew.sh/). Follow the official instructions.

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 **pokered**](#build-pokered).

Expand All @@ -84,7 +84,7 @@ To install the software required for **pokered**:
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

Expand All @@ -94,7 +94,7 @@ To install the software required for **pokered**:
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

Expand All @@ -104,9 +104,9 @@ To install the software required for **pokered**:
sudo pacman -S make gcc git
```

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

Expand All @@ -122,7 +122,7 @@ To 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

Expand All @@ -133,7 +133,7 @@ If your distro is not listed here, try to find the required software in its repo
- `git`
- `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 **pokered**](#build-pokered).

Expand All @@ -155,8 +155,8 @@ make

### 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 pokered, such as `pokered/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 pokered, such as `pokered/rgbds-0.6.0/`. Then specify it when you run `make`:

```bash
make RGBDS=rgbds-0.5.2/
make RGBDS=rgbds-0.6.0/
```
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ tools:
$(MAKE) -C tools/


RGBASMFLAGS = -h -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`
ifeq ($(DEBUG),1)
RGBASMFLAGS += -E
Expand All @@ -107,7 +107,7 @@ rgbdscheck.o: rgbdscheck.asm
# 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.
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 $$@ $$<
endef

Expand All @@ -125,8 +125,8 @@ $(foreach obj, $(pokered_vc_obj), $(eval $(call DEP,$(obj),$(obj:_red_vc.o=.asm)
$(foreach obj, $(pokeblue_vc_obj), $(eval $(call DEP,$(obj),$(obj:_blue_vc.o=.asm))))

# Dependencies for VC files that need to run scan_includes
%.constants.sym: %.constants.asm $(shell tools/scan_includes %.constants.asm) | rgbdscheck.o
$(RGBASM) $< > $@
%.constants.sym: %.constants.asm $(shell tools/scan_includes %.constants.asm) | includes.asm rgbdscheck.o
$(RGBASM) $(RGBASMFLAGS) $< > $@

endif

Expand Down Expand Up @@ -156,13 +156,13 @@ pokeblue_vc_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x13 -r 03 -t "POKEMON BLUE"
gfx/battle/move_anim_0.2bpp: tools/gfx += --trim-whitespace
gfx/battle/move_anim_1.2bpp: tools/gfx += --trim-whitespace

gfx/intro/blue_jigglypuff_1.2bpp: rgbgfx += -h
gfx/intro/blue_jigglypuff_2.2bpp: rgbgfx += -h
gfx/intro/blue_jigglypuff_3.2bpp: rgbgfx += -h
gfx/intro/red_nidorino_1.2bpp: rgbgfx += -h
gfx/intro/red_nidorino_2.2bpp: rgbgfx += -h
gfx/intro/red_nidorino_3.2bpp: rgbgfx += -h
gfx/intro/gengar.2bpp: rgbgfx += -h
gfx/intro/blue_jigglypuff_1.2bpp: rgbgfx += -Z
gfx/intro/blue_jigglypuff_2.2bpp: rgbgfx += -Z
gfx/intro/blue_jigglypuff_3.2bpp: rgbgfx += -Z
gfx/intro/red_nidorino_1.2bpp: rgbgfx += -Z
gfx/intro/red_nidorino_2.2bpp: rgbgfx += -Z
gfx/intro/red_nidorino_3.2bpp: rgbgfx += -Z
gfx/intro/gengar.2bpp: rgbgfx += -Z
gfx/intro/gengar.2bpp: tools/gfx += --remove-duplicates --preserve=0x19,0x76

gfx/credits/the_end.2bpp: tools/gfx += --interleave --png=$<
Expand Down
3 changes: 0 additions & 3 deletions audio.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
INCLUDE "constants.asm"


SECTION "Sound Effect Headers 1", ROMX
INCLUDE "audio/headers/sfxheaders1.asm"

Expand Down
3 changes: 0 additions & 3 deletions home.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
INCLUDE "constants.asm"


SECTION "NULL", ROM0
NULL::

Expand Down
15 changes: 14 additions & 1 deletion constants.asm → includes.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
INCLUDE "charmap.asm"

INCLUDE "macros.asm"
INCLUDE "macros/asserts.asm"
INCLUDE "macros/const.asm"
INCLUDE "macros/predef.asm"
INCLUDE "macros/farcall.asm"
INCLUDE "macros/data.asm"
INCLUDE "macros/code.asm"
INCLUDE "macros/gfx.asm"
INCLUDE "macros/coords.asm"
INCLUDE "macros/vc.asm"

INCLUDE "macros/scripts/audio.asm"
INCLUDE "macros/scripts/maps.asm"
INCLUDE "macros/scripts/events.asm"
INCLUDE "macros/scripts/text.asm"

INCLUDE "constants/hardware_constants.asm"
INCLUDE "constants/oam_constants.asm"
Expand Down
14 changes: 0 additions & 14 deletions macros.asm

This file was deleted.

3 changes: 0 additions & 3 deletions main.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
INCLUDE "constants.asm"


SECTION "bank1", ROMX

INCLUDE "data/sprites/facings.asm"
Expand Down
3 changes: 0 additions & 3 deletions maps.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
INCLUDE "constants.asm"


SECTION "Maps 1", ROMX

INCLUDE "data/maps/headers/CeladonCity.asm"
Expand Down
2 changes: 0 additions & 2 deletions ram.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
INCLUDE "constants.asm"

INCLUDE "macros/ram.asm"


Expand Down
12 changes: 5 additions & 7 deletions rgbdscheck.asm
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
MAJOR EQU 0
MINOR EQU 5
PATCH EQU 2
MINOR EQU 6
PATCH EQU 0

MACRO wrong_rgbds
fail "pokered requires rgbds v0.5.2 or newer."
ENDM
WRONG_RGBDS EQUS "fail \"pokered requires rgbds v0.6.0 or newer.\""

IF !DEF(__RGBDS_MAJOR__) || !DEF(__RGBDS_MINOR__) || !DEF(__RGBDS_PATCH__)
wrong_rgbds
WRONG_RGBDS
ELSE
IF (__RGBDS_MAJOR__ < MAJOR) || \
(__RGBDS_MAJOR__ == MAJOR && __RGBDS_MINOR__ < MINOR) || \
(__RGBDS_MAJOR__ == MAJOR && __RGBDS_MINOR__ == MINOR && __RGBDS_PATCH__ < PATCH) || \
(__RGBDS_MAJOR__ == MAJOR && __RGBDS_MINOR__ == MINOR && __RGBDS_PATCH__ == PATCH && DEF(__RGBDS_RC__))
wrong_rgbds
WRONG_RGBDS
ENDC
ENDC
3 changes: 0 additions & 3 deletions text.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
INCLUDE "constants.asm"


SECTION "Text 1", ROMX

INCLUDE "data/text/text_1.asm"
Expand Down
2 changes: 1 addition & 1 deletion tools/free_space.awk
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function register_bank(amount) {
}
}

rom_bank && toupper($0) ~ /^[ \t]*EMPTY/ {
rom_bank && toupper($0) ~ /^[ \t]*EMPTY$/ {
# Empty bank
register_bank(16384)
}
Expand Down
69 changes: 0 additions & 69 deletions tools/free_space.py

This file was deleted.

Loading

0 comments on commit f58dbe3

Please sign in to comment.