Merge pull request #3 from rh-hideout/master
update to newest expansion
This commit is contained in:
commit
19d8f51f6d
@ -23,19 +23,16 @@ body:
|
||||
label: Version
|
||||
description: What version of pokeemerald-expansion are you using as a base?
|
||||
options:
|
||||
- 1.9.2 (Latest release)
|
||||
- 1.10.1 (Latest release)
|
||||
- master (default, unreleased bugfixes)
|
||||
- upcoming (Edge)
|
||||
- 1.10.0
|
||||
- 1.9.4
|
||||
- 1.9.3
|
||||
- 1.9.2
|
||||
- 1.9.1
|
||||
- 1.9.0
|
||||
- 1.8.6
|
||||
- 1.8.5
|
||||
- 1.8.4
|
||||
- 1.8.3
|
||||
- 1.8.2
|
||||
- 1.8.1
|
||||
- 1.8.0
|
||||
- pre-1.8.0
|
||||
- pre-1.9.0
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
|
||||
15
.github/ISSUE_TEMPLATE/02_battle_ai_issues.yaml
vendored
15
.github/ISSUE_TEMPLATE/02_battle_ai_issues.yaml
vendored
@ -23,19 +23,16 @@ body:
|
||||
label: Version
|
||||
description: What version of pokeemerald-expansion are you using as a base?
|
||||
options:
|
||||
- 1.9.2 (Latest release)
|
||||
- 1.10.1 (Latest release)
|
||||
- master (default, unreleased bugfixes)
|
||||
- upcoming (Edge)
|
||||
- 1.10.0
|
||||
- 1.9.4
|
||||
- 1.9.3
|
||||
- 1.9.2
|
||||
- 1.9.1
|
||||
- 1.9.0
|
||||
- 1.8.6
|
||||
- 1.8.5
|
||||
- 1.8.4
|
||||
- 1.8.3
|
||||
- 1.8.2
|
||||
- 1.8.1
|
||||
- 1.8.0
|
||||
- pre-1.8.0
|
||||
- pre-1.9.0
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
|
||||
15
.github/ISSUE_TEMPLATE/04_other_errors.yaml
vendored
15
.github/ISSUE_TEMPLATE/04_other_errors.yaml
vendored
@ -23,19 +23,16 @@ body:
|
||||
label: Version
|
||||
description: What version of pokeemerald-expansion are you using as a base?
|
||||
options:
|
||||
- 1.9.2 (Latest release)
|
||||
- 1.10.1 (Latest release)
|
||||
- master (default, unreleased bugfixes)
|
||||
- upcoming (Edge)
|
||||
- 1.10.0
|
||||
- 1.9.4
|
||||
- 1.9.3
|
||||
- 1.9.2
|
||||
- 1.9.1
|
||||
- 1.9.0
|
||||
- 1.8.6
|
||||
- 1.8.5
|
||||
- 1.8.4
|
||||
- 1.8.3
|
||||
- 1.8.2
|
||||
- 1.8.1
|
||||
- 1.8.0
|
||||
- pre-1.8.0
|
||||
- pre-1.9.0
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
|
||||
14
.github/pull_request_template.md
vendored
14
.github/pull_request_template.md
vendored
@ -1,5 +1,9 @@
|
||||
<!--- Provide a general summary of your changes in the Title above -->
|
||||
|
||||
<!--- Before submitting, please make sure your pull request meets the scope guidelines. If unsure, please open a thread in #pr-discussions.-->
|
||||
<!--- Scope Guidelines: https://github.com/rh-hideout/pokeemerald-expansion/blob/master/docs/scope.md -->
|
||||
<!--- #pr-discussions: https://discord.com/channels/419213663107416084/1102784418369785948 -->
|
||||
|
||||
## Description
|
||||
<!--- Describe your changes in detail -->
|
||||
|
||||
@ -13,13 +17,19 @@
|
||||
|
||||
## **People who collaborated with me in this PR**
|
||||
<!-- Please credit everyone else that contributed to this PR, be it code and/or assets. -->
|
||||
<!-- Use their GitHub tag if they have one. -->
|
||||
<!-- Use their GitHub tag if they have one (or add "@/" at the start if they don't). Be sure to start the line using @ so the automatic changelog can properly detect the collaborators. -->
|
||||
<!-- Eg.: "@Lunos for sprites, @/Masuda for support" -->
|
||||
<!-- If it doesn't apply, feel free to remove this section. -->
|
||||
|
||||
## Feature(s) this PR does NOT handle:
|
||||
<!-- If your PR contains any unfinished features that are not considered merge-blocking, please list them here for clarity so no one can forget. -->
|
||||
<!-- If it doesn't apply, feel free to remove this section. -->
|
||||
|
||||
## Things to note in the release changelog:
|
||||
<!-- We use an automated system to generate our changelogs, so if there's something of note that our end users should know in regards to this change besides the title of this PR, they should be added here. -->
|
||||
<!-- *MUST* be structured as bullet points. -->
|
||||
<!-- If it doesn't apply, feel free to remove this section. -->
|
||||
|
||||
## **Discord contact info**
|
||||
<!--- formatted as name#numbers, e.g. Lunos#4026 -->
|
||||
<!--- Formatted as username (e.g. Lunos) or username#numbers (e.g. Lunos#4026) -->
|
||||
<!--- Contributors must join https://discord.gg/6CzjAG6GZk -->
|
||||
|
||||
26
.github/workflows/build.yml
vendored
26
.github/workflows/build.yml
vendored
@ -15,49 +15,27 @@ jobs:
|
||||
GAME_VERSION: EMERALD
|
||||
GAME_REVISION: 0
|
||||
GAME_LANGUAGE: ENGLISH
|
||||
MODERN: 0
|
||||
COMPARE: 0
|
||||
UNUSED_ERROR: 1
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Checkout agbcc
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: agbcc
|
||||
repository: pret/agbcc
|
||||
|
||||
- name: Install binutils
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y build-essential libpng-dev libelf-dev
|
||||
# build-essential, git, and libpng-dev are already installed
|
||||
# build-essential and git are already installed
|
||||
# gcc-arm-none-eabi is only needed for the modern build
|
||||
# as an alternative to dkP
|
||||
|
||||
- name: Install agbcc
|
||||
run: |
|
||||
./build.sh
|
||||
./install.sh ../
|
||||
working-directory: agbcc
|
||||
|
||||
- name: Agbcc
|
||||
- name: ROM
|
||||
env:
|
||||
MODERN: 0
|
||||
COMPARE: 0
|
||||
run: make -j${nproc} -O all
|
||||
|
||||
- name: Modern
|
||||
env:
|
||||
MODERN: 1
|
||||
COMPARE: 0
|
||||
run: make -j${nproc} -O all
|
||||
|
||||
- name: Test
|
||||
env:
|
||||
MODERN: 1
|
||||
TEST: 1
|
||||
run: |
|
||||
make -j${nproc} -O pokeemerald-test.elf
|
||||
make -j${nproc} check
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -38,5 +38,6 @@ prefabs.json
|
||||
*.diff
|
||||
*.sym
|
||||
*.js
|
||||
/pokeemerald-*.png
|
||||
src/data/map_group_count.h
|
||||
tools/trainerproc/trainerproc
|
||||
|
||||
@ -1,6 +1,12 @@
|
||||
# Pokeemerald-Expansion Changelogs
|
||||
|
||||
## 1.10.x
|
||||
- **[Version 1.10.1](docs/changelogs/1.10.x/1.10.1.md) - 🧹 Bugfix Release**
|
||||
- **[Version 1.10.0](docs/changelogs/1.10.x/1.10.0.md) - ✨ Feature Release**
|
||||
|
||||
## 1.9.x
|
||||
- **[Version 1.9.4](docs/changelogs/1.9.x/1.9.4.md) - 🧹 Bugfix Release**
|
||||
- **[Version 1.9.3](docs/changelogs/1.9.x/1.9.3.md) - 🧹 Bugfix Release**
|
||||
- **[Version 1.9.2](docs/changelogs/1.9.x/1.9.2.md) - 🧹 Bugfix Release**
|
||||
- **[Version 1.9.1](docs/changelogs/1.9.x/1.9.1.md) - 🧹 Bugfix Release**
|
||||
- **[Version 1.9.0](docs/changelogs/1.9.x/1.9.0.md) - ✨ Feature Release**
|
||||
|
||||
646
INSTALL.md
646
INSTALL.md
@ -1,564 +1,82 @@
|
||||
# Instructions
|
||||
Install instructions for each supported operating system can be found in their respective directories under `docs/install/`.
|
||||
Lines to those can be found under each heading.
|
||||
This file only contains a short introduction to each supported system.
|
||||
If you run into trouble, ask for help on Discord (see [README.md](README.md)).
|
||||
|
||||
These instructions explain how to set up the tools required to build **pokeemerald Expansion**, which assembles the source files into a ROM (pokeemerald.gba).
|
||||
|
||||
These instructions come with notes which can be expanded by clicking the "<i>Note...</i>" text.
|
||||
In general, you should not need to open these unless if you get an error or if you need additional clarification.
|
||||
|
||||
If you run into trouble, ask for help on Discord or IRC (see [README.md](README.md)).
|
||||
After completing the install instructions for your OS, proceed to [Building pokeemerald-expansion](#building-pokeemerald-expansion).
|
||||
|
||||
## Windows
|
||||
Windows has instructions for building with three possible terminals, providing 3 different options in case the user stumbles upon unexpected errors.
|
||||
- [Windows 10/11 (WSL1)](#windows-1011-wsl1) (**Fastest, highly recommended**, Windows 10 and 11 only)
|
||||
- [Windows (msys2)](#windows-msys2) (Second fastest)
|
||||
- [Windows (Cygwin)](#windows-cygwin) (Slowest)
|
||||
**Windows needs one of the systems to build the project**
|
||||
|
||||
Unscientific benchmarks suggest **msys2 is 2x slower** than WSL1, and **Cygwin is 5-6x slower** than WSL1.
|
||||
<details>
|
||||
<summary><i>Note for advanced users: <b>WSL2</b>...</i></summary>
|
||||
**A note of caution**: As Windows 7 and Windows 8 are officially unsupported by Microsoft, some maintainers are unwilling to maintain the Windows 7/8 instructions. Thus, these instructions may break in the future with fixes taking longer than fixes to the Windows 10/11 instructions.
|
||||
|
||||
> <b>WSL2</b> is an option and is even faster than <b>WSL1</b> if files are stored on the WSL2 file system, but some tools may have trouble interacting
|
||||
> with the WSL2 file system over the network drive. For example, tools which use Qt versions before 5.15.2 such as <a href="https://github.com/huderlem/porymap">porymap</a>
|
||||
> may <a href="https://bugreports.qt.io/browse/QTBUG-86277">have problems with parsing the <code>\\wsl$</code> network drive path</a>.
|
||||
</details>
|
||||
On Windows, the project can be built using the following systems:
|
||||
- WSL2, fastest
|
||||
- WSL1, 7 times slower than WSL2
|
||||
- Msys2, 20 times slower than WSL2 (**NOTE**: Currently broken on pret upstream)
|
||||
- Cygwin, 30 timer slower than WSL2 (**NOTE**: Currently broken on pret upstream)
|
||||
|
||||
All of the Windows instructions assume that the default drive is C:\\. If this differs to your actual drive letter, then replace C with the correct drive letter when reading the instructions.
|
||||
**NOTE**: Only WSL systems are recommended.
|
||||
|
||||
**A note of caution**: As Windows 7 is officially unsupported by Microsoft and Windows 8 has very little usage, some maintainers are unwilling to maintain the Windows 7/8 instructions. Thus, these instructions may break in the future with fixes taking longer than fixes to the Windows 10 instructions.
|
||||
[WSL Install instructions](docs/install/windows/WSL.md)
|
||||
|
||||
## Windows 10/11 (WSL1)
|
||||
WSL1 is the preferred terminal to build **pokeemerald Expansion**. The following instructions will explain how to install WSL1 (referred to interchangeably as WSL).
|
||||
- If WSL (Debian or Ubuntu) is **not installed**, then go to [Installing WSL1](#Installing-WSL1).
|
||||
- Otherwise, if WSL is installed, but it **hasn't previously been set up for another decompilation project**, then go to [Setting up WSL1](#Setting-up-WSL1).
|
||||
- Otherwise, **open WSL** and go to [Choosing where to store pokeemerald Expansion (WSL1)](#Choosing-where-to-store-pokeemerald-expansion-WSL1).
|
||||
[Msys2 Install instructions](docs/install/windows/MSYS2.md)
|
||||
|
||||
### Installing WSL1
|
||||
1. Open [Windows Powershell **as Administrator**](https://i.imgur.com/QKmVbP9.png), and run the following commands (Right Click or Shift+Insert is paste in the Powershell).
|
||||
|
||||
```powershell
|
||||
wsl --install -d Ubuntu --enable-wsl1
|
||||
```
|
||||
|
||||
2. Once the process finishes, restart your machine.
|
||||
|
||||
3. Open Windows Powershell **as Administrator** again (after restarting), and run the following command to configure Ubuntu to use WSL1.
|
||||
|
||||
```powershell
|
||||
wsl --set-version Ubuntu 1
|
||||
```
|
||||
<details>
|
||||
<summary><i>Note...</i></summary>
|
||||
|
||||
> WSL may open automatically after restarting, but you can ignore it for now.
|
||||
</details>
|
||||
|
||||
### Setting up WSL1
|
||||
Some tips before proceeding:
|
||||
- In WSL, Copy and Paste is either done via
|
||||
- **right-click** (selection + right click to Copy, right click with no selection to Paste)
|
||||
- **Ctrl+Shift+C/Ctrl+Shift+V** (enabled by right-clicking the title bar, going to Properties, then checking the checkbox next to "Use Ctrl+Shift+C/V as Copy/Paste").
|
||||
- Some of the commands that you'll run will ask for your WSL password and/or confirmation to perform the stated action. This is to be expected, just enter your WSL password and/or the yes action when necessary.
|
||||
|
||||
1. Open **Ubuntu** (e.g. using Search).
|
||||
2. WSL/Ubuntu will set up its own installation when it runs for the first time. Once WSL/Ubuntu finishes installing, it will ask for a username and password (to be input in).
|
||||
<details>
|
||||
<summary><i>Note...</i></summary>
|
||||
|
||||
> When typing in the password, there will be no visible response, but the terminal will still read in input.
|
||||
</details>
|
||||
|
||||
3. Update WSL/Ubuntu before continuing. Do this by running the following command. These commands will likely take a long time to finish:
|
||||
|
||||
```bash
|
||||
sudo apt update && sudo apt upgrade
|
||||
```
|
||||
|
||||
> Note: If the repository you plan to build has an **[older revision of the INSTALL.md](https://github.com/pret/pokeemerald/blob/571c598/INSTALL.md)**, then follow the [legacy WSL1 instructions](docs/legacy_WSL1_INSTALL.md) from here.
|
||||
|
||||
4. Certain packages are required to build pokeemerald Expansion. Install these packages by running the following command:
|
||||
|
||||
```bash
|
||||
sudo apt install build-essential binutils-arm-none-eabi gcc-arm-none-eabi libnewlib-arm-none-eabi git libpng-dev
|
||||
```
|
||||
<details>
|
||||
<summary><i>Note...</i></summary>
|
||||
|
||||
> If the above command does not work, try the above command but replacing `apt` with `apt-get`.
|
||||
</details>
|
||||
This will install GCC v10 on Ubuntu 22.04. pokeemerald Expansion works with GCC v10, but remote repositories and the RHH Team use GCC v13 for stricter error-checking. If you want to upgrade from v10 to v13, also follow the devkitpro install instructions.
|
||||
|
||||
### Installing devkitARM on WSL1
|
||||
|
||||
1. Change directory to somewhere you can download a package, such as **C:\Users\\_\<user>_\Downloads** (the Downloads location for most users). To do so, enter this command, where *\<user> is your **Windows** username:
|
||||
|
||||
```bash
|
||||
cd /mnt/c/Users/<user>/Downloads
|
||||
```
|
||||
|
||||
2. Once the directory has been changed, run the following commands to install devkitARM.
|
||||
|
||||
```bash
|
||||
sudo apt install wget
|
||||
wget https://apt.devkitpro.org/install-devkitpro-pacman
|
||||
chmod +x ./install-devkitpro-pacman
|
||||
sudo ./install-devkitpro-pacman
|
||||
sudo dkp-pacman -S gba-dev
|
||||
```
|
||||
The last command will ask for the selection of packages to install. Just press Enter to install all of them, followed by entering Y to proceed with the installation.
|
||||
|
||||
3. Run the following command to set devkitPro related environment variables (alternatively, close and re-open WSL):
|
||||
|
||||
```bash
|
||||
source /etc/profile.d/devkit-env.sh
|
||||
```
|
||||
|
||||
devkitARM is now installed.
|
||||
|
||||
### Installing Python on WSL1
|
||||
|
||||
To install Python on WSL1, simply run the following commands:
|
||||
|
||||
```bash
|
||||
sudo apt update && sudo apt upgrade
|
||||
sudo apt install python3
|
||||
```
|
||||
|
||||
Python is now installed.
|
||||
|
||||
### Choosing where to store pokeemerald Expansion (WSL1)
|
||||
WSL has its own file system that's not natively accessible from Windows, but Windows files *are* accessible from WSL. So you're going to want to store pokeemerald Expansion within Windows.
|
||||
|
||||
For example, say you want to store pokeemerald Expansion in **C:\Users\\_\<user>_\Desktop\decomps**. First, ensure that the folder already exists. Then, enter this command to **change directory** to said folder, where *\<user>* is your **Windows** username:
|
||||
|
||||
```bash
|
||||
cd /mnt/c/Users/<user>/Desktop/decomps
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary><i>Notes...</i></summary>
|
||||
|
||||
> Note 1: The Windows C:\ drive is called /mnt/c/ in WSL.
|
||||
> Note 2: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "/mnt/c/users/<user>/Desktop/decomp folder"`.
|
||||
> Note 3: Windows path names are case-insensitive so adhering to capitalization isn't needed
|
||||
</details>
|
||||
|
||||
If this works, then proceed to [Installation](#installation).
|
||||
|
||||
Otherwise, ask for help on Discord or IRC (see [README.md](README.md)), or continue reading below for [Windows instructions using msys2](#windows-msys2).
|
||||
|
||||
## Windows (msys2)
|
||||
|
||||
- If devkitARM is **not installed**, then go to [Installing devkitARM](#installing-devkitarm).
|
||||
- If devkitARM is installed, but msys2 **hasn't previously been set up for another decompilation project**, then go to [Setting up msys2](#setting-up-msys2).
|
||||
- Otherwise, **open msys2** and go to [Choosing where to store pokeemerald Expansion (msys2)](#choosing-where-to-store-pokeemerald-expansion-msys2).
|
||||
|
||||
### Installing devkitARM
|
||||
1. Download the devkitPro installer [here](https://github.com/devkitPro/installer/releases).
|
||||
2. Run the devkitPro installer. In the "Choose Components" screen, uncheck everything except GBA Development unless if you plan to install other devkitPro components for other purposes. Keep the install location as C:\devkitPro and leave the Start Menu option unchanged.
|
||||
|
||||
### Setting up msys2
|
||||
|
||||
Note that in msys2, Copy is Ctrl+Insert and Paste is Shift+Insert.
|
||||
|
||||
1. Open msys2 at C:\devkitPro\msys2\msys2_shell.bat.
|
||||
|
||||
2. Certain packages are required to build pokeemerald Expansion. Install these by running the following two commands:
|
||||
|
||||
```bash
|
||||
pacman -Sy msys2-keyring
|
||||
pacman -S make gcc zlib-devel git
|
||||
```
|
||||
<details>
|
||||
<summary><i>Note...</i></summary>
|
||||
|
||||
> The commands will ask for confirmation, just enter the yes action when prompted.
|
||||
</details>
|
||||
|
||||
3. Download [libpng](https://sourceforge.net/projects/libpng/files/libpng16/1.6.37/libpng-1.6.37.tar.xz/download).
|
||||
|
||||
4. Change directory to where libpng was downloaded. By default, msys2 will start in the current user's profile folder, located at **C:\Users\\⁠_\<user>_**, where *\<user>* is your Windows username. In most cases, libpng should be saved within a subfolder of the profile folder. For example, if libpng was saved to **C:\Users\\_\<user>_\Downloads** (the Downloads location for most users), enter this command:
|
||||
|
||||
```bash
|
||||
cd Downloads
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary><i>Notes...</i></summary>
|
||||
|
||||
> Note 1: While not shown, msys uses forward slashes `/` instead of backwards slashes `\` as the directory separator.
|
||||
> Note 2: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "Downloads/My Downloads"`.
|
||||
> Note 3: Windows path names are case-insensitive so adhering to capitalization isn’t needed.
|
||||
> Note 4: If libpng was saved elsewhere, you will need to specify the full path to where libpng was downloaded, e.g. `cd c:/devkitpro/msys2` if it was saved there.
|
||||
</details>
|
||||
|
||||
5. Run the following commands to uncompress and install libpng.
|
||||
|
||||
```bash
|
||||
tar xf libpng-1.6.37.tar.xz
|
||||
cd libpng-1.6.37
|
||||
./configure --prefix=/usr
|
||||
make check
|
||||
make install
|
||||
```
|
||||
|
||||
6. Then finally, run the following command to change back to the user profile folder.
|
||||
|
||||
```bash
|
||||
cd
|
||||
```
|
||||
|
||||
### Installing Python on msys2
|
||||
|
||||
To install Python on msys2, simply run the following commands:
|
||||
|
||||
```bash
|
||||
pacman -S mingw-w64-x86_64-python3
|
||||
```
|
||||
|
||||
Python is now installed.
|
||||
|
||||
### Choosing where to store pokeemerald Expansion (msys2)
|
||||
At this point, you can choose a folder to store pokeemerald Expansion into. If you're okay with storing pokeemerald Expansion in the user profile folder, then proceed to [Installation](#installation). Otherwise, you'll need to account for where pokeemerald Expansion is stored when changing directory to the pokeemerald-expansion folder.
|
||||
|
||||
For example, if you want to store pokeemerald Expansion in **C:\Users\\_\<user>_\Desktop\decomps** (where *\<user>* is your **Windows** username), enter this command:
|
||||
|
||||
```bash
|
||||
cd Desktop/decomps
|
||||
```
|
||||
|
||||
If this works, then proceed to [Installation](#installation).
|
||||
|
||||
Otherwise, ask for help on Discord or IRC (see [README.md](README.md)), or continue reading below for [Windows instructions using Cygwin](#windows-cygwin).
|
||||
|
||||
## Windows (Cygwin)
|
||||
1. If devkitARM is **not installed**, then follow the instructions used to [install devkitARM](#installing-devkitarm) for the msys2 setup before continuing. *Remember to not continue following the msys2 instructions by mistake!*
|
||||
|
||||
2.
|
||||
- If Cygwin is **not installed**, or does not have all of the required packages installed, then go to [Installing Cygwin](#installing-cygwin).
|
||||
- If Cygwin is installed, but **is not configured to work with devkitARM**, then go to [Configuring devkitARM for Cygwin](#configuring-devkitarm-for-cygwin).
|
||||
- Otherwise, **open Cygwin** and go to [Choosing where to store pokeemerald Expansion (Cygwin)](#choosing-where-to-store-pokeemerald-expansion-cygwin)
|
||||
|
||||
### Installing Cygwin
|
||||
1. Download [Cygwin](https://cygwin.com/install.html): setup-x86_64.exe for 64-bit Windows, setup-x86.exe for 32-bit.
|
||||
|
||||
2. Run the Cygwin setup. Within the Cygwin setup, leave the default settings until the "Choose A Download Site" screen.
|
||||
|
||||
3. At "Choose a Download Site", select any mirror within the Available Download Sites.
|
||||
|
||||
4. At "Select Packages", set the view to "Full" (top left) and search for the following packages:
|
||||
- `make`
|
||||
- `git`
|
||||
- `gcc-core`
|
||||
- `gcc-g++`
|
||||
- `libpng-devel`
|
||||
|
||||
To quickly find these, use the search bar and type the name of each package. Ensure that the selected package name is the **exact** same as the one you're trying to download, e.g. `cmake` is **NOT** the same as `make`.
|
||||
|
||||
5. For each package, double click on the text that says "**Skip**" next to each package to select the most recent version to install. If the text says anything other than "**Skip**", (e.g. Keep or a version number), then the package is or will be installed and you don't need to do anything.
|
||||
|
||||
6. Once all required packages have been selected, finish the installation.
|
||||
|
||||
### Configuring devkitARM for Cygwin
|
||||
|
||||
Note that in Cygwin, Copy is Ctrl+Insert and Paste is Shift+Insert.
|
||||
|
||||
1. Open **Cygwin**.
|
||||
|
||||
2. Run the following commands to configure devkitPro to work with Cygwin.
|
||||
|
||||
```bash
|
||||
export DEVKITPRO=/cygdrive/c/devkitpro
|
||||
echo export DEVKITPRO=$DEVKITPRO >> ~/.bashrc
|
||||
export DEVKITARM=$DEVKITPRO/devkitARM
|
||||
echo export DEVKITARM=$DEVKITARM >> ~/.bashrc
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary><i>Note...</i></summary>
|
||||
|
||||
> Replace the drive letter c with the actual drive letter if it is not c.
|
||||
</details>
|
||||
|
||||
### Choosing where to store pokeemerald Expansion (Cygwin)
|
||||
|
||||
Cygwin has its own file system that's within Windows, at **C:\cygwin64\home\\_\<user>_**. If you don't want to store pokeemerald Expansion there, you'll need to account for where ppokeemerald Expansion is stored when **changing directory** to the pokeemerald-expansion folder.
|
||||
|
||||
For example, if you want to store pokeemerald Expansion in **C:\Users\\_\<user>_\Desktop\decomps**, enter this command, where *\<user>* is your **Windows** username:
|
||||
```bash
|
||||
cd c:/Users/<user>/Desktop/decomps
|
||||
```
|
||||
Note that the directory **must exist** in Windows. If you want to store pokeemerald Expansion in a dedicated folder that doesn't exist (e.g. the example provided above), then create the folder (e.g. using Windows Explorer) before executing the `cd` command.
|
||||
|
||||
<details>
|
||||
<summary><i>Notes...</i></summary>
|
||||
|
||||
> Note 1: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "c:/users/<user>/Desktop/decomp folder"`.
|
||||
> Note 2: Windows path names are case-insensitive so adhering to capitalization isn't needed
|
||||
</details>
|
||||
|
||||
If this works, then proceed to [Installation](#installation). Otherwise, ask for help on Discord or IRC (see [README.md](README.md)).
|
||||
|
||||
## macOS
|
||||
1. If the Xcode Command Line Tools are not installed, download the tools [here](https://developer.apple.com/xcode/resources/), open your Terminal, and run the following command:
|
||||
|
||||
```bash
|
||||
xcode-select --install
|
||||
```
|
||||
|
||||
2. - If libpng is **not installed**, then go to [Installing libpng (macOS)](#installing-libpng-macos).
|
||||
- If pkg-config is **not installed**, then go to [Installing pkg-config (macos)](#installing-pkg-config-macos).
|
||||
- If devkitARM is **not installed**, then go to [Installing devkitARM (macOS)](#installing-devkitarm-macos).
|
||||
- Otherwise, **open the Terminal** and go to [Choosing where to store pokeemerald Expansion (macOS)](#choosing-where-to-store-pokeemerald-expansion-macos)
|
||||
|
||||
### Installing libpng (macOS)
|
||||
<details>
|
||||
<summary><i>Note for advanced users...</i></summary>
|
||||
|
||||
> This guide installs libpng via Homebrew as it is the easiest method, however advanced users can install libpng through other means if they so desire.
|
||||
</details>
|
||||
|
||||
1. Open the Terminal.
|
||||
2. If Homebrew is not installed, then install [Homebrew](https://brew.sh/) by following the instructions on the website.
|
||||
3. Run the following command to install libpng.
|
||||
|
||||
```bash
|
||||
brew install libpng
|
||||
```
|
||||
libpng is now installed.
|
||||
|
||||
Continue to [Installing pkg-config (macOS)](#installing-pkg-config-macos) if **pkg-config is not installed**. Otherwise, continue to [Installing devkitARM (macOS)](#installing-devkitarm-macos) if **devkitARM is not installed**.
|
||||
|
||||
If both pkg-config and devkitARM are already installed, go to [Choosing where to store pokeemerald Expansion (macOS)](#choosing-where-to-store-pokeemerald-expansion-macos).
|
||||
|
||||
### Installing pkg-config (macOS)
|
||||
<details>
|
||||
<summary><i>Note for advanced users...</i></summary>
|
||||
|
||||
> This guide installs pkg-config via Homebrew as it is the easiest method, however advanced users can install pkg-config through other means if they so desire.
|
||||
</details>
|
||||
|
||||
1. Open the Terminal.
|
||||
2. If Homebrew is not installed, then install [Homebrew](https://brew.sh/) by following the instructions on the website.
|
||||
3. Run the following command to install libpng.
|
||||
|
||||
```bash
|
||||
brew install pkg-config
|
||||
```
|
||||
pkg-config is now installed.
|
||||
|
||||
Continue to [Installing devkitARM (macOS)](#installing-devkitarm-macos) if **devkitARM is not installed**, otherwise, go to [Choosing where to store pokeemerald Expansion (macOS)](#choosing-where-to-store-pokeemerald-expansion-macos).
|
||||
|
||||
### Installing devkitARM (macOS)
|
||||
1. Download the `devkitpro-pacman-installer.pkg` package from [here](https://github.com/devkitPro/pacman/releases).
|
||||
2. Open the package to install devkitPro pacman.
|
||||
3. In the Terminal, run the following commands to install devkitARM:
|
||||
|
||||
```bash
|
||||
sudo dkp-pacman -Sy
|
||||
sudo dkp-pacman -S gba-dev
|
||||
sudo dkp-pacman -S devkitarm-rules
|
||||
```
|
||||
|
||||
The command with gba-dev will ask for the selection of packages to install. Just press Enter to install all of them, followed by entering Y to proceed with the installation.
|
||||
|
||||
4. After the tools are installed, devkitARM must now be made accessible from anywhere by the system. To do so, run the following commands:
|
||||
|
||||
```bash
|
||||
export DEVKITPRO=/opt/devkitpro
|
||||
echo "export DEVKITPRO=$DEVKITPRO" >> ~/.zshrc
|
||||
export DEVKITARM=$DEVKITPRO/devkitARM
|
||||
echo "export DEVKITARM=$DEVKITARM" >> ~/.zshrc
|
||||
|
||||
echo "if [ -f ~/.zshrc ]; then . ~/.zshrc; fi" >> ~/.zprofile
|
||||
```
|
||||
*Note: Starting with macOS 10.15, the default Unix shell is now zsh. If you migrated from an older version of macOS, you might still be using bash. You can check my running `echo $0` in the terminal.*
|
||||
<details>
|
||||
<summary><i>If your terminal is using bash instead of zsh...</i></summary>
|
||||
|
||||
```bash
|
||||
export DEVKITPRO=/opt/devkitpro
|
||||
echo "export DEVKITPRO=$DEVKITPRO" >> ~/.bashrc
|
||||
export DEVKITARM=$DEVKITPRO/devkitARM
|
||||
echo "export DEVKITARM=$DEVKITARM" >> ~/.bashrc
|
||||
|
||||
echo "if [ -f ~/.bashrc ]; then . ~/.bashrc; fi" >> ~/.bash_profile
|
||||
```
|
||||
</details>
|
||||
|
||||
### Installing Python (macOS)
|
||||
1. Download the latest Python package from [here](https://www.python.org/downloads/).
|
||||
2. Open the package to install Python.
|
||||
|
||||
Python is now installed.
|
||||
|
||||
### Choosing where to store pokeemerald Expansion (macOS)
|
||||
At this point, you can choose a folder to store pokeemerald Expansion into. If you're okay with storing pokeemerald Expansion in the user folder, then proceed to [Installation](#installation). Otherwise, you'll need to account for where pokeemerald Expansion is stored when changing directory to the pokeemerald-expansion folder.
|
||||
|
||||
For example, if you want to store pokeemerald Expansion in **~/Desktop/decomps**, enter this command to **change directory** to the desired folder:
|
||||
```bash
|
||||
cd Desktop/decomps
|
||||
```
|
||||
Note that the directory **must exist** in the folder system. If you want to store pokeemerald Expansion in a dedicated folder that doesn't exist (e.g. the example provided above), then create the folder (e.g. using Finder) before executing the `cd` command.
|
||||
|
||||
<details>
|
||||
<summary><i>Note..</i>.</summary>
|
||||
|
||||
> Note: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "Desktop/decomp folder"`
|
||||
</details>
|
||||
|
||||
If this works, then proceed to [Installation](#installation). Otherwise, ask for help on Discord or IRC (see [README.md](README.md)).
|
||||
[Cygwin Install instructions](docs/install/windows/CYGWIN.md)
|
||||
|
||||
## Linux
|
||||
Open Terminal and enter the following commands, depending on which distro you're using.
|
||||
The project can be built on any Linux distribution.
|
||||
Distributions with instructions:
|
||||
- [Ubuntu](docs/install/linux/UBUNTU.md)
|
||||
- [Debian](docs/install/linux/DEBIAN.md)
|
||||
- [Arch Linux](docs/install/linux/ARCH_LINUX.md)
|
||||
- [NixOS](docs/install/linux/NIXOS.md)
|
||||
|
||||
### Debian/Ubuntu-based distributions
|
||||
Run the following command to install the necessary packages:
|
||||
```bash
|
||||
sudo apt install build-essential binutils-arm-none-eabi gcc-arm-none-eabi libnewlib-arm-none-eabi git libpng-dev
|
||||
```
|
||||
Then proceed to [Choosing where to store pokeemerald Expansion (Linux)](#choosing-where-to-store-pokeemerald-expansion-linux).
|
||||
<details>
|
||||
<summary><i>Note for legacy repos...</i></summary>
|
||||
Other distributions have to infer what to do from [general instructions](docs/install/linux/OTHERS.md).
|
||||
|
||||
> If the repository you plan to build has an **[older revision of the INSTALL.md](https://github.com/pret/pokeemerald/blob/571c598/INSTALL.md)**,
|
||||
> then you will have to install devkitARM. Install all the above packages except for the arm-none-eabi packages, and follow the instructions to
|
||||
> [install devkitARM on Debian/Ubuntu-based distributions](#installing-devkitarm-on-debianubuntu-based-distributions).
|
||||
</details>
|
||||
## Mac
|
||||
Some extra considerations exist to get the testing system working.
|
||||
|
||||
### Installing devkitARM on Debian/Ubuntu-based distributions
|
||||
[Mac instructions](docs/install/mac/MAC_OS.md)
|
||||
|
||||
1. Change directory to somewhere you can download a packages, like a Downloads folder. Then, run the following commands to install devkitARM:
|
||||
## ChromeOS
|
||||
Only tested on x86_64 based systems.
|
||||
|
||||
```bash
|
||||
wget https://apt.devkitpro.org/install-devkitpro-pacman
|
||||
chmod +x ./install-devkitpro-pacman
|
||||
sudo ./install-devkitpro-pacman
|
||||
sudo dkp-pacman -S gba-dev
|
||||
```
|
||||
The last command will ask for the selection of packages to install. Just press Enter to install all of them, followed by entering Y to proceed with the installation.
|
||||
[Chrome OS instructions](docs/install/chromeos/CHROME_OS.md)
|
||||
|
||||
4. Run the following command to set devkitPro related environment variables (alternatively, close and re-open the Terminal):
|
||||
|
||||
```bash
|
||||
source /etc/profile.d/devkit-env.sh
|
||||
```
|
||||
|
||||
devkitARM is now installed.
|
||||
|
||||
### Arch Linux
|
||||
Run this command as root to install the necessary packages:
|
||||
```bash
|
||||
pacman -S base-devel arm-none-eabi-binutils arm-none-eabi-gcc arm-none-eabi-newlib git libpng
|
||||
```
|
||||
|
||||
### Installing devkitARM on Arch Linux
|
||||
|
||||
1. Follow [devkitPro's instructions](https://devkitpro.org/wiki/devkitPro_pacman#Customising_Existing_Pacman_Install) to configure `pacman` to download devkitPro packages.
|
||||
2. Install `gba-dev`: run the following command as root.
|
||||
# Building pokeemerald-expansion
|
||||
Follow these steps to build `pokeemerald-expansion`.
|
||||
1. Navigate to the directory you want to keep the project in, be aware of any system specific limitations.
|
||||
2. Download `pokeemerald-expansion` with `git`
|
||||
|
||||
```console
|
||||
pacman -S gba-dev
|
||||
```
|
||||
This will ask for the selection of packages to install. Just press Enter to install all of them, followed by entering Y to proceed with the installation.
|
||||
|
||||
3. Run the following command to set devkitPro related environment variables (alternatively, close and re-open the Terminal):
|
||||
|
||||
```bash
|
||||
source /etc/profile.d/devkit-env.sh
|
||||
```
|
||||
|
||||
devkitARM is now installed.
|
||||
|
||||
Then proceed to [Choosing where to store pokeemerald Expansion (Linux)](#choosing-where-to-store-pokeemerald-expansion-linux).
|
||||
|
||||
### NixOS
|
||||
Run the following command to start an interactive shell with the necessary packages:
|
||||
```bash
|
||||
nix-shell -p pkgsCross.arm-embedded.stdenv.cc git pkg-config libpng
|
||||
```
|
||||
Then proceed to [Choosing where to store pokeemerald Expansion (Linux)](#choosing-where-to-store-pokeemerald-expansion-linux).
|
||||
|
||||
### NixOS
|
||||
Run the following command to start an interactive shell with the necessary packages:
|
||||
```bash
|
||||
nix-shell -p pkgsCross.arm-embedded.stdenv.cc git pkg-config libpng
|
||||
```
|
||||
Then proceed to [Choosing where to store pokeemerald Expansion (Linux)](#choosing-where-to-store-pokeemerald-expansion-linux).
|
||||
|
||||
### Other distributions
|
||||
_(Specific instructions for other distributions would be greatly appreciated!)_
|
||||
|
||||
1. Try to find the required software in its repositories:
|
||||
- `gcc`
|
||||
- `g++`
|
||||
- `make`
|
||||
- `git`
|
||||
- `libpng-dev`
|
||||
|
||||
2. Follow the instructions [here](https://devkitpro.org/wiki/devkitPro_pacman) to install devkitPro pacman. As a reminder, the goal is to configure an existing pacman installation to recognize devkitPro's repositories.
|
||||
3. Once devkitPro pacman is configured, run the following commands:
|
||||
|
||||
```bash
|
||||
sudo pacman -Sy
|
||||
sudo pacman -S gba-dev
|
||||
```
|
||||
|
||||
The last command will ask for the selection of packages to install. Just press Enter to install all of them, followed by entering Y to proceed with the installation.
|
||||
|
||||
### Installing Python in Linux
|
||||
Installing Python depends on your distribution, please refere to the instructions [here](https://docs.python-guide.org/starting/install3/linux/).
|
||||
|
||||
### Choosing where to store pokeemerald Expansion (Linux)
|
||||
At this point, you can choose a folder to store pokeemerald Expansion into. If so, you'll have to account for the modified folder path when changing directory to the pokeemerald-expansion folder.
|
||||
|
||||
If this works, then proceed to [Installation](#installation). Otherwise, ask for help on Discord or IRC (see [README.md](README.md)).
|
||||
|
||||
## Installation
|
||||
|
||||
<details>
|
||||
<summary><i>Note for Windows users...</i></summary>
|
||||
|
||||
> Consider adding an exception for the `pokeemerald-expansion` and/or `decomps` folder in Windows Security using
|
||||
> [these instructions](https://support.microsoft.com/help/4028485). This prevents Microsoft Defender from
|
||||
> scanning them which might improve performance while building.
|
||||
</details>
|
||||
|
||||
1. If pokeemerald Expansion is not already downloaded (some users may prefer to download pokeemerald Expansion via a git client like GitHub Desktop), run:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/rh-hideout/pokeemerald-expansion
|
||||
```
|
||||
3. Navigate to the newly downloaded project.
|
||||
|
||||
<details>
|
||||
<summary><i>Note for WSL1...</i></summary>
|
||||
```console
|
||||
cd pokeemerald-expansion
|
||||
```
|
||||
4. Build the project.
|
||||
|
||||
> If you get an error stating `fatal: could not set 'core.filemode' to 'false'`, then run the following commands:
|
||||
> ```bash
|
||||
> cd
|
||||
> sudo umount /mnt/c
|
||||
> sudo mount -t drvfs C: /mnt/c -o metadata,noatime
|
||||
> cd <folder where pokeemerald-expansion is to be stored>
|
||||
> ```
|
||||
> Where *\<folder where pokeemerald-expansion is to be stored>* is the path of the folder [where you chose to store pokeemerald Expansion](#Choosing-where-to-store-pokeemerald-expansion-WSL1). Then run the `git clone` command again.
|
||||
</details>
|
||||
```console
|
||||
make
|
||||
```
|
||||
5. If everything worked correctly, something very similar to this should be seen.
|
||||
|
||||
Now you're ready to build pokeemerald Expansion.
|
||||
|
||||
## Build pokeemerald Expansion
|
||||
|
||||
If you aren't in the pokeemerald-expansion directory already, then **change directory** to the pokeemerald-expansion folder:
|
||||
```bash
|
||||
cd pokeemerald-expansion
|
||||
```
|
||||
To build **pokeemerald.gba** (Note: to speed up builds, see [Parallel builds](#parallel-builds)):
|
||||
```bash
|
||||
make
|
||||
```
|
||||
If it has built successfully you will have the output file **pokeemerald.gba** in your project folder.
|
||||
<details>
|
||||
<summary>Note for Windows...</summary>
|
||||
> If you switched terminals since the last build (e.g. from msys2 to WSL1), you must run `make clean-tools` once before any subsequent `make` commands.
|
||||
</details>
|
||||
```console
|
||||
arm-none-eabi-ld: warning: ../../pokeemerald.elf has a LOAD segment with RWX permissions
|
||||
Memory region Used Size Region Size %age Used
|
||||
EWRAM: 243354 B 256 KB 92.83%
|
||||
IWRAM: 30492 B 32 KB 93.05%
|
||||
ROM: 26072244 B 32 MB 77.70%
|
||||
cd build/modern && arm-none-eabi-ld -T ../../ld_script_modern.ld --print-memory-usage -o ../../pokeemerald.elf <objs> <libs> | cat
|
||||
tools/gbafix/gbafix pokeemerald.elf -t"POKEMON EMER" -cBPEE -m01 -r0 --silent
|
||||
arm-none-eabi-objcopy -O binary pokeemerald.elf pokeemerald.gba
|
||||
tools/gbafix/gbafix pokeemerald.gba -p --silent
|
||||
```
|
||||
And the build ROM will be in the directory as `pokeemerald.gba`.
|
||||
|
||||
# Building guidance
|
||||
|
||||
@ -592,62 +110,10 @@ To compile the `modern` target with this toolchain, the subdirectories `lib`, `i
|
||||
|
||||
### Building with debug info
|
||||
|
||||
To build **pokeemerald.elf** with debug symbols under a modern toolchain:
|
||||
To build **pokeemerald.elf** with debug symbols and debug-compatible optimization under a modern toolchain:
|
||||
```bash
|
||||
make DINFO=1
|
||||
make debug
|
||||
```
|
||||
Note that this is not necessary for a non-modern (agbcc) build since those are built with debug symbols by default.
|
||||
|
||||
### agbcc
|
||||
|
||||
<details>
|
||||
<summary><i>Deprecated; installing agbcc is optional since 1.7.0</i>.</summary>
|
||||
|
||||
1. Install agbcc into pokeemerald-expansion. The commands to run depend on certain conditions. **You should only follow one of the listed instructions**:
|
||||
- If agbcc has **not been built before** in the folder where you chose to store pokeemerald Expansion, run the following commands to build and install it into pokeemerald-expansion:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/pret/agbcc
|
||||
cd agbcc
|
||||
./build.sh
|
||||
./install.sh ../pokeemerald-expansion
|
||||
```
|
||||
|
||||
- **Otherwise**, if agbcc has been built before (e.g. if the git clone above fails), but was **last built on a different terminal** than the one currently used (only relevant to Windows, e.g. switching from msys2 to WSL1), then run the following commands to build and install it into pokeemerald-expansion:
|
||||
|
||||
```bash
|
||||
cd agbcc
|
||||
git clean -fX
|
||||
./build.sh
|
||||
./install.sh ../pokeemerald-expansion
|
||||
```
|
||||
|
||||
- **Otherwise**, if agbcc has been built before on the same terminal, run the following commands to install agbcc into pokeemerald-expansion:
|
||||
|
||||
```bash
|
||||
cd agbcc
|
||||
./install.sh ../pokeemerald-expansion
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary><i>Note...</i></summary>
|
||||
|
||||
> If building agbcc or pokeemerald results in an error, try deleting the agbcc folder and re-installing agbcc as if it has not been built before.
|
||||
</details>
|
||||
|
||||
2. Once agbcc is installed, change directory back to the base directory where pokeemerald-expansion and agbcc are stored:
|
||||
|
||||
```bash
|
||||
cd ..
|
||||
```
|
||||
|
||||
3. To compile with agbcc:
|
||||
|
||||
```bash
|
||||
make agbcc
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
# Useful additional tools
|
||||
|
||||
|
||||
723
Makefile
723
Makefile
@ -1,183 +1,172 @@
|
||||
TOOLCHAIN := $(DEVKITARM)
|
||||
COMPARE ?= 0
|
||||
# GBA rom header
|
||||
TITLE := POKEMON EMER
|
||||
GAME_CODE := BPEE
|
||||
MAKER_CODE := 01
|
||||
REVISION := 0
|
||||
KEEP_TEMPS ?= 0
|
||||
|
||||
# `File name`.gba
|
||||
FILE_NAME := pokeemerald
|
||||
BUILD_DIR := build
|
||||
|
||||
# Compares the ROM to a checksum of the original - only makes sense using when non-modern
|
||||
COMPARE ?= 0
|
||||
# Executes the Test Runner System that checks that all mechanics work as expected
|
||||
TEST ?= 0
|
||||
# Enables -fanalyzer C flag to analyze in depth potential UBs
|
||||
ANALYZE ?= 0
|
||||
# Count unused warnings as errors. Used by RH-Hideout's repo
|
||||
UNUSED_ERROR ?= 0
|
||||
# Adds -Og and -g flags, which optimize the build for debugging and include debug info respectively
|
||||
DEBUG ?= 0
|
||||
|
||||
ifeq (compare,$(MAKECMDGOALS))
|
||||
COMPARE := 1
|
||||
endif
|
||||
ifeq (check,$(MAKECMDGOALS))
|
||||
TEST := 1
|
||||
endif
|
||||
ifeq (debug,$(MAKECMDGOALS))
|
||||
DEBUG := 1
|
||||
endif
|
||||
|
||||
# Default make rule
|
||||
all: rom
|
||||
|
||||
# Toolchain selection
|
||||
TOOLCHAIN := $(DEVKITARM)
|
||||
# don't use dkP's base_tools anymore
|
||||
# because the redefinition of $(CC) conflicts
|
||||
# with when we want to use $(CC) to preprocess files
|
||||
# thus, manually create the variables for the bin
|
||||
# files, or use arm-none-eabi binaries on the system
|
||||
# if dkP is not installed on this system
|
||||
|
||||
ifneq (,$(TOOLCHAIN))
|
||||
ifneq ($(wildcard $(TOOLCHAIN)/bin),)
|
||||
export PATH := $(TOOLCHAIN)/bin:$(PATH)
|
||||
endif
|
||||
ifneq ($(wildcard $(TOOLCHAIN)/bin),)
|
||||
export PATH := $(TOOLCHAIN)/bin:$(PATH)
|
||||
endif
|
||||
endif
|
||||
|
||||
PREFIX := arm-none-eabi-
|
||||
OBJCOPY := $(PREFIX)objcopy
|
||||
OBJDUMP := $(PREFIX)objdump
|
||||
AS := $(PREFIX)as
|
||||
|
||||
LD := $(PREFIX)ld
|
||||
|
||||
# note: the makefile must be set up so MODERNCC is never called
|
||||
# if MODERN=0
|
||||
MODERNCC := $(PREFIX)gcc
|
||||
PATH_MODERNCC := PATH="$(PATH)" $(MODERNCC)
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
EXE := .exe
|
||||
else
|
||||
EXE :=
|
||||
ifeq ($(OS),Windows_NT)
|
||||
EXE := .exe
|
||||
endif
|
||||
|
||||
TITLE := POKEMON EMER
|
||||
GAME_CODE := BPEE
|
||||
MAKER_CODE := 01
|
||||
REVISION := 0
|
||||
MODERN ?= 1
|
||||
TEST ?= 0
|
||||
ANALYZE ?= 0
|
||||
UNUSED_ERROR ?= 0
|
||||
CPP := $(PREFIX)cpp
|
||||
|
||||
ifeq (agbcc,$(MAKECMDGOALS))
|
||||
MODERN := 0
|
||||
endif
|
||||
ROM_NAME := $(FILE_NAME).gba
|
||||
OBJ_DIR_NAME := $(BUILD_DIR)/modern
|
||||
OBJ_DIR_NAME_TEST := $(BUILD_DIR)/modern-test
|
||||
OBJ_DIR_NAME_DEBUG := $(BUILD_DIR)/modern-debug
|
||||
|
||||
ifeq (check,$(MAKECMDGOALS))
|
||||
TEST := 1
|
||||
endif
|
||||
|
||||
# use arm-none-eabi-cpp for macOS
|
||||
# as macOS's default compiler is clang
|
||||
# and clang's preprocessor will warn on \u
|
||||
# when preprocessing asm files, expecting a unicode literal
|
||||
# we can't unconditionally use arm-none-eabi-cpp
|
||||
# as installations which install binutils-arm-none-eabi
|
||||
# don't come with it
|
||||
ifneq ($(MODERN),1)
|
||||
ifeq ($(shell uname -s),Darwin)
|
||||
CPP := $(PREFIX)cpp
|
||||
else
|
||||
CPP := $(CC) -E
|
||||
endif
|
||||
else
|
||||
CPP := $(PREFIX)cpp
|
||||
endif
|
||||
|
||||
ROM_NAME := pokeemerald_agbcc.gba
|
||||
ELF_NAME := $(ROM_NAME:.gba=.elf)
|
||||
MAP_NAME := $(ROM_NAME:.gba=.map)
|
||||
OBJ_DIR_NAME := build/emerald
|
||||
TESTELF = $(ROM_NAME:.gba=-test.elf)
|
||||
HEADLESSELF = $(ROM_NAME:.gba=-test-headless.elf)
|
||||
|
||||
MODERN_ROM_NAME := pokeemerald.gba
|
||||
MODERN_ELF_NAME := $(MODERN_ROM_NAME:.gba=.elf)
|
||||
MODERN_MAP_NAME := $(MODERN_ROM_NAME:.gba=.map)
|
||||
MODERN_OBJ_DIR_NAME := build/modern
|
||||
|
||||
SHELL := bash -o pipefail
|
||||
|
||||
ELF = $(ROM:.gba=.elf)
|
||||
MAP = $(ROM:.gba=.map)
|
||||
SYM = $(ROM:.gba=.sym)
|
||||
|
||||
TEST_OBJ_DIR_NAME_MODERN := build/modern-test
|
||||
TEST_OBJ_DIR_NAME_AGBCC := build/test
|
||||
|
||||
ifeq ($(MODERN),0)
|
||||
TEST_OBJ_DIR_NAME := $(TEST_OBJ_DIR_NAME_AGBCC)
|
||||
# Pick our active variables
|
||||
ROM := $(ROM_NAME)
|
||||
ifeq ($(TEST), 0)
|
||||
OBJ_DIR := $(OBJ_DIR_NAME)
|
||||
else
|
||||
TEST_OBJ_DIR_NAME := $(TEST_OBJ_DIR_NAME_MODERN)
|
||||
OBJ_DIR := $(OBJ_DIR_NAME_TEST)
|
||||
endif
|
||||
TESTELF = $(ROM:.gba=-test.elf)
|
||||
HEADLESSELF = $(ROM:.gba=-test-headless.elf)
|
||||
ifeq ($(DEBUG),1)
|
||||
OBJ_DIR := $(OBJ_DIR_NAME_DEBUG)
|
||||
endif
|
||||
ifeq ($(TESTELF),$(MAKECMDGOALS))
|
||||
TEST := 1
|
||||
endif
|
||||
ELF := $(ROM:.gba=.elf)
|
||||
MAP := $(ROM:.gba=.map)
|
||||
SYM := $(ROM:.gba=.sym)
|
||||
|
||||
# Commonly used directories
|
||||
C_SUBDIR = src
|
||||
GFLIB_SUBDIR = gflib
|
||||
ASM_SUBDIR = asm
|
||||
DATA_SRC_SUBDIR = src/data
|
||||
DATA_ASM_SUBDIR = data
|
||||
SONG_SUBDIR = sound/songs
|
||||
MID_SUBDIR = sound/songs/midi
|
||||
SAMPLE_SUBDIR = sound/direct_sound_samples
|
||||
CRY_SUBDIR = sound/direct_sound_samples/cries
|
||||
TEST_SUBDIR = test
|
||||
|
||||
C_BUILDDIR = $(OBJ_DIR)/$(C_SUBDIR)
|
||||
GFLIB_BUILDDIR = $(OBJ_DIR)/$(GFLIB_SUBDIR)
|
||||
ASM_BUILDDIR = $(OBJ_DIR)/$(ASM_SUBDIR)
|
||||
DATA_ASM_BUILDDIR = $(OBJ_DIR)/$(DATA_ASM_SUBDIR)
|
||||
SONG_BUILDDIR = $(OBJ_DIR)/$(SONG_SUBDIR)
|
||||
MID_BUILDDIR = $(OBJ_DIR)/$(MID_SUBDIR)
|
||||
TEST_BUILDDIR = $(OBJ_DIR)/$(TEST_SUBDIR)
|
||||
|
||||
ASFLAGS := -mcpu=arm7tdmi --defsym MODERN=$(MODERN)
|
||||
SHELL := bash -o pipefail
|
||||
|
||||
ifeq ($(MODERN),0)
|
||||
CC1 := tools/agbcc/bin/agbcc$(EXE)
|
||||
override CFLAGS += -mthumb-interwork -Wimplicit -Wparentheses -Werror -O2 -fhex-asm -g
|
||||
ROM := $(ROM_NAME)
|
||||
OBJ_DIR := $(OBJ_DIR_NAME)
|
||||
LIBPATH := -L ../../tools/agbcc/lib
|
||||
LIB := $(LIBPATH) -lgcc -lc -L../../libagbsyscall -lagbsyscall
|
||||
# Set flags for tools
|
||||
ASFLAGS := -mcpu=arm7tdmi --defsym MODERN=1
|
||||
|
||||
INCLUDE_DIRS := include
|
||||
INCLUDE_CPP_ARGS := $(INCLUDE_DIRS:%=-iquote %)
|
||||
INCLUDE_SCANINC_ARGS := $(INCLUDE_DIRS:%=-I %)
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
O_LEVEL ?= g
|
||||
else
|
||||
CC1 = $(shell $(PATH_MODERNCC) --print-prog-name=cc1) -quiet
|
||||
override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast -std=gnu17 -Werror -Wall -Wno-strict-aliasing -Wno-attribute-alias -Woverride-init
|
||||
O_LEVEL ?= 2
|
||||
endif
|
||||
CPPFLAGS := $(INCLUDE_CPP_ARGS) -Wno-trigraphs -DMODERN=1 -DTESTING=$(TEST)
|
||||
ARMCC := $(PREFIX)gcc
|
||||
PATH_ARMCC := PATH="$(PATH)" $(ARMCC)
|
||||
CC1 := $(shell $(PATH_ARMCC) --print-prog-name=cc1) -quiet
|
||||
override CFLAGS += -mthumb -mthumb-interwork -O$(O_LEVEL) -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast -std=gnu17 -Werror -Wall -Wno-strict-aliasing -Wno-attribute-alias -Woverride-init
|
||||
ifeq ($(ANALYZE),1)
|
||||
override CFLAGS += -fanalyzer
|
||||
override CFLAGS += -fanalyzer
|
||||
endif
|
||||
# Only throw an error for unused elements if its RH-Hideout's repo
|
||||
ifeq ($(UNUSED_ERROR),0)
|
||||
ifneq ($(GITHUB_REPOSITORY_OWNER),rh-hideout)
|
||||
override CFLAGS += -Wno-error=unused-variable -Wno-error=unused-const-variable -Wno-error=unused-parameter -Wno-error=unused-function -Wno-error=unused-but-set-parameter -Wno-error=unused-but-set-variable -Wno-error=unused-value -Wno-error=unused-local-typedefs
|
||||
ifneq ($(GITHUB_REPOSITORY_OWNER),rh-hideout)
|
||||
override CFLAGS += -Wno-error=unused-variable -Wno-error=unused-const-variable -Wno-error=unused-parameter -Wno-error=unused-function -Wno-error=unused-but-set-parameter -Wno-error=unused-but-set-variable -Wno-error=unused-value -Wno-error=unused-local-typedefs
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ROM := $(MODERN_ROM_NAME)
|
||||
OBJ_DIR := $(MODERN_OBJ_DIR_NAME)
|
||||
LIBPATH := -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libgcc.a))" -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libnosys.a))" -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libc.a))"
|
||||
LIBPATH := -L "$(dir $(shell $(PATH_ARMCC) -mthumb -print-file-name=libgcc.a))" -L "$(dir $(shell $(PATH_ARMCC) -mthumb -print-file-name=libnosys.a))" -L "$(dir $(shell $(PATH_ARMCC) -mthumb -print-file-name=libc.a))"
|
||||
LIB := $(LIBPATH) -lc -lnosys -lgcc -L../../libagbsyscall -lagbsyscall
|
||||
# Enable debug info if set
|
||||
ifeq ($(DINFO),1)
|
||||
override CFLAGS += -g
|
||||
else
|
||||
ifeq ($(DEBUG),1)
|
||||
override CFLAGS += -g
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(TESTELF),$(MAKECMDGOALS))
|
||||
TEST := 1
|
||||
ifeq ($(NOOPT),1)
|
||||
override CFLAGS := $(filter-out -O1 -Og -O2,$(CFLAGS))
|
||||
override CFLAGS += -O0
|
||||
endif
|
||||
|
||||
ifeq ($(TEST),1)
|
||||
OBJ_DIR := $(TEST_OBJ_DIR_NAME)
|
||||
endif
|
||||
|
||||
CPPFLAGS := -iquote include -iquote $(GFLIB_SUBDIR) -Wno-trigraphs -DMODERN=$(MODERN) -DTESTING=$(TEST)
|
||||
ifneq ($(MODERN),1)
|
||||
CPPFLAGS += -I tools/agbcc/include -I tools/agbcc -nostdinc -undef
|
||||
endif
|
||||
|
||||
SHA1 := $(shell { command -v sha1sum || command -v shasum; } 2>/dev/null) -c
|
||||
GFX := tools/gbagfx/gbagfx$(EXE)
|
||||
AIF := tools/aif2pcm/aif2pcm$(EXE)
|
||||
MID := tools/mid2agb/mid2agb$(EXE)
|
||||
SCANINC := tools/scaninc/scaninc$(EXE)
|
||||
PREPROC := tools/preproc/preproc$(EXE)
|
||||
RAMSCRGEN := tools/ramscrgen/ramscrgen$(EXE)
|
||||
FIX := tools/gbafix/gbafix$(EXE)
|
||||
MAPJSON := tools/mapjson/mapjson$(EXE)
|
||||
JSONPROC := tools/jsonproc/jsonproc$(EXE)
|
||||
PATCHELF := tools/patchelf/patchelf$(EXE)
|
||||
ROMTEST ?= $(shell { command -v mgba-rom-test || command -v tools/mgba/mgba-rom-test$(EXE); } 2>/dev/null)
|
||||
ROMTESTHYDRA := tools/mgba-rom-test-hydra/mgba-rom-test-hydra$(EXE)
|
||||
TRAINERPROC := tools/trainerproc/trainerproc$(EXE)
|
||||
# Variable filled out in other make files
|
||||
AUTO_GEN_TARGETS :=
|
||||
include make_tools.mk
|
||||
# Tool executables
|
||||
GFX := $(TOOLS_DIR)/gbagfx/gbagfx$(EXE)
|
||||
AIF := $(TOOLS_DIR)/aif2pcm/aif2pcm$(EXE)
|
||||
MID := $(TOOLS_DIR)/mid2agb/mid2agb$(EXE)
|
||||
SCANINC := $(TOOLS_DIR)/scaninc/scaninc$(EXE)
|
||||
PREPROC := $(TOOLS_DIR)/preproc/preproc$(EXE)
|
||||
RAMSCRGEN := $(TOOLS_DIR)/ramscrgen/ramscrgen$(EXE)
|
||||
FIX := $(TOOLS_DIR)/gbafix/gbafix$(EXE)
|
||||
MAPJSON := $(TOOLS_DIR)/mapjson/mapjson$(EXE)
|
||||
JSONPROC := $(TOOLS_DIR)/jsonproc/jsonproc$(EXE)
|
||||
TRAINERPROC := $(TOOLS_DIR)/trainerproc/trainerproc$(EXE)
|
||||
PATCHELF := $(TOOLS_DIR)/patchelf/patchelf$(EXE)
|
||||
ROMTEST ?= $(shell { command -v mgba-rom-test || command -v $(TOOLS_DIR)/mgba/mgba-rom-test$(EXE); } 2>/dev/null)
|
||||
ROMTESTHYDRA := $(TOOLS_DIR)/mgba-rom-test-hydra/mgba-rom-test-hydra$(EXE)
|
||||
|
||||
PERL := perl
|
||||
|
||||
# Inclusive list. If you don't want a tool to be built, don't add it here.
|
||||
TOOLDIRS := tools/aif2pcm tools/bin2c tools/gbafix tools/gbagfx tools/jsonproc tools/mapjson tools/mid2agb tools/preproc tools/ramscrgen tools/rsfont tools/scaninc tools/trainerproc
|
||||
CHECKTOOLDIRS = tools/patchelf tools/mgba-rom-test-hydra
|
||||
TOOLBASE = $(TOOLDIRS:tools/%=%)
|
||||
TOOLS = $(foreach tool,$(TOOLBASE),tools/$(tool)/$(tool)$(EXE))
|
||||
SHA1 := $(shell { command -v sha1sum || command -v shasum; } 2>/dev/null) -c
|
||||
|
||||
MAKEFLAGS += --no-print-directory
|
||||
|
||||
@ -188,37 +177,41 @@ MAKEFLAGS += --no-print-directory
|
||||
# Delete files that weren't built properly
|
||||
.DELETE_ON_ERROR:
|
||||
|
||||
# Secondary expansion is required for dependency variables in object rules.
|
||||
.SECONDEXPANSION:
|
||||
|
||||
.PHONY: all rom clean compare tidy tools check-tools mostlyclean clean-tools clean-check-tools $(TOOLDIRS) $(CHECKTOOLDIRS) libagbsyscall agbcc modern tidymodern tidynonmodern check history
|
||||
RULES_NO_SCAN += libagbsyscall clean clean-assets tidy tidymodern tidycheck generated clean-generated $(TESTELF)
|
||||
.PHONY: all rom agbcc modern compare check debug
|
||||
.PHONY: $(RULES_NO_SCAN)
|
||||
|
||||
infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line))))
|
||||
|
||||
# Build tools when building the rom
|
||||
# Disable dependency scanning for clean/tidy/tools
|
||||
# Use a separate minimal makefile for speed
|
||||
# Since we don't need to reload most of this makefile
|
||||
ifeq (,$(filter-out all rom compare agbcc modern check libagbsyscall syms $(TESTELF),$(MAKECMDGOALS)))
|
||||
$(call infoshell, $(MAKE) -f make_tools.mk)
|
||||
else
|
||||
NODEP ?= 1
|
||||
endif
|
||||
|
||||
# check if we need to scan dependencies based on the rule
|
||||
ifeq (,$(MAKECMDGOALS))
|
||||
SCAN_DEPS ?= 1
|
||||
else
|
||||
# clean, tidy, tools, check-tools, mostlyclean, clean-tools, clean-check-tools, $(TOOLDIRS), $(CHECKTOOLDIRS), tidymodern, tidynonmodern, tidycheck don't even build the ROM
|
||||
# libagbsyscall does its own thing
|
||||
ifeq (,$(filter-out clean tidy tools mostlyclean clean-tools $(TOOLDIRS) clean-check-tools $(CHECKTOOLDIRS) tidymodern tidynonmodern tidycheck libagbsyscall,$(MAKECMDGOALS)))
|
||||
SCAN_DEPS ?= 0
|
||||
else
|
||||
SCAN_DEPS ?= 1
|
||||
# Check if we need to scan dependencies based on the chosen rule OR user preference
|
||||
NODEP ?= 0
|
||||
# Check if we need to pre-build tools and generate assets based on the chosen rule.
|
||||
SETUP_PREREQS ?= 1
|
||||
# Disable dependency scanning for rules that don't need it.
|
||||
ifneq (,$(MAKECMDGOALS))
|
||||
ifeq (,$(filter-out $(RULES_NO_SCAN),$(MAKECMDGOALS)))
|
||||
NODEP := 1
|
||||
SETUP_PREREQS := 0
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(SCAN_DEPS),1)
|
||||
.SHELLSTATUS ?= 0
|
||||
|
||||
ifeq ($(SETUP_PREREQS),1)
|
||||
# If set on: Default target or a rule requiring a scan
|
||||
# Forcibly execute `make tools` since we need them for what we are doing.
|
||||
$(foreach line, $(shell $(MAKE) -f make_tools.mk | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line))))
|
||||
ifneq ($(.SHELLSTATUS),0)
|
||||
$(error Errors occurred while building tools. See error messages above for more details)
|
||||
endif
|
||||
# Oh and also generate mapjson sources before we use `SCANINC`.
|
||||
$(foreach line, $(shell $(MAKE) generated | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line))))
|
||||
ifneq ($(.SHELLSTATUS),0)
|
||||
$(error Errors occurred while generating map-related sources. See error messages above for more details)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Collect sources
|
||||
C_SRCS_IN := $(wildcard $(C_SUBDIR)/*.c $(C_SUBDIR)/*/*.c $(C_SUBDIR)/*/*/*.c)
|
||||
C_SRCS := $(foreach src,$(C_SRCS_IN),$(if $(findstring .inc.c,$(src)),,$(src)))
|
||||
C_OBJS := $(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(C_SRCS))
|
||||
@ -228,10 +221,7 @@ TEST_SRCS := $(foreach src,$(TEST_SRCS_IN),$(if $(findstring .inc.c,$(src)),,$(s
|
||||
TEST_OBJS := $(patsubst $(TEST_SUBDIR)/%.c,$(TEST_BUILDDIR)/%.o,$(TEST_SRCS))
|
||||
TEST_OBJS_REL := $(patsubst $(OBJ_DIR)/%,%,$(TEST_OBJS))
|
||||
|
||||
GFLIB_SRCS := $(wildcard $(GFLIB_SUBDIR)/*.c)
|
||||
GFLIB_OBJS := $(patsubst $(GFLIB_SUBDIR)/%.c,$(GFLIB_BUILDDIR)/%.o,$(GFLIB_SRCS))
|
||||
|
||||
C_ASM_SRCS += $(wildcard $(C_SUBDIR)/*.s $(C_SUBDIR)/*/*.s $(C_SUBDIR)/*/*/*.s)
|
||||
C_ASM_SRCS := $(wildcard $(C_SUBDIR)/*.s $(C_SUBDIR)/*/*.s $(C_SUBDIR)/*/*/*.s)
|
||||
C_ASM_OBJS := $(patsubst $(C_SUBDIR)/%.s,$(C_BUILDDIR)/%.o,$(C_ASM_SRCS))
|
||||
|
||||
ASM_SRCS := $(wildcard $(ASM_SUBDIR)/*.s)
|
||||
@ -249,266 +239,16 @@ SONG_OBJS := $(patsubst $(SONG_SUBDIR)/%.s,$(SONG_BUILDDIR)/%.o,$(SONG_SRCS))
|
||||
MID_SRCS := $(wildcard $(MID_SUBDIR)/*.mid)
|
||||
MID_OBJS := $(patsubst $(MID_SUBDIR)/%.mid,$(MID_BUILDDIR)/%.o,$(MID_SRCS))
|
||||
|
||||
OBJS := $(C_OBJS) $(GFLIB_OBJS) $(C_ASM_OBJS) $(ASM_OBJS) $(DATA_ASM_OBJS) $(SONG_OBJS) $(MID_OBJS)
|
||||
OBJS := $(C_OBJS) $(C_ASM_OBJS) $(ASM_OBJS) $(DATA_ASM_OBJS) $(SONG_OBJS) $(MID_OBJS)
|
||||
OBJS_REL := $(patsubst $(OBJ_DIR)/%,%,$(OBJS))
|
||||
|
||||
SUBDIRS := $(sort $(dir $(OBJS) $(dir $(TEST_OBJS))))
|
||||
$(shell mkdir -p $(SUBDIRS))
|
||||
endif
|
||||
|
||||
AUTO_GEN_TARGETS :=
|
||||
|
||||
all: history rom
|
||||
|
||||
history:
|
||||
@bash ./check_history.sh
|
||||
|
||||
tools: $(TOOLDIRS)
|
||||
|
||||
check-tools: $(CHECKTOOLDIRS)
|
||||
|
||||
syms: $(SYM)
|
||||
|
||||
$(TOOLDIRS):
|
||||
@$(MAKE) -C $@
|
||||
|
||||
$(CHECKTOOLDIRS):
|
||||
@$(MAKE) -C $@
|
||||
|
||||
rom: $(ROM)
|
||||
ifeq ($(COMPARE),1)
|
||||
@$(SHA1) rom.sha1
|
||||
endif
|
||||
|
||||
# For contributors to make sure a change didn't affect the contents of the ROM.
|
||||
# Pretend rules that are actually flags defer to `make all`
|
||||
modern: all
|
||||
compare: all
|
||||
|
||||
clean: mostlyclean clean-tools clean-check-tools
|
||||
|
||||
clean-tools:
|
||||
@$(foreach tooldir,$(TOOLDIRS),$(MAKE) clean -C $(tooldir);)
|
||||
|
||||
clean-check-tools:
|
||||
@$(foreach tooldir,$(CHECKTOOLDIRS),$(MAKE) clean -C $(tooldir);)
|
||||
|
||||
mostlyclean: tidynonmodern tidymodern tidycheck
|
||||
find sound -iname '*.bin' -exec rm {} +
|
||||
rm -f $(MID_SUBDIR)/*.s
|
||||
find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.rl' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -exec rm {} +
|
||||
rm -f $(DATA_ASM_SUBDIR)/layouts/layouts.inc $(DATA_ASM_SUBDIR)/layouts/layouts_table.inc
|
||||
rm -f $(DATA_ASM_SUBDIR)/maps/connections.inc $(DATA_ASM_SUBDIR)/maps/events.inc $(DATA_ASM_SUBDIR)/maps/groups.inc $(DATA_ASM_SUBDIR)/maps/headers.inc $(DATA_SRC_SUBDIR)/map_group_count.h
|
||||
find $(DATA_ASM_SUBDIR)/maps \( -iname 'connections.inc' -o -iname 'events.inc' -o -iname 'header.inc' \) -exec rm {} +
|
||||
rm -f $(AUTO_GEN_TARGETS)
|
||||
@$(MAKE) clean -C libagbsyscall
|
||||
|
||||
tidy: tidynonmodern tidymodern tidycheck
|
||||
|
||||
tidynonmodern:
|
||||
rm -f $(ROM_NAME) $(ELF_NAME) $(MAP_NAME)
|
||||
rm -rf $(OBJ_DIR_NAME)
|
||||
|
||||
tidymodern:
|
||||
rm -f $(MODERN_ROM_NAME) $(MODERN_ELF_NAME) $(MODERN_MAP_NAME)
|
||||
rm -rf $(MODERN_OBJ_DIR_NAME)
|
||||
|
||||
tidycheck:
|
||||
rm -f $(TESTELF) $(HEADLESSELF)
|
||||
rm -rf $(TEST_OBJ_DIR_NAME_MODERN)
|
||||
rm -rf $(TEST_OBJ_DIR_NAME_AGBCC)
|
||||
|
||||
|
||||
ifneq ($(MODERN),0)
|
||||
$(C_BUILDDIR)/berry_crush.o: override CFLAGS += -Wno-address-of-packed-member
|
||||
endif
|
||||
|
||||
include graphics_file_rules.mk
|
||||
include map_data_rules.mk
|
||||
include spritesheet_rules.mk
|
||||
include json_data_rules.mk
|
||||
include songs.mk
|
||||
|
||||
%.s: ;
|
||||
%.png: ;
|
||||
%.pal: ;
|
||||
%.aif: ;
|
||||
|
||||
%.1bpp: %.png ; $(GFX) $< $@
|
||||
%.4bpp: %.png ; $(GFX) $< $@
|
||||
%.8bpp: %.png ; $(GFX) $< $@
|
||||
%.gbapal: %.pal ; $(GFX) $< $@
|
||||
%.gbapal: %.png ; $(GFX) $< $@
|
||||
%.lz: % ; $(GFX) $< $@
|
||||
%.rl: % ; $(GFX) $< $@
|
||||
|
||||
$(CRY_SUBDIR)/uncomp_%.bin: $(CRY_SUBDIR)/uncomp_%.aif ; $(AIF) $< $@
|
||||
$(CRY_SUBDIR)/%.bin: $(CRY_SUBDIR)/%.aif ; $(AIF) $< $@ --compress
|
||||
sound/%.bin: sound/%.aif ; $(AIF) $< $@
|
||||
|
||||
COMPETITIVE_PARTY_SYNTAX := $(shell PATH="$(PATH)"; echo 'COMPETITIVE_PARTY_SYNTAX' | $(CPP) $(CPPFLAGS) -imacros include/global.h | tail -n1)
|
||||
ifeq ($(COMPETITIVE_PARTY_SYNTAX),1)
|
||||
%.h: %.party tools ; $(CPP) $(CPPFLAGS) -traditional-cpp - < $< | $(TRAINERPROC) -o $@ -i $< -
|
||||
endif
|
||||
|
||||
ifeq ($(MODERN),0)
|
||||
$(C_BUILDDIR)/libc.o: CC1 := tools/agbcc/bin/old_agbcc$(EXE)
|
||||
$(C_BUILDDIR)/libc.o: CFLAGS := -O2
|
||||
|
||||
$(C_BUILDDIR)/siirtc.o: CFLAGS := -mthumb-interwork
|
||||
|
||||
$(C_BUILDDIR)/agb_flash.o: CFLAGS := -O -mthumb-interwork
|
||||
$(C_BUILDDIR)/agb_flash_1m.o: CFLAGS := -O -mthumb-interwork
|
||||
$(C_BUILDDIR)/agb_flash_mx.o: CFLAGS := -O -mthumb-interwork
|
||||
|
||||
$(C_BUILDDIR)/m4a.o: CC1 := tools/agbcc/bin/old_agbcc$(EXE)
|
||||
|
||||
$(C_BUILDDIR)/record_mixing.o: CFLAGS += -ffreestanding
|
||||
$(C_BUILDDIR)/librfu_intr.o: CC1 := tools/agbcc/bin/agbcc_arm$(EXE)
|
||||
$(C_BUILDDIR)/librfu_intr.o: CFLAGS := -O2 -mthumb-interwork -quiet
|
||||
else
|
||||
$(C_BUILDDIR)/librfu_intr.o: CFLAGS := -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast
|
||||
$(C_BUILDDIR)/pokedex_plus_hgss.o: CFLAGS := -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -Wno-pointer-to-int-cast -std=gnu17 -Werror -Wall -Wno-strict-aliasing -Wno-attribute-alias -Woverride-init
|
||||
# Annoyingly we can't turn this on just for src/data/trainers.h
|
||||
$(C_BUILDDIR)/data.o: CFLAGS += -fno-show-column -fno-diagnostics-show-caret
|
||||
endif
|
||||
|
||||
ifeq ($(DINFO),1)
|
||||
override CFLAGS += -g
|
||||
endif
|
||||
|
||||
# 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.
|
||||
# It doesn't look like $(shell) can be deferred so there might not be a better way.
|
||||
|
||||
ifeq ($(SCAN_DEPS),1)
|
||||
ifeq ($(NODEP),1)
|
||||
$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.c
|
||||
ifeq (,$(KEEP_TEMPS))
|
||||
@echo "$(CC1) <flags> -o $@ $<"
|
||||
@$(CPP) $(CPPFLAGS) $< | $(PREPROC) -i $< charmap.txt | $(CC1) $(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $(AS) $(ASFLAGS) -o $@ -
|
||||
else
|
||||
@$(CPP) $(CPPFLAGS) $< -o $(C_BUILDDIR)/$*.i
|
||||
@$(PREPROC) $(C_BUILDDIR)/$*.i charmap.txt | $(CC1) $(CFLAGS) -o $(C_BUILDDIR)/$*.s
|
||||
@echo -e ".text\n\t.align\t2, 0\n" >> $(C_BUILDDIR)/$*.s
|
||||
$(AS) $(ASFLAGS) -o $@ $(C_BUILDDIR)/$*.s
|
||||
endif
|
||||
else
|
||||
define C_DEP
|
||||
$1: $2 $$(shell $(SCANINC) -I include -I tools/agbcc/include -I gflib $2)
|
||||
ifeq (,$$(KEEP_TEMPS))
|
||||
@echo "$$(CC1) <flags> -o $$@ $$<"
|
||||
@$$(CPP) $$(CPPFLAGS) $$< | $$(PREPROC) -i $$< charmap.txt | $$(CC1) $$(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $$(AS) $$(ASFLAGS) -o $$@ -
|
||||
else
|
||||
@$$(CPP) $$(CPPFLAGS) $$< -o $$(C_BUILDDIR)/$3.i
|
||||
@$$(PREPROC) $$(C_BUILDDIR)/$3.i charmap.txt | $$(CC1) $$(CFLAGS) -o $$(C_BUILDDIR)/$3.s
|
||||
@echo -e ".text\n\t.align\t2, 0\n" >> $$(C_BUILDDIR)/$3.s
|
||||
$$(AS) $$(ASFLAGS) -o $$@ $$(C_BUILDDIR)/$3.s
|
||||
endif
|
||||
endef
|
||||
$(foreach src, $(C_SRCS), $(eval $(call C_DEP,$(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(src)),$(src),$(patsubst $(C_SUBDIR)/%.c,%,$(src)))))
|
||||
endif
|
||||
|
||||
ifeq ($(NODEP),1)
|
||||
$(GFLIB_BUILDDIR)/%.o: $(GFLIB_SUBDIR)/%.c $$(c_dep)
|
||||
ifeq (,$(KEEP_TEMPS))
|
||||
@echo "$(CC1) <flags> -o $@ $<"
|
||||
@$(CPP) $(CPPFLAGS) $< | $(PREPROC) -i $< charmap.txt | $(CC1) $(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $(AS) $(ASFLAGS) -o $@ -
|
||||
else
|
||||
@$(CPP) $(CPPFLAGS) $< -o $(GFLIB_BUILDDIR)/$*.i
|
||||
@$(PREPROC) $(GFLIB_BUILDDIR)/$*.i charmap.txt | $(CC1) $(CFLAGS) -o $(GFLIB_BUILDDIR)/$*.s
|
||||
@echo -e ".text\n\t.align\t2, 0\n" >> $(GFLIB_BUILDDIR)/$*.s
|
||||
$(AS) $(ASFLAGS) -o $@ $(GFLIB_BUILDDIR)/$*.s
|
||||
endif
|
||||
else
|
||||
define GFLIB_DEP
|
||||
$1: $2 $$(shell $(SCANINC) -I include -I tools/agbcc/include -I gflib $2)
|
||||
ifeq (,$$(KEEP_TEMPS))
|
||||
@echo "$$(CC1) <flags> -o $$@ $$<"
|
||||
@$$(CPP) $$(CPPFLAGS) $$< | $$(PREPROC) -i $$< charmap.txt | $$(CC1) $$(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $$(AS) $$(ASFLAGS) -o $$@ -
|
||||
else
|
||||
@$$(CPP) $$(CPPFLAGS) $$< -o $$(GFLIB_BUILDDIR)/$3.i
|
||||
@$$(PREPROC) $$(GFLIB_BUILDDIR)/$3.i charmap.txt | $$(CC1) $$(CFLAGS) -o $$(GFLIB_BUILDDIR)/$3.s
|
||||
@echo -e ".text\n\t.align\t2, 0\n" >> $$(GFLIB_BUILDDIR)/$3.s
|
||||
$$(AS) $$(ASFLAGS) -o $$@ $$(GFLIB_BUILDDIR)/$3.s
|
||||
endif
|
||||
endef
|
||||
$(foreach src, $(GFLIB_SRCS), $(eval $(call GFLIB_DEP,$(patsubst $(GFLIB_SUBDIR)/%.c,$(GFLIB_BUILDDIR)/%.o, $(src)),$(src),$(patsubst $(GFLIB_SUBDIR)/%.c,%, $(src)))))
|
||||
endif
|
||||
|
||||
ifeq ($(NODEP),1)
|
||||
$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.s
|
||||
$(PREPROC) $< charmap.txt | $(CPP) -I include - | $(PREPROC) -i $$< charmap.txt | $(AS) $(ASFLAGS) -o $@
|
||||
else
|
||||
define SRC_ASM_DATA_DEP
|
||||
$1: $2 $$(shell $(SCANINC) -I include -I "" $2)
|
||||
$$(PREPROC) $$< charmap.txt | $$(CPP) -I include - | $$(PREPROC) -ie $$< charmap.txt | $$(AS) $$(ASFLAGS) -o $$@
|
||||
endef
|
||||
$(foreach src, $(C_ASM_SRCS), $(eval $(call SRC_ASM_DATA_DEP,$(patsubst $(C_SUBDIR)/%.s,$(C_BUILDDIR)/%.o, $(src)),$(src))))
|
||||
endif
|
||||
|
||||
ifeq ($(NODEP),1)
|
||||
$(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s
|
||||
$(AS) $(ASFLAGS) -o $@ $<
|
||||
else
|
||||
define ASM_DEP
|
||||
$1: $2 $$(shell $(SCANINC) -I include -I "" $2)
|
||||
$$(AS) $$(ASFLAGS) -o $$@ $$<
|
||||
endef
|
||||
$(foreach src, $(ASM_SRCS), $(eval $(call ASM_DEP,$(patsubst $(ASM_SUBDIR)/%.s,$(ASM_BUILDDIR)/%.o, $(src)),$(src))))
|
||||
endif
|
||||
|
||||
ifeq ($(NODEP),1)
|
||||
$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s
|
||||
$(PREPROC) $< charmap.txt | $(CPP) -I include - | $(PREPROC) -ie $$< charmap.txt | $(AS) $(ASFLAGS) -o $@
|
||||
else
|
||||
$(foreach src, $(REGULAR_DATA_ASM_SRCS), $(eval $(call SRC_ASM_DATA_DEP,$(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o, $(src)),$(src))))
|
||||
endif
|
||||
endif
|
||||
|
||||
$(SONG_BUILDDIR)/%.o: $(SONG_SUBDIR)/%.s
|
||||
$(AS) $(ASFLAGS) -I sound -o $@ $<
|
||||
|
||||
$(OBJ_DIR)/sym_bss.ld: sym_bss.txt
|
||||
$(RAMSCRGEN) .bss $< ENGLISH > $@
|
||||
|
||||
$(OBJ_DIR)/sym_common.ld: sym_common.txt $(C_OBJS) $(wildcard common_syms/*.txt)
|
||||
$(RAMSCRGEN) COMMON $< ENGLISH -c $(C_BUILDDIR),common_syms > $@
|
||||
|
||||
$(OBJ_DIR)/sym_ewram.ld: sym_ewram.txt
|
||||
$(RAMSCRGEN) ewram_data $< ENGLISH > $@
|
||||
|
||||
# NOTE: Depending on event_scripts.o is hacky, but we want to depend on everything event_scripts.s depends on without having to alter scaninc
|
||||
$(DATA_SRC_SUBDIR)/pokemon/teachable_learnsets.h: $(DATA_ASM_BUILDDIR)/event_scripts.o
|
||||
python3 tools/learnset_helpers/teachable.py
|
||||
|
||||
# NOTE: Based on C_DEP above, but without NODEP and KEEP_TEMPS handling.
|
||||
define TEST_DEP
|
||||
$1: $2 $$(shell $(SCANINC) -I include -I tools/agbcc/include -I gflib $2)
|
||||
@echo "$$(CC1) <flags> -o $$@ $$<"
|
||||
@$$(CPP) $$(CPPFLAGS) $$< | $$(PREPROC) -i $$< charmap.txt | $$(CC1) $$(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $$(AS) $$(ASFLAGS) -o $$@ -
|
||||
endef
|
||||
$(foreach src, $(TEST_SRCS), $(eval $(call TEST_DEP,$(patsubst $(TEST_SUBDIR)/%.c,$(TEST_BUILDDIR)/%.o,$(src)),$(src),$(patsubst $(TEST_SUBDIR)/%.c,%,$(src)))))
|
||||
|
||||
ifeq ($(MODERN),0)
|
||||
LD_SCRIPT := ld_script.ld
|
||||
LD_SCRIPT_DEPS := $(OBJ_DIR)/sym_bss.ld $(OBJ_DIR)/sym_common.ld $(OBJ_DIR)/sym_ewram.ld
|
||||
else
|
||||
LD_SCRIPT := ld_script_modern.ld
|
||||
LD_SCRIPT_DEPS :=
|
||||
endif
|
||||
|
||||
$(OBJ_DIR)/ld_script.ld: $(LD_SCRIPT) $(LD_SCRIPT_DEPS)
|
||||
cd $(OBJ_DIR) && sed "s#tools/#../../tools/#g" ../../$(LD_SCRIPT) > ld_script.ld
|
||||
|
||||
LDFLAGS = -Map ../../$(MAP)
|
||||
$(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS) libagbsyscall
|
||||
@echo "cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ <objects> <lib>"
|
||||
@cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld --print-memory-usage -o ../../$@ $(OBJS_REL) $(LIB) | cat
|
||||
$(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent
|
||||
|
||||
$(ROM): $(ELF)
|
||||
$(OBJCOPY) -O binary $< $@
|
||||
$(FIX) $@ -p --silent
|
||||
|
||||
debug: all
|
||||
# Uncomment the next line, and then comment the 4 lines after it to reenable agbcc.
|
||||
#agbcc: all
|
||||
agbcc:
|
||||
@ -516,8 +256,6 @@ agbcc:
|
||||
@echo "Search for 'agbcc: all' in Makefile to reenable agbcc."
|
||||
@exit 1
|
||||
|
||||
modern: all
|
||||
|
||||
LD_SCRIPT_TEST := ld_script_test.ld
|
||||
|
||||
$(OBJ_DIR)/ld_script_test.ld: $(LD_SCRIPT_TEST) $(LD_SCRIPT_DEPS)
|
||||
@ -540,12 +278,179 @@ check: $(TESTELF)
|
||||
$(PATCHELF) $(HEADLESSELF) gTestRunnerHeadless '\x01' gTestRunnerSkipIsFail "$(TEST_SKIP_IS_FAIL)"
|
||||
$(ROMTESTHYDRA) $(ROMTEST) $(OBJCOPY) $(HEADLESSELF)
|
||||
|
||||
# Other rules
|
||||
rom: $(ROM)
|
||||
ifeq ($(COMPARE),1)
|
||||
@$(SHA1) rom.sha1
|
||||
endif
|
||||
|
||||
syms: $(SYM)
|
||||
|
||||
clean: tidy clean-tools clean-check-tools clean-generated clean-assets
|
||||
@$(MAKE) clean -C libagbsyscall
|
||||
|
||||
clean-assets:
|
||||
rm -f $(MID_SUBDIR)/*.s
|
||||
rm -f $(DATA_ASM_SUBDIR)/layouts/layouts.inc $(DATA_ASM_SUBDIR)/layouts/layouts_table.inc
|
||||
rm -f $(DATA_ASM_SUBDIR)/maps/connections.inc $(DATA_ASM_SUBDIR)/maps/events.inc $(DATA_ASM_SUBDIR)/maps/groups.inc $(DATA_ASM_SUBDIR)/maps/headers.inc $(DATA_SRC_SUBDIR)/map_group_count.h
|
||||
find sound -iname '*.bin' -exec rm {} +
|
||||
find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.rl' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -exec rm {} +
|
||||
find $(DATA_ASM_SUBDIR)/maps \( -iname 'connections.inc' -o -iname 'events.inc' -o -iname 'header.inc' \) -exec rm {} +
|
||||
|
||||
tidy: tidymodern tidycheck tidydebug
|
||||
|
||||
tidymodern:
|
||||
rm -f $(ROM_NAME) $(ELF_NAME) $(MAP_NAME)
|
||||
rm -rf $(OBJ_DIR_NAME)
|
||||
|
||||
tidycheck:
|
||||
rm -f $(TESTELF) $(HEADLESSELF)
|
||||
rm -rf $(OBJ_DIR_NAME_TEST)
|
||||
|
||||
tidydebug:
|
||||
rm -rf $(DEBUG_OBJ_DIR_NAME)
|
||||
|
||||
# Other rules
|
||||
include graphics_file_rules.mk
|
||||
include map_data_rules.mk
|
||||
include spritesheet_rules.mk
|
||||
include json_data_rules.mk
|
||||
include audio_rules.mk
|
||||
|
||||
# NOTE: Tools must have been built prior (FIXME)
|
||||
# so you can't really call this rule directly
|
||||
generated: $(AUTO_GEN_TARGETS)
|
||||
@: # Silence the "Nothing to be done for `generated'" message, which some people were confusing for an error.
|
||||
|
||||
|
||||
%.s: ;
|
||||
%.png: ;
|
||||
%.pal: ;
|
||||
%.aif: ;
|
||||
|
||||
%.1bpp: %.png ; $(GFX) $< $@
|
||||
%.4bpp: %.png ; $(GFX) $< $@
|
||||
%.8bpp: %.png ; $(GFX) $< $@
|
||||
%.gbapal: %.pal ; $(GFX) $< $@
|
||||
%.gbapal: %.png ; $(GFX) $< $@
|
||||
%.lz: % ; $(GFX) $< $@
|
||||
%.rl: % ; $(GFX) $< $@
|
||||
|
||||
clean-generated:
|
||||
-rm -f $(AUTO_GEN_TARGETS)
|
||||
|
||||
COMPETITIVE_PARTY_SYNTAX := $(shell PATH="$(PATH)"; echo 'COMPETITIVE_PARTY_SYNTAX' | $(CPP) $(CPPFLAGS) -imacros include/gba/defines.h -imacros include/config/general.h | tail -n1)
|
||||
ifeq ($(COMPETITIVE_PARTY_SYNTAX),1)
|
||||
%.h: %.party ; $(CPP) $(CPPFLAGS) -traditional-cpp - < $< | $(TRAINERPROC) -o $@ -i $< -
|
||||
endif
|
||||
|
||||
$(C_BUILDDIR)/librfu_intr.o: CFLAGS := -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast
|
||||
$(C_BUILDDIR)/berry_crush.o: override CFLAGS += -Wno-address-of-packed-member
|
||||
$(C_BUILDDIR)/pokedex_plus_hgss.o: CFLAGS := -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -Wno-pointer-to-int-cast -std=gnu17 -Werror -Wall -Wno-strict-aliasing -Wno-attribute-alias -Woverride-init
|
||||
# Annoyingly we can't turn this on just for src/data/trainers.h
|
||||
$(C_BUILDDIR)/data.o: CFLAGS += -fno-show-column -fno-diagnostics-show-caret
|
||||
|
||||
$(TEST_BUILDDIR)/%.o: CFLAGS := -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -Wno-pointer-to-int-cast -Werror -Wall -Wno-strict-aliasing -Wno-attribute-alias -Woverride-init
|
||||
|
||||
# Dependency rules (for the *.c & *.s sources to .o files)
|
||||
# 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.
|
||||
# It doesn't look like $(shell) can be deferred so there might not be a better way (Icedude_907: there is soon).
|
||||
|
||||
$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.c
|
||||
ifneq ($(KEEP_TEMPS),1)
|
||||
@echo "$(CC1) <flags> -o $@ $<"
|
||||
@$(CPP) $(CPPFLAGS) $< | $(PREPROC) -i $< charmap.txt | $(CC1) $(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $(AS) $(ASFLAGS) -o $@ -
|
||||
else
|
||||
@$(CPP) $(CPPFLAGS) $< -o $*.i
|
||||
@$(PREPROC) $*.i charmap.txt | $(CC1) $(CFLAGS) -o $*.s
|
||||
@echo -e ".text\n\t.align\t2, 0\n" >> $*.s
|
||||
$(AS) $(ASFLAGS) -o $@ $*.s
|
||||
endif
|
||||
|
||||
$(C_BUILDDIR)/%.d: $(C_SUBDIR)/%.c
|
||||
$(SCANINC) -M $@ $(INCLUDE_SCANINC_ARGS) -I tools/agbcc/include $<
|
||||
|
||||
ifneq ($(NODEP),1)
|
||||
-include $(addprefix $(OBJ_DIR)/,$(C_SRCS:.c=.d))
|
||||
endif
|
||||
|
||||
$(TEST_BUILDDIR)/%.o: $(TEST_SUBDIR)/%.c
|
||||
@echo "$(CC1) <flags> -o $@ $<"
|
||||
@$(CPP) $(CPPFLAGS) $< | $(PREPROC) -i $< charmap.txt | $(CC1) $(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $(AS) $(ASFLAGS) -o $@ -
|
||||
|
||||
$(TEST_BUILDDIR)/%.d: $(TEST_SUBDIR)/%.c
|
||||
$(SCANINC) -M $@ $(INCLUDE_SCANINC_ARGS) -I tools/agbcc/include $<
|
||||
|
||||
ifneq ($(NODEP),1)
|
||||
-include $(addprefix $(OBJ_DIR)/,$(TEST_SRCS:.c=.d))
|
||||
endif
|
||||
|
||||
$(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s
|
||||
$(AS) $(ASFLAGS) -o $@ $<
|
||||
|
||||
$(ASM_BUILDDIR)/%.d: $(ASM_SUBDIR)/%.s
|
||||
$(SCANINC) -M $@ $(INCLUDE_SCANINC_ARGS) -I "" $<
|
||||
|
||||
ifneq ($(NODEP),1)
|
||||
-include $(addprefix $(OBJ_DIR)/,$(ASM_SRCS:.s=.d))
|
||||
endif
|
||||
|
||||
$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.s
|
||||
$(PREPROC) $< charmap.txt | $(CPP) $(INCLUDE_SCANINC_ARGS) - | $(PREPROC) -ie $< charmap.txt | $(AS) $(ASFLAGS) -o $@
|
||||
|
||||
$(C_BUILDDIR)/%.d: $(C_SUBDIR)/%.s
|
||||
$(SCANINC) -M $@ $(INCLUDE_SCANINC_ARGS) -I "" $<
|
||||
|
||||
ifneq ($(NODEP),1)
|
||||
-include $(addprefix $(OBJ_DIR)/,$(C_ASM_SRCS:.s=.d))
|
||||
endif
|
||||
|
||||
$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s
|
||||
$(PREPROC) $< charmap.txt | $(CPP) $(INCLUDE_SCANINC_ARGS) - | $(PREPROC) -ie $< charmap.txt | $(AS) $(ASFLAGS) -o $@
|
||||
|
||||
$(DATA_ASM_BUILDDIR)/%.d: $(DATA_ASM_SUBDIR)/%.s
|
||||
$(SCANINC) -M $@ $(INCLUDE_SCANINC_ARGS) -I "" $<
|
||||
|
||||
ifneq ($(NODEP),1)
|
||||
-include $(addprefix $(OBJ_DIR)/,$(REGULAR_DATA_ASM_SRCS:.s=.d))
|
||||
endif
|
||||
|
||||
$(OBJ_DIR)/sym_bss.ld: sym_bss.txt
|
||||
$(RAMSCRGEN) .bss $< ENGLISH > $@
|
||||
|
||||
$(OBJ_DIR)/sym_common.ld: sym_common.txt $(C_OBJS) $(wildcard common_syms/*.txt)
|
||||
$(RAMSCRGEN) COMMON $< ENGLISH -c $(C_BUILDDIR),common_syms > $@
|
||||
|
||||
$(OBJ_DIR)/sym_ewram.ld: sym_ewram.txt
|
||||
$(RAMSCRGEN) ewram_data $< ENGLISH > $@
|
||||
|
||||
# NOTE: Depending on event_scripts.o is hacky, but we want to depend on everything event_scripts.s depends on without having to alter scaninc
|
||||
$(DATA_SRC_SUBDIR)/pokemon/teachable_learnsets.h: $(DATA_ASM_BUILDDIR)/event_scripts.o
|
||||
python3 $(TOOLS_DIR)/learnset_helpers/teachable.py
|
||||
|
||||
# Linker script
|
||||
LD_SCRIPT := ld_script_modern.ld
|
||||
LD_SCRIPT_DEPS :=
|
||||
|
||||
# Final rules
|
||||
|
||||
libagbsyscall:
|
||||
@$(MAKE) -C libagbsyscall TOOLCHAIN=$(TOOLCHAIN) MODERN=$(MODERN)
|
||||
@$(MAKE) -C libagbsyscall TOOLCHAIN=$(TOOLCHAIN) MODERN=1
|
||||
|
||||
###################
|
||||
### Symbol file ###
|
||||
###################
|
||||
# Elf from object files
|
||||
LDFLAGS = -Map ../../$(MAP)
|
||||
$(ELF): $(LD_SCRIPT) $(LD_SCRIPT_DEPS) $(OBJS) libagbsyscall
|
||||
@cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ../../$< --print-memory-usage -o ../../$@ $(OBJS_REL) $(LIB) | cat
|
||||
@echo "cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ../../$< --print-memory-usage -o ../../$@ <objs> <libs> | cat"
|
||||
$(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent
|
||||
|
||||
# Builds the rom from the elf file
|
||||
$(ROM): $(ELF)
|
||||
$(OBJCOPY) -O binary $< $@
|
||||
$(FIX) $@ -p --silent
|
||||
|
||||
# Symbol file (`make syms`)
|
||||
$(SYM): $(ELF)
|
||||
$(OBJDUMP) -t $< | sort -u | grep -E "^0[2389]" | $(PERL) -p -e 's/^(\w{8}) (\w).{6} \S+\t(\w{8}) (\S+)$$/\1 \2 \3 \4/g' > $@
|
||||
|
||||
98
README.md
98
README.md
@ -1,17 +1,58 @@
|
||||
# pokeemerald-expansion
|
||||
|
||||
### Important: DO NOT use GitHub's "Download Zip" option. Using this option will not download the commit history required to update your expansion version or merge other feature branches. Instead, please read [this guide](https://github.com/Pawkkie/Team-Aquas-Asset-Repo/wiki/The-Basics-of-GitHub) to learn how to fork the repository and clone locally from there.
|
||||
pokeemerald-expansion is ***a romhack base*** based off pret's [pokeemerald](https://github.com/pret/pokeemerald) decompilation project. ***It is NOT a playable romhack,*** but it has multiple features available to romhackers so that they can create their own games, so it's not meant to be played on its own.
|
||||
|
||||
## What is pokeemerald-expansion?
|
||||
## Should I use this or vanilla pokeemerald for my hack?
|
||||
The main advantage of using vanilla pokeemerald as a base is being able to link with other official GBA Pokémon games for battles and trading, pokeemerald-expansion can battle and trade with itself out of the box. If you don't mind losing full vanilla compatiblitity, we recommend using pokeemerald-expansion. Otherwise, use pret's pokeemerald. You'll still receive documentation improvements from pret, as we regurlarly incorporate pret's documentation changes.
|
||||
|
||||
pokeemerald-expansion is a decomp hack base project based off pret's [pokeemerald](https://github.com/pret/pokeemerald) decompilation project. It's recommended that any new projects that plan on using it, to clone this repository instead of pret's vanilla repository, as we regurlarly incorporate pret's documentation changes. This is ***NOT*** a standalone romhack, and as such, most features will be unavailable and/or unbalanced if played as is.
|
||||
## Using pokeemerald-expansion
|
||||
|
||||
If you use pokeemerald-expansion in your hack, please add RHH (Rom Hacking Hideout) to your credits list. Optionally, you can list the version used, so it can help players know what features to expect.
|
||||
You can phrase it as the following:
|
||||
```
|
||||
Based off RHH's pokeemerald-expansion 1.9.2 https://github.com/rh-hideout/pokeemerald-expansion/
|
||||
Based off RHH's pokeemerald-expansion 1.10.1 https://github.com/rh-hideout/pokeemerald-expansion/
|
||||
```
|
||||
|
||||
#### Important: DO NOT use GitHub's "Download Zip" option. Using this option will not download the commit history required to update your expansion version or merge other feature branches. Instead, please read [this guide](https://github.com/Pawkkie/Team-Aquas-Asset-Repo/wiki/The-Basics-of-GitHub) to learn how to fork the repository and clone locally from there.
|
||||
|
||||
Please follow the instructions in `INSTALL.md` to get pokeemerald-expansion set up on your machine.
|
||||
|
||||
### If I already have a project based on regular pokeemerald, can I use pokeemerald-expansion?
|
||||
Yes! Keep in mind that we keep up with pret's documentation of pokeemerald, which means that if your project a bit old, you might get merge conflicts that you need to solve manually.
|
||||
- If you haven't set up a remote, run the command `git remote add RHH https://github.com/rh-hideout/pokeemerald-expansion`.
|
||||
- Once you have your remote set up, run the command `git pull RHH master`.
|
||||
|
||||
With this, you'll get the latest version of pokeemerald-expansion, plus a couple of bugfixes that haven't yet been released into the next patch version :)
|
||||
|
||||
## Documentation
|
||||
[Please click here to visit our documentation page.](https://rh-hideout.github.io/pokeemerald-expansion/)
|
||||
|
||||
## **How do I update my version of pokeemerald-expansion?**
|
||||
- If you haven't set up a remote, run the command `git remote add RHH https://github.com/rh-hideout/pokeemerald-expansion`.
|
||||
- Check your current version.
|
||||
- You can check in the debug menu's `Utilities -> Expansion Version` option.
|
||||
- If the option is not available, you possibly have version 1.6.2 or older. In that case, please check the [changelogs](docs/CHANGELOG.md) to determine your version based on the features available on your repository.
|
||||
- ***Important:*** If you are several versions behind, we recommend updating one minor version at a time, skipping directly to the latest patch version (eg, 1.5.3 -> 1.6.2 -> 1.7.4 and so on. Check the [online documentation site](https://rh-hideout.github.io/pokeemerald-expansion/CHANGELOG.html) to see the latest versions of each step.)
|
||||
- Once you have your remote set up, run the command `git pull RHH expansion/X.Y.Z`, replacing X, Y and Z with the digits of the respective version you want to update to (eg, to update to 1.9.3, use `git pull RHH expansion/1.9.3`).
|
||||
- ***Important:*** If you are several versions behind, we recommend updating one minor version at a time, skipping directly to the latest patch version (eg, 1.5.3 -> 1.6.2 -> 1.7.4 and so on)
|
||||
- Alternatively, you can update to unreleased versions of the expansion.
|
||||
- ***master (stable):*** It contains unreleased **bugfixes** that will come in the next patch version. To merge, use `git pull RHH master`.
|
||||
- ***upcoming (unstable, with potential bugs):*** It contains unreleased **features** that will come in the next minor version. To merge, use `git pull RHH upcoming`.
|
||||
|
||||
### Please consider crediting the entire [list of contributors](https://github.com/rh-hideout/pokeemerald-expansion/wiki/Credits) in your project, as they have all worked hard to develop this project :)
|
||||
|
||||
## Who maintains the project?
|
||||
The project was originally started by DizzyEgg alongside other contributors. Now it is maintained by a team in the ROM Hacking Hideout's community called the "Expansion Senate". ROM Hacking Hideout (RHH for short) is a Discord-based ROM hacking community specialized in Pokémon romhacks. A lot of the discussion in regards of the development of the project happens there.
|
||||
|
||||
[Click here to join the RHH Discord Server!](https://discord.gg/6CzjAG6GZk)
|
||||
|
||||
## There's a bug in the project. How do I let you guys know?
|
||||
Please submit any issues with the project [here](https://github.com/rh-hideout/pokeemerald-expansion/issues) and make sure that the issue wasn't reported by someone else by searching using the filters. You may also join the Discord server to try getting more in-depth support from the team and other members of the server.
|
||||
|
||||
## Can I contribute even if I'm not a member of ROM Hacking Hideout?
|
||||
Yes! Contributions are welcome via Pull Requests and they will be reviewed by maintainers in due time.
|
||||
Also, *please follow the Pull Request template and feel free to discuss how the reviews are being handled. **Communication is key!*** Don't feel discouraged if we take a bit to review your PR, we'll get to it.
|
||||
|
||||
## What features are included?
|
||||
- ***IMPORTANT*❗❗ Read through these to learn what features you can toggle**:
|
||||
- [Battle configurations](https://github.com/rh-hideout/pokeemerald-expansion/blob/master/include/config/battle.h)
|
||||
@ -119,11 +160,6 @@ Based off RHH's pokeemerald-expansion 1.9.2 https://github.com/rh-hideout/pokeem
|
||||
- ***Gen 6+ Exp. Share*** (configurable)
|
||||
- Berserk Gene
|
||||
- Most battle items from Gen 4+
|
||||
- Existing item data but missing effects:
|
||||
- Gimmighoul Coin
|
||||
- Booster Energy
|
||||
- Tera Shards
|
||||
- Tera Orb
|
||||
- ***Feature branches incorporated (with permission):***
|
||||
- [RHH intro credits](https://github.com/Xhyzi/pokeemerald/tree/rhh-intro-credits) by @Xhyzi.
|
||||
- A small signature from all of us to show the collective effort in the project :)
|
||||
@ -161,46 +197,4 @@ Based off RHH's pokeemerald-expansion 1.9.2 https://github.com/rh-hideout/pokeem
|
||||
- All bugfixes from pret included.
|
||||
- Fixed overworld snow effect.
|
||||
|
||||
There are some mechanics, moves and abilities that are missing and being developed. Check [the project's milestones](https://github.com/rh-hideout/pokeemerald-expansion/milestones) to see which ones.
|
||||
|
||||
|
||||
### [Documentation on features can be found here](https://github.com/rh-hideout/pokeemerald-expansion/wiki)
|
||||
|
||||
## If I already have a project based on regular pokeemerald, can I use pokeemerald-expansion?
|
||||
Yes! Keep in mind that we keep up with pret's documentation of pokeemerald, which means that if your project a bit old, you might get merge conflicts that you need to solve manually.
|
||||
- If you haven't set up a remote, run the command `git remote add RHH https://github.com/rh-hideout/pokeemerald-expansion`.
|
||||
- Once you have your remote set up, run the command `git pull RHH master`.
|
||||
|
||||
With this, you'll get the latest version of pokeemerald-expansion, plus a couple of bugfixes that haven't been released into the next patch version :)
|
||||
|
||||
## **How do I update my version of pokeemerald-expansion?**
|
||||
- If you haven't set up a remote, run the command `git remote add RHH https://github.com/rh-hideout/pokeemerald-expansion`.
|
||||
- Check your current version.
|
||||
- You can check in the debug menu's `Utilities -> Expansion Version` option.
|
||||
- If the option is not available, you possibly have version 1.6.2 or older. In that case, please check the [changelogs](CHANGELOG.md) to determine your version based on the features available on your repository.
|
||||
- Once you have your remote set up, run the command `git pull RHH expansion/X.Y.Z`, replacing X, Y and Z with the digits of the respective version you want to update to (eg, to update to 1.9.2, use `git pull RHH expansion/1.9.2`).
|
||||
- ***Important:*** If you are several versions behind, we recommend updating one minor version at a time, skipping directly to the latest patch version (eg, 1.5.3 -> 1.6.2 -> 1.7.4 and so on)
|
||||
- Alternatively, you can update to unreleased versions of the expansion.
|
||||
- ***master (stable):*** It contains unreleased **bugfixes** that will come in the next patch version. To merge, use `git pull RHH master`.
|
||||
- ***upcoming (unstable, with potential bugs):*** It contains unreleased **features** that will come in the next minor version. To merge, use `git pull RHH upcoming`.
|
||||
|
||||
### Please consider crediting the entire [list of contributors](https://github.com/rh-hideout/pokeemerald-expansion/wiki/Credits) in your project, as they have all worked hard to develop this project :)
|
||||
|
||||
## There's a bug in the project. How do I let you guys know?
|
||||
Please submit any issues with the project [here](https://github.com/rh-hideout/pokeemerald-expansion/issues). Make sure that the issue wasn't reported by someone else by searching using the filters.
|
||||
|
||||
## Can I contribute even if I'm not a member of ROM Hacking Hideout?
|
||||
|
||||
Yes! Contributions are welcome via Pull Requests and they will be reviewed by maintainers. Don't feel discouraged if we take a bit to review your PR, we'll get to it.
|
||||
|
||||
## Who maintains the project?
|
||||
|
||||
The project was originally started by DizzyEgg alongside other contributors.
|
||||
|
||||
The project has now gotten larger and DizzyEgg is now maintaining the project as part of the ROM Hacking Hideout community. Some members of this community are taking on larger roles to help maintain the project.
|
||||
|
||||
## What is the ROM Hacking Hideout?
|
||||
|
||||
A Discord-based ROM hacking community that has many members who hack using the disassembly and decompilation projects for Pokémon. Quite a few contributors to the original feature branches by DizzyEgg were members of ROM Hacking Hideout. You can call it RHH for short!
|
||||
|
||||
[Click here to join the RHH Discord Server!](https://discord.gg/6CzjAG6GZk)
|
||||
There are some mechanics, moves and abilities that are missing and being developed. Check [the project's milestones](https://github.com/rh-hideout/pokeemerald-expansion/milestones) and our [issues page](https://github.com/rh-hideout/pokeemerald-expansion/issues) to see which ones.
|
||||
|
||||
@ -798,9 +798,7 @@
|
||||
2:
|
||||
.endm
|
||||
|
||||
.macro setmultihitcounter value:req
|
||||
.byte 0x8d
|
||||
.byte \value
|
||||
.macro unused_0x8d
|
||||
.endm
|
||||
|
||||
.macro initmultihitstring
|
||||
@ -1104,7 +1102,7 @@
|
||||
.byte 0xcc
|
||||
.endm
|
||||
|
||||
.macro cureifburnedparalysedorpoisoned failInstr:req
|
||||
.macro curestatuswithmove failInstr:req
|
||||
.byte 0xcd
|
||||
.4byte \failInstr
|
||||
.endm
|
||||
@ -1351,7 +1349,6 @@
|
||||
.4byte \func
|
||||
.endm
|
||||
|
||||
@ callnative macros
|
||||
.macro savetarget
|
||||
callnative BS_SaveTarget
|
||||
.endm
|
||||
@ -1428,11 +1425,6 @@
|
||||
callnative BS_TryRevertWeatherForm
|
||||
.endm
|
||||
|
||||
.macro applysaltcure battler:req
|
||||
callnative BS_ApplySaltCure
|
||||
.byte \battler
|
||||
.endm
|
||||
|
||||
.macro trysetoctolock battler:req, failInstr:req
|
||||
callnative BS_TrySetOctolock
|
||||
.byte \battler
|
||||
@ -1679,26 +1671,94 @@
|
||||
.4byte \failInstr
|
||||
.endm
|
||||
|
||||
.macro jumpifteainvulnerable battler:req, jumpInstr:req
|
||||
callnative BS_TeatimeInvul
|
||||
.byte \battler
|
||||
.4byte \jumpInstr
|
||||
.endm
|
||||
|
||||
.macro jumpifteanoberry failInstr:req
|
||||
callnative BS_TeatimeTargets
|
||||
.4byte \failInstr
|
||||
.endm
|
||||
|
||||
.macro trywindriderpower battler:req, failInstr:req
|
||||
callnative BS_TryWindRiderPower
|
||||
.byte \battler
|
||||
.4byte \failInstr
|
||||
.endm
|
||||
|
||||
.macro activateweatherchangeabilities battler:req
|
||||
callnative BS_ActivateWeatherChangeAbilities
|
||||
.byte \battler
|
||||
.endm
|
||||
|
||||
.macro activateterrainchangeabilities battler:req
|
||||
callnative BS_ActivateTerrainChangeAbilities
|
||||
.byte \battler
|
||||
.endm
|
||||
|
||||
@ Stores Healing Wish effect.
|
||||
.macro storehealingwish battler:req
|
||||
callnative BS_StoreHealingWish
|
||||
.byte \battler
|
||||
.endm
|
||||
|
||||
.macro hitswitchtargetfailed
|
||||
callnative BS_HitSwitchTargetFailed
|
||||
.endm
|
||||
|
||||
.macro tryrevivalblessing, failInstr:req
|
||||
callnative BS_TryRevivalBlessing
|
||||
.4byte \failInstr
|
||||
.endm
|
||||
|
||||
.macro jumpifblockedbysoundproof battler:req, failInstr:req
|
||||
callnative BS_JumpIfBlockedBySoundproof
|
||||
.byte \battler
|
||||
.4byte \failInstr
|
||||
.endm
|
||||
|
||||
.macro tryhitswitchtarget failInstr:req
|
||||
callnative BS_TryHitSwitchTarget
|
||||
.4byte \failInstr
|
||||
.endm
|
||||
|
||||
.macro setmagiccoattarget
|
||||
callnative BS_SetMagicCoatTarget
|
||||
.endm
|
||||
|
||||
.macro jumpifcommanderactive jumpInstr:req
|
||||
callnative BS_JumpIfCommanderActive
|
||||
.4byte \jumpInstr
|
||||
.endm
|
||||
|
||||
.macro checkpokeflute
|
||||
callnative BS_CheckPokeFlute
|
||||
.endm
|
||||
|
||||
.macro waitfanfare
|
||||
callnative BS_WaitFanfare
|
||||
.endm
|
||||
|
||||
.macro setbeakblast
|
||||
callnative BS_SetBeakBlast
|
||||
.endm
|
||||
|
||||
.macro cantarshotwork failInstr:req
|
||||
callnative BS_CanTarShotWork
|
||||
.4byte \failInstr
|
||||
.endm
|
||||
|
||||
.macro removeterrain
|
||||
callnative BS_RemoveTerrain
|
||||
.endm
|
||||
|
||||
@ various command changed to more readable macros
|
||||
.macro cancelmultiturnmoves battler:req
|
||||
various \battler, VARIOUS_CANCEL_MULTI_TURN_MOVES
|
||||
.endm
|
||||
|
||||
@ Stores Healing Wish effect.
|
||||
.macro storehealingwish battler:req
|
||||
various \battler, VARIOUS_STORE_HEALING_WISH
|
||||
.endm
|
||||
|
||||
.macro setmagiccoattarget battler:req
|
||||
various \battler, VARIOUS_SET_MAGIC_COAT_TARGET
|
||||
.endm
|
||||
|
||||
.macro getifcantrunfrombattle battler:req
|
||||
various \battler, VARIOUS_IS_RUNNING_IMPOSSIBLE
|
||||
.endm
|
||||
@ -1916,11 +1976,6 @@
|
||||
various BS_ATTACKER, VARIOUS_SET_ARG_TO_BATTLE_DAMAGE
|
||||
.endm
|
||||
|
||||
.macro tryhitswitchtarget failInstr:req
|
||||
various BS_ATTACKER, VARIOUS_TRY_HIT_SWITCH_TARGET
|
||||
.4byte \failInstr
|
||||
.endm
|
||||
|
||||
.macro tryautotomize battler:req, failInstr:req
|
||||
various \battler, VARIOUS_TRY_AUTOTOMIZE
|
||||
.4byte \failInstr
|
||||
@ -2154,11 +2209,6 @@
|
||||
.4byte \jumpInstr
|
||||
.endm
|
||||
|
||||
.macro eeriespellppreduce failInstr:req
|
||||
various BS_TARGET, VARIOUS_EERIE_SPELL_PP_REDUCE
|
||||
.4byte \failInstr
|
||||
.endm
|
||||
|
||||
.macro jumpifteamhealthy battler:req, jumpInstr:req
|
||||
various \battler, VARIOUS_JUMP_IF_TEAM_HEALTHY
|
||||
.4byte \jumpInstr
|
||||
@ -2169,10 +2219,6 @@
|
||||
.4byte \failInstr
|
||||
.endm
|
||||
|
||||
.macro removeterrain
|
||||
various BS_ATTACKER, VARIOUS_REMOVE_TERRAIN
|
||||
.endm
|
||||
|
||||
.macro trytoclearprimalweather
|
||||
various BS_ATTACKER, VARIOUS_TRY_TO_CLEAR_PRIMAL_WEATHER
|
||||
.endm
|
||||
@ -2221,11 +2267,6 @@
|
||||
.4byte \failInstr
|
||||
.endm
|
||||
|
||||
.macro cantarshotwork battler:req, failInstr:req
|
||||
various \battler, VARIOUS_CAN_TAR_SHOT_WORK
|
||||
.4byte \failInstr
|
||||
.endm
|
||||
|
||||
.macro checkpoltergeist battler:req, failInstr:req
|
||||
various \battler, VARIOUS_CHECK_POLTERGEIST
|
||||
.4byte \failInstr
|
||||
@ -2236,16 +2277,6 @@
|
||||
.4byte \failInstr
|
||||
.endm
|
||||
|
||||
.macro jumpifteanoberry jumpInstr:req
|
||||
various BS_ATTACKER, VARIOUS_TEATIME_TARGETS
|
||||
.4byte \jumpInstr
|
||||
.endm
|
||||
|
||||
.macro jumpifteainvulnerable battler:req, jumpInstr:req
|
||||
various \battler, VARIOUS_TEATIME_INVUL
|
||||
.4byte \jumpInstr
|
||||
.endm
|
||||
|
||||
.macro curecertainstatuses battler:req
|
||||
various \battler, VARIOUS_CURE_CERTAIN_STATUSES
|
||||
.endm
|
||||
@ -2277,10 +2308,6 @@
|
||||
various \battler, VARIOUS_BATTLER_ITEM_TO_LAST_USED_ITEM
|
||||
.endm
|
||||
|
||||
.macro setbeakblast battler:req
|
||||
various \battler, VARIOUS_SET_BEAK_BLAST
|
||||
.endm
|
||||
|
||||
.macro swapsidestatuses
|
||||
various BS_ATTACKER, VARIOUS_SWAP_SIDE_STATUSES
|
||||
.endm
|
||||
@ -2290,19 +2317,6 @@
|
||||
.byte \stat
|
||||
.endm
|
||||
|
||||
.macro trywindriderpower battler:req, failInstr:req
|
||||
various \battler, VARIOUS_TRY_WIND_RIDER_POWER
|
||||
.4byte \failInstr
|
||||
.endm
|
||||
|
||||
.macro activateweatherchangeabilities battler:req
|
||||
various \battler, VARIOUS_ACTIVATE_WEATHER_CHANGE_ABILITIES
|
||||
.endm
|
||||
|
||||
.macro activateterrainchangeabilities battler:req
|
||||
various \battler, VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES
|
||||
.endm
|
||||
|
||||
@ helpful macros
|
||||
.macro setstatchanger stat:req, stages:req, down:req
|
||||
setbyte sSTATCHANGER, \stat | \stages << 3 | \down << 7
|
||||
@ -2497,15 +2511,6 @@
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
.endm
|
||||
|
||||
.macro hitswitchtargetfailed
|
||||
various 0, VARIOUS_HIT_SWITCH_TARGET_FAILED
|
||||
.endm
|
||||
|
||||
.macro tryrevivalblessing, jumpInstr:req
|
||||
various 0, VARIOUS_TRY_REVIVAL_BLESSING
|
||||
.4byte \jumpInstr
|
||||
.endm
|
||||
|
||||
@ Will jump to script pointer if the specified battler has or has not fainted.
|
||||
.macro jumpiffainted battler:req, value:req, ptr:req
|
||||
getbattlerfainted \battler
|
||||
|
||||
@ -141,25 +141,25 @@
|
||||
|
||||
.macro if_points_less_than num:req, destination:req
|
||||
.byte 0x16
|
||||
.byte \num
|
||||
.2byte \num
|
||||
.4byte \destination
|
||||
.endm
|
||||
|
||||
.macro if_points_more_than num:req, destination:req
|
||||
.byte 0x17
|
||||
.byte \num
|
||||
.2byte \num
|
||||
.4byte \destination
|
||||
.endm
|
||||
|
||||
.macro if_points_eq num:req, destination:req
|
||||
.byte 0x18
|
||||
.byte \num
|
||||
.2byte \num
|
||||
.4byte \destination
|
||||
.endm
|
||||
|
||||
.macro if_points_not_eq num:req, destination:req
|
||||
.byte 0x19
|
||||
.byte \num
|
||||
.2byte \num
|
||||
.4byte \destination
|
||||
.endm
|
||||
|
||||
@ -171,25 +171,25 @@
|
||||
|
||||
.macro if_preliminary_points_less_than num:req, destination:req
|
||||
.byte 0x1B
|
||||
.byte \num
|
||||
.2byte \num
|
||||
.4byte \destination
|
||||
.endm
|
||||
|
||||
.macro if_preliminary_points_more_than num:req, destination:req
|
||||
.byte 0x1C
|
||||
.byte \num
|
||||
.2byte \num
|
||||
.4byte \destination
|
||||
.endm
|
||||
|
||||
.macro if_preliminary_points_eq num:req, destination:req
|
||||
.byte 0x1D
|
||||
.byte \num
|
||||
.2byte \num
|
||||
.4byte \destination
|
||||
.endm
|
||||
|
||||
.macro if_preliminary_points_not_eq num:req, destination:req
|
||||
.byte 0x1E
|
||||
.byte \num
|
||||
.2byte \num
|
||||
.4byte \destination
|
||||
.endm
|
||||
|
||||
|
||||
@ -1226,6 +1226,13 @@
|
||||
.4byte \products
|
||||
.endm
|
||||
|
||||
@ Used as the endpoint for a Pokemart item list
|
||||
.macro pokemartlistend
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
.endm
|
||||
|
||||
@ Opens the Pokemart system and treats the list of items as decorations.
|
||||
@ Products should be a list of .2byte decoration values preceded by an .align 2
|
||||
.macro pokemartdecoration products:req
|
||||
@ -1798,7 +1805,7 @@
|
||||
.4byte \text
|
||||
.endm
|
||||
|
||||
@ Equivalent to fadescreen but copies gPlttBufferUnfaded to gPaletteDecompressionBuffer on the fade out
|
||||
@ Equivalent to fadescreen but copies gPlttBufferUnfaded to gDecompressionBuffer on the fade out
|
||||
@ and the reverse on the fade in, in effect saving gPlttBufferUnfaded to restore it.
|
||||
.macro fadescreenswapbuffers mode:req
|
||||
.byte 0xdc
|
||||
@ -2105,15 +2112,15 @@
|
||||
@ The rest of the arguments are the stat change values to each stat.
|
||||
@ For example, giving the first opponent +1 to atk and -2 to speed would be: settotemboost B_POSITION_OPPONENT_LEFT, 1, 0, -2
|
||||
.macro settotemboost battler:req, atk=0,def=0,speed=0,spatk=0,spdef=0,acc=0,evas=0
|
||||
setvar VAR_0x8000, \battler
|
||||
setvar VAR_0x8001, \atk
|
||||
setvar VAR_0x8002, \def
|
||||
setvar VAR_0x8003, \speed
|
||||
setvar VAR_0x8004, \spatk
|
||||
setvar VAR_0x8005, \spdef
|
||||
setvar VAR_0x8006, \acc
|
||||
setvar VAR_0x8007, \evas
|
||||
special SetTotemBoost
|
||||
callnative ScriptSetTotemBoost
|
||||
.2byte \battler
|
||||
.2byte \atk
|
||||
.2byte \def
|
||||
.2byte \speed
|
||||
.2byte \spatk
|
||||
.2byte \spdef
|
||||
.2byte \acc
|
||||
.2byte \evas
|
||||
.endm
|
||||
|
||||
@ useful totem boost macros
|
||||
@ -2321,3 +2328,112 @@
|
||||
.macro togglefakertc
|
||||
callnative Script_ToggleFakeRtc
|
||||
.endm
|
||||
|
||||
@ ============================ @
|
||||
@ ITEM DESCRIPTION HEADER MACROS
|
||||
@ Used with OW_SHOW_ITEM_DESCRIPTIONS config
|
||||
.macro showitemdescription
|
||||
callnative ScriptShowItemDescription
|
||||
.byte 0
|
||||
.endm
|
||||
|
||||
.macro showberrydescription
|
||||
callnative ScriptShowItemDescription
|
||||
.byte 1
|
||||
.endm
|
||||
|
||||
.macro hideitemdescription
|
||||
callnative ScriptHideItemDescription
|
||||
.endm
|
||||
|
||||
@ Remove all of specified item from the player's bag and return the number of removed items to VAR_RESULT
|
||||
.macro removeallitem itemId:req
|
||||
callnative ScrCmd_removeallitem
|
||||
.2byte \itemId
|
||||
.endm
|
||||
|
||||
@ Stores the position of the given object in destX and destY. Mode CURRENT_POSITION will take the object's current position. Mode TEMPLATE_POSITION will take the object's template position.
|
||||
.macro getobjectxy localId:req, posType:req, destX:req, destY:req
|
||||
callnative ScrCmd_getobjectxy
|
||||
.2byte \localId
|
||||
.2byte \posType
|
||||
.2byte \destX
|
||||
.2byte \destY
|
||||
.endm
|
||||
|
||||
.macro getobjecttemplatexy localId:req, posType = TEMPLATE_POSITION, destX:req, destY:req
|
||||
callnative ScrCmd_getobjectxy
|
||||
.2byte \localId
|
||||
.2byte \posType
|
||||
.2byte \destX
|
||||
.2byte \destY
|
||||
.endm
|
||||
|
||||
.macro getobjectcurrentxy localId:req, posType = CURRENT_POSITION, destX:req, destY:req
|
||||
callnative ScrCmd_getobjectxy
|
||||
.2byte \localId
|
||||
.2byte \posType
|
||||
.2byte \destX
|
||||
.2byte \destY
|
||||
.endm
|
||||
|
||||
@ Return TRUE to dest if there is an object at the position x and y.
|
||||
.macro checkobjectat x:req, y:req, dest = VAR_RESULT
|
||||
callnative ScrCmd_checkobjectat
|
||||
.2byte \x
|
||||
.2byte \y
|
||||
.2byte \dest
|
||||
.endm
|
||||
|
||||
@ Returns the state of the Pokedex Seen Flag to VAR_RESULT for the Pokemon with speciesId
|
||||
.macro getseenmon species:req
|
||||
callnative Scrcmd_getsetpokedexflag
|
||||
.2byte \species
|
||||
.2byte FLAG_GET_SEEN
|
||||
.endm
|
||||
|
||||
@ Returns the state of the Pokedex Caught Flag to VAR_RESULT for the Pokemon with speciesId
|
||||
.macro getcaughtmon species:req
|
||||
callnative Scrcmd_getsetpokedexflag
|
||||
.2byte \species
|
||||
.2byte FLAG_GET_CAUGHT
|
||||
.endm
|
||||
|
||||
@ Sets the Pokedex Seen Flag for the Pokemon with speciesId
|
||||
.macro setseenmon species:req
|
||||
callnative Scrcmd_getsetpokedexflag
|
||||
.2byte \species
|
||||
.2byte FLAG_SET_SEEN
|
||||
.endm
|
||||
|
||||
@ Sets the Pokedex Caught Flag for the Pokemon with speciesId
|
||||
.macro setcaughtmon species:req
|
||||
callnative Scrcmd_getsetpokedexflag
|
||||
.2byte \species
|
||||
.2byte FLAG_SET_CAUGHT
|
||||
.endm
|
||||
|
||||
@ Check if the Player has speciesId in their party. OPEN_PARTY_SCREEN will have the player select a mon from their party. NO_PARTY_SCREEN will automatically check every mon in the player's party.
|
||||
.macro checkspecies speciesId:req, mode=NO_PARTY_SCREEN
|
||||
.if \mode == OPEN_PARTY_SCREEN
|
||||
special ChoosePartyMon
|
||||
waitstate
|
||||
callnative Scrcmd_checkspecies_choose
|
||||
.2byte \speciesId
|
||||
.else
|
||||
callnative Scrcmd_checkspecies
|
||||
.2byte \speciesId
|
||||
.endif
|
||||
.endm
|
||||
|
||||
.macro checkspecies_choose speciesId:req
|
||||
checkspecies \speciesId, OPEN_PARTY_SCREEN
|
||||
.endm
|
||||
|
||||
@ Gets the facing direction of a given event object and stores it in the variable dest.
|
||||
.macro getobjectfacingdirection localId:req, dest:req
|
||||
callnative Scrcmd_getobjectfacingdirection
|
||||
.2byte \localId
|
||||
.2byte \dest
|
||||
.endm
|
||||
|
||||
|
||||
49
audio_rules.mk
Normal file
49
audio_rules.mk
Normal file
@ -0,0 +1,49 @@
|
||||
# This file contains rules for making assemblies for most music in the game.
|
||||
|
||||
CRY_SUBDIR := sound/direct_sound_samples/cries
|
||||
|
||||
MID_ASM_DIR := $(MID_SUBDIR)
|
||||
CRY_BIN_DIR := $(CRY_SUBDIR)
|
||||
SOUND_BIN_DIR := sound
|
||||
|
||||
SPECIAL_OUTDIRS := $(MID_ASM_DIR) $(CRY_BIN_DIR)
|
||||
SPECIAL_OUTDIRS += $(SOUND_BIN_DIR) $(SOUND_BIN_DIR)/direct_sound_samples/phonemes $(SOUND_BIN_DIR)/direct_sound_samples/cries
|
||||
$(shell mkdir -p $(SPECIAL_OUTDIRS) )
|
||||
|
||||
# Assembly song compilation
|
||||
$(SONG_BUILDDIR)/%.o: $(SONG_SUBDIR)/%.s
|
||||
$(AS) $(ASFLAGS) -I sound -o $@ $<
|
||||
$(MID_BUILDDIR)/%.o: $(MID_ASM_DIR)/%.s
|
||||
$(AS) $(ASFLAGS) -I sound -o $@ $<
|
||||
|
||||
# Compressed cries
|
||||
$(CRY_BIN_DIR)/%.bin: $(CRY_SUBDIR)/%.aif
|
||||
$(AIF) $< $@ --compress
|
||||
|
||||
# Uncompressed cries
|
||||
$(CRY_BIN_DIR)/uncomp_%.bin: $(CRY_SUBDIR)/uncomp_%.aif
|
||||
$(AIF) $< $@
|
||||
|
||||
# Uncompressed sounds
|
||||
$(SOUND_BIN_DIR)/%.bin: sound/%.aif
|
||||
$(AIF) $< $@
|
||||
|
||||
# For each line in midi.cfg, we do some trickery to convert it into a make rule for the `.mid` file described on the line
|
||||
# Data following the colon in said file corresponds to arguments passed into mid2agb
|
||||
MID_CFG_PATH := $(MID_SUBDIR)/midi.cfg
|
||||
|
||||
# $1: Source path no extension, $2 Options
|
||||
define MID_RULE
|
||||
$(MID_ASM_DIR)/$1.s: $(MID_SUBDIR)/$1.mid $(MID_CFG_PATH)
|
||||
$(MID) $$< $$@ $2
|
||||
endef
|
||||
# source path, remaining text (options)
|
||||
define MID_EXPANSION
|
||||
$(eval $(call MID_RULE,$(basename $(patsubst %:,%,$(word 1,$1))),$(wordlist 2,999,$1)))
|
||||
endef
|
||||
|
||||
$(foreach line,$(shell cat $(MID_CFG_PATH) | sed "s/ /__SPACE__/g"),$(call MID_EXPANSION,$(subst __SPACE__, ,$(line))))
|
||||
|
||||
# Warn users building without a .cfg - build will fail at link time
|
||||
$(MID_ASM_DIR)/%.s: $(MID_SUBDIR)/%.mid
|
||||
$(warning $< does not have an associated entry in midi.cfg! It cannot be built)
|
||||
14
charmap.txt
14
charmap.txt
@ -45,6 +45,9 @@ SUPER_ER = 2C
|
||||
LV = 34
|
||||
'=' = 35
|
||||
';' = 36
|
||||
V_D_ARROW = 38
|
||||
NBSP = 39
|
||||
'~' = 39
|
||||
'¿' = 51
|
||||
'¡' = 52
|
||||
PK = 53
|
||||
@ -369,7 +372,7 @@ B_ATK_NAME_WITH_PREFIX = FD 0F
|
||||
B_DEF_NAME_WITH_PREFIX = FD 10
|
||||
B_EFF_NAME_WITH_PREFIX = FD 11 @ EFF = short for gEffectBattler
|
||||
@ FD 12 - preiously gActiveBattler with prefix
|
||||
B_SCR_ACTIVE_NAME_WITH_PREFIX = FD 13
|
||||
B_SCR_NAME_WITH_PREFIX = FD 13
|
||||
B_CURRENT_MOVE = FD 14
|
||||
B_LAST_MOVE = FD 15
|
||||
B_LAST_ITEM = FD 16
|
||||
@ -412,6 +415,14 @@ B_DEF_TEAM1 = FD 3A
|
||||
B_DEF_TEAM2 = FD 3B
|
||||
@ FD 3C - preiously gActiveBattler
|
||||
@ FD 3D - preiously gActiveBattler without Illusion Check
|
||||
B_ATK_NAME_WITH_PREFIX2 = FD 3E
|
||||
B_DEF_NAME_WITH_PREFIX2 = FD 3F
|
||||
B_EFF_NAME_WITH_PREFIX2 = FD 40
|
||||
B_SCR_NAME_WITH_PREFIX2 = FD 41
|
||||
B_TRAINER1_NAME_WITH_CLASS = FD 42
|
||||
B_TRAINER2_NAME_WITH_CLASS = FD 43
|
||||
B_PARTNER_NAME_WITH_CLASS = FD 44
|
||||
B_ATK_TRAINER_NAME_WITH_CLASS = FD 45
|
||||
|
||||
@ indicates the end of a town/city name (before " TOWN" or " CITY")
|
||||
NAME_END = FC 00
|
||||
@ -456,6 +467,7 @@ FONT_SMALL_NARROW = FC 06 08
|
||||
FONT_NARROWER = FC 06 0A
|
||||
FONT_SMALL_NARROWER = FC 06 0B
|
||||
FONT_SHORT_NARROW = FC 06 0C
|
||||
FONT_SHORT_NARROWER = FC 06 0D
|
||||
|
||||
@ colors
|
||||
|
||||
|
||||
@ -1 +0,0 @@
|
||||
lman
|
||||
@ -1,10 +0,0 @@
|
||||
gFlashTimeoutFlag
|
||||
PollFlashStatus
|
||||
WaitForFlashWrite
|
||||
ProgramFlashSector
|
||||
gFlash
|
||||
ProgramFlashByte
|
||||
gFlashNumRemainingBytes
|
||||
EraseFlashChip
|
||||
EraseFlashSector
|
||||
gFlashMaxTime
|
||||
@ -1,3 +0,0 @@
|
||||
gApprenticePartyMovesData
|
||||
gApprenticeQuestionData
|
||||
gApprenticeFunc
|
||||
@ -1,3 +0,0 @@
|
||||
gMonShrinkDuration
|
||||
gMonShrinkDelta
|
||||
gMonShrinkDistance
|
||||
@ -1,3 +0,0 @@
|
||||
gBattlerControllerFuncs
|
||||
gBattleControllerData
|
||||
gBattlerControllerEndFuncs
|
||||
@ -1 +0,0 @@
|
||||
gFactorySelect_CurrentOptionFunc
|
||||
@ -1,7 +0,0 @@
|
||||
gPreBattleCallback1
|
||||
gBattleMainFunc
|
||||
gBattleResults
|
||||
gLeveledUpInBattle
|
||||
gHealthboxSpriteIds
|
||||
gMultiUsePlayerCursor
|
||||
gNumberOfMovesToChoose
|
||||
@ -1 +0,0 @@
|
||||
gFrontierTempParty
|
||||
@ -1 +0,0 @@
|
||||
gInGameOpponentsNo
|
||||
@ -1 +0,0 @@
|
||||
gWindowTileAutoAllocEnabled
|
||||
@ -1 +0,0 @@
|
||||
gContestRngValue
|
||||
@ -1,4 +0,0 @@
|
||||
gContestMonPixels
|
||||
gImageProcessingContext
|
||||
gContestPaintingWinner
|
||||
gContestPaintingMonPalette
|
||||
@ -1 +0,0 @@
|
||||
gEReaderData
|
||||
@ -1 +0,0 @@
|
||||
gCB2_AfterEvolution
|
||||
@ -1,3 +0,0 @@
|
||||
sPlayerToMewDeltaX
|
||||
sPlayerToMewDeltaY
|
||||
sMewDirectionCandidates
|
||||
@ -1,3 +0,0 @@
|
||||
gFieldCamera
|
||||
gTotalCameraPixelOffsetY
|
||||
gTotalCameraPixelOffsetX
|
||||
@ -1 +0,0 @@
|
||||
gSelectedObjectEvent
|
||||
@ -1 +0,0 @@
|
||||
gScrollableMultichoice_ListMenuTemplate
|
||||
@ -1 +0,0 @@
|
||||
gBackupMapLayout
|
||||
@ -1,10 +0,0 @@
|
||||
gCanvasColumnStart
|
||||
gCanvasPixels
|
||||
gCanvasRowEnd
|
||||
gCanvasHeight
|
||||
gCanvasColumnEnd
|
||||
gCanvasRowStart
|
||||
gCanvasMonPersonality
|
||||
gCanvasWidth
|
||||
gCanvasPalette
|
||||
gCanvasPaletteStart
|
||||
@ -1,2 +0,0 @@
|
||||
gIntroFrameCounter
|
||||
gMultibootProgramStruct
|
||||
@ -1,5 +0,0 @@
|
||||
gRfuSlotStatusUNI
|
||||
gRfuSlotStatusNI
|
||||
gRfuLinkStatus
|
||||
gRfuStatic
|
||||
gRfuFixed
|
||||
@ -1 +0,0 @@
|
||||
gRfuSIO32Id
|
||||
@ -1 +0,0 @@
|
||||
gSTWIStatus
|
||||
@ -1,35 +0,0 @@
|
||||
gLinkPartnersHeldKeys
|
||||
gLinkDebugSeed
|
||||
gLocalLinkPlayerBlock
|
||||
gLinkErrorOccurred
|
||||
gLinkDebugFlags
|
||||
gLinkFiller1
|
||||
gRemoteLinkPlayersNotReceived
|
||||
gBlockReceivedStatus
|
||||
gLinkFiller2
|
||||
gLinkHeldKeys
|
||||
gRecvCmds
|
||||
gLinkStatus
|
||||
gLinkDummy1
|
||||
gLinkDummy2
|
||||
gReadyToExitStandby
|
||||
gReadyToCloseLink
|
||||
gReadyCloseLinkType
|
||||
gSuppressLinkErrorMessage
|
||||
gWirelessCommType
|
||||
gSavedLinkPlayerCount
|
||||
gSendCmd
|
||||
gSavedMultiplayerId
|
||||
gReceivedRemoteLinkPlayers
|
||||
gLinkTestBGInfo
|
||||
gLinkCallback
|
||||
gShouldAdvanceLinkState
|
||||
gLinkTestBlockChecksums
|
||||
gBlockRequestType
|
||||
gLinkFiller3
|
||||
gLinkFiller4
|
||||
gLinkFiller5
|
||||
gLastSendQueueCount
|
||||
gLink
|
||||
gLastRecvQueueCount
|
||||
gLinkSavedIme
|
||||
@ -1,2 +0,0 @@
|
||||
gRfuAPIBuffer
|
||||
gRfu
|
||||
@ -1,2 +0,0 @@
|
||||
gListMenuOverride
|
||||
gMultiuseListMenuTemplate
|
||||
@ -1,4 +0,0 @@
|
||||
gFlashMemoryPresent
|
||||
gSaveBlock1Ptr
|
||||
gSaveBlock2Ptr
|
||||
gPokemonStoragePtr
|
||||
@ -1,12 +0,0 @@
|
||||
gSoundInfo
|
||||
gPokemonCrySongs
|
||||
gPokemonCryMusicPlayers
|
||||
gMPlayInfo_BGM
|
||||
gMPlayJumpTable
|
||||
gCgbChans
|
||||
gMPlayInfo_SE1
|
||||
gMPlayInfo_SE2
|
||||
gPokemonCryTracks
|
||||
gPokemonCrySong
|
||||
gMPlayMemAccArea
|
||||
gMPlayInfo_SE3
|
||||
@ -1,10 +0,0 @@
|
||||
gKeyRepeatStartDelay
|
||||
gLinkTransferringData
|
||||
gMain
|
||||
gKeyRepeatContinueDelay
|
||||
gSoftResetDisabled
|
||||
gIntrTable
|
||||
gLinkVSyncDisabled
|
||||
IntrMain_Buffer
|
||||
gPcmDmaCounter
|
||||
gAgbMainLoop_sp
|
||||
@ -1 +0,0 @@
|
||||
gBardSong
|
||||
@ -1,8 +0,0 @@
|
||||
gOverworldTilemapBuffer_Bg2
|
||||
gOverworldTilemapBuffer_Bg1
|
||||
gOverworldTilemapBuffer_Bg3
|
||||
gHeldKeyCodeToSend
|
||||
gFieldCallback
|
||||
gFieldCallback2
|
||||
gLocalLinkPlayerId
|
||||
gFieldLinkPlayerCount
|
||||
@ -1 +0,0 @@
|
||||
gItemUseCB
|
||||
@ -1,2 +0,0 @@
|
||||
gUnusedPokedexU8
|
||||
gPokedexVBlankCB
|
||||
@ -1 +0,0 @@
|
||||
gDexCryScreenState
|
||||
@ -1,2 +0,0 @@
|
||||
gRngValue
|
||||
gRng2Value
|
||||
@ -1 +0,0 @@
|
||||
gLocalTime
|
||||
@ -1,13 +0,0 @@
|
||||
gLastWrittenSector
|
||||
gLastSaveCounter
|
||||
gLastKnownGoodSector
|
||||
gDamagedSaveSectors
|
||||
gSaveCounter
|
||||
gReadWriteSector
|
||||
gIncrementalSectorId
|
||||
gSaveUnusedVar
|
||||
gSaveFileStatus
|
||||
gGameContinueCallback
|
||||
gRamSaveSectorLocations
|
||||
gSaveUnusedVar2
|
||||
gSaveAttemptStatus
|
||||
@ -1 +0,0 @@
|
||||
gDisableMusic
|
||||
@ -1,2 +0,0 @@
|
||||
gOamMatrixAllocBitmap
|
||||
gReservedSpritePaletteCount
|
||||
@ -1 +0,0 @@
|
||||
gMenuCallback
|
||||
@ -1 +0,0 @@
|
||||
gTasks
|
||||
@ -1,4 +0,0 @@
|
||||
gFonts
|
||||
gDisableTextPrinters
|
||||
gCurGlyph
|
||||
gTextFlags
|
||||
@ -1,5 +0,0 @@
|
||||
gWhichTrainerToFaceAfterBattle
|
||||
gPostBattleMovementScript
|
||||
gApproachingTrainers
|
||||
gNoOfApproachingTrainers
|
||||
gTrainerApproachedPlayer
|
||||
@ -1,4 +0,0 @@
|
||||
sCurTVShowSlot
|
||||
sTV_SecretBaseVisitMovesTemp
|
||||
sTV_DecorationsBuffer
|
||||
sTV_SecretBaseVisitMonsTemp
|
||||
@ -1,2 +0,0 @@
|
||||
gTransparentTileNumber
|
||||
gWindowBgTilemapBuffers
|
||||
File diff suppressed because it is too large
Load Diff
@ -134,7 +134,11 @@ BattleScript_EffectTidyUp::
|
||||
pause B_WAIT_TIME_MED
|
||||
ppreduce
|
||||
waitstate
|
||||
saveattacker
|
||||
savetarget
|
||||
trytidyup FALSE, BattleScript_EffectTidyUpDoMoveAnimation
|
||||
restoreattacker
|
||||
restoretarget
|
||||
goto BattleScript_EffectDragonDanceFromStatUp
|
||||
|
||||
BattleScript_EffectTidyUpDoMoveAnimation::
|
||||
@ -143,6 +147,8 @@ BattleScript_EffectTidyUpDoMoveAnimation::
|
||||
trytidyup TRUE, NULL
|
||||
printstring STRINGID_TIDYINGUPCOMPLETE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
restoreattacker
|
||||
restoretarget
|
||||
goto BattleScript_EffectDragonDanceFromStatUp
|
||||
|
||||
BattleScript_EffectUpperHand::
|
||||
@ -214,27 +220,25 @@ BattleScript_EffectDoodle::
|
||||
attackcanceler
|
||||
attackstring
|
||||
ppreduce
|
||||
trycopyability BS_ATTACKER, BattleScript_ButItFailed
|
||||
attackanimation
|
||||
waitanimation
|
||||
setbyte gBattleCommunication, 0
|
||||
goto BattleScript_EffectDoodle_AfterCopy
|
||||
BattleScript_EffectDoodle_CopyAbility:
|
||||
trycopyability BS_ATTACKER, BattleScript_ButItFailed
|
||||
trycopyability BS_ATTACKER, BattleScript_MoveEnd
|
||||
BattleScript_EffectDoodle_AfterCopy:
|
||||
.if B_ABILITY_POP_UP == TRUE
|
||||
setbyte sFIXED_ABILITY_POPUP, TRUE
|
||||
showabilitypopup BS_ATTACKER
|
||||
pause 60
|
||||
sethword sABILITY_OVERWRITE, 0
|
||||
updateabilitypopup BS_ATTACKER
|
||||
pause 20
|
||||
destroyabilitypopup
|
||||
pause 40
|
||||
copybyte gBattlerAbility, gBattlerAttacker
|
||||
call BattleScript_AbilityPopUpOverwriteThenNormal
|
||||
.endif
|
||||
recordability BS_ATTACKER
|
||||
printstring STRINGID_PKMNCOPIEDFOE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
switchinabilities BS_ATTACKER
|
||||
jumpifbyte CMP_NOT_EQUAL, gBattleCommunication, 0x0, BattleScript_MoveEnd
|
||||
addbyte gBattleCommunication, 1
|
||||
jumpifnoally BS_TARGET, BattleScript_MoveEnd
|
||||
jumpifnoally BS_ATTACKER, BattleScript_MoveEnd
|
||||
setallytonextattacker BattleScript_EffectDoodle_CopyAbility
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
@ -392,16 +396,10 @@ BattleScript_EffectHit_Pledge::
|
||||
tryfaintmon BS_TARGET
|
||||
return
|
||||
|
||||
BattleScript_EffectSaltCure::
|
||||
call BattleScript_EffectHit_Ret
|
||||
tryfaintmon BS_TARGET
|
||||
jumpiffainted BS_TARGET, TRUE, BattleScript_EffectSaltCure_End
|
||||
jumpifsubstituteblocks BattleScript_EffectSaltCure_End
|
||||
applysaltcure BS_TARGET
|
||||
BattleScript_MoveEffectSaltCure::
|
||||
printstring STRINGID_TARGETISBEINGSALTCURED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_EffectSaltCure_End:
|
||||
goto BattleScript_MoveEnd
|
||||
return
|
||||
|
||||
BattleScript_SaltCureExtraDamage::
|
||||
playanimation BS_TARGET, B_ANIM_SALT_CURE_DAMAGE, NULL
|
||||
@ -409,13 +407,13 @@ BattleScript_SaltCureExtraDamage::
|
||||
call BattleScript_HurtTarget_NoString
|
||||
printstring STRINGID_TARGETISHURTBYSALTCURE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
tryfaintmon BS_TARGET
|
||||
end2
|
||||
|
||||
BattleScript_HurtTarget_NoString:
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_TARGET
|
||||
datahpupdate BS_TARGET
|
||||
tryfaintmon BS_TARGET
|
||||
return
|
||||
|
||||
BattleScript_EffectCorrosiveGas::
|
||||
@ -445,7 +443,7 @@ BattleScript_EffectTakeHeart::
|
||||
attackcanceler
|
||||
attackstring
|
||||
ppreduce
|
||||
cureifburnedparalysedorpoisoned BattleScript_CalmMindTryToRaiseStats
|
||||
curestatuswithmove BattleScript_CalmMindTryToRaiseStats
|
||||
attackanimation
|
||||
waitanimation
|
||||
updatestatusicon BS_ATTACKER
|
||||
@ -468,6 +466,9 @@ BattleScript_EffectRevivalBlessing::
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectRevivalBlessingSendOut:
|
||||
getswitchedmondata BS_SCRIPTING
|
||||
switchindataupdate BS_SCRIPTING
|
||||
hpthresholds BS_SCRIPTING
|
||||
switchinanim BS_SCRIPTING, FALSE
|
||||
waitstate
|
||||
switchineffects BS_SCRIPTING
|
||||
@ -578,7 +579,7 @@ BattleScript_Teatimerod:
|
||||
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_TeatimeBuffer
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_TeatimeBuffer
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
moveendto MOVEEND_NEXT_TARGET
|
||||
jumpifnexttargetvalid BattleScript_TeatimeLoop
|
||||
moveendcase MOVEEND_CLEAR_BITS
|
||||
@ -590,7 +591,7 @@ BattleScript_Teatimemotor:
|
||||
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_TeatimeBuffer
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_TeatimeBuffer
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
moveendto MOVEEND_NEXT_TARGET
|
||||
jumpifnexttargetvalid BattleScript_TeatimeLoop
|
||||
moveendcase MOVEEND_CLEAR_BITS
|
||||
@ -669,7 +670,7 @@ BattleScript_EffectCourtChange::
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_BeakBlastSetUp::
|
||||
setbeakblast BS_ATTACKER
|
||||
setbeakblast
|
||||
flushtextbox
|
||||
playanimation BS_ATTACKER, B_ANIM_BEAK_BLAST_SETUP, NULL
|
||||
printstring STRINGID_HEATUPBEAK
|
||||
@ -863,7 +864,7 @@ BattleScript_EffectOctolock::
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_OctolockEndTurn::
|
||||
playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_SPDEF, STAT_CHANGE_NEGATIVE
|
||||
playstatchangeanimation BS_TARGET, BIT_DEF | BIT_SPDEF, STAT_CHANGE_NEGATIVE
|
||||
setstatchanger STAT_DEF, 1, TRUE
|
||||
statbuffchange STAT_CHANGE_ALLOW_PTR | STAT_CHANGE_NOT_PROTECT_AFFECTED, BattleScript_OctolockTryLowerSpDef
|
||||
printfromtable gStatDownStringIds
|
||||
@ -890,7 +891,7 @@ BattleScript_EffectTarShot::
|
||||
attackcanceler
|
||||
jumpifsubstituteblocks BattleScript_FailedFromAtkString
|
||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||
cantarshotwork BS_TARGET, BattleScript_FailedFromAtkString
|
||||
cantarshotwork BattleScript_FailedFromAtkString
|
||||
attackstring
|
||||
ppreduce
|
||||
setstatchanger STAT_SPEED, 1, TRUE
|
||||
@ -942,13 +943,10 @@ BattleScript_HyperspaceFuryRemoveProtect::
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
return
|
||||
|
||||
BattleScript_EffectPlasmaFists::
|
||||
call BattleScript_EffectHit_Ret
|
||||
tryfaintmon BS_TARGET
|
||||
orword gFieldStatuses, STATUS_FIELD_ION_DELUGE
|
||||
BattleScript_MoveEffectIonDeluge::
|
||||
printstring STRINGID_IONDELUGEON
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_MoveEnd
|
||||
return
|
||||
|
||||
BattleScript_EffectSparklySwirl::
|
||||
call BattleScript_EffectHit_Ret
|
||||
@ -959,41 +957,25 @@ BattleScript_EffectSparklySwirl::
|
||||
waitstate
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectFreezyFrost::
|
||||
call BattleScript_EffectHit_Ret
|
||||
tryfaintmon BS_TARGET
|
||||
normalisebuffs
|
||||
BattleScript_MoveEffectHaze::
|
||||
printstring STRINGID_STATCHANGESGONE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_MoveEnd
|
||||
return
|
||||
|
||||
BattleScript_EffectSappySeed::
|
||||
jumpifstatus3 BS_TARGET, STATUS3_LEECHSEED, BattleScript_EffectHit
|
||||
call BattleScript_EffectHit_Ret
|
||||
tryfaintmon BS_TARGET
|
||||
jumpifhasnohp BS_TARGET, BattleScript_MoveEnd
|
||||
setseeded
|
||||
printfromtable gLeechSeedStringIds
|
||||
BattleScript_MoveEffectLeechSeed::
|
||||
printstring STRINGID_PKMNSEEDED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectBaddyBad::
|
||||
jumpifsideaffecting BS_ATTACKER, SIDE_STATUS_REFLECT, BattleScript_EffectHit
|
||||
call BattleScript_EffectHit_Ret
|
||||
tryfaintmon BS_TARGET
|
||||
setreflect
|
||||
BattleScript_MoveEffectReflect::
|
||||
printfromtable gReflectLightScreenSafeguardStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_MoveEnd
|
||||
return
|
||||
|
||||
BattleScript_EffectGlitzyGlow::
|
||||
jumpifsideaffecting BS_ATTACKER, SIDE_STATUS_LIGHTSCREEN, BattleScript_EffectHit
|
||||
call BattleScript_EffectHit_Ret
|
||||
tryfaintmon BS_TARGET
|
||||
setlightscreen
|
||||
BattleScript_MoveEffectLightScreen::
|
||||
printfromtable gReflectLightScreenSafeguardStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_MoveEnd
|
||||
return
|
||||
|
||||
BattleScript_EffectStuffCheeks::
|
||||
attackcanceler
|
||||
@ -1211,7 +1193,6 @@ BattleScript_StrengthSapLower:
|
||||
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||
printfromtable gStatDownStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_StrengthSapHp
|
||||
@ Drain HP without lowering a stat
|
||||
BattleScript_StrengthSapHp:
|
||||
jumpifability BS_TARGET, ABILITY_LIQUID_OOZE, BattleScript_StrengthSapManipulateDmg
|
||||
@ -2346,6 +2327,11 @@ BattleScript_EffectSimpleBeam::
|
||||
setabilitysimple BS_TARGET, BattleScript_ButItFailed
|
||||
attackanimation
|
||||
waitanimation
|
||||
.if B_ABILITY_POP_UP == TRUE
|
||||
copybyte gBattlerAbility, gBattlerTarget
|
||||
call BattleScript_AbilityPopUpOverwriteThenNormal
|
||||
.endif
|
||||
recordability BS_TARGET
|
||||
printstring STRINGID_PKMNACQUIREDSIMPLE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
trytoclearprimalweather
|
||||
@ -2395,7 +2381,6 @@ BattleScript_EffectHealingWish::
|
||||
storehealingwish BS_ATTACKER
|
||||
.if B_HEALING_WISH_SWITCH <= GEN_4
|
||||
openpartyscreen BS_ATTACKER, BattleScript_EffectHealingWishEnd
|
||||
switchoutabilities BS_ATTACKER
|
||||
waitstate
|
||||
switchhandleorder BS_ATTACKER, 2
|
||||
returnatktoball
|
||||
@ -2444,11 +2429,17 @@ BattleScript_EffectWorrySeed::
|
||||
tryworryseed BattleScript_ButItFailed
|
||||
attackanimation
|
||||
waitanimation
|
||||
.if B_ABILITY_POP_UP == TRUE
|
||||
copybyte gBattlerAbility, gBattlerTarget
|
||||
call BattleScript_AbilityPopUpOverwriteThenNormal
|
||||
.endif
|
||||
recordability BS_TARGET
|
||||
printstring STRINGID_PKMNACQUIREDABILITY
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
trytoclearprimalweather
|
||||
tryrevertweatherform
|
||||
flushtextbox
|
||||
tryendneutralizinggas BS_TARGET
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectPowerSplit::
|
||||
@ -2730,9 +2721,9 @@ BattleScript_GravityLoopDrop:
|
||||
printstring STRINGID_GRAVITYGROUNDING
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_GravityLoopEnd:
|
||||
moveendto MOVEEND_NEXT_TARGET
|
||||
moveendcase MOVEEND_TARGET_VISIBLE
|
||||
jumpifnexttargetvalid BattleScript_GravityLoop
|
||||
end
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectRoost::
|
||||
attackcanceler
|
||||
@ -2774,6 +2765,10 @@ BattleScript_EffectHitEscape::
|
||||
jumpifbattleend BattleScript_HitEscapeEnd
|
||||
jumpifbyte CMP_NOT_EQUAL, gBattleOutcome, 0, BattleScript_HitEscapeEnd
|
||||
jumpifemergencyexited BS_TARGET, BattleScript_HitEscapeEnd
|
||||
jumpiffainted BS_TARGET, FALSE, BattleScript_HitEscapeSwitch
|
||||
setbyte sGIVEEXP_STATE, 0
|
||||
getexp BS_TARGET
|
||||
BattleScript_HitEscapeSwitch:
|
||||
goto BattleScript_MoveSwitch
|
||||
BattleScript_HitEscapeEnd:
|
||||
end
|
||||
@ -3000,30 +2995,17 @@ BattleScript_CantMakeAsleep::
|
||||
orhalfword gMoveResultFlags, MOVE_RESULT_FAILED
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectAbsorb::
|
||||
call BattleScript_EffectHit_Ret
|
||||
jumpifstatus3 BS_ATTACKER, STATUS3_HEAL_BLOCK, BattleScript_AbsorbHealBlock
|
||||
setdrainedhp
|
||||
manipulatedamage DMG_BIG_ROOT
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE
|
||||
jumpifability BS_TARGET, ABILITY_LIQUID_OOZE, BattleScript_AbsorbLiquidOoze
|
||||
setbyte cMULTISTRING_CHOOSER, B_MSG_ABSORB
|
||||
goto BattleScript_AbsorbUpdateHp
|
||||
BattleScript_AbsorbLiquidOoze::
|
||||
BattleScript_EffectAbsorbLiquidOoze::
|
||||
call BattleScript_AbilityPopUpTarget
|
||||
manipulatedamage DMG_CHANGE_SIGN
|
||||
setbyte cMULTISTRING_CHOOSER, B_MSG_ABSORB_OOZE
|
||||
BattleScript_AbsorbUpdateHp::
|
||||
goto BattleScript_EffectAbsorb
|
||||
|
||||
BattleScript_EffectAbsorb::
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
jumpifmovehadnoeffect BattleScript_AbsorbTryFainting
|
||||
printfromtable gAbsorbDrainStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_AbsorbTryFainting::
|
||||
tryfaintmon BS_ATTACKER
|
||||
BattleScript_AbsorbHealBlock::
|
||||
tryfaintmon BS_TARGET
|
||||
goto BattleScript_MoveEnd
|
||||
return
|
||||
|
||||
BattleScript_EffectExplosion::
|
||||
attackcanceler
|
||||
@ -3082,7 +3064,7 @@ BattleScript_DreamEaterWorked:
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
jumpifmovehadnoeffect BattleScript_DreamEaterTryFaintEnd
|
||||
printstring STRINGID_PKMNDREAMEATEN
|
||||
printstring STRINGID_PKMNENERGYDRAINED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_DreamEaterTryFaintEnd:
|
||||
tryfaintmon BS_TARGET
|
||||
@ -3265,6 +3247,7 @@ BattleScript_EffectRoar::
|
||||
attackstring
|
||||
ppreduce
|
||||
jumpifroarfails BattleScript_ButItFailed
|
||||
jumpifcommanderactive BattleScript_ButItFailed
|
||||
jumpifability BS_TARGET, ABILITY_GUARD_DOG, BattleScript_ButItFailed
|
||||
jumpifability BS_TARGET, ABILITY_SUCTION_CUPS, BattleScript_AbilityPreventsPhasingOut
|
||||
jumpifstatus3 BS_TARGET, STATUS3_ROOTED, BattleScript_PrintMonIsRooted
|
||||
@ -3279,51 +3262,17 @@ BattleScript_RoarBlockedByDynamax:
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_MultiHitLoop::
|
||||
jumpifhasnohp BS_ATTACKER, BattleScript_MultiHitEnd
|
||||
jumpifhasnohp BS_TARGET, BattleScript_MultiHitPrintStrings
|
||||
jumpifhalfword CMP_EQUAL, gChosenMove, MOVE_SLEEP_TALK, BattleScript_DoMultiHit
|
||||
jumpifstatus BS_ATTACKER, STATUS1_SLEEP, BattleScript_MultiHitPrintStrings
|
||||
BattleScript_DoMultiHit::
|
||||
movevaluescleanup
|
||||
copyhword sMOVE_EFFECT, sMULTIHIT_EFFECT
|
||||
critcalc
|
||||
damagecalc
|
||||
jumpifmovehadnoeffect BattleScript_MultiHitNoMoreHits
|
||||
adjustdamage
|
||||
attackanimation
|
||||
waitanimation
|
||||
effectivenesssound
|
||||
hitanimation BS_TARGET
|
||||
waitstate
|
||||
healthbarupdate BS_TARGET
|
||||
datahpupdate BS_TARGET
|
||||
critmessage
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
multihitresultmessage
|
||||
flushtextbox
|
||||
addbyte sMULTIHIT_STRING + 4, 1
|
||||
moveendto MOVEEND_NEXT_TARGET
|
||||
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_FOE_ENDURED, BattleScript_MultiHitPrintStrings
|
||||
decrementmultihit BattleScript_MultiHitLoop
|
||||
goto BattleScript_MultiHitPrintStrings
|
||||
BattleScript_MultiHitNoMoreHits::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
BattleScript_MultiHitPrintStrings::
|
||||
resultmessage
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
jumpifmovehadnoeffect BattleScript_MultiHitEnd
|
||||
copyarray gBattleTextBuff1, sMULTIHIT_STRING, 6
|
||||
printstring STRINGID_HITXTIMES
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
return
|
||||
|
||||
BattleScript_MultiHitEnd::
|
||||
setadditionaleffects
|
||||
tryfaintmon BS_TARGET
|
||||
moveendcase MOVEEND_SYNCHRONIZE_TARGET
|
||||
moveendfrom MOVEEND_STATUS_IMMUNITY_ABILITIES
|
||||
end
|
||||
BattleScript_ScaleShot::
|
||||
call BattleScript_MultiHitPrintStrings
|
||||
goto BattleScript_DefDownSpeedUp
|
||||
|
||||
BattleScript_EffectConversion::
|
||||
attackcanceler
|
||||
@ -3448,7 +3397,7 @@ BattleScript_EffectOHKO::
|
||||
attackcanceler
|
||||
attackstring
|
||||
ppreduce
|
||||
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
|
||||
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
|
||||
typecalc
|
||||
jumpifmovehadnoeffect BattleScript_HitFromAtkAnimation
|
||||
tryKO BattleScript_KOFail
|
||||
@ -4091,13 +4040,10 @@ BattleScript_EffectDestinyBond::
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectEerieSpell::
|
||||
call BattleScript_EffectHit_Ret
|
||||
tryfaintmon BS_TARGET
|
||||
eeriespellppreduce BattleScript_MoveEnd
|
||||
BattleScript_MoveEffectEerieSpell::
|
||||
printstring STRINGID_PKMNREDUCEDPP
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_MoveEnd
|
||||
return
|
||||
|
||||
BattleScript_EffectSpite::
|
||||
attackcanceler
|
||||
@ -4181,6 +4127,7 @@ BattleScript_EffectMinimize::
|
||||
BattleScript_EffectCurse::
|
||||
jumpiftype BS_ATTACKER, TYPE_GHOST, BattleScript_GhostCurse
|
||||
attackcanceler
|
||||
jumpiftype BS_ATTACKER, TYPE_GHOST, BattleScript_DoGhostCurse
|
||||
attackstring
|
||||
ppreduce
|
||||
jumpifstat BS_ATTACKER, CMP_GREATER_THAN, STAT_SPEED, MIN_STAT_STAGE, BattleScript_CurseTrySpeed
|
||||
@ -4724,6 +4671,9 @@ BattleScript_ButItFailed::
|
||||
resultmessage
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_MoveEnd
|
||||
BattleScript_RestoreAttackerButItFailed:
|
||||
restoreattacker
|
||||
goto BattleScript_ButItFailed
|
||||
|
||||
BattleScript_NotAffected::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
@ -4980,7 +4930,7 @@ BattleScript_EffectFollowMe::
|
||||
attackcanceler
|
||||
attackstring
|
||||
ppreduce
|
||||
.if B_UPDATED_MOVE_DATA >= GEN_6
|
||||
.if B_UPDATED_MOVE_DATA >= GEN_8
|
||||
jumpifnotbattletype BATTLE_TYPE_DOUBLE, BattleScript_ButItFailed
|
||||
.endif
|
||||
setforcedtarget
|
||||
@ -5068,15 +5018,10 @@ BattleScript_EffectRolePlay::
|
||||
attackanimation
|
||||
waitanimation
|
||||
.if B_ABILITY_POP_UP == TRUE
|
||||
setbyte sFIXED_ABILITY_POPUP, TRUE
|
||||
showabilitypopup BS_ATTACKER
|
||||
pause 60
|
||||
sethword sABILITY_OVERWRITE, 0
|
||||
updateabilitypopup BS_ATTACKER
|
||||
pause 20
|
||||
destroyabilitypopup
|
||||
pause 40
|
||||
copybyte gBattlerAbility, gBattlerAttacker
|
||||
call BattleScript_AbilityPopUpOverwriteThenNormal
|
||||
.endif
|
||||
recordability BS_ATTACKER
|
||||
printstring STRINGID_PKMNCOPIEDFOE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
switchinabilities BS_ATTACKER
|
||||
@ -5219,12 +5164,17 @@ BattleScript_EffectSkillSwap::
|
||||
tryswapabilities BattleScript_ButItFailed
|
||||
attackanimation
|
||||
waitanimation
|
||||
jumpiftargetally BattleScript_EffectSkillSwap_AfterAbilityPopUp
|
||||
.if B_ABILITY_POP_UP == TRUE
|
||||
call BattleScript_AbilityPopUpTarget
|
||||
pause 20
|
||||
copybyte gBattlerAbility, gBattlerAttacker
|
||||
call BattleScript_AbilityPopUp
|
||||
call BattleScript_AbilityPopUpOverwriteThenNormal
|
||||
copybyte gBattlerAbility, gBattlerTarget
|
||||
copyhword sABILITY_OVERWRITE, gLastUsedAbility
|
||||
call BattleScript_AbilityPopUpOverwriteThenNormal
|
||||
.endif
|
||||
BattleScript_EffectSkillSwap_AfterAbilityPopUp:
|
||||
recordability BS_ATTACKER
|
||||
recordability BS_TARGET
|
||||
printstring STRINGID_PKMNSWAPPEDABILITIES
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
.if B_SKILL_SWAP >= GEN_4
|
||||
@ -5248,7 +5198,7 @@ BattleScript_EffectRefresh::
|
||||
attackcanceler
|
||||
attackstring
|
||||
ppreduce
|
||||
cureifburnedparalysedorpoisoned BattleScript_ButItFailed
|
||||
curestatuswithmove BattleScript_ButItFailed
|
||||
attackanimation
|
||||
waitanimation
|
||||
printstring STRINGID_PKMNSTATUSNORMAL
|
||||
@ -5785,7 +5735,6 @@ BattleScript_PrintFullBox::
|
||||
|
||||
BattleScript_ActionSwitch::
|
||||
hpthresholds2 BS_ATTACKER
|
||||
saveattacker
|
||||
printstring STRINGID_RETURNMON
|
||||
jumpifbattletype BATTLE_TYPE_DOUBLE, BattleScript_PursuitSwitchDmgSetMultihit
|
||||
setmultihit 1
|
||||
@ -5803,7 +5752,6 @@ BattleScript_DoSwitchOut::
|
||||
switchoutabilities BS_ATTACKER
|
||||
updatedynamax
|
||||
waitstate
|
||||
restoreattacker
|
||||
returnatktoball
|
||||
waitstate
|
||||
drawpartystatussummary BS_ATTACKER
|
||||
@ -5980,7 +5928,7 @@ BattleScript_OverworldWeatherStarts::
|
||||
end3
|
||||
|
||||
BattleScript_OverworldTerrain::
|
||||
printfromtable gTerrainStringIds
|
||||
printfromtable gTerrainStartsStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
playanimation BS_BATTLER_0, B_ANIM_RESTORE_BG
|
||||
call BattleScript_ActivateTerrainEffects
|
||||
@ -6062,33 +6010,34 @@ BattleScript_SafeguardEnds::
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end2
|
||||
|
||||
BattleScript_LeechSeedTurnDrain::
|
||||
playanimation BS_ATTACKER, B_ANIM_LEECH_SEED_DRAIN, sB_ANIM_ARG1
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
copyword gBattleMoveDamage, gHpDealt
|
||||
jumpifability BS_ATTACKER, ABILITY_LIQUID_OOZE, BattleScript_LeechSeedTurnPrintLiquidOoze
|
||||
setbyte cMULTISTRING_CHOOSER, B_MSG_LEECH_SEED_DRAIN
|
||||
jumpifstatus3 BS_TARGET, STATUS3_HEAL_BLOCK, BattleScript_LeechSeedHealBlock
|
||||
manipulatedamage DMG_BIG_ROOT
|
||||
goto BattleScript_LeechSeedTurnPrintAndUpdateHp
|
||||
BattleScript_LeechSeedTurnPrintLiquidOoze::
|
||||
BattleScript_LeechSeedTurnDrainLiquidOoze::
|
||||
call BattleScript_LeechSeedTurnDrain
|
||||
manipulatedamage DMG_CHANGE_SIGN
|
||||
copybyte gBattlerAbility, gBattlerAttacker
|
||||
call BattleScript_AbilityPopUp
|
||||
setbyte cMULTISTRING_CHOOSER, B_MSG_LEECH_SEED_OOZE
|
||||
BattleScript_LeechSeedTurnPrintAndUpdateHp::
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
goto BattleScript_LeechSeedTurnDrainGainHp
|
||||
|
||||
BattleScript_LeechSeedTurnDrainHealBlock::
|
||||
call BattleScript_LeechSeedTurnDrain
|
||||
end2
|
||||
|
||||
BattleScript_LeechSeedTurnDrainRecovery::
|
||||
call BattleScript_LeechSeedTurnDrain
|
||||
BattleScript_LeechSeedTurnDrainGainHp:
|
||||
manipulatedamage DMG_BIG_ROOT
|
||||
healthbarupdate BS_TARGET
|
||||
datahpupdate BS_TARGET
|
||||
printfromtable gLeechSeedStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
tryfaintmon BS_ATTACKER
|
||||
tryfaintmon BS_TARGET
|
||||
end2
|
||||
BattleScript_LeechSeedHealBlock:
|
||||
setword gBattleMoveDamage, 0
|
||||
goto BattleScript_LeechSeedTurnPrintAndUpdateHp
|
||||
|
||||
BattleScript_LeechSeedTurnDrain:
|
||||
playanimation BS_ATTACKER, B_ANIM_LEECH_SEED_DRAIN, sB_ANIM_ARG1
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
tryfaintmon BS_ATTACKER
|
||||
return
|
||||
|
||||
BattleScript_BideStoringEnergy::
|
||||
printstring STRINGID_PKMNSTORINGENERGY
|
||||
@ -6422,18 +6371,14 @@ BattleScript_GulpMissileGulping::
|
||||
datahpupdate BS_ATTACKER
|
||||
tryfaintmon BS_ATTACKER
|
||||
jumpiffainted BS_ATTACKER, TRUE, BattleScript_GulpMissileNoSecondEffectGulping
|
||||
jumpifholdeffect BS_ATTACKER, HOLD_EFFECT_CLEAR_AMULET, BattleScript_GulpMissileNoSecondEffectGulping
|
||||
jumpifability BS_ATTACKER, ABILITY_CLEAR_BODY, BattleScript_GulpMissileNoSecondEffectGulping
|
||||
jumpifability BS_ATTACKER, ABILITY_FULL_METAL_BODY, BattleScript_GulpMissileNoSecondEffectGulping
|
||||
jumpifability BS_ATTACKER, ABILITY_WHITE_SMOKE, BattleScript_GulpMissileNoSecondEffectGulping
|
||||
jumpifflowerveilattacker BattleScript_GulpMissileNoSecondEffectGulping
|
||||
BattleScript_GulpMissileNoDmgGulping:
|
||||
handleformchange BS_TARGET, 0
|
||||
playanimation BS_TARGET, B_ANIM_FORM_CHANGE
|
||||
waitanimation
|
||||
swapattackerwithtarget @ to make gStatDownStringIds down below print the right battler
|
||||
setstatchanger STAT_DEF, 1, TRUE
|
||||
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED, BattleScript_GulpMissileGorgingTargetDefenseCantGoLower
|
||||
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_GulpMissileGulpingEnd
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_GulpMissileGulpingTargetDefenseCantGoLower
|
||||
setgraphicalstatchangevalues
|
||||
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||
printfromtable gStatDownStringIds
|
||||
@ -6445,9 +6390,11 @@ BattleScript_GulpMissileNoSecondEffectGulping:
|
||||
playanimation BS_TARGET, B_ANIM_FORM_CHANGE
|
||||
waitanimation
|
||||
return
|
||||
BattleScript_GulpMissileGorgingTargetDefenseCantGoLower:
|
||||
BattleScript_GulpMissileGulpingTargetDefenseCantGoLower:
|
||||
printstring STRINGID_STATSWONTDECREASE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_GulpMissileGulpingEnd:
|
||||
swapattackerwithtarget @ restore the battlers, just in case
|
||||
return
|
||||
|
||||
BattleScript_SeedSowerActivates::
|
||||
@ -6460,12 +6407,14 @@ BattleScript_SeedSowerActivates::
|
||||
return
|
||||
|
||||
BattleScript_AngerShellActivates::
|
||||
saveattacker
|
||||
copybyte gBattlerAttacker, gBattlerTarget
|
||||
call BattleScript_AbilityPopUp
|
||||
jumpifstat BS_TARGET, CMP_LESS_THAN, STAT_ATK, MAX_STAT_STAGE, BattleScript_AngerShellTryDef
|
||||
jumpifstat BS_TARGET, CMP_LESS_THAN, STAT_SPATK, MAX_STAT_STAGE, BattleScript_AngerShellTryDef
|
||||
jumpifstat BS_TARGET, CMP_LESS_THAN, STAT_SPEED, MAX_STAT_STAGE, BattleScript_AngerShellTryDef
|
||||
jumpifstat BS_TARGET, CMP_GREATER_THAN, STAT_DEF, MIN_STAT_STAGE, BattleScript_AngerShellTryDef
|
||||
jumpifstat BS_TARGET, CMP_EQUAL, STAT_SPDEF, MIN_STAT_STAGE, BattleScript_ButItFailed
|
||||
jumpifstat BS_TARGET, CMP_EQUAL, STAT_SPDEF, MIN_STAT_STAGE, BattleScript_RestoreAttackerButItFailed
|
||||
BattleScript_AngerShellTryDef::
|
||||
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||
modifybattlerstatstage BS_ATTACKER, STAT_DEF, DECREASE, 1, BattleScript_AngerShellTrySpDef, ANIM_ON
|
||||
@ -6479,6 +6428,7 @@ BattleScript_AngerShellTrySpAtk:
|
||||
BattleScript_AngerShellTrySpeed:
|
||||
modifybattlerstatstage BS_ATTACKER, STAT_SPEED, INCREASE, 1, BattleScript_AngerShellRet, ANIM_ON
|
||||
BattleScript_AngerShellRet:
|
||||
restoreattacker
|
||||
return
|
||||
|
||||
BattleScript_WindPowerActivates::
|
||||
@ -6788,7 +6738,7 @@ BattleScript_WishComesTrue::
|
||||
playanimation BS_TARGET, B_ANIM_WISH_HEAL
|
||||
printstring STRINGID_PKMNWISHCAMETRUE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE
|
||||
healthbarupdate BS_TARGET
|
||||
datahpupdate BS_TARGET
|
||||
printstring STRINGID_PKMNREGAINEDHEALTH
|
||||
@ -6906,25 +6856,34 @@ BattleScript_GrudgeTakesPp::
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
return
|
||||
|
||||
BattleScript_MagicCoatBounce::
|
||||
BattleScript_MagicBounce::
|
||||
attackstring
|
||||
ppreduce
|
||||
pause B_WAIT_TIME_SHORT
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0, BattleScript_MagicCoatBounce_Print
|
||||
call BattleScript_AbilityPopUp
|
||||
BattleScript_MagicCoatBounce_Print:
|
||||
printfromtable gMagicCoatBounceStringIds
|
||||
printstring STRINGID_PKMNMOVEBOUNCEDABILITY
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
setmagiccoattarget
|
||||
orword gHitMarker, HITMARKER_ATTACKSTRING_PRINTED | HITMARKER_NO_PPDEDUCT | HITMARKER_ALLOW_NO_PP
|
||||
bicword gHitMarker, HITMARKER_NO_ATTACKSTRING
|
||||
return
|
||||
|
||||
BattleScript_MagicCoat::
|
||||
attackstring
|
||||
ppreduce
|
||||
pause B_WAIT_TIME_SHORT
|
||||
setmagiccoattarget
|
||||
printstring STRINGID_PKMNMOVEBOUNCED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
orword gHitMarker, HITMARKER_ATTACKSTRING_PRINTED | HITMARKER_NO_PPDEDUCT | HITMARKER_ALLOW_NO_PP
|
||||
bicword gHitMarker, HITMARKER_NO_ATTACKSTRING
|
||||
setmagiccoattarget BS_ATTACKER
|
||||
return
|
||||
|
||||
BattleScript_MagicCoatBouncePrankster::
|
||||
BattleScript_MagicCoatPrankster::
|
||||
attackstring
|
||||
ppreduce
|
||||
pause B_WAIT_TIME_SHORT
|
||||
printfromtable gMagicCoatBounceStringIds
|
||||
printstring STRINGID_PKMNMOVEBOUNCED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
printstring STRINGID_ITDOESNTAFFECT
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
@ -6994,26 +6953,17 @@ BattleScript_WishMegaEvolution::
|
||||
goto BattleScript_MegaEvolutionAfterString
|
||||
|
||||
BattleScript_PrimalReversion::
|
||||
call BattleScript_PrimalReversionRet
|
||||
end2
|
||||
|
||||
BattleScript_PrimalReversionRestoreAttacker::
|
||||
call BattleScript_PrimalReversionRet
|
||||
copybyte gBattlerAttacker, sSAVED_BATTLER
|
||||
end2
|
||||
|
||||
BattleScript_PrimalReversionRet::
|
||||
flushtextbox
|
||||
setbyte gIsCriticalHit, 0
|
||||
handleprimalreversion BS_ATTACKER, 0
|
||||
handleprimalreversion BS_ATTACKER, 1
|
||||
playanimation BS_ATTACKER, B_ANIM_PRIMAL_REVERSION
|
||||
handleprimalreversion BS_SCRIPTING, 0
|
||||
handleprimalreversion BS_SCRIPTING, 1
|
||||
playanimation BS_SCRIPTING, B_ANIM_PRIMAL_REVERSION
|
||||
waitanimation
|
||||
handleprimalreversion BS_ATTACKER, 2
|
||||
handleprimalreversion BS_SCRIPTING, 2
|
||||
printstring STRINGID_PKMNREVERTEDTOPRIMAL
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
switchinabilities BS_ATTACKER
|
||||
return
|
||||
switchinabilities BS_SCRIPTING
|
||||
end3
|
||||
|
||||
BattleScript_UltraBurst::
|
||||
flushtextbox
|
||||
@ -7175,7 +7125,8 @@ BattleScript_CottonDownLoop:
|
||||
jumpiffainted BS_TARGET, TRUE, BattleScript_CottonDownLoopIncrement
|
||||
setstatchanger STAT_SPEED, 1, TRUE
|
||||
jumpifbyteequal gBattlerTarget, gEffectBattler, BattleScript_CottonDownLoopIncrement
|
||||
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED, BattleScript_CottonDownTargetSpeedCantGoLower
|
||||
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_CottonDownLoopIncrement
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_CottonDownTargetSpeedCantGoLower
|
||||
setgraphicalstatchangevalues
|
||||
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||
printfromtable gStatDownStringIds
|
||||
@ -7631,12 +7582,19 @@ BattleScript_AbilityPopUp:
|
||||
return
|
||||
|
||||
BattleScript_AbilityPopUpScripting:
|
||||
.if B_ABILITY_POP_UP == TRUE
|
||||
showabilitypopup BS_SCRIPTING
|
||||
pause 40
|
||||
.endif
|
||||
recordability BS_SCRIPTING
|
||||
copybyte gBattlerAbility, sBATTLER
|
||||
goto BattleScript_AbilityPopUp
|
||||
|
||||
BattleScript_AbilityPopUpOverwriteThenNormal:
|
||||
setbyte sFIXED_ABILITY_POPUP, TRUE
|
||||
showabilitypopup BS_ABILITY_BATTLER
|
||||
pause 60
|
||||
sethword sABILITY_OVERWRITE, 0
|
||||
updateabilitypopup BS_ABILITY_BATTLER
|
||||
pause 20
|
||||
recordability BS_ABILITY_BATTLER
|
||||
destroyabilitypopup
|
||||
pause 40
|
||||
return
|
||||
|
||||
BattleScript_SpeedBoostActivates::
|
||||
@ -7709,15 +7667,11 @@ BattleScript_EmergencyExitWildNoPopUp::
|
||||
|
||||
BattleScript_TraceActivates::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
call BattleScript_AbilityPopUp
|
||||
call BattleScript_AbilityPopUpScripting
|
||||
printstring STRINGID_PKMNTRACED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
settracedability BS_SCRIPTING
|
||||
switchinabilities BS_SCRIPTING
|
||||
return
|
||||
|
||||
BattleScript_TraceActivatesEnd3::
|
||||
call BattleScript_TraceActivates
|
||||
end3
|
||||
|
||||
BattleScript_ReceiverActivates::
|
||||
@ -8033,18 +7987,62 @@ BattleScript_SupremeOverlordActivates::
|
||||
|
||||
BattleScript_CostarActivates::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
savetarget
|
||||
copybyte gBattlerTarget, sBATTLER
|
||||
call BattleScript_AbilityPopUp
|
||||
printstring STRINGID_PKMNCOPIEDSTATCHANGES
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
restoretarget
|
||||
end3
|
||||
|
||||
BattleScript_ZeroToHeroActivates::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
call BattleScript_AbilityPopUp
|
||||
call BattleScript_AbilityPopUpScripting
|
||||
printstring STRINGID_ZEROTOHEROTRANSFORMATION
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end3
|
||||
|
||||
BattleScript_CommanderActivates::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
call BattleScript_AbilityPopUpScripting
|
||||
printstring STRINGID_COMMANDERACTIVATES
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_CommanderAtkIncrease:
|
||||
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF | BIT_SPATK | BIT_SPDEF | BIT_SPEED, STAT_CHANGE_BY_TWO
|
||||
setstatchanger STAT_ATK, 2, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CommanderDefIncrease
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CommanderDefIncrease
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_CommanderDefIncrease:
|
||||
setstatchanger STAT_DEF, 2, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CommanderSpAtkIncrease
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CommanderSpAtkIncrease
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_CommanderSpAtkIncrease:
|
||||
setstatchanger STAT_SPATK, 2, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CommanderSpDefIncrease
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CommanderSpDefIncrease
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_CommanderSpDefIncrease:
|
||||
setstatchanger STAT_SPDEF, 2, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CommanderSpeedIncrease
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CommanderSpeedIncrease
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_CommanderSpeedIncrease:
|
||||
setstatchanger STAT_SPEED, 2, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CommanderEnd
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CommanderEnd
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_CommanderEnd:
|
||||
restoreattacker
|
||||
end3
|
||||
|
||||
BattleScript_HospitalityActivates::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
call BattleScript_AbilityPopUp
|
||||
@ -8404,33 +8402,30 @@ BattleScript_CursedBodyActivates::
|
||||
return
|
||||
|
||||
BattleScript_MummyActivates::
|
||||
call BattleScript_AbilityPopUp
|
||||
.if B_ABILITY_POP_UP == TRUE
|
||||
call BattleScript_AbilityPopUpTarget
|
||||
setbyte sFIXED_ABILITY_POPUP, TRUE
|
||||
copybyte gBattlerAbility, gBattlerAttacker
|
||||
copyhword sABILITY_OVERWRITE, gLastUsedAbility
|
||||
call BattleScript_AbilityPopUpOverwriteThenNormal
|
||||
.endif
|
||||
recordability BS_TARGET
|
||||
recordability BS_ATTACKER
|
||||
printstring STRINGID_ATTACKERACQUIREDABILITY
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
return
|
||||
|
||||
BattleScript_WanderingSpiritActivates::
|
||||
.if B_ABILITY_POP_UP == TRUE
|
||||
setbyte sFIXED_ABILITY_POPUP, TRUE
|
||||
copybyte gBattlerAbility, gBattlerTarget
|
||||
sethword sABILITY_OVERWRITE, ABILITY_WANDERING_SPIRIT
|
||||
showabilitypopup BS_TARGET
|
||||
pause 60
|
||||
sethword sABILITY_OVERWRITE, 0
|
||||
updateabilitypopup BS_TARGET
|
||||
pause 20
|
||||
destroyabilitypopup
|
||||
pause 40
|
||||
call BattleScript_AbilityPopUpOverwriteThenNormal
|
||||
copybyte gBattlerAbility, gBattlerAttacker
|
||||
setbyte sFIXED_ABILITY_POPUP, TRUE
|
||||
copyhword sABILITY_OVERWRITE, gLastUsedAbility
|
||||
showabilitypopup BS_ATTACKER
|
||||
pause 60
|
||||
sethword sABILITY_OVERWRITE, 0
|
||||
updateabilitypopup BS_ATTACKER
|
||||
pause 20
|
||||
destroyabilitypopup
|
||||
pause 40
|
||||
call BattleScript_AbilityPopUpOverwriteThenNormal
|
||||
.endif
|
||||
recordability BS_TARGET
|
||||
recordability BS_ATTACKER
|
||||
printstring STRINGID_SWAPPEDABILITIES
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
switchinabilities BS_ATTACKER
|
||||
@ -9049,8 +9044,6 @@ BattleScript_BerryConfuseHealEnd2_Anim:
|
||||
orword gHitMarker, HITMARKER_IGNORE_BIDE | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_SCRIPTING
|
||||
datahpupdate BS_SCRIPTING
|
||||
printstring STRINGID_FORXCOMMAYZ
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
seteffectprimary MOVE_EFFECT_CONFUSION | MOVE_EFFECT_AFFECTS_USER
|
||||
removeitem BS_SCRIPTING
|
||||
end2
|
||||
@ -9067,8 +9060,6 @@ BattleScript_BerryConfuseHealRet_Anim:
|
||||
orword gHitMarker, HITMARKER_IGNORE_BIDE | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_SCRIPTING
|
||||
datahpupdate BS_SCRIPTING
|
||||
printstring STRINGID_FORXCOMMAYZ
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
seteffectprimary MOVE_EFFECT_CONFUSION | MOVE_EFFECT_CERTAIN
|
||||
removeitem BS_TARGET
|
||||
return
|
||||
@ -9079,7 +9070,7 @@ BattleScript_BerryStatRaiseEnd2::
|
||||
BattleScript_BerryStatRaiseEnd2_AbilityPopup:
|
||||
call BattleScript_AbilityPopUp
|
||||
BattleScript_BerryStatRaiseEnd2_Anim:
|
||||
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_BerryStatRaiseEnd2_End
|
||||
statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_BerryStatRaiseEnd2_End
|
||||
setgraphicalstatchangevalues
|
||||
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, sB_ANIM_ARG1
|
||||
setbyte cMULTISTRING_CHOOSER, B_MSG_STAT_ROSE_ITEM
|
||||
@ -9565,6 +9556,14 @@ BattleScript_StickyBarbTransfer::
|
||||
removeitem BS_TARGET
|
||||
return
|
||||
|
||||
BattleScript_RedCardActivationNoSwitch::
|
||||
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT
|
||||
printstring STRINGID_REDCARDACTIVATE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
removeitem BS_SCRIPTING
|
||||
restoretarget
|
||||
return
|
||||
|
||||
BattleScript_RedCardActivates::
|
||||
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT
|
||||
printstring STRINGID_REDCARDACTIVATE
|
||||
@ -9606,7 +9605,9 @@ BattleScript_EjectButtonActivates::
|
||||
removeitem BS_SCRIPTING
|
||||
makeinvisible BS_SCRIPTING
|
||||
openpartyscreen BS_SCRIPTING, BattleScript_EjectButtonEnd
|
||||
copybyte sSAVED_BATTLER, sBATTLER
|
||||
switchoutabilities BS_SCRIPTING
|
||||
copybyte sBATTLER, sSAVED_BATTLER
|
||||
waitstate
|
||||
switchhandleorder BS_SCRIPTING 0x2
|
||||
returntoball BS_SCRIPTING, FALSE
|
||||
@ -9696,6 +9697,7 @@ BattleScript_PastelVeilEnd:
|
||||
end3
|
||||
|
||||
BattleScript_NeutralizingGasExits::
|
||||
saveattacker
|
||||
savetarget
|
||||
pause B_WAIT_TIME_SHORT
|
||||
printstring STRINGID_NEUTRALIZINGGASOVER
|
||||
@ -9705,6 +9707,7 @@ BattleScript_NeutralizingGasExitsLoop:
|
||||
switchinabilities BS_TARGET
|
||||
addbyte gBattlerTarget, 1
|
||||
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_NeutralizingGasExitsLoop
|
||||
restoreattacker
|
||||
restoretarget
|
||||
return
|
||||
|
||||
@ -10044,14 +10047,18 @@ BattleScript_BerserkGeneRet_End:
|
||||
end3
|
||||
|
||||
BattleScript_BoosterEnergyEnd2::
|
||||
call BattleScript_BoosterEnergyRet
|
||||
end2
|
||||
|
||||
BattleScript_BoosterEnergyRet::
|
||||
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, sB_ANIM_ARG1
|
||||
call BattleScript_AbilityPopUpTarget
|
||||
call BattleScript_AbilityPopUpScripting
|
||||
printstring STRINGID_BOOSTERENERGYACTIVATES
|
||||
waitmessage B_WAIT_TIME_MED
|
||||
printstring STRINGID_STATWASHEIGHTENED
|
||||
waitmessage B_WAIT_TIME_MED
|
||||
removeitem BS_SCRIPTING
|
||||
end2
|
||||
return
|
||||
|
||||
BattleScript_EffectSnow::
|
||||
attackcanceler
|
||||
|
||||
@ -25,6 +25,7 @@ gBattlescriptsForUsingItem::
|
||||
.4byte BattleScript_ItemRestoreHP @ EFFECT_ITEM_REVIVE
|
||||
.4byte BattleScript_ItemRestorePP @ EFFECT_ITEM_RESTORE_PP
|
||||
.4byte BattleScript_ItemIncreaseAllStats @ EFFECT_ITEM_INCREASE_ALL_STATS
|
||||
.4byte BattleScript_UsePokeFlute @ EFFECT_ITEM_USE_POKE_FLUTE
|
||||
|
||||
.align 2
|
||||
gBattlescriptsForSafariActions::
|
||||
@ -110,6 +111,25 @@ BattleScript_ItemIncreaseStat::
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end
|
||||
|
||||
BattleScript_UsePokeFlute::
|
||||
checkpokeflute
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 1, BattleScript_PokeFluteWakeUp
|
||||
printstring STRINGID_POKEFLUTECATCHY
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_PokeFluteEnd
|
||||
|
||||
BattleScript_PokeFluteWakeUp::
|
||||
printstring STRINGID_POKEFLUTE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
fanfare MUS_RG_POKE_FLUTE
|
||||
waitfanfare
|
||||
printstring STRINGID_MONHEARINGFLUTEAWOKE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
updatestatusicon BS_PLAYER2
|
||||
waitstate
|
||||
BattleScript_PokeFluteEnd::
|
||||
finishaction
|
||||
|
||||
BattleScript_ItemSetMist::
|
||||
call BattleScript_UseItemMessage
|
||||
setmist
|
||||
|
||||
@ -42,6 +42,7 @@
|
||||
#include "constants/metatile_labels.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/party_menu.h"
|
||||
#include "constants/pokedex.h"
|
||||
#include "constants/pokemon.h"
|
||||
#include "constants/roulette.h"
|
||||
#include "constants/script_menu.h"
|
||||
@ -565,8 +566,8 @@ gStdScripts_End::
|
||||
.include "data/maps/Route110_TrickHousePuzzle6/scripts.inc"
|
||||
.include "data/maps/Route110_TrickHousePuzzle7/scripts.inc"
|
||||
.include "data/maps/Route110_TrickHousePuzzle8/scripts.inc"
|
||||
.include "data/maps/Route110_SeasideCyclingRoadNorthEntrance/scripts.inc"
|
||||
.include "data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc"
|
||||
.include "data/maps/Route110_SeasideCyclingRoadNorthEntrance/scripts.inc"
|
||||
.include "data/maps/Route113_GlassWorkshop/scripts.inc"
|
||||
.include "data/maps/Route123_BerryMastersHouse/scripts.inc"
|
||||
.include "data/maps/Route119_WeatherInstitute_1F/scripts.inc"
|
||||
@ -587,6 +588,37 @@ EventScript_WhiteOut::
|
||||
goto EventScript_ResetMrBriney
|
||||
end
|
||||
|
||||
EventScript_AfterWhiteOutHeal::
|
||||
lockall
|
||||
msgbox gText_FirstShouldRestoreMonsHealth
|
||||
call EventScript_PkmnCenterNurse_TakeAndHealPkmn
|
||||
call_if_unset FLAG_DEFEATED_RUSTBORO_GYM, EventScript_AfterWhiteOutHealMsgPreRoxanne
|
||||
call_if_set FLAG_DEFEATED_RUSTBORO_GYM, EventScript_AfterWhiteOutHealMsg
|
||||
applymovement VAR_LAST_TALKED, Movement_PkmnCenterNurse_Bow
|
||||
waitmovement 0
|
||||
fadedefaultbgm
|
||||
releaseall
|
||||
end
|
||||
|
||||
EventScript_AfterWhiteOutHealMsgPreRoxanne::
|
||||
msgbox gText_MonsHealedShouldBuyPotions
|
||||
return
|
||||
|
||||
EventScript_AfterWhiteOutHealMsg::
|
||||
msgbox gText_MonsHealed
|
||||
return
|
||||
|
||||
EventScript_AfterWhiteOutMomHeal::
|
||||
lockall
|
||||
applymovement LOCALID_MOM, Common_Movement_WalkInPlaceFasterDown
|
||||
waitmovement 0
|
||||
msgbox gText_HadQuiteAnExperienceTakeRest
|
||||
call Common_EventScript_OutOfCenterPartyHeal
|
||||
msgbox gText_MomExplainHPGetPotions
|
||||
fadedefaultbgm
|
||||
releaseall
|
||||
end
|
||||
|
||||
EventScript_ResetMrBriney::
|
||||
goto_if_eq VAR_BRINEY_LOCATION, 1, EventScript_MoveMrBrineyToHouse
|
||||
goto_if_eq VAR_BRINEY_LOCATION, 2, EventScript_MoveMrBrineyToDewford
|
||||
@ -693,6 +725,11 @@ EventScript_BackupMrBrineyLocation::
|
||||
.include "data/scripts/rival_graphics.inc"
|
||||
.include "data/scripts/set_gym_trainers.inc"
|
||||
|
||||
EventScript_CancelMessageBox::
|
||||
special UseBlankMessageToCancelPokemonPic
|
||||
release
|
||||
end
|
||||
|
||||
Common_EventScript_ShowBagIsFull::
|
||||
msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT
|
||||
release
|
||||
@ -887,6 +924,48 @@ gText_PlayerWhitedOut::
|
||||
.string "{PLAYER} is out of usable\n"
|
||||
.string "POKéMON!\p{PLAYER} whited out!$"
|
||||
|
||||
gText_FirstShouldRestoreMonsHealth::
|
||||
.string "First, you should restore your\n"
|
||||
.string "POKéMON to full health.$"
|
||||
|
||||
gText_MonsHealedShouldBuyPotions::
|
||||
.string "Your POKéMON have been healed\n"
|
||||
.string "to perfect health.\p"
|
||||
.string "If your POKéMON's energy, HP,\n"
|
||||
.string "is down, please come see us.\p"
|
||||
.string "If you're planning to go far in the\n"
|
||||
.string "field, you should buy some POTIONS\l"
|
||||
.string "at the POKéMON MART.\p"
|
||||
.string "We hope you excel!$"
|
||||
|
||||
gText_MonsHealed::
|
||||
.string "Your POKéMON have been healed\n"
|
||||
.string "to perfect health.\p"
|
||||
.string "We hope you excel!$"
|
||||
|
||||
gText_HadQuiteAnExperienceTakeRest::
|
||||
.string "MOM: {PLAYER}!\n"
|
||||
.string "Welcome home.\p"
|
||||
.string "It sounds like you had quite\n"
|
||||
.string "an experience.\p"
|
||||
.string "Maybe you should take a quick\n"
|
||||
.string "rest.$"
|
||||
|
||||
gText_MomExplainHPGetPotions::
|
||||
.string "MOM: Oh, good! You and your\n"
|
||||
.string "POKéMON are looking great.\p"
|
||||
.string "I just heard from PROF. BIRCH.\p"
|
||||
.string "He said that POKéMON's energy is\n"
|
||||
.string "measured in HP.\p"
|
||||
.string "If your POKéMON lose their HP,\n"
|
||||
.string "you can restore them at any\l"
|
||||
.string "POKéMON CENTER.\p"
|
||||
.string "If you're going to travel far away,\n"
|
||||
.string "the smart TRAINER stocks up on\l"
|
||||
.string "POTIONS at the POKéMON MART.\p"
|
||||
.string "Make me proud, honey!\p"
|
||||
.string "Take care!$"
|
||||
|
||||
gText_RegisteredTrainerinPokeNav::
|
||||
.string "Registered {STR_VAR_1} {STR_VAR_2}\n"
|
||||
.string "in the POKéNAV.$"
|
||||
@ -1030,7 +1109,6 @@ EventScript_VsSeekerChargingDone::
|
||||
.include "data/text/contest_strings.inc"
|
||||
.include "data/text/contest_link.inc"
|
||||
.include "data/text/contest_painting.inc"
|
||||
.include "data/text/trick_house_mechadolls.inc"
|
||||
.include "data/scripts/tv.inc"
|
||||
.include "data/text/tv.inc"
|
||||
.include "data/scripts/interview.inc"
|
||||
@ -1071,6 +1149,5 @@ EventScript_VsSeekerChargingDone::
|
||||
.include "data/scripts/trainer_hill.inc"
|
||||
.include "data/scripts/test_signpost.inc"
|
||||
.include "data/scripts/follower.inc"
|
||||
.include "data/text/frontier_brain.inc"
|
||||
.include "data/text/save.inc"
|
||||
.include "data/text/birch_speech.inc"
|
||||
|
||||
@ -28,9 +28,7 @@ BattleFrontier_Mart_Pokemart:
|
||||
.2byte ITEM_ZINC
|
||||
.2byte ITEM_CARBOS
|
||||
.2byte ITEM_HP_UP
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
BattleFrontier_Mart_EventScript_OldMan::
|
||||
msgbox BattleFrontier_Mart_Text_ChaperonGrandson, MSGBOX_NPC
|
||||
|
||||
@ -45,9 +45,7 @@ EverGrandeCity_PokemonLeague_1F_Pokemart:
|
||||
.2byte ITEM_FULL_HEAL
|
||||
.2byte ITEM_REVIVE
|
||||
.2byte ITEM_MAX_REPEL
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
@ The door guards only check for FLAG_BADGE06_GET because Winonas badge is the only one that can be skipped
|
||||
@ Its assumed the player has the remaining badges
|
||||
|
||||
@ -25,9 +25,7 @@ FallarborTown_Mart_Pokemart:
|
||||
.2byte ITEM_X_DEFENSE
|
||||
.2byte ITEM_DIRE_HIT
|
||||
.2byte ITEM_GUARD_SPEC
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
FallarborTown_Mart_EventScript_Woman::
|
||||
msgbox FallarborTown_Mart_Text_DecidingSkittyEvolve, MSGBOX_NPC
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
"trainer_type": "TRAINER_TYPE_NONE",
|
||||
"trainer_sight_or_berry_tree_id": "0",
|
||||
"script": "FallarborTown_PokemonCenter_1F_EventScript_Lanette",
|
||||
"flag": "FLAG_HIDE_FALLORBOR_POKEMON_CENTER_LANETTE"
|
||||
"flag": "FLAG_HIDE_FALLARBOR_POKEMON_CENTER_LANETTE"
|
||||
}
|
||||
],
|
||||
"warp_events": [
|
||||
|
||||
@ -29,9 +29,7 @@ FortreeCity_DecorationShop_PokemartDecor_Desks:
|
||||
.2byte DECOR_BRICK_DESK
|
||||
.2byte DECOR_CAMP_DESK
|
||||
.2byte DECOR_HARD_DESK
|
||||
.2byte DECOR_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
FortreeCity_DecorationShop_EventScript_ClerkChairs::
|
||||
lock
|
||||
@ -53,9 +51,7 @@ FortreeCity_DecorationShop_PokemartDecor_Chairs:
|
||||
.2byte DECOR_BRICK_CHAIR
|
||||
.2byte DECOR_CAMP_CHAIR
|
||||
.2byte DECOR_HARD_CHAIR
|
||||
.2byte DECOR_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
FortreeCity_DecorationShop_Text_MerchandiseSentToPC:
|
||||
.string "Merchandise you buy here is sent to\n"
|
||||
|
||||
@ -23,9 +23,7 @@ FortreeCity_Mart_Pokemart:
|
||||
.2byte ITEM_REVIVE
|
||||
.2byte ITEM_SUPER_REPEL
|
||||
.2byte ITEM_WOOD_MAIL
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
FortreeCity_Mart_EventScript_Woman::
|
||||
msgbox FortreeCity_Mart_Text_SuperRepelBetter, MSGBOX_NPC
|
||||
|
||||
@ -17,9 +17,7 @@ LavaridgeTown_HerbShop_Pokemart:
|
||||
.2byte ITEM_ENERGY_ROOT
|
||||
.2byte ITEM_HEAL_POWDER
|
||||
.2byte ITEM_REVIVAL_HERB
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
LavaridgeTown_HerbShop_EventScript_ExpertM::
|
||||
msgbox LavaridgeTown_HerbShop_Text_HerbalMedicineWorksButMonWillDislike, MSGBOX_NPC
|
||||
|
||||
@ -22,9 +22,7 @@ LavaridgeTown_Mart_Pokemart:
|
||||
.2byte ITEM_REVIVE
|
||||
.2byte ITEM_SUPER_REPEL
|
||||
.2byte ITEM_X_SPEED
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
LavaridgeTown_Mart_EventScript_ExpertM::
|
||||
msgbox LavaridgeTown_Mart_Text_XSpeedFirstStrike, MSGBOX_NPC
|
||||
|
||||
@ -36,9 +36,7 @@ LilycoveCity_DepartmentStore_2F_Pokemart1:
|
||||
.2byte ITEM_ICE_HEAL
|
||||
.2byte ITEM_AWAKENING
|
||||
.2byte ITEM_FLUFFY_TAIL
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
LilycoveCity_DepartmentStore_2F_EventScript_ClerkRight::
|
||||
lock
|
||||
@ -62,9 +60,7 @@ LilycoveCity_DepartmentStore_2F_Pokemart2:
|
||||
.2byte ITEM_MAX_REPEL
|
||||
.2byte ITEM_WAVE_MAIL
|
||||
.2byte ITEM_MECH_MAIL
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
LilycoveCity_DepartmentStore_2F_Text_LearnToUseItemsProperly:
|
||||
.string "Learn to use items properly.\n"
|
||||
|
||||
@ -19,9 +19,7 @@ LilycoveCity_DepartmentStore_3F_Pokemart_Vitamins:
|
||||
.2byte ITEM_ZINC
|
||||
.2byte ITEM_CARBOS
|
||||
.2byte ITEM_HP_UP
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
LilycoveCity_DepartmentStore_3F_EventScript_ClerkRight::
|
||||
lock
|
||||
@ -42,9 +40,7 @@ LilycoveCity_DepartmentStore_3F_Pokemart_StatBoosters:
|
||||
.2byte ITEM_DIRE_HIT
|
||||
.2byte ITEM_GUARD_SPEC
|
||||
.2byte ITEM_X_ACCURACY
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
LilycoveCity_DepartmentStore_3F_EventScript_TriathleteM::
|
||||
msgbox LilycoveCity_DepartmentStore_3F_Text_ItemsBestForTougheningPokemon, MSGBOX_NPC
|
||||
|
||||
@ -29,9 +29,7 @@ LilycoveCity_DepartmentStore_4F_Pokemart_AttackTMs:
|
||||
.2byte ITEM_TM_THUNDER
|
||||
.2byte ITEM_TM_BLIZZARD
|
||||
.2byte ITEM_TM_HYPER_BEAM
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
LilycoveCity_DepartmentStore_4F_EventScript_ClerkRight::
|
||||
lock
|
||||
@ -49,9 +47,7 @@ LilycoveCity_DepartmentStore_4F_Pokemart_DefenseTMs:
|
||||
.2byte ITEM_TM_SAFEGUARD
|
||||
.2byte ITEM_TM_REFLECT
|
||||
.2byte ITEM_TM_LIGHT_SCREEN
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
LilycoveCity_DepartmentStore_4F_Text_AttackOrDefenseTM:
|
||||
.string "Hmm…\p"
|
||||
|
||||
@ -41,9 +41,7 @@ LilycoveCity_DepartmentStore_5F_Pokemart_Dolls:
|
||||
.2byte DECOR_SKITTY_DOLL
|
||||
.2byte DECOR_SWABLU_DOLL
|
||||
.2byte DECOR_GULPIN_DOLL
|
||||
.2byte DECOR_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
LilycoveCity_DepartmentStore_5F_EventScript_ClerkMidLeft::
|
||||
lock
|
||||
@ -66,9 +64,7 @@ LilycoveCity_DepartmentStore_5F_Pokemart_Cushions:
|
||||
.2byte DECOR_GRASS_CUSHION
|
||||
.2byte DECOR_FIRE_CUSHION
|
||||
.2byte DECOR_WATER_CUSHION
|
||||
.2byte DECOR_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
LilycoveCity_DepartmentStore_5F_EventScript_ClerkMidRight::
|
||||
lock
|
||||
@ -91,9 +87,7 @@ LilycoveCity_DepartmentStore_5F_Pokemart_Posters:
|
||||
.2byte DECOR_LONG_POSTER
|
||||
.2byte DECOR_SEA_POSTER
|
||||
.2byte DECOR_SKY_POSTER
|
||||
.2byte DECOR_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
LilycoveCity_DepartmentStore_5F_EventScript_ClerkFarRight::
|
||||
lock
|
||||
@ -117,9 +111,7 @@ LilycoveCity_DepartmentStore_5F_Pokemart_Mats:
|
||||
.2byte DECOR_GLITTER_MAT
|
||||
.2byte DECOR_JUMP_MAT
|
||||
.2byte DECOR_SPIN_MAT
|
||||
.2byte DECOR_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
LilycoveCity_DepartmentStore_5F_EventScript_PokefanF::
|
||||
msgbox LilycoveCity_DepartmentStore_5F_Text_PlaceFullOfCuteDolls, MSGBOX_NPC
|
||||
|
||||
@ -25,9 +25,7 @@ MauvilleCity_Mart_Pokemart:
|
||||
.2byte ITEM_GUARD_SPEC
|
||||
.2byte ITEM_DIRE_HIT
|
||||
.2byte ITEM_X_ACCURACY
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
MauvilleCity_Mart_EventScript_ExpertM::
|
||||
msgbox MauvilleCity_Mart_Text_ItemsToTemporarilyElevateStats, MSGBOX_NPC
|
||||
|
||||
@ -22,9 +22,7 @@ MossdeepCity_Mart_Pokemart:
|
||||
.2byte ITEM_MAX_REPEL
|
||||
.2byte ITEM_X_ATTACK
|
||||
.2byte ITEM_X_DEFENSE
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
MossdeepCity_Mart_EventScript_Woman::
|
||||
msgbox MossdeepCity_Mart_Text_ReviveIsFantastic, MSGBOX_NPC
|
||||
|
||||
@ -111,6 +111,7 @@ MtChimney_EventScript_LavaCookieLady::
|
||||
msgbox MtChimney_Text_ThankYouDear, MSGBOX_DEFAULT
|
||||
checkitemspace ITEM_LAVA_COOKIE
|
||||
call_if_eq VAR_RESULT, TRUE, MtChimney_EventScript_RemoveMoney
|
||||
.if OW_SHOW_ITEM_DESCRIPTIONS == OW_ITEM_DESCRIPTIONS_OFF
|
||||
giveitem ITEM_LAVA_COOKIE
|
||||
goto_if_eq VAR_RESULT, FALSE, MtChimney_EventScript_BagIsFull
|
||||
hidemoneybox
|
||||
@ -122,6 +123,19 @@ MtChimney_EventScript_BagIsFull::
|
||||
hidemoneybox
|
||||
release
|
||||
end
|
||||
.else
|
||||
hidemoneybox
|
||||
giveitem ITEM_LAVA_COOKIE
|
||||
goto_if_eq VAR_RESULT, FALSE, MtChimney_EventScript_BagIsFull
|
||||
release
|
||||
end
|
||||
|
||||
MtChimney_EventScript_BagIsFull::
|
||||
msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT
|
||||
release
|
||||
end
|
||||
.endif @ OW_SHOW_ITEM_DESCRIPTIONS
|
||||
|
||||
|
||||
MtChimney_EventScript_RemoveMoney::
|
||||
removemoney 200
|
||||
|
||||
@ -18,9 +18,7 @@ OldaleTown_Mart_Pokemart_Basic:
|
||||
.2byte ITEM_ANTIDOTE
|
||||
.2byte ITEM_PARALYZE_HEAL
|
||||
.2byte ITEM_AWAKENING
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
OldaleTown_Mart_ExpandedItems::
|
||||
pokemart OldaleTown_Mart_Pokemart_Expanded
|
||||
@ -35,9 +33,7 @@ OldaleTown_Mart_Pokemart_Expanded:
|
||||
.2byte ITEM_ANTIDOTE
|
||||
.2byte ITEM_PARALYZE_HEAL
|
||||
.2byte ITEM_AWAKENING
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
OldaleTown_Mart_EventScript_Woman::
|
||||
lock
|
||||
|
||||
@ -25,9 +25,7 @@ PetalburgCity_Mart_Pokemart_Basic:
|
||||
.2byte ITEM_X_ATTACK
|
||||
.2byte ITEM_X_DEFENSE
|
||||
.2byte ITEM_ORANGE_MAIL
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
PetalburgCity_Mart_EventScript_ExpandedItems::
|
||||
pokemart PetalburgCity_Mart_Pokemart_Expanded
|
||||
@ -50,9 +48,7 @@ PetalburgCity_Mart_Pokemart_Expanded:
|
||||
.2byte ITEM_X_ATTACK
|
||||
.2byte ITEM_X_DEFENSE
|
||||
.2byte ITEM_ORANGE_MAIL
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
PetalburgCity_Mart_EventScript_Woman::
|
||||
msgbox PetalburgCity_Mart_Text_WeakWillGrowStronger, MSGBOX_NPC
|
||||
|
||||
@ -59,9 +59,7 @@ Route104_PrettyPetalFlowerShop_Pokemart_Plants:
|
||||
.2byte DECOR_COLORFUL_PLANT
|
||||
.2byte DECOR_BIG_PLANT
|
||||
.2byte DECOR_GORGEOUS_PLANT
|
||||
.2byte DECOR_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
Route104_PrettyPetalFlowerShop_EventScript_WailmerPailGirl::
|
||||
lock
|
||||
|
||||
@ -52,8 +52,13 @@ Route109_SeashoreHouse_EventScript_BuySodaPop::
|
||||
msgbox Route109_SeashoreHouse_Text_HereYouGo, MSGBOX_DEFAULT
|
||||
removemoney 300
|
||||
updatemoneybox
|
||||
.if OW_SHOW_ITEM_DESCRIPTIONS != OW_ITEM_DESCRIPTIONS_OFF
|
||||
hidemoneybox
|
||||
giveitem ITEM_SODA_POP
|
||||
.else
|
||||
giveitem ITEM_SODA_POP
|
||||
hidemoneybox
|
||||
.endif
|
||||
release
|
||||
end
|
||||
|
||||
|
||||
@ -518,28 +518,28 @@
|
||||
"x": 15,
|
||||
"y": 16,
|
||||
"elevation": 0,
|
||||
"dest_map": "MAP_ROUTE110_SEASIDE_CYCLING_ROAD_SOUTH_ENTRANCE",
|
||||
"dest_map": "MAP_ROUTE110_SEASIDE_CYCLING_ROAD_NORTH_ENTRANCE",
|
||||
"dest_warp_id": "0"
|
||||
},
|
||||
{
|
||||
"x": 18,
|
||||
"y": 16,
|
||||
"elevation": 0,
|
||||
"dest_map": "MAP_ROUTE110_SEASIDE_CYCLING_ROAD_SOUTH_ENTRANCE",
|
||||
"dest_map": "MAP_ROUTE110_SEASIDE_CYCLING_ROAD_NORTH_ENTRANCE",
|
||||
"dest_warp_id": "2"
|
||||
},
|
||||
{
|
||||
"x": 16,
|
||||
"y": 88,
|
||||
"elevation": 0,
|
||||
"dest_map": "MAP_ROUTE110_SEASIDE_CYCLING_ROAD_NORTH_ENTRANCE",
|
||||
"dest_map": "MAP_ROUTE110_SEASIDE_CYCLING_ROAD_SOUTH_ENTRANCE",
|
||||
"dest_warp_id": "0"
|
||||
},
|
||||
{
|
||||
"x": 19,
|
||||
"y": 88,
|
||||
"elevation": 0,
|
||||
"dest_map": "MAP_ROUTE110_SEASIDE_CYCLING_ROAD_NORTH_ENTRANCE",
|
||||
"dest_map": "MAP_ROUTE110_SEASIDE_CYCLING_ROAD_SOUTH_ENTRANCE",
|
||||
"dest_warp_id": "2"
|
||||
}
|
||||
],
|
||||
|
||||
@ -34,28 +34,28 @@
|
||||
"y": 5,
|
||||
"elevation": 0,
|
||||
"dest_map": "MAP_ROUTE110",
|
||||
"dest_warp_id": "4"
|
||||
"dest_warp_id": "2"
|
||||
},
|
||||
{
|
||||
"x": 2,
|
||||
"y": 5,
|
||||
"elevation": 0,
|
||||
"dest_map": "MAP_ROUTE110",
|
||||
"dest_warp_id": "4"
|
||||
"dest_warp_id": "2"
|
||||
},
|
||||
{
|
||||
"x": 12,
|
||||
"y": 5,
|
||||
"elevation": 0,
|
||||
"dest_map": "MAP_ROUTE110",
|
||||
"dest_warp_id": "5"
|
||||
"dest_warp_id": "3"
|
||||
},
|
||||
{
|
||||
"x": 13,
|
||||
"y": 5,
|
||||
"elevation": 0,
|
||||
"dest_map": "MAP_ROUTE110",
|
||||
"dest_warp_id": "5"
|
||||
"dest_warp_id": "3"
|
||||
}
|
||||
],
|
||||
"coord_events": [
|
||||
|
||||
@ -1,6 +1,16 @@
|
||||
Route110_SeasideCyclingRoadNorthEntrance_MapScripts::
|
||||
map_script MAP_SCRIPT_ON_TRANSITION, Route110_SeasideCyclingRoadNorthEntrance_OnTransition
|
||||
.byte 0
|
||||
|
||||
Route110_SeasideCyclingRoadNorthEntrance_OnTransition:
|
||||
call_if_eq VAR_CYCLING_CHALLENGE_STATE, 3, Route110_SeasideCyclingRoadNorthEntrance_EventScript_RestartChallenge
|
||||
call_if_eq VAR_CYCLING_CHALLENGE_STATE, 2, Route110_SeasideCyclingRoadNorthEntrance_EventScript_RestartChallenge
|
||||
end
|
||||
|
||||
Route110_SeasideCyclingRoadNorthEntrance_EventScript_RestartChallenge::
|
||||
setvar VAR_CYCLING_CHALLENGE_STATE, 1
|
||||
return
|
||||
|
||||
Route110_SeasideCyclingRoadNorthEntrance_EventScript_Clerk::
|
||||
lock
|
||||
faceplayer
|
||||
@ -11,12 +21,17 @@ Route110_SeasideCyclingRoadNorthEntrance_EventScript_Clerk::
|
||||
Route110_SeasideCyclingRoadNorthEntrance_EventScript_BikeCheck::
|
||||
lockall
|
||||
specialvar VAR_RESULT, GetPlayerAvatarBike
|
||||
call_if_eq VAR_RESULT, 2, Route110_SeasideCyclingRoadNorthEntrance_EventScript_OnMachBike
|
||||
goto_if_eq VAR_RESULT, 0, Route110_SeasideCyclingRoadNorthEntrance_EventScript_NoBike
|
||||
setflag FLAG_SYS_CYCLING_ROAD
|
||||
setvar VAR_TEMP_1, 1
|
||||
releaseall
|
||||
end
|
||||
|
||||
Route110_SeasideCyclingRoadNorthEntrance_EventScript_OnMachBike::
|
||||
setvar VAR_CYCLING_CHALLENGE_STATE, 1
|
||||
return
|
||||
|
||||
Route110_SeasideCyclingRoadNorthEntrance_EventScript_NoBike::
|
||||
msgbox Route110_SeasideCyclingRoadNorthEntrance_Text_TooDangerousToWalk, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
@ -31,6 +46,7 @@ Route110_SeasideCyclingRoadNorthEntrance_Movement_PushPlayerBackFromCounter:
|
||||
|
||||
Route110_SeasideCyclingRoadNorthEntrance_EventScript_ClearCyclingRoad::
|
||||
lockall
|
||||
setvar VAR_CYCLING_CHALLENGE_STATE, 0
|
||||
clearflag FLAG_SYS_CYCLING_ROAD
|
||||
setvar VAR_TEMP_1, 0
|
||||
releaseall
|
||||
|
||||
@ -34,28 +34,28 @@
|
||||
"y": 5,
|
||||
"elevation": 0,
|
||||
"dest_map": "MAP_ROUTE110",
|
||||
"dest_warp_id": "2"
|
||||
"dest_warp_id": "4"
|
||||
},
|
||||
{
|
||||
"x": 2,
|
||||
"y": 5,
|
||||
"elevation": 0,
|
||||
"dest_map": "MAP_ROUTE110",
|
||||
"dest_warp_id": "2"
|
||||
"dest_warp_id": "4"
|
||||
},
|
||||
{
|
||||
"x": 12,
|
||||
"y": 5,
|
||||
"elevation": 0,
|
||||
"dest_map": "MAP_ROUTE110",
|
||||
"dest_warp_id": "3"
|
||||
"dest_warp_id": "5"
|
||||
},
|
||||
{
|
||||
"x": 13,
|
||||
"y": 5,
|
||||
"elevation": 0,
|
||||
"dest_map": "MAP_ROUTE110",
|
||||
"dest_warp_id": "3"
|
||||
"dest_warp_id": "5"
|
||||
}
|
||||
],
|
||||
"coord_events": [
|
||||
|
||||
@ -1,16 +1,6 @@
|
||||
Route110_SeasideCyclingRoadSouthEntrance_MapScripts::
|
||||
map_script MAP_SCRIPT_ON_TRANSITION, Route110_SeasideCyclingRoadSouthEntrance_OnTransition
|
||||
.byte 0
|
||||
|
||||
Route110_SeasideCyclingRoadSouthEntrance_OnTransition:
|
||||
call_if_eq VAR_CYCLING_CHALLENGE_STATE, 3, Route110_SeasideCyclingRoadSouthEntrance_EventScript_RestartChallenge
|
||||
call_if_eq VAR_CYCLING_CHALLENGE_STATE, 2, Route110_SeasideCyclingRoadSouthEntrance_EventScript_RestartChallenge
|
||||
end
|
||||
|
||||
Route110_SeasideCyclingRoadSouthEntrance_EventScript_RestartChallenge::
|
||||
setvar VAR_CYCLING_CHALLENGE_STATE, 1
|
||||
return
|
||||
|
||||
Route110_SeasideCyclingRoadSouthEntrance_EventScript_Clerk::
|
||||
lock
|
||||
faceplayer
|
||||
@ -21,17 +11,12 @@ Route110_SeasideCyclingRoadSouthEntrance_EventScript_Clerk::
|
||||
Route110_SeasideCyclingRoadSouthEntrance_EventScript_BikeCheck::
|
||||
lockall
|
||||
specialvar VAR_RESULT, GetPlayerAvatarBike
|
||||
call_if_eq VAR_RESULT, 2, Route110_SeasideCyclingRoadSouthEntrance_EventScript_OnMachBike
|
||||
goto_if_eq VAR_RESULT, 0, Route110_SeasideCyclingRoadSouthEntrance_EventScript_NoBike
|
||||
setflag FLAG_SYS_CYCLING_ROAD
|
||||
setvar VAR_TEMP_1, 1
|
||||
releaseall
|
||||
end
|
||||
|
||||
Route110_SeasideCyclingRoadSouthEntrance_EventScript_OnMachBike::
|
||||
setvar VAR_CYCLING_CHALLENGE_STATE, 1
|
||||
return
|
||||
|
||||
Route110_SeasideCyclingRoadSouthEntrance_EventScript_NoBike::
|
||||
msgbox Route110_SeasideCyclingRoadSouthEntrance_Text_TooDangerousToWalk, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
@ -46,7 +31,6 @@ Route110_SeasideCyclingRoadSouthEntrance_Movement_PushPlayerBackFromCounter:
|
||||
|
||||
Route110_SeasideCyclingRoadSouthEntrance_EventScript_ClearCyclingRoad::
|
||||
lockall
|
||||
setvar VAR_CYCLING_CHALLENGE_STATE, 0
|
||||
clearflag FLAG_SYS_CYCLING_ROAD
|
||||
setvar VAR_TEMP_1, 0
|
||||
releaseall
|
||||
|
||||
@ -28,9 +28,7 @@ RustboroCity_Mart_Pokemart_Basic:
|
||||
.2byte ITEM_X_SPEED
|
||||
.2byte ITEM_X_ATTACK
|
||||
.2byte ITEM_X_DEFENSE
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
RustboroCity_Mart_EventScript_PokemartExpanded::
|
||||
pokemart RustboroCity_Mart_Pokemart_Expanded
|
||||
@ -52,9 +50,7 @@ RustboroCity_Mart_Pokemart_Expanded:
|
||||
.2byte ITEM_X_SPEED
|
||||
.2byte ITEM_X_ATTACK
|
||||
.2byte ITEM_X_DEFENSE
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
RustboroCity_Mart_EventScript_PokefanF::
|
||||
msgbox RustboroCity_Mart_Text_BuyingHealsInCaseOfShroomish, MSGBOX_NPC
|
||||
|
||||
@ -154,9 +154,7 @@ SlateportCity_Pokemart_EnergyGuru:
|
||||
.2byte ITEM_ZINC
|
||||
.2byte ITEM_CALCIUM
|
||||
.2byte ITEM_HP_UP
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
SlateportCity_EventScript_EffortRibbonWoman::
|
||||
lock
|
||||
@ -514,9 +512,7 @@ SlateportCity_PokemartDecor_Dolls:
|
||||
.2byte DECOR_AZURILL_DOLL
|
||||
.2byte DECOR_MARILL_DOLL
|
||||
.2byte DECOR_SKITTY_DOLL
|
||||
.2byte DECOR_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
SlateportCity_EventScript_ComeBackWithSecretPower::
|
||||
msgbox gText_ComeBackWithSecretPower, MSGBOX_DEFAULT
|
||||
@ -550,9 +546,7 @@ SlateportCity_PokemartDecor:
|
||||
.2byte DECOR_A_NOTE_MAT
|
||||
.2byte DECOR_B_NOTE_MAT
|
||||
.2byte DECOR_C_HIGH_NOTE_MAT
|
||||
.2byte DECOR_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
SlateportCity_EventScript_PowerTMClerk::
|
||||
lock
|
||||
@ -568,9 +562,7 @@ SlateportCity_EventScript_PowerTMClerk::
|
||||
SlateportCity_Pokemart_PowerTMs:
|
||||
.2byte ITEM_TM_HIDDEN_POWER
|
||||
.2byte ITEM_TM_SECRET_POWER
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
@ Scene with Capt Sterns interview and Team Aqua announcing plans to steal Submarine
|
||||
SlateportCity_EventScript_CaptStern::
|
||||
|
||||
@ -22,9 +22,7 @@ SlateportCity_Mart_Pokemart:
|
||||
.2byte ITEM_ESCAPE_ROPE
|
||||
.2byte ITEM_REPEL
|
||||
.2byte ITEM_HARBOR_MAIL
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
SlateportCity_Mart_EventScript_BlackBelt::
|
||||
msgbox SlateportCity_Mart_Text_SomeItemsOnlyAtMart, MSGBOX_NPC
|
||||
|
||||
@ -22,9 +22,7 @@ SootopolisCity_Mart_Pokemart:
|
||||
.2byte ITEM_X_ATTACK
|
||||
.2byte ITEM_X_DEFENSE
|
||||
.2byte ITEM_SHADOW_MAIL
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
SootopolisCity_Mart_EventScript_FatMan::
|
||||
lock
|
||||
|
||||
@ -267,9 +267,7 @@ TrainerHill_Entrance_Pokemart_Basic:
|
||||
.2byte ITEM_DIRE_HIT
|
||||
.2byte ITEM_GUARD_SPEC
|
||||
.2byte ITEM_X_ACCURACY
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
TrainerHill_Entrance_EventScript_ExpandedPokemart::
|
||||
pokemart TrainerHill_Entrance_Pokemart_Expanded
|
||||
@ -291,9 +289,7 @@ TrainerHill_Entrance_Pokemart_Expanded:
|
||||
.2byte ITEM_DIRE_HIT
|
||||
.2byte ITEM_GUARD_SPEC
|
||||
.2byte ITEM_X_ACCURACY
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
TrainerHill_Entrance_Text_StillGettingReady:
|
||||
.string "This is the TRAINER HILL where\n"
|
||||
|
||||
@ -24,9 +24,7 @@ VerdanturfTown_Mart_Pokemart:
|
||||
.2byte ITEM_REPEL
|
||||
.2byte ITEM_X_SP_ATK
|
||||
.2byte ITEM_FLUFFY_TAIL
|
||||
.2byte ITEM_NONE
|
||||
release
|
||||
end
|
||||
pokemartlistend
|
||||
|
||||
VerdanturfTown_Mart_EventScript_Boy::
|
||||
msgbox VerdanturfTown_Mart_Text_XSpecialIsCrucial, MSGBOX_NPC
|
||||
|
||||
@ -604,8 +604,8 @@
|
||||
"Route110_TrickHousePuzzle6",
|
||||
"Route110_TrickHousePuzzle7",
|
||||
"Route110_TrickHousePuzzle8",
|
||||
"Route110_SeasideCyclingRoadNorthEntrance",
|
||||
"Route110_SeasideCyclingRoadSouthEntrance"
|
||||
"Route110_SeasideCyclingRoadSouthEntrance",
|
||||
"Route110_SeasideCyclingRoadNorthEntrance"
|
||||
],
|
||||
"gMapGroup_IndoorRoute113": [
|
||||
"Route113_GlassWorkshop"
|
||||
|
||||
@ -176,6 +176,8 @@ BerryTree_EventScript_PickBerry::
|
||||
special IncrementDailyPickedBerries
|
||||
special ObjectEventInteractionRemoveBerryTree
|
||||
message BerryTree_Text_PickedTheBerry
|
||||
delay 10
|
||||
showberrydescription
|
||||
playfanfare MUS_OBTAIN_BERRY
|
||||
waitmessage
|
||||
waitfanfare
|
||||
@ -183,6 +185,7 @@ BerryTree_EventScript_PickBerry::
|
||||
message BerryTree_Text_PutAwayBerry
|
||||
waitmessage
|
||||
waitbuttonpress
|
||||
hideitemdescription
|
||||
release
|
||||
end
|
||||
|
||||
|
||||
@ -1258,7 +1258,11 @@ EventScript_CloseMossdeepGameCornerBarrier::
|
||||
|
||||
CableClub_OnResume:
|
||||
special InitUnionRoom
|
||||
.if OW_FLAG_MOVE_UNION_ROOM_CHECK != 0
|
||||
return
|
||||
.else
|
||||
end
|
||||
.endif
|
||||
|
||||
MossdeepCity_GameCorner_1F_EventScript_InfoMan2::
|
||||
lock
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
.if DEBUG_OVERWORLD_MENU == TRUE
|
||||
Debug_MessageEnd:
|
||||
waitmessage
|
||||
waitbuttonpress
|
||||
@ -449,4 +448,134 @@ Debug_EventScript_EWRAMCounters_Text::
|
||||
.string "Follower Steps: {STR_VAR_1}.\n"
|
||||
.string "Fishing Chain: {STR_VAR_2}.$"
|
||||
|
||||
.endif
|
||||
Debug_EventScript_FontTest_Text_1::
|
||||
.string "{FONT_SMALL_NARROWER}" @ Edit this to test your font
|
||||
.string "Angel Adept Blind Bodice Clique\n"
|
||||
.string "Coast Dunce Docile Enact Eosin\l"
|
||||
.string "Furlong Focal Gnome Gondola Human\l"
|
||||
.string "Hoist Inlet Iodine Justin Jocose\l"
|
||||
.string "Knoll Koala Linden Loads Milliner\l"
|
||||
.string "Modal Number Nodule Onset Oddball\l"
|
||||
.string "Pneumo Poncho Quanta Qophs Rhone\l"
|
||||
.string "Roman Snout Sodium Tundra Tocsin\l"
|
||||
.string "Uncle Udder Vulcan Vocal Whale\l"
|
||||
.string "Woman Xmas Xenon Yunnan Young\l"
|
||||
.string "Zloty Zodiac.$"
|
||||
|
||||
Debug_EventScript_FontTest_Text_2::
|
||||
.string "{FONT_SMALL_NARROWER}" @ Edit this to test your font
|
||||
.string "Angel angel adept for the nuance loads\n"
|
||||
.string "of the arena cocoa and quaalude. Blind\l"
|
||||
.string "blind bodice for the submit oboe of the\l"
|
||||
.string "club snob and abbot. Clique clique\l"
|
||||
.string "coast for the pouch loco of the franc\l"
|
||||
.string "assoc and accede. Dunce dunce docile\l"
|
||||
.string "for the loudness mastodon of the\l"
|
||||
.string "loud statehood and huddle.$"
|
||||
|
||||
Debug_EventScript_FontTest_Text_3::
|
||||
.string "{FONT_SMALL_NARROWER}" @ Edit this to test your font
|
||||
.string "Enact enact eosin for the quench coed\n"
|
||||
.string "of the pique canoe and bleep. Furlong\l"
|
||||
.string "furlong focal for the genuflect\l"
|
||||
.string "profound of the motif aloof and offers.\l"
|
||||
.string "Gnome gnome gondola for the impugn\l"
|
||||
.string "logos of the unplug analog and smuggle.\l"
|
||||
.string "Human human hoist for the buddhist\l"
|
||||
.string "alcohol of the riyadh caliph and\l"
|
||||
.string "bathhouse.$"
|
||||
|
||||
Debug_EventScript_FontTest_Text_4::
|
||||
.string "{FONT_SMALL_NARROWER}" @ Edit this to test your font
|
||||
.string "Inlet inlet iodine for the quince\n"
|
||||
.string "champion of the ennui scampi and shiite.\l"
|
||||
.string "Justin justin jocose for the djibouti\l"
|
||||
.string "sojourn of the oranj raj and hajjis.\l"
|
||||
.string "Knoll knoll koala for the banknote\l"
|
||||
.string "lookout of the dybbuk outlook and\l"
|
||||
.string "trekked. Linden linden loads for the\l"
|
||||
.string "ulna monolog of the consul menthol and\l"
|
||||
.string "shallot.$"
|
||||
|
||||
Debug_EventScript_FontTest_Text_5::
|
||||
.string "{FONT_SMALL_NARROWER}" @ Edit this to test your font
|
||||
.string "Milliner milliner modal for the alumna\n"
|
||||
.string "solomon of the album custom and summon.\l"
|
||||
.string "Number number nodule for the unmade\l"
|
||||
.string "economic of the shotgun bison and\l"
|
||||
.string "tunnel. Onset onset oddball for the\l"
|
||||
.string "abandon podium of the antiquo tempo\l"
|
||||
.string "and moonlit. Pneumo pneumo poncho for\l"
|
||||
.string "the dauphin opossum of the holdup\l"
|
||||
.string "bishop and supplies.$"
|
||||
|
||||
Debug_EventScript_FontTest_Text_6::
|
||||
.string "{FONT_SMALL_NARROWER}" @ Edit this to test your font
|
||||
.string "Quanta quanta qophs for the inquest\n"
|
||||
.string "sheqel of the cinq coq and suqqu. Rhone\l"
|
||||
.string "rhone roman for the burnt porous of the\l"
|
||||
.string "lemur clamor and carrot. Snout snout\l"
|
||||
.string "sodium for the ensnare bosom of the\l"
|
||||
.string "genus pathos and missing. Tundra\l"
|
||||
.string "tundra tocsin for the nutmeg isotope\l"
|
||||
.string "of the peasant ingot and ottoman.$"
|
||||
|
||||
Debug_EventScript_FontTest_Text_7::
|
||||
.string "{FONT_SMALL_NARROWER}" @ Edit this to test your font
|
||||
.string "Uncle uncle udder for the dunes cloud\n"
|
||||
.string "of the hindu thou and continuum. Vulcan\l"
|
||||
.string "vulcan vocal for the alluvial ovoid of\l"
|
||||
.string "the yugoslav chekhov and revved. Whale\l"
|
||||
.string "whale woman for the meanwhile blowout\l"
|
||||
.string "of the forepaw meadow and glowworm.\l"
|
||||
.string "Xmas xmas xenon for the bauxite\l"
|
||||
.string "doxology of the tableaux equinox and\l"
|
||||
.string "exxon.$"
|
||||
|
||||
Debug_EventScript_FontTest_Text_8::
|
||||
.string "{FONT_SMALL_NARROWER}" @ Edit this to test your font
|
||||
.string "Yunnan yunnan young for the dynamo\n"
|
||||
.string "coyote of the obloquy employ and\l"
|
||||
.string "sayyid. Zloty zloty zodiac for the gizmo\l"
|
||||
.string "ozone of the franz laissez and buzzing.$"
|
||||
|
||||
|
||||
Debug_EventScript_FontTest_Text_9:: @ Special thanks to Nintendo for this nice pangram to test other glyphs
|
||||
.string "{FONT_SMALL_NARROWER}" @ Edit this to test your font
|
||||
.string "42 × 138 = 5796.\n"
|
||||
.string "Mr Jock, TV quiz PhD: bags 20% fewer\l"
|
||||
.string "lynx at a café; voilà, they're “worth”\l"
|
||||
.string "♂1/♀1 = ¥1. That's 10 + 9 - 8 = 11\l"
|
||||
.string "Nintendo GBA can connect to a Nintendo\l"
|
||||
.string "GameCube console! He claimed-though I don't\l"
|
||||
.string "believe him-to have done so in an eyes-shut\l"
|
||||
.string "state…?$"
|
||||
|
||||
Debug_PrintFontTest::
|
||||
msgbox Debug_EventScript_FontTest_Text_1, MSGBOX_DEFAULT
|
||||
msgbox Debug_EventScript_FontTest_Text_2, MSGBOX_DEFAULT
|
||||
msgbox Debug_EventScript_FontTest_Text_3, MSGBOX_DEFAULT
|
||||
msgbox Debug_EventScript_FontTest_Text_4, MSGBOX_DEFAULT
|
||||
msgbox Debug_EventScript_FontTest_Text_5, MSGBOX_DEFAULT
|
||||
msgbox Debug_EventScript_FontTest_Text_6, MSGBOX_DEFAULT
|
||||
msgbox Debug_EventScript_FontTest_Text_7, MSGBOX_DEFAULT
|
||||
msgbox Debug_EventScript_FontTest_Text_8, MSGBOX_DEFAULT
|
||||
msgbox Debug_EventScript_FontTest_Text_9, MSGBOX_DEFAULT
|
||||
releaseall
|
||||
end
|
||||
|
||||
Debug_EventScript_FontTest::
|
||||
lockall
|
||||
goto Debug_PrintFontTest
|
||||
@ goto_if_eq VAR_RESULT, 0, Debug_NoPokemon
|
||||
@ dynmultipush Debug_EventScript_InflictStatus1_Text_Single, 0
|
||||
@ dynmultipush Debug_EventScript_InflictStatus1_Text_PartyWide, 1
|
||||
@ dynmultipush Debug_EventScript_InflictStatus1_Text_Close, 2
|
||||
@ dynmultistack 0, 0, FALSE, 3 FALSE, 0, NULL
|
||||
@ switch VAR_RESULT
|
||||
@ case 0, Debug_EventScript_InflictStatus1_Single
|
||||
@ case 1, Debug_EventScript_InflictStatus1_Party
|
||||
@ case 2, Debug_EventScript_InflictStatus1_Close
|
||||
@Debug_EventScript_InflictStatus1_Close:
|
||||
@ releaseall
|
||||
@ end
|
||||
|
||||
@ -368,6 +368,35 @@ EventScript_EndSurface::
|
||||
releaseall
|
||||
end
|
||||
|
||||
EventScript_DigCommon:
|
||||
isfollowerfieldmoveuser VAR_0x8004
|
||||
setfieldeffectargument 3, VAR_0x8004 @ skip pose if true
|
||||
dofieldeffect FLDEFF_USE_DIG
|
||||
waitstate
|
||||
EventScript_DigSealedChamber:: @ fallthrough
|
||||
setflag FLAG_SAFE_FOLLOWER_MOVEMENT
|
||||
call_if_eq VAR_0x8004, TRUE, EventScript_FollowerFieldMove
|
||||
callnative DoBrailleDigEffect
|
||||
releaseall
|
||||
end
|
||||
|
||||
@ Use Dig from party menu
|
||||
EventScript_UseDig::
|
||||
lockall
|
||||
goto EventScript_DigCommon
|
||||
|
||||
|
||||
EventScript_CutGrassCommon:
|
||||
isfollowerfieldmoveuser VAR_0x8004
|
||||
setfieldeffectargument 3, VAR_0x8004 @ skip pose if true
|
||||
dofieldeffect FLDEFF_USE_CUT_ON_GRASS
|
||||
waitstate
|
||||
|
||||
@ Use Cut grass from party menu
|
||||
EventScript_UseCutGrass::
|
||||
lockall
|
||||
goto EventScript_CutGrassCommon
|
||||
|
||||
Text_CantDive:
|
||||
.string "The sea is deep here. A POKéMON\n"
|
||||
.string "may be able to go underwater.$"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user