Merge branch 'master' into doc-factscreen
8
.gitattributes
vendored
@@ -10,6 +10,14 @@ Makefile text eol=lf
|
||||
*.inc text eol=lf
|
||||
*.sha1 text eol=lf
|
||||
*.json text eol=lf
|
||||
*.sed text eol=lf
|
||||
*.cpp text eol=lf
|
||||
.gitattributes text eol=lf
|
||||
.gitignore text eol=lf
|
||||
*.hpp text eol=lf
|
||||
*.md text eol=lf
|
||||
*.ps1 text eol=crlf
|
||||
*.yml text eol=lf
|
||||
|
||||
*.png binary
|
||||
*.bin binary
|
||||
|
||||
8
.github/pull_request_template.md
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<!--- Provide a general summary of your changes in the Title above -->
|
||||
|
||||
## Description
|
||||
<!--- Describe your changes in detail -->
|
||||
|
||||
## **Discord contact info**
|
||||
<!--- formatted as name#numbers, e.g. PikalaxALT#5823 -->
|
||||
<!--- Contributors must join https://discord.gg/d5dubZ3 -->
|
||||
1
.gitignore
vendored
@@ -33,3 +33,4 @@ porymap.project.cfg
|
||||
.vscode/
|
||||
*.a
|
||||
.fuse_hidden*
|
||||
*.sna
|
||||
|
||||
58
INSTALL.md
@@ -1,23 +1,22 @@
|
||||
# Prerequisites
|
||||
|
||||
| Linux | macOS | Windows 10 (build 18917+) | Windows 10 (1709+) | Windows Vista, 7, 8, 8.1, and 10 (1507, 1511, 1607, and 1703)
|
||||
| ----- | ----- | ------------------------- | ------------------ | ---------------------------------------------------------
|
||||
| none | [Xcode Command Line Tools package][xcode] | [Windows Subsystem for Linux 2][wsl2] | [Windows Subsystem for Linux][wsl] | MSYS2 (see below)
|
||||
| Linux | macOS | Windows 10
|
||||
| - | - | -
|
||||
| none | [Xcode Command Line Tools Package][xcode] | [Windows Terminal][terminal] and [Windows Subsystem for Linux (WSL)][wsl]
|
||||
|
||||
[xcode]: https://developer.apple.com/library/archive/technotes/tn2339/_index.html#//apple_ref/doc/uid/DTS40014588-CH1-DOWNLOADING_COMMAND_LINE_TOOLS_IS_NOT_AVAILABLE_IN_XCODE_FOR_MACOS_10_9__HOW_CAN_I_INSTALL_THEM_ON_MY_MACHINE_
|
||||
[wsl2]: https://docs.microsoft.com/windows/wsl/wsl2-install
|
||||
[xcode]: https://developer.apple.com/library/archive/technotes/tn2339/_index.html
|
||||
[terminal]: https://docs.microsoft.com/windows/terminal/get-started
|
||||
[wsl]: https://docs.microsoft.com/windows/wsl/install-win10
|
||||
|
||||
The [prerelease version of the Linux subsystem](https://docs.microsoft.com/windows/wsl/install-legacy) available in the 1607 and 1703 releases of Windows 10 is obsolete so consider uninstalling it.
|
||||
Independently from the specific OS, make sure that the `gcc`, `g++`, `make`, `git`, and `libpng-dev` packages or their equivalents are installed and accessible to the development tools that are used by the project (this means that, for example, on Windows, the packages have to be installed in the WSL environment). The package names and installation methods may vary with each OS.
|
||||
|
||||
Make sure that the `build-essential`, `git`, and `libpng-dev` packages are installed. The `build-essential` package includes the `make`, `gcc-core`, and `g++` packages so they do not have to be obtained separately. MSYS2 does not include `libpng-dev` so it must be built from source.
|
||||
Install the devkitARM toolchain of devkitPro as per [the instructions on their wiki](https://devkitpro.org/wiki/devkitPro_pacman). On Windows, follow the Linux instructions inside WSL as any steps about the Windows installer do not apply.
|
||||
|
||||
Install the **devkitARM** toolchain of [devkitPro](https://devkitpro.org/wiki/Getting_Started) and add its environment variables. For Windows versions without the Linux subsystem, the devkitPro [graphical installer](https://github.com/devkitPro/installer/releases) includes a preconfigured MSYS2 environment, thus the steps below are not required.
|
||||
**Debian-based distro users:** This applies to Debian, Ubuntu, and similar distros, including in WSL. If necessary, install the `libarchive13`, `pkg-config`, and `gdebi-core` packages to be able to install devkitPro.
|
||||
|
||||
export DEVKITPRO=/opt/devkitPro
|
||||
echo "export DEVKITPRO=$DEVKITPRO" >> ~/.bashrc
|
||||
export DEVKITARM=$DEVKITPRO/devkitARM
|
||||
echo "export DEVKITARM=$DEVKITARM" >> ~/.bashrc
|
||||
**Windows 10 users:** WSL 2 is available in the 1903 release (build 18362) and later, therefore existing WSL 1 and [prerelease WSL](https://docs.microsoft.com/windows/wsl/install-legacy) users are recommended to update. Right-click the Start button or press `Win`+`X`, choose Run, and run `ms-settings:about` to determine the Windows version. Also check Windows Update to make sure your installation is up-to-date.
|
||||
|
||||
**Windows 7 and 8.1 users:** pret is no longer focusing on support in pokeemerald for [old versions of Windows](https://support.microsoft.com/help/13853) so consider upgrading to a current release of Windows 10 or try a third-party guide like [this one](https://www.pokecommunity.com/showthread.php?t=425246) instead.
|
||||
|
||||
|
||||
# Installation
|
||||
@@ -33,22 +32,27 @@ To set up the repository:
|
||||
|
||||
cd ../pokeemerald
|
||||
|
||||
To build **pokeemerald.gba** and confirm it matches the official ROM image:
|
||||
To build **pokeemerald.gba** for the first time and confirm it matches the official ROM image:
|
||||
|
||||
make compare
|
||||
|
||||
## Notes
|
||||
If an OK is returned, then the installation went smoothly.
|
||||
|
||||
* If the base tools are not found on macOS in new Terminal sessions after the first successful build, run `echo "if [ -f ~/.bashrc ]; then . ~/.bashrc; fi" >> ~/.bash_profile` once to prevent the issue from occurring again. Verify that the `devkitarm-rules` package is installed as well; if not, install it by running `sudo dkp-pacman -S devkitarm-rules`.
|
||||
**Windows users:** Consider adding exceptions for the `pokeemerald` and `agbcc` folders 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.
|
||||
|
||||
* If the repository was previously set up using Cygwin, delete the `.exe` files in the subfolders of the `tools` folder except for `agbcc` and try building again. [Learn the differences between MSYS2 and Cygwin.](https://github.com/msys2/msys2/wiki/How-does-MSYS2-differ-from-Cygwin)
|
||||
|
||||
# Guidance
|
||||
# Start
|
||||
|
||||
To build **pokeemerald.gba** with your changes:
|
||||
|
||||
make
|
||||
|
||||
**macOS users:** If the base tools are not found in new Terminal sessions after the first successful build, run `echo "if [ -f ~/.bashrc ]; then . ~/.bashrc; fi" >> ~/.bash_profile` once to prevent the issue from occurring again. Verify that the `devkitarm-rules` package is installed as well; if not, install it by running `sudo dkp-pacman -S devkitarm-rules`.
|
||||
|
||||
|
||||
# Building guidance
|
||||
|
||||
|
||||
## Parallel builds
|
||||
|
||||
See [the GNU docs](https://www.gnu.org/software/make/manual/html_node/Parallel.html) and [this Stack Exchange thread](https://unix.stackexchange.com/questions/208568) for more information.
|
||||
@@ -59,19 +63,22 @@ To speed up building, run:
|
||||
|
||||
`nproc` is not available on macOS. The alternative is `sysctl -n hw.ncpu` ([relevant Stack Overflow thread](https://stackoverflow.com/questions/1715580)).
|
||||
|
||||
## Building without dependency scanning
|
||||
|
||||
If only `.c` or `.s` files were changed, turn off the dependency scanning temporarily. Changes to any other files will be ignored and the build will either fail or not reflect those changes.
|
||||
## Debug info
|
||||
|
||||
make NODEP=1
|
||||
To build **pokeemerald.elf** with enhanced debug info:
|
||||
|
||||
## Building with devkitARM's C compiler
|
||||
make DINFO=1
|
||||
|
||||
|
||||
## devkitARM's C compiler
|
||||
|
||||
This project supports the `arm-none-eabi-gcc` compiler included with devkitARM r52. To build this target, simply run:
|
||||
|
||||
make modern
|
||||
|
||||
## Building with other toolchains
|
||||
|
||||
## Other toolchains
|
||||
|
||||
To build using a toolchain other than devkitARM, override the `TOOLCHAIN` environment variable with the path to your toolchain, which must contain the subdirectory `bin`.
|
||||
|
||||
@@ -83,8 +90,9 @@ The following is an example:
|
||||
|
||||
To compile the `modern` target with this toolchain, the subdirectories `lib`, `include`, and `arm-none-eabi` must also be present.
|
||||
|
||||
## Building with debug info
|
||||
|
||||
To build **pokeemerald.elf** with enhanced debug info, use the `DINFO` variable.
|
||||
# Useful additional tools
|
||||
|
||||
make DINFO=1
|
||||
* [porymap](https://github.com/huderlem/porymap) for viewing and editing maps
|
||||
* [poryscript](https://github.com/huderlem/poryscript) for scripting ([VS Code extension](https://marketplace.visualstudio.com/items?itemName=karathan.poryscript))
|
||||
* [Tilemap Studio](https://github.com/Rangi42/tilemap-studio) for viewing and editing tilemaps
|
||||
|
||||
40
Makefile
@@ -63,13 +63,13 @@ ASFLAGS := -mcpu=arm7tdmi --defsym MODERN=$(MODERN)
|
||||
|
||||
ifeq ($(MODERN),0)
|
||||
CC1 := tools/agbcc/bin/agbcc$(EXE)
|
||||
override CFLAGS += -mthumb-interwork -Wimplicit -Wparentheses -Werror -O2 -fhex-asm
|
||||
override CFLAGS += -mthumb-interwork -Wimplicit -Wparentheses -Werror -O2 -fhex-asm -g
|
||||
ROM := pokeemerald.gba
|
||||
OBJ_DIR := build/emerald
|
||||
LIBPATH := -L ../../tools/agbcc/lib
|
||||
else
|
||||
CC1 = $(shell $(CC) --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
|
||||
override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast -g
|
||||
ROM := pokeemerald_modern.gba
|
||||
OBJ_DIR := build/modern
|
||||
LIBPATH := -L "$(dir $(shell $(CC) -mthumb -print-file-name=libgcc.a))" -L "$(dir $(shell $(CC) -mthumb -print-file-name=libc.a))"
|
||||
@@ -136,6 +136,9 @@ C_ASM_OBJS := $(patsubst $(C_SUBDIR)/%.s,$(C_BUILDDIR)/%.o,$(C_ASM_SRCS))
|
||||
ASM_SRCS := $(wildcard $(ASM_SUBDIR)/*.s)
|
||||
ASM_OBJS := $(patsubst $(ASM_SUBDIR)/%.s,$(ASM_BUILDDIR)/%.o,$(ASM_SRCS))
|
||||
|
||||
# get all the data/*.s files EXCEPT the ones with specific rules
|
||||
REGULAR_DATA_ASM_SRCS := $(filter-out $(DATA_ASM_SUBDIR)/maps.s $(DATA_ASM_SUBDIR)/map_events.s, $(wildcard $(DATA_ASM_SUBDIR)/*.s))
|
||||
|
||||
DATA_ASM_SRCS := $(wildcard $(DATA_ASM_SUBDIR)/*.s)
|
||||
DATA_ASM_OBJS := $(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o,$(DATA_ASM_SRCS))
|
||||
|
||||
@@ -178,7 +181,7 @@ mostlyclean: tidy
|
||||
rm -f $(SAMPLE_SUBDIR)/*.bin
|
||||
rm -f $(CRY_SUBDIR)/*.bin
|
||||
rm -f $(MID_SUBDIR)/*.s
|
||||
find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -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 {} +
|
||||
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
|
||||
find $(DATA_ASM_SUBDIR)/maps \( -iname 'connections.inc' -o -iname 'events.inc' -o -iname 'header.inc' \) -exec rm {} +
|
||||
@@ -275,23 +278,32 @@ endif
|
||||
$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.s $$(c_asm_dep)
|
||||
$(AS) $(ASFLAGS) -o $@ $<
|
||||
|
||||
ifeq ($(NODEP),1)
|
||||
$(ASM_BUILDDIR)/%.o: asm_dep :=
|
||||
else
|
||||
$(ASM_BUILDDIR)/%.o: asm_dep = $(shell $(SCANINC) -I "" $(ASM_SUBDIR)/$*.s)
|
||||
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.
|
||||
|
||||
$(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s $$(asm_dep)
|
||||
|
||||
ifeq ($(NODEP),1)
|
||||
$(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s
|
||||
$(AS) $(ASFLAGS) -o $@ $<
|
||||
|
||||
ifeq ($(NODEP),1)
|
||||
$(DATA_ASM_BUILDDIR)/%.o: data_dep :=
|
||||
else
|
||||
$(DATA_ASM_BUILDDIR)/%.o: data_dep = $(shell $(SCANINC) -I include -I "" $(DATA_ASM_SUBDIR)/$*.s)
|
||||
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
|
||||
|
||||
$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s $$(data_dep)
|
||||
ifeq ($(NODEP),1)
|
||||
$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s
|
||||
$(PREPROC) $< charmap.txt | $(CPP) -I include | $(AS) $(ASFLAGS) -o $@
|
||||
else
|
||||
define DATA_ASM_DEP
|
||||
$1: $2 $$(shell $(SCANINC) -I include -I "" $2)
|
||||
$$(PREPROC) $$< charmap.txt | $$(CPP) -I include | $$(AS) $$(ASFLAGS) -o $$@
|
||||
endef
|
||||
$(foreach src, $(REGULAR_DATA_ASM_SRCS), $(eval $(call DATA_ASM_DEP,$(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o, $(src)),$(src))))
|
||||
endif
|
||||
|
||||
$(SONG_BUILDDIR)/%.o: $(SONG_SUBDIR)/%.s
|
||||
$(AS) $(ASFLAGS) -I sound -o $@ $<
|
||||
|
||||
@@ -72,9 +72,9 @@
|
||||
special CallBattleTowerFunc
|
||||
.endm
|
||||
|
||||
@ Unknown. Destroys some link task if using wireless link. Wait for link?
|
||||
.macro tower_unklink
|
||||
setvar VAR_0x8004, BATTLE_TOWER_FUNC_13
|
||||
@ Attempts to close link connection. Used when finishing a link multi challenge.
|
||||
.macro tower_closelink
|
||||
setvar VAR_0x8004, BATTLE_TOWER_FUNC_TRY_CLOSE_LINK
|
||||
special CallBattleTowerFunc
|
||||
.endm
|
||||
|
||||
|
||||
@@ -1434,6 +1434,7 @@
|
||||
|
||||
@ Sets the color of the text in standard message boxes. 0x00 produces blue (male) text, 0x01 produces red (female) text,
|
||||
@ 0xFF resets the color to the default for the current OW's gender, and all other values produce black text.
|
||||
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
|
||||
.macro textcolor color:req
|
||||
.byte 0xc7
|
||||
.byte \color
|
||||
@@ -1441,6 +1442,7 @@
|
||||
|
||||
@ The exact purpose of this command is unknown, but it is related to the blue help-text box that appears on the bottom
|
||||
@ of the screen when the Main Menu is opened.
|
||||
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
|
||||
.macro loadhelp pointer:req
|
||||
.byte 0xc8
|
||||
.4byte \pointer
|
||||
@@ -1448,21 +1450,25 @@
|
||||
|
||||
@ The exact purpose of this command is unknown, but it is related to the blue help-text box that appears on the bottom of
|
||||
@ the screen when the Main Menu is opened.
|
||||
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
|
||||
.macro unloadhelp
|
||||
.byte 0xc9
|
||||
.endm
|
||||
|
||||
@ After using this command, all standard message boxes will use the signpost frame.
|
||||
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
|
||||
.macro signmsg
|
||||
.byte 0xca
|
||||
.endm
|
||||
|
||||
@ Ends the effects of signmsg, returning message box frames to normal.
|
||||
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
|
||||
.macro normalmsg
|
||||
.byte 0xcb
|
||||
.endm
|
||||
|
||||
@ Compares the value of a hidden variable to a dword.
|
||||
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
|
||||
.macro comparehiddenvar a:req, value:req
|
||||
.byte 0xcc
|
||||
.byte \a
|
||||
@@ -1489,6 +1495,7 @@
|
||||
.endm
|
||||
|
||||
@ Sets worldmapflag to 1. This allows the player to Fly to the corresponding map, if that map has a flightspot.
|
||||
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
|
||||
.macro setworldmapflag worldmapflag:req
|
||||
.byte 0xd0
|
||||
.2byte \worldmapflag
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
.macro voice_directsound base_midi_key, pan, sample_data_pointer, attack, decay, sustain, release
|
||||
.macro voice_directsound base_midi_key:req, pan:req, sample_data_pointer:req, attack:req, decay:req, sustain:req, release:req
|
||||
.byte 0
|
||||
_voice_directsound \base_midi_key, \pan, \sample_data_pointer, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro voice_directsound_no_resample base_midi_key, pan, sample_data_pointer, attack, decay, sustain, release
|
||||
.macro voice_directsound_no_resample base_midi_key:req, pan:req, sample_data_pointer:req, attack:req, decay:req, sustain:req, release:req
|
||||
.byte 8
|
||||
_voice_directsound \base_midi_key, \pan, \sample_data_pointer, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro voice_directsound_alt base_midi_key, pan, sample_data_pointer, attack, decay, sustain, release
|
||||
.macro voice_directsound_alt base_midi_key:req, pan:req, sample_data_pointer:req, attack:req, decay:req, sustain:req, release:req
|
||||
.byte 16
|
||||
_voice_directsound \base_midi_key, \pan, \sample_data_pointer, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro _voice_directsound base_midi_key, pan, sample_data_pointer, attack, decay, sustain, release
|
||||
.macro _voice_directsound base_midi_key:req, pan:req, sample_data_pointer:req, attack:req, decay:req, sustain:req, release:req
|
||||
.byte \base_midi_key
|
||||
.byte 0
|
||||
.if \pan != 0
|
||||
@@ -28,16 +28,22 @@
|
||||
.byte \release
|
||||
.endm
|
||||
|
||||
.macro voice_square_1 sweep, duty_cycle, attack, decay, sustain, release
|
||||
_voice_square_1 1, \sweep, \duty_cycle, \attack, \decay, \sustain, \release
|
||||
.macro voice_square_1 base_midi_key:req, pan:req, sweep:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req
|
||||
_voice_square_1 1, \base_midi_key, \pan, \sweep, \duty_cycle, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro voice_square_1_alt sweep, duty_cycle, attack, decay, sustain, release
|
||||
_voice_square_1 9, \sweep, \duty_cycle, \attack, \decay, \sustain, \release
|
||||
.macro voice_square_1_alt base_midi_key:req, pan:req, sweep:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req
|
||||
_voice_square_1 9, \base_midi_key, \pan, \sweep, \duty_cycle, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro _voice_square_1 type, sweep, duty_cycle, attack, decay, sustain, release
|
||||
.byte \type, 60, 0
|
||||
.macro _voice_square_1 type:req, base_midi_key:req, pan:req, sweep:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req
|
||||
.byte \type
|
||||
.byte \base_midi_key
|
||||
.if \pan != 0
|
||||
.byte (0x80 | \pan)
|
||||
.else
|
||||
.byte 0
|
||||
.endif
|
||||
.byte \sweep
|
||||
.byte (\duty_cycle & 0x3)
|
||||
.byte 0, 0, 0
|
||||
@@ -47,16 +53,23 @@
|
||||
.byte (\release & 0x7)
|
||||
.endm
|
||||
|
||||
.macro voice_square_2 duty_cycle, attack, decay, sustain, release
|
||||
_voice_square_2 2, \duty_cycle, \attack, \decay, \sustain, \release
|
||||
.macro voice_square_2 base_midi_key:req, pan:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req
|
||||
_voice_square_2 2, \base_midi_key, \pan, \duty_cycle, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro voice_square_2_alt duty_cycle, attack, decay, sustain, release
|
||||
_voice_square_2 10, \duty_cycle, \attack, \decay, \sustain, \release
|
||||
.macro voice_square_2_alt base_midi_key:req, pan:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req
|
||||
_voice_square_2 10, \base_midi_key, \pan, \duty_cycle, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro _voice_square_2 type, duty_cycle, attack, decay, sustain, release
|
||||
.byte \type, 60, 0, 0
|
||||
.macro _voice_square_2 type:req, base_midi_key:req, pan:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req
|
||||
.byte \type
|
||||
.byte \base_midi_key
|
||||
.if \pan != 0
|
||||
.byte (0x80 | \pan)
|
||||
.else
|
||||
.byte 0
|
||||
.endif
|
||||
.byte 0
|
||||
.byte (\duty_cycle & 0x3)
|
||||
.byte 0, 0, 0
|
||||
.byte (\attack & 0x7)
|
||||
@@ -65,16 +78,23 @@
|
||||
.byte (\release & 0x7)
|
||||
.endm
|
||||
|
||||
.macro voice_programmable_wave wave_samples_pointer, attack, decay, sustain, release
|
||||
_voice_programmable_wave 3, \wave_samples_pointer, \attack, \decay, \sustain, \release
|
||||
.macro voice_programmable_wave base_midi_key:req, pan:req, wave_samples_pointer:req, attack:req, decay:req, sustain:req, release:req
|
||||
_voice_programmable_wave 3, \base_midi_key, \pan, \wave_samples_pointer, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro voice_programmable_wave_alt wave_samples_pointer, attack, decay, sustain, release
|
||||
_voice_programmable_wave 11, \wave_samples_pointer, \attack, \decay, \sustain, \release
|
||||
.macro voice_programmable_wave_alt base_midi_key:req, pan:req, wave_samples_pointer:req, attack:req, decay:req, sustain:req, release:req
|
||||
_voice_programmable_wave 11, \base_midi_key, \pan, \wave_samples_pointer, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro _voice_programmable_wave type, wave_samples_pointer, attack, decay, sustain, release
|
||||
.byte \type, 60, 0, 0
|
||||
.macro _voice_programmable_wave type:req, base_midi_key:req, pan:req, wave_samples_pointer:req, attack:req, decay:req, sustain:req, release:req
|
||||
.byte \type
|
||||
.byte \base_midi_key
|
||||
.if \pan != 0
|
||||
.byte (0x80 | \pan)
|
||||
.else
|
||||
.byte 0
|
||||
.endif
|
||||
.byte 0
|
||||
.4byte \wave_samples_pointer
|
||||
.byte (\attack & 0x7)
|
||||
.byte (\decay & 0x7)
|
||||
@@ -82,16 +102,23 @@
|
||||
.byte (\release & 0x7)
|
||||
.endm
|
||||
|
||||
.macro voice_noise period, attack, decay, sustain, release
|
||||
_voice_noise 4, \period, \attack, \decay, \sustain, \release
|
||||
.macro voice_noise base_midi_key:req, pan:req, period:req, attack:req, decay:req, sustain:req, release:req
|
||||
_voice_noise 4, \base_midi_key, \pan, \period, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro voice_noise_alt period, attack, decay, sustain, release
|
||||
_voice_noise 12, \period, \attack, \decay, \sustain, \release
|
||||
.macro voice_noise_alt base_midi_key:req, pan:req, period:req, attack:req, decay:req, sustain:req, release:req
|
||||
_voice_noise 12, \base_midi_key, \pan, \period, \attack, \decay, \sustain, \release
|
||||
.endm
|
||||
|
||||
.macro _voice_noise type, period, attack, decay, sustain, release
|
||||
.byte \type, 60, 0, 0
|
||||
.macro _voice_noise type:req, base_midi_key:req, pan:req, period:req, attack:req, decay:req, sustain:req, release:req
|
||||
.byte \type
|
||||
.byte \base_midi_key
|
||||
.if \pan != 0
|
||||
.byte (0x80 | \pan)
|
||||
.else
|
||||
.byte 0
|
||||
.endif
|
||||
.byte 0
|
||||
.byte (\period & 0x1)
|
||||
.byte 0, 0, 0
|
||||
.byte (\attack & 0x7)
|
||||
@@ -100,25 +127,25 @@
|
||||
.byte (\release & 0x7)
|
||||
.endm
|
||||
|
||||
.macro voice_keysplit voice_group_pointer, keysplit_table_pointer
|
||||
.macro voice_keysplit voice_group_pointer:req, keysplit_table_pointer:req
|
||||
.byte 0x40, 0, 0, 0
|
||||
.4byte \voice_group_pointer
|
||||
.4byte \keysplit_table_pointer
|
||||
.endm
|
||||
|
||||
.macro voice_keysplit_all voice_group_pointer
|
||||
.macro voice_keysplit_all voice_group_pointer:req
|
||||
.byte 0x80, 0, 0, 0
|
||||
.4byte \voice_group_pointer
|
||||
.4byte 0
|
||||
.endm
|
||||
|
||||
.macro cry sample
|
||||
.macro cry sample:req
|
||||
.byte 0x20, 60, 0, 0
|
||||
.4byte \sample
|
||||
.byte 0xff, 0, 0xff, 0
|
||||
.endm
|
||||
|
||||
.macro cry2 sample
|
||||
.macro cry2 sample:req
|
||||
.byte 0x30, 60, 0, 0
|
||||
.4byte \sample
|
||||
.byte 0xff, 0, 0xff, 0
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
OBJDUMP="$DEVKITARM/bin/arm-none-eabi-objdump -D -bbinary -marmv4t -Mforce-thumb"
|
||||
OPTIONS="--start-address=$(($1)) --stop-address=$(($1 + $2))"
|
||||
if [ $(($1)) -ge $((0x8000000)) ]; then
|
||||
OPTIONS="--adjust-vma=0x8000000 --start-address=$(($1)) --stop-address=$(($1 + $2))"
|
||||
else
|
||||
OPTIONS="--start-address=$(($1)) --stop-address=$(($1 + $2))"
|
||||
fi
|
||||
$OBJDUMP $OPTIONS baserom.gba > baserom.dump
|
||||
$OBJDUMP $OPTIONS pokeemerald.gba > pokeemerald.dump
|
||||
diff -u baserom.dump pokeemerald.dump
|
||||
|
||||
@@ -109,7 +109,7 @@ _1a0:
|
||||
strh r1, [r0, 0xa] @ SIOMLT_SEND
|
||||
ldr r0, =_data_2f0
|
||||
ldr r1, =gCode
|
||||
svc 0x11 << 16
|
||||
swi 0x11 << 16
|
||||
ldr lr, =gCode
|
||||
bx lr
|
||||
.pool
|
||||
|
||||
@@ -100,12 +100,12 @@ struct CgbChannel
|
||||
u8 le;
|
||||
u8 sw;
|
||||
u32 fr;
|
||||
u32 *wp;
|
||||
u32 *cp;
|
||||
void *tp;
|
||||
void *pp;
|
||||
void *np;
|
||||
u32 d4[2];
|
||||
u32 wp;
|
||||
u32 cp;
|
||||
u32 tp;
|
||||
u32 pp;
|
||||
u32 np;
|
||||
u8 d4[8];
|
||||
};
|
||||
|
||||
struct MusicPlayerTrack;
|
||||
@@ -138,10 +138,10 @@ struct SoundChannel
|
||||
u32 fw;
|
||||
u32 freq;
|
||||
struct WaveData *wav;
|
||||
s8 *cp;
|
||||
u32 cp;
|
||||
struct MusicPlayerTrack *track;
|
||||
void *pp;
|
||||
void *np;
|
||||
u32 pp;
|
||||
u32 np;
|
||||
u32 d4;
|
||||
u16 xpi;
|
||||
u16 xpc;
|
||||
@@ -172,11 +172,11 @@ struct SoundInfo
|
||||
u8 pcmDmaPeriod; // number of V-blanks per PCM DMA
|
||||
u8 maxLines;
|
||||
u8 gap[3];
|
||||
u32 pcmSamplesPerVBlank;
|
||||
u32 pcmFreq;
|
||||
u32 divFreq;
|
||||
s32 pcmSamplesPerVBlank;
|
||||
s32 pcmFreq;
|
||||
s32 divFreq;
|
||||
struct CgbChannel *cgbChans;
|
||||
void (*func)();
|
||||
u32 func;
|
||||
u32 intp;
|
||||
void (*CgbSound)(void);
|
||||
void (*CgbOscOff)(u8);
|
||||
@@ -184,7 +184,7 @@ struct SoundInfo
|
||||
u32 MPlayJumpTable;
|
||||
u32 plynote;
|
||||
u32 ExtVolPit;
|
||||
u32 gap2[4];
|
||||
u8 gap2[16];
|
||||
struct SoundChannel chans[MAX_DIRECTSOUND_CHANNELS];
|
||||
s8 pcmBuffer[PCM_DMA_BUF_SIZE * 2];
|
||||
};
|
||||
@@ -248,7 +248,7 @@ struct MusicPlayerTrack
|
||||
u8 key;
|
||||
u8 velocity;
|
||||
u8 runningStatus;
|
||||
s8 keyM;
|
||||
u8 keyM;
|
||||
u8 pitM;
|
||||
s8 keyShift;
|
||||
s8 keyShiftX;
|
||||
@@ -312,7 +312,7 @@ struct MusicPlayerInfo
|
||||
struct MusicPlayerTrack *tracks;
|
||||
struct ToneData *tone;
|
||||
u32 ident;
|
||||
void (*func)();
|
||||
u32 func;
|
||||
u32 intp;
|
||||
};
|
||||
|
||||
@@ -447,7 +447,7 @@ void ply_tune(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
||||
void ply_port(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
||||
void ply_xcmd(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
||||
void ply_endtie(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
||||
void ply_note(u8, struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
||||
void ply_note(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
||||
|
||||
// extended sound command handler functions
|
||||
void ply_xxx(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
||||
|
||||
@@ -1 +1 @@
|
||||
gUnknown_03006298
|
||||
gFrontierTempParty
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
|
||||
.set OAM, 0x7000000
|
||||
|
||||
.set SOUND_INFO_PTR, IWRAM_END - 0x10
|
||||
.set INTR_CHECK, IWRAM_END - 0x8
|
||||
.set INTR_VECTOR, IWRAM_END - 0x4
|
||||
.set SOUND_INFO_PTR, 0x3007FF0
|
||||
.set INTR_CHECK, 0x3007FF8
|
||||
.set INTR_VECTOR, 0x3007FFC
|
||||
|
||||
.set INTR_FLAG_VBLANK, 1 << 0
|
||||
.set INTR_FLAG_HBLANK, 1 << 1
|
||||
|
||||
@@ -2,11 +2,41 @@
|
||||
|
||||
.equiv PCM_DMA_BUF_SIZE, 1584
|
||||
|
||||
.equiv C_V, 0x40
|
||||
|
||||
.equiv TONEDATA_TYPE_CGB, 0x07
|
||||
.equiv TONEDATA_TYPE_FIX, 0x08
|
||||
.equiv TONEDATA_TYPE_REV, 0x10
|
||||
.equiv TONEDATA_TYPE_CMP, 0x20
|
||||
.equiv TONEDATA_TYPE_SPL, 0x40 @ key split
|
||||
.equiv TONEDATA_TYPE_RHY, 0x80 @ rhythm
|
||||
|
||||
.equiv TONEDATA_P_S_PAN, 0xc0
|
||||
|
||||
.equiv SOUND_CHANNEL_SF_START, 0x80
|
||||
.equiv SOUND_CHANNEL_SF_STOP, 0x40
|
||||
.equiv SOUND_CHANNEL_SF_SPECIAL, 0x20
|
||||
.equiv SOUND_CHANNEL_SF_LOOP, 0x10
|
||||
.equiv SOUND_CHANNEL_SF_IEC, 0x04
|
||||
.equiv SOUND_CHANNEL_SF_ENV, 0x03
|
||||
.equiv SOUND_CHANNEL_SF_ENV_ATTACK, 0x03
|
||||
.equiv SOUND_CHANNEL_SF_ENV_DECAY, 0x02
|
||||
.equiv SOUND_CHANNEL_SF_ENV_SUSTAIN, 0x01
|
||||
.equiv SOUND_CHANNEL_SF_ENV_RELEASE, 0x00
|
||||
.equiv SOUND_CHANNEL_SF_ON, (SOUND_CHANNEL_SF_START | SOUND_CHANNEL_SF_STOP | SOUND_CHANNEL_SF_IEC | SOUND_CHANNEL_SF_ENV)
|
||||
|
||||
.equiv CGB_CHANNEL_MO_PIT, 0x02
|
||||
.equiv CGB_CHANNEL_MO_VOL, 0x01
|
||||
|
||||
.equiv WAVE_DATA_FLAG_LOOP, 0xC0
|
||||
|
||||
.equiv MPT_FLG_VOLSET, 0x01
|
||||
.equiv MPT_FLG_VOLCHG, 0x03
|
||||
.equiv MPT_FLG_PITSET, 0x04
|
||||
.equiv MPT_FLG_PITCHG, 0x0C
|
||||
.equiv MPT_FLG_START, 0x40
|
||||
.equiv MPT_FLG_EXIST, 0x80
|
||||
|
||||
.macro struct_begin
|
||||
.struct 0
|
||||
.endm
|
||||
@@ -16,6 +46,28 @@
|
||||
.struct \name + \size
|
||||
.endm
|
||||
|
||||
struct_begin
|
||||
struct_field o_WaveData_type, 2
|
||||
struct_field o_WaveData_d1, 1
|
||||
struct_field o_WaveData_flags, 1
|
||||
struct_field o_WaveData_freq, 4
|
||||
struct_field o_WaveData_loopStart, 4
|
||||
struct_field o_WaveData_size, 4
|
||||
struct_field o_WaveData_data, 0
|
||||
struct_field WaveData_size, 0
|
||||
|
||||
struct_begin
|
||||
struct_field o_ToneData_type, 1
|
||||
struct_field o_ToneData_key, 1
|
||||
struct_field o_ToneData_length, 1
|
||||
struct_field o_ToneData_pan_sweep, 1
|
||||
struct_field o_ToneData_wav, 4
|
||||
struct_field o_ToneData_attack, 1
|
||||
struct_field o_ToneData_decay, 1
|
||||
struct_field o_ToneData_sustain, 1
|
||||
struct_field o_ToneData_release, 1
|
||||
struct_field ToneData_size, 0
|
||||
|
||||
struct_begin
|
||||
struct_field o_SoundInfo_ident, 4
|
||||
struct_field o_SoundInfo_pcmDmaCounter, 1
|
||||
@@ -32,8 +84,8 @@
|
||||
struct_field o_SoundInfo_pcmFreq, 4
|
||||
struct_field o_SoundInfo_divFreq, 4
|
||||
struct_field o_SoundInfo_cgbChans, 4
|
||||
struct_field o_SoundInfo_func, 4
|
||||
struct_field o_SoundInfo_intp, 4
|
||||
struct_field o_SoundInfo_MPlayMainHead, 4
|
||||
struct_field o_SoundInfo_musicPlayerHead, 4
|
||||
struct_field o_SoundInfo_CgbSound, 4
|
||||
struct_field o_SoundInfo_CgbOscOff, 4
|
||||
struct_field o_SoundInfo_MidiKeyToCgbFreq, 4
|
||||
@@ -46,7 +98,7 @@
|
||||
struct_field SoundInfo_size, 0
|
||||
|
||||
struct_begin
|
||||
struct_field o_SoundChannel_status, 1
|
||||
struct_field o_SoundChannel_statusFlags, 1
|
||||
struct_field o_SoundChannel_type, 1
|
||||
struct_field o_SoundChannel_rightVolume, 1
|
||||
struct_field o_SoundChannel_leftVolume, 1
|
||||
@@ -54,29 +106,29 @@
|
||||
struct_field o_SoundChannel_decay, 1
|
||||
struct_field o_SoundChannel_sustain, 1
|
||||
struct_field o_SoundChannel_release, 1
|
||||
struct_field o_SoundChannel_ky, 1
|
||||
struct_field o_SoundChannel_ev, 1
|
||||
struct_field o_SoundChannel_er, 1
|
||||
struct_field o_SoundChannel_el, 1
|
||||
struct_field o_SoundChannel_iev, 1
|
||||
struct_field o_SoundChannel_iel, 1
|
||||
struct_field o_SoundChannel_d1, 1
|
||||
struct_field o_SoundChannel_d2, 1
|
||||
struct_field o_SoundChannel_gt, 1
|
||||
struct_field o_SoundChannel_mk, 1
|
||||
struct_field o_SoundChannel_ve, 1
|
||||
struct_field o_SoundChannel_pr, 1
|
||||
struct_field o_SoundChannel_rp, 1
|
||||
struct_field o_SoundChannel_d3, 3
|
||||
struct_field o_SoundChannel_ct, 4
|
||||
struct_field o_SoundChannel_key, 1
|
||||
struct_field o_SoundChannel_envelopeVolume, 1
|
||||
struct_field o_SoundChannel_envelopeVolumeRight, 1
|
||||
struct_field o_SoundChannel_envelopeVolumeLeft, 1
|
||||
struct_field o_SoundChannel_pseudoEchoVolume, 1
|
||||
struct_field o_SoundChannel_pseudoEchoLength, 1
|
||||
struct_field o_SoundChannel_dummy1, 1
|
||||
struct_field o_SoundChannel_dummy2, 1
|
||||
struct_field o_SoundChannel_gateTime, 1
|
||||
struct_field o_SoundChannel_midiKey, 1
|
||||
struct_field o_SoundChannel_velocity, 1
|
||||
struct_field o_SoundChannel_priority, 1
|
||||
struct_field o_SoundChannel_rhythmPan, 1
|
||||
struct_field o_SoundChannel_dummy3, 3
|
||||
struct_field o_SoundChannel_count, 4
|
||||
struct_field o_SoundChannel_fw, 4
|
||||
struct_field o_SoundChannel_freq, 4
|
||||
struct_field o_SoundChannel_frequency, 4
|
||||
struct_field o_SoundChannel_wav, 4
|
||||
struct_field o_SoundChannel_cp, 4
|
||||
struct_field o_SoundChannel_currentPointer, 4
|
||||
struct_field o_SoundChannel_track, 4
|
||||
struct_field o_SoundChannel_pp, 4
|
||||
struct_field o_SoundChannel_np, 4
|
||||
struct_field o_SoundChannel_d4, 4
|
||||
struct_field o_SoundChannel_prevChannelPointer, 4
|
||||
struct_field o_SoundChannel_nextChannelPointer, 4
|
||||
struct_field o_SoundChannel_dummy4, 4
|
||||
struct_field o_SoundChannel_xpi, 2
|
||||
struct_field o_SoundChannel_xpc, 2
|
||||
struct_field SoundChannel_size, 0
|
||||
@@ -112,8 +164,8 @@
|
||||
struct_field o_MusicPlayerTrack_lfoDelay, 1
|
||||
struct_field o_MusicPlayerTrack_lfoDelayC, 1
|
||||
struct_field o_MusicPlayerTrack_priority, 1
|
||||
struct_field o_MusicPlayerTrack_echoVolume, 1
|
||||
struct_field o_MusicPlayerTrack_echoLength, 1
|
||||
struct_field o_MusicPlayerTrack_pseudoEchoVolume, 1
|
||||
struct_field o_MusicPlayerTrack_pseudoEchoLength, 1
|
||||
struct_field o_MusicPlayerTrack_chan, 4
|
||||
struct_field o_MusicPlayerTrack_ToneData_type, 1
|
||||
struct_field o_MusicPlayerTrack_ToneData_key, 1
|
||||
@@ -159,41 +211,41 @@
|
||||
struct_field MusicPlayerInfo_size, 0
|
||||
|
||||
struct_begin
|
||||
struct_field o_CgbChannel_sf, 1
|
||||
struct_field o_CgbChannel_ty, 1
|
||||
struct_field o_CgbChannel_statusFlags, 1
|
||||
struct_field o_CgbChannel_type, 1
|
||||
struct_field o_CgbChannel_rightVolume, 1
|
||||
struct_field o_CgbChannel_leftVolume, 1
|
||||
struct_field o_CgbChannel_at, 1
|
||||
struct_field o_CgbChannel_de, 1
|
||||
struct_field o_CgbChannel_su, 1
|
||||
struct_field o_CgbChannel_re, 1
|
||||
struct_field o_CgbChannel_ky, 1
|
||||
struct_field o_CgbChannel_ev, 1
|
||||
struct_field o_CgbChannel_eg, 1
|
||||
struct_field o_CgbChannel_ec, 1
|
||||
struct_field o_CgbChannel_echoVolume, 1
|
||||
struct_field o_CgbChannel_echoLength, 1
|
||||
struct_field o_CgbChannel_d1, 1
|
||||
struct_field o_CgbChannel_d2, 1
|
||||
struct_field o_CgbChannel_gt, 1
|
||||
struct_field o_CgbChannel_mk, 1
|
||||
struct_field o_CgbChannel_ve, 1
|
||||
struct_field o_CgbChannel_pr, 1
|
||||
struct_field o_CgbChannel_rp, 1
|
||||
struct_field o_CgbChannel_d3, 3
|
||||
struct_field o_CgbChannel_d5, 1
|
||||
struct_field o_CgbChannel_sg, 1
|
||||
struct_field o_CgbChannel_attack, 1
|
||||
struct_field o_CgbChannel_decay, 1
|
||||
struct_field o_CgbChannel_sustain, 1
|
||||
struct_field o_CgbChannel_release, 1
|
||||
struct_field o_CgbChannel_key, 1
|
||||
struct_field o_CgbChannel_envelopeVolume, 1
|
||||
struct_field o_CgbChannel_envelopeGoal, 1
|
||||
struct_field o_CgbChannel_envelopeCounter, 1
|
||||
struct_field o_CgbChannel_pseudoEchoVolume, 1
|
||||
struct_field o_CgbChannel_pseudoEchoLength, 1
|
||||
struct_field o_CgbChannel_dummy1, 1
|
||||
struct_field o_CgbChannel_dummy2, 1
|
||||
struct_field o_CgbChannel_gateTime, 1
|
||||
struct_field o_CgbChannel_midiKey, 1
|
||||
struct_field o_CgbChannel_velocity, 1
|
||||
struct_field o_CgbChannel_priority, 1
|
||||
struct_field o_CgbChannel_rhythmPan, 1
|
||||
struct_field o_CgbChannel_dummy3, 3
|
||||
struct_field o_CgbChannel_dummy5, 1
|
||||
struct_field o_CgbChannel_sustainGoal, 1
|
||||
struct_field o_CgbChannel_n4, 1
|
||||
struct_field o_CgbChannel_pan, 1
|
||||
struct_field o_CgbChannel_panMask, 1
|
||||
struct_field o_CgbChannel_mo, 1
|
||||
struct_field o_CgbChannel_le, 1
|
||||
struct_field o_CgbChannel_sw, 1
|
||||
struct_field o_CgbChannel_fr, 4
|
||||
struct_field o_CgbChannel_wp, 4
|
||||
struct_field o_CgbChannel_cp, 4
|
||||
struct_field o_CgbChannel_tp, 4
|
||||
struct_field o_CgbChannel_pp, 4
|
||||
struct_field o_CgbChannel_np, 4
|
||||
struct_field o_CgbChannel_d4, 8
|
||||
struct_field o_CgbChannel_modify, 1
|
||||
struct_field o_CgbChannel_length, 1
|
||||
struct_field o_CgbChannel_sweep, 1
|
||||
struct_field o_CgbChannel_frequency, 4
|
||||
struct_field o_CgbChannel_wavePointer, 4
|
||||
struct_field o_CgbChannel_currentPointer, 4
|
||||
struct_field o_CgbChannel_track, 4
|
||||
struct_field o_CgbChannel_prevChannelPointer, 4
|
||||
struct_field o_CgbChannel_nextChannelPointer, 4
|
||||
struct_field o_CgbChannel_dummy4, 8
|
||||
struct_field CgbChannel_size, 0
|
||||
|
||||
@@ -2324,14 +2324,18 @@ AI_CV_SemiInvulnerable:
|
||||
|
||||
@ BUG: The scripts for checking type-resistance to weather for semi-invulnerable moves are swapped
|
||||
@ The result is that the AI is encouraged to stall while taking damage from weather
|
||||
@ To fix, swap _CheckSandstormTypes/_CheckIceType in the below script
|
||||
AI_CV_SemiInvulnerable2:
|
||||
if_status AI_TARGET, STATUS1_TOXIC_POISON, AI_CV_SemiInvulnerable_TryEncourage
|
||||
if_status2 AI_TARGET, STATUS2_CURSED, AI_CV_SemiInvulnerable_TryEncourage
|
||||
if_status3 AI_TARGET, STATUS3_LEECHSEED, AI_CV_SemiInvulnerable_TryEncourage
|
||||
get_weather
|
||||
.ifdef BUGFIX
|
||||
if_equal AI_WEATHER_HAIL, AI_CV_SemiInvulnerable_CheckIceType
|
||||
if_equal AI_WEATHER_SANDSTORM, AI_CV_SemiInvulnerable_CheckSandstormTypes
|
||||
.else
|
||||
if_equal AI_WEATHER_HAIL, AI_CV_SemiInvulnerable_CheckSandstormTypes
|
||||
if_equal AI_WEATHER_SANDSTORM, AI_CV_SemiInvulnerable_CheckIceType
|
||||
.endif
|
||||
goto AI_CV_SemiInvulnerable5
|
||||
|
||||
AI_CV_SemiInvulnerable_CheckSandstormTypes:
|
||||
@@ -2398,9 +2402,13 @@ AI_CV_Hail_ScoreDown1:
|
||||
AI_CV_Hail_End:
|
||||
end
|
||||
|
||||
@ BUG: Facade score is increased if the target is statused, but should be if the user is. Replace AI_TARGET with AI_USER
|
||||
@ BUG: Facade score is increased if the target is statused, but should be if the user is
|
||||
AI_CV_Facade:
|
||||
.ifdef BUGFIX
|
||||
if_not_status AI_USER, STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON, AI_CV_Facade_End
|
||||
.else
|
||||
if_not_status AI_TARGET, STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON, AI_CV_Facade_End
|
||||
.endif
|
||||
score +1
|
||||
AI_CV_Facade_End:
|
||||
end
|
||||
|
||||
@@ -416,7 +416,7 @@ gBattleAnims_Special::
|
||||
.4byte Special_SwitchOutPlayerMon @ B_ANIM_SWITCH_OUT_PLAYER_MON
|
||||
.4byte Special_SwitchOutOpponentMon @ B_ANIM_SWITCH_OUT_OPPONENT_MON
|
||||
.4byte Special_BallThrow @ B_ANIM_BALL_THROW
|
||||
.4byte Special_SafariBallThrow @ B_ANIM_SAFARI_BALL_THROW
|
||||
.4byte Special_BallThrowWithTrainer @ B_ANIM_BALL_THROW_WITH_TRAINER
|
||||
.4byte Special_SubstituteToMon @ B_ANIM_SUBSTITUTE_TO_MON
|
||||
.4byte Special_MonToSubstitute @ B_ANIM_MON_TO_SUBSTITUTE
|
||||
|
||||
@@ -10738,7 +10738,7 @@ BallThrowTrainerBlock:
|
||||
blendoff
|
||||
goto BallThrowEnd
|
||||
|
||||
Special_SafariBallThrow:
|
||||
Special_BallThrowWithTrainer:
|
||||
createvisualtask AnimTask_LoadBallGfx, 2
|
||||
delay 0
|
||||
createvisualtask AnimTask_ThrowBall_StandingTrainer, 2
|
||||
|
||||
@@ -151,13 +151,13 @@ gStdScripts_End:: @ 81DC2CC
|
||||
.include "data/maps/Route132/scripts.inc"
|
||||
.include "data/maps/Route133/scripts.inc"
|
||||
.include "data/maps/Route134/scripts.inc"
|
||||
.include "data/maps/Underwater1/scripts.inc"
|
||||
.include "data/maps/Underwater2/scripts.inc"
|
||||
.include "data/maps/Underwater3/scripts.inc"
|
||||
.include "data/maps/Underwater4/scripts.inc"
|
||||
.include "data/maps/Underwater5/scripts.inc"
|
||||
.include "data/maps/Underwater6/scripts.inc"
|
||||
.include "data/maps/Underwater7/scripts.inc"
|
||||
.include "data/maps/Underwater_Route124/scripts.inc"
|
||||
.include "data/maps/Underwater_Route126/scripts.inc"
|
||||
.include "data/maps/Underwater_Route127/scripts.inc"
|
||||
.include "data/maps/Underwater_Route128/scripts.inc"
|
||||
.include "data/maps/Underwater_Route129/scripts.inc"
|
||||
.include "data/maps/Underwater_Route105/scripts.inc"
|
||||
.include "data/maps/Underwater_Route125/scripts.inc"
|
||||
.include "data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc"
|
||||
.include "data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc"
|
||||
.include "data/maps/LittlerootTown_MaysHouse_1F/scripts.inc"
|
||||
|
||||
@@ -502,34 +502,34 @@
|
||||
"blockdata_filepath": "data/layouts/Route134/map.bin"
|
||||
},
|
||||
{
|
||||
"id": "LAYOUT_UNDERWATER2",
|
||||
"name": "Underwater2_Layout",
|
||||
"id": "LAYOUT_UNDERWATER_ROUTE126",
|
||||
"name": "Underwater_Route126_Layout",
|
||||
"width": 80,
|
||||
"height": 80,
|
||||
"primary_tileset": "gTileset_General",
|
||||
"secondary_tileset": "gTileset_Underwater",
|
||||
"border_filepath": "data/layouts/Underwater2/border.bin",
|
||||
"blockdata_filepath": "data/layouts/Underwater2/map.bin"
|
||||
"border_filepath": "data/layouts/Underwater_Route126/border.bin",
|
||||
"blockdata_filepath": "data/layouts/Underwater_Route126/map.bin"
|
||||
},
|
||||
{
|
||||
"id": "LAYOUT_UNDERWATER3",
|
||||
"name": "Underwater3_Layout",
|
||||
"id": "LAYOUT_UNDERWATER_ROUTE127",
|
||||
"name": "Underwater_Route127_Layout",
|
||||
"width": 80,
|
||||
"height": 80,
|
||||
"primary_tileset": "gTileset_General",
|
||||
"secondary_tileset": "gTileset_Underwater",
|
||||
"border_filepath": "data/layouts/Underwater3/border.bin",
|
||||
"blockdata_filepath": "data/layouts/Underwater3/map.bin"
|
||||
"border_filepath": "data/layouts/Underwater_Route127/border.bin",
|
||||
"blockdata_filepath": "data/layouts/Underwater_Route127/map.bin"
|
||||
},
|
||||
{
|
||||
"id": "LAYOUT_UNDERWATER4",
|
||||
"name": "Underwater4_Layout",
|
||||
"id": "LAYOUT_UNDERWATER_ROUTE128",
|
||||
"name": "Underwater_Route128_Layout",
|
||||
"width": 120,
|
||||
"height": 40,
|
||||
"primary_tileset": "gTileset_General",
|
||||
"secondary_tileset": "gTileset_Underwater",
|
||||
"border_filepath": "data/layouts/Underwater4/border.bin",
|
||||
"blockdata_filepath": "data/layouts/Underwater4/map.bin"
|
||||
"border_filepath": "data/layouts/Underwater_Route128/border.bin",
|
||||
"blockdata_filepath": "data/layouts/Underwater_Route128/map.bin"
|
||||
},
|
||||
{
|
||||
"id": "LAYOUT_LITTLEROOT_TOWN_BRENDANS_HOUSE_1F",
|
||||
@@ -2732,14 +2732,14 @@
|
||||
"blockdata_filepath": "data/layouts/LilycoveCity_DepartmentStoreElevator/map.bin"
|
||||
},
|
||||
{
|
||||
"id": "LAYOUT_UNDERWATER1",
|
||||
"name": "Underwater1_Layout",
|
||||
"id": "LAYOUT_UNDERWATER_ROUTE124",
|
||||
"name": "Underwater_Route124_Layout",
|
||||
"width": 80,
|
||||
"height": 80,
|
||||
"primary_tileset": "gTileset_General",
|
||||
"secondary_tileset": "gTileset_Underwater",
|
||||
"border_filepath": "data/layouts/Underwater1/border.bin",
|
||||
"blockdata_filepath": "data/layouts/Underwater1/map.bin"
|
||||
"border_filepath": "data/layouts/Underwater_Route124/border.bin",
|
||||
"blockdata_filepath": "data/layouts/Underwater_Route124/map.bin"
|
||||
},
|
||||
{
|
||||
"id": "LAYOUT_MOSSDEEP_CITY_SPACE_CENTER_1F",
|
||||
@@ -4092,34 +4092,34 @@
|
||||
"blockdata_filepath": "data/layouts/TerraCave_End/map.bin"
|
||||
},
|
||||
{
|
||||
"id": "LAYOUT_UNDERWATER6",
|
||||
"name": "Underwater6_Layout",
|
||||
"id": "LAYOUT_UNDERWATER_ROUTE105",
|
||||
"name": "Underwater_Route105_Layout",
|
||||
"width": 40,
|
||||
"height": 80,
|
||||
"primary_tileset": "gTileset_General",
|
||||
"secondary_tileset": "gTileset_Underwater",
|
||||
"border_filepath": "data/layouts/Underwater6/border.bin",
|
||||
"blockdata_filepath": "data/layouts/Underwater6/map.bin"
|
||||
"border_filepath": "data/layouts/Underwater_Route105/border.bin",
|
||||
"blockdata_filepath": "data/layouts/Underwater_Route105/map.bin"
|
||||
},
|
||||
{
|
||||
"id": "LAYOUT_UNDERWATER7",
|
||||
"name": "Underwater7_Layout",
|
||||
"id": "LAYOUT_UNDERWATER_ROUTE125",
|
||||
"name": "Underwater_Route125_Layout",
|
||||
"width": 80,
|
||||
"height": 40,
|
||||
"primary_tileset": "gTileset_General",
|
||||
"secondary_tileset": "gTileset_Underwater",
|
||||
"border_filepath": "data/layouts/Underwater7/border.bin",
|
||||
"blockdata_filepath": "data/layouts/Underwater7/map.bin"
|
||||
"border_filepath": "data/layouts/Underwater_Route125/border.bin",
|
||||
"blockdata_filepath": "data/layouts/Underwater_Route125/map.bin"
|
||||
},
|
||||
{
|
||||
"id": "LAYOUT_UNDERWATER5",
|
||||
"name": "Underwater5_Layout",
|
||||
"id": "LAYOUT_UNDERWATER_ROUTE129",
|
||||
"name": "Underwater_Route129_Layout",
|
||||
"width": 80,
|
||||
"height": 40,
|
||||
"primary_tileset": "gTileset_General",
|
||||
"secondary_tileset": "gTileset_Underwater",
|
||||
"border_filepath": "data/layouts/Underwater5/border.bin",
|
||||
"blockdata_filepath": "data/layouts/Underwater5/map.bin"
|
||||
"border_filepath": "data/layouts/Underwater_Route129/border.bin",
|
||||
"blockdata_filepath": "data/layouts/Underwater_Route129/map.bin"
|
||||
},
|
||||
{
|
||||
"id": "LAYOUT_MARINE_CAVE_END",
|
||||
|
||||
@@ -443,7 +443,7 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyMultis:: @ 82421F2
|
||||
end
|
||||
|
||||
BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyLinkMultis:: @ 82421FC
|
||||
tower_unklink
|
||||
tower_closelink
|
||||
warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 255, 18, 6
|
||||
waitstate
|
||||
end
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
"flag": "0"
|
||||
},
|
||||
{
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||
"x": 25,
|
||||
"y": 8,
|
||||
"elevation": 3,
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"flag": "0"
|
||||
},
|
||||
{
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||
"x": 4,
|
||||
"y": 4,
|
||||
"elevation": 3,
|
||||
|
||||
@@ -247,7 +247,11 @@ MossdeepCity_SpaceCenter_1F_EventScript_Grunt2:: @ 822321F
|
||||
copyobjectxytoperm LOCALID_STAIR_GRUNT
|
||||
switch VAR_FACING
|
||||
case DIR_WEST, MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsWest
|
||||
case DIR_WEST, MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsEast @ BUG: This was meant to be case DIR_EAST
|
||||
#ifdef BUGFIX
|
||||
case DIR_EAST, MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsEast
|
||||
#else
|
||||
case DIR_WEST, MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsEast
|
||||
#endif
|
||||
applymovement LOCALID_STAIR_GRUNT, MossdeepCity_SpaceCenter_1F_Movement_MoveGruntFromStairs
|
||||
waitmovement 0
|
||||
setvar VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 2
|
||||
|
||||
@@ -46,7 +46,7 @@ MtChimney_CableCarStation_EventScript_RideCableCar:: @ 822AC6C
|
||||
applymovement LOCALID_ATTENDANT, MtChimney_CableCarStation_Movement_LeadPlayerToCableCar
|
||||
applymovement OBJ_EVENT_ID_PLAYER, MtChimney_CableCarStation_Movement_BoardCableCar
|
||||
waitmovement 0
|
||||
setvar VAR_0x8004, 1
|
||||
setvar VAR_0x8004, TRUE @ Going down
|
||||
setvar VAR_CABLE_CAR_STATION_STATE, 2
|
||||
incrementgamestat GAME_STAT_RODE_CABLE_CAR
|
||||
special CableCarWarp
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"movement_range_y": 0,
|
||||
"trainer_type": "TRAINER_TYPE_NONE",
|
||||
"trainer_sight_or_berry_tree_id": "0",
|
||||
"script": "NewMauville_Inside_EventScript_ItemUltraRope",
|
||||
"script": "NewMauville_Inside_EventScript_ItemUltraBall",
|
||||
"flag": "FLAG_ITEM_NEW_MAUVILLE_ULTRA_BALL"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
{
|
||||
"direction": "dive",
|
||||
"offset": 0,
|
||||
"map": "MAP_UNDERWATER6"
|
||||
"map": "MAP_UNDERWATER_ROUTE105"
|
||||
}
|
||||
],
|
||||
"object_events": [
|
||||
|
||||
@@ -47,7 +47,7 @@ Route112_CableCarStation_EventScript_RideCableCar:: @ 822AB38
|
||||
applymovement LOCALID_ATTENDANT, Route112_CableCarStation_Movement_LeadPlayerToCableCar
|
||||
applymovement OBJ_EVENT_ID_PLAYER, Route112_CableCarStation_Movement_BoardCableCar
|
||||
waitmovement 0
|
||||
setvar VAR_0x8004, 0
|
||||
setvar VAR_0x8004, FALSE @ Going up
|
||||
setvar VAR_CABLE_CAR_STATION_STATE, 1
|
||||
incrementgamestat GAME_STAT_RODE_CABLE_CAR
|
||||
special CableCarWarp
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
"flag": "0"
|
||||
},
|
||||
{
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||
"x": 39,
|
||||
"y": 4,
|
||||
"elevation": 3,
|
||||
|
||||
@@ -468,7 +468,7 @@
|
||||
"flag": "0"
|
||||
},
|
||||
{
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||
"x": 31,
|
||||
"y": 6,
|
||||
"elevation": 3,
|
||||
@@ -481,7 +481,7 @@
|
||||
"flag": "FLAG_HIDE_ROUTE_119_KECLEON_1"
|
||||
},
|
||||
{
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||
"x": 25,
|
||||
"y": 15,
|
||||
"elevation": 3,
|
||||
|
||||
@@ -403,7 +403,7 @@
|
||||
"flag": "FLAG_ITEM_ROUTE_120_HYPER_POTION"
|
||||
},
|
||||
{
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||
"x": 12,
|
||||
"y": 16,
|
||||
"elevation": 4,
|
||||
@@ -412,8 +412,8 @@
|
||||
"movement_range_y": 1,
|
||||
"trainer_type": "TRAINER_TYPE_NONE",
|
||||
"trainer_sight_or_berry_tree_id": "0",
|
||||
"script": "Route120_EventScript_InvisibleBridgeKecleon",
|
||||
"flag": "FLAG_HIDE_ROUTE_120_KECLEON_BRIDGE_INVISIBLE"
|
||||
"script": "Route120_EventScript_BridgeKecleon",
|
||||
"flag": "FLAG_HIDE_ROUTE_120_KECLEON_BRIDGE"
|
||||
},
|
||||
{
|
||||
"graphics_id": "OBJ_EVENT_GFX_STEVEN",
|
||||
@@ -481,7 +481,7 @@
|
||||
"flag": "0"
|
||||
},
|
||||
{
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_2",
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_BRIDGE_SHADOW",
|
||||
"x": 12,
|
||||
"y": 16,
|
||||
"elevation": 3,
|
||||
@@ -491,10 +491,10 @@
|
||||
"trainer_type": "TRAINER_TYPE_NONE",
|
||||
"trainer_sight_or_berry_tree_id": "0",
|
||||
"script": "0x0",
|
||||
"flag": "FLAG_HIDE_ROUTE_120_KECLEON_BRIDGE_VISIBLE"
|
||||
"flag": "FLAG_HIDE_ROUTE_120_KECLEON_BRIDGE_SHADOW"
|
||||
},
|
||||
{
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||
"x": 20,
|
||||
"y": 11,
|
||||
"elevation": 3,
|
||||
@@ -507,7 +507,7 @@
|
||||
"flag": "FLAG_HIDE_ROUTE_120_KECLEON_1"
|
||||
},
|
||||
{
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||
"x": 27,
|
||||
"y": 2,
|
||||
"elevation": 3,
|
||||
@@ -520,7 +520,7 @@
|
||||
"flag": "FLAG_HIDE_ROUTE_120_KECLEON_2"
|
||||
},
|
||||
{
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||
"x": 4,
|
||||
"y": 77,
|
||||
"elevation": 3,
|
||||
@@ -533,7 +533,7 @@
|
||||
"flag": "FLAG_HIDE_ROUTE_120_KECLEON_3"
|
||||
},
|
||||
{
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||
"x": 7,
|
||||
"y": 51,
|
||||
"elevation": 3,
|
||||
@@ -546,7 +546,7 @@
|
||||
"flag": "FLAG_HIDE_ROUTE_120_KECLEON_5"
|
||||
},
|
||||
{
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||
"x": 19,
|
||||
"y": 48,
|
||||
"elevation": 3,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.set LOCALID_INVISIBLE_BRIDGE_KECLEON, 30
|
||||
.set LOCALID_BRIDGE_KECLEON, 30
|
||||
.set LOCALID_STEVEN, 31
|
||||
.set LOCALID_VISIBLE_BRIDGE_KECLEON, 36
|
||||
.set LOCALID_BRIDGE_KECLEON_SHADOW, 36 @ They use a second object which is identical to Kecleon but has a reflection palette tag for the bridge shadow
|
||||
|
||||
Route120_MapScripts:: @ 81F53EC
|
||||
map_script MAP_SCRIPT_ON_RESUME, Route120_OnResume
|
||||
@@ -31,8 +31,8 @@ Route120_EventScript_RemoveBridgeKecleon:: @ 81F5449
|
||||
specialvar VAR_RESULT, GetBattleOutcome
|
||||
compare VAR_RESULT, B_OUTCOME_CAUGHT
|
||||
goto_if_ne Common_EventScript_NopReturn
|
||||
removeobject LOCALID_INVISIBLE_BRIDGE_KECLEON
|
||||
removeobject LOCALID_VISIBLE_BRIDGE_KECLEON
|
||||
removeobject LOCALID_BRIDGE_KECLEON
|
||||
removeobject LOCALID_BRIDGE_KECLEON_SHADOW
|
||||
return
|
||||
|
||||
Route120_EventScript_RemoveKecleon:: @ 81F5460
|
||||
@@ -61,7 +61,7 @@ Route120_EventScript_SetBridgeClearMetatiles:: @ 81F54A3
|
||||
return
|
||||
|
||||
Route120_EventScript_SetBridgeKecleonMovement:: @ 81F54C8
|
||||
setobjectmovementtype LOCALID_VISIBLE_BRIDGE_KECLEON, MOVEMENT_TYPE_FACE_RIGHT
|
||||
setobjectmovementtype LOCALID_BRIDGE_KECLEON_SHADOW, MOVEMENT_TYPE_FACE_RIGHT
|
||||
return
|
||||
|
||||
Route120_OnTransition: @ 81F54CD
|
||||
@@ -205,9 +205,9 @@ Route120_EventScript_StevenBattleKecleon:: @ 81F568B
|
||||
delay 20
|
||||
msgbox Route120_Text_StevenUsedDevonScope, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
applymovement LOCALID_INVISIBLE_BRIDGE_KECLEON, Common_Movement_WalkInPlaceFastestRight
|
||||
applymovement LOCALID_BRIDGE_KECLEON, Common_Movement_WalkInPlaceFastestRight
|
||||
waitmovement 0
|
||||
applymovement LOCALID_INVISIBLE_BRIDGE_KECLEON, Movement_KecleonAppears
|
||||
applymovement LOCALID_BRIDGE_KECLEON, Movement_KecleonAppears
|
||||
waitmovement 0
|
||||
waitse
|
||||
playmoncry SPECIES_KECLEON, 2
|
||||
@@ -230,8 +230,8 @@ Route120_EventScript_StevenBattleKecleon:: @ 81F568B
|
||||
|
||||
Route120_EventScript_RemoveBridgeKecleonPostBattle:: @ 81F571C
|
||||
fadescreenswapbuffers FADE_TO_BLACK
|
||||
removeobject LOCALID_INVISIBLE_BRIDGE_KECLEON
|
||||
removeobject LOCALID_VISIBLE_BRIDGE_KECLEON
|
||||
removeobject LOCALID_BRIDGE_KECLEON
|
||||
removeobject LOCALID_BRIDGE_KECLEON_SHADOW
|
||||
fadescreenswapbuffers FADE_FROM_BLACK
|
||||
goto Route120_EventScript_StevenGiveDeconScope
|
||||
end
|
||||
@@ -276,7 +276,7 @@ Route120_Movement_ApproachKecleonWest: @ 81F57B9
|
||||
walk_left
|
||||
step_end
|
||||
|
||||
Route120_EventScript_InvisibleBridgeKecleon:: @ 81F57BC
|
||||
Route120_EventScript_BridgeKecleon:: @ 81F57BC
|
||||
msgbox Kecleon_Text_SomethingUnseeable, MSGBOX_NPC
|
||||
end
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
{
|
||||
"direction": "dive",
|
||||
"offset": 0,
|
||||
"map": "MAP_UNDERWATER1"
|
||||
"map": "MAP_UNDERWATER_ROUTE124"
|
||||
}
|
||||
],
|
||||
"object_events": [
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
{
|
||||
"direction": "dive",
|
||||
"offset": 0,
|
||||
"map": "MAP_UNDERWATER7"
|
||||
"map": "MAP_UNDERWATER_ROUTE125"
|
||||
}
|
||||
],
|
||||
"object_events": [
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
{
|
||||
"direction": "dive",
|
||||
"offset": 0,
|
||||
"map": "MAP_UNDERWATER2"
|
||||
"map": "MAP_UNDERWATER_ROUTE126"
|
||||
}
|
||||
],
|
||||
"object_events": [
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
{
|
||||
"direction": "dive",
|
||||
"offset": 0,
|
||||
"map": "MAP_UNDERWATER3"
|
||||
"map": "MAP_UNDERWATER_ROUTE127"
|
||||
}
|
||||
],
|
||||
"object_events": [
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
{
|
||||
"direction": "dive",
|
||||
"offset": 0,
|
||||
"map": "MAP_UNDERWATER4"
|
||||
"map": "MAP_UNDERWATER_ROUTE128"
|
||||
}
|
||||
],
|
||||
"object_events": [
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
{
|
||||
"direction": "dive",
|
||||
"offset": 0,
|
||||
"map": "MAP_UNDERWATER5"
|
||||
"map": "MAP_UNDERWATER_ROUTE129"
|
||||
}
|
||||
],
|
||||
"object_events": [
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"x": 10,
|
||||
"y": 18,
|
||||
"elevation": 3,
|
||||
"dest_map": "MAP_UNDERWATER4",
|
||||
"dest_map": "MAP_UNDERWATER_ROUTE128",
|
||||
"dest_warp_id": 0
|
||||
},
|
||||
{
|
||||
|
||||
@@ -235,7 +235,7 @@ SootopolisCity_EventScript_LegendariesSceneFromPokeCenter:: @ 81E5946
|
||||
fadescreenspeed FADE_TO_BLACK, 8
|
||||
setweather WEATHER_ABNORMAL
|
||||
doweather
|
||||
setvar VAR_0x8004, 0
|
||||
setvar VAR_0x8004, FALSE @ Just do Groudon/Kyogre fight scene
|
||||
special Script_DoRayquazaScene
|
||||
waitstate
|
||||
applymovement LOCALID_KYOGRE, Common_Movement_WalkInPlaceFastestLeft
|
||||
@@ -335,7 +335,7 @@ SootopolisCity_EventScript_LegendariesSceneFromDive:: @ 81E5A82
|
||||
fadescreenspeed FADE_TO_BLACK, 8
|
||||
setweather WEATHER_ABNORMAL
|
||||
doweather
|
||||
setvar VAR_0x8004, 0
|
||||
setvar VAR_0x8004, FALSE @ Just do Groudon/Kyogre fight scene
|
||||
special Script_DoRayquazaScene
|
||||
waitstate
|
||||
applymovement LOCALID_KYOGRE, Common_Movement_WalkInPlaceFastestLeft
|
||||
@@ -528,7 +528,7 @@ SootopolisCity_EventScript_RayquazaSceneFromPokeCenter:: @ 81E5C1E
|
||||
removeobject LOCALID_GROUDON
|
||||
removeobject LOCALID_KYOGRE
|
||||
addobject LOCALID_RAYQUAZA
|
||||
setvar VAR_0x8004, 1
|
||||
setvar VAR_0x8004, TRUE
|
||||
special Script_DoRayquazaScene
|
||||
waitstate
|
||||
playse SE_THUNDER
|
||||
@@ -581,7 +581,7 @@ SootopolisCity_EventScript_RayquazaSceneFromDive:: @ 81E5CCE
|
||||
removeobject LOCALID_GROUDON
|
||||
removeobject LOCALID_KYOGRE
|
||||
addobject LOCALID_RAYQUAZA
|
||||
setvar VAR_0x8004, 1
|
||||
setvar VAR_0x8004, TRUE
|
||||
special Script_DoRayquazaScene
|
||||
waitstate
|
||||
special SpawnCameraObject
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"flag": "0"
|
||||
},
|
||||
{
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||
"x": 2,
|
||||
"y": 3,
|
||||
"elevation": 3,
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
Underwater1_MapScripts:: @ 81F7722
|
||||
.byte 0
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
Underwater2_MapScripts:: @ 81F7723
|
||||
.byte 0
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
Underwater3_MapScripts:: @ 81F7724
|
||||
map_script MAP_SCRIPT_ON_RESUME, Underwater3_OnResume
|
||||
.byte 0
|
||||
|
||||
Underwater3_OnResume: @ 81F772A
|
||||
call AbnormalWeather_Underwater_SetupEscapeWarp
|
||||
end
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
Underwater4_MapScripts:: @ 81F7730
|
||||
.byte 0
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
Underwater5_MapScripts:: @ 81F7731
|
||||
map_script MAP_SCRIPT_ON_RESUME, Underwater5_OnResume
|
||||
.byte 0
|
||||
|
||||
Underwater5_OnResume: @ 81F7737
|
||||
call AbnormalWeather_Underwater_SetupEscapeWarp
|
||||
end
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
Underwater6_MapScripts:: @ 81F773D
|
||||
map_script MAP_SCRIPT_ON_RESUME, Underwater6_OnResume
|
||||
.byte 0
|
||||
|
||||
Underwater6_OnResume: @ 81F7743
|
||||
call AbnormalWeather_Underwater_SetupEscapeWarp
|
||||
end
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
Underwater7_MapScripts:: @ 81F7749
|
||||
map_script MAP_SCRIPT_ON_RESUME, Underwater7_OnResume
|
||||
.byte 0
|
||||
|
||||
Underwater7_OnResume: @ 81F774F
|
||||
call AbnormalWeather_Underwater_SetupEscapeWarp
|
||||
end
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"id": "MAP_UNDERWATER6",
|
||||
"name": "Underwater6",
|
||||
"layout": "LAYOUT_UNDERWATER6",
|
||||
"id": "MAP_UNDERWATER_ROUTE105",
|
||||
"name": "Underwater_Route105",
|
||||
"layout": "LAYOUT_UNDERWATER_ROUTE105",
|
||||
"music": "MUS_UNDERWATER",
|
||||
"region_map_section": "MAPSEC_UNDERWATER_TERRA_CAVE",
|
||||
"region_map_section": "MAPSEC_UNDERWATER_105",
|
||||
"requires_flash": false,
|
||||
"weather": "WEATHER_UNDERWATER_BUBBLES",
|
||||
"map_type": "MAP_TYPE_UNDERWATER",
|
||||
8
data/maps/Underwater_Route105/scripts.inc
Normal file
@@ -0,0 +1,8 @@
|
||||
Underwater_Route105_MapScripts:: @ 81F773D
|
||||
map_script MAP_SCRIPT_ON_RESUME, Underwater_Route105_OnResume
|
||||
.byte 0
|
||||
|
||||
Underwater_Route105_OnResume: @ 81F7743
|
||||
call AbnormalWeather_Underwater_SetupEscapeWarp
|
||||
end
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "MAP_UNDERWATER1",
|
||||
"name": "Underwater1",
|
||||
"layout": "LAYOUT_UNDERWATER1",
|
||||
"id": "MAP_UNDERWATER_ROUTE124",
|
||||
"name": "Underwater_Route124",
|
||||
"layout": "LAYOUT_UNDERWATER_ROUTE124",
|
||||
"music": "MUS_UNDERWATER",
|
||||
"region_map_section": "MAPSEC_UNDERWATER_124",
|
||||
"requires_flash": false,
|
||||
@@ -16,7 +16,7 @@
|
||||
{
|
||||
"direction": "down",
|
||||
"offset": 0,
|
||||
"map": "MAP_UNDERWATER2"
|
||||
"map": "MAP_UNDERWATER_ROUTE126"
|
||||
},
|
||||
{
|
||||
"direction": "emerge",
|
||||
@@ -34,7 +34,7 @@
|
||||
"y": 51,
|
||||
"elevation": 0,
|
||||
"item": "ITEM_CARBOS",
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_1_CARBOS"
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_124_CARBOS"
|
||||
},
|
||||
{
|
||||
"type": "hidden_item",
|
||||
@@ -42,7 +42,7 @@
|
||||
"y": 40,
|
||||
"elevation": 0,
|
||||
"item": "ITEM_GREEN_SHARD",
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_1_GREEN_SHARD"
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_124_GREEN_SHARD"
|
||||
},
|
||||
{
|
||||
"type": "hidden_item",
|
||||
@@ -50,7 +50,7 @@
|
||||
"y": 34,
|
||||
"elevation": 3,
|
||||
"item": "ITEM_PEARL",
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_1_PEARL"
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_124_PEARL"
|
||||
},
|
||||
{
|
||||
"type": "hidden_item",
|
||||
@@ -58,7 +58,7 @@
|
||||
"y": 54,
|
||||
"elevation": 3,
|
||||
"item": "ITEM_BIG_PEARL",
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_1_BIG_PEARL"
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_124_BIG_PEARL"
|
||||
},
|
||||
{
|
||||
"type": "hidden_item",
|
||||
@@ -66,7 +66,7 @@
|
||||
"y": 64,
|
||||
"elevation": 3,
|
||||
"item": "ITEM_HEART_SCALE",
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_1_HEART_SCALE_1"
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_124_HEART_SCALE_1"
|
||||
},
|
||||
{
|
||||
"type": "hidden_item",
|
||||
@@ -74,7 +74,7 @@
|
||||
"y": 5,
|
||||
"elevation": 3,
|
||||
"item": "ITEM_CALCIUM",
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_1_CALCIUM"
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_124_CALCIUM"
|
||||
},
|
||||
{
|
||||
"type": "hidden_item",
|
||||
@@ -82,7 +82,7 @@
|
||||
"y": 36,
|
||||
"elevation": 3,
|
||||
"item": "ITEM_HEART_SCALE",
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_1_HEART_SCALE_2"
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_124_HEART_SCALE_2"
|
||||
}
|
||||
]
|
||||
}
|
||||
3
data/maps/Underwater_Route124/scripts.inc
Normal file
@@ -0,0 +1,3 @@
|
||||
Underwater_Route124_MapScripts:: @ 81F7722
|
||||
.byte 0
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"id": "MAP_UNDERWATER7",
|
||||
"name": "Underwater7",
|
||||
"layout": "LAYOUT_UNDERWATER7",
|
||||
"id": "MAP_UNDERWATER_ROUTE125",
|
||||
"name": "Underwater_Route125",
|
||||
"layout": "LAYOUT_UNDERWATER_ROUTE125",
|
||||
"music": "MUS_UNDERWATER",
|
||||
"region_map_section": "MAPSEC_UNDERWATER_UNK1",
|
||||
"region_map_section": "MAPSEC_UNDERWATER_125",
|
||||
"requires_flash": false,
|
||||
"weather": "WEATHER_UNDERWATER_BUBBLES",
|
||||
"map_type": "MAP_TYPE_UNDERWATER",
|
||||
8
data/maps/Underwater_Route125/scripts.inc
Normal file
@@ -0,0 +1,8 @@
|
||||
Underwater_Route125_MapScripts:: @ 81F7749
|
||||
map_script MAP_SCRIPT_ON_RESUME, Underwater_Route125_OnResume
|
||||
.byte 0
|
||||
|
||||
Underwater_Route125_OnResume: @ 81F774F
|
||||
call AbnormalWeather_Underwater_SetupEscapeWarp
|
||||
end
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"id": "MAP_UNDERWATER2",
|
||||
"name": "Underwater2",
|
||||
"layout": "LAYOUT_UNDERWATER2",
|
||||
"id": "MAP_UNDERWATER_ROUTE126",
|
||||
"name": "Underwater_Route126",
|
||||
"layout": "LAYOUT_UNDERWATER_ROUTE126",
|
||||
"music": "MUS_UNDERWATER",
|
||||
"region_map_section": "MAPSEC_UNDERWATER_125",
|
||||
"region_map_section": "MAPSEC_UNDERWATER_126",
|
||||
"requires_flash": false,
|
||||
"weather": "WEATHER_UNDERWATER_BUBBLES",
|
||||
"map_type": "MAP_TYPE_UNDERWATER",
|
||||
@@ -16,12 +16,12 @@
|
||||
{
|
||||
"direction": "up",
|
||||
"offset": 0,
|
||||
"map": "MAP_UNDERWATER1"
|
||||
"map": "MAP_UNDERWATER_ROUTE124"
|
||||
},
|
||||
{
|
||||
"direction": "right",
|
||||
"offset": 0,
|
||||
"map": "MAP_UNDERWATER3"
|
||||
"map": "MAP_UNDERWATER_ROUTE127"
|
||||
},
|
||||
{
|
||||
"direction": "emerge",
|
||||
@@ -47,7 +47,7 @@
|
||||
"y": 17,
|
||||
"elevation": 3,
|
||||
"item": "ITEM_HEART_SCALE",
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_2_HEART_SCALE"
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_126_HEART_SCALE"
|
||||
},
|
||||
{
|
||||
"type": "hidden_item",
|
||||
@@ -55,7 +55,7 @@
|
||||
"y": 19,
|
||||
"elevation": 3,
|
||||
"item": "ITEM_ULTRA_BALL",
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_2_ULTRA_BALL"
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_126_ULTRA_BALL"
|
||||
},
|
||||
{
|
||||
"type": "hidden_item",
|
||||
@@ -63,7 +63,7 @@
|
||||
"y": 19,
|
||||
"elevation": 3,
|
||||
"item": "ITEM_STARDUST",
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_2_STARDUST"
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_126_STARDUST"
|
||||
},
|
||||
{
|
||||
"type": "hidden_item",
|
||||
@@ -71,7 +71,7 @@
|
||||
"y": 36,
|
||||
"elevation": 3,
|
||||
"item": "ITEM_PEARL",
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_2_PEARL"
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_126_PEARL"
|
||||
},
|
||||
{
|
||||
"type": "hidden_item",
|
||||
@@ -79,7 +79,7 @@
|
||||
"y": 39,
|
||||
"elevation": 3,
|
||||
"item": "ITEM_IRON",
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_2_IRON"
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_126_IRON"
|
||||
},
|
||||
{
|
||||
"type": "hidden_item",
|
||||
@@ -87,7 +87,7 @@
|
||||
"y": 35,
|
||||
"elevation": 3,
|
||||
"item": "ITEM_YELLOW_SHARD",
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_2_YELLOW_SHARD"
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_126_YELLOW_SHARD"
|
||||
},
|
||||
{
|
||||
"type": "hidden_item",
|
||||
@@ -95,7 +95,7 @@
|
||||
"y": 60,
|
||||
"elevation": 3,
|
||||
"item": "ITEM_BIG_PEARL",
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_2_BIG_PEARL"
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_126_BIG_PEARL"
|
||||
},
|
||||
{
|
||||
"type": "hidden_item",
|
||||
@@ -103,7 +103,7 @@
|
||||
"y": 77,
|
||||
"elevation": 3,
|
||||
"item": "ITEM_BLUE_SHARD",
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_2_BLUE_SHARD"
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_126_BLUE_SHARD"
|
||||
}
|
||||
]
|
||||
}
|
||||
3
data/maps/Underwater_Route126/scripts.inc
Normal file
@@ -0,0 +1,3 @@
|
||||
Underwater_Route126_MapScripts:: @ 81F7723
|
||||
.byte 0
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"id": "MAP_UNDERWATER3",
|
||||
"name": "Underwater3",
|
||||
"layout": "LAYOUT_UNDERWATER3",
|
||||
"id": "MAP_UNDERWATER_ROUTE127",
|
||||
"name": "Underwater_Route127",
|
||||
"layout": "LAYOUT_UNDERWATER_ROUTE127",
|
||||
"music": "MUS_UNDERWATER",
|
||||
"region_map_section": "MAPSEC_UNDERWATER_126",
|
||||
"region_map_section": "MAPSEC_UNDERWATER_127",
|
||||
"requires_flash": false,
|
||||
"weather": "WEATHER_UNDERWATER_BUBBLES",
|
||||
"map_type": "MAP_TYPE_UNDERWATER",
|
||||
@@ -21,12 +21,12 @@
|
||||
{
|
||||
"direction": "left",
|
||||
"offset": 0,
|
||||
"map": "MAP_UNDERWATER2"
|
||||
"map": "MAP_UNDERWATER_ROUTE126"
|
||||
},
|
||||
{
|
||||
"direction": "down",
|
||||
"offset": 0,
|
||||
"map": "MAP_UNDERWATER4"
|
||||
"map": "MAP_UNDERWATER_ROUTE128"
|
||||
}
|
||||
],
|
||||
"object_events": [],
|
||||
@@ -54,7 +54,7 @@
|
||||
"y": 42,
|
||||
"elevation": 3,
|
||||
"item": "ITEM_STAR_PIECE",
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_3_STAR_PIECE"
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_127_STAR_PIECE"
|
||||
},
|
||||
{
|
||||
"type": "hidden_item",
|
||||
@@ -62,7 +62,7 @@
|
||||
"y": 36,
|
||||
"elevation": 3,
|
||||
"item": "ITEM_HP_UP",
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_3_HP_UP"
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_127_HP_UP"
|
||||
},
|
||||
{
|
||||
"type": "hidden_item",
|
||||
@@ -70,7 +70,7 @@
|
||||
"y": 72,
|
||||
"elevation": 3,
|
||||
"item": "ITEM_HEART_SCALE",
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_3_HEART_SCALE"
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_127_HEART_SCALE"
|
||||
},
|
||||
{
|
||||
"type": "hidden_item",
|
||||
@@ -78,7 +78,7 @@
|
||||
"y": 20,
|
||||
"elevation": 3,
|
||||
"item": "ITEM_RED_SHARD",
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_3_RED_SHARD"
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_127_RED_SHARD"
|
||||
}
|
||||
]
|
||||
}
|
||||
8
data/maps/Underwater_Route127/scripts.inc
Normal file
@@ -0,0 +1,8 @@
|
||||
Underwater_Route127_MapScripts:: @ 81F7724
|
||||
map_script MAP_SCRIPT_ON_RESUME, Underwater_Route127_OnResume
|
||||
.byte 0
|
||||
|
||||
Underwater_Route127_OnResume: @ 81F772A
|
||||
call AbnormalWeather_Underwater_SetupEscapeWarp
|
||||
end
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"id": "MAP_UNDERWATER4",
|
||||
"name": "Underwater4",
|
||||
"layout": "LAYOUT_UNDERWATER4",
|
||||
"id": "MAP_UNDERWATER_ROUTE128",
|
||||
"name": "Underwater_Route128",
|
||||
"layout": "LAYOUT_UNDERWATER_ROUTE128",
|
||||
"music": "MUS_UNDERWATER",
|
||||
"region_map_section": "MAPSEC_UNDERWATER_127",
|
||||
"region_map_section": "MAPSEC_UNDERWATER_128",
|
||||
"requires_flash": false,
|
||||
"weather": "WEATHER_UNDERWATER_BUBBLES",
|
||||
"map_type": "MAP_TYPE_UNDERWATER",
|
||||
@@ -16,7 +16,7 @@
|
||||
{
|
||||
"direction": "up",
|
||||
"offset": 0,
|
||||
"map": "MAP_UNDERWATER3"
|
||||
"map": "MAP_UNDERWATER_ROUTE127"
|
||||
},
|
||||
{
|
||||
"direction": "emerge",
|
||||
@@ -42,7 +42,7 @@
|
||||
"y": 19,
|
||||
"elevation": 3,
|
||||
"item": "ITEM_PROTEIN",
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_4_PROTEIN"
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_128_PROTEIN"
|
||||
},
|
||||
{
|
||||
"type": "hidden_item",
|
||||
@@ -50,7 +50,7 @@
|
||||
"y": 18,
|
||||
"elevation": 3,
|
||||
"item": "ITEM_PEARL",
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_4_PEARL"
|
||||
"flag": "FLAG_HIDDEN_ITEM_UNDERWATER_128_PEARL"
|
||||
}
|
||||
]
|
||||
}
|
||||
3
data/maps/Underwater_Route128/scripts.inc
Normal file
@@ -0,0 +1,3 @@
|
||||
Underwater_Route128_MapScripts:: @ 81F7730
|
||||
.byte 0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "MAP_UNDERWATER5",
|
||||
"name": "Underwater5",
|
||||
"layout": "LAYOUT_UNDERWATER5",
|
||||
"id": "MAP_UNDERWATER_ROUTE129",
|
||||
"name": "Underwater_Route129",
|
||||
"layout": "LAYOUT_UNDERWATER_ROUTE129",
|
||||
"music": "MUS_UNDERWATER",
|
||||
"region_map_section": "MAPSEC_UNDERWATER_129",
|
||||
"requires_flash": false,
|
||||
8
data/maps/Underwater_Route129/scripts.inc
Normal file
@@ -0,0 +1,8 @@
|
||||
Underwater_Route129_MapScripts:: @ 81F7731
|
||||
map_script MAP_SCRIPT_ON_RESUME, Underwater_Route129_OnResume
|
||||
.byte 0
|
||||
|
||||
Underwater_Route129_OnResume: @ 81F7737
|
||||
call AbnormalWeather_Underwater_SetupEscapeWarp
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"name": "Underwater_SeafloorCavern",
|
||||
"layout": "LAYOUT_UNDERWATER_SEAFLOOR_CAVERN",
|
||||
"music": "MUS_UNDERWATER",
|
||||
"region_map_section": "MAPSEC_UNDERWATER_128",
|
||||
"region_map_section": "MAPSEC_UNDERWATER_SEAFLOOR_CAVERN",
|
||||
"requires_flash": false,
|
||||
"weather": "WEATHER_UNDERWATER_BUBBLES",
|
||||
"map_type": "MAP_TYPE_UNDERWATER",
|
||||
@@ -72,7 +72,7 @@
|
||||
"x": 6,
|
||||
"y": 7,
|
||||
"elevation": 0,
|
||||
"dest_map": "MAP_UNDERWATER4",
|
||||
"dest_map": "MAP_UNDERWATER_ROUTE128",
|
||||
"dest_warp_id": 0
|
||||
}
|
||||
],
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
"x": 9,
|
||||
"y": 8,
|
||||
"elevation": 0,
|
||||
"dest_map": "MAP_UNDERWATER2",
|
||||
"dest_map": "MAP_UNDERWATER_ROUTE126",
|
||||
"dest_warp_id": 0
|
||||
},
|
||||
{
|
||||
"x": 10,
|
||||
"y": 8,
|
||||
"elevation": 0,
|
||||
"dest_map": "MAP_UNDERWATER2",
|
||||
"dest_map": "MAP_UNDERWATER_ROUTE126",
|
||||
"dest_warp_id": 0
|
||||
}
|
||||
],
|
||||
|
||||
@@ -86,13 +86,13 @@
|
||||
"Route132",
|
||||
"Route133",
|
||||
"Route134",
|
||||
"Underwater1",
|
||||
"Underwater2",
|
||||
"Underwater3",
|
||||
"Underwater4",
|
||||
"Underwater5",
|
||||
"Underwater6",
|
||||
"Underwater7"
|
||||
"Underwater_Route124",
|
||||
"Underwater_Route126",
|
||||
"Underwater_Route127",
|
||||
"Underwater_Route128",
|
||||
"Underwater_Route129",
|
||||
"Underwater_Route105",
|
||||
"Underwater_Route125"
|
||||
],
|
||||
"gMapGroup1": [
|
||||
"LittlerootTown_BrendansHouse_1F",
|
||||
@@ -672,13 +672,13 @@
|
||||
"Route132",
|
||||
"Route133",
|
||||
"Route134",
|
||||
"Underwater6",
|
||||
"Underwater1",
|
||||
"Underwater7",
|
||||
"Underwater2",
|
||||
"Underwater3",
|
||||
"Underwater4",
|
||||
"Underwater5",
|
||||
"Underwater_Route105",
|
||||
"Underwater_Route124",
|
||||
"Underwater_Route125",
|
||||
"Underwater_Route126",
|
||||
"Underwater_Route127",
|
||||
"Underwater_Route128",
|
||||
"Underwater_Route129",
|
||||
"SafariZone_Northwest",
|
||||
"SafariZone_North",
|
||||
"SafariZone_Southwest",
|
||||
|
||||
@@ -2,21 +2,21 @@
|
||||
|
||||
.align 2
|
||||
gMysteryEventScriptCmdTable:: @ 82DED2C
|
||||
.4byte MEScrCmd_nop
|
||||
.4byte MEScrCmd_checkcompat
|
||||
.4byte MEScrCmd_end
|
||||
.4byte MEScrCmd_setmsg
|
||||
.4byte MEScrCmd_setstatus
|
||||
.4byte MEScrCmd_runscript
|
||||
.4byte MEScrCmd_initramscript
|
||||
.4byte MEScrCmd_setenigmaberry
|
||||
.4byte MEScrCmd_giveribbon
|
||||
.4byte MEScrCmd_givenationaldex
|
||||
.4byte MEScrCmd_addrareword
|
||||
.4byte MEScrCmd_setrecordmixinggift
|
||||
.4byte MEScrCmd_givepokemon
|
||||
.4byte MEScrCmd_addtrainer
|
||||
.4byte MEScrCmd_enableresetrtc
|
||||
.4byte MEScrCmd_checksum
|
||||
.4byte MEScrCmd_crc
|
||||
.4byte MEScrCmd_nop @ 0x00
|
||||
.4byte MEScrCmd_checkcompat @ 0x01
|
||||
.4byte MEScrCmd_end @ 0x02
|
||||
.4byte MEScrCmd_setmsg @ 0x03
|
||||
.4byte MEScrCmd_setstatus @ 0x04
|
||||
.4byte MEScrCmd_runscript @ 0x05
|
||||
.4byte MEScrCmd_initramscript @ 0x06
|
||||
.4byte MEScrCmd_setenigmaberry @ 0x07
|
||||
.4byte MEScrCmd_giveribbon @ 0x08
|
||||
.4byte MEScrCmd_givenationaldex @ 0x09
|
||||
.4byte MEScrCmd_addrareword @ 0x0a
|
||||
.4byte MEScrCmd_setrecordmixinggift @ 0x0b
|
||||
.4byte MEScrCmd_givepokemon @ 0x0c
|
||||
.4byte MEScrCmd_addtrainer @ 0x0d
|
||||
.4byte MEScrCmd_enableresetrtc @ 0x0e
|
||||
.4byte MEScrCmd_checksum @ 0x0f
|
||||
.4byte MEScrCmd_crc @ 0x10
|
||||
gMysteryEventScriptCmdTableEnd::
|
||||
|
||||
@@ -1,232 +1,232 @@
|
||||
.align 2
|
||||
gScriptCmdTable:: @ 81DB67C
|
||||
.4byte ScrCmd_nop
|
||||
.4byte ScrCmd_nop1
|
||||
.4byte ScrCmd_end
|
||||
.4byte ScrCmd_return
|
||||
.4byte ScrCmd_call
|
||||
.4byte ScrCmd_goto
|
||||
.4byte ScrCmd_goto_if
|
||||
.4byte ScrCmd_call_if
|
||||
.4byte ScrCmd_gotostd
|
||||
.4byte ScrCmd_callstd
|
||||
.4byte ScrCmd_gotostd_if
|
||||
.4byte ScrCmd_callstd_if
|
||||
.4byte ScrCmd_returnram
|
||||
.4byte ScrCmd_killscript
|
||||
.4byte ScrCmd_setmysteryeventstatus
|
||||
.4byte ScrCmd_loadword
|
||||
.4byte ScrCmd_loadbyte
|
||||
.4byte ScrCmd_writebytetoaddr
|
||||
.4byte ScrCmd_loadbytefromaddr
|
||||
.4byte ScrCmd_setptrbyte
|
||||
.4byte ScrCmd_copylocal
|
||||
.4byte ScrCmd_copybyte
|
||||
.4byte ScrCmd_setvar
|
||||
.4byte ScrCmd_addvar
|
||||
.4byte ScrCmd_subvar
|
||||
.4byte ScrCmd_copyvar
|
||||
.4byte ScrCmd_setorcopyvar
|
||||
.4byte ScrCmd_compare_local_to_local
|
||||
.4byte ScrCmd_compare_local_to_value
|
||||
.4byte ScrCmd_compare_local_to_addr
|
||||
.4byte ScrCmd_compare_addr_to_local
|
||||
.4byte ScrCmd_compare_addr_to_value
|
||||
.4byte ScrCmd_compare_addr_to_addr
|
||||
.4byte ScrCmd_compare_var_to_value
|
||||
.4byte ScrCmd_compare_var_to_var
|
||||
.4byte ScrCmd_callnative
|
||||
.4byte ScrCmd_gotonative
|
||||
.4byte ScrCmd_special
|
||||
.4byte ScrCmd_specialvar
|
||||
.4byte ScrCmd_waitstate
|
||||
.4byte ScrCmd_delay
|
||||
.4byte ScrCmd_setflag
|
||||
.4byte ScrCmd_clearflag
|
||||
.4byte ScrCmd_checkflag
|
||||
.4byte ScrCmd_initclock
|
||||
.4byte ScrCmd_dotimebasedevents
|
||||
.4byte ScrCmd_gettime
|
||||
.4byte ScrCmd_playse
|
||||
.4byte ScrCmd_waitse
|
||||
.4byte ScrCmd_playfanfare
|
||||
.4byte ScrCmd_waitfanfare
|
||||
.4byte ScrCmd_playbgm
|
||||
.4byte ScrCmd_savebgm
|
||||
.4byte ScrCmd_fadedefaultbgm
|
||||
.4byte ScrCmd_fadenewbgm
|
||||
.4byte ScrCmd_fadeoutbgm
|
||||
.4byte ScrCmd_fadeinbgm
|
||||
.4byte ScrCmd_warp
|
||||
.4byte ScrCmd_warpsilent
|
||||
.4byte ScrCmd_warpdoor
|
||||
.4byte ScrCmd_warphole
|
||||
.4byte ScrCmd_warpteleport
|
||||
.4byte ScrCmd_setwarp
|
||||
.4byte ScrCmd_setdynamicwarp
|
||||
.4byte ScrCmd_setdivewarp
|
||||
.4byte ScrCmd_setholewarp
|
||||
.4byte ScrCmd_getplayerxy
|
||||
.4byte ScrCmd_getpartysize
|
||||
.4byte ScrCmd_additem
|
||||
.4byte ScrCmd_removeitem
|
||||
.4byte ScrCmd_checkitemspace
|
||||
.4byte ScrCmd_checkitem
|
||||
.4byte ScrCmd_checkitemtype
|
||||
.4byte ScrCmd_addpcitem
|
||||
.4byte ScrCmd_checkpcitem
|
||||
.4byte ScrCmd_adddecoration
|
||||
.4byte ScrCmd_removedecoration
|
||||
.4byte ScrCmd_checkdecor
|
||||
.4byte ScrCmd_checkdecorspace
|
||||
.4byte ScrCmd_applymovement
|
||||
.4byte ScrCmd_applymovement_at
|
||||
.4byte ScrCmd_waitmovement
|
||||
.4byte ScrCmd_waitmovement_at
|
||||
.4byte ScrCmd_removeobject
|
||||
.4byte ScrCmd_removeobject_at
|
||||
.4byte ScrCmd_addobject
|
||||
.4byte ScrCmd_addobject_at
|
||||
.4byte ScrCmd_setobjectxy
|
||||
.4byte ScrCmd_showobject_at
|
||||
.4byte ScrCmd_hideobject_at
|
||||
.4byte ScrCmd_faceplayer
|
||||
.4byte ScrCmd_turnobject
|
||||
.4byte ScrCmd_trainerbattle
|
||||
.4byte ScrCmd_dotrainerbattle
|
||||
.4byte ScrCmd_gotopostbattlescript
|
||||
.4byte ScrCmd_gotobeatenscript
|
||||
.4byte ScrCmd_checktrainerflag
|
||||
.4byte ScrCmd_settrainerflag
|
||||
.4byte ScrCmd_cleartrainerflag
|
||||
.4byte ScrCmd_setobjectxyperm
|
||||
.4byte ScrCmd_copyobjectxytoperm
|
||||
.4byte ScrCmd_setobjectmovementtype
|
||||
.4byte ScrCmd_waitmessage
|
||||
.4byte ScrCmd_message
|
||||
.4byte ScrCmd_closemessage
|
||||
.4byte ScrCmd_lockall
|
||||
.4byte ScrCmd_lock
|
||||
.4byte ScrCmd_releaseall
|
||||
.4byte ScrCmd_release
|
||||
.4byte ScrCmd_waitbuttonpress
|
||||
.4byte ScrCmd_yesnobox
|
||||
.4byte ScrCmd_multichoice
|
||||
.4byte ScrCmd_multichoicedefault
|
||||
.4byte ScrCmd_multichoicegrid
|
||||
.4byte ScrCmd_drawbox
|
||||
.4byte ScrCmd_erasebox
|
||||
.4byte ScrCmd_drawboxtext
|
||||
.4byte ScrCmd_showmonpic
|
||||
.4byte ScrCmd_hidemonpic
|
||||
.4byte ScrCmd_showcontestwinner
|
||||
.4byte ScrCmd_braillemessage
|
||||
.4byte ScrCmd_givemon
|
||||
.4byte ScrCmd_giveegg
|
||||
.4byte ScrCmd_setmonmove
|
||||
.4byte ScrCmd_checkpartymove
|
||||
.4byte ScrCmd_bufferspeciesname
|
||||
.4byte ScrCmd_bufferleadmonspeciesname
|
||||
.4byte ScrCmd_bufferpartymonnick
|
||||
.4byte ScrCmd_bufferitemname
|
||||
.4byte ScrCmd_bufferdecorationname
|
||||
.4byte ScrCmd_buffermovename
|
||||
.4byte ScrCmd_buffernumberstring
|
||||
.4byte ScrCmd_bufferstdstring
|
||||
.4byte ScrCmd_bufferstring
|
||||
.4byte ScrCmd_pokemart
|
||||
.4byte ScrCmd_pokemartdecoration
|
||||
.4byte ScrCmd_pokemartdecoration2
|
||||
.4byte ScrCmd_playslotmachine
|
||||
.4byte ScrCmd_setberrytree
|
||||
.4byte ScrCmd_choosecontestmon
|
||||
.4byte ScrCmd_startcontest
|
||||
.4byte ScrCmd_showcontestresults
|
||||
.4byte ScrCmd_contestlinktransfer
|
||||
.4byte ScrCmd_random
|
||||
.4byte ScrCmd_addmoney
|
||||
.4byte ScrCmd_removemoney
|
||||
.4byte ScrCmd_checkmoney
|
||||
.4byte ScrCmd_showmoneybox
|
||||
.4byte ScrCmd_hidemoneybox
|
||||
.4byte ScrCmd_updatemoneybox
|
||||
.4byte ScrCmd_getpricereduction
|
||||
.4byte ScrCmd_fadescreen
|
||||
.4byte ScrCmd_fadescreenspeed
|
||||
.4byte ScrCmd_setflashradius
|
||||
.4byte ScrCmd_animateflash
|
||||
.4byte ScrCmd_messageautoscroll
|
||||
.4byte ScrCmd_dofieldeffect
|
||||
.4byte ScrCmd_setfieldeffectarg
|
||||
.4byte ScrCmd_waitfieldeffect
|
||||
.4byte ScrCmd_setrespawn
|
||||
.4byte ScrCmd_checkplayergender
|
||||
.4byte ScrCmd_playmoncry
|
||||
.4byte ScrCmd_setmetatile
|
||||
.4byte ScrCmd_resetweather
|
||||
.4byte ScrCmd_setweather
|
||||
.4byte ScrCmd_doweather
|
||||
.4byte ScrCmd_setstepcallback
|
||||
.4byte ScrCmd_setmaplayoutindex
|
||||
.4byte ScrCmd_setobjectpriority
|
||||
.4byte ScrCmd_resetobjectpriority
|
||||
.4byte ScrCmd_createvobject
|
||||
.4byte ScrCmd_turnvobject
|
||||
.4byte ScrCmd_opendoor
|
||||
.4byte ScrCmd_closedoor
|
||||
.4byte ScrCmd_waitdooranim
|
||||
.4byte ScrCmd_setdooropen
|
||||
.4byte ScrCmd_setdoorclosed
|
||||
.4byte ScrCmd_addelevmenuitem
|
||||
.4byte ScrCmd_showelevmenu
|
||||
.4byte ScrCmd_checkcoins
|
||||
.4byte ScrCmd_addcoins
|
||||
.4byte ScrCmd_removecoins
|
||||
.4byte ScrCmd_setwildbattle
|
||||
.4byte ScrCmd_dowildbattle
|
||||
.4byte ScrCmd_setvaddress
|
||||
.4byte ScrCmd_vgoto
|
||||
.4byte ScrCmd_vcall
|
||||
.4byte ScrCmd_vgoto_if
|
||||
.4byte ScrCmd_vcall_if
|
||||
.4byte ScrCmd_vmessage
|
||||
.4byte ScrCmd_vloadword
|
||||
.4byte ScrCmd_vbufferstring
|
||||
.4byte ScrCmd_showcoinsbox
|
||||
.4byte ScrCmd_hidecoinsbox
|
||||
.4byte ScrCmd_updatecoinsbox
|
||||
.4byte ScrCmd_incrementgamestat
|
||||
.4byte ScrCmd_setescapewarp
|
||||
.4byte ScrCmd_waitmoncry
|
||||
.4byte ScrCmd_bufferboxname
|
||||
.4byte ScrCmd_nop1
|
||||
.4byte ScrCmd_nop1
|
||||
.4byte ScrCmd_nop1
|
||||
.4byte ScrCmd_nop1
|
||||
.4byte ScrCmd_nop1
|
||||
.4byte ScrCmd_nop1
|
||||
.4byte ScrCmd_setmonobedient
|
||||
.4byte ScrCmd_checkmonobedience
|
||||
.4byte ScrCmd_gotoram
|
||||
.4byte ScrCmd_nop1
|
||||
.4byte ScrCmd_warpD1
|
||||
.4byte ScrCmd_setmonmetlocation
|
||||
.4byte ScrCmd_moverotatingtileobjects
|
||||
.4byte ScrCmd_turnrotatingtileobjects
|
||||
.4byte ScrCmd_initrotatingtilepuzzle
|
||||
.4byte ScrCmd_freerotatingtilepuzzle
|
||||
.4byte ScrCmd_warpmossdeepgym
|
||||
.4byte ScrCmd_cmdD8
|
||||
.4byte ScrCmd_cmdD9
|
||||
.4byte ScrCmd_closebraillemessage
|
||||
.4byte ScrCmd_cmdDB
|
||||
.4byte ScrCmd_fadescreenswapbuffers
|
||||
.4byte ScrCmd_buffertrainerclassname
|
||||
.4byte ScrCmd_buffertrainername
|
||||
.4byte ScrCmd_pokenavcall
|
||||
.4byte ScrCmd_warpsootopolislegend
|
||||
.4byte ScrCmd_buffercontesttype
|
||||
.4byte ScrCmd_bufferitemnameplural
|
||||
.4byte ScrCmd_nop @ 0x00
|
||||
.4byte ScrCmd_nop1 @ 0x01
|
||||
.4byte ScrCmd_end @ 0x02
|
||||
.4byte ScrCmd_return @ 0x03
|
||||
.4byte ScrCmd_call @ 0x04
|
||||
.4byte ScrCmd_goto @ 0x05
|
||||
.4byte ScrCmd_goto_if @ 0x06
|
||||
.4byte ScrCmd_call_if @ 0x07
|
||||
.4byte ScrCmd_gotostd @ 0x08
|
||||
.4byte ScrCmd_callstd @ 0x09
|
||||
.4byte ScrCmd_gotostd_if @ 0x0a
|
||||
.4byte ScrCmd_callstd_if @ 0x0b
|
||||
.4byte ScrCmd_returnram @ 0x0c
|
||||
.4byte ScrCmd_killscript @ 0x0d
|
||||
.4byte ScrCmd_setmysteryeventstatus @ 0x0e
|
||||
.4byte ScrCmd_loadword @ 0x0f
|
||||
.4byte ScrCmd_loadbyte @ 0x10
|
||||
.4byte ScrCmd_writebytetoaddr @ 0x11
|
||||
.4byte ScrCmd_loadbytefromaddr @ 0x12
|
||||
.4byte ScrCmd_setptrbyte @ 0x13
|
||||
.4byte ScrCmd_copylocal @ 0x14
|
||||
.4byte ScrCmd_copybyte @ 0x15
|
||||
.4byte ScrCmd_setvar @ 0x16
|
||||
.4byte ScrCmd_addvar @ 0x17
|
||||
.4byte ScrCmd_subvar @ 0x18
|
||||
.4byte ScrCmd_copyvar @ 0x19
|
||||
.4byte ScrCmd_setorcopyvar @ 0x1a
|
||||
.4byte ScrCmd_compare_local_to_local @ 0x1b
|
||||
.4byte ScrCmd_compare_local_to_value @ 0x1c
|
||||
.4byte ScrCmd_compare_local_to_addr @ 0x1d
|
||||
.4byte ScrCmd_compare_addr_to_local @ 0x1e
|
||||
.4byte ScrCmd_compare_addr_to_value @ 0x1f
|
||||
.4byte ScrCmd_compare_addr_to_addr @ 0x20
|
||||
.4byte ScrCmd_compare_var_to_value @ 0x21
|
||||
.4byte ScrCmd_compare_var_to_var @ 0x22
|
||||
.4byte ScrCmd_callnative @ 0x23
|
||||
.4byte ScrCmd_gotonative @ 0x24
|
||||
.4byte ScrCmd_special @ 0x25
|
||||
.4byte ScrCmd_specialvar @ 0x26
|
||||
.4byte ScrCmd_waitstate @ 0x27
|
||||
.4byte ScrCmd_delay @ 0x28
|
||||
.4byte ScrCmd_setflag @ 0x29
|
||||
.4byte ScrCmd_clearflag @ 0x2a
|
||||
.4byte ScrCmd_checkflag @ 0x2b
|
||||
.4byte ScrCmd_initclock @ 0x2c
|
||||
.4byte ScrCmd_dotimebasedevents @ 0x2d
|
||||
.4byte ScrCmd_gettime @ 0x2e
|
||||
.4byte ScrCmd_playse @ 0x2f
|
||||
.4byte ScrCmd_waitse @ 0x30
|
||||
.4byte ScrCmd_playfanfare @ 0x31
|
||||
.4byte ScrCmd_waitfanfare @ 0x32
|
||||
.4byte ScrCmd_playbgm @ 0x33
|
||||
.4byte ScrCmd_savebgm @ 0x34
|
||||
.4byte ScrCmd_fadedefaultbgm @ 0x35
|
||||
.4byte ScrCmd_fadenewbgm @ 0x36
|
||||
.4byte ScrCmd_fadeoutbgm @ 0x37
|
||||
.4byte ScrCmd_fadeinbgm @ 0x38
|
||||
.4byte ScrCmd_warp @ 0x39
|
||||
.4byte ScrCmd_warpsilent @ 0x3a
|
||||
.4byte ScrCmd_warpdoor @ 0x3b
|
||||
.4byte ScrCmd_warphole @ 0x3c
|
||||
.4byte ScrCmd_warpteleport @ 0x3d
|
||||
.4byte ScrCmd_setwarp @ 0x3e
|
||||
.4byte ScrCmd_setdynamicwarp @ 0x3f
|
||||
.4byte ScrCmd_setdivewarp @ 0x40
|
||||
.4byte ScrCmd_setholewarp @ 0x41
|
||||
.4byte ScrCmd_getplayerxy @ 0x42
|
||||
.4byte ScrCmd_getpartysize @ 0x43
|
||||
.4byte ScrCmd_additem @ 0x44
|
||||
.4byte ScrCmd_removeitem @ 0x45
|
||||
.4byte ScrCmd_checkitemspace @ 0x46
|
||||
.4byte ScrCmd_checkitem @ 0x47
|
||||
.4byte ScrCmd_checkitemtype @ 0x48
|
||||
.4byte ScrCmd_addpcitem @ 0x49
|
||||
.4byte ScrCmd_checkpcitem @ 0x4a
|
||||
.4byte ScrCmd_adddecoration @ 0x4b
|
||||
.4byte ScrCmd_removedecoration @ 0x4c
|
||||
.4byte ScrCmd_checkdecor @ 0x4d
|
||||
.4byte ScrCmd_checkdecorspace @ 0x4e
|
||||
.4byte ScrCmd_applymovement @ 0x4f
|
||||
.4byte ScrCmd_applymovement_at @ 0x50
|
||||
.4byte ScrCmd_waitmovement @ 0x51
|
||||
.4byte ScrCmd_waitmovement_at @ 0x52
|
||||
.4byte ScrCmd_removeobject @ 0x53
|
||||
.4byte ScrCmd_removeobject_at @ 0x54
|
||||
.4byte ScrCmd_addobject @ 0x55
|
||||
.4byte ScrCmd_addobject_at @ 0x56
|
||||
.4byte ScrCmd_setobjectxy @ 0x57
|
||||
.4byte ScrCmd_showobject_at @ 0x58
|
||||
.4byte ScrCmd_hideobject_at @ 0x59
|
||||
.4byte ScrCmd_faceplayer @ 0x5a
|
||||
.4byte ScrCmd_turnobject @ 0x5b
|
||||
.4byte ScrCmd_trainerbattle @ 0x5c
|
||||
.4byte ScrCmd_dotrainerbattle @ 0x5d
|
||||
.4byte ScrCmd_gotopostbattlescript @ 0x5e
|
||||
.4byte ScrCmd_gotobeatenscript @ 0x5f
|
||||
.4byte ScrCmd_checktrainerflag @ 0x60
|
||||
.4byte ScrCmd_settrainerflag @ 0x61
|
||||
.4byte ScrCmd_cleartrainerflag @ 0x62
|
||||
.4byte ScrCmd_setobjectxyperm @ 0x63
|
||||
.4byte ScrCmd_copyobjectxytoperm @ 0x64
|
||||
.4byte ScrCmd_setobjectmovementtype @ 0x65
|
||||
.4byte ScrCmd_waitmessage @ 0x66
|
||||
.4byte ScrCmd_message @ 0x67
|
||||
.4byte ScrCmd_closemessage @ 0x68
|
||||
.4byte ScrCmd_lockall @ 0x69
|
||||
.4byte ScrCmd_lock @ 0x6a
|
||||
.4byte ScrCmd_releaseall @ 0x6b
|
||||
.4byte ScrCmd_release @ 0x6c
|
||||
.4byte ScrCmd_waitbuttonpress @ 0x6d
|
||||
.4byte ScrCmd_yesnobox @ 0x6e
|
||||
.4byte ScrCmd_multichoice @ 0x6f
|
||||
.4byte ScrCmd_multichoicedefault @ 0x70
|
||||
.4byte ScrCmd_multichoicegrid @ 0x71
|
||||
.4byte ScrCmd_drawbox @ 0x72
|
||||
.4byte ScrCmd_erasebox @ 0x73
|
||||
.4byte ScrCmd_drawboxtext @ 0x74
|
||||
.4byte ScrCmd_showmonpic @ 0x75
|
||||
.4byte ScrCmd_hidemonpic @ 0x76
|
||||
.4byte ScrCmd_showcontestwinner @ 0x77
|
||||
.4byte ScrCmd_braillemessage @ 0x78
|
||||
.4byte ScrCmd_givemon @ 0x79
|
||||
.4byte ScrCmd_giveegg @ 0x7a
|
||||
.4byte ScrCmd_setmonmove @ 0x7b
|
||||
.4byte ScrCmd_checkpartymove @ 0x7c
|
||||
.4byte ScrCmd_bufferspeciesname @ 0x7d
|
||||
.4byte ScrCmd_bufferleadmonspeciesname @ 0x7e
|
||||
.4byte ScrCmd_bufferpartymonnick @ 0x7f
|
||||
.4byte ScrCmd_bufferitemname @ 0x80
|
||||
.4byte ScrCmd_bufferdecorationname @ 0x81
|
||||
.4byte ScrCmd_buffermovename @ 0x82
|
||||
.4byte ScrCmd_buffernumberstring @ 0x83
|
||||
.4byte ScrCmd_bufferstdstring @ 0x84
|
||||
.4byte ScrCmd_bufferstring @ 0x85
|
||||
.4byte ScrCmd_pokemart @ 0x86
|
||||
.4byte ScrCmd_pokemartdecoration @ 0x87
|
||||
.4byte ScrCmd_pokemartdecoration2 @ 0x88
|
||||
.4byte ScrCmd_playslotmachine @ 0x89
|
||||
.4byte ScrCmd_setberrytree @ 0x8a
|
||||
.4byte ScrCmd_choosecontestmon @ 0x8b
|
||||
.4byte ScrCmd_startcontest @ 0x8c
|
||||
.4byte ScrCmd_showcontestresults @ 0x8d
|
||||
.4byte ScrCmd_contestlinktransfer @ 0x8e
|
||||
.4byte ScrCmd_random @ 0x8f
|
||||
.4byte ScrCmd_addmoney @ 0x90
|
||||
.4byte ScrCmd_removemoney @ 0x91
|
||||
.4byte ScrCmd_checkmoney @ 0x92
|
||||
.4byte ScrCmd_showmoneybox @ 0x93
|
||||
.4byte ScrCmd_hidemoneybox @ 0x94
|
||||
.4byte ScrCmd_updatemoneybox @ 0x95
|
||||
.4byte ScrCmd_getpricereduction @ 0x96
|
||||
.4byte ScrCmd_fadescreen @ 0x97
|
||||
.4byte ScrCmd_fadescreenspeed @ 0x98
|
||||
.4byte ScrCmd_setflashradius @ 0x99
|
||||
.4byte ScrCmd_animateflash @ 0x9a
|
||||
.4byte ScrCmd_messageautoscroll @ 0x9b
|
||||
.4byte ScrCmd_dofieldeffect @ 0x9c
|
||||
.4byte ScrCmd_setfieldeffectarg @ 0x9d
|
||||
.4byte ScrCmd_waitfieldeffect @ 0x9e
|
||||
.4byte ScrCmd_setrespawn @ 0x9f
|
||||
.4byte ScrCmd_checkplayergender @ 0xa0
|
||||
.4byte ScrCmd_playmoncry @ 0xa1
|
||||
.4byte ScrCmd_setmetatile @ 0xa2
|
||||
.4byte ScrCmd_resetweather @ 0xa3
|
||||
.4byte ScrCmd_setweather @ 0xa4
|
||||
.4byte ScrCmd_doweather @ 0xa5
|
||||
.4byte ScrCmd_setstepcallback @ 0xa6
|
||||
.4byte ScrCmd_setmaplayoutindex @ 0xa7
|
||||
.4byte ScrCmd_setobjectpriority @ 0xa8
|
||||
.4byte ScrCmd_resetobjectpriority @ 0xa9
|
||||
.4byte ScrCmd_createvobject @ 0xaa
|
||||
.4byte ScrCmd_turnvobject @ 0xab
|
||||
.4byte ScrCmd_opendoor @ 0xac
|
||||
.4byte ScrCmd_closedoor @ 0xad
|
||||
.4byte ScrCmd_waitdooranim @ 0xae
|
||||
.4byte ScrCmd_setdooropen @ 0xaf
|
||||
.4byte ScrCmd_setdoorclosed @ 0xb0
|
||||
.4byte ScrCmd_addelevmenuitem @ 0xb1
|
||||
.4byte ScrCmd_showelevmenu @ 0xb2
|
||||
.4byte ScrCmd_checkcoins @ 0xb3
|
||||
.4byte ScrCmd_addcoins @ 0xb4
|
||||
.4byte ScrCmd_removecoins @ 0xb5
|
||||
.4byte ScrCmd_setwildbattle @ 0xb6
|
||||
.4byte ScrCmd_dowildbattle @ 0xb7
|
||||
.4byte ScrCmd_setvaddress @ 0xb8
|
||||
.4byte ScrCmd_vgoto @ 0xb9
|
||||
.4byte ScrCmd_vcall @ 0xba
|
||||
.4byte ScrCmd_vgoto_if @ 0xbb
|
||||
.4byte ScrCmd_vcall_if @ 0xbc
|
||||
.4byte ScrCmd_vmessage @ 0xbd
|
||||
.4byte ScrCmd_vloadword @ 0xbe
|
||||
.4byte ScrCmd_vbufferstring @ 0xbf
|
||||
.4byte ScrCmd_showcoinsbox @ 0xc0
|
||||
.4byte ScrCmd_hidecoinsbox @ 0xc1
|
||||
.4byte ScrCmd_updatecoinsbox @ 0xc2
|
||||
.4byte ScrCmd_incrementgamestat @ 0xc3
|
||||
.4byte ScrCmd_setescapewarp @ 0xc4
|
||||
.4byte ScrCmd_waitmoncry @ 0xc5
|
||||
.4byte ScrCmd_bufferboxname @ 0xc6
|
||||
.4byte ScrCmd_nop1 @ 0xc7
|
||||
.4byte ScrCmd_nop1 @ 0xc8
|
||||
.4byte ScrCmd_nop1 @ 0xc9
|
||||
.4byte ScrCmd_nop1 @ 0xca
|
||||
.4byte ScrCmd_nop1 @ 0xcb
|
||||
.4byte ScrCmd_nop1 @ 0xcc
|
||||
.4byte ScrCmd_setmonobedient @ 0xcd
|
||||
.4byte ScrCmd_checkmonobedience @ 0xce
|
||||
.4byte ScrCmd_gotoram @ 0xcf
|
||||
.4byte ScrCmd_nop1 @ 0xd0
|
||||
.4byte ScrCmd_warpD1 @ 0xd1
|
||||
.4byte ScrCmd_setmonmetlocation @ 0xd2
|
||||
.4byte ScrCmd_moverotatingtileobjects @ 0xd3
|
||||
.4byte ScrCmd_turnrotatingtileobjects @ 0xd4
|
||||
.4byte ScrCmd_initrotatingtilepuzzle @ 0xd5
|
||||
.4byte ScrCmd_freerotatingtilepuzzle @ 0xd6
|
||||
.4byte ScrCmd_warpmossdeepgym @ 0xd7
|
||||
.4byte ScrCmd_cmdD8 @ 0xd8
|
||||
.4byte ScrCmd_cmdD9 @ 0xd9
|
||||
.4byte ScrCmd_closebraillemessage @ 0xda
|
||||
.4byte ScrCmd_cmdDB @ 0xdb
|
||||
.4byte ScrCmd_fadescreenswapbuffers @ 0xdc
|
||||
.4byte ScrCmd_buffertrainerclassname @ 0xdd
|
||||
.4byte ScrCmd_buffertrainername @ 0xde
|
||||
.4byte ScrCmd_pokenavcall @ 0xdf
|
||||
.4byte ScrCmd_warpsootopolislegend @ 0xe0
|
||||
.4byte ScrCmd_buffercontesttype @ 0xe1
|
||||
.4byte ScrCmd_bufferitemnameplural @ 0xe2
|
||||
|
||||
gScriptCmdTableEnd:: @ 81DBA08
|
||||
.4byte ScrCmd_nop
|
||||
|
||||
@@ -398,7 +398,7 @@ MeteorFalls_B1F_2R_EventScript_ItemTM02:: @ 82911DF
|
||||
finditem ITEM_TM02
|
||||
end
|
||||
|
||||
NewMauville_Inside_EventScript_ItemUltraRope:: @ 82911EC
|
||||
NewMauville_Inside_EventScript_ItemUltraBall:: @ 82911EC
|
||||
finditem ITEM_ULTRA_BALL
|
||||
end
|
||||
|
||||
|
||||
@@ -1,43 +1,66 @@
|
||||
EventScript_ResetAllBerries:: @ 827149D
|
||||
@ Route 102
|
||||
setberrytree 2, ITEM_TO_BERRY(ITEM_ORAN_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 1, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
|
||||
|
||||
@ Route 104
|
||||
setberrytree 11, ITEM_TO_BERRY(ITEM_ORAN_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 13, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 4, ITEM_TO_BERRY(ITEM_ORAN_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 76, ITEM_TO_BERRY(ITEM_CHERI_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 8, ITEM_TO_BERRY(ITEM_CHERI_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 10, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), BERRY_STAGE_BERRIES
|
||||
|
||||
@ Route 116
|
||||
setberrytree 25, ITEM_TO_BERRY(ITEM_PINAP_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 26, ITEM_TO_BERRY(ITEM_CHESTO_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 66, ITEM_TO_BERRY(ITEM_CHESTO_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 67, ITEM_TO_BERRY(ITEM_PINAP_BERRY), BERRY_STAGE_BERRIES
|
||||
|
||||
@ Route 115
|
||||
setberrytree 69, ITEM_TO_BERRY(ITEM_KELPSY_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 70, ITEM_TO_BERRY(ITEM_KELPSY_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 71, ITEM_TO_BERRY(ITEM_KELPSY_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 55, ITEM_TO_BERRY(ITEM_BLUK_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 56, ITEM_TO_BERRY(ITEM_BLUK_BERRY), BERRY_STAGE_BERRIES
|
||||
|
||||
@ Route 103
|
||||
setberrytree 5, ITEM_TO_BERRY(ITEM_CHERI_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 6, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 7, ITEM_TO_BERRY(ITEM_CHERI_BERRY), BERRY_STAGE_BERRIES
|
||||
|
||||
@ Route 110
|
||||
setberrytree 16, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 17, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 18, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
|
||||
|
||||
@ Route 117
|
||||
setberrytree 29, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 28, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 27, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
|
||||
|
||||
@ Route 112
|
||||
setberrytree 24, ITEM_TO_BERRY(ITEM_RAWST_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 23, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 22, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 21, ITEM_TO_BERRY(ITEM_RAWST_BERRY), BERRY_STAGE_BERRIES
|
||||
|
||||
@ Route 111
|
||||
setberrytree 19, ITEM_TO_BERRY(ITEM_RAZZ_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 20, ITEM_TO_BERRY(ITEM_RAZZ_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 80, ITEM_TO_BERRY(ITEM_ORAN_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 81, ITEM_TO_BERRY(ITEM_ORAN_BERRY), BERRY_STAGE_BERRIES
|
||||
|
||||
@ Route 114
|
||||
setberrytree 77, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 78, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 68, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), BERRY_STAGE_BERRIES
|
||||
|
||||
@ Route 118
|
||||
setberrytree 31, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 33, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), BERRY_STAGE_BERRIES
|
||||
|
||||
@ Route 119
|
||||
setberrytree 34, ITEM_TO_BERRY(ITEM_POMEG_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 35, ITEM_TO_BERRY(ITEM_POMEG_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 36, ITEM_TO_BERRY(ITEM_POMEG_BERRY), BERRY_STAGE_BERRIES
|
||||
@@ -45,6 +68,8 @@ EventScript_ResetAllBerries:: @ 827149D
|
||||
setberrytree 84, ITEM_TO_BERRY(ITEM_HONDEW_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 85, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 86, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), BERRY_STAGE_BERRIES
|
||||
|
||||
@ Route 120
|
||||
setberrytree 37, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 38, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 39, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), BERRY_STAGE_BERRIES
|
||||
@@ -55,12 +80,16 @@ EventScript_ResetAllBerries:: @ 827149D
|
||||
setberrytree 45, ITEM_TO_BERRY(ITEM_PINAP_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 44, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 43, ITEM_TO_BERRY(ITEM_RAZZ_BERRY), BERRY_STAGE_BERRIES
|
||||
|
||||
@ Route 121
|
||||
setberrytree 47, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 48, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 49, ITEM_TO_BERRY(ITEM_RAWST_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 50, ITEM_TO_BERRY(ITEM_CHESTO_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 52, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 53, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
|
||||
|
||||
@ Route 123
|
||||
setberrytree 62, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 64, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 58, ITEM_TO_BERRY(ITEM_POMEG_BERRY), BERRY_STAGE_BERRIES
|
||||
@@ -78,6 +107,8 @@ EventScript_ResetAllBerries:: @ 827149D
|
||||
setberrytree 87, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 88, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), BERRY_STAGE_BERRIES
|
||||
setberrytree 89, ITEM_TO_BERRY(ITEM_RAWST_BERRY), BERRY_STAGE_BERRIES
|
||||
|
||||
@ Mirage Island
|
||||
setberrytree 82, ITEM_TO_BERRY(ITEM_LIECHI_BERRY), BERRY_STAGE_BERRIES
|
||||
return
|
||||
|
||||
|
||||
@@ -308,7 +308,7 @@ SecretBase_EventScript_PutAwayDecorationLoop:: @ 8275D39
|
||||
compare VAR_0x8005, 0
|
||||
goto_if_eq SecretBase_EventScript_PutAwayDecorationLoop
|
||||
removeobject VAR_0x8006
|
||||
setflag VAR_0x8005 @ UB: GF likely meant setvar here; setflag 0x8005 is out of bounds
|
||||
setflag VAR_0x8005 @ UB: VAR_0x8005 is set to a flag by PutAwayDecorationIteration, but ScrCmd_setflag doesn't use VarGet
|
||||
goto SecretBase_EventScript_PutAwayDecorationLoop
|
||||
end
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Common_EventScript_SetGymTrainers:: @ 8271F43
|
||||
switch VAR_0x8008
|
||||
case 1, RusboroCity_Gym_SetGymTrainers
|
||||
case 1, RustboroCity_Gym_SetGymTrainers
|
||||
case 2, DewfordTown_Gym_SetGymTrainers
|
||||
case 3, MauvilleCity_Gym_SetGymTrainers
|
||||
case 4, LavaridgeTown_Gym_SetGymTrainers
|
||||
@@ -10,7 +10,7 @@ Common_EventScript_SetGymTrainers:: @ 8271F43
|
||||
case 8, SootopolisCity_Gym_SetGymTrainers
|
||||
end
|
||||
|
||||
RusboroCity_Gym_SetGymTrainers:: @ 8271FA1
|
||||
RustboroCity_Gym_SetGymTrainers:: @ 8271FA1
|
||||
settrainerflag TRAINER_JOSH
|
||||
settrainerflag TRAINER_TOMMY
|
||||
settrainerflag TRAINER_MARC
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
# Bugs and Glitches
|
||||
|
||||
These are known bugs and glitches in the original Pokémon Emerald game: code that clearly does not work as intended, or that only works in limited circumstances but has the possibility to fail or crash.
|
||||
These are known bugs and glitches in the original Pokémon Emerald game: code that clearly does not work as intended, or that only works in limited circumstances but has the possibility to fail or crash. Defining the `BUGFIX` preprocessor variable will fix some of these automatically.
|
||||
|
||||
Fixes are written in the `diff` format. If you've used Git before, this should look familiar:
|
||||
|
||||
@@ -42,6 +42,26 @@ And edit `AgbMain`:
|
||||
...
|
||||
```
|
||||
|
||||
This restores the code of Ruby/Sapphire.
|
||||
|
||||
**Alternate Fix:** Edit the following function in [src/title_screen.c](https://github.com/pret/pokeemerald/blob/master/src/title_screen.c):
|
||||
|
||||
```diff
|
||||
void CB2_InitTitleScreen(void)
|
||||
{
|
||||
switch (gMain.state)
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
SetVBlankCallback(NULL);
|
||||
+ StartTimer1();
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDY, 0);
|
||||
...
|
||||
```
|
||||
This matches what FRLG does and obtains the seed differently than RS, independently of the RTC.
|
||||
|
||||
## Scrolling through items in the bag causes the image to flicker
|
||||
|
||||
**Fix:** Add the following function to [src/item_menu_icons.c](https://github.com/pret/pokeemerald/blob/master/src/item_menu_icons.c):
|
||||
@@ -75,3 +95,21 @@ Then edit `BagMenu_MoveCursorCallback` in [src/item_menu.c](https://github.com/p
|
||||
if (a != -2)
|
||||
...
|
||||
```
|
||||
|
||||
## Pokémon that have an affine transform as part of their entry animation glitch when going in and out of Poké Balls without a screen transition in between
|
||||
|
||||
**Fix:** Edit `sub_817F77C` in [src/pokemon_animation.c](https://github.com/pret/pokeemerald/blob/master/src/pokemon_animation.c#L1028):
|
||||
|
||||
```diff
|
||||
...
|
||||
-#ifdef BUGFIX
|
||||
else
|
||||
{
|
||||
// FIX: Reset these back to normal after they were changed so Poké Ball catch/release
|
||||
// animations without a screen transition in between don't break
|
||||
sprite->affineAnimPaused = FALSE;
|
||||
sprite->affineAnims = gUnknown_082FF694;
|
||||
}
|
||||
-#endif // BUGFIX
|
||||
}
|
||||
```
|
||||
|
||||
@@ -76,7 +76,7 @@ void FillBitmapRect4Bit(struct Bitmap *surface, u16 x, u16 y, u16 width, u16 hei
|
||||
s32 yEnd;
|
||||
s32 multiplierY;
|
||||
s32 loopX, loopY;
|
||||
s32 toOrr1, toOrr2;
|
||||
u8 toOrr1, toOrr2;
|
||||
|
||||
xEnd = x + width;
|
||||
if (xEnd > surface->width)
|
||||
@@ -87,8 +87,8 @@ void FillBitmapRect4Bit(struct Bitmap *surface, u16 x, u16 y, u16 width, u16 hei
|
||||
yEnd = surface->height;
|
||||
|
||||
multiplierY = (surface->width + (surface->width & 7)) >> 3;
|
||||
toOrr1 = (u32)(fillValue << 0x1C) >> 0x18;
|
||||
toOrr2 = (fillValue & 0xF);
|
||||
toOrr1 = fillValue << 4;
|
||||
toOrr2 = fillValue & 0xF;
|
||||
|
||||
for (loopY = y; loopY < yEnd; loopY++)
|
||||
{
|
||||
|
||||
228
gflib/text.c
@@ -21,7 +21,7 @@ static u16 gLastTextFgColor;
|
||||
static u16 gLastTextShadowColor;
|
||||
|
||||
const struct FontInfo *gFonts;
|
||||
bool8 gUnknown_03002F84;
|
||||
u8 gUnknown_03002F84;
|
||||
struct Struct_03002F90 gUnknown_03002F90;
|
||||
TextFlags gTextFlags;
|
||||
|
||||
@@ -205,7 +205,7 @@ bool16 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u8 speed, voi
|
||||
CopyWindowToVram(gTempTextPrinter.printerTemplate.windowId, 2);
|
||||
gTextPrinters[printerTemplate->windowId].active = 0;
|
||||
}
|
||||
gUnknown_03002F84 = FALSE;
|
||||
gUnknown_03002F84 = 0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ void RunTextPrinters(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!gUnknown_03002F84)
|
||||
if (gUnknown_03002F84 == 0)
|
||||
{
|
||||
for (i = 0; i < NUM_TEXT_PRINTERS; ++i)
|
||||
{
|
||||
@@ -451,52 +451,46 @@ u8 GetLastTextColor(u8 colorType)
|
||||
{
|
||||
switch (colorType)
|
||||
{
|
||||
case COLOR_FOREGROUND:
|
||||
case 0:
|
||||
return gLastTextFgColor;
|
||||
case COLOR_BACKGROUND:
|
||||
case 2:
|
||||
return gLastTextBgColor;
|
||||
case COLOR_SHADOW:
|
||||
case 1:
|
||||
return gLastTextShadowColor;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
#define GLYPH_COPY(fromY_, toY_, fromX_, toX_, unk) \
|
||||
{ \
|
||||
u32 i, j, *ptr, toY, fromX, toX, r5, bits; \
|
||||
u8 *dst; \
|
||||
j = fromX_; \
|
||||
i = fromY_; \
|
||||
ptr = unk; \
|
||||
toX = toX_; \
|
||||
toY = toY_; \
|
||||
fromX = fromX_; \
|
||||
\
|
||||
for (; i < toY; i++) \
|
||||
{ \
|
||||
asm("":::"sl"); /* NONMATCHING */ \
|
||||
r5 = *(ptr++); \
|
||||
for (j = fromX; j < toX; j++) \
|
||||
{ \
|
||||
const u32 toOrr = r5 & 0xF; \
|
||||
if (toOrr) \
|
||||
{ \
|
||||
dst = windowTiles + ((j / 8) * 32) + ((j & 7) >> 1) + ((i / 8) * widthOffset) + ((i & 7) * 4); \
|
||||
bits = ((j & 1) * 4); \
|
||||
*dst = (toOrr << bits) | ((0xF0 >> bits) & *dst); \
|
||||
} \
|
||||
r5 >>= 4; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
inline static void GLYPH_COPY(u8 *windowTiles, u32 widthOffset, u32 j, u32 i, u32 *ptr, s32 width, s32 height)
|
||||
{
|
||||
u32 xAdd, yAdd, r5, bits, toOrr, dummyX;
|
||||
u8 *dst;
|
||||
|
||||
xAdd = j + width;
|
||||
yAdd = i + height;
|
||||
dummyX = j;
|
||||
for (; i < yAdd; i++)
|
||||
{
|
||||
r5 = *ptr++;
|
||||
for (j = dummyX; j < xAdd; j++)
|
||||
{
|
||||
if ((toOrr = r5 & 0xF))
|
||||
{
|
||||
dst = windowTiles + ((j / 8) * 32) + ((j % 8) / 2) + ((i / 8) * widthOffset) + ((i % 8) * 4);
|
||||
bits = ((j & 1) * 4);
|
||||
*dst = (toOrr << bits) | (*dst & (0xF0 >> bits));
|
||||
}
|
||||
r5 >>= 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CopyGlyphToWindow(struct TextPrinter *textPrinter)
|
||||
{
|
||||
struct Window *win;
|
||||
struct WindowTemplate *winTempl;
|
||||
struct Struct_03002F90 *unkStruct;
|
||||
u32 *unkStruct;
|
||||
u32 currX, currY, widthOffset;
|
||||
s32 r4, r0;
|
||||
u8 *windowTiles;
|
||||
@@ -504,17 +498,15 @@ void CopyGlyphToWindow(struct TextPrinter *textPrinter)
|
||||
win = &gWindows[textPrinter->printerTemplate.windowId];
|
||||
winTempl = &win->window;
|
||||
|
||||
r4 = (winTempl->width * 8) - textPrinter->printerTemplate.currentX;
|
||||
if (r4 > gUnknown_03002F90.unk80)
|
||||
r4 = gUnknown_03002F90.unk80;
|
||||
if ((r4 = (winTempl->width * 8) - textPrinter->printerTemplate.currentX) > gUnknown_03002F90.width)
|
||||
r4 = gUnknown_03002F90.width;
|
||||
|
||||
r0 = (winTempl->height * 8) - textPrinter->printerTemplate.currentY;
|
||||
if (r0 > gUnknown_03002F90.unk81)
|
||||
r0 = gUnknown_03002F90.unk81;
|
||||
if ((r0 = (winTempl->height * 8) - textPrinter->printerTemplate.currentY) > gUnknown_03002F90.height)
|
||||
r0 = gUnknown_03002F90.height;
|
||||
|
||||
currX = textPrinter->printerTemplate.currentX;
|
||||
currY = textPrinter->printerTemplate.currentY;
|
||||
unkStruct = &gUnknown_03002F90;
|
||||
unkStruct = (u32 *)&gUnknown_03002F90.unk0;
|
||||
windowTiles = win->tileData;
|
||||
widthOffset = winTempl->width * 32;
|
||||
|
||||
@@ -522,45 +514,31 @@ void CopyGlyphToWindow(struct TextPrinter *textPrinter)
|
||||
{
|
||||
if (r0 < 9)
|
||||
{
|
||||
GLYPH_COPY(currY, currY + r0, currX, currX + r4, unkStruct->unk0);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX, currY, unkStruct, r4, r0);
|
||||
}
|
||||
else
|
||||
{
|
||||
u32 temp;
|
||||
GLYPH_COPY(currY, currY + 8, currX, currX + r4, unkStruct->unk0);
|
||||
|
||||
temp = currY + 8;
|
||||
GLYPH_COPY(temp, (temp - 8) + r0, currX, currX + r4, unkStruct->unk40);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX, currY, unkStruct, r4, 8);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX, currY + 8, unkStruct + 16, r4, r0 - 8);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
u32 temp;
|
||||
if (r0 < 9)
|
||||
{
|
||||
GLYPH_COPY(currY, currY + r0, currX, currX + 8, unkStruct->unk0);
|
||||
|
||||
temp = currX + 8;
|
||||
GLYPH_COPY(currY, currY + r0, temp, (temp - 8) + r4, unkStruct->unk20);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX, currY, unkStruct, 8, r0);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX + 8, currY, unkStruct + 8, r4 - 8, r0);
|
||||
}
|
||||
else
|
||||
{
|
||||
GLYPH_COPY(currY, currY + 8, currX, currX + 8, unkStruct->unk0);
|
||||
|
||||
temp = currX + 8;
|
||||
GLYPH_COPY(currY, currY + 8, temp, temp - 8 + r4, unkStruct->unk20);
|
||||
|
||||
temp = currY + 8;
|
||||
GLYPH_COPY(temp, temp - 8 + r0, currX, currX + 8, unkStruct->unk40);
|
||||
{
|
||||
u32 tempX, tempY;
|
||||
tempX = currX + 8;
|
||||
tempY = currY + 8;
|
||||
GLYPH_COPY(tempY, tempY - 8 + r0, tempX, tempX - 8 + r4, unkStruct->unk60);
|
||||
}
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX, currY, unkStruct, 8, 8);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX + 8, currY, unkStruct + 8, r4 - 8, 8);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX, currY + 8, unkStruct + 16, 8, r0 - 8);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX + 8, currY + 8, unkStruct + 24, r4 - 8, r0 - 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ClearTextSpan(struct TextPrinter *textPrinter, u32 width)
|
||||
{
|
||||
struct Window *window;
|
||||
@@ -576,7 +554,7 @@ void ClearTextSpan(struct TextPrinter *textPrinter, u32 width)
|
||||
pixels_data.height = window->window.height << 3;
|
||||
|
||||
gUnk = &gUnknown_03002F90;
|
||||
glyphHeight = &gUnk->unk81;
|
||||
glyphHeight = &gUnk->height;
|
||||
|
||||
FillBitmapRect4Bit(
|
||||
&pixels_data,
|
||||
@@ -592,7 +570,7 @@ u16 Font0Func(struct TextPrinter *textPrinter)
|
||||
{
|
||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||
|
||||
if (!subStruct->hasGlyphIdBeenSet)
|
||||
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||
{
|
||||
subStruct->glyphId = 0;
|
||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||
@@ -604,7 +582,7 @@ u16 Font1Func(struct TextPrinter *textPrinter)
|
||||
{
|
||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||
|
||||
if (!subStruct->hasGlyphIdBeenSet)
|
||||
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||
{
|
||||
subStruct->glyphId = 1;
|
||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||
@@ -616,7 +594,7 @@ u16 Font2Func(struct TextPrinter *textPrinter)
|
||||
{
|
||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||
|
||||
if (!subStruct->hasGlyphIdBeenSet)
|
||||
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||
{
|
||||
subStruct->glyphId = 2;
|
||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||
@@ -628,7 +606,7 @@ u16 Font3Func(struct TextPrinter *textPrinter)
|
||||
{
|
||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||
|
||||
if (!subStruct->hasGlyphIdBeenSet)
|
||||
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||
{
|
||||
subStruct->glyphId = 3;
|
||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||
@@ -640,7 +618,7 @@ u16 Font4Func(struct TextPrinter *textPrinter)
|
||||
{
|
||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||
|
||||
if (!subStruct->hasGlyphIdBeenSet)
|
||||
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||
{
|
||||
subStruct->glyphId = 4;
|
||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||
@@ -652,7 +630,7 @@ u16 Font5Func(struct TextPrinter *textPrinter)
|
||||
{
|
||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||
|
||||
if (!subStruct->hasGlyphIdBeenSet)
|
||||
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||
{
|
||||
subStruct->glyphId = 5;
|
||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||
@@ -664,7 +642,7 @@ u16 Font7Func(struct TextPrinter *textPrinter)
|
||||
{
|
||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||
|
||||
if (!subStruct->hasGlyphIdBeenSet)
|
||||
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||
{
|
||||
subStruct->glyphId = 7;
|
||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||
@@ -676,7 +654,7 @@ u16 Font8Func(struct TextPrinter *textPrinter)
|
||||
{
|
||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||
|
||||
if (!subStruct->hasGlyphIdBeenSet)
|
||||
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||
{
|
||||
subStruct->glyphId = 8;
|
||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||
@@ -688,7 +666,7 @@ void TextPrinterInitDownArrowCounters(struct TextPrinter *textPrinter)
|
||||
{
|
||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||
|
||||
if (gTextFlags.autoScroll == TRUE)
|
||||
if (gTextFlags.autoScroll == 1)
|
||||
{
|
||||
subStruct->autoScrollDelay = 0;
|
||||
}
|
||||
@@ -704,7 +682,7 @@ void TextPrinterDrawDownArrow(struct TextPrinter *textPrinter)
|
||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||
const u8 *arrowTiles;
|
||||
|
||||
if (!gTextFlags.autoScroll)
|
||||
if (gTextFlags.autoScroll == 0)
|
||||
{
|
||||
if (subStruct->downArrowDelay != 0)
|
||||
{
|
||||
@@ -780,14 +758,14 @@ bool8 TextPrinterWaitAutoMode(struct TextPrinter *textPrinter)
|
||||
bool16 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter)
|
||||
{
|
||||
bool8 result = FALSE;
|
||||
if (gTextFlags.autoScroll)
|
||||
if (gTextFlags.autoScroll != 0)
|
||||
{
|
||||
result = TextPrinterWaitAutoMode(textPrinter);
|
||||
}
|
||||
else
|
||||
{
|
||||
TextPrinterDrawDownArrow(textPrinter);
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON))
|
||||
{
|
||||
result = TRUE;
|
||||
PlaySE(SE_SELECT);
|
||||
@@ -799,14 +777,17 @@ bool16 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter)
|
||||
bool16 TextPrinterWait(struct TextPrinter *textPrinter)
|
||||
{
|
||||
bool16 result = FALSE;
|
||||
if (gTextFlags.autoScroll)
|
||||
if (gTextFlags.autoScroll != 0)
|
||||
{
|
||||
result = TextPrinterWaitAutoMode(textPrinter);
|
||||
}
|
||||
else if (gMain.newKeys & (A_BUTTON | B_BUTTON))
|
||||
else
|
||||
{
|
||||
result = TRUE;
|
||||
PlaySE(SE_SELECT);
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON))
|
||||
{
|
||||
result = TRUE;
|
||||
PlaySE(SE_SELECT);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -822,7 +803,7 @@ void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *c
|
||||
else
|
||||
{
|
||||
FillWindowPixelRect(windowId, (bgColor << 4) | bgColor, x, y, 0x8, 0x10);
|
||||
if (!drawArrow)
|
||||
if (drawArrow == 0)
|
||||
{
|
||||
switch (gTextFlags.useAlternateDownArrow)
|
||||
{
|
||||
@@ -863,13 +844,13 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
||||
switch (textPrinter->state)
|
||||
{
|
||||
case 0:
|
||||
if ((gMain.heldKeys & (A_BUTTON | B_BUTTON)) && subStruct->hasPrintBeenSpedUp)
|
||||
if ((JOY_HELD(A_BUTTON | B_BUTTON)) && subStruct->hasPrintBeenSpedUp)
|
||||
textPrinter->delayCounter = 0;
|
||||
|
||||
if (textPrinter->delayCounter && textPrinter->textSpeed)
|
||||
{
|
||||
textPrinter->delayCounter--;
|
||||
if (gTextFlags.canABSpeedUpPrint && (gMain.newKeys & (A_BUTTON | B_BUTTON)))
|
||||
if (gTextFlags.canABSpeedUpPrint && (JOY_NEW(A_BUTTON | B_BUTTON)))
|
||||
{
|
||||
subStruct->hasPrintBeenSpedUp = TRUE;
|
||||
textPrinter->delayCounter = 0;
|
||||
@@ -1014,10 +995,10 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
||||
textPrinter->minLetterSpacing = *textPrinter->printerTemplate.currentChar++;
|
||||
return 2;
|
||||
case EXT_CTRL_CODE_JPN:
|
||||
textPrinter->japanese = TRUE;
|
||||
textPrinter->japanese = 1;
|
||||
return 2;
|
||||
case EXT_CTRL_CODE_ENG:
|
||||
textPrinter->japanese = FALSE;
|
||||
textPrinter->japanese = 0;
|
||||
return 2;
|
||||
}
|
||||
break;
|
||||
@@ -1035,8 +1016,8 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
||||
break;
|
||||
case CHAR_KEYPAD_ICON:
|
||||
currChar = *textPrinter->printerTemplate.currentChar++;
|
||||
gUnknown_03002F90.unk80 = DrawKeypadIcon(textPrinter->printerTemplate.windowId, currChar, textPrinter->printerTemplate.currentX, textPrinter->printerTemplate.currentY);
|
||||
textPrinter->printerTemplate.currentX += gUnknown_03002F90.unk80 + textPrinter->printerTemplate.letterSpacing;
|
||||
gUnknown_03002F90.width = DrawKeypadIcon(textPrinter->printerTemplate.windowId, currChar, textPrinter->printerTemplate.currentX, textPrinter->printerTemplate.currentY);
|
||||
textPrinter->printerTemplate.currentX += gUnknown_03002F90.width + textPrinter->printerTemplate.letterSpacing;
|
||||
return 0;
|
||||
case EOS:
|
||||
return 1;
|
||||
@@ -1070,18 +1051,21 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
||||
|
||||
if (textPrinter->minLetterSpacing)
|
||||
{
|
||||
textPrinter->printerTemplate.currentX += gUnknown_03002F90.unk80;
|
||||
width = textPrinter->minLetterSpacing - gUnknown_03002F90.unk80;
|
||||
textPrinter->printerTemplate.currentX += gUnknown_03002F90.width;
|
||||
width = textPrinter->minLetterSpacing - gUnknown_03002F90.width;
|
||||
if (width > 0)
|
||||
{
|
||||
ClearTextSpan(textPrinter, width);
|
||||
textPrinter->printerTemplate.currentX += width;
|
||||
}
|
||||
}
|
||||
else if (textPrinter->japanese)
|
||||
textPrinter->printerTemplate.currentX += (gUnknown_03002F90.unk80 + textPrinter->printerTemplate.letterSpacing);
|
||||
else
|
||||
textPrinter->printerTemplate.currentX += gUnknown_03002F90.unk80;
|
||||
{
|
||||
if (textPrinter->japanese)
|
||||
textPrinter->printerTemplate.currentX += (gUnknown_03002F90.width + textPrinter->printerTemplate.letterSpacing);
|
||||
else
|
||||
textPrinter->printerTemplate.currentX += gUnknown_03002F90.width;
|
||||
}
|
||||
return 0;
|
||||
case 1:
|
||||
if (TextPrinterWait(textPrinter))
|
||||
@@ -1612,15 +1596,15 @@ void DecompressGlyphFont0(u16 glyphId, bool32 isJapanese)
|
||||
glyphs = gFont0JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & 0xF));
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x40
|
||||
gUnknown_03002F90.unk80 = 8; // gGlyphWidth
|
||||
gUnknown_03002F90.unk81 = 12; // gGlyphHeight
|
||||
gUnknown_03002F90.width = 8; // gGlyphWidth
|
||||
gUnknown_03002F90.height = 12; // gGlyphHeight
|
||||
}
|
||||
else
|
||||
{
|
||||
glyphs = gFont0LatinGlyphs + (0x20 * glyphId);
|
||||
gUnknown_03002F90.unk80 = gFont0LatinGlyphWidths[glyphId];
|
||||
gUnknown_03002F90.width = gFont0LatinGlyphWidths[glyphId];
|
||||
|
||||
if (gUnknown_03002F90.unk80 <= 8)
|
||||
if (gUnknown_03002F90.width <= 8)
|
||||
{
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
|
||||
@@ -1633,7 +1617,7 @@ void DecompressGlyphFont0(u16 glyphId, bool32 isJapanese)
|
||||
DecompressGlyphTile(glyphs + 0x18, gUnknown_03002F90.unk60);
|
||||
}
|
||||
|
||||
gUnknown_03002F90.unk81 = 13;
|
||||
gUnknown_03002F90.height = 13;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1655,15 +1639,15 @@ void DecompressGlyphFont7(u16 glyphId, bool32 isJapanese)
|
||||
glyphs = gFont1JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & (eff = 0xF))); // shh, no questions, only matching now
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x40
|
||||
gUnknown_03002F90.unk80 = 8; // gGlyphWidth
|
||||
gUnknown_03002F90.unk81 = 15; // gGlyphHeight
|
||||
gUnknown_03002F90.width = 8; // gGlyphWidth
|
||||
gUnknown_03002F90.height = 15; // gGlyphHeight
|
||||
}
|
||||
else
|
||||
{
|
||||
glyphs = gFont7LatinGlyphs + (0x20 * glyphId);
|
||||
gUnknown_03002F90.unk80 = gFont7LatinGlyphWidths[glyphId];
|
||||
gUnknown_03002F90.width = gFont7LatinGlyphWidths[glyphId];
|
||||
|
||||
if (gUnknown_03002F90.unk80 <= 8)
|
||||
if (gUnknown_03002F90.width <= 8)
|
||||
{
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
|
||||
@@ -1676,7 +1660,7 @@ void DecompressGlyphFont7(u16 glyphId, bool32 isJapanese)
|
||||
DecompressGlyphTile(glyphs + 0x18, gUnknown_03002F90.unk60);
|
||||
}
|
||||
|
||||
gUnknown_03002F90.unk81 = 15;
|
||||
gUnknown_03002F90.height = 15;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1697,15 +1681,15 @@ void DecompressGlyphFont8(u16 glyphId, bool32 isJapanese)
|
||||
glyphs = gFont0JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & 0xF));
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x40
|
||||
gUnknown_03002F90.unk80 = 8; // gGlyphWidth
|
||||
gUnknown_03002F90.unk81 = 12; // gGlyphHeight
|
||||
gUnknown_03002F90.width = 8; // gGlyphWidth
|
||||
gUnknown_03002F90.height = 12; // gGlyphHeight
|
||||
}
|
||||
else
|
||||
{
|
||||
glyphs = gFont8LatinGlyphs + (0x20 * glyphId);
|
||||
gUnknown_03002F90.unk80 = gFont8LatinGlyphWidths[glyphId];
|
||||
gUnknown_03002F90.width = gFont8LatinGlyphWidths[glyphId];
|
||||
|
||||
if (gUnknown_03002F90.unk80 <= 8)
|
||||
if (gUnknown_03002F90.width <= 8)
|
||||
{
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
|
||||
@@ -1718,7 +1702,7 @@ void DecompressGlyphFont8(u16 glyphId, bool32 isJapanese)
|
||||
DecompressGlyphTile(glyphs + 0x18, gUnknown_03002F90.unk60);
|
||||
}
|
||||
|
||||
gUnknown_03002F90.unk81 = 12;
|
||||
gUnknown_03002F90.height = 12;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1741,15 +1725,15 @@ void DecompressGlyphFont2(u16 glyphId, bool32 isJapanese)
|
||||
DecompressGlyphTile(glyphs + 0x8, gUnknown_03002F90.unk20); // gUnknown_03002F90 + 0x40
|
||||
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x20
|
||||
DecompressGlyphTile(glyphs + 0x88, gUnknown_03002F90.unk60); // gUnknown_03002F90 + 0x60
|
||||
gUnknown_03002F90.unk80 = gFont2JapaneseGlyphWidths[glyphId]; // gGlyphWidth
|
||||
gUnknown_03002F90.unk81 = 14; // gGlyphHeight
|
||||
gUnknown_03002F90.width = gFont2JapaneseGlyphWidths[glyphId]; // gGlyphWidth
|
||||
gUnknown_03002F90.height = 14; // gGlyphHeight
|
||||
}
|
||||
else
|
||||
{
|
||||
glyphs = gFont2LatinGlyphs + (0x20 * glyphId);
|
||||
gUnknown_03002F90.unk80 = gFont2LatinGlyphWidths[glyphId];
|
||||
gUnknown_03002F90.width = gFont2LatinGlyphWidths[glyphId];
|
||||
|
||||
if (gUnknown_03002F90.unk80 <= 8)
|
||||
if (gUnknown_03002F90.width <= 8)
|
||||
{
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
|
||||
@@ -1762,7 +1746,7 @@ void DecompressGlyphFont2(u16 glyphId, bool32 isJapanese)
|
||||
DecompressGlyphTile(glyphs + 0x18, gUnknown_03002F90.unk60);
|
||||
}
|
||||
|
||||
gUnknown_03002F90.unk81 = 14;
|
||||
gUnknown_03002F90.height = 14;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1784,15 +1768,15 @@ void DecompressGlyphFont1(u16 glyphId, bool32 isJapanese)
|
||||
glyphs = gFont1JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & (eff = 0xF))); // shh, no questions, only matching now
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x40
|
||||
gUnknown_03002F90.unk80 = 8; // gGlyphWidth
|
||||
gUnknown_03002F90.unk81 = 15; // gGlyphHeight
|
||||
gUnknown_03002F90.width = 8; // gGlyphWidth
|
||||
gUnknown_03002F90.height = 15; // gGlyphHeight
|
||||
}
|
||||
else
|
||||
{
|
||||
glyphs = gFont1LatinGlyphs + (0x20 * glyphId);
|
||||
gUnknown_03002F90.unk80 = gFont1LatinGlyphWidths[glyphId];
|
||||
gUnknown_03002F90.width = gFont1LatinGlyphWidths[glyphId];
|
||||
|
||||
if (gUnknown_03002F90.unk80 <= 8)
|
||||
if (gUnknown_03002F90.width <= 8)
|
||||
{
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
|
||||
@@ -1805,7 +1789,7 @@ void DecompressGlyphFont1(u16 glyphId, bool32 isJapanese)
|
||||
DecompressGlyphTile(glyphs + 0x18, gUnknown_03002F90.unk60);
|
||||
}
|
||||
|
||||
gUnknown_03002F90.unk81 = 15;
|
||||
gUnknown_03002F90.height = 15;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1824,6 +1808,6 @@ void DecompressGlyphFont9(u16 glyphId)
|
||||
glyphs = gFont9JapaneseGlyphs + (0x100 * (glyphId >> 4)) + (0x8 * (glyphId & 0xF));
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40);
|
||||
gUnknown_03002F90.unk80 = 8;
|
||||
gUnknown_03002F90.unk81 = 12;
|
||||
gUnknown_03002F90.width = 8;
|
||||
gUnknown_03002F90.height = 12;
|
||||
}
|
||||
|
||||
15
gflib/text.h
@@ -269,13 +269,6 @@
|
||||
|
||||
#define TEXT_SPEED_FF 0xFF
|
||||
|
||||
enum
|
||||
{
|
||||
COLOR_FOREGROUND,
|
||||
COLOR_SHADOW,
|
||||
COLOR_BACKGROUND
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
FONTATTR_MAX_LETTER_WIDTH,
|
||||
@@ -329,7 +322,7 @@ struct TextPrinter
|
||||
u8 delayCounter;
|
||||
u8 scrollDistance;
|
||||
u8 minLetterSpacing; // 0x20
|
||||
bool8 japanese;
|
||||
u8 japanese;
|
||||
};
|
||||
|
||||
struct FontInfo
|
||||
@@ -373,13 +366,13 @@ struct Struct_03002F90
|
||||
u32 unk20[8];
|
||||
u32 unk40[8];
|
||||
u32 unk60[8];
|
||||
u8 unk80;
|
||||
u8 unk81;
|
||||
u8 width;
|
||||
u8 height;
|
||||
};
|
||||
|
||||
extern TextFlags gTextFlags;
|
||||
|
||||
extern bool8 gUnknown_03002F84;
|
||||
extern u8 gUnknown_03002F84;
|
||||
extern struct Struct_03002F90 gUnknown_03002F90;
|
||||
|
||||
void SetFontsPointer(const struct FontInfo *fonts);
|
||||
|
||||
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 147 B After Width: | Height: | Size: 147 B |
|
Before Width: | Height: | Size: 556 B After Width: | Height: | Size: 556 B |
|
Before Width: | Height: | Size: 155 B After Width: | Height: | Size: 155 B |