From b920ea060aca9e95b215425770c3facfd25a6914 Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 18 Apr 2021 15:20:48 -0400 Subject: Explain how to use a local copy of rgbds --- INSTALL.md | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 57c9e987..135a745a 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -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/windows) for Windows with Cygwin to install **rgbds 0.4.2**. +Then follow the [**rgbds** install instructions](https://rgbds.gbdev.io/install/windows) for Windows with Cygwin to install **rgbds 0.5.0**. -**Note:** If you already have an older rgbds, you will need to update to 0.4.2. Ignore this if you have never installed rgbds before. If a version newer than 0.4.2 does not work, try downloading 0.4.2. +**Note:** If you already have an older rgbds, you will need to update to 0.5.0. Ignore this if you have never installed rgbds before. If a version newer than 0.5.0 does not work, try downloading 0.5.0. 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. -Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/macos) for macOS to install **rgbds 0.4.2**. +Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/macos) for macOS to install **rgbds 0.5.0**. Now you're ready to [build **pokered**](#build-pokered). @@ -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/source) to build **rgbds 0.4.2** from source. +Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.5.0** from source. ### OpenSUSE @@ -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/source) to build **rgbds 0.4.2** from source. +Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.5.0** from source. ### Arch Linux @@ -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/arch) for Arch Linux to install **rgbds 0.4.2**. +Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/arch) for Arch Linux to install **rgbds 0.5.0**. -If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.4.2** from source. +If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.5.0** from source. ### Termux @@ -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/source) to build **rgbds 0.4.2** from source. +If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.5.0** from source. ### Other distros @@ -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/source) to build **rgbds 0.4.2** from source. +If `rgbds` is not available, you'll need to follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.5.0** from source. Now you're ready to [build **pokered**](#build-pokered). @@ -152,3 +152,11 @@ To build **pokered.gbc** and **pokeblue.gbc**: ```bash 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.0 globally. Instead, you can put its files in a directory within pokered, such as `pokered/rgbds-0.5.0/`. Then specifiy it when you run `make`: + +```bash +make RGBDS=rgbds-0.5.0/ +``` -- cgit v1.3.1-sl0p From e2c8614cb1a888cc38f7b103953241db78b7f34f Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 18 Apr 2021 15:22:00 -0400 Subject: Fix a typo --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 135a745a..e981ee5f 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -155,7 +155,7 @@ 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.0 globally. Instead, you can put its files in a directory within pokered, such as `pokered/rgbds-0.5.0/`. Then specifiy 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.5.0 globally. Instead, you can put its files in a directory within pokered, such as `pokered/rgbds-0.5.0/`. Then specify it when you run `make`: ```bash make RGBDS=rgbds-0.5.0/ -- cgit v1.3.1-sl0p From 21ff7695173821ac333039df4ab1c68c227aea0a Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 18 Apr 2021 15:32:06 -0400 Subject: Install rgbds with `brew` on macOS so Travis CI will pass Building rgbds on macOS with `make` uses the system `bison`, which is an older version that doesn't support `-Wall`. --- .travis.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a0b965f7..0b0973db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,9 +5,13 @@ os: install: - |- ( cd - git clone -b v0.5.0 --depth=1 https://github.com/gbdev/rgbds - sudo make -C rgbds install - rm -rf rgbds + if [ $TRAVIS_OS_NAME = linux ]; then + git clone -b v0.5.0 --depth=1 https://github.com/gbdev/rgbds; + sudo make -C rgbds install; + rm -rf rgbds; + else + brew install rgbds; + fi ) before_script: - |- -- cgit v1.3.1-sl0p From 5d74bf5126b57c6aef45f5a67e2cb1cbccb5a980 Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 18 Apr 2021 15:49:34 -0400 Subject: Don't let brew auto-update everything, just install rgbds --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0b0973db..e5c15e79 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ install: sudo make -C rgbds install; rm -rf rgbds; else - brew install rgbds; + HOMEBREW_NO_AUTO_UPDATE=1 brew install rgbds; fi ) before_script: -- cgit v1.3.1-sl0p From 84694218926e2668ef137783f3c2607f62fa936f Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 18 Apr 2021 15:57:28 -0400 Subject: Change how Travis CI builds on macOS Install an updated version of bison with brew, then build rgbds with make --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index e5c15e79..4896c98e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,13 +5,13 @@ os: install: - |- ( cd - if [ $TRAVIS_OS_NAME = linux ]; then - git clone -b v0.5.0 --depth=1 https://github.com/gbdev/rgbds; - sudo make -C rgbds install; - rm -rf rgbds; - else - HOMEBREW_NO_AUTO_UPDATE=1 brew install rgbds; + if [ "$TRAVIS_OS_NAME" = osx ]; then + HOMEBREW_NO_AUTO_UPDATE=1 brew install bison + export PATH="/usr/local/opt/bison/bin:$PATH" fi + git clone -b v0.5.0 --depth=1 https://github.com/gbdev/rgbds + sudo make -C rgbds install + rm -rf rgbds ) before_script: - |- -- cgit v1.3.1-sl0p From bcc4380d40767983a0b253d486bb3c82f0f1fd07 Mon Sep 17 00:00:00 2001 From: Rangi Date: Mon, 19 Apr 2021 16:30:07 -0400 Subject: Port 'add_tmnum' from pokecrystal --- constants/item_constants.asm | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/constants/item_constants.asm b/constants/item_constants.asm index d4566c71..bb779fe4 100644 --- a/constants/item_constants.asm +++ b/constants/item_constants.asm @@ -118,23 +118,25 @@ NUM_FLOORS EQU const_value - 1 - NUM_ITEMS ; match the actual number below. NUM_TMS EQU 50 +__tmhm_value__ = NUM_TMS + 1 + +add_tmnum: MACRO +\1_TMNUM EQU __tmhm_value__ +__tmhm_value__ = __tmhm_value__ + 1 +ENDM + add_hm: MACRO ; Defines three constants: ; - HM_\1: the item id, starting at $C4 ; - \1_TMNUM: the learnable TM/HM flag, starting at 51 ; - HM##_MOVE: alias for the move id, equal to the value of \1 -; The first usage also defines HM01 as the first HM item id. -IF !DEF(HM01) -HM01 EQU const_value -__tmhm_value__ = NUM_TMS + 1 -ENDC const HM_\1 -\1_TMNUM EQU __tmhm_value__ -__HM_VALUE = __tmhm_value__ - NUM_TMS -HM{02d:__HM_VALUE}_MOVE EQU \1 -__tmhm_value__ = __tmhm_value__ + 1 +HM_VALUE = __tmhm_value__ - NUM_TMS +HM{02d:HM_VALUE}_MOVE EQU \1 + add_tmnum \1 ENDM +HM01 EQU const_value add_hm CUT ; $C4 add_hm FLY ; $C5 add_hm SURF ; $C6 @@ -142,22 +144,19 @@ ENDM add_hm FLASH ; $C8 NUM_HMS EQU const_value - HM01 +__tmhm_value__ = 1 + add_tm: MACRO ; Defines three constants: ; - TM_\1: the item id, starting at $C9 ; - \1_TMNUM: the learnable TM/HM flag, starting at 1 ; - TM##_MOVE: alias for the move id, equal to the value of \1 -; The first usage also defines TM01 as the first TM item id. -IF !DEF(TM01) -TM01 EQU const_value -__tmhm_value__ = 1 -ENDC const TM_\1 -\1_TMNUM EQU __tmhm_value__ TM{02d:__tmhm_value__}_MOVE EQU \1 -__tmhm_value__ = __tmhm_value__ + 1 + add_tmnum \1 ENDM +TM01 EQU const_value add_tm MEGA_PUNCH ; $C9 add_tm RAZOR_WIND ; $CA add_tm SWORDS_DANCE ; $CB -- cgit v1.3.1-sl0p