diff options
370 files changed, 59209 insertions, 35885 deletions
diff --git a/.gitignore b/.gitignore index a92cf57b6..2a1300ab3 100644 --- a/.gitignore +++ b/.gitignore @@ -27,5 +27,6 @@ Thumbs.db build/ .DS_Store *.ddump +.idea/ porymap.project.cfg .vscode/ diff --git a/.travis.yml b/.travis.yml index 52c8e35d5..1ff0ad2c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,9 +22,16 @@ install: matrix: include: - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-7 env: _="Build" script: - - ./build_tools.sh + - make -j2 tools CXX=g++-7 - make -j2 compare + - make -j2 modern after_success: - .travis/calcrom/webhook.sh pokeemerald diff --git a/INSTALL.md b/INSTALL.md index 501017c35..6f5a2435d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,6 +1,6 @@ -## Prerequisites +# Prerequisites -| Linux | macOS | Windows 10 (build 18917+) | Windows 10 (1709+) | Windows Vista, 7, 8, 8.1, and 10 (1507, 1511, 1607, 1703) +| 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) @@ -20,7 +20,7 @@ Install the **devkitARM** toolchain of [devkitPro](https://devkitpro.org/wiki/Ge echo "export DEVKITARM=$DEVKITARM" >> ~/.bashrc -## Installation +# Installation To set up the repository: @@ -32,22 +32,59 @@ To set up the repository: ./install.sh ../pokeemerald cd ../pokeemerald - ./build_tools.sh -If the repository was previously set up using Cygwin, delete the `.exe` files in the subfolders of the `tools` folder except for `agbcc` and run the `build_tools.sh` script again. +To build **pokeemerald.gba** and confirm it matches the official ROM image: -To build **pokeemerald.gba**: + make compare + +## Notes + +* 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`. + +* 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 + +To build **pokeemerald.gba** with your changes: + + make + +## 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. + +To speed up building, run: make -j$(nproc) -To confirm it matches the official ROM image while building, do this instead: +`nproc` is not available on macOS. The alternative is `sysctl -n hw.ncpu` ([relevant Stack Overflow thread](https://stackoverflow.com/questions/1715580)). - make compare -j$(nproc) +## 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. - make -j$(nproc) NODEP=1 + make NODEP=1 + +## Building with 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 + +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`. + + make TOOLCHAIN="/path/to/toolchain/here" + +The following is an example: + + make TOOLCHAIN="/usr/local/arm-none-eabi" + +To compile the `modern` target with this toolchain, the subdirectories `lib`, `include`, and `arm-none-eabi` must also be present. + +## Building with debug info -**Note:** If the build command is not recognized on Linux, including the Linux environment used within Windows, run `nproc` and replace `$(nproc)` with the returned value (e.g.: `make -j4`). Because `nproc` is not available on macOS, the alternative is `sysctl -n hw.ncpu`. +To build **pokeemerald.elf** with enhanced debug info, use the `DINFO` variable. -**Note 2:** 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. + make DINFO=1 @@ -1,4 +1,13 @@ -include $(DEVKITARM)/base_tools +TOOLCHAIN := $(DEVKITARM) +ifneq (,$(wildcard $(TOOLCHAIN)/base_tools)) +include $(TOOLCHAIN)/base_tools +else +export PATH := $(TOOLCHAIN)/bin:$(PATH) +PREFIX := arm-none-eabi- +OBJCOPY := $(PREFIX)objcopy +export CC := $(PREFIX)gcc +export AS := $(PREFIX)as +endif export CPP := $(PREFIX)cpp export LD := $(PREFIX)ld @@ -12,17 +21,16 @@ TITLE := POKEMON EMER GAME_CODE := BPEE MAKER_CODE := 01 REVISION := 0 +MODERN ?= 0 SHELL := /bin/bash -o pipefail -ROM := pokeemerald.gba -OBJ_DIR := build/emerald - ELF = $(ROM:.gba=.elf) MAP = $(ROM:.gba=.map) C_SUBDIR = src ASM_SUBDIR = asm +DATA_SRC_SUBDIR = src/data DATA_ASM_SUBDIR = data SONG_SUBDIR = sound/songs MID_SUBDIR = sound/songs/midi @@ -33,16 +41,32 @@ DATA_ASM_BUILDDIR = $(OBJ_DIR)/$(DATA_ASM_SUBDIR) SONG_BUILDDIR = $(OBJ_DIR)/$(SONG_SUBDIR) MID_BUILDDIR = $(OBJ_DIR)/$(MID_SUBDIR) -ASFLAGS := -mcpu=arm7tdmi +ASFLAGS := -mcpu=arm7tdmi --defsym MODERN=$(MODERN) + +GCC_VER = $(shell $(CC) -dumpversion) +ifeq ($(MODERN),0) CC1 := tools/agbcc/bin/agbcc$(EXE) override CFLAGS += -mthumb-interwork -Wimplicit -Wparentheses -Werror -O2 -fhex-asm +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 -fno-aggressive-loop-optimizations -Wno-pointer-to-int-cast +ROM := pokeemerald_modern.gba +OBJ_DIR := build/modern +LIBPATH := -L $(TOOLCHAIN)/lib/gcc/arm-none-eabi/$(GCC_VER)/thumb -L $(TOOLCHAIN)/arm-none-eabi/lib/thumb +endif -CPPFLAGS := -I tools/agbcc/include -I tools/agbcc -iquote include -Wno-trigraphs +CPPFLAGS := -iquote include -Wno-trigraphs -DMODERN=$(MODERN) +ifeq ($(MODERN),0) +CPPFLAGS += -I tools/agbcc/include -I tools/agbcc +endif LDFLAGS = -Map ../../$(MAP) -LIB := -L ../../tools/agbcc/lib -lgcc -lc +LIB := $(LIBPATH) -lgcc -lc SHA1 := $(shell { command -v sha1sum || command -v shasum; } 2>/dev/null) -c GFX := tools/gbagfx/gbagfx$(EXE) @@ -53,6 +77,13 @@ PREPROC := tools/preproc/preproc$(EXE) RAMSCRGEN := tools/ramscrgen/ramscrgen$(EXE) FIX := tools/gbafix/gbafix$(EXE) MAPJSON := tools/mapjson/mapjson$(EXE) +JSONPROC := tools/jsonproc/jsonproc$(EXE) + +TOOLDIRS := $(filter-out tools/agbcc tools/binutils,$(wildcard tools/*)) +TOOLBASE = $(TOOLDIRS:tools/%=%) +TOOLS = $(foreach tool,$(TOOLBASE),tools/$(tool)/$(tool)$(EXE)) + +MAKEFLAGS += --no-print-directory # Clear the default suffixes .SUFFIXES: @@ -64,7 +95,17 @@ MAPJSON := tools/mapjson/mapjson$(EXE) # Secondary expansion is required for dependency variables in object rules. .SECONDEXPANSION: -.PHONY: rom clean compare tidy +.PHONY: all rom clean compare tidy tools mostlyclean clean-tools $(TOOLDIRS) + +infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line)))) + +# Build tools when building the rom +# Disable dependency scanning for clean/tidy/tools +ifeq (,$(filter-out all compare,$(MAKECMDGOALS))) +$(call infoshell, $(MAKE) tools) +else +NODEP := 1 +endif C_SRCS := $(wildcard $(C_SUBDIR)/*.c $(C_SUBDIR)/*/*.c $(C_SUBDIR)/*/*/*.c) C_OBJS := $(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(C_SRCS)) @@ -86,29 +127,48 @@ OBJS_REL := $(patsubst $(OBJ_DIR)/%,%,$(OBJS)) SUBDIRS := $(sort $(dir $(OBJS))) +AUTO_GEN_TARGETS := + $(shell mkdir -p $(SUBDIRS)) +all: rom + +tools: $(TOOLDIRS) + +$(TOOLDIRS): + @$(MAKE) -C $@ + rom: $(ROM) # For contributors to make sure a change didn't affect the contents of the ROM. -compare: $(ROM) +compare: all @$(SHA1) rom.sha1 -clean: tidy +clean: mostlyclean clean-tools + +clean-tools: + @$(foreach tooldir,$(TOOLDIRS),$(MAKE) clean -C $(tooldir);) + +mostlyclean: tidy rm -f sound/direct_sound_samples/*.bin - rm -f $(SONG_OBJS) $(MID_OBJS) $(MID_SUBDIR)/*.s + 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 {} + 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 {} + + rm -f $(AUTO_GEN_TARGETS) tidy: rm -f $(ROM) $(ELF) $(MAP) - rm -r build/* + rm -r $(OBJ_DIR) +ifeq ($(MODERN),0) + @$(MAKE) tidy MODERN=1 +endif include graphics_file_rules.mk include map_data_rules.mk include spritesheet_rules.mk +include json_data_rules.mk include songs.mk %.s: ; @@ -127,6 +187,7 @@ sound/direct_sound_samples/cry_%.bin: sound/direct_sound_samples/cry_%.aif ; $(A sound/%.bin: sound/%.aif ; $(AIF) $< $@ +ifeq ($(MODERN),0) $(C_BUILDDIR)/libc.o: CC1 := tools/agbcc/bin/old_agbcc $(C_BUILDDIR)/libc.o: CFLAGS := -O2 @@ -139,6 +200,7 @@ $(C_BUILDDIR)/agb_flash_mx.o: CFLAGS := -O -mthumb-interwork $(C_BUILDDIR)/m4a.o: CC1 := tools/agbcc/bin/old_agbcc $(C_BUILDDIR)/record_mixing.o: CFLAGS += -ffreestanding +endif ifeq ($(NODEP),1) $(C_BUILDDIR)/%.o: c_dep := @@ -186,12 +248,23 @@ $(OBJ_DIR)/sym_common.ld: sym_common.txt $(C_OBJS) $(wildcard common_syms/*.txt) $(OBJ_DIR)/sym_ewram.ld: sym_ewram.txt $(RAMSCRGEN) ewram_data $< ENGLISH > $@ -$(OBJ_DIR)/ld_script.ld: ld_script.txt $(OBJ_DIR)/sym_bss.ld $(OBJ_DIR)/sym_common.ld $(OBJ_DIR)/sym_ewram.ld - cd $(OBJ_DIR) && sed "s#tools/#../../tools/#g" ../../ld_script.txt > ld_script.ld +ifeq ($(MODERN),0) +LD_SCRIPT := ld_script.txt +LD_SCRIPT_DEPS := $(OBJ_DIR)/sym_bss.ld $(OBJ_DIR)/sym_common.ld $(OBJ_DIR)/sym_ewram.ld +else +LD_SCRIPT := ld_script_modern.txt +LD_SCRIPT_DEPS := +endif + +$(OBJ_DIR)/ld_script.ld: $(LD_SCRIPT) $(LD_SCRIPT_DEPS) + cd $(OBJ_DIR) && sed "s#tools/#../../tools/#g" ../../$(LD_SCRIPT) > ld_script.ld $(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS) cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ $(OBJS_REL) $(LIB) + $(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent $(ROM): $(ELF) $(OBJCOPY) -O binary $< $@ - $(FIX) $@ -p -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent + $(FIX) $@ -p --silent + +modern: ; @$(MAKE) MODERN=1 diff --git a/asm/berry_crush.s b/asm/berry_crush.s index 00bff2b56..2c2b55250 100755 --- a/asm/berry_crush.s +++ b/asm/berry_crush.s @@ -5,438 +5,8 @@ .text - thumb_func_start sub_80216E0 -sub_80216E0: @ 80216E0 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x10 - adds r6, r0, 0 - str r1, [sp] - movs r0, 0 - str r0, [sp, 0x4] - movs r1, 0x4E - adds r1, r6 - mov r10, r1 - mov r9, r0 - ldrb r2, [r6, 0x9] - cmp r0, r2 - bcs _080217AE - ldr r7, =gUnknown_082F41CC -_08021704: - mov r3, r10 - ldrh r0, [r3, 0xA] - mov r4, r9 - lsls r1, r4, 1 - add r1, r9 - asrs r0, r1 - lsls r0, 16 - movs r1, 0xE0 - lsls r1, 11 - ands r1, r0 - lsrs r1, 16 - mov r8, r1 - cmp r1, 0 - beq _0802179E - ldr r0, [sp, 0x4] - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - str r0, [sp, 0x4] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _08021748 - lsls r4, 2 - ldr r5, [sp] - adds r5, 0x24 - adds r0, r5, r4 - ldr r0, [r0] - movs r1, 0x1 - bl StartSpriteAnim - b _0802175A - .pool -_08021748: - mov r0, r9 - lsls r4, r0, 2 - ldr r5, [sp] - adds r5, 0x24 - adds r0, r5, r4 - ldr r0, [r0] - movs r1, 0 - bl StartSpriteAnim -_0802175A: - adds r3, r5, r4 - ldr r2, [r3] - adds r2, 0x3E - ldrb r0, [r2] - movs r4, 0x5 - negs r4, r4 - adds r1, r4, 0 - ands r0, r1 - strb r0, [r2] - ldr r2, [r3] - adds r2, 0x2C - ldrb r0, [r2] - subs r4, 0x3C - adds r1, r4, 0 - ands r0, r1 - strb r0, [r2] - ldr r2, [r3] - movs r0, 0x3 - mov r1, r8 - ands r1, r0 - mov r8, r1 - subs r1, 0x1 - lsls r1, 1 - adds r0, r1, r7 - ldrb r0, [r0] - lsls r0, 24 - asrs r0, 24 - strh r0, [r2, 0x24] - ldr r2, [r3] - ldr r3, =gUnknown_082F41CC+1 - adds r1, r3 - movs r0, 0 - ldrsb r0, [r1, r0] - strh r0, [r2, 0x26] -_0802179E: - mov r0, r9 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 - ldrb r4, [r6, 0x9] - cmp r9, r4 - bcc _08021704 -_080217AE: - ldr r0, [sp, 0x4] - cmp r0, 0 - bne _080217C0 - adds r2, r6, 0 - adds r2, 0x25 - ldrb r1, [r2] - b _0802189C - .pool -_080217C0: - ldrh r0, [r6, 0x28] - movs r1, 0x3 - bl __umodsi3 - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - mov r1, r8 - str r1, [sp, 0x8] - movs r2, 0 - mov r9, r2 - mov r3, r10 - ldrh r1, [r3, 0xC] - lsls r0, r1, 1 - adds r0, 0x3 - adds r6, 0x25 - str r6, [sp, 0xC] - adds r3, r1, 0 - cmp r9, r0 - bge _08021890 -_080217E8: - mov r4, r9 - lsls r1, r4, 2 - ldr r0, [sp] - adds r0, 0x4C - adds r7, r0, r1 - ldr r2, [r7] - adds r0, r2, 0 - adds r0, 0x3E - ldrb r1, [r0] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _0802187E - ldr r0, =sub_8022B28 - str r0, [r2, 0x1C] - lsls r1, r4, 1 - ldr r3, =gUnknown_082F41CC+6 - adds r0, r1, r3 - movs r4, 0 - ldrsb r4, [r0, r4] - adds r0, r4, 0 - adds r0, 0x78 - strh r0, [r2, 0x20] - ldr r2, [r7] - ldr r0, =gUnknown_082F41CC+7 - adds r1, r0 - movs r6, 0 - ldrsb r6, [r1, r6] - mov r1, r8 - lsls r0, r1, 2 - subs r0, 0x88 - subs r0, r6, r0 - strh r0, [r2, 0x22] - ldr r5, [r7] - ldr r2, [sp, 0x8] - lsls r1, r2, 2 - adds r0, r4, 0 - bl __divsi3 - adds r4, r0 - strh r4, [r5, 0x24] - ldr r0, [r7] - strh r6, [r0, 0x26] - mov r3, r10 - ldrb r1, [r3, 0x4] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _08021860 - ldr r0, [r7] - movs r1, 0x1 - bl StartSpriteAnim - b _08021868 - .pool -_08021860: - ldr r0, [r7] - movs r1, 0 - bl StartSpriteAnim -_08021868: - mov r0, r8 - adds r0, 0x1 - lsls r0, 16 - lsrs r0, 16 - mov r8, r0 - mov r4, r10 - ldrh r3, [r4, 0xC] - cmp r0, 0x3 - bls _0802187E - movs r0, 0 - mov r8, r0 -_0802187E: - mov r0, r9 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 - lsls r0, r3, 1 - adds r0, 0x3 - cmp r9, r0 - blt _080217E8 -_08021890: - ldr r2, [sp, 0xC] - ldrb r1, [r2] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _080218A6 -_0802189C: - movs r0, 0x5 - negs r0, r0 - ands r0, r1 - strb r0, [r2] - b _080218C4 -_080218A6: - ldr r3, [sp, 0x4] - cmp r3, 0x1 - bne _080218B4 - movs r0, 0x4E - bl PlaySE - b _080218BA -_080218B4: - movs r0, 0x4D - bl PlaySE -_080218BA: - ldr r4, [sp, 0xC] - ldrb r0, [r4] - movs r1, 0x4 - orrs r0, r1 - strb r0, [r4] -_080218C4: - add sp, 0x10 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_80216E0 - - thumb_func_start sub_80218D4 -sub_80218D4: @ 80218D4 - push {r4-r7,lr} - adds r5, r0, 0 - adds r6, r1, 0 - movs r2, 0 - ldrb r0, [r5, 0x9] - cmp r2, r0 - bcs _08021906 - adds r4, r6, 0 - adds r4, 0x24 - movs r7, 0x4 - adds r3, r0, 0 -_080218EA: - lsls r0, r2, 2 - adds r0, r4, r0 - ldr r0, [r0] - adds r0, 0x3E - ldrb r1, [r0] - adds r0, r7, 0 - ands r0, r1 - cmp r0, 0 - beq _08021920 - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, r3 - bcc _080218EA -_08021906: - movs r2, 0 - adds r3, r6, 0 - adds r3, 0x4C - movs r4, 0x4 -_0802190E: - lsls r0, r2, 2 - adds r0, r3, r0 - ldr r0, [r0] - adds r0, 0x3E - ldrb r1, [r0] - adds r0, r4, 0 - ands r0, r1 - cmp r0, 0 - bne _08021924 -_08021920: - movs r0, 0 - b _0802193C -_08021924: - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0xA - bls _0802190E - movs r1, 0x2C - ldrsh r0, [r5, r1] - cmp r0, 0 - beq _0802193A - movs r0, 0 - strh r0, [r5, 0x2C] -_0802193A: - movs r0, 0x1 -_0802193C: - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_80218D4 - thumb_func_start sub_8021944 -sub_8021944: @ 8021944 - push {r4-r7,lr} - adds r6, r0, 0 - lsls r4, r1, 16 - lsrs r4, 16 - movs r7, 0 - movs r5, 0xE1 - lsls r5, 4 - adds r0, r4, 0 - adds r1, r5, 0 - bl __udivsi3 - strh r0, [r6, 0x4] - adds r0, r4, 0 - adds r1, r5, 0 - bl __umodsi3 - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x3C - bl __udivsi3 - strh r0, [r6, 0x6] - adds r0, r4, 0 - movs r1, 0x3C - bl __umodsi3 - lsls r0, 24 - asrs r0, 16 - movs r1, 0x4 - bl sub_8151534 - adds r2, r7, 0 - lsls r0, 16 - asrs r3, r0, 16 - movs r0, 0x7 - mov r12, r0 - ldr r5, =gUnknown_082F334C - movs r4, 0x1 -_08021990: - mov r0, r12 - subs r1, r0, r2 - adds r0, r3, 0 - asrs r0, r1 - ands r0, r4 - cmp r0, 0 - beq _080219A6 - lsls r0, r2, 2 - adds r0, r5 - ldr r0, [r0] - adds r7, r0 -_080219A6: - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0x7 - bls _08021990 - ldr r1, =0x000f4240 - adds r0, r7, 0 - bl __udivsi3 - strh r0, [r6, 0x8] - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8021944 - thumb_func_start sub_80219C8 -sub_80219C8: @ 80219C8 - push {r4-r6,lr} - mov r6, r8 - push {r6} - sub sp, 0xC - adds r6, r0, 0 - adds r4, r1, 0 - adds r5, r2, 0 - mov r8, r3 - lsls r6, 24 - lsrs r6, 24 - lsls r4, 24 - lsrs r4, 24 - lsls r5, 24 - lsrs r5, 24 - movs r2, 0x1 - negs r2, r2 - movs r0, 0x2 - mov r1, r8 - bl GetStringWidth - lsls r4, 2 - lsrs r0, 1 - subs r4, r0 - lsls r4, 24 - lsrs r4, 24 - lsls r0, r5, 1 - adds r0, r5 - ldr r1, =gUnknown_082F32D8 - adds r0, r1 - str r0, [sp] - movs r0, 0 - str r0, [sp, 0x4] - mov r0, r8 - str r0, [sp, 0x8] - adds r0, r6, 0 - movs r1, 0x2 - adds r2, r4, 0 - movs r3, 0 - bl AddTextPrinterParameterized3 - add sp, 0xC - pop {r3} - mov r8, r3 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80219C8 thumb_func_start sub_8021A28 sub_8021A28: @ 8021A28 diff --git a/asm/dodrio_berry_picking.s b/asm/dodrio_berry_picking.s deleted file mode 100755 index f5d3ea0c4..000000000 --- a/asm/dodrio_berry_picking.s +++ /dev/null @@ -1,11806 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start sub_802493C -sub_802493C: @ 802493C - push {r4-r6,lr} - adds r5, r1, 0 - lsls r0, 16 - lsrs r6, r0, 16 - ldr r1, =gUnknown_03000DB0 - movs r0, 0 - str r0, [r1] - ldr r0, =gReceivedRemoteLinkPlayers - ldrb r0, [r0] - cmp r0, 0 - beq _08024A10 - ldr r4, =gUnknown_02022C98 - ldr r0, =0x00003330 - bl AllocZeroed - str r0, [r4] - cmp r0, 0 - beq _08024A10 - bl sub_8024A1C - ldr r0, [r4] - bl sub_8024A30 - ldr r0, [r4] - str r5, [r0] - bl GetMultiplayerId - ldr r1, [r4] - adds r1, 0x28 - strb r0, [r1] - ldr r1, [r4] - ldr r2, =0x000032cc - adds r0, r1, r2 - adds r2, r1, 0 - adds r2, 0x28 - ldrb r3, [r2] - lsls r2, r3, 4 - subs r2, r3 - lsls r2, 2 - adds r1, r2 - ldr r2, =0x000031a0 - adds r1, r2 - movs r2, 0x3C - bl memcpy - ldr r0, [r4] - adds r1, r0, 0 - adds r1, 0x28 - ldrb r1, [r1] - lsls r1, 2 - ldr r2, =0x0000318c - adds r1, r2 - adds r0, r1 - movs r1, 0x64 - muls r1, r6 - ldr r2, =gPlayerParty - adds r1, r2 - bl sub_80261F8 - ldr r0, =sub_8024BC8 - movs r1, 0x1 - bl CreateTask - ldr r0, =sub_80261CC - bl SetMainCallback2 - bl sub_80273F0 - ldr r2, [r4] - adds r0, r2, 0 - adds r0, 0x24 - ldrb r0, [r0] - adds r1, r2, 0 - adds r1, 0x44 - adds r2, 0x48 - bl sub_8026B5C - bl StopMapMusic - ldr r0, =0x0000021e - bl PlayNewMapMusic - b _08024A16 - .pool -_08024A10: - adds r0, r5, 0 - bl SetMainCallback2 -_08024A16: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_802493C - - thumb_func_start sub_8024A1C -sub_8024A1C: @ 8024A1C - push {lr} - bl ResetTasks - bl ResetSpriteData - bl FreeAllSpritePalettes - pop {r0} - bx r0 - thumb_func_end sub_8024A1C - - thumb_func_start sub_8024A30 -sub_8024A30: @ 8024A30 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x28 - adds r2, r0, 0 - movs r0, 0 - strb r0, [r2, 0xC] - strb r0, [r2, 0x10] - strb r0, [r2, 0x14] - strb r0, [r2, 0x18] - strb r0, [r2, 0x1C] - movs r3, 0x8E - lsls r3, 1 - adds r1, r2, r3 - str r0, [r1] - movs r7, 0x90 - lsls r7, 1 - adds r1, r2, r7 - str r0, [r1] - adds r1, r2, 0 - adds r1, 0x30 - strb r0, [r1] - adds r1, 0x10 - strb r0, [r1] - subs r1, 0x4 - strb r0, [r1] - adds r3, 0x10 - adds r1, r2, r3 - str r0, [r1] - movs r5, 0 - adds r1, r2, 0 - adds r1, 0x98 - movs r3, 0 -_08024A76: - adds r0, r1, r5 - strb r3, [r0] - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0x3 - bls _08024A76 - movs r5, 0 - adds r7, r2, 0 - adds r7, 0xA8 - str r7, [sp] - adds r0, r2, 0 - adds r0, 0xB0 - str r0, [sp, 0xC] - movs r1, 0x4A - adds r1, r2 - mov r10, r1 - movs r3, 0x4C - adds r3, r2 - mov r9, r3 - movs r7, 0x4E - adds r7, r2 - mov r12, r7 - subs r0, 0x60 - str r0, [sp, 0x24] - adds r6, r2, 0 - adds r6, 0x54 - adds r1, r2, 0 - adds r1, 0xD0 - str r1, [sp, 0x1C] - adds r3, r2, 0 - adds r3, 0xDC - str r3, [sp, 0x20] - adds r7, r2, 0 - adds r7, 0xC4 - str r7, [sp, 0x14] - adds r0, 0xA4 - str r0, [sp, 0x4] - adds r1, 0x25 - str r1, [sp, 0x8] - subs r3, 0xBC - str r3, [sp, 0x10] - movs r7, 0x24 - adds r7, r2 - mov r8, r7 - subs r0, 0xC0 - str r0, [sp, 0x18] - movs r3, 0 - movs r1, 0x86 - lsls r1, 1 - adds r4, r2, r1 - movs r7, 0x98 - lsls r7, 1 - adds r2, r7 -_08024AE2: - ldr r1, [sp] - adds r0, r1, r5 - strb r3, [r0] - ldr r7, [sp, 0xC] - adds r0, r7, r5 - strb r3, [r0] - lsls r0, r5, 1 - adds r0, r5 - lsls r0, 2 - mov r7, r10 - adds r1, r7, r0 - strh r3, [r1] - mov r7, r9 - adds r1, r7, r0 - strh r3, [r1] - mov r7, r12 - adds r1, r7, r0 - strh r3, [r1] - ldr r7, [sp, 0x24] - adds r1, r7, r0 - strh r3, [r1] - adds r0, r6, r0 - strh r3, [r0] - adds r0, r4, r5 - strb r3, [r0] - lsls r0, r5, 2 - adds r0, r2, r0 - str r3, [r0] - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0x4 - bls _08024AE2 - movs r5, 0 - movs r3, 0 - movs r4, 0xFF - ldr r6, [sp, 0x1C] -_08024B2C: - adds r0, r6, r5 - strb r3, [r0] - ldr r1, [sp, 0x20] - adds r0, r1, r5 - strb r3, [r0] - ldr r7, [sp, 0x14] - adds r0, r7, r5 - strb r3, [r0] - lsls r1, r5, 1 - ldr r0, [sp, 0x4] - adds r2, r0, r1 - ldrb r0, [r2] - orrs r0, r4 - strb r0, [r2] - ldr r7, [sp, 0x8] - adds r1, r7, r1 - ldrb r0, [r1] - orrs r0, r4 - strb r0, [r1] - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0xA - bls _08024B2C - bl GetMultiplayerId - movs r1, 0 - lsls r0, 24 - cmp r0, 0 - bne _08024B6A - movs r1, 0x1 -_08024B6A: - ldr r0, [sp, 0x10] - strb r1, [r0] - bl GetLinkPlayerCount - mov r1, r8 - strb r0, [r1] - bl GetMultiplayerId - ldr r3, [sp, 0x18] - strb r0, [r3] - movs r5, 0x1 - mov r7, r8 - ldrb r7, [r7] - cmp r5, r7 - bcs _08024BB6 - ldr r7, [sp, 0x18] - mov r6, r8 -_08024B8C: - adds r4, r7, r5 - subs r0, r5, 0x1 - adds r0, r7, r0 - ldrb r0, [r0] - adds r0, 0x1 - strb r0, [r4] - ldrb r2, [r4] - ldrb r1, [r6] - subs r0, r1, 0x1 - cmp r2, r0 - ble _08024BAA - adds r0, r2, 0 - bl __umodsi3 - strb r0, [r4] -_08024BAA: - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - ldrb r0, [r6] - cmp r5, r0 - bcc _08024B8C -_08024BB6: - add sp, 0x28 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_8024A30 - - thumb_func_start sub_8024BC8 -sub_8024BC8: @ 8024BC8 - push {r4,r5,lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r1, r0, 24 - ldr r0, =gUnknown_02022C98 - ldr r0, [r0] - ldrb r0, [r0, 0xC] - cmp r0, 0x7 - bls _08024BDC - b _08024D34 -_08024BDC: - lsls r0, 2 - ldr r1, =_08024BF0 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08024BF0: - .4byte _08024C10 - .4byte _08024C24 - .4byte _08024C4C - .4byte _08024C5A - .4byte _08024C80 - .4byte _08024CD4 - .4byte _08024CE6 - .4byte _08024D10 -_08024C10: - movs r0, 0 - bl SetVBlankCallback - ldr r0, =sub_8025910 - movs r1, 0x4 - bl sub_802620C - b _08024D20 - .pool -_08024C24: - ldr r0, =sub_8025910 - bl FuncIsActiveTask - lsls r0, 24 - cmp r0, 0 - beq _08024C32 - b _08024D40 -_08024C32: - ldr r4, =gUnknown_02022C98 - ldr r0, [r4] - movs r1, 0xB0 - lsls r1, 1 - adds r0, r1 - bl sub_8029274 - ldr r1, [r4] - b _08024D24 - .pool -_08024C4C: - bl sub_802A770 - cmp r0, 0 - bne _08024D40 - bl sub_8010434 - b _08024D20 -_08024C5A: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _08024D40 - ldr r0, =gReceivedRemoteLinkPlayers - ldrb r0, [r0] - cmp r0, 0 - beq _08024D20 - bl LoadWirelessStatusIndicatorSpriteGfx - movs r0, 0 - movs r1, 0 - bl CreateWirelessStatusIndicatorSprite - b _08024D20 - .pool -_08024C80: - ldr r0, =gUnknown_02022C98 - ldr r0, [r0] - adds r0, 0x24 - ldrb r5, [r0] - bl sub_80283A8 - movs r4, 0 - cmp r4, r5 - bcs _08024CBA -_08024C92: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r0, r1, 0 - adds r0, 0x34 - adds r0, r4 - ldrb r2, [r0] - lsls r0, r2, 2 - ldr r3, =0x0000318c - adds r0, r3 - adds r0, r1, r0 - adds r1, 0x24 - ldrb r3, [r1] - adds r1, r4, 0 - bl sub_8028408 - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, r5 - bcc _08024C92 -_08024CBA: - ldr r4, =gUnknown_02022C98 - ldr r0, [r4] - adds r0, 0x24 - ldrb r1, [r0] - movs r0, 0 - bl sub_802868C - ldr r1, [r4] - b _08024D24 - .pool -_08024CD4: - bl sub_8028A34 - bl sub_8028A88 - bl sub_8028D44 - bl sub_8028734 - b _08024D20 -_08024CE6: - movs r4, 0x1 - negs r4, r4 - adds r0, r4, 0 - movs r1, 0x10 - movs r2, 0 - bl BlendPalettes - movs r0, 0 - str r0, [sp] - adds r0, r4, 0 - movs r1, 0 - movs r2, 0x10 - movs r3, 0 - bl BeginNormalPaletteFade - ldr r0, =sub_80261E4 - bl SetVBlankCallback - b _08024D20 - .pool -_08024D10: - bl UpdatePaletteFade - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _08024D40 -_08024D20: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] -_08024D24: - ldrb r0, [r1, 0xC] - adds r0, 0x1 - strb r0, [r1, 0xC] - b _08024D40 - .pool -_08024D34: - adds r0, r1, 0 - bl DestroyTask - ldr r0, =sub_802589C - bl sub_802621C -_08024D40: - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8024BC8 - - thumb_func_start sub_8024D4C -sub_8024D4C: @ 8024D4C - push {lr} - bl sub_8025D04 - ldr r1, =gUnknown_082F7AC4 - ldr r0, =gUnknown_02022C98 - ldr r0, [r0] - ldrb r0, [r0, 0x18] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - bl _call_via_r0 - ldr r0, =gUnknown_03000DB0 - ldr r0, [r0] - cmp r0, 0 - bne _08024D70 - bl sub_8026AF4 -_08024D70: - bl sub_8025D50 - pop {r0} - bx r0 - .pool - thumb_func_end sub_8024D4C - - thumb_func_start sub_8024D84 -sub_8024D84: @ 8024D84 - push {lr} - bl sub_8025E0C - ldr r1, =gUnknown_082F7AF4 - ldr r0, =gUnknown_02022C98 - ldr r0, [r0] - ldrb r0, [r0, 0x18] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - bl _call_via_r0 - ldr r0, =gUnknown_03000DB0 - ldr r0, [r0] - cmp r0, 0 - bne _08024DA8 - bl sub_8026B28 -_08024DA8: - bl sub_8025ED8 - pop {r0} - bx r0 - .pool - thumb_func_end sub_8024D84 - - thumb_func_start sub_8024DBC -sub_8024DBC: @ 8024DBC - push {r4,lr} - ldr r4, =gUnknown_02022C98 - ldr r0, [r4] - ldrb r0, [r0, 0x10] - cmp r0, 0 - beq _08024DD4 - cmp r0, 0x1 - beq _08024DEA - b _08024DF8 - .pool -_08024DD4: - movs r0, 0x1 - bl sub_8028504 - movs r0, 0x1 - bl sub_80292E0 - ldr r1, [r4] - ldrb r0, [r1, 0x10] - adds r0, 0x1 - strb r0, [r1, 0x10] - b _08024DF8 -_08024DEA: - bl sub_802A770 - cmp r0, 0 - bne _08024DF8 - movs r0, 0x1 - bl sub_8026240 -_08024DF8: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_8024DBC - - thumb_func_start sub_8024E00 -sub_8024E00: @ 8024E00 - push {r4,lr} - ldr r4, =gUnknown_02022C98 - ldr r1, [r4] - ldrb r0, [r1, 0x10] - cmp r0, 0 - bne _08024E20 - bl sub_80262C0 - ldr r1, [r4] - ldrb r0, [r1, 0x10] - adds r0, 0x1 - strb r0, [r1, 0x10] - b _08024E30 - .pool -_08024E20: - movs r0, 0x8C - lsls r0, 1 - adds r1, r0 - movs r0, 0x1 - str r0, [r1] - movs r0, 0x2 - bl sub_8026240 -_08024E30: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_8024E00 - - thumb_func_start sub_8024E38 -sub_8024E38: @ 8024E38 - push {r4,lr} - sub sp, 0x4 - ldr r1, =gUnknown_02022C98 - ldr r0, [r1] - ldrb r0, [r0, 0x10] - adds r4, r1, 0 - cmp r0, 0x5 - bhi _08024F08 - lsls r0, 2 - ldr r1, =_08024E5C - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08024E5C: - .4byte _08024E74 - .4byte _08024E90 - .4byte _08024EA0 - .4byte _08024EC4 - .4byte _08024ED8 - .4byte _08024EF8 -_08024E74: - movs r0, 0 - str r0, [sp] - movs r0, 0x7 - movs r1, 0x8 - movs r2, 0x78 - movs r3, 0x50 - bl sub_802EB24 - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - b _08024EF0 - .pool -_08024E90: - bl sub_8010434 - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - b _08024EF0 - .pool -_08024EA0: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _08024F08 - ldr r2, =gUnknown_02022C98 - ldr r1, [r2] - ldrb r0, [r1, 0x10] - adds r0, 0x1 - movs r3, 0 - strb r0, [r1, 0x10] - ldr r0, [r2] - adds r0, 0x30 - strb r3, [r0] - b _08024F08 - .pool -_08024EC4: - bl sub_802EB84 - cmp r0, 0 - bne _08024F08 - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - b _08024EF0 - .pool -_08024ED8: - ldr r1, [r4] - adds r1, 0x30 - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x5 - bls _08024F08 - bl sub_8010434 - ldr r1, [r4] -_08024EF0: - ldrb r0, [r1, 0x10] - adds r0, 0x1 - strb r0, [r1, 0x10] - b _08024F08 -_08024EF8: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _08024F08 - movs r0, 0x3 - bl sub_8026240 -_08024F08: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_8024E38 - - thumb_func_start sub_8024F10 -sub_8024F10: @ 8024F10 - push {lr} - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - ldrb r0, [r1, 0x10] - cmp r0, 0 - bne _08024F2E - movs r2, 0x8E - lsls r2, 1 - adds r0, r1, r2 - ldr r0, [r0] - cmp r0, 0 - beq _08024F2E - movs r0, 0x4 - bl sub_8026240 -_08024F2E: - pop {r0} - bx r0 - .pool - thumb_func_end sub_8024F10 - - thumb_func_start sub_8024F38 -sub_8024F38: @ 8024F38 - push {r4,lr} - ldr r4, =gUnknown_02022C98 - ldr r2, [r4] - ldrb r0, [r2, 0x10] - cmp r0, 0 - bne _08024FF6 - adds r0, r2, 0 - adds r0, 0x40 - ldrb r0, [r0] - cmp r0, 0x9 - bhi _08024FE8 - adds r0, r2, 0 - adds r0, 0xA8 - ldrb r0, [r0] - cmp r0, 0 - bne _08024FEE - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _08024F88 - ldr r1, =0x000031cc - adds r0, r2, r1 - ldrb r1, [r0] - cmp r1, 0 - bne _08024FEE - ldr r3, =0x000031d0 - adds r0, r2, r3 - strb r1, [r0] - movs r0, 0x2 - b _08024FC2 - .pool -_08024F88: - movs r0, 0x10 - ands r0, r1 - cmp r0, 0 - beq _08024FA8 - ldr r3, =0x000031cc - adds r0, r2, r3 - ldrb r1, [r0] - cmp r1, 0 - bne _08024FEE - adds r3, 0x4 - adds r0, r2, r3 - strb r1, [r0] - movs r0, 0x1 - b _08024FC2 - .pool -_08024FA8: - movs r0, 0x20 - ands r0, r1 - cmp r0, 0 - beq _08024FD4 - ldr r3, =0x000031cc - adds r0, r2, r3 - ldrb r1, [r0] - cmp r1, 0 - bne _08024FEE - adds r3, 0x4 - adds r0, r2, r3 - strb r1, [r0] - movs r0, 0x3 -_08024FC2: - bl sub_8027518 - ldr r1, [r4] - ldr r2, =0x000031cc - adds r1, r2 - strb r0, [r1] - b _08024FEE - .pool -_08024FD4: - movs r0, 0 - bl sub_8027518 - ldr r1, [r4] - ldr r3, =0x000031cc - adds r1, r3 - strb r0, [r1] - b _08024FEE - .pool -_08024FE8: - movs r0, 0xB - bl sub_8026240 -_08024FEE: - bl sub_802671C - bl sub_8025F48 -_08024FF6: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_8024F38 - - thumb_func_start sub_8024FFC -sub_8024FFC: @ 8024FFC - push {lr} - ldr r0, =gUnknown_02022C98 - ldr r2, [r0] - adds r0, r2, 0 - adds r0, 0x40 - ldrb r0, [r0] - cmp r0, 0x9 - bhi _080250C4 - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _0802504C - adds r0, r2, 0 - adds r0, 0x28 - ldrb r1, [r0] - lsls r0, r1, 4 - subs r0, r1 - lsls r0, 2 - adds r0, r2, r0 - ldr r1, =0x000031cc - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0 - bne _080250CA - ldr r3, =0x000032f8 - adds r1, r2, r3 - movs r0, 0x2 - strb r0, [r1] - b _080250CA - .pool -_0802504C: - movs r0, 0x10 - ands r0, r1 - cmp r0, 0 - beq _08025080 - adds r0, r2, 0 - adds r0, 0x28 - ldrb r1, [r0] - lsls r0, r1, 4 - subs r0, r1 - lsls r0, 2 - adds r0, r2, r0 - ldr r1, =0x000031cc - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0 - bne _080250CA - ldr r3, =0x000032f8 - adds r1, r2, r3 - movs r0, 0x1 - strb r0, [r1] - b _080250CA - .pool -_08025080: - movs r0, 0x20 - ands r0, r1 - lsls r0, 16 - lsrs r1, r0, 16 - cmp r1, 0 - beq _080250B8 - adds r0, r2, 0 - adds r0, 0x28 - ldrb r1, [r0] - lsls r0, r1, 4 - subs r0, r1 - lsls r0, 2 - adds r0, r2, r0 - ldr r1, =0x000031cc - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0 - bne _080250CA - ldr r3, =0x000032f8 - adds r1, r2, r3 - movs r0, 0x3 - strb r0, [r1] - b _080250CA - .pool -_080250B8: - ldr r3, =0x000032f8 - adds r0, r2, r3 - strb r1, [r0] - b _080250CA - .pool -_080250C4: - movs r0, 0xB - bl sub_8026240 -_080250CA: - bl sub_8026044 - pop {r0} - bx r0 - thumb_func_end sub_8024FFC - - thumb_func_start sub_80250D4 -sub_80250D4: @ 80250D4 - push {r4,r5,lr} - bl sub_802671C - bl sub_8025F48 - bl sub_8026C50 - cmp r0, 0x1 - bne _080250F2 - bl sub_80272A4 - movs r0, 0x5 - bl sub_8026240 - b _08025150 -_080250F2: - ldr r0, =gUnknown_02022C98 - ldr r2, [r0] - movs r1, 0x96 - lsls r1, 1 - adds r4, r2, r1 - movs r1, 0x1 - str r1, [r4] - movs r3, 0x1 - adds r1, r2, 0 - adds r1, 0x24 - adds r5, r0, 0 - ldrb r1, [r1] - cmp r3, r1 - bcs _08025150 - movs r1, 0x9A - lsls r1, 1 - adds r0, r2, r1 - ldr r0, [r0] - cmp r0, 0x1 - beq _08025124 - movs r0, 0 - str r0, [r4] - b _08025150 - .pool -_08025124: - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - ldr r2, [r5] - adds r0, r2, 0 - adds r0, 0x24 - ldrb r0, [r0] - cmp r3, r0 - bcs _08025150 - lsls r0, r3, 2 - movs r4, 0x98 - lsls r4, 1 - adds r1, r2, r4 - adds r1, r0 - ldr r0, [r1] - cmp r0, 0x1 - beq _08025124 - movs r0, 0x96 - lsls r0, 1 - adds r1, r2, r0 - movs r0, 0 - str r0, [r1] -_08025150: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_80250D4 - - thumb_func_start sub_8025158 -sub_8025158: @ 8025158 - push {lr} - bl sub_8026044 - bl sub_8026C90 - cmp r0, 0x1 - bne _0802516C - movs r0, 0x5 - bl sub_8026240 -_0802516C: - pop {r0} - bx r0 - thumb_func_end sub_8025158 - - thumb_func_start sub_8025170 -sub_8025170: @ 8025170 - push {r4,lr} - bl GetBlockReceivedStatus - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - bl sub_800A9D8 - lsls r0, 24 - lsrs r0, 24 - cmp r4, r0 - beq _0802518C - movs r0, 0 - b _08025192 -_0802518C: - bl ResetBlockReceivedFlags - movs r0, 0x1 -_08025192: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8025170 - - thumb_func_start sub_8025198 -sub_8025198: @ 8025198 - push {r4,r5,lr} - ldr r5, =gUnknown_02022C98 - ldr r1, [r5] - ldrb r4, [r1, 0x10] - cmp r4, 0x1 - beq _080251D0 - cmp r4, 0x1 - bgt _080251B4 - cmp r4, 0 - beq _080251BA - b _0802520C - .pool -_080251B4: - cmp r4, 0x2 - beq _080251DC - b _0802520C -_080251BA: - adds r1, 0x4A - movs r0, 0 - movs r2, 0x3C - bl SendBlock - lsls r0, 24 - cmp r0, 0 - beq _08025226 - ldr r0, [r5] - strb r4, [r0, 0x8] - b _08025202 -_080251D0: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _08025226 - b _08025202 -_080251DC: - bl sub_8025170 - cmp r0, 0 - beq _080251EE - ldr r0, [r5] - adds r1, r0, 0 - adds r1, 0x24 - ldrb r1, [r1] - strb r1, [r0, 0x8] -_080251EE: - ldr r2, [r5] - adds r1, r2, 0 - adds r1, 0x24 - ldrb r0, [r2, 0x8] - ldrb r1, [r1] - cmp r0, r1 - bcc _08025226 - ldrb r0, [r2, 0x14] - adds r0, 0x1 - strb r0, [r2, 0x14] -_08025202: - ldr r1, [r5] - ldrb r0, [r1, 0x10] - adds r0, 0x1 - strb r0, [r1, 0x10] - b _08025226 -_0802520C: - movs r0, 0x1 - bl WaitFanfare - lsls r0, 24 - cmp r0, 0 - beq _08025226 - movs r0, 0x6 - bl sub_8026240 - ldr r0, =0x0000020b - movs r1, 0x4 - bl FadeOutAndPlayNewMapMusic -_08025226: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8025198 - - thumb_func_start sub_8025230 -sub_8025230: @ 8025230 - push {r4,r5,lr} - ldr r5, =gUnknown_02022C98 - ldr r2, [r5] - ldrb r4, [r2, 0x10] - cmp r4, 0x1 - beq _08025274 - cmp r4, 0x1 - bgt _0802524C - cmp r4, 0 - beq _08025252 - b _080252DC - .pool -_0802524C: - cmp r4, 0x2 - beq _08025282 - b _080252DC -_08025252: - ldrb r0, [r2, 0x14] - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 2 - adds r1, 0x4A - adds r1, r2, r1 - movs r0, 0 - movs r2, 0x3C - bl SendBlock - lsls r0, 24 - cmp r0, 0 - beq _08025316 - ldr r0, [r5] - strb r4, [r0, 0x8] - ldr r1, [r5] - b _080252CC -_08025274: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _08025316 - ldr r1, [r5] - b _080252CC -_08025282: - bl sub_8025170 - cmp r0, 0 - beq _080252B4 - movs r4, 0 - b _080252AA -_0802528E: - ldr r0, [r5] - adds r0, 0x4A - ldr r1, =gBlockRecvBuffer - movs r2, 0x3C - bl memcpy - ldr r1, [r5] - adds r0, r1, 0 - adds r0, 0x24 - ldrb r0, [r0] - strb r0, [r1, 0x8] - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 -_080252AA: - ldr r0, [r5] - adds r0, 0x24 - ldrb r0, [r0] - cmp r4, r0 - bcc _0802528E -_080252B4: - ldr r3, =gUnknown_02022C98 - ldr r2, [r3] - adds r1, r2, 0 - adds r1, 0x24 - ldrb r0, [r2, 0x8] - ldrb r1, [r1] - cmp r0, r1 - bcc _08025316 - ldrb r0, [r2, 0x14] - adds r0, 0x1 - strb r0, [r2, 0x14] - ldr r1, [r3] -_080252CC: - ldrb r0, [r1, 0x10] - adds r0, 0x1 - strb r0, [r1, 0x10] - b _08025316 - .pool -_080252DC: - movs r0, 0x1 - bl WaitFanfare - lsls r0, 24 - cmp r0, 0 - beq _08025316 - ldr r0, =gUnknown_02022C98 - ldr r2, [r0] - adds r0, r2, 0 - adds r0, 0x28 - ldrb r0, [r0] - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 2 - adds r0, r2, 0 - adds r0, 0x54 - adds r0, r1 - ldrh r1, [r0] - movs r3, 0x8A - lsls r3, 1 - adds r0, r2, r3 - strh r1, [r0] - movs r0, 0x6 - bl sub_8026240 - ldr r0, =0x0000020b - movs r1, 0x4 - bl FadeOutAndPlayNewMapMusic -_08025316: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8025230 - - thumb_func_start sub_8025324 -sub_8025324: @ 8025324 - push {r4,r5,lr} - sub sp, 0x4 - movs r1, 0x1 - mov r0, sp - strb r1, [r0] - ldr r0, =gUnknown_02022C98 - ldr r0, [r0] - ldrb r0, [r0, 0x10] - cmp r0, 0x4 - bls _0802533A - b _08025458 -_0802533A: - lsls r0, 2 - ldr r1, =_0802534C - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0802534C: - .4byte _08025360 - .4byte _08025384 - .4byte _0802539C - .4byte _080253BC - .4byte _080253DC -_08025360: - bl sub_802749C - movs r0, 0x1 - bl sub_80289E8 - bl sub_8028DFC - movs r0, 0x1 - bl sub_8028EC8 - movs r0, 0x2 - bl sub_80292E0 - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - b _08025448 - .pool -_08025384: - bl sub_802A770 - cmp r0, 0 - bne _08025466 - movs r0, 0x5 - bl sub_80292E0 - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - b _08025448 - .pool -_0802539C: - bl sub_802A794 - mov r1, sp - strb r0, [r1] - movs r0, 0 - movs r2, 0x1 - bl SendBlock - lsls r0, 24 - cmp r0, 0 - beq _08025466 - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - b _08025448 - .pool -_080253BC: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _08025466 - ldr r3, =gUnknown_02022C98 - ldr r1, [r3] - ldrb r0, [r1, 0x10] - adds r0, 0x1 - movs r2, 0 - strb r0, [r1, 0x10] - ldr r0, [r3] - strb r2, [r0, 0x8] - b _08025466 - .pool -_080253DC: - bl sub_8025170 - cmp r0, 0 - beq _08025422 - movs r2, 0 - ldr r1, =gUnknown_02022C98 - ldr r0, [r1] - adds r0, 0x24 - ldrb r0, [r0] - cmp r2, r0 - bcs _08025422 - adds r3, r1, 0 - movs r5, 0x86 - lsls r5, 1 - ldr r4, =gBlockRecvBuffer -_080253FA: - ldr r1, [r3] - adds r1, r2, r1 - adds r1, r5 - lsls r0, r2, 8 - adds r0, r4 - ldrb r0, [r0] - strb r0, [r1] - ldr r1, [r3] - adds r0, r1, 0 - adds r0, 0x24 - ldrb r0, [r0] - strb r0, [r1, 0x8] - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - ldr r0, [r3] - adds r0, 0x24 - ldrb r0, [r0] - cmp r2, r0 - bcc _080253FA -_08025422: - ldr r4, =gUnknown_02022C98 - ldr r2, [r4] - adds r1, r2, 0 - adds r1, 0x24 - ldrb r0, [r2, 0x8] - ldrb r1, [r1] - cmp r0, r1 - bcc _08025466 - ldrb r0, [r2, 0x14] - adds r0, 0x1 - strb r0, [r2, 0x14] - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x77 - bls _08025466 - movs r0, 0x6 - bl sub_80292E0 - ldr r1, [r4] -_08025448: - ldrb r0, [r1, 0x10] - adds r0, 0x1 - strb r0, [r1, 0x10] - b _08025466 - .pool -_08025458: - bl sub_802A770 - cmp r0, 0 - bne _08025466 - movs r0, 0x7 - bl sub_8026240 -_08025466: - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_8025324 - - thumb_func_start sub_8025470 -sub_8025470: @ 8025470 - push {r4,r5,lr} - sub sp, 0x4 - ldr r4, =gUnknown_02022C98 - ldr r0, [r4] - ldrb r0, [r0, 0x10] - cmp r0, 0x7 - bls _08025480 - b _08025606 -_08025480: - lsls r0, 2 - ldr r1, =_08025494 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08025494: - .4byte _080254B4 - .4byte _080254D4 - .4byte _080254F0 - .4byte _08025504 - .4byte _08025520 - .4byte _0802553C - .4byte _08025564 - .4byte _08025578 -_080254B4: - bl sub_8027748 - ldr r1, =0x00000bb7 - cmp r0, r1 - bls _080254C4 - movs r0, 0x4 - bl sub_80292E0 -_080254C4: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - b _080255E8 - .pool -_080254D4: - bl sub_802A770 - cmp r0, 0 - beq _080254DE - b _0802563C -_080254DE: - movs r0, 0x3 - bl sub_80292E0 - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - b _080255E8 - .pool -_080254F0: - bl sub_8028FCC - bl sub_80272E8 - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - b _080255E8 - .pool -_08025504: - bl sub_802A794 - lsls r0, 24 - lsrs r0, 24 - mov r1, sp - strb r0, [r1] - cmp r0, 0 - bne _08025516 - b _0802563C -_08025516: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - b _080255E8 - .pool -_08025520: - bl sub_802A770 - cmp r0, 0 - beq _0802552A - b _0802563C -_0802552A: - movs r0, 0x5 - bl sub_80292E0 - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - b _080255E8 - .pool -_0802553C: - bl sub_802A794 - mov r1, sp - strb r0, [r1] - movs r0, 0 - movs r2, 0x1 - bl SendBlock - lsls r0, 24 - cmp r0, 0 - beq _0802563C - ldr r2, =gUnknown_02022C98 - ldr r1, [r2] - movs r0, 0 - strb r0, [r1, 0x8] - ldr r1, [r2] - b _080255E8 - .pool -_08025564: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _0802563C - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - b _080255E8 - .pool -_08025578: - bl sub_8025170 - cmp r0, 0 - beq _080255BE - movs r2, 0 - ldr r1, =gUnknown_02022C98 - ldr r0, [r1] - adds r0, 0x24 - ldrb r0, [r0] - cmp r2, r0 - bcs _080255BE - adds r3, r1, 0 - movs r5, 0x86 - lsls r5, 1 - ldr r4, =gBlockRecvBuffer -_08025596: - ldr r1, [r3] - adds r1, r2, r1 - adds r1, r5 - lsls r0, r2, 8 - adds r0, r4 - ldrb r0, [r0] - strb r0, [r1] - ldr r1, [r3] - adds r0, r1, 0 - adds r0, 0x24 - ldrb r0, [r0] - strb r0, [r1, 0x8] - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - ldr r0, [r3] - adds r0, 0x24 - ldrb r0, [r0] - cmp r2, r0 - bcc _08025596 -_080255BE: - ldr r4, =gUnknown_02022C98 - ldr r2, [r4] - adds r1, r2, 0 - adds r1, 0x24 - ldrb r0, [r2, 0x8] - ldrb r1, [r1] - cmp r0, r1 - bcc _080255F8 - ldrb r0, [r2, 0x14] - adds r0, 0x1 - strb r0, [r2, 0x14] - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x77 - bls _0802563C - bl sub_8027608 - movs r0, 0x6 - bl sub_80292E0 - ldr r1, [r4] -_080255E8: - ldrb r0, [r1, 0x10] - adds r0, 0x1 - strb r0, [r1, 0x10] - b _0802563C - .pool -_080255F8: - bl sub_8027554 - b _0802563C -_080255FE: - movs r0, 0x8 - bl sub_8026240 - b _0802563C -_08025606: - bl sub_802A770 - cmp r0, 0 - bne _0802563C - movs r2, 0 - ldr r1, [r4] - adds r0, r1, 0 - adds r0, 0x24 - ldrb r0, [r0] - cmp r2, r0 - bcs _08025636 - movs r4, 0x86 - lsls r4, 1 - adds r3, r1, r4 - adds r1, r0, 0 -_08025624: - adds r0, r3, r2 - ldrb r0, [r0] - cmp r0, 0x2 - beq _080255FE - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, r1 - bcc _08025624 -_08025636: - movs r0, 0xA - bl sub_8026240 -_0802563C: - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_8025470 - - thumb_func_start sub_8025644 -sub_8025644: @ 8025644 - push {r4,lr} - ldr r4, =gUnknown_02022C98 - ldr r0, [r4] - ldrb r0, [r0, 0x10] - cmp r0, 0x1 - beq _08025672 - cmp r0, 0x1 - bgt _08025660 - cmp r0, 0 - beq _08025666 - b _08025692 - .pool -_08025660: - cmp r0, 0x2 - beq _0802567C - b _08025692 -_08025666: - bl sub_800AC34 - movs r0, 0x7 - bl sub_80292E0 - b _08025688 -_08025672: - bl sub_802A770 - cmp r0, 0 - bne _080256A0 - b _08025688 -_0802567C: - bl sub_802A794 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x5 - bne _080256A0 -_08025688: - ldr r1, [r4] - ldrb r0, [r1, 0x10] - adds r0, 0x1 - strb r0, [r1, 0x10] - b _080256A0 -_08025692: - ldr r0, =gReceivedRemoteLinkPlayers - ldrb r0, [r0] - cmp r0, 0 - bne _080256A0 - movs r0, 0x9 - bl sub_8026240 -_080256A0: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8025644 - - thumb_func_start sub_80256AC -sub_80256AC: @ 80256AC - push {r4,lr} - sub sp, 0x4 - ldr r4, =gUnknown_02022C98 - ldr r0, [r4] - ldrb r1, [r0, 0x10] - cmp r1, 0x1 - beq _080256E0 - cmp r1, 0x1 - bgt _080256C8 - cmp r1, 0 - beq _080256CE - b _08025728 - .pool -_080256C8: - cmp r1, 0x2 - beq _080256F8 - b _08025728 -_080256CE: - movs r0, 0x1 - negs r0, r0 - str r1, [sp] - movs r1, 0 - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade - b _0802571A -_080256E0: - bl UpdatePaletteFade - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _0802574C - b _0802571A - .pool -_080256F8: - bl sub_8028B80 - bl sub_80287E4 - ldr r0, [r4] - adds r0, 0x24 - ldrb r0, [r0] - bl sub_8028614 - bl sub_8028E84 - ldr r1, =gUnknown_03000DB0 - movs r0, 0x1 - str r0, [r1] - movs r0, 0x8 - bl sub_80292E0 -_0802571A: - ldr r1, [r4] - ldrb r0, [r1, 0x10] - adds r0, 0x1 - strb r0, [r1, 0x10] - b _0802574C - .pool -_08025728: - bl sub_802A770 - cmp r0, 0 - bne _0802574C - ldr r4, =gUnknown_02022C98 - ldr r0, [r4] - ldr r0, [r0] - bl SetMainCallback2 - ldr r0, [r4] - ldrb r0, [r0, 0x4] - bl DestroyTask - ldr r0, [r4] - bl Free - bl FreeAllWindowBuffers -_0802574C: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80256AC - - thumb_func_start sub_8025758 -sub_8025758: @ 8025758 - push {r4,lr} - sub sp, 0x4 - ldr r4, =gUnknown_02022C98 - ldr r1, [r4] - ldrb r0, [r1, 0x10] - cmp r0, 0x6 - bls _08025768 - b _0802585C -_08025768: - lsls r0, 2 - ldr r1, =_0802577C - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0802577C: - .4byte _08025798 - .4byte _08025838 - .4byte _080257B0 - .4byte _08025802 - .4byte _08025808 - .4byte _08025818 - .4byte _08025838 -_08025798: - movs r0, 0x9 - bl sub_80292E0 - movs r0, 0x1 - negs r0, r0 - movs r1, 0 - str r1, [sp] - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade - b _08025848 -_080257B0: - movs r0, 0 - movs r1, 0 - movs r2, 0 - bl ChangeBgX - movs r0, 0 - movs r1, 0 - movs r2, 0 - bl ChangeBgY - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - bl ChangeBgX - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - bl ChangeBgY - movs r0, 0x2 - movs r1, 0 - movs r2, 0 - bl ChangeBgX - movs r0, 0x2 - movs r1, 0 - movs r2, 0 - bl ChangeBgY - movs r0, 0x3 - movs r1, 0 - movs r2, 0 - bl ChangeBgX - movs r0, 0x3 - movs r1, 0 - movs r2, 0 - bl ChangeBgY - b _08025848 -_08025802: - bl StopMapMusic - b _08025848 -_08025808: - ldr r0, =0x0000021e - bl PlayNewMapMusic - bl sub_8028E4C - b _08025848 - .pool -_08025818: - movs r4, 0x1 - negs r4, r4 - adds r0, r4, 0 - movs r1, 0x10 - movs r2, 0 - bl BlendPalettes - movs r0, 0 - str r0, [sp] - adds r0, r4, 0 - movs r1, 0 - movs r2, 0x10 - movs r3, 0 - bl BeginNormalPaletteFade - b _08025848 -_08025838: - bl UpdatePaletteFade - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _0802588C -_08025848: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - ldrb r0, [r1, 0x10] - adds r0, 0x1 - strb r0, [r1, 0x10] - b _0802588C - .pool -_0802585C: - ldrb r0, [r1, 0x4] - bl DestroyTask - ldr r0, =sub_802589C - bl sub_802621C - bl sub_802903C - ldr r0, [r4] - bl sub_8024A30 - ldr r0, =gReceivedRemoteLinkPlayers - ldrb r0, [r0] - cmp r0, 0 - bne _08025882 - ldr r0, [r4] - adds r0, 0x24 - movs r1, 0x1 - strb r1, [r0] -_08025882: - bl sub_80273F0 - movs r0, 0 - bl sub_8028EC8 -_0802588C: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8025758 - - thumb_func_start sub_802589C -sub_802589C: @ 802589C - push {r4,r5,lr} - lsls r0, 24 - lsrs r5, r0, 24 - ldr r1, =gUnknown_02022C98 - ldr r0, [r1] - ldrb r0, [r0, 0x10] - adds r4, r1, 0 - cmp r0, 0x1 - beq _080258C8 - cmp r0, 0x1 - bgt _080258BC - cmp r0, 0 - beq _080258C2 - b _080258E0 - .pool -_080258BC: - cmp r0, 0x2 - beq _080258CE - b _080258E0 -_080258C2: - bl sub_8026264 - b _080258D2 -_080258C8: - bl sub_80286E4 - b _080258D6 -_080258CE: - bl sub_8028828 -_080258D2: - cmp r0, 0x1 - bne _08025904 -_080258D6: - ldr r1, [r4] - ldrb r0, [r1, 0x10] - adds r0, 0x1 - strb r0, [r1, 0x10] - b _08025904 -_080258E0: - ldr r0, [r4] - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0 - beq _080258F8 - ldr r0, =sub_8024D4C - bl sub_802621C - b _080258FE - .pool -_080258F8: - ldr r0, =sub_8024D84 - bl sub_802621C -_080258FE: - adds r0, r5, 0 - bl DestroyTask -_08025904: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_802589C - - thumb_func_start sub_8025910 -sub_8025910: @ 8025910 - push {r4-r6,lr} - lsls r0, 24 - lsrs r6, r0, 24 - lsls r0, r6, 2 - adds r0, r6 - lsls r0, 3 - ldr r1, =gTasks + 0x8 - adds r5, r0, r1 - movs r0, 0 - ldrsh r4, [r5, r0] - cmp r4, 0x1 - beq _0802596C - cmp r4, 0x1 - bgt _08025938 - cmp r4, 0 - beq _0802593E - b _080259E8 - .pool -_08025938: - cmp r4, 0x2 - beq _0802597E - b _080259E8 -_0802593E: - ldr r6, =gUnknown_02022C98 - ldr r1, [r6] - adds r0, r1, 0 - adds r0, 0x28 - ldrb r0, [r0] - lsls r0, 2 - ldr r2, =0x0000318c - adds r0, r2 - adds r1, r0 - movs r0, 0 - movs r2, 0x1 - bl SendBlock - lsls r0, 24 - cmp r0, 0 - beq _080259E8 - ldr r0, [r6] - strb r4, [r0, 0x8] - b _08025976 - .pool -_0802596C: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _080259E8 -_08025976: - ldrh r0, [r5] - adds r0, 0x1 - strh r0, [r5] - b _080259E8 -_0802597E: - bl sub_8025170 - cmp r0, 0 - beq _080259C4 - movs r2, 0 - ldr r1, =gUnknown_02022C98 - ldr r0, [r1] - adds r0, 0x24 - ldrb r0, [r0] - cmp r2, r0 - bcs _080259C4 - adds r3, r1, 0 - ldr r5, =gBlockRecvBuffer - ldr r4, =0x0000318c -_0802599A: - ldr r0, [r3] - lsls r1, r2, 2 - adds r1, r0 - adds r1, r4 - lsls r0, r2, 8 - adds r0, r5 - ldrb r0, [r0] - strb r0, [r1] - ldr r1, [r3] - adds r0, r1, 0 - adds r0, 0x24 - ldrb r0, [r0] - strb r0, [r1, 0x8] - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - ldr r0, [r3] - adds r0, 0x24 - ldrb r0, [r0] - cmp r2, r0 - bcc _0802599A -_080259C4: - ldr r4, =gUnknown_02022C98 - ldr r0, [r4] - adds r1, r0, 0 - adds r1, 0x24 - ldrb r0, [r0, 0x8] - ldrb r1, [r1] - cmp r0, r1 - bcc _080259E8 - adds r0, r6, 0 - bl DestroyTask - movs r0, 0x6 - bl sub_80292E0 - ldr r1, [r4] - ldrb r0, [r1, 0x10] - adds r0, 0x1 - strb r0, [r1, 0x10] -_080259E8: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8025910 - - thumb_func_start sub_80259FC -sub_80259FC: @ 80259FC - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x18 - ldr r6, =gUnknown_02022C98 - ldr r0, [r6] - adds r1, r0, 0 - adds r1, 0x24 - ldrb r7, [r1] - ldr r2, =0x000031a0 - adds r1, r0, r2 - ldr r3, =0x000031cc - adds r2, r0, r3 - ldr r4, =0x00003208 - adds r3, r0, r4 - ldr r5, =0x00003244 - adds r4, r0, r5 - str r4, [sp] - adds r5, 0x3C - adds r4, r0, r5 - str r4, [sp, 0x4] - adds r5, 0x3C - adds r4, r0, r5 - str r4, [sp, 0x8] - adds r4, r0, 0 - adds r4, 0x40 - str r4, [sp, 0xC] - movs r5, 0x90 - lsls r5, 1 - adds r4, r0, r5 - str r4, [sp, 0x10] - movs r4, 0x96 - lsls r4, 1 - adds r0, r4 - str r0, [sp, 0x14] - movs r0, 0 - bl sub_8028164 - ldr r1, [r6] - ldr r5, =0x000031b0 - adds r2, r1, r5 - str r0, [r2] - movs r0, 0x94 - lsls r0, 1 - adds r1, r0 - movs r0, 0x1 - strb r0, [r1] - movs r5, 0x1 - cmp r5, r7 - bcs _08025AA4 -_08025A60: - ldr r1, [r6] - adds r0, r1, 0 - adds r0, 0xA8 - adds r0, r5 - ldrb r0, [r0] - cmp r0, 0 - bne _08025A9A - lsls r0, r5, 4 - subs r0, r5 - lsls r4, r0, 2 - adds r1, r4, r1 - ldr r2, =0x000031cc - adds r1, r2 - adds r0, r5, 0 - bl sub_8028318 - adds r1, r0, 0 - cmp r1, 0 - bne _08025A9A - ldr r0, [r6] - adds r0, r4 - ldr r3, =0x000031cc - adds r0, r3 - strb r1, [r0] - ldr r0, [r6] - movs r4, 0x94 - lsls r4, 1 - adds r0, r4 - strb r1, [r0] -_08025A9A: - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, r7 - bcc _08025A60 -_08025AA4: - ldr r5, =gUnknown_02022C98 - ldr r1, [r5] - movs r6, 0x92 - lsls r6, 1 - adds r1, r6 - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x3B - bls _08025B02 - ldr r1, [r5] - movs r2, 0x94 - lsls r2, 1 - adds r0, r1, r2 - ldrb r4, [r0] - cmp r4, 0 - beq _08025AF0 - bl sub_8011AC8 - ldr r0, [r5] - adds r0, r6 - movs r1, 0 - strb r1, [r0] - b _08025B02 - .pool -_08025AF0: - adds r0, r1, r6 - ldrb r0, [r0] - cmp r0, 0x46 - bls _08025B02 - bl sub_8011AC8 - ldr r0, [r5] - adds r0, r6 - strb r4, [r0] -_08025B02: - movs r5, 0 - cmp r5, r7 - bcs _08025BF6 - ldr r3, =0x000031cc - mov r12, r3 - ldr r4, =gUnknown_02022C98 - mov r8, r4 -_08025B10: - mov r6, r8 - ldr r2, [r6] - lsls r0, r5, 4 - subs r1, r0, r5 - lsls r1, 2 - adds r1, r2, r1 - add r1, r12 - ldrb r1, [r1] - adds r6, r0, 0 - cmp r1, 0 - beq _08025B36 - adds r0, r2, 0 - adds r0, 0xA8 - adds r1, r0, r5 - ldrb r0, [r1] - cmp r0, 0 - bne _08025B36 - movs r0, 0x1 - strb r0, [r1] -_08025B36: - adds r3, r4, 0 - ldr r1, [r3] - adds r0, r1, 0 - adds r0, 0xA8 - adds r0, r5 - ldrb r0, [r0] - cmp r0, 0x3 - bgt _08025B54 - cmp r0, 0x1 - bge _08025B5A - b _08025BEC - .pool -_08025B54: - cmp r0, 0x4 - beq _08025BA8 - b _08025BEC -_08025B5A: - adds r1, 0xB0 - adds r1, r5 - ldrb r0, [r1] - adds r0, 0x1 - movs r2, 0 - strb r0, [r1] - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x5 - bls _08025BEC - ldr r0, [r3] - adds r0, 0xB0 - adds r0, r5 - strb r2, [r0] - ldr r0, [r3] - adds r0, 0xA8 - adds r0, r5 - strb r2, [r0] - ldr r0, [r3] - subs r1, r6, r5 - lsls r1, 2 - adds r0, r1 - add r0, r12 - strb r2, [r0] - ldr r0, [r3] - adds r0, r1 - ldr r6, =0x000031d0 - adds r0, r6 - strb r2, [r0] - ldr r0, [r3] - adds r0, r1 - ldr r1, =0x000031d4 - adds r0, r1 - b _08025BEA - .pool -_08025BA8: - adds r1, 0xB0 - adds r1, r5 - ldrb r0, [r1] - adds r0, 0x1 - movs r2, 0 - strb r0, [r1] - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x27 - bls _08025BEC - ldr r0, [r4] - adds r0, 0xB0 - adds r0, r5 - strb r2, [r0] - ldr r0, [r4] - adds r0, 0xA8 - adds r0, r5 - strb r2, [r0] - ldr r0, [r4] - subs r1, r6, r5 - lsls r1, 2 - adds r0, r1 - add r0, r12 - strb r2, [r0] - ldr r0, [r4] - adds r0, r1 - ldr r3, =0x000031d0 - adds r0, r3 - strb r2, [r0] - ldr r0, [r4] - adds r0, r1 - ldr r6, =0x000031d4 - adds r0, r6 -_08025BEA: - strb r2, [r0] -_08025BEC: - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, r7 - bcc _08025B10 -_08025BF6: - add sp, 0x18 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80259FC - - thumb_func_start sub_8025C0C -sub_8025C0C: @ 8025C0C - push {r4-r7,lr} - sub sp, 0x18 - ldr r5, =gUnknown_02022C98 - ldr r0, [r5] - adds r1, r0, 0 - adds r1, 0x24 - ldrb r6, [r1] - ldr r2, =0x000031a0 - adds r1, r0, r2 - ldr r3, =0x000031cc - adds r2, r0, r3 - ldr r4, =0x00003208 - adds r3, r0, r4 - ldr r7, =0x00003244 - adds r4, r0, r7 - str r4, [sp] - adds r7, 0x3C - adds r4, r0, r7 - str r4, [sp, 0x4] - adds r7, 0x3C - adds r4, r0, r7 - str r4, [sp, 0x8] - adds r4, r0, 0 - adds r4, 0x40 - str r4, [sp, 0xC] - movs r7, 0x90 - lsls r7, 1 - adds r4, r0, r7 - str r4, [sp, 0x10] - movs r4, 0x96 - lsls r4, 1 - adds r0, r4 - str r0, [sp, 0x14] - movs r0, 0 - bl sub_8028164 - ldr r1, [r5] - ldr r7, =0x000031b0 - adds r2, r1, r7 - str r0, [r2] - movs r0, 0x94 - lsls r0, 1 - adds r1, r0 - movs r0, 0x1 - strb r0, [r1] - movs r4, 0x1 - cmp r4, r6 - bcs _08025C9C -_08025C6C: - adds r0, r4, 0 - bl sub_8028374 - cmp r0, 0 - beq _08025C92 - ldr r0, =gUnknown_02022C98 - ldr r2, [r0] - lsls r1, r4, 2 - movs r3, 0x98 - lsls r3, 1 - adds r0, r2, r3 - adds r0, r1 - movs r1, 0x1 - str r1, [r0] - movs r7, 0x94 - lsls r7, 1 - adds r1, r2, r7 - movs r0, 0 - strb r0, [r1] -_08025C92: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, r6 - bcc _08025C6C -_08025C9C: - ldr r5, =gUnknown_02022C98 - ldr r1, [r5] - movs r6, 0x92 - lsls r6, 1 - adds r1, r6 - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x3B - bls _08025CFA - ldr r1, [r5] - movs r2, 0x94 - lsls r2, 1 - adds r0, r1, r2 - ldrb r4, [r0] - cmp r4, 0 - beq _08025CE8 - bl sub_8011AC8 - ldr r0, [r5] - adds r0, r6 - movs r1, 0 - strb r1, [r0] - b _08025CFA - .pool -_08025CE8: - adds r0, r1, r6 - ldrb r0, [r0] - cmp r0, 0x46 - bls _08025CFA - bl sub_8011AC8 - ldr r0, [r5] - adds r0, r6 - strb r4, [r0] -_08025CFA: - add sp, 0x18 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_8025C0C - - thumb_func_start sub_8025D04 -sub_8025D04: @ 8025D04 - push {r4,r5,lr} - ldr r5, =gUnknown_02022C98 - ldr r0, [r5] - ldrb r0, [r0, 0x18] - cmp r0, 0x4 - beq _08025D40 - cmp r0, 0x4 - bgt _08025D20 - cmp r0, 0x3 - beq _08025D26 - b _08025D4A - .pool -_08025D20: - cmp r0, 0xB - beq _08025D46 - b _08025D4A -_08025D26: - bl sub_8026BB8 - adds r4, r0, 0 - cmp r4, 0x1 - bne _08025D4A - bl sub_8026C28 - ldr r0, [r5] - movs r1, 0x8E - lsls r1, 1 - adds r0, r1 - str r4, [r0] - b _08025D4A -_08025D40: - bl sub_80259FC - b _08025D4A -_08025D46: - bl sub_8025C0C -_08025D4A: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_8025D04 - - thumb_func_start sub_8025D50 -sub_8025D50: @ 8025D50 - push {r4-r6,lr} - sub sp, 0x14 - ldr r0, =gUnknown_02022C98 - ldr r5, [r0] - ldrb r0, [r5, 0x18] - cmp r0, 0x4 - beq _08025D68 - cmp r0, 0xB - beq _08025DB8 - b _08025DF4 - .pool -_08025D68: - ldr r1, =0x000032cc - adds r0, r5, r1 - ldr r2, =0x000031cc - adds r1, r5, r2 - ldr r3, =0x00003208 - adds r2, r5, r3 - ldr r4, =0x00003244 - adds r3, r5, r4 - movs r6, 0xCA - lsls r6, 6 - adds r4, r5, r6 - str r4, [sp] - adds r6, 0x3C - adds r4, r5, r6 - str r4, [sp, 0x4] - adds r4, r5, 0 - adds r4, 0x40 - ldrb r4, [r4] - str r4, [sp, 0x8] - movs r6, 0x90 - lsls r6, 1 - adds r4, r5, r6 - ldr r4, [r4] - str r4, [sp, 0xC] - adds r6, 0xC - adds r4, r5, r6 - ldr r4, [r4] - str r4, [sp, 0x10] - bl sub_8027E30 - b _08025DF4 - .pool -_08025DB8: - ldr r1, =0x000032cc - adds r0, r5, r1 - ldr r2, =0x000031cc - adds r1, r5, r2 - ldr r3, =0x00003208 - adds r2, r5, r3 - ldr r4, =0x00003244 - adds r3, r5, r4 - movs r6, 0xCA - lsls r6, 6 - adds r4, r5, r6 - str r4, [sp] - adds r6, 0x3C - adds r4, r5, r6 - str r4, [sp, 0x4] - adds r4, r5, 0 - adds r4, 0x40 - ldrb r4, [r4] - str r4, [sp, 0x8] - movs r6, 0x90 - lsls r6, 1 - adds r4, r5, r6 - ldr r4, [r4] - str r4, [sp, 0xC] - adds r6, 0xC - adds r4, r5, r6 - ldr r4, [r4] - str r4, [sp, 0x10] - bl sub_8027E30 -_08025DF4: - add sp, 0x14 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8025D50 - - thumb_func_start sub_8025E0C -sub_8025E0C: @ 8025E0C - push {r4-r6,lr} - sub sp, 0x18 - ldr r0, =gUnknown_02022C98 - ldr r5, [r0] - ldrb r0, [r5, 0x18] - cmp r0, 0x4 - beq _08025E24 - cmp r0, 0xB - beq _08025E7C - b _08025EC0 - .pool -_08025E24: - adds r0, r5, 0 - adds r0, 0x28 - ldrb r0, [r0] - lsls r1, r0, 4 - subs r1, r0 - lsls r1, 2 - ldr r2, =0x000031a0 - adds r1, r2 - adds r1, r5, r1 - ldr r3, =0x000031cc - adds r2, r5, r3 - ldr r4, =0x00003208 - adds r3, r5, r4 - ldr r6, =0x00003244 - adds r4, r5, r6 - str r4, [sp] - adds r6, 0x3C - adds r4, r5, r6 - str r4, [sp, 0x4] - adds r6, 0x3C - adds r4, r5, r6 - str r4, [sp, 0x8] - adds r4, r5, 0 - adds r4, 0x40 - str r4, [sp, 0xC] - movs r6, 0x90 - lsls r6, 1 - adds r4, r5, r6 - str r4, [sp, 0x10] - adds r6, 0xC - adds r4, r5, r6 - str r4, [sp, 0x14] - bl sub_8028164 - b _08025EC0 - .pool -_08025E7C: - adds r0, r5, 0 - adds r0, 0x28 - ldrb r0, [r0] - lsls r1, r0, 4 - subs r1, r0 - lsls r1, 2 - ldr r2, =0x000031a0 - adds r1, r2 - adds r1, r5, r1 - ldr r3, =0x000031cc - adds r2, r5, r3 - ldr r4, =0x00003208 - adds r3, r5, r4 - ldr r6, =0x00003244 - adds r4, r5, r6 - str r4, [sp] - adds r6, 0x3C - adds r4, r5, r6 - str r4, [sp, 0x4] - adds r6, 0x3C - adds r4, r5, r6 - str r4, [sp, 0x8] - adds r4, r5, 0 - adds r4, 0x40 - str r4, [sp, 0xC] - movs r6, 0x90 - lsls r6, 1 - adds r4, r5, r6 - str r4, [sp, 0x10] - adds r6, 0xC - adds r4, r5, r6 - str r4, [sp, 0x14] - bl sub_8028164 -_08025EC0: - add sp, 0x18 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8025E0C - - thumb_func_start sub_8025ED8 -sub_8025ED8: @ 8025ED8 - push {r4,lr} - ldr r4, =gUnknown_02022C98 - ldr r1, [r4] - ldrb r0, [r1, 0x18] - cmp r0, 0x4 - beq _08025F0E - cmp r0, 0x4 - bgt _08025EF4 - cmp r0, 0x3 - beq _08025EFA - b _08025F40 - .pool -_08025EF4: - cmp r0, 0xB - beq _08025F24 - b _08025F40 -_08025EFA: - movs r0, 0x1 - bl sub_8027DD0 - ldr r0, [r4] - movs r1, 0x8E - lsls r1, 1 - adds r0, r1 - movs r1, 0x1 - str r1, [r0] - b _08025F40 -_08025F0E: - ldr r2, =0x000032f8 - adds r1, r2 - ldrb r0, [r1] - cmp r0, 0 - beq _08025F40 - bl sub_80282EC - b _08025F40 - .pool -_08025F24: - movs r2, 0x90 - lsls r2, 1 - adds r0, r1, r2 - ldr r0, [r0] - cmp r0, 0 - bne _08025F40 - adds r2, 0xC - adds r0, r1, r2 - ldr r0, [r0] - cmp r0, 0 - bne _08025F40 - movs r0, 0x1 - bl sub_8028350 -_08025F40: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_8025ED8 - - thumb_func_start sub_8025F48 -sub_8025F48: @ 8025F48 - push {r4-r6,lr} - ldr r6, =gUnknown_02022C98 - ldr r2, [r6] - adds r0, r2, 0 - adds r0, 0x28 - ldrb r1, [r0] - lsls r0, r1, 4 - subs r0, r1 - lsls r0, 2 - adds r1, r2, r0 - ldr r3, =0x000031cc - adds r0, r1, r3 - ldrb r0, [r0] - cmp r0, 0 - bne _08025F88 - bl IsSEPlaying - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - bne _08025FEA - ldr r0, [r6] - movs r2, 0xA2 - lsls r2, 1 - adds r0, r2 - strb r1, [r0] - b _08025FEA - .pool -_08025F88: - ldr r3, =0x000031d0 - adds r0, r1, r3 - ldrb r4, [r0] - cmp r4, 0x1 - bne _08025FB8 - movs r1, 0xA2 - lsls r1, 1 - adds r0, r2, r1 - ldrb r0, [r0] - cmp r0, 0 - bne _08025FEA - movs r0, 0x1F - bl m4aSongNumStop - movs r0, 0x1F - bl PlaySE - ldr r0, [r6] - movs r2, 0xA2 - lsls r2, 1 - adds r0, r2 - b _08025FE8 - .pool -_08025FB8: - ldr r3, =0x000031d4 - adds r0, r1, r3 - ldrb r4, [r0] - cmp r4, 0x1 - bne _08025FEA - movs r5, 0xA2 - lsls r5, 1 - adds r0, r2, r5 - ldrb r0, [r0] - cmp r0, 0 - bne _08025FEA - bl IsSEPlaying - lsls r0, 24 - cmp r0, 0 - bne _08025FEA - movs r0, 0x16 - bl PlaySE - movs r0, 0x1 - bl sub_80284CC - ldr r0, [r6] - adds r0, r5 -_08025FE8: - strb r4, [r0] -_08025FEA: - ldr r0, =gUnknown_02022C98 - ldr r2, [r0] - movs r5, 0xAA - lsls r5, 1 - adds r1, r2, r5 - ldrb r1, [r1] - adds r4, r0, 0 - cmp r1, 0 - bne _0802601C - adds r0, r2, 0 - adds r0, 0x40 - ldrb r0, [r0] - cmp r0, 0x9 - bls _0802601C - bl StopMapMusic - ldr r0, [r4] - adds r0, r5 - movs r1, 0x1 - b _0802603A - .pool -_0802601C: - ldr r0, [r4] - movs r1, 0xAA - lsls r1, 1 - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0x1 - bne _0802603C - movs r0, 0xB - bl PlayFanfareByFanfareNum - ldr r0, [r4] - movs r2, 0xAA - lsls r2, 1 - adds r0, r2 - movs r1, 0x2 -_0802603A: - strb r1, [r0] -_0802603C: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_8025F48 - - thumb_func_start sub_8026044 -sub_8026044: @ 8026044 - push {r4-r7,lr} - mov r7, r8 - push {r7} - ldr r6, =gUnknown_02022C98 - ldr r2, [r6] - adds r0, r2, 0 - adds r0, 0x44 - ldrb r0, [r0] - mov r8, r0 - adds r0, r2, 0 - adds r0, 0x48 - ldrb r7, [r0] - subs r0, 0x20 - ldrb r1, [r0] - lsls r0, r1, 4 - subs r0, r1 - lsls r0, 2 - adds r1, r2, r0 - ldr r3, =0x000031cc - adds r0, r1, r3 - ldrb r3, [r0] - cmp r3, 0 - bne _0802609C - ldr r4, =0x000031d0 - adds r0, r1, r4 - ldrb r0, [r0] - cmp r0, 0x1 - beq _080260FE - adds r4, 0x4 - adds r0, r1, r4 - ldrb r0, [r0] - cmp r0, 0x1 - beq _080260FE - movs r1, 0xA2 - lsls r1, 1 - adds r0, r2, r1 - strb r3, [r0] - b _080260FE - .pool -_0802609C: - ldr r3, =0x000031d0 - adds r0, r1, r3 - ldrb r4, [r0] - cmp r4, 0x1 - bne _080260CC - movs r1, 0xA2 - lsls r1, 1 - adds r0, r2, r1 - ldrb r0, [r0] - cmp r0, 0 - bne _080260FE - movs r0, 0x1F - bl m4aSongNumStop - movs r0, 0x1F - bl PlaySE - ldr r0, [r6] - movs r3, 0xA2 - lsls r3, 1 - adds r0, r3 - b _080260FC - .pool -_080260CC: - ldr r4, =0x000031d4 - adds r0, r1, r4 - ldrb r4, [r0] - cmp r4, 0x1 - bne _080260FE - movs r5, 0xA2 - lsls r5, 1 - adds r0, r2, r5 - ldrb r0, [r0] - cmp r0, 0 - bne _080260FE - bl IsSEPlaying - lsls r0, 24 - cmp r0, 0 - bne _080260FE - movs r0, 0x16 - bl PlaySE - movs r0, 0x1 - bl sub_80284CC - ldr r0, [r6] - adds r0, r5 -_080260FC: - strb r4, [r0] -_080260FE: - mov r4, r8 - cmp r4, r7 - bcs _08026172 - ldr r5, =gUnknown_02022C98 -_08026106: - ldr r2, [r5] - adds r0, r2, 0 - adds r0, 0x28 - ldrb r1, [r0] - lsls r0, r1, 4 - subs r0, r1 - lsls r0, 2 - ldr r1, =0x000031a0 - adds r0, r1 - adds r0, r2, r0 - adds r1, r0, 0 - adds r1, 0x14 - adds r0, 0x1F - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0x9 - bls _0802615C - movs r3, 0xA4 - lsls r3, 1 - adds r0, r2, r3 - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0 - bne _08026168 - adds r0, r1, r4 - ldrb r0, [r0] - adds r0, 0x4A - bl PlaySE - ldr r0, [r5] - movs r1, 0xA4 - lsls r1, 1 - adds r0, r1 - adds r0, r4 - movs r1, 0x1 - b _08026166 - .pool -_0802615C: - movs r3, 0xA4 - lsls r3, 1 - adds r0, r2, r3 - adds r0, r4 - movs r1, 0 -_08026166: - strb r1, [r0] -_08026168: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, r7 - bcc _08026106 -_08026172: - ldr r0, =gUnknown_02022C98 - ldr r2, [r0] - movs r5, 0xAA - lsls r5, 1 - adds r1, r2, r5 - ldrb r1, [r1] - adds r4, r0, 0 - cmp r1, 0 - bne _080261A0 - adds r0, r2, 0 - adds r0, 0x40 - ldrb r0, [r0] - cmp r0, 0x9 - bls _080261A0 - bl StopMapMusic - ldr r0, [r4] - adds r0, r5 - movs r1, 0x1 - b _080261BE - .pool -_080261A0: - ldr r0, [r4] - movs r1, 0xAA - lsls r1, 1 - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0x1 - bne _080261C0 - movs r0, 0xB - bl PlayFanfareByFanfareNum - ldr r0, [r4] - movs r3, 0xAA - lsls r3, 1 - adds r0, r3 - movs r1, 0x2 -_080261BE: - strb r1, [r0] -_080261C0: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_8026044 - - thumb_func_start sub_80261CC -sub_80261CC: @ 80261CC - push {lr} - bl RunTasks - bl AnimateSprites - bl BuildOamBuffer - bl UpdatePaletteFade - pop {r0} - bx r0 - thumb_func_end sub_80261CC - - thumb_func_start sub_80261E4 -sub_80261E4: @ 80261E4 - push {lr} - bl TransferPlttBuffer - bl LoadOam - bl ProcessSpriteCopyRequests - pop {r0} - bx r0 - thumb_func_end sub_80261E4 - - thumb_func_start sub_80261F8 -sub_80261F8: @ 80261F8 - push {r4,lr} - adds r4, r0, 0 - adds r0, r1, 0 - bl IsMonShiny - strb r0, [r4] - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_80261F8 - - thumb_func_start sub_802620C -sub_802620C: @ 802620C - push {lr} - lsls r1, 24 - lsrs r1, 24 - bl CreateTask - pop {r0} - bx r0 - thumb_func_end sub_802620C - - thumb_func_start sub_802621C -sub_802621C: @ 802621C - push {lr} - movs r1, 0x1 - bl CreateTask - ldr r1, =gUnknown_02022C98 - ldr r3, [r1] - movs r2, 0 - strb r0, [r3, 0x4] - ldr r0, [r1] - strb r2, [r0, 0x10] - ldr r0, [r1] - strb r2, [r0, 0xC] - ldr r0, [r1] - strb r2, [r0, 0x14] - pop {r0} - bx r0 - .pool - thumb_func_end sub_802621C - - thumb_func_start sub_8026240 -sub_8026240: @ 8026240 - push {r4,lr} - ldr r2, =gUnknown_02022C98 - ldr r1, [r2] - ldrb r3, [r1, 0x18] - movs r4, 0 - strb r3, [r1, 0x1C] - ldr r1, [r2] - strb r0, [r1, 0x18] - ldr r0, [r2] - strb r4, [r0, 0x10] - ldr r0, [r2] - strb r4, [r0, 0x14] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8026240 - - thumb_func_start sub_8026264 -sub_8026264: @ 8026264 - push {r4,lr} - ldr r3, =gUnknown_02022C98 - ldr r1, [r3] - ldrb r0, [r1, 0x14] - lsrs r2, r0, 2 - adds r0, 0x1 - strb r0, [r1, 0x14] - cmp r2, 0 - beq _080262B8 - ldr r3, [r3] - ldrb r0, [r3, 0x14] - movs r1, 0x3 - ands r0, r1 - cmp r0, 0 - bne _080262B8 - ldr r1, =gUnknown_082F7A94 - adds r0, r3, 0 - adds r0, 0x24 - ldrb r0, [r0] - subs r0, 0x1 - adds r0, r1 - ldrb r0, [r0] - cmp r2, r0 - bcc _080262A0 - movs r0, 0x1 - b _080262BA - .pool -_080262A0: - lsls r4, r2, 3 - adds r1, r4, 0 - movs r0, 0x14 - bl SetGpuReg - negs r4, r4 - lsls r4, 16 - lsrs r4, 16 - movs r0, 0x18 - adds r1, r4, 0 - bl SetGpuReg -_080262B8: - movs r0, 0 -_080262BA: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8026264 - - thumb_func_start sub_80262C0 -sub_80262C0: @ 80262C0 - push {r4-r7,lr} - mov r7, r8 - push {r7} - ldr r2, =gUnknown_02022C98 - ldr r0, [r2] - adds r1, r0, 0 - adds r1, 0x44 - adds r0, 0x48 - ldrb r5, [r0] - ldrb r1, [r1] - cmp r1, r5 - bcs _0802630C - mov r8, r2 - ldr r0, =0x000032e0 - mov r12, r0 - movs r7, 0 - movs r6, 0x1 -_080262E2: - mov r2, r8 - ldr r0, [r2] - mov r2, r12 - adds r4, r0, r2 - ldr r2, =0x000032eb - adds r0, r2 - adds r2, r0, r1 - movs r3, 0 - adds r0, r1, 0 - ands r0, r6 - cmp r0, 0 - bne _080262FC - movs r3, 0x1 -_080262FC: - strb r3, [r2] - adds r0, r4, r1 - strb r7, [r0] - adds r0, r1, 0x1 - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, r5 - bcc _080262E2 -_0802630C: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80262C0 - - thumb_func_start sub_8026324 -sub_8026324: @ 8026324 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x10 - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r0, r1, 0 - adds r0, 0x44 - ldrb r0, [r0] - str r0, [sp] - adds r0, r1, 0 - adds r0, 0x48 - ldrb r0, [r0] - str r0, [sp, 0x4] - adds r0, r1, 0 - adds r0, 0x24 - ldrb r0, [r0] - str r0, [sp, 0x8] - adds r0, r1, 0 - adds r0, 0x40 - ldrb r0, [r0] - cmp r0, 0x9 - bls _08026358 - b _08026614 -_08026358: - movs r6, 0 - ldr r0, [sp, 0x8] - cmp r6, r0 - bcs _08026440 -_08026360: - ldr r3, =gUnknown_02022C98 - lsls r0, r6, 4 - subs r1, r0, r6 - lsls r1, 2 - ldr r2, [r3] - adds r1, r2 - ldr r4, =0x000031cc - adds r4, r1 - mov r8, r4 - ldrb r1, [r4] - mov r9, r0 - adds r0, r6, 0x1 - str r0, [sp, 0xC] - cmp r1, 0 - beq _08026434 - adds r0, r2, 0 - adds r0, 0xA8 - adds r0, r6 - ldrb r0, [r0] - cmp r0, 0x1 - bne _08026434 - ldr r1, [sp] - mov r10, r1 - ldr r2, [sp, 0x4] - cmp r10, r2 - bcs _08026434 - adds r7, r3, 0 -_08026396: - ldr r0, =gUnknown_082F449C - add r0, r10 - ldrb r5, [r0] - ldr r1, [r7] - lsls r4, r5, 1 - adds r0, r1, 0 - adds r0, 0xF4 - adds r0, r4 - ldrb r0, [r0] - cmp r0, r6 - beq _08026434 - adds r0, r1, 0 - adds r0, 0xF5 - adds r0, r4 - ldrb r0, [r0] - cmp r0, r6 - beq _08026434 - mov r0, r8 - ldrb r1, [r0] - adds r0, r6, 0 - adds r2, r5, 0 - bl sub_8026634 - cmp r0, 0x1 - bne _08026410 - movs r2, 0 - ldr r3, =gUnknown_02022C98 - mov r8, r4 -_080263CE: - ldr r0, [r3] - mov r4, r8 - adds r1, r2, r4 - adds r0, 0xF4 - adds r1, r0, r1 - ldrb r0, [r1] - cmp r0, 0xFF - bne _08026404 - strb r6, [r1] - ldr r0, [r3] - adds r0, 0xA8 - adds r0, r6 - movs r1, 0x2 - strb r1, [r0] - ldr r0, [r3] - adds r0, 0xC4 - adds r0, r5 - movs r1, 0x1 - strb r1, [r0] - b _08026434 - .pool -_08026404: - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0x1 - bls _080263CE - b _08026434 -_08026410: - ldr r0, [r7] - mov r2, r9 - subs r1, r2, r6 - lsls r1, 2 - adds r0, r1 - ldr r4, =0x000031d4 - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0x1 - beq _08026434 - mov r0, r10 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r10, r0 - ldr r0, [sp, 0x4] - cmp r10, r0 - bcc _08026396 -_08026434: - ldr r1, [sp, 0xC] - lsls r0, r1, 24 - lsrs r6, r0, 24 - ldr r2, [sp, 0x8] - cmp r6, r2 - bcc _08026360 -_08026440: - ldr r4, [sp] - mov r10, r4 - ldr r0, [sp, 0x4] - cmp r10, r0 - bcc _0802644C - b _08026614 -_0802644C: - ldr r1, =gUnknown_02022C98 - mov r9, r1 -_08026450: - movs r6, 0xFF - ldr r0, =gUnknown_082F449C - add r0, r10 - ldrb r5, [r0] - mov r2, r9 - ldr r0, [r2] - adds r0, 0xC4 - adds r0, r5 - ldrb r0, [r0] - cmp r0, 0x1 - beq _08026468 - b _08026602 -_08026468: - adds r0, r5, 0 - bl sub_8026D8C - mov r1, r9 - ldr r4, [r1] - lsls r0, 24 - lsrs r0, 24 - adds r1, r4, 0 - adds r1, 0x90 - adds r1, r0 - ldrb r0, [r1] - movs r1, 0x7 - bl __udivsi3 - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0x1 - bls _0802648E - movs r3, 0x2 -_0802648E: - ldr r2, =gUnknown_082F7A88 - ldr r0, =0x000031b4 - adds r1, r4, r0 - adds r1, r5 - lsls r0, r3, 1 - adds r0, r3 - ldrb r1, [r1] - adds r0, r1 - adds r0, r2 - ldrb r1, [r0] - adds r0, r4, 0 - adds r0, 0xD0 - adds r0, r5 - ldrb r0, [r0] - subs r2, r1, r0 - cmp r2, 0x5 - bgt _080264BC - adds r1, r4, 0 - adds r1, 0x9C - adds r1, r5 - ldrb r0, [r1] - adds r0, r2 - strb r0, [r1] -_080264BC: - mov r2, r9 - ldr r1, [r2] - adds r1, 0x9C - adds r1, r5 - ldrb r0, [r1] - adds r0, 0x1 - movs r2, 0 - strb r0, [r1] - movs r4, 0xFF - ands r0, r4 - cmp r0, 0x5 - bhi _080264D6 - b _08026602 -_080264D6: - mov r1, r9 - ldr r0, [r1] - adds r0, 0x9C - adds r0, r5 - strb r2, [r0] - ldr r3, [r1] - lsls r1, r5, 1 - adds r0, r3, 0 - adds r0, 0xF4 - adds r2, r0, r1 - ldrb r0, [r2] - mov r8, r1 - cmp r0, 0xFF - bne _08026518 - adds r0, r3, 0 - adds r0, 0xF5 - add r0, r8 - ldrb r0, [r0] - cmp r0, 0xFF - bne _08026500 - b _08026602 -_08026500: - b _08026528 - .pool -_08026518: - adds r0, r3, 0 - adds r0, 0xF5 - add r0, r8 - ldrb r0, [r0] - cmp r0, 0xFF - bne _08026528 - ldrb r4, [r2] - b _0802654E -_08026528: - mov r2, r9 - ldr r1, [r2] - adds r0, r1, 0 - adds r0, 0xF4 - add r0, r8 - ldrb r7, [r0] - adds r1, 0xF5 - add r1, r8 - ldrb r6, [r1] - bl Random - movs r1, 0x1 - ands r1, r0 - cmp r1, 0 - bne _0802654A - adds r4, r7, 0 - b _0802654E -_0802654A: - adds r4, r6, 0 - adds r6, r7, 0 -_0802654E: - mov r1, r9 - ldr r0, [r1] - ldr r2, =0x000032eb - adds r0, r2 - adds r0, r5 - movs r1, 0x7 - strb r1, [r0] - mov r1, r9 - ldr r0, [r1] - adds r0, 0xC4 - adds r0, r5 - movs r1, 0x2 - strb r1, [r0] - mov r2, r9 - ldr r0, [r2] - adds r0, 0xA8 - adds r0, r4 - movs r1, 0x3 - strb r1, [r0] - ldr r0, [r2] - adds r0, 0xB8 - adds r0, r5 - strb r4, [r0] - ldr r1, [r2] - lsls r0, r4, 4 - subs r0, r4 - lsls r0, 2 - adds r1, r0 - ldr r2, =0x000031d0 - adds r1, r2 - movs r0, 0x1 - strb r0, [r1] - mov r2, r9 - ldr r1, [r2] - lsls r0, r6, 4 - subs r0, r6 - lsls r0, 2 - adds r1, r0 - ldr r0, =0x000031d4 - adds r1, r0 - movs r2, 0x1 - strb r2, [r1] - mov r0, r9 - ldr r1, [r0] - lsls r0, r4, 1 - adds r1, 0x86 - adds r1, r0 - ldrh r0, [r1] - adds r0, 0x1 - strh r0, [r1] - movs r0, 0 - adds r1, r5, 0 - adds r2, r4, 0 - bl sub_8026F1C - movs r0, 0x1 - bl sub_8027234 - adds r0, r4, 0 - bl sub_8026D1C - mov r1, r9 - ldr r0, [r1] - adds r1, r0, 0 - adds r1, 0xE8 - adds r1, r5 - ldr r2, =0x000032e0 - adds r0, r2 - adds r0, r5 - ldrb r0, [r0] - strb r0, [r1] - mov r4, r9 - ldr r0, [r4] - adds r0, r2 - adds r0, r5 - movs r1, 0x3 - strb r1, [r0] - ldr r1, [r4] - adds r1, 0xF4 - add r1, r8 - ldrb r0, [r1] - movs r2, 0xFF - orrs r0, r2 - strb r0, [r1] - ldr r1, [r4] - adds r1, 0xF5 - add r1, r8 - ldrb r0, [r1] - orrs r0, r2 - strb r0, [r1] -_08026602: - mov r0, r10 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r10, r0 - ldr r4, [sp, 0x4] - cmp r10, r4 - bcs _08026614 - b _08026450 -_08026614: - add sp, 0x10 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8026324 - - thumb_func_start sub_8026634 -sub_8026634: @ 8026634 - push {r4-r7,lr} - lsls r0, 24 - lsrs r4, r0, 24 - lsls r1, 24 - lsrs r3, r1, 24 - lsls r2, 24 - lsrs r6, r2, 24 - movs r7, 0 - ldr r2, =gUnknown_02022C98 - ldr r1, [r2] - adds r0, r1, 0 - adds r0, 0x24 - ldrb r0, [r0] - subs r0, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - ldr r0, =0x000032e0 - adds r1, r0 - mov r12, r2 - cmp r3, 0x2 - beq _08026670 - cmp r3, 0x2 - bgt _08026676 - cmp r3, 0x1 - beq _08026674 - b _08026676 - .pool -_08026670: - movs r7, 0x1 - b _08026676 -_08026674: - movs r7, 0x2 -_08026676: - adds r0, r1, 0 - adds r0, 0xB - adds r0, r6 - ldrb r0, [r0] - subs r0, 0x6 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bhi _080266D4 - ldr r0, =gUnknown_082F449C+0x113 - lsls r1, r4, 1 - adds r1, r4 - adds r1, r7, r1 - lsls r2, r5, 4 - subs r2, r5 - adds r1, r2 - adds r1, r0 - ldrb r1, [r1] - cmp r6, r1 - bne _0802670A - mov r0, r12 - ldr r1, [r0] - adds r0, r1, 0 - adds r0, 0xC4 - adds r0, r6 - ldrb r0, [r0] - subs r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bhi _080266D0 - lsls r0, r4, 4 - subs r0, r4 - lsls r0, 2 - adds r0, r1, r0 - ldr r1, =0x000031d4 - adds r0, r1 - movs r1, 0x1 - strb r1, [r0] - b _0802670A - .pool -_080266D0: - movs r0, 0x1 - b _0802670C -_080266D4: - ldr r0, =gUnknown_082F449C+0x113 - lsls r1, r4, 1 - adds r1, r4 - adds r1, r7, r1 - lsls r2, r5, 4 - subs r2, r5 - adds r1, r2 - adds r1, r0 - ldrb r1, [r1] - cmp r6, r1 - bne _0802670A - mov r1, r12 - ldr r0, [r1] - adds r0, 0xA8 - adds r0, r4 - movs r1, 0x4 - strb r1, [r0] - mov r0, r12 - ldr r1, [r0] - lsls r0, r4, 4 - subs r0, r4 - lsls r0, 2 - adds r1, r0 - ldr r0, =0x000031d4 - adds r1, r0 - movs r0, 0x1 - strb r0, [r1] -_0802670A: - movs r0, 0 -_0802670C: - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8026634 - - thumb_func_start sub_802671C -sub_802671C: @ 802671C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - ldr r2, =gUnknown_02022C98 - ldr r4, [r2] - adds r0, r4, 0 - adds r0, 0x44 - ldrb r1, [r0] - adds r0, 0x4 - ldrb r0, [r0] - mov r9, r0 - movs r3, 0 - mov r10, r3 - movs r5, 0x90 - lsls r5, 1 - adds r0, r4, r5 - str r3, [r0] - adds r5, r1, 0 - mov r0, r9 - subs r0, 0x1 - cmp r5, r0 - blt _0802674E - b _08026974 -_0802674E: - mov r8, r2 -_08026750: - mov r0, r8 - ldr r4, [r0] - adds r0, r4, 0 - adds r0, 0xC4 - adds r0, r5 - ldrb r0, [r0] - cmp r0, 0x1 - bls _08026762 - b _0802686C -_08026762: - movs r1, 0x90 - lsls r1, 1 - adds r0, r4, r1 - movs r2, 0x1 - str r2, [r0] - ldr r1, =0x000032eb - adds r0, r4, r1 - adds r6, r0, r5 - ldrb r0, [r6] - cmp r0, 0x9 - bls _080267FC - movs r7, 0 - movs r0, 0xA - strb r0, [r6] - mov r1, r8 - ldr r0, [r1] - adds r0, 0xC4 - adds r0, r5 - movs r1, 0x3 - strb r1, [r0] - mov r1, r8 - ldr r0, [r1] - movs r6, 0xA4 - lsls r6, 1 - adds r0, r6 - adds r1, r0, r5 - ldrb r0, [r1] - cmp r0, 0 - bne _080267AC - strb r2, [r1] - ldr r2, =0x000032e0 - adds r0, r4, r2 - adds r0, r5 - ldrb r0, [r0] - adds r0, 0x4A - bl PlaySE -_080267AC: - mov r0, r8 - ldr r1, [r0] - adds r0, r1, 0 - adds r0, 0x40 - ldrb r0, [r0] - cmp r0, 0x9 - bls _080267C2 - mov r2, r10 - cmp r2, 0x1 - beq _080267C2 - b _08026964 -_080267C2: - movs r0, 0x1 - mov r10, r0 - adds r0, r1, r6 - adds r0, r5 - strb r7, [r0] - mov r1, r8 - ldr r0, [r1] - adds r1, r0, 0 - adds r1, 0x40 - ldrb r0, [r1] - cmp r0, 0x9 - bhi _080267DE - adds r0, 0x1 - strb r0, [r1] -_080267DE: - movs r0, 0x3 - adds r1, r5, 0 - movs r2, 0 - bl sub_8026F1C - movs r0, 0 - bl sub_8027234 - b _08026964 - .pool -_080267FC: - adds r0, r5, 0 - bl sub_8026D8C - mov r2, r8 - ldr r7, [r2] - lsls r0, 24 - lsrs r0, 24 - adds r1, r7, 0 - adds r1, 0x90 - adds r1, r0 - ldrb r0, [r1] - movs r1, 0x7 - bl __udivsi3 - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0x1 - bls _08026822 - movs r3, 0x2 -_08026822: - ldr r2, =gUnknown_082F7A88 - ldr r0, =0x000032e0 - adds r1, r4, r0 - adds r1, r5 - lsls r0, r3, 1 - adds r0, r3 - ldrb r1, [r1] - adds r0, r1 - adds r0, r2 - ldrb r2, [r0] - adds r1, r7, 0 - adds r1, 0xD0 - adds r1, r5 - ldrb r0, [r1] - adds r0, 0x1 - movs r3, 0 - strb r0, [r1] - lsls r0, 24 - lsrs r0, 24 - cmp r0, r2 - bcc _0802685C - ldrb r0, [r6] - adds r0, 0x1 - strb r0, [r6] - mov r1, r8 - ldr r0, [r1] - adds r0, 0xD0 - adds r0, r5 - strb r3, [r0] -_0802685C: - bl sub_8026324 - b _08026964 - .pool -_0802686C: - cmp r0, 0x2 - bne _080268F4 - movs r2, 0x90 - lsls r2, 1 - adds r0, r4, r2 - movs r6, 0x1 - str r6, [r0] - adds r1, r4, 0 - adds r1, 0xDC - adds r1, r5 - ldrb r0, [r1] - adds r0, 0x1 - movs r3, 0 - strb r0, [r1] - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x13 - bls _08026964 - mov r0, r8 - ldr r2, [r0] - adds r0, r2, 0 - adds r0, 0xB8 - adds r0, r5 - ldrb r1, [r0] - lsls r0, r1, 4 - subs r0, r1 - lsls r0, 2 - adds r2, r0 - ldr r1, =0x000031d0 - adds r2, r1 - strb r3, [r2] - mov r2, r8 - ldr r0, [r2] - adds r0, 0xDC - adds r0, r5 - strb r3, [r0] - ldr r0, [r2] - adds r0, 0xD0 - adds r0, r5 - strb r3, [r0] - ldr r0, [r2] - adds r0, 0xC4 - adds r0, r5 - strb r3, [r0] - ldr r1, =0x000032eb - adds r0, r4, r1 - adds r0, r5 - strb r6, [r0] - adds r0, r5, 0 - bl sub_8026D8C - lsls r0, 24 - lsrs r0, 24 - adds r1, r5, 0 - bl sub_8026DB0 - ldr r2, =0x000032e0 - adds r1, r4, r2 - adds r1, r5 - strb r0, [r1] - b _08026964 - .pool -_080268F4: - cmp r0, 0x3 - bne _08026964 - adds r1, r4, 0 - adds r1, 0xDC - adds r1, r5 - ldrb r0, [r1] - adds r0, 0x1 - movs r2, 0 - strb r0, [r1] - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x13 - bls _08026964 - mov r0, r8 - ldr r1, [r0] - adds r0, r1, 0 - adds r0, 0x40 - ldrb r0, [r0] - cmp r0, 0x9 - bhi _08026964 - adds r0, r1, 0 - adds r0, 0xDC - adds r0, r5 - strb r2, [r0] - mov r1, r8 - ldr r0, [r1] - adds r0, 0xD0 - adds r0, r5 - strb r2, [r0] - ldr r0, [r1] - adds r0, 0xC4 - adds r0, r5 - strb r2, [r0] - ldr r2, =0x000032eb - adds r0, r4, r2 - adds r0, r5 - movs r1, 0x1 - strb r1, [r0] - mov r0, r8 - ldr r1, [r0] - adds r1, 0xE8 - adds r1, r5 - subs r2, 0xB - adds r4, r2 - adds r4, r5 - ldrb r0, [r4] - strb r0, [r1] - adds r0, r5, 0 - bl sub_8026D8C - lsls r0, 24 - lsrs r0, 24 - adds r1, r5, 0 - bl sub_8026DB0 - strb r0, [r4] -_08026964: - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - mov r0, r9 - subs r0, 0x1 - cmp r5, r0 - bge _08026974 - b _08026750 -_08026974: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_802671C - - thumb_func_start sub_8026988 -sub_8026988: @ 8026988 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - ldr r0, =gUnknown_02022C98 - ldr r0, [r0] - adds r1, r0, 0 - adds r1, 0x44 - adds r0, 0x48 - ldrb r0, [r0] - mov r8, r0 - ldrb r6, [r1] - cmp r6, r8 - bcs _08026A7A - ldr r0, =gUnknown_082F449C - mov r9, r0 -_080269A8: - ldr r0, =gUnknown_02022C98 - ldr r3, [r0] - adds r0, r3, 0 - adds r0, 0x28 - ldrb r1, [r0] - lsls r0, r1, 4 - subs r0, r1 - lsls r0, 2 - ldr r2, =0x000031a0 - adds r0, r2 - adds r7, r3, r0 - movs r0, 0xB - adds r2, r1, 0 - muls r2, r0 - adds r2, r6, r2 - adds r3, 0x24 - ldrb r1, [r3] - subs r1, 0x1 - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 3 - subs r0, r1 - adds r2, r0 - add r2, r9 - ldrb r4, [r2] - adds r0, r7, 0 - adds r0, 0x1F - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0 - beq _080269FC - adds r0, r6, 0 - movs r1, 0 - bl sub_8028BF8 - b _08026A04 - .pool -_080269FC: - adds r0, r6, 0 - movs r1, 0x1 - bl sub_8028BF8 -_08026A04: - adds r0, r7, 0 - adds r0, 0x1F - adds r5, r0, r4 - ldrb r0, [r5] - cmp r0, 0x9 - bls _08026A30 - adds r0, r7, 0 - adds r0, 0x14 - adds r0, r4 - ldrb r1, [r0] - adds r1, 0x3 - lsls r1, 24 - lsrs r1, 24 - adds r0, r6, 0 - bl sub_8028CA4 - ldrb r1, [r5] - lsls r1, 25 - movs r0, 0xFF - lsls r0, 24 - adds r1, r0 - b _08026A52 -_08026A30: - adds r0, r7, 0 - adds r0, 0x14 - adds r3, r0, r4 - ldrb r0, [r3] - cmp r0, 0x3 - bne _08026A5C - movs r0, 0x7 - strb r0, [r5] - adds r0, r6, 0 - movs r1, 0x6 - bl sub_8028CA4 - ldrb r1, [r5] - lsls r1, 25 - movs r2, 0xFF - lsls r2, 24 - adds r1, r2 -_08026A52: - lsrs r1, 24 - adds r0, r6, 0 - bl sub_8028C7C - b _08026A70 -_08026A5C: - ldrb r1, [r3] - adds r0, r6, 0 - bl sub_8028CA4 - ldrb r1, [r5] - lsls r1, 25 - lsrs r1, 24 - adds r0, r6, 0 - bl sub_8028C7C -_08026A70: - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 - cmp r6, r8 - bcc _080269A8 -_08026A7A: - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_8026988 - - thumb_func_start sub_8026A88 -sub_8026A88: @ 8026A88 - push {r4-r6,lr} - ldr r1, =gUnknown_02022C98 - ldr r0, [r1] - adds r0, 0x24 - ldrb r5, [r0] - movs r4, 0 - cmp r4, r5 - bcs _08026ABA - adds r6, r1, 0 -_08026A9A: - lsls r0, r4, 4 - subs r0, r4 - lsls r0, 2 - ldr r1, [r6] - adds r0, r1 - ldr r1, =0x000031cc - adds r0, r1 - ldrb r1, [r0] - adds r0, r4, 0 - bl sub_80286B4 - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, r5 - bcc _08026A9A -_08026ABA: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8026A88 - - thumb_func_start sub_8026AC8 -sub_8026AC8: @ 8026AC8 - push {r4,r5,lr} - ldr r0, =gUnknown_02022C98 - ldr r0, [r0] - adds r0, 0x24 - ldrb r5, [r0] - movs r4, 0 - cmp r4, r5 - bcs _08026AEA -_08026AD8: - adds r0, r4, 0 - movs r1, 0x4 - bl sub_80286B4 - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, r5 - bcc _08026AD8 -_08026AEA: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8026AC8 - - thumb_func_start sub_8026AF4 -sub_8026AF4: @ 8026AF4 - push {lr} - bl sub_8026988 - ldr r0, =gUnknown_02022C98 - ldr r0, [r0] - adds r0, 0x40 - ldrb r0, [r0] - cmp r0, 0x9 - bls _08026B10 - bl sub_8026AC8 - b _08026B14 - .pool -_08026B10: - bl sub_8026A88 -_08026B14: - ldr r0, =gUnknown_02022C98 - ldr r0, [r0] - adds r0, 0x40 - ldrb r0, [r0] - bl sub_80288D4 - pop {r0} - bx r0 - .pool - thumb_func_end sub_8026AF4 - - thumb_func_start sub_8026B28 -sub_8026B28: @ 8026B28 - push {lr} - bl sub_8026988 - ldr r0, =gUnknown_02022C98 - ldr r0, [r0] - adds r0, 0x40 - ldrb r0, [r0] - cmp r0, 0x9 - bls _08026B44 - bl sub_8026AC8 - b _08026B48 - .pool -_08026B44: - bl sub_8026A88 -_08026B48: - ldr r0, =gUnknown_02022C98 - ldr r0, [r0] - adds r0, 0x40 - ldrb r0, [r0] - bl sub_80288D4 - pop {r0} - bx r0 - .pool - thumb_func_end sub_8026B28 - - thumb_func_start sub_8026B5C -sub_8026B5C: @ 8026B5C - push {lr} - adds r3, r1, 0 - lsls r0, 24 - lsrs r0, 24 - subs r0, 0x1 - cmp r0, 0x4 - bhi _08026BB4 - lsls r0, 2 - ldr r1, =_08026B78 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08026B78: - .4byte _08026B8C - .4byte _08026B94 - .4byte _08026B9C - .4byte _08026BA4 - .4byte _08026BAC -_08026B8C: - movs r0, 0x4 - strb r0, [r3] - movs r0, 0x7 - b _08026BB2 -_08026B94: - movs r0, 0x3 - strb r0, [r3] - movs r0, 0x8 - b _08026BB2 -_08026B9C: - movs r0, 0x2 - strb r0, [r3] - movs r0, 0x9 - b _08026BB2 -_08026BA4: - movs r0, 0x1 - strb r0, [r3] - movs r0, 0xA - b _08026BB2 -_08026BAC: - movs r0, 0 - strb r0, [r3] - movs r0, 0xB -_08026BB2: - strb r0, [r2] -_08026BB4: - pop {r0} - bx r0 - thumb_func_end sub_8026B5C - - thumb_func_start sub_8026BB8 -sub_8026BB8: @ 8026BB8 - push {r4-r6,lr} - ldr r1, =gUnknown_02022C98 - ldr r0, [r1] - adds r0, 0x24 - ldrb r5, [r0] - movs r4, 0x1 - cmp r4, r5 - bcs _08026C1E - adds r6, r1, 0 -_08026BCA: - ldr r0, [r6] - movs r1, 0xAC - lsls r1, 1 - adds r0, r1 - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0 - bne _08026BEC - adds r0, r4, 0 - bl sub_8027DFC - ldr r1, [r6] - movs r2, 0xAC - lsls r2, 1 - adds r1, r2 - adds r1, r4 - strb r0, [r1] -_08026BEC: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, r5 - bcc _08026BCA - cmp r4, r5 - bcs _08026C1E - ldr r0, =gUnknown_02022C98 - ldr r0, [r0] - movs r2, 0xAC - lsls r2, 1 - adds r1, r0, r2 -_08026C04: - adds r0, r1, r4 - ldrb r0, [r0] - cmp r0, 0 - bne _08026C14 - movs r0, 0 - b _08026C20 - .pool -_08026C14: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, r5 - bcc _08026C04 -_08026C1E: - movs r0, 0x1 -_08026C20: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_8026BB8 - - thumb_func_start sub_8026C28 -sub_8026C28: @ 8026C28 - push {r4,lr} - movs r1, 0 - ldr r4, =gUnknown_02022C98 - movs r3, 0xAC - lsls r3, 1 - movs r2, 0 -_08026C34: - ldr r0, [r4] - adds r0, r3 - adds r0, r1 - strb r2, [r0] - adds r0, r1, 0x1 - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0x4 - bls _08026C34 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8026C28 - - thumb_func_start sub_8026C50 -sub_8026C50: @ 8026C50 - push {r4,lr} - ldr r3, =gUnknown_02022C98 - ldr r1, [r3] - adds r2, r1, 0 - adds r2, 0x40 - ldrb r0, [r2] - cmp r0, 0x9 - bls _08026C88 - movs r4, 0x90 - lsls r4, 1 - adds r0, r1, r4 - ldr r0, [r0] - cmp r0, 0 - bne _08026C88 - movs r0, 0xA - strb r0, [r2] - ldr r0, [r3] - movs r1, 0x96 - lsls r1, 1 - adds r0, r1 - ldr r0, [r0] - cmp r0, 0 - beq _08026C88 - movs r0, 0x1 - b _08026C8A - .pool -_08026C88: - movs r0, 0 -_08026C8A: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8026C50 - - thumb_func_start sub_8026C90 -sub_8026C90: @ 8026C90 - push {r4-r6,lr} - ldr r4, =gUnknown_02022C98 - ldr r1, [r4] - adds r2, r1, 0 - adds r2, 0x40 - ldrb r0, [r2] - cmp r0, 0x9 - bls _08026D14 - adds r0, r1, 0 - adds r0, 0x44 - ldrb r3, [r0] - adds r0, 0x4 - ldrb r5, [r0] - movs r0, 0xA - strb r0, [r2] - ldr r4, [r4] - mov r12, r4 - movs r0, 0x96 - lsls r0, 1 - add r0, r12 - ldr r0, [r0] - cmp r0, 0 - beq _08026D14 - adds r4, r3, 0 - cmp r4, r5 - bcs _08026D04 - mov r0, r12 - adds r0, 0x28 - ldrb r3, [r0] - lsls r1, r3, 4 - subs r1, r3 - lsls r1, 2 - ldr r6, =gUnknown_082F449C - subs r0, 0x4 - ldrb r2, [r0] - subs r2, 0x1 - add r1, r12 - movs r0, 0xB - muls r3, r0 - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 3 - subs r2, r0, r2 - ldr r0, =0x000031bf - adds r1, r0 -_08026CEA: - adds r0, r4, r3 - adds r0, r2 - adds r0, r6 - ldrb r0, [r0] - adds r0, r1, r0 - ldrb r0, [r0] - cmp r0, 0xA - bne _08026D14 - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, r5 - bcc _08026CEA -_08026D04: - movs r0, 0x1 - b _08026D16 - .pool -_08026D14: - movs r0, 0 -_08026D16: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_8026C90 - - thumb_func_start sub_8026D1C -sub_8026D1C: @ 8026D1C - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - adds r5, r0, 0 - lsls r5, 24 - lsrs r5, 24 - ldr r0, =gUnknown_082F7A9C - mov r8, r0 - ldr r0, =gUnknown_02022C98 - ldr r6, [r0] - adds r0, r6, 0 - adds r0, 0x90 - adds r0, r5 - mov r9, r0 - ldrb r7, [r0] - adds r0, r7, 0 - movs r1, 0x7 - bl __umodsi3 - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - add r4, r8 - adds r0, r7, 0 - movs r1, 0x7 - bl __udivsi3 - lsls r0, 24 - lsrs r0, 24 - movs r1, 0x64 - muls r0, r1 - ldrb r4, [r4] - adds r0, r4 - lsls r0, 24 - lsls r5, 1 - adds r6, 0x86 - adds r6, r5 - ldrh r1, [r6] - lsrs r0, 24 - cmp r1, r0 - bcc _08026D76 - adds r0, r7, 0x1 - mov r1, r9 - strb r0, [r1] -_08026D76: - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8026D1C - - thumb_func_start sub_8026D8C -sub_8026D8C: @ 8026D8C - lsls r0, 24 - lsrs r0, 24 - ldr r3, =gUnknown_082F449C+0x1AC - ldr r1, =gUnknown_02022C98 - ldr r1, [r1] - adds r1, 0x24 - ldrb r1, [r1] - subs r1, 0x1 - movs r2, 0xB - muls r1, r2 - adds r0, r1 - adds r0, r3 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end sub_8026D8C - - thumb_func_start sub_8026DB0 -sub_8026DB0: @ 8026DB0 - push {r4-r7,lr} - mov r7, r8 - push {r7} - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r5, r1, 24 - ldr r4, =gUnknown_02022C98 - ldr r1, [r4] - adds r1, 0x24 - ldrb r2, [r1] - subs r2, 0x1 - lsls r2, 24 - lsrs r2, 24 - ldr r3, =gUnknown_082F449C+0x15E - lsls r1, r0, 1 - adds r1, r0 - lsls r0, r2, 4 - subs r0, r2 - adds r1, r0 - adds r0, r1, r3 - ldrb r0, [r0] - mov r12, r0 - adds r0, r3, 0x1 - adds r0, r1, r0 - ldrb r7, [r0] - adds r3, 0x2 - adds r1, r3 - ldrb r1, [r1] - mov r8, r1 - movs r3, 0 - ldr r1, =gUnknown_082F449C+0x1E3 - lsls r0, r2, 2 - adds r2, r0, r2 - adds r0, r2, r1 - ldrb r0, [r0] - cmp r0, 0 - beq _08026E18 - adds r6, r1, 0 -_08026DFE: - adds r0, r3, r2 - adds r0, r6 - ldrb r0, [r0] - cmp r5, r0 - beq _08026E3C - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - adds r0, r3, r2 - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0 - bne _08026DFE -_08026E18: - ldr r0, [r4] - adds r0, 0x90 - mov r1, r12 - adds r2, r0, r1 - adds r1, r0, r7 - ldrb r0, [r2] - ldrb r3, [r1] - cmp r0, r3 - bls _08026E46 - adds r1, r0, 0 - b _08026E48 - .pool -_08026E3C: - ldr r0, [r4] - adds r0, 0x90 - adds r0, r7 - ldrb r0, [r0] - b _08026E5A -_08026E46: - ldrb r1, [r1] -_08026E48: - ldr r0, [r4] - adds r0, 0x90 - mov r2, r8 - adds r4, r0, r2 - ldrb r0, [r4] - cmp r0, r1 - bls _08026E58 - adds r1, r0, 0 -_08026E58: - adds r0, r1, 0 -_08026E5A: - adds r1, r5, 0 - bl sub_8026E70 - lsls r0, 24 - lsrs r0, 24 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_8026DB0 - - thumb_func_start sub_8026E70 -sub_8026E70: @ 8026E70 - push {r4,lr} - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - ldr r2, =gUnknown_02022C98 - ldr r2, [r2] - adds r2, 0xE8 - adds r2, r1 - ldrb r4, [r2] - movs r1, 0x7 - bl __umodsi3 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x6 - bhi _08026EDE - lsls r0, 2 - ldr r1, =_08026EA4 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08026EA4: - .4byte _08026EDE - .4byte _08026ED6 - .4byte _08026EE2 - .4byte _08026EC0 - .4byte _08026EC6 - .4byte _08026ECC - .4byte _08026ED2 -_08026EC0: - cmp r4, 0 - beq _08026ED6 - b _08026EDE -_08026EC6: - cmp r4, 0 - beq _08026EE2 - b _08026EDE -_08026ECC: - cmp r4, 0x2 - beq _08026ED6 - b _08026EE2 -_08026ED2: - cmp r4, 0 - bne _08026EDA -_08026ED6: - movs r0, 0x1 - b _08026EE4 -_08026EDA: - cmp r4, 0x1 - beq _08026EE2 -_08026EDE: - movs r0, 0 - b _08026EE4 -_08026EE2: - movs r0, 0x2 -_08026EE4: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8026E70 - - thumb_func_start sub_8026EEC -sub_8026EEC: @ 8026EEC - push {r4-r6,lr} - movs r6, 0 - movs r5, 0 - adds r4, r0, 0 - b _08026EFE -_08026EF6: - ldrh r0, [r4, 0x6] - adds r6, r0 - adds r4, 0xC - adds r5, 0x1 -_08026EFE: - bl GetLinkPlayerCount - lsls r0, 24 - lsrs r0, 24 - cmp r5, r0 - blt _08026EF6 - cmp r6, 0xA - bgt _08026F12 - movs r0, 0 - b _08026F14 -_08026F12: - movs r0, 0x1 -_08026F14: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_8026EEC - - thumb_func_start sub_8026F1C -sub_8026F1C: @ 8026F1C - push {r4-r6,lr} - lsls r0, 24 - lsrs r3, r0, 24 - lsls r1, 24 - lsrs r4, r1, 24 - lsls r2, 24 - lsrs r2, 24 - ldr r6, =gUnknown_02022C98 - ldr r1, [r6] - adds r0, r1, 0 - adds r0, 0x24 - ldrb r5, [r0] - cmp r3, 0 - bge _08026F3A - b _0802722C -_08026F3A: - cmp r3, 0x2 - ble _08026F48 - cmp r3, 0x3 - beq _08026F78 - b _0802722C - .pool -_08026F48: - ldr r3, =0x000031b4 - adds r0, r1, r3 - adds r0, r4 - ldrb r4, [r0] - lsls r4, 1 - lsls r0, r2, 1 - adds r0, r2 - lsls r0, 2 - adds r4, r0 - adds r0, r1, 0 - adds r0, 0x4A - adds r0, r4 - ldrh r0, [r0] - ldr r1, =0x00004e20 - bl sub_8027A28 - ldr r1, [r6] - adds r1, 0x4A - adds r1, r4 - b _0802722A - .pool -_08026F78: - adds r0, r1, 0 - adds r0, 0x4A - bl sub_8026EEC - cmp r0, 0 - beq _08026F86 - b _0802722C -_08026F86: - cmp r5, 0x3 - bne _08026F8C - b _08027154 -_08026F8C: - cmp r5, 0x3 - bgt _08026F98 - cmp r5, 0x2 - bne _08026F96 - b _080271E8 -_08026F96: - b _0802722C -_08026F98: - cmp r5, 0x4 - bne _08026F9E - b _08027090 -_08026F9E: - cmp r5, 0x5 - beq _08026FA4 - b _0802722C -_08026FA4: - cmp r4, 0x9 - bls _08026FAA - b _0802722C -_08026FAA: - lsls r0, r4, 2 - ldr r1, =_08026FB8 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08026FB8: - .4byte _08026FE0 - .4byte _08026FF8 - .4byte _08027004 - .4byte _0802701C - .4byte _08027028 - .4byte _08027040 - .4byte _0802704C - .4byte _08027060 - .4byte _0802706C - .4byte _08027084 -_08026FE0: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r2, r1, 0 - adds r2, 0x68 - ldrh r0, [r2] - adds r0, 0x1 - strh r0, [r2] - adds r1, 0x74 - b _08027226 - .pool -_08026FF8: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r1, 0x74 - b _08027226 - .pool -_08027004: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r2, r1, 0 - adds r2, 0x74 - ldrh r0, [r2] - adds r0, 0x1 - strh r0, [r2] - adds r1, 0x80 - b _08027226 - .pool -_0802701C: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r1, 0x80 - b _08027226 - .pool -_08027028: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r2, r1, 0 - adds r2, 0x80 - ldrh r0, [r2] - adds r0, 0x1 - strh r0, [r2] - adds r1, 0x50 - b _08027226 - .pool -_08027040: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r1, 0x50 - b _08027226 - .pool -_0802704C: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r2, r1, 0 - adds r2, 0x50 - ldrh r0, [r2] - adds r0, 0x1 - strh r0, [r2] - b _08027224 - .pool -_08027060: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - b _08027224 - .pool -_0802706C: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r2, r1, 0 - adds r2, 0x5C - ldrh r0, [r2] - adds r0, 0x1 - strh r0, [r2] - adds r1, 0x68 - b _08027226 - .pool -_08027084: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r1, 0x68 - b _08027226 - .pool -_08027090: - subs r0, r4, 0x1 - cmp r0, 0x7 - bls _08027098 - b _0802722C -_08027098: - lsls r0, 2 - ldr r1, =_080270A8 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_080270A8: - .4byte _080270C8 - .4byte _080270E0 - .4byte _080270EC - .4byte _08027104 - .4byte _08027110 - .4byte _08027124 - .4byte _08027130 - .4byte _08027148 -_080270C8: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r2, r1, 0 - adds r2, 0x68 - ldrh r0, [r2] - adds r0, 0x1 - strh r0, [r2] - adds r1, 0x74 - b _08027226 - .pool -_080270E0: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r1, 0x74 - b _08027226 - .pool -_080270EC: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r2, r1, 0 - adds r2, 0x74 - ldrh r0, [r2] - adds r0, 0x1 - strh r0, [r2] - adds r1, 0x50 - b _08027226 - .pool -_08027104: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r1, 0x50 - b _08027226 - .pool -_08027110: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r2, r1, 0 - adds r2, 0x50 - ldrh r0, [r2] - adds r0, 0x1 - strh r0, [r2] - b _08027224 - .pool -_08027124: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - b _08027224 - .pool -_08027130: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r2, r1, 0 - adds r2, 0x5C - ldrh r0, [r2] - adds r0, 0x1 - strh r0, [r2] - adds r1, 0x68 - b _08027226 - .pool -_08027148: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r1, 0x68 - b _08027226 - .pool -_08027154: - subs r0, r4, 0x2 - cmp r0, 0x5 - bhi _0802722C - lsls r0, 2 - ldr r1, =_08027168 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08027168: - .4byte _08027180 - .4byte _08027198 - .4byte _080271A4 - .4byte _080271BC - .4byte _080271C8 - .4byte _080271DC -_08027180: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r2, r1, 0 - adds r2, 0x5C - ldrh r0, [r2] - adds r0, 0x1 - strh r0, [r2] - adds r1, 0x68 - b _08027226 - .pool -_08027198: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r1, 0x68 - b _08027226 - .pool -_080271A4: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r2, r1, 0 - adds r2, 0x68 - ldrh r0, [r2] - adds r0, 0x1 - strh r0, [r2] - adds r1, 0x50 - b _08027226 - .pool -_080271BC: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r1, 0x50 - b _08027226 - .pool -_080271C8: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r2, r1, 0 - adds r2, 0x50 - ldrh r0, [r2] - adds r0, 0x1 - strh r0, [r2] - b _08027224 - .pool -_080271DC: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - b _08027224 - .pool -_080271E8: - cmp r4, 0x4 - beq _0802720E - cmp r4, 0x4 - bgt _080271F6 - cmp r4, 0x3 - beq _08027200 - b _0802722C -_080271F6: - cmp r4, 0x5 - beq _08027214 - cmp r4, 0x6 - beq _08027222 - b _0802722C -_08027200: - ldr r1, [r6] - adds r2, r1, 0 - adds r2, 0x50 - ldrh r0, [r2] - adds r0, 0x1 - strh r0, [r2] - b _08027224 -_0802720E: - ldr r1, [r6] - adds r1, 0x50 - b _08027226 -_08027214: - ldr r1, [r6] - adds r2, r1, 0 - adds r2, 0x50 - ldrh r0, [r2] - adds r0, 0x1 - strh r0, [r2] - b _08027224 -_08027222: - ldr r1, [r6] -_08027224: - adds r1, 0x5C -_08027226: - ldrh r0, [r1] - adds r0, 0x1 -_0802722A: - strh r0, [r1] -_0802722C: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_8026F1C - - thumb_func_start sub_8027234 -sub_8027234: @ 8027234 - push {r4,r5,lr} - adds r1, r0, 0 - ldr r4, =gUnknown_02022C98 - ldr r3, [r4] - adds r0, r3, 0 - adds r0, 0x24 - ldrb r0, [r0] - cmp r0, 0x5 - bne _0802729E - cmp r1, 0x1 - bne _08027280 - movs r5, 0x89 - lsls r5, 1 - adds r1, r3, r5 - ldrh r0, [r1] - adds r2, r0, 0x1 - strh r2, [r1] - movs r0, 0x8A - lsls r0, 1 - adds r1, r3, r0 - lsls r0, r2, 16 - lsrs r0, 16 - ldrh r3, [r1] - cmp r0, r3 - bls _08027268 - strh r2, [r1] -_08027268: - ldr r0, [r4] - adds r2, r0, r5 - ldrh r0, [r2] - ldr r1, =0x0000270f - cmp r0, r1 - bls _0802729E - strh r1, [r2] - b _0802729E - .pool -_08027280: - movs r2, 0x89 - lsls r2, 1 - adds r0, r3, r2 - movs r5, 0x8A - lsls r5, 1 - adds r1, r3, r5 - ldrh r0, [r0] - ldrh r3, [r1] - cmp r0, r3 - bls _08027296 - strh r0, [r1] -_08027296: - ldr r0, [r4] - adds r0, r2 - movs r1, 0 - strh r1, [r0] -_0802729E: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_8027234 - - thumb_func_start sub_80272A4 -sub_80272A4: @ 80272A4 - push {r4,r5,lr} - movs r3, 0 - ldr r2, =gUnknown_02022C98 - ldr r0, [r2] - adds r0, 0x24 - ldrb r0, [r0] - cmp r3, r0 - bcs _080272DC - adds r5, r2, 0 - movs r4, 0x8A - lsls r4, 1 -_080272BA: - ldr r2, [r5] - lsls r0, r3, 1 - adds r0, r3 - lsls r0, 2 - adds r1, r2, 0 - adds r1, 0x54 - adds r1, r0 - adds r0, r2, r4 - ldrh r0, [r0] - strh r0, [r1] - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - adds r2, 0x24 - ldrb r2, [r2] - cmp r3, r2 - bcc _080272BA -_080272DC: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80272A4 - - thumb_func_start sub_80272E8 -sub_80272E8: @ 80272E8 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - movs r5, 0 - ldr r7, =gUnknown_02022C98 - movs r4, 0 - ldr r0, =0x000031bf - mov r10, r0 -_080272FC: - movs r2, 0 - lsls r6, r5, 4 - lsls r1, r5, 1 - mov r8, r1 - lsls r0, r5, 3 - mov r12, r0 - adds r1, r5, 0x1 - mov r9, r1 - subs r0, r6, r5 - lsls r3, r0, 2 -_08027310: - ldr r0, [r7] - adds r1, r2, r3 - add r0, r10 - adds r0, r1 - strb r4, [r0] - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0xA - bls _08027310 - ldr r0, [r7] - subs r1, r6, r5 - lsls r1, 2 - adds r0, r1 - ldr r2, =0x000031cc - adds r0, r2 - strb r4, [r0] - ldr r0, [r7] - adds r0, r1 - ldr r1, =0x000031d0 - adds r0, r1 - strb r4, [r0] - ldr r0, [r7] - adds r0, 0x90 - adds r0, r5 - strb r4, [r0] - ldr r1, [r7] - adds r0, r1, 0 - adds r0, 0x86 - add r0, r8 - strh r4, [r0] - add r1, r12 - ldr r2, =0x00003308 - adds r1, r2 - strb r4, [r1] - ldr r2, [r7] - ldr r1, =0x0000330c - adds r0, r2, r1 - add r0, r12 - str r4, [r0] - mov r0, r8 - adds r1, r0, r5 - lsls r1, 2 - adds r0, r2, 0 - adds r0, 0x4A - adds r0, r1 - strh r4, [r0] - adds r0, r2, 0 - adds r0, 0x4C - adds r0, r1 - strh r4, [r0] - adds r0, r2, 0 - adds r0, 0x4E - adds r0, r1 - strh r4, [r0] - adds r0, r2, 0 - adds r0, 0x50 - adds r0, r1 - strh r4, [r0] - adds r0, r2, 0 - adds r0, 0x52 - adds r0, r1 - strh r4, [r0] - adds r0, r2, 0 - adds r0, 0x54 - adds r0, r1 - strh r4, [r0] - mov r1, r9 - lsls r0, r1, 24 - lsrs r5, r0, 24 - cmp r5, 0x4 - bls _080272FC - ldr r2, =gUnknown_02022C98 - ldr r0, [r2] - movs r1, 0xAA - lsls r1, 1 - adds r0, r1 - movs r2, 0 - strb r2, [r0] - ldr r1, =gUnknown_02022C98 - ldr r0, [r1] - movs r1, 0x89 - lsls r1, 1 - adds r3, r0, r1 - movs r1, 0 - strh r2, [r3] - adds r0, 0x40 - strb r1, [r0] - bl sub_8026A88 - bl sub_8026988 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80272E8 - - thumb_func_start sub_80273F0 -sub_80273F0: @ 80273F0 - push {r4,r5,lr} - movs r4, 0 - ldr r0, =gUnknown_02022C98 - ldr r0, [r0] - adds r0, 0x24 - ldrb r0, [r0] - cmp r0, 0x4 - beq _0802740C - cmp r0, 0x5 - beq _08027410 - b _08027412 - .pool -_0802740C: - movs r4, 0x1 - b _08027412 -_08027410: - movs r4, 0x2 -_08027412: - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0xA - bl __umodsi3 - lsls r0, 24 - lsrs r0, 24 - movs r3, 0 - lsls r1, r4, 2 - ldr r5, =gUnknown_02022C98 - ldr r2, =gUnknown_082F7AA4 - adds r1, r4 - lsls r1, 1 - adds r0, r1 - adds r0, r2 - ldrb r2, [r0] -_08027436: - ldr r1, [r5] - lsls r0, r3, 1 - adds r0, r3 - lsls r0, 2 - adds r1, 0x52 - adds r1, r0 - strh r2, [r1] - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0x4 - bls _08027436 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80273F0 - - thumb_func_start sub_802745C -sub_802745C: @ 802745C - push {lr} - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_02022C98 - ldr r2, [r1] - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 2 - adds r0, r2, 0 - adds r0, 0x4A - adds r0, r1 - ldrh r3, [r0] - adds r0, r2, 0 - adds r0, 0x4C - adds r0, r1 - ldrh r0, [r0] - adds r2, 0x4E - adds r2, r1 - adds r3, r0 - ldrh r2, [r2] - adds r0, r3, r2 - ldr r1, =0x0000270f - cmp r0, r1 - bls _0802748E - adds r0, r1, 0 -_0802748E: - pop {r1} - bx r1 - .pool - thumb_func_end sub_802745C - - thumb_func_start sub_802749C -sub_802749C: @ 802749C - push {r4-r6,lr} - ldr r5, =gUnknown_02022C98 - ldr r0, [r5] - adds r0, 0x28 - ldrb r0, [r0] - bl sub_802745C - ldr r1, =0x0000270f - bl sub_8027A38 - adds r4, r0, 0 - ldr r0, [r5] - adds r0, 0x28 - ldrb r0, [r0] - bl sub_80276C0 - ldr r1, =0x000f4236 - bl sub_8027A38 - adds r2, r0, 0 - ldr r3, =gSaveBlock2Ptr - ldr r0, [r3] - movs r6, 0x83 - lsls r6, 2 - adds r1, r0, r6 - ldr r0, [r1] - cmp r0, r2 - bcs _080274D6 - str r2, [r1] -_080274D6: - ldr r0, [r3] - movs r2, 0x84 - lsls r2, 2 - adds r1, r0, r2 - ldrh r0, [r1] - cmp r0, r4 - bcs _080274E6 - strh r4, [r1] -_080274E6: - ldr r0, [r3] - ldr r6, =0x00000212 - adds r2, r0, r6 - ldr r0, [r5] - movs r1, 0x8A - lsls r1, 1 - adds r0, r1 - ldrh r1, [r0] - ldrh r0, [r2] - cmp r0, r1 - bcs _080274FE - strh r1, [r2] -_080274FE: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_802749C - - thumb_func_start sub_8027518 -sub_8027518: @ 8027518 - push {r4-r7,lr} - lsls r0, 24 - lsrs r7, r0, 24 - ldr r1, =gUnknown_02022C98 - ldr r0, [r1] - adds r0, 0x9B - ldrb r6, [r0] - movs r3, 0x3 - adds r5, r1, 0 - adds r4, r5, 0 -_0802752C: - ldr r0, [r4] - adds r0, 0x98 - adds r2, r0, r3 - subs r1, r3, 0x1 - adds r0, r1 - ldrb r0, [r0] - strb r0, [r2] - lsls r1, 24 - lsrs r3, r1, 24 - cmp r3, 0 - bne _0802752C - ldr r0, [r5] - adds r0, 0x98 - strb r7, [r0] - adds r0, r6, 0 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8027518 - - thumb_func_start sub_8027554 -sub_8027554: @ 8027554 - push {r4,lr} - ldr r4, =gUnknown_02022C98 - ldr r3, [r4] - adds r0, r3, 0 - adds r0, 0x28 - ldrb r1, [r0] - adds r0, 0x88 - adds r2, r0, r1 - ldrb r0, [r2] - cmp r0, 0 - bne _080275FC - ldr r0, =gMain - ldrh r2, [r0, 0x2E] - movs r0, 0x40 - ands r0, r2 - cmp r0, 0 - beq _08027594 - lsls r0, r1, 4 - subs r0, r1 - lsls r0, 2 - adds r0, r3, r0 - ldr r1, =0x000031cc - adds r0, r1 - movs r1, 0x2 - b _080275CA - .pool -_08027594: - movs r0, 0x20 - ands r0, r2 - cmp r0, 0 - beq _080275B0 - lsls r0, r1, 4 - subs r0, r1 - lsls r0, 2 - adds r0, r3, r0 - ldr r1, =0x000031cc - adds r0, r1 - movs r1, 0x3 - b _080275CA - .pool -_080275B0: - movs r0, 0x10 - ands r0, r2 - lsls r0, 16 - lsrs r2, r0, 16 - cmp r2, 0 - beq _080275E8 - lsls r0, r1, 4 - subs r0, r1 - lsls r0, 2 - adds r0, r3, r0 - ldr r1, =0x000031cc - adds r0, r1 - movs r1, 0x1 -_080275CA: - strb r1, [r0] - ldr r0, [r4] - adds r1, r0, 0 - adds r1, 0x28 - adds r0, 0xB0 - ldrb r1, [r1] - adds r0, r1 - movs r1, 0x6 - strb r1, [r0] - movs r0, 0xD4 - bl PlaySE - b _08027600 - .pool -_080275E8: - lsls r0, r1, 4 - subs r0, r1 - lsls r0, 2 - adds r0, r3, r0 - ldr r1, =0x000031cc - adds r0, r1 - strb r2, [r0] - b _08027600 - .pool -_080275FC: - subs r0, 0x1 - strb r0, [r2] -_08027600: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_8027554 - - thumb_func_start sub_8027608 -sub_8027608: @ 8027608 - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r0, r1, 0 - adds r0, 0x28 - ldrb r2, [r0] - lsls r0, r2, 4 - subs r0, r2 - lsls r0, 2 - adds r1, r0 - ldr r0, =0x000031cc - adds r1, r0 - movs r0, 0 - strb r0, [r1] - bx lr - .pool - thumb_func_end sub_8027608 - - thumb_func_start sub_802762C -sub_802762C: @ 802762C - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r0, r1, 0 - adds r0, 0x28 - ldrb r2, [r0] - lsls r0, r2, 1 - adds r0, r2 - lsls r0, 2 - adds r1, 0x52 - adds r1, r0 - ldrh r0, [r1] - adds r0, 0x85 - lsls r0, 16 - lsrs r0, 16 - bx lr - .pool - thumb_func_end sub_802762C - - thumb_func_start sub_8027650 -sub_8027650: @ 8027650 - ldr r0, =gUnknown_02022C98 - ldr r0, [r0] - adds r0, 0x24 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end sub_8027650 - - thumb_func_start sub_8027660 -sub_8027660: @ 8027660 - push {lr} - lsls r0, 24 - lsrs r2, r0, 24 - ldr r0, =gReceivedRemoteLinkPlayers - ldrb r0, [r0] - cmp r0, 0 - bne _0802768C - ldr r0, =gUnknown_02022C98 - lsls r1, r2, 4 - subs r1, r2 - lsls r1, 2 - ldr r2, =0x000031a0 - adds r1, r2 - ldr r0, [r0] - b _08027694 - .pool -_0802768C: - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - ldr r1, =gLinkPlayers + 8 -_08027694: - adds r0, r1 - pop {r1} - bx r1 - .pool - thumb_func_end sub_8027660 - - thumb_func_start sub_80276A0 -sub_80276A0: @ 80276A0 - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - ldr r2, =gUnknown_02022C98 - ldr r3, [r2] - lsrs r1, 23 - lsls r2, r0, 1 - adds r2, r0 - lsls r2, 2 - adds r1, r2 - adds r3, 0x4A - adds r3, r1 - ldrh r0, [r3] - bx lr - .pool - thumb_func_end sub_80276A0 - - thumb_func_start sub_80276C0 -sub_80276C0: @ 80276C0 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - lsls r0, 24 - lsrs r4, r0, 24 - movs r5, 0 - movs r3, 0 - ldr r0, =gUnknown_02022C98 - mov r9, r0 - ldr r2, =gUnknown_082F7B24 - mov r10, r2 - ldr r2, [r0] - lsls r1, r4, 1 - adds r0, r1, r4 - lsls r0, 2 - str r0, [sp] - adds r6, r2, 0 - adds r6, 0x4A - mov r12, r1 - mov r8, r10 -_080276EE: - lsls r1, r3, 1 - ldr r7, [sp] - adds r0, r1, r7 - adds r0, r6, r0 - ldrh r2, [r0] - add r1, r8 - movs r7, 0 - ldrsh r0, [r1, r7] - muls r0, r2 - adds r5, r0 - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0x2 - bls _080276EE - mov r0, r9 - ldr r1, [r0] - mov r2, r12 - adds r0, r2, r4 - lsls r0, 2 - adds r1, 0x50 - adds r1, r0 - ldrh r1, [r1] - mov r3, r10 - movs r7, 0x6 - ldrsh r0, [r3, r7] - muls r0, r1 - cmp r5, r0 - bls _08027734 - subs r0, r5, r0 - b _08027736 - .pool -_08027734: - movs r0, 0 -_08027736: - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_80276C0 - - thumb_func_start sub_8027748 -sub_8027748: @ 8027748 - push {r4-r6,lr} - ldr r0, =gUnknown_02022C98 - ldr r0, [r0] - adds r0, 0x24 - ldrb r6, [r0] - movs r0, 0 - bl sub_80276C0 - adds r5, r0, 0 - movs r4, 0x1 - cmp r4, r6 - bcs _08027776 -_08027760: - adds r0, r4, 0 - bl sub_80276C0 - cmp r0, r5 - bls _0802776C - adds r5, r0, 0 -_0802776C: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, r6 - bcc _08027760 -_08027776: - ldr r1, =0x000f4236 - adds r0, r5, 0 - bl sub_8027A38 - pop {r4-r6} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8027748 - - thumb_func_start sub_802778C -sub_802778C: @ 802778C - push {r4,r5,lr} - lsls r0, 24 - ldr r1, =gUnknown_02022C98 - ldr r2, [r1] - adds r1, r2, 0 - adds r1, 0x24 - ldrb r5, [r1] - lsrs r4, r0, 23 - adds r2, 0x4A - adds r0, r2, r4 - ldrh r3, [r0] - movs r1, 0 - cmp r1, r5 - bcs _080277C4 -_080277A8: - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r4, r0 - adds r0, r2, r0 - ldrh r0, [r0] - cmp r0, r3 - bls _080277BA - adds r3, r0, 0 -_080277BA: - adds r0, r1, 0x1 - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, r5 - bcc _080277A8 -_080277C4: - adds r0, r3, 0 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_802778C - - thumb_func_start sub_80277D0 -sub_80277D0: @ 80277D0 - push {r4-r7,lr} - sub sp, 0x14 - lsls r0, 24 - lsrs r7, r0, 24 - movs r6, 0x1 - ldr r0, =gUnknown_02022C98 - ldr r0, [r0] - adds r0, 0x24 - ldrb r5, [r0] - movs r4, 0 - cmp r4, r5 - bcs _080277FE -_080277E8: - adds r0, r4, 0 - bl sub_80276C0 - lsls r1, r4, 2 - add r1, sp - str r0, [r1] - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, r5 - bcc _080277E8 -_080277FE: - lsls r7, 2 - mov r12, r7 - cmp r6, 0 - beq _08027838 - subs r7, r5, 0x1 -_08027808: - movs r6, 0 - movs r4, 0 - cmp r6, r7 - bge _08027834 - adds r5, r7, 0 -_08027812: - lsls r0, r4, 2 - mov r2, sp - adds r1, r2, r0 - adds r4, 0x1 - lsls r0, r4, 2 - adds r3, r2, r0 - ldr r0, [r1] - ldr r2, [r3] - cmp r0, r2 - bcs _0802782C - str r2, [r1] - str r0, [r3] - movs r6, 0x1 -_0802782C: - lsls r0, r4, 24 - lsrs r4, r0, 24 - cmp r4, r5 - blt _08027812 -_08027834: - cmp r6, 0 - bne _08027808 -_08027838: - mov r0, sp - add r0, r12 - ldr r0, [r0] - add sp, 0x14 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80277D0 - - thumb_func_start sub_802784C -sub_802784C: @ 802784C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - movs r0, 0 - mov r10, r0 - mov r8, r0 - mov r9, r0 - ldr r6, =gUnknown_02022C98 - ldr r0, [r6] - adds r0, 0x24 - ldrb r5, [r0] - bl sub_8027748 - bl sub_8027748 - cmp r0, 0 - bne _080278A0 - movs r4, 0 - cmp r9, r5 - bcs _080278A0 - adds r2, r6, 0 - ldr r1, =0x00003308 - mov r12, r1 - movs r7, 0 - movs r6, 0x4 - ldr r3, =0x0000330c -_08027884: - ldr r0, [r2] - lsls r1, r4, 3 - adds r0, r1 - add r0, r12 - strb r6, [r0] - ldr r0, [r2] - adds r0, r3 - adds r0, r1 - str r7, [r0] - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, r5 - bcc _08027884 -_080278A0: - movs r4, 0 - cmp r4, r5 - bcs _080278CA -_080278A6: - adds r0, r4, 0 - bl sub_80276C0 - ldr r1, =0x000f4236 - bl sub_8027A38 - ldr r1, =gUnknown_02022C98 - ldr r1, [r1] - lsls r2, r4, 3 - ldr r3, =0x0000330c - adds r1, r3 - adds r1, r2 - str r0, [r1] - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, r5 - bcc _080278A6 -_080278CA: - mov r0, r10 - bl sub_80277D0 - adds r6, r0, 0 - mov r3, r8 - movs r4, 0 - cmp r4, r5 - bcs _08027916 - ldr r7, =gUnknown_02022C98 - mov r10, r7 -_080278DE: - mov r0, r10 - ldr r2, [r0] - lsls r1, r4, 3 - ldr r7, =0x0000330c - adds r0, r2, r7 - adds r0, r1 - ldr r0, [r0] - cmp r6, r0 - bne _0802790C - adds r0, r2, r1 - ldr r1, =0x00003308 - adds r0, r1 - strb r3, [r0] - mov r0, r8 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - mov r0, r9 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 -_0802790C: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, r5 - bcc _080278DE -_08027916: - mov r10, r8 - cmp r9, r5 - bcc _080278CA - movs r0, 0 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_802784C - - thumb_func_start sub_802793C -sub_802793C: @ 802793C - lsls r1, 24 - ldr r2, =gUnknown_02022C98 - ldr r2, [r2] - lsrs r1, 21 - ldr r3, =0x00003308 - adds r2, r3 - adds r2, r1 - ldr r1, [r2] - ldr r2, [r2, 0x4] - str r1, [r0] - str r2, [r0, 0x4] - bx lr - .pool - thumb_func_end sub_802793C - - thumb_func_start sub_802795C -sub_802795C: @ 802795C - push {r4-r7,lr} - sub sp, 0x14 - lsls r0, 24 - lsrs r6, r0, 24 - movs r7, 0 - ldr r0, =gUnknown_02022C98 - ldr r0, [r0] - adds r0, 0x24 - ldrb r5, [r0] - mov r0, sp - movs r1, 0 - movs r2, 0x14 - bl memset - movs r4, 0 - cmp r7, r5 - bcs _08027994 -_0802797E: - adds r0, r4, 0 - bl sub_80276C0 - lsls r1, r4, 2 - add r1, sp - str r0, [r1] - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, r5 - bcc _0802797E -_08027994: - lsls r0, r6, 2 - add r0, sp - ldr r1, [r0] - movs r4, 0 -_0802799C: - cmp r4, r6 - beq _080279B0 - lsls r0, r4, 2 - add r0, sp - ldr r0, [r0] - cmp r1, r0 - bcs _080279B0 - adds r0, r7, 0x1 - lsls r0, 24 - lsrs r7, r0, 24 -_080279B0: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x4 - bls _0802799C - adds r0, r7, 0 - add sp, 0x14 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_802795C - - thumb_func_start sub_80279C8 -sub_80279C8: @ 80279C8 - push {r4-r6,lr} - ldr r0, =gUnknown_02022C98 - ldr r0, [r0] - adds r0, 0x28 - ldrb r4, [r0] - bl sub_802762C - lsls r0, 16 - lsrs r5, r0, 16 - adds r6, r5, 0 - adds r0, r4, 0 - bl sub_80276C0 - adds r4, r0, 0 - bl sub_8027748 - cmp r4, r0 - beq _080279F4 - movs r0, 0x3 - b _08027A22 - .pool -_080279F4: - adds r0, r5, 0 - movs r1, 0x1 - bl CheckBagHasSpace - lsls r0, 24 - cmp r0, 0 - bne _08027A06 - movs r0, 0x2 - b _08027A22 -_08027A06: - adds r0, r6, 0 - movs r1, 0x1 - bl AddBagItem - adds r0, r6, 0 - movs r1, 0x1 - bl CheckBagHasSpace - lsls r0, 24 - cmp r0, 0 - beq _08027A20 - movs r0, 0 - b _08027A22 -_08027A20: - movs r0, 0x1 -_08027A22: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_80279C8 - - thumb_func_start sub_8027A28 -sub_8027A28: @ 8027A28 - push {lr} - adds r2, r0, 0 - adds r0, r1, 0 - cmp r2, r0 - bcs _08027A34 - adds r0, r2, 0x1 -_08027A34: - pop {r1} - bx r1 - thumb_func_end sub_8027A28 - - thumb_func_start sub_8027A38 -sub_8027A38: @ 8027A38 - push {lr} - adds r2, r0, 0 - adds r0, r1, 0 - cmp r2, r0 - bcs _08027A44 - adds r0, r2, 0 -_08027A44: - pop {r1} - bx r1 - thumb_func_end sub_8027A38 - - thumb_func_start sub_8027A48 -sub_8027A48: @ 8027A48 - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_02022C98 - ldr r1, [r1] - adds r1, 0x34 - adds r1, r0 - ldrb r0, [r1] - bx lr - .pool - thumb_func_end sub_8027A48 - - thumb_func_start sub_8027A5C -sub_8027A5C: @ 8027A5C - push {r4-r6,lr} - movs r5, 0 - ldr r6, =gSpecialVar_Result -_08027A62: - movs r0, 0x64 - adds r1, r5, 0 - muls r1, r0 - ldr r0, =gPlayerParty - adds r4, r1, r0 - adds r0, r4, 0 - movs r1, 0x5 - bl GetMonData - cmp r0, 0 - beq _08027A94 - adds r0, r4, 0 - movs r1, 0x41 - bl GetMonData - cmp r0, 0x55 - bne _08027A94 - movs r0, 0x1 - strh r0, [r6] - b _08027AA0 - .pool -_08027A94: - adds r5, 0x1 - cmp r5, 0x5 - ble _08027A62 - ldr r1, =gSpecialVar_Result - movs r0, 0 - strh r0, [r1] -_08027AA0: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8027A5C - - thumb_func_start sub_8027AAC -sub_8027AAC: @ 8027AAC - push {r4,lr} - ldr r4, =sub_8027ACC - adds r0, r4, 0 - movs r1, 0 - bl CreateTask - lsls r0, 24 - lsrs r0, 24 - bl _call_via_r4 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8027AAC - - thumb_func_start sub_8027ACC -sub_8027ACC: @ 8027ACC - push {r4-r7,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - ldr r1, =gTasks + 0x8 - adds r7, r0, r1 - movs r1, 0 - ldrsh r0, [r7, r1] - cmp r0, 0x1 - beq _08027B94 - cmp r0, 0x1 - bgt _08027AF4 - cmp r0, 0 - beq _08027AFE - b _08027BE2 - .pool -_08027AF4: - cmp r0, 0x2 - beq _08027BA0 - cmp r0, 0x3 - beq _08027BC8 - b _08027BE2 -_08027AFE: - ldr r0, =gUnknown_082F7B2C - ldr r1, [r0, 0x4] - ldr r0, [r0] - str r0, [sp] - str r1, [sp, 0x4] - ldr r1, =gText_BerryPickingRecords - movs r0, 0x1 - movs r2, 0 - bl GetStringWidth - adds r4, r0, 0 - movs r6, 0 - ldr r5, =gUnknown_082F7B34 -_08027B18: - ldr r1, [r5] - movs r0, 0x1 - movs r2, 0 - bl GetStringWidth - adds r0, 0x32 - cmp r0, r4 - ble _08027B2A - adds r4, r0, 0 -_08027B2A: - adds r5, 0x4 - adds r6, 0x1 - cmp r6, 0x2 - bls _08027B18 - adds r0, r4, 0x7 - cmp r0, 0 - bge _08027B3A - adds r0, 0x7 -_08027B3A: - asrs r4, r0, 3 - movs r0, 0x1 - ands r0, r4 - cmp r0, 0 - beq _08027B46 - adds r4, 0x1 -_08027B46: - movs r1, 0x1E - subs r1, r4 - lsrs r0, r1, 31 - adds r1, r0 - asrs r1, 1 - lsls r1, 24 - lsrs r1, 16 - ldr r2, =0xffff00ff - ldr r0, [sp] - ands r0, r2 - orrs r0, r1 - lsls r2, r4, 24 - ldr r1, =0x00ffffff - ands r0, r1 - orrs r0, r2 - str r0, [sp] - mov r0, sp - bl AddWindow - strh r0, [r7, 0x2] - lsls r0, 24 - lsrs r0, 24 - adds r1, r4, 0 - bl sub_8027BEC - ldrb r0, [r7, 0x2] - movs r1, 0x3 - b _08027BB6 - .pool -_08027B94: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _08027BE2 - b _08027BBA -_08027BA0: - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x3 - ands r0, r1 - cmp r0, 0 - beq _08027BE2 - ldrb r0, [r7, 0x2] - bl rbox_fill_rectangle - ldrb r0, [r7, 0x2] - movs r1, 0x1 -_08027BB6: - bl CopyWindowToVram -_08027BBA: - ldrh r0, [r7] - adds r0, 0x1 - strh r0, [r7] - b _08027BE2 - .pool -_08027BC8: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _08027BE2 - ldrb r0, [r7, 0x2] - bl RemoveWindow - adds r0, r4, 0 - bl DestroyTask - bl EnableBothScriptContexts -_08027BE2: - add sp, 0x8 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_8027ACC - - thumb_func_start sub_8027BEC -sub_8027BEC: @ 8027BEC - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x20 - str r1, [sp, 0x18] - lsls r0, 24 - lsrs r7, r0, 24 - ldr r0, =gSaveBlock2Ptr - ldr r1, [r0] - movs r2, 0x84 - lsls r2, 2 - adds r0, r1, r2 - ldrh r0, [r0] - str r0, [sp, 0xC] - subs r2, 0x4 - adds r0, r1, r2 - ldr r0, [r0] - str r0, [sp, 0x10] - ldr r0, =0x00000212 - adds r1, r0 - ldrh r0, [r1] - str r0, [sp, 0x14] - ldr r4, =0x0000021d - adds r0, r7, 0 - adds r1, r4, 0 - movs r2, 0xD0 - bl LoadUserWindowBorderGfx_ - adds r0, r7, 0 - adds r1, r4, 0 - movs r2, 0xD - bl DrawTextBorderOuter - adds r0, r7, 0 - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r4, =gText_BerryPickingRecords - ldr r0, [sp, 0x18] - lsls r2, r0, 3 - movs r0, 0x1 - adds r1, r4, 0 - bl GetStringCenterAlignXOffset - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x1 - str r0, [sp] - movs r0, 0xFF - str r0, [sp, 0x4] - movs r0, 0 - str r0, [sp, 0x8] - adds r0, r7, 0 - movs r1, 0x1 - adds r2, r4, 0 - bl AddTextPrinterParameterized - movs r6, 0 - ldr r2, =gStringVar1 - mov r8, r2 - movs r0, 0xFF - mov r10, r0 - mov r9, r6 - mov r2, sp - adds r2, 0xC - str r2, [sp, 0x1C] -_08027C76: - lsls r4, r6, 2 - ldr r0, [sp, 0x1C] - ldm r0!, {r1} - str r0, [sp, 0x1C] - ldr r0, =gUnknown_082F7B40 - adds r0, r6, r0 - ldrb r3, [r0] - mov r0, r8 - movs r2, 0 - bl ConvertIntToDecimalStringN - movs r0, 0x1 - mov r1, r8 - movs r2, 0x1 - negs r2, r2 - bl GetStringWidth - adds r5, r0, 0 - ldr r0, =gUnknown_082F7B34 - adds r4, r0 - ldr r2, [r4] - ldr r0, =gUnknown_082F7B44 - lsls r4, r6, 1 - adds r0, r4, r0 - ldrb r0, [r0] - str r0, [sp] - mov r0, r10 - str r0, [sp, 0x4] - mov r0, r9 - str r0, [sp, 0x8] - adds r0, r7, 0 - movs r1, 0x1 - movs r3, 0 - bl AddTextPrinterParameterized - ldr r2, [sp, 0x18] - lsls r3, r2, 3 - subs r3, r5 - lsls r3, 24 - lsrs r3, 24 - ldr r0, =gUnknown_082F7B4A - adds r4, r0 - ldrb r0, [r4] - str r0, [sp] - mov r0, r10 - str r0, [sp, 0x4] - mov r2, r9 - str r2, [sp, 0x8] - adds r0, r7, 0 - movs r1, 0x1 - mov r2, r8 - bl AddTextPrinterParameterized - adds r6, 0x1 - cmp r6, 0x2 - ble _08027C76 - adds r0, r7, 0 - bl PutWindowTilemap - add sp, 0x20 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8027BEC - - thumb_func_start sub_8027D20 -sub_8027D20: @ 8027D20 - push {lr} - bl GetLinkPlayerCount - ldr r1, =gUnknown_02022C98 - ldr r1, [r1] - adds r1, 0x24 - strb r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end sub_8027D20 - - thumb_func_start sub_8027D38 -sub_8027D38: @ 8027D38 - push {r4-r7,lr} - ldr r0, =gUnknown_02022C98 - ldr r0, [r0] - adds r0, 0x24 - ldrb r4, [r0] - cmp r4, 0x4 - bhi _08027D66 - ldr r5, =gUnknown_082F7B90 -_08027D48: - lsls r0, r4, 3 - subs r0, r4 - lsls r0, 2 - ldr r1, =gLinkPlayers + 8 - adds r0, r1 - lsls r1, r4, 2 - adds r1, r5 - ldr r1, [r1] - bl StringCopy - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x4 - bls _08027D48 -_08027D66: - ldr r0, =gUnknown_02022C98 - ldr r1, [r0] - adds r1, 0x24 - movs r2, 0x5 - strb r2, [r1] - movs r1, 0 - mov r12, r0 -_08027D74: - movs r4, 0 - mov r2, r12 - ldr r0, [r2] - adds r0, 0x24 - adds r5, r1, 0x1 - ldrb r0, [r0] - cmp r4, r0 - bcs _08027DB2 - ldr r7, =gUnknown_02022C98 - lsls r3, r1, 1 - ldr r6, =gUnknown_082F7B50 -_08027D8A: - ldr r2, [r7] - lsls r0, r4, 1 - adds r0, r4 - lsls r0, 2 - adds r0, r3, r0 - adds r1, r2, 0 - adds r1, 0x4A - adds r1, r0 - lsls r0, r4, 3 - adds r0, r3, r0 - adds r0, r6 - ldrh r0, [r0] - strh r0, [r1] - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - adds r2, 0x24 - ldrb r2, [r2] - cmp r4, r2 - bcc _08027D8A -_08027DB2: - lsls r0, r5, 24 - lsrs r1, r0, 24 - cmp r1, 0x3 - bls _08027D74 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8027D38 - - thumb_func_start sub_8027DD0 -sub_8027DD0: @ 8027DD0 - push {lr} - sub sp, 0x8 - ldr r3, =0xffffff00 - ldr r1, [sp] - ands r1, r3 - movs r2, 0x1 - orrs r1, r2 - str r1, [sp] - lsls r0, 24 - lsrs r0, 24 - ldr r1, [sp, 0x4] - ands r1, r3 - orrs r1, r0 - str r1, [sp, 0x4] - mov r0, sp - bl sub_800FE50 - add sp, 0x8 - pop {r0} - bx r0 - .pool - thumb_func_end sub_8027DD0 - - thumb_func_start sub_8027DFC -sub_8027DFC: @ 8027DFC - push {lr} - adds r2, r0, 0 - ldr r3, =gRecvCmds - ldrh r0, [r3] - movs r1, 0xFF - lsls r1, 8 - ands r1, r0 - movs r0, 0xBC - lsls r0, 6 - cmp r1, r0 - bne _08027E1E - lsls r0, r2, 4 - adds r1, r3, 0x2 - adds r1, r0, r1 - ldrb r0, [r1] - cmp r0, 0x1 - beq _08027E28 -_08027E1E: - movs r0, 0 - b _08027E2A - .pool -_08027E28: - ldrb r0, [r1, 0x4] -_08027E2A: - pop {r1} - bx r1 - thumb_func_end sub_8027DFC - - thumb_func_start sub_8027E30 -sub_8027E30: @ 8027E30 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x20 - ldr r4, [sp, 0x48] - lsls r4, 24 - str r4, [sp, 0x1C] - movs r4, 0x14 - adds r4, r0 - mov r9, r4 - mov r5, sp - movs r4, 0x2 - strb r4, [r5] - mov r10, sp - mov r5, r9 - ldrb r4, [r5, 0xB] - movs r7, 0xF - adds r5, r7, 0 - ands r5, r4 - mov r6, r10 - ldrb r6, [r6, 0x1] - mov r8, r6 - movs r4, 0x10 - negs r4, r4 - mov r6, r8 - ands r4, r6 - orrs r4, r5 - mov r5, r10 - strb r4, [r5, 0x1] - mov r8, sp - mov r6, r9 - ldrb r5, [r6, 0xC] - lsls r5, 4 - ands r4, r7 - orrs r4, r5 - mov r5, r8 - strb r4, [r5, 0x1] - ldrb r5, [r6, 0xD] - movs r6, 0xF - ands r5, r6 - mov r4, r10 - ldrb r4, [r4, 0x2] - mov r8, r4 - movs r4, 0x10 - negs r4, r4 - mov r6, r8 - ands r4, r6 - orrs r4, r5 - mov r5, r10 - strb r4, [r5, 0x2] - mov r8, sp - mov r6, r9 - ldrb r5, [r6, 0xE] - lsls r5, 4 - ands r4, r7 - orrs r4, r5 - mov r5, r8 - strb r4, [r5, 0x2] - ldrb r5, [r6, 0xF] - movs r6, 0xF - ands r5, r6 - mov r4, r10 - ldrb r4, [r4, 0x3] - mov r8, r4 - movs r4, 0x10 - negs r4, r4 - mov r6, r8 - ands r4, r6 - orrs r4, r5 - mov r5, r10 - strb r4, [r5, 0x3] - mov r8, sp - mov r6, r9 - ldrb r5, [r6, 0x10] - lsls r5, 4 - ands r4, r7 - orrs r4, r5 - mov r5, r8 - strb r4, [r5, 0x3] - ldrb r5, [r6, 0x11] - movs r6, 0xF - ands r5, r6 - mov r4, r10 - ldrb r4, [r4, 0x4] - mov r8, r4 - movs r4, 0x10 - negs r4, r4 - mov r6, r8 - ands r4, r6 - orrs r4, r5 - mov r5, r10 - strb r4, [r5, 0x4] - mov r8, sp - mov r6, r9 - ldrb r5, [r6, 0x12] - lsls r5, 4 - ands r4, r7 - orrs r4, r5 - mov r5, r8 - strb r4, [r5, 0x4] - ldrb r4, [r6, 0x13] - movs r6, 0xF - ands r4, r6 - mov r6, r8 - ldrb r5, [r6, 0x5] - movs r6, 0x10 - negs r6, r6 - ands r6, r5 - orrs r6, r4 - str r6, [sp, 0xC] - mov r4, r8 - strb r6, [r4, 0x5] - mov r5, sp - mov r6, r9 - ldrb r4, [r6, 0x14] - lsls r4, 4 - ldr r6, [sp, 0xC] - ands r6, r7 - orrs r6, r4 - strb r6, [r5, 0x5] - mov r7, sp - movs r4, 0x3 - mov r8, r4 - ldrb r0, [r0, 0x14] - mov r5, r8 - ands r0, r5 - ldrb r5, [r7, 0x6] - movs r6, 0x4 - negs r6, r6 - mov r10, r6 - mov r4, r10 - ands r4, r5 - orrs r4, r0 - strb r4, [r7, 0x6] - mov r5, r9 - ldrb r0, [r5, 0x1] - mov r6, r8 - ands r0, r6 - lsls r0, 2 - movs r5, 0xD - negs r5, r5 - ands r5, r4 - orrs r5, r0 - strb r5, [r7, 0x6] - mov r0, r9 - ldrb r4, [r0, 0x2] - ands r4, r6 - lsls r4, 4 - movs r0, 0x31 - negs r0, r0 - ands r0, r5 - orrs r0, r4 - strb r0, [r7, 0x6] - mov r5, sp - mov r6, r9 - ldrb r4, [r6, 0x3] - lsls r4, 6 - movs r6, 0x3F - ands r0, r6 - orrs r0, r4 - strb r0, [r5, 0x6] - mov r4, r9 - ldrb r0, [r4, 0x4] - mov r5, r8 - ands r0, r5 - ldrb r5, [r7, 0x7] - mov r4, r10 - ands r4, r5 - orrs r4, r0 - strb r4, [r7, 0x7] - mov r6, r9 - ldrb r0, [r6, 0x5] - mov r5, r8 - ands r0, r5 - lsls r0, 2 - movs r5, 0xD - negs r5, r5 - ands r5, r4 - orrs r5, r0 - strb r5, [r7, 0x7] - ldrb r4, [r6, 0x6] - mov r6, r8 - ands r4, r6 - lsls r4, 4 - movs r0, 0x31 - negs r0, r0 - ands r0, r5 - orrs r0, r4 - strb r0, [r7, 0x7] - mov r5, sp - mov r6, r9 - ldrb r4, [r6, 0x7] - lsls r4, 6 - movs r6, 0x3F - ands r0, r6 - orrs r0, r4 - strb r0, [r5, 0x7] - mov r8, sp - mov r0, r9 - ldrb r4, [r0, 0x8] - movs r7, 0x3 - adds r0, r7, 0 - ands r0, r4 - mov r4, r8 - ldrb r5, [r4, 0x8] - mov r4, r10 - ands r4, r5 - orrs r4, r0 - mov r5, r8 - strb r4, [r5, 0x8] - mov r6, r9 - ldrb r5, [r6, 0x9] - adds r0, r7, 0 - ands r0, r5 - lsls r0, 2 - movs r5, 0xD - negs r5, r5 - ands r5, r4 - orrs r5, r0 - mov r0, r8 - strb r5, [r0, 0x8] - ldrb r0, [r1] - adds r4, r7, 0 - ands r4, r0 - lsls r4, 4 - movs r0, 0x31 - negs r0, r0 - ands r0, r5 - orrs r0, r4 - mov r4, r8 - strb r0, [r4, 0x8] - mov r5, sp - ldrb r4, [r2] - lsls r4, 6 - movs r6, 0x3F - ands r0, r6 - orrs r0, r4 - strb r0, [r5, 0x8] - ldrb r4, [r3] - adds r0, r7, 0 - ands r0, r4 - ldrb r4, [r5, 0x9] - mov r6, r10 - ands r6, r4 - orrs r6, r0 - mov r10, r6 - strb r6, [r5, 0x9] - ldr r0, [sp, 0x40] - ldrb r4, [r0] - adds r0, r7, 0 - ands r0, r4 - lsls r0, 2 - movs r4, 0xD - negs r4, r4 - ands r6, r4 - orrs r6, r0 - str r6, [sp, 0x10] - strb r6, [r5, 0x9] - mov r4, sp - ldr r5, [sp, 0x44] - ldrb r0, [r5] - adds r6, r7, 0 - ands r6, r0 - lsls r0, r6, 4 - subs r7, 0x34 - ldr r5, [sp, 0x10] - ands r7, r5 - orrs r7, r0 - strb r7, [r4, 0x9] - mov r5, sp - ldrb r0, [r1, 0x4] - movs r6, 0x1 - mov r12, r6 - mov r4, r12 - ands r4, r0 - lsls r4, 6 - movs r0, 0x41 - negs r0, r0 - mov r10, r0 - ands r0, r7 - orrs r0, r4 - strb r0, [r5, 0x9] - ldrb r4, [r2, 0x4] - lsls r4, 7 - movs r5, 0x7F - ands r0, r5 - orrs r0, r4 - mov r4, r8 - strb r0, [r4, 0x9] - ldrb r4, [r3, 0x4] - mov r0, r12 - ands r0, r4 - mov r5, r8 - ldrb r4, [r5, 0xA] - movs r7, 0x2 - negs r7, r7 - adds r5, r7, 0 - ands r5, r4 - orrs r5, r0 - mov r6, r8 - strb r5, [r6, 0xA] - mov r9, sp - ldr r4, [sp, 0x40] - ldrb r0, [r4, 0x4] - mov r4, r12 - ands r4, r0 - lsls r4, 1 - movs r6, 0x3 - negs r6, r6 - mov r8, r6 - mov r0, r8 - ands r0, r5 - orrs r0, r4 - mov r4, r9 - strb r0, [r4, 0xA] - ldr r6, [sp, 0x44] - ldrb r5, [r6, 0x4] - mov r4, r12 - ands r4, r5 - lsls r4, 2 - movs r5, 0x5 - negs r5, r5 - ands r0, r5 - orrs r0, r4 - mov r4, r9 - strb r0, [r4, 0xA] - mov r4, sp - ldrb r1, [r1, 0x8] - mov r0, r12 - ands r0, r1 - lsls r0, 2 - ldrb r1, [r4, 0xB] - ands r5, r1 - orrs r5, r0 - strb r5, [r4, 0xB] - ldrb r1, [r2, 0x8] - mov r0, r12 - ands r0, r1 - lsls r0, 3 - movs r1, 0x9 - negs r1, r1 - ands r1, r5 - orrs r1, r0 - strb r1, [r4, 0xB] - ldrb r2, [r3, 0x8] - mov r0, r12 - ands r0, r2 - lsls r0, 4 - movs r2, 0x11 - negs r2, r2 - ands r2, r1 - orrs r2, r0 - strb r2, [r4, 0xB] - mov r3, sp - ldr r5, [sp, 0x40] - ldrb r0, [r5, 0x8] - mov r1, r12 - ands r1, r0 - lsls r1, 5 - movs r0, 0x21 - negs r0, r0 - ands r0, r2 - orrs r0, r1 - strb r0, [r3, 0xB] - mov r2, sp - ldrb r1, [r6, 0x8] - mov r6, r12 - ands r6, r1 - lsls r1, r6, 6 - mov r3, r10 - ands r0, r3 - orrs r0, r1 - strb r0, [r2, 0xB] - ldr r4, [sp, 0x1C] - lsrs r3, r4, 21 - ldrb r1, [r2, 0xA] - movs r0, 0x7 - ands r0, r1 - orrs r0, r3 - strb r0, [r2, 0xA] - mov r1, sp - ldr r5, [sp, 0x4C] - movs r6, 0x1 - ands r5, r6 - lsls r2, r5, 1 - ldrb r0, [r1, 0xB] - mov r3, r8 - ands r3, r0 - orrs r3, r2 - mov r8, r3 - strb r3, [r1, 0xB] - mov r0, sp - ldr r4, [sp, 0x50] - ands r4, r6 - mov r5, r8 - ands r5, r7 - orrs r5, r4 - strb r5, [r0, 0xB] - bl sub_800FE50 - add sp, 0x20 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_8027E30 - - thumb_func_start sub_8028164 -sub_8028164: @ 8028164 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - adds r7, r1, 0 - adds r5, r2, 0 - adds r6, r3, 0 - ldr r0, [sp, 0x1C] - mov r12, r0 - ldr r1, [sp, 0x20] - mov r8, r1 - ldr r0, [sp, 0x24] - mov r9, r0 - adds r2, r7, 0 - adds r2, 0x14 - ldr r4, =gRecvCmds - ldrh r0, [r4] - movs r1, 0xFF - lsls r1, 8 - ands r1, r0 - movs r0, 0xBC - lsls r0, 6 - cmp r1, r0 - bne _0802819C - adds r3, r4, 0x2 - ldrb r0, [r4, 0x2] - cmp r0, 0x2 - beq _080281A4 -_0802819C: - movs r0, 0 - b _080282DE - .pool -_080281A4: - ldrb r0, [r3, 0x1] - lsls r0, 28 - lsrs r0, 28 - strb r0, [r2, 0xB] - ldrb r0, [r3, 0x1] - lsrs r0, 4 - strb r0, [r2, 0xC] - ldrb r0, [r3, 0x2] - lsls r0, 28 - lsrs r0, 28 - strb r0, [r2, 0xD] - ldrb r0, [r3, 0x2] - lsrs r0, 4 - strb r0, [r2, 0xE] - ldrb r0, [r3, 0x3] - lsls r0, 28 - lsrs r0, 28 - strb r0, [r2, 0xF] - ldrb r0, [r3, 0x3] - lsrs r0, 4 - strb r0, [r2, 0x10] - ldrb r0, [r3, 0x4] - lsls r0, 28 - lsrs r0, 28 - strb r0, [r2, 0x11] - ldrb r0, [r3, 0x4] - lsrs r0, 4 - strb r0, [r2, 0x12] - ldrb r0, [r3, 0x5] - lsls r0, 28 - lsrs r0, 28 - strb r0, [r2, 0x13] - ldrb r0, [r3, 0x5] - lsrs r0, 4 - strb r0, [r2, 0x14] - ldrb r0, [r3, 0x1] - lsls r0, 28 - lsrs r0, 28 - strb r0, [r2, 0x15] - ldrb r0, [r3, 0x6] - lsls r0, 30 - lsrs r0, 30 - strb r0, [r7, 0x14] - ldrb r0, [r3, 0x6] - lsls r0, 28 - lsrs r0, 30 - strb r0, [r2, 0x1] - ldrb r0, [r3, 0x6] - lsls r0, 26 - lsrs r0, 30 - strb r0, [r2, 0x2] - ldrb r0, [r3, 0x6] - lsrs r0, 6 - strb r0, [r2, 0x3] - ldrb r0, [r3, 0x7] - lsls r0, 30 - lsrs r0, 30 - strb r0, [r2, 0x4] - ldrb r0, [r3, 0x7] - lsls r0, 28 - lsrs r0, 30 - strb r0, [r2, 0x5] - ldrb r0, [r3, 0x7] - lsls r0, 26 - lsrs r0, 30 - strb r0, [r2, 0x6] - ldrb r0, [r3, 0x7] - lsrs r0, 6 - strb r0, [r2, 0x7] - ldrb r0, [r3, 0x8] - lsls r0, 30 - lsrs r0, 30 - strb r0, [r2, 0x8] - ldrb r0, [r3, 0x8] - lsls r0, 28 - lsrs r0, 30 - strb r0, [r2, 0x9] - ldrb r0, [r3, 0x6] - lsls r0, 30 - lsrs r0, 30 - strb r0, [r2, 0xA] - ldrb r0, [r3, 0x8] - lsls r0, 26 - lsrs r0, 30 - strb r0, [r5] - ldrb r0, [r3, 0x9] - lsls r0, 25 - lsrs r0, 31 - strb r0, [r5, 0x4] - ldrb r0, [r3, 0xB] - lsls r0, 29 - lsrs r0, 31 - strb r0, [r5, 0x8] - ldrb r0, [r3, 0x8] - lsrs r0, 6 - strb r0, [r6] - ldrb r0, [r3, 0x9] - lsrs r0, 7 - strb r0, [r6, 0x4] - ldrb r0, [r3, 0xB] - lsls r0, 28 - lsrs r0, 31 - strb r0, [r6, 0x8] - ldrb r0, [r3, 0x9] - lsls r0, 30 - lsrs r0, 30 - mov r1, r12 - strb r0, [r1] - ldrb r0, [r3, 0xA] - lsls r0, 31 - lsrs r0, 31 - strb r0, [r1, 0x4] - ldrb r0, [r3, 0xB] - lsls r0, 27 - lsrs r0, 31 - strb r0, [r1, 0x8] - ldrb r0, [r3, 0x9] - lsls r0, 28 - lsrs r0, 30 - mov r1, r8 - strb r0, [r1] - ldrb r0, [r3, 0xA] - lsls r0, 30 - lsrs r0, 31 - strb r0, [r1, 0x4] - ldrb r0, [r3, 0xB] - lsls r0, 26 - lsrs r0, 31 - strb r0, [r1, 0x8] - ldrb r0, [r3, 0x9] - lsls r0, 26 - lsrs r0, 30 - mov r1, r9 - strb r0, [r1] - ldrb r0, [r3, 0xA] - lsls r0, 29 - lsrs r0, 31 - strb r0, [r1, 0x4] - ldrb r0, [r3, 0xB] - lsls r0, 25 - lsrs r0, 31 - strb r0, [r1, 0x8] - ldrb r0, [r3, 0xA] - lsrs r0, 3 - ldr r1, [sp, 0x28] - strb r0, [r1] - ldrb r0, [r3, 0xB] - lsls r0, 30 - lsrs r0, 31 - ldr r1, [sp, 0x2C] - str r0, [r1] - ldrb r0, [r3, 0xB] - lsls r0, 31 - lsrs r0, 31 - ldr r1, [sp, 0x30] - str r0, [r1] - movs r0, 0x1 -_080282DE: - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_8028164 - - thumb_func_start sub_80282EC -sub_80282EC: @ 80282EC - push {lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r0, 24 - ldr r3, =0xffffff00 - ldr r1, [sp] - ands r1, r3 - movs r2, 0x3 - orrs r1, r2 - str r1, [sp] - ldr r1, [sp, 0x4] - ands r1, r3 - orrs r1, r0 - str r1, [sp, 0x4] - mov r0, sp - bl sub_800FE50 - add sp, 0x8 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80282EC - - thumb_func_start sub_8028318 -sub_8028318: @ 8028318 - push {r4,lr} - adds r2, r0, 0 - adds r4, r1, 0 - ldr r3, =gRecvCmds - ldrh r0, [r3] - movs r1, 0xFF - lsls r1, 8 - ands r1, r0 - movs r0, 0xBC - lsls r0, 6 - cmp r1, r0 - bne _0802833C - lsls r0, r2, 4 - adds r1, r3, 0x2 - adds r1, r0, r1 - ldrb r0, [r1] - cmp r0, 0x3 - beq _08028344 -_0802833C: - movs r0, 0 - b _0802834A - .pool -_08028344: - ldrb r0, [r1, 0x4] - strb r0, [r4] - movs r0, 0x1 -_0802834A: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8028318 - - thumb_func_start sub_8028350 -sub_8028350: @ 8028350 - push {lr} - sub sp, 0x8 - ldr r2, =0xffffff00 - ldr r1, [sp] - ands r1, r2 - movs r2, 0x4 - orrs r1, r2 - str r1, [sp] - str r0, [sp, 0x4] - mov r0, sp - bl sub_800FE50 - add sp, 0x8 - pop {r0} - bx r0 - .pool - thumb_func_end sub_8028350 - - thumb_func_start sub_8028374 -sub_8028374: @ 8028374 - push {lr} - adds r2, r0, 0 - ldr r3, =gRecvCmds - ldrh r0, [r3] - movs r1, 0xFF - lsls r1, 8 - ands r1, r0 - movs r0, 0xBC - lsls r0, 6 - cmp r1, r0 - bne _08028396 - lsls r0, r2, 4 - adds r1, r3, 0x2 - adds r1, r0, r1 - ldrb r0, [r1] - cmp r0, 0x4 - beq _080283A0 -_08028396: - movs r0, 0 - b _080283A2 - .pool -_080283A0: - ldr r0, [r1, 0x4] -_080283A2: - pop {r1} - bx r1 - thumb_func_end sub_8028374 - - thumb_func_start sub_80283A8 -sub_80283A8: @ 80283A8 - push {r4,r5,lr} - sub sp, 0x18 - movs r5, 0xC0 - lsls r5, 6 - adds r0, r5, 0 - bl AllocZeroed - adds r4, r0, 0 - ldr r0, =gUnknown_082FB2D8 - ldr r1, [r0, 0x4] - ldr r0, [r0] - str r0, [sp, 0x8] - str r1, [sp, 0xC] - ldr r0, =gUnknown_082FB2E0 - ldr r1, [r0, 0x4] - ldr r0, [r0] - str r0, [sp, 0x10] - str r1, [sp, 0x14] - ldr r0, =gDodrioBerryPkmnGfx - adds r1, r4, 0 - bl LZ77UnCompWram - cmp r4, 0 - beq _080283E8 - str r4, [sp] - str r5, [sp, 0x4] - mov r0, sp - bl LoadSpriteSheet - adds r0, r4, 0 - bl Free -_080283E8: - add r0, sp, 0x8 - bl LoadSpritePalette - add r0, sp, 0x10 - bl LoadSpritePalette - add sp, 0x18 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80283A8 - - thumb_func_start sub_8028408 -sub_8028408: @ 8028408 - push {r4-r6,lr} - mov r6, r8 - push {r6} - sub sp, 0x30 - adds r6, r1, 0 - mov r8, r2 - adds r5, r3, 0 - lsls r6, 24 - lsrs r6, 24 - mov r1, r8 - lsls r1, 24 - lsrs r1, 24 - mov r8, r1 - lsls r5, 24 - lsrs r5, 24 - add r1, sp, 0x18 - movs r3, 0 - strh r3, [r1] - ldrb r2, [r0] - mov r0, sp - adds r0, 0x1A - strh r2, [r0] - ldr r0, =gUnknown_082FB1E0 - str r0, [sp, 0x1C] - ldr r0, =gUnknown_082FB228 - str r0, [sp, 0x20] - str r3, [sp, 0x24] - ldr r0, =gDummySpriteAffineAnimTable - str r0, [sp, 0x28] - ldr r0, =sub_80284A8 - str r0, [sp, 0x2C] - mov r0, sp - movs r2, 0x18 - bl memcpy - movs r0, 0x4 - bl AllocZeroed - ldr r1, =gUnknown_02022C9C - mov r2, r8 - lsls r4, r2, 2 - adds r4, r1 - str r0, [r4] - adds r0, r6, 0 - adds r1, r5, 0 - bl sub_8028F14 - adds r1, r0, 0 - lsls r1, 16 - asrs r1, 16 - mov r0, sp - movs r2, 0x88 - movs r3, 0x3 - bl CreateSprite - ldr r1, [r4] - lsls r0, 24 - lsrs r0, 24 - strh r0, [r1] - movs r0, 0x1 - mov r1, r8 - bl sub_8028654 - add sp, 0x30 - pop {r3} - mov r8, r3 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8028408 - - thumb_func_start sub_80284A8 -sub_80284A8: @ 80284A8 - push {lr} - movs r2, 0x2E - ldrsh r1, [r0, r2] - cmp r1, 0x1 - beq _080284BC - cmp r1, 0x1 - ble _080284C6 - cmp r1, 0x2 - beq _080284C2 - b _080284C6 -_080284BC: - bl sub_802853C - b _080284C6 -_080284C2: - bl sub_80285AC -_080284C6: - pop {r0} - bx r0 - thumb_func_end sub_80284A8 - - thumb_func_start sub_80284CC -sub_80284CC: @ 80284CC - push {lr} - bl GetMultiplayerId - ldr r1, =gUnknown_02022C9C - lsls r0, 24 - lsrs r0, 22 - adds r0, r1 - ldr r0, [r0] - ldrh r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - movs r2, 0 - movs r1, 0x1 - strh r1, [r0, 0x2E] - strh r2, [r0, 0x30] - strh r2, [r0, 0x32] - strh r2, [r0, 0x34] - strh r2, [r0, 0x36] - pop {r0} - bx r0 - .pool - thumb_func_end sub_80284CC - - thumb_func_start sub_8028504 -sub_8028504: @ 8028504 - push {lr} - bl GetMultiplayerId - ldr r1, =gUnknown_02022C9C - lsls r0, 24 - lsrs r0, 22 - adds r0, r1 - ldr r0, [r0] - ldrh r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - movs r2, 0 - movs r1, 0x2 - strh r1, [r0, 0x2E] - strh r2, [r0, 0x30] - strh r2, [r0, 0x32] - strh r2, [r0, 0x34] - strh r2, [r0, 0x36] - pop {r0} - bx r0 - .pool - thumb_func_end sub_8028504 - - thumb_func_start sub_802853C -sub_802853C: @ 802853C - push {r4,lr} - adds r4, r0, 0 - ldrh r0, [r4, 0x30] - adds r0, 0x1 - strh r0, [r4, 0x30] - lsls r0, 16 - asrs r2, r0, 16 - lsrs r0, 31 - adds r0, r2, r0 - asrs r1, r0, 1 - adds r0, r1, 0 - cmp r1, 0 - bge _08028558 - adds r0, r1, 0x3 -_08028558: - asrs r0, 2 - lsls r0, 2 - subs r0, r1, r0 - lsls r0, 24 - lsrs r0, 24 - cmp r2, 0x2 - ble _080285A2 - cmp r0, 0x2 - bgt _0802856E - cmp r0, 0x1 - bge _08028572 -_0802856E: - movs r0, 0x1 - b _08028574 -_08028572: - movs r0, 0xFF -_08028574: - lsls r0, 24 - asrs r0, 24 - ldrh r1, [r4, 0x20] - adds r0, r1 - strh r0, [r4, 0x20] - ldrh r0, [r4, 0x30] - adds r0, 0x1 - strh r0, [r4, 0x30] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x27 - ble _080285A2 - movs r0, 0 - strh r0, [r4, 0x2E] - bl sub_8027650 - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - movs r0, 0 - bl sub_8028F14 - strh r0, [r4, 0x20] -_080285A2: - movs r0, 0 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_802853C - - thumb_func_start sub_80285AC -sub_80285AC: @ 80285AC - push {r4,r5,lr} - adds r5, r0, 0 - ldrh r0, [r5, 0x30] - adds r0, 0x1 - strh r0, [r5, 0x30] - lsls r0, 16 - asrs r0, 16 - movs r1, 0xD - bl __divsi3 - lsls r0, 16 - asrs r1, r0, 16 - adds r0, r1, 0 - cmp r1, 0 - bge _080285CC - adds r0, r1, 0x3 -_080285CC: - asrs r0, 2 - lsls r0, 2 - subs r0, r1, r0 - lsls r0, 24 - lsrs r4, r0, 24 - movs r1, 0x30 - ldrsh r0, [r5, r1] - movs r1, 0xD - bl __modsi3 - lsls r0, 16 - cmp r0, 0 - bne _080285F0 - cmp r4, 0 - beq _080285F0 - movs r0, 0xD4 - bl PlaySE -_080285F0: - movs r1, 0x30 - ldrsh r0, [r5, r1] - cmp r0, 0x67 - ble _080285FE - movs r0, 0 - strh r0, [r5, 0x2E] - movs r4, 0 -_080285FE: - bl GetMultiplayerId - lsls r0, 24 - lsrs r0, 24 - adds r1, r4, 0 - bl sub_80286B4 - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80285AC - - thumb_func_start sub_8028614 -sub_8028614: @ 8028614 - push {r4-r6,lr} - lsls r0, 24 - lsrs r5, r0, 24 - movs r4, 0 - cmp r4, r5 - bcs _08028646 - ldr r6, =gUnknown_02022C9C -_08028622: - lsls r0, r4, 2 - adds r0, r6 - ldr r0, [r0] - ldrh r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - cmp r0, 0 - beq _0802863C - bl DestroySpriteAndFreeResources -_0802863C: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, r5 - bcc _08028622 -_08028646: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8028614 - - thumb_func_start sub_8028654 -sub_8028654: @ 8028654 - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - ldr r3, =gSprites - ldr r2, =gUnknown_02022C9C - lsrs r1, 22 - adds r1, r2 - ldr r1, [r1] - ldrh r1, [r1] - lsls r2, r1, 4 - adds r2, r1 - lsls r2, 2 - adds r2, r3 - adds r2, 0x3E - movs r1, 0x1 - ands r0, r1 - lsls r0, 2 - ldrb r3, [r2] - movs r1, 0x5 - negs r1, r1 - ands r1, r3 - orrs r1, r0 - strb r1, [r2] - bx lr - .pool - thumb_func_end sub_8028654 - - thumb_func_start sub_802868C -sub_802868C: @ 802868C - push {r4-r6,lr} - lsls r0, 24 - lsrs r6, r0, 24 - lsls r1, 24 - lsrs r5, r1, 24 - movs r4, 0 - cmp r4, r5 - bcs _080286AE -_0802869C: - adds r0, r6, 0 - adds r1, r4, 0 - bl sub_8028654 - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, r5 - bcc _0802869C -_080286AE: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_802868C - - thumb_func_start sub_80286B4 -sub_80286B4: @ 80286B4 - push {lr} - lsls r0, 24 - lsls r1, 24 - lsrs r1, 24 - ldr r2, =gUnknown_02022C9C - lsrs r0, 22 - adds r0, r2 - ldr r0, [r0] - ldrh r2, [r0] - lsls r0, r2, 4 - adds r0, r2 - lsls r0, 2 - ldr r2, =gSprites - adds r0, r2 - bl StartSpriteAnim - pop {r0} - bx r0 - .pool - thumb_func_end sub_80286B4 - - thumb_func_start nullsub_15 -nullsub_15: @ 80286E0 - bx lr - thumb_func_end nullsub_15 - - thumb_func_start sub_80286E4 -sub_80286E4: @ 80286E4 - push {r4-r7,lr} - movs r4, 0 - ldr r0, =gSprites - mov r12, r0 - movs r6, 0 - ldr r5, =gUnknown_02022CF4 -_080286F0: - ldr r3, [r5] - lsls r1, r4, 1 - adds r0, r3, 0 - adds r0, 0x2A - adds r0, r1 - ldrh r0, [r0] - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - add r1, r12 - lsls r0, r4, 4 - adds r0, 0x30 - strh r0, [r1, 0x20] - lsls r2, r4, 3 - movs r7, 0x8 - negs r7, r7 - adds r0, r7, 0 - subs r0, r2 - strh r0, [r1, 0x22] - adds r3, 0xC - adds r3, r4 - strb r6, [r3] - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x9 - bls _080286F0 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80286E4 - - thumb_func_start sub_8028734 -sub_8028734: @ 8028734 - push {r4-r6,lr} - sub sp, 0x28 - movs r4, 0xC0 - lsls r4, 1 - adds r0, r4, 0 - bl AllocZeroed - adds r6, r0, 0 - ldr r0, =gUnknown_082FB2E8 - ldr r1, [r0, 0x4] - ldr r0, [r0] - str r0, [sp, 0x20] - str r1, [sp, 0x24] - ldr r0, =gDodrioBerryStatusGfx - adds r1, r6, 0 - bl LZ77UnCompWram - cmp r6, 0 - beq _080287C4 - str r6, [sp, 0x18] - add r5, sp, 0x18 - movs r0, 0x80 - lsls r0, 9 - orrs r0, r4 - str r0, [r5, 0x4] - mov r1, sp - ldr r0, =gUnknown_082FB2F0 - ldm r0!, {r2-r4} - stm r1!, {r2-r4} - ldm r0!, {r2-r4} - stm r1!, {r2-r4} - ldr r4, =gUnknown_02022CF4 - movs r0, 0x40 - bl AllocZeroed - str r0, [r4] - adds r0, r5, 0 - bl LoadSpriteSheet - add r0, sp, 0x20 - bl LoadSpritePalette - movs r4, 0 -_0802878A: - lsls r1, r4, 20 - movs r0, 0xC0 - lsls r0, 14 - adds r1, r0 - asrs r1, 16 - lsls r0, r4, 3 - movs r3, 0x8 - negs r3, r3 - adds r2, r3, 0 - subs r2, r0 - lsls r2, 16 - asrs r2, 16 - mov r0, sp - movs r3, 0 - bl CreateSprite - ldr r1, =gUnknown_02022CF4 - ldr r1, [r1] - lsls r2, r4, 1 - adds r1, 0x2A - adds r1, r2 - lsls r0, 24 - lsrs r0, 24 - strh r0, [r1] - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x9 - bls _0802878A -_080287C4: - adds r0, r6, 0 - bl Free - add sp, 0x28 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8028734 - - thumb_func_start sub_80287E4 -sub_80287E4: @ 80287E4 - push {r4,r5,lr} - movs r4, 0 -_080287E8: - ldr r5, =gUnknown_02022CF4 - ldr r0, [r5] - lsls r1, r4, 1 - adds r0, 0x2A - adds r0, r1 - ldrh r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - cmp r0, 0 - beq _08028806 - bl DestroySpriteAndFreeResources -_08028806: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x9 - bls _080287E8 - ldr r0, [r5] - bl Free - movs r0, 0 - str r0, [r5] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80287E4 - - thumb_func_start sub_8028828 -sub_8028828: @ 8028828 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x4 - movs r3, 0 - movs r6, 0 - ldr r0, =gUnknown_02022CF4 - mov r9, r0 -_0802883A: - mov r7, r9 - ldr r2, [r7] - lsls r5, r6, 1 - adds r0, r2, 0 - adds r0, 0x2A - adds r0, r5 - ldrh r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r4, r0, r1 - adds r0, r2, 0 - adds r0, 0x16 - adds r0, r5 - movs r1, 0x2 - strh r1, [r0] - adds r0, r2, 0 - adds r0, 0xC - adds r2, r0, r6 - ldrb r1, [r2] - cmp r1, 0 - beq _08028870 - movs r7, 0x22 - ldrsh r0, [r4, r7] - cmp r0, 0x8 - beq _080288A6 -_08028870: - movs r3, 0x1 - movs r7, 0x22 - ldrsh r0, [r4, r7] - cmp r0, 0x8 - bne _08028896 - cmp r1, 0 - bne _080288A6 - strb r3, [r2] - mov r1, r9 - ldr r0, [r1] - adds r0, 0x16 - adds r0, r5 - ldr r1, =0x0000fff0 - strh r1, [r0] - movs r0, 0x24 - str r3, [sp] - bl PlaySE - ldr r3, [sp] -_08028896: - mov r7, r9 - ldr r0, [r7] - adds r0, 0x16 - adds r0, r5 - ldrh r0, [r0] - ldrh r1, [r4, 0x22] - adds r0, r1 - strh r0, [r4, 0x22] -_080288A6: - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 - cmp r6, 0x9 - bls _0802883A - cmp r3, 0 - bne _080288C4 - movs r0, 0x1 - b _080288C6 - .pool -_080288C4: - movs r0, 0 -_080288C6: - add sp, 0x4 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_8028828 - - thumb_func_start sub_80288D4 -sub_80288D4: @ 80288D4 - push {r4-r6,lr} - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0xA - bls _08028910 - movs r4, 0 -_080288E0: - ldr r0, =gUnknown_02022CF4 - ldr r0, [r0] - lsls r1, r4, 1 - adds r0, 0x2A - adds r0, r1 - ldrh r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - movs r1, 0x1 - bl StartSpriteAnim - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x9 - bls _080288E0 - b _080289DA - .pool -_08028910: - movs r4, 0 - movs r0, 0xA - subs r0, r5 - cmp r4, r0 - bge _080289D6 - ldr r6, =gSprites -_0802891C: - cmp r5, 0x6 - bls _08028984 - ldr r0, =gUnknown_02022CF4 - ldr r2, [r0] - ldr r1, =0x0000fffa - adds r0, r1, 0 - ldrh r1, [r2, 0x3E] - adds r0, r1 - adds r0, r5 - movs r1, 0 - strh r0, [r2, 0x3E] - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0x1E - bls _0802894C - strh r1, [r2, 0x3E] - b _0802899E - .pool -_0802894C: - cmp r0, 0xA - bls _0802896A - lsls r1, r4, 1 - adds r0, r2, 0 - adds r0, 0x2A - adds r0, r1 - ldrh r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r6 - movs r1, 0x2 - bl StartSpriteAnim - b _0802899E -_0802896A: - lsls r1, r4, 1 - adds r0, r2, 0 - adds r0, 0x2A - adds r0, r1 - ldrh r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r6 - movs r1, 0 - bl StartSpriteAnim - b _0802899E -_08028984: - ldr r0, =gUnknown_02022CF4 - ldr r0, [r0] - lsls r1, r4, 1 - adds r0, 0x2A - adds r0, r1 - ldrh r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r6 - movs r1, 0 - bl StartSpriteAnim -_0802899E: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - movs r0, 0xA - subs r0, r5 - cmp r4, r0 - blt _0802891C - b _080289D6 - .pool -_080289B4: - ldr r0, =gUnknown_02022CF4 - ldr r0, [r0] - lsls r1, r4, 1 - adds r0, 0x2A - adds r0, r1 - ldrh r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - movs r1, 0x1 - bl StartSpriteAnim - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 -_080289D6: - cmp r4, 0x9 - bls _080289B4 -_080289DA: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80288D4 - - thumb_func_start sub_80289E8 -sub_80289E8: @ 80289E8 - push {r4-r7,lr} - lsls r0, 24 - lsrs r0, 24 - movs r3, 0 - ldr r7, =gSprites - movs r1, 0x1 - ands r0, r1 - lsls r4, r0, 2 - movs r6, 0x5 - negs r6, r6 - ldr r5, =gUnknown_02022CF4 -_080289FE: - ldr r0, [r5] - lsls r1, r3, 1 - adds r0, 0x2A - adds r0, r1 - ldrh r0, [r0] - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r7 - adds r1, 0x3E - ldrb r2, [r1] - adds r0, r6, 0 - ands r0, r2 - orrs r0, r4 - strb r0, [r1] - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0x9 - bls _080289FE - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80289E8 - - thumb_func_start sub_8028A34 -sub_8028A34: @ 8028A34 - push {r4,r5,lr} - sub sp, 0x10 - movs r5, 0x90 - lsls r5, 3 - adds r0, r5, 0 - bl AllocZeroed - adds r4, r0, 0 - ldr r0, =gUnknown_082FB314 - ldr r1, [r0, 0x4] - ldr r0, [r0] - str r0, [sp, 0x8] - str r1, [sp, 0xC] - ldr r0, =gDodrioBerrySpritesGfx - adds r1, r4, 0 - bl LZ77UnCompWram - cmp r4, 0 - beq _08028A6A - str r4, [sp] - movs r0, 0x80 - lsls r0, 10 - orrs r0, r5 - str r0, [sp, 0x4] - mov r0, sp - bl LoadSpriteSheet -_08028A6A: - add r0, sp, 0x8 - bl LoadSpritePalette - adds r0, r4, 0 - bl Free - add sp, 0x10 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8028A34 - - thumb_func_start sub_8028A88 -sub_8028A88: @ 8028A88 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x30 - mov r1, sp - ldr r0, =gUnknown_082FB324 - ldm r0!, {r2-r4} - stm r1!, {r2-r4} - ldm r0!, {r2,r3,r5} - stm r1!, {r2,r3,r5} - add r2, sp, 0x18 - adds r1, r2, 0 - ldr r0, =gUnknown_082FB33C - ldm r0!, {r3-r5} - stm r1!, {r3-r5} - ldm r0!, {r3-r5} - stm r1!, {r3-r5} - movs r5, 0 - mov r9, r2 -_08028AB0: - movs r0, 0x4 - bl AllocZeroed - ldr r1, =gUnknown_02022CB8 - lsls r4, r5, 2 - adds r4, r1 - str r0, [r4] - lsls r0, r5, 3 - lsls r1, r5, 4 - adds r1, r0 - mov r0, sp - movs r2, 0x8 - movs r3, 0x1 - bl CreateSprite - ldr r1, [r4] - lsls r0, 24 - lsrs r0, 24 - strh r0, [r1] - adds r0, r5, 0 - movs r1, 0x1 - bl sub_8028BF8 - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0xA - bls _08028AB0 - movs r5, 0 - ldr r7, =gUnknown_02022CE4 - ldr r4, =gUnknown_082FB31C - mov r8, r4 -_08028AF0: - movs r0, 0x4 - bl AllocZeroed - lsls r1, r5, 2 - adds r4, r1, r7 - str r0, [r4] - adds r6, r1, 0 - cmp r5, 0x3 - bne _08028B2C - mov r0, r8 - movs r2, 0x6 - ldrsh r1, [r0, r2] - mov r0, r9 - movs r2, 0x31 - movs r3, 0 - bl CreateSprite - ldr r1, [r7, 0xC] - b _08028B40 - .pool -_08028B2C: - lsls r0, r5, 1 - add r0, r8 - movs r3, 0 - ldrsh r1, [r0, r3] - mov r0, r9 - movs r2, 0x34 - movs r3, 0 - bl CreateSprite - ldr r1, [r4] -_08028B40: - lsls r0, 24 - lsrs r0, 24 - strh r0, [r1] - adds r0, r6, r7 - ldr r0, [r0] - ldrh r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - adds r1, r5, 0 - bl StartSpriteAnim - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0x3 - bls _08028AF0 - movs r0, 0x1 - bl sub_8028C30 - add sp, 0x30 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8028A88 - - thumb_func_start sub_8028B80 -sub_8028B80: @ 8028B80 - push {r4-r6,lr} - movs r5, 0 - ldr r6, =gUnknown_02022CB8 -_08028B86: - lsls r0, r5, 2 - adds r4, r0, r6 - ldr r0, [r4] - ldrh r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - cmp r0, 0 - beq _08028BA0 - bl DestroySprite -_08028BA0: - ldr r0, [r4] - bl Free - movs r0, 0 - str r0, [r4] - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0xA - bls _08028B86 - movs r5, 0 - ldr r6, =gUnknown_02022CE4 -_08028BB8: - lsls r0, r5, 2 - adds r4, r0, r6 - ldr r0, [r4] - ldrh r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - cmp r0, 0 - beq _08028BD2 - bl DestroySprite -_08028BD2: - ldr r0, [r4] - bl Free - movs r0, 0 - str r0, [r4] - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0x3 - bls _08028BB8 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8028B80 - - thumb_func_start sub_8028BF8 -sub_8028BF8: @ 8028BF8 - lsls r0, 24 - lsls r1, 24 - lsrs r1, 24 - ldr r3, =gSprites - ldr r2, =gUnknown_02022CB8 - lsrs r0, 22 - adds r0, r2 - ldr r0, [r0] - ldrh r0, [r0] - lsls r2, r0, 4 - adds r2, r0 - lsls r2, 2 - adds r2, r3 - adds r2, 0x3E - movs r0, 0x1 - ands r1, r0 - lsls r1, 2 - ldrb r3, [r2] - movs r0, 0x5 - negs r0, r0 - ands r0, r3 - orrs r0, r1 - strb r0, [r2] - bx lr - .pool - thumb_func_end sub_8028BF8 - - thumb_func_start sub_8028C30 -sub_8028C30: @ 8028C30 - push {r4-r7,lr} - lsls r0, 24 - lsrs r0, 24 - movs r3, 0 - ldr r7, =gSprites - ldr r6, =gUnknown_02022CE4 - movs r1, 0x1 - ands r0, r1 - lsls r4, r0, 2 - movs r5, 0x5 - negs r5, r5 -_08028C46: - lsls r0, r3, 2 - adds r0, r6 - ldr r0, [r0] - ldrh r0, [r0] - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r7 - adds r1, 0x3E - ldrb r2, [r1] - adds r0, r5, 0 - ands r0, r2 - orrs r0, r4 - strb r0, [r1] - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0x3 - bls _08028C46 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8028C30 - - thumb_func_start sub_8028C7C -sub_8028C7C: @ 8028C7C - lsls r0, 24 - lsls r1, 24 - ldr r3, =gSprites - ldr r2, =gUnknown_02022CB8 - lsrs r0, 22 - adds r0, r2 - ldr r0, [r0] - ldrh r2, [r0] - lsls r0, r2, 4 - adds r0, r2 - lsls r0, 2 - adds r0, r3 - lsrs r1, 21 - strh r1, [r0, 0x22] - bx lr - .pool - thumb_func_end sub_8028C7C - - thumb_func_start sub_8028CA4 -sub_8028CA4: @ 8028CA4 - push {lr} - lsls r0, 16 - lsls r1, 24 - lsrs r1, 24 - ldr r2, =gUnknown_02022CB8 - lsrs r0, 14 - adds r0, r2 - ldr r0, [r0] - ldrh r2, [r0] - lsls r0, r2, 4 - adds r0, r2 - lsls r0, 2 - ldr r2, =gSprites - adds r0, r2 - bl StartSpriteAnim - pop {r0} - bx r0 - .pool - thumb_func_end sub_8028CA4 - - thumb_func_start sub_8028CD0 -sub_8028CD0: @ 8028CD0 - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gSprites - lsls r2, r0, 4 - adds r2, r0 - lsls r2, 2 - adds r2, r1 - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 2 - adds r1, 0x32 - strh r1, [r2, 0x20] - movs r0, 0x32 - strh r0, [r2, 0x22] - bx lr - .pool - thumb_func_end sub_8028CD0 - - thumb_func_start sub_8028CF4 -sub_8028CF4: @ 8028CF4 - push {r4-r7,lr} - adds r4, r0, 0 - adds r0, 0x42 - movs r1, 0 - ldrsh r0, [r0, r1] - cmp r0, 0x1 - beq _08028D36 - movs r3, 0 - ldr r7, =gUnknown_082FB354 - ldr r6, =gUnknown_02022CB0 - movs r5, 0 -_08028D0A: - lsls r0, r3, 2 - adds r2, r0, r6 - ldr r1, [r2] - ldrh r0, [r1, 0x2] - adds r0, 0x1 - strh r0, [r1, 0x2] - adds r1, r3, r7 - lsls r0, 16 - lsrs r0, 16 - ldrb r1, [r1] - cmp r0, r1 - bls _08028D2C - ldrh r0, [r4, 0x20] - subs r0, 0x1 - strh r0, [r4, 0x20] - ldr r0, [r2] - strh r5, [r0, 0x2] -_08028D2C: - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0x1 - bls _08028D0A -_08028D36: - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8028CF4 - - thumb_func_start sub_8028D44 -sub_8028D44: @ 8028D44 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x28 - movs r4, 0x80 - lsls r4, 3 - adds r0, r4, 0 - bl AllocZeroed - adds r6, r0, 0 - ldr r0, =gUnknown_082FB360 - ldr r1, [r0, 0x4] - ldr r0, [r0] - str r0, [sp, 0x20] - str r1, [sp, 0x24] - ldr r0, =gDodrioBerryPlatformGfx - adds r1, r6, 0 - bl LZ77UnCompWram - cmp r6, 0 - beq _08028DD2 - str r6, [sp, 0x18] - add r0, sp, 0x18 - movs r1, 0xA0 - lsls r1, 11 - orrs r1, r4 - str r1, [r0, 0x4] - mov r2, sp - ldr r1, =gUnknown_082FB368 - ldm r1!, {r3-r5} - stm r2!, {r3-r5} - ldm r1!, {r3-r5} - stm r2!, {r3-r5} - bl LoadSpriteSheet - add r0, sp, 0x20 - bl LoadSpritePalette - movs r5, 0 - ldr r7, =gUnknown_082FB356 - adds r0, r7, 0x2 - mov r9, r0 - ldr r1, =gUnknown_02022CB0 - mov r8, r1 -_08028D9E: - movs r0, 0x4 - bl AllocZeroed - lsls r2, r5, 2 - mov r3, r8 - adds r4, r2, r3 - str r0, [r4] - adds r0, r2, r7 - movs r3, 0 - ldrsh r1, [r0, r3] - add r2, r9 - movs r0, 0 - ldrsh r2, [r2, r0] - mov r0, sp - movs r3, 0x4 - bl CreateSprite - ldr r1, [r4] - lsls r0, 24 - lsrs r0, 24 - strh r0, [r1] - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0x1 - bls _08028D9E -_08028DD2: - adds r0, r6, 0 - bl Free - add sp, 0x28 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8028D44 - - thumb_func_start sub_8028DFC -sub_8028DFC: @ 8028DFC - push {r4-r7,lr} - movs r3, 0 - ldr r0, =gUnknown_02022CB0 - mov r12, r0 - ldr r4, =gUnknown_082FB356 - adds r7, r4, 0x2 - ldr r6, =gSprites - movs r5, 0x1 -_08028E0C: - lsls r2, r3, 2 - mov r1, r12 - adds r0, r2, r1 - ldr r0, [r0] - ldrh r0, [r0] - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r6 - adds r0, r1, 0 - adds r0, 0x42 - strh r5, [r0] - adds r0, r2, r4 - ldrh r0, [r0] - strh r0, [r1, 0x20] - adds r2, r7 - ldrh r0, [r2] - strh r0, [r1, 0x22] - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0x1 - bls _08028E0C - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8028DFC - - thumb_func_start sub_8028E4C -sub_8028E4C: @ 8028E4C - push {r4,r5,lr} - movs r2, 0 - ldr r5, =gUnknown_02022CB0 - ldr r4, =gSprites - movs r3, 0 -_08028E56: - lsls r0, r2, 2 - adds r0, r5 - ldr r0, [r0] - ldrh r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - adds r0, 0x42 - strh r3, [r0] - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0x1 - bls _08028E56 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8028E4C - - thumb_func_start sub_8028E84 -sub_8028E84: @ 8028E84 - push {r4-r6,lr} - movs r5, 0 - ldr r6, =gUnknown_02022CB0 -_08028E8A: - lsls r0, r5, 2 - adds r4, r0, r6 - ldr r0, [r4] - ldrh r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - cmp r0, 0 - beq _08028EA4 - bl DestroySprite -_08028EA4: - ldr r0, [r4] - bl Free - movs r0, 0 - str r0, [r4] - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0x1 - bls _08028E8A - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8028E84 - - thumb_func_start sub_8028EC8 -sub_8028EC8: @ 8028EC8 - push {r4-r7,lr} - lsls r0, 24 - lsrs r0, 24 - movs r3, 0 - ldr r7, =gSprites - ldr r6, =gUnknown_02022CB0 - movs r1, 0x1 - ands r0, r1 - lsls r4, r0, 2 - movs r5, 0x5 - negs r5, r5 -_08028EDE: - lsls r0, r3, 2 - adds r0, r6 - ldr r0, [r0] - ldrh r0, [r0] - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r7 - adds r1, 0x3E - ldrb r2, [r1] - adds r0, r5, 0 - ands r0, r2 - orrs r0, r4 - strb r0, [r1] - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0x1 - bls _08028EDE - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8028EC8 - - thumb_func_start sub_8028F14 -sub_8028F14: @ 8028F14 - push {lr} - lsls r0, 24 - lsrs r2, r0, 24 - lsls r1, 24 - lsrs r1, 24 - movs r3, 0 - subs r0, r1, 0x1 - cmp r0, 0x4 - bhi _08028FC6 - lsls r0, 2 - ldr r1, =_08028F34 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08028F34: - .4byte _08028FB4 - .4byte _08028F48 - .4byte _08028F52 - .4byte _08028F66 - .4byte _08028F8E -_08028F48: - cmp r2, 0 - beq _08028F7E - cmp r2, 0x1 - bne _08028FC6 - b _08028F82 -_08028F52: - cmp r2, 0x1 - beq _08028FB8 - cmp r2, 0x1 - bgt _08028F60 - cmp r2, 0 - beq _08028FB4 - b _08028FC6 -_08028F60: - cmp r2, 0x2 - bne _08028FC6 - b _08028FC4 -_08028F66: - cmp r2, 0x1 - beq _08028F82 - cmp r2, 0x1 - bgt _08028F74 - cmp r2, 0 - beq _08028F7E - b _08028FC6 -_08028F74: - cmp r2, 0x2 - beq _08028F86 - cmp r2, 0x3 - beq _08028F8A - b _08028FC6 -_08028F7E: - movs r3, 0xC - b _08028FC6 -_08028F82: - movs r3, 0x12 - b _08028FC6 -_08028F86: - movs r3, 0x18 - b _08028FC6 -_08028F8A: - movs r3, 0x6 - b _08028FC6 -_08028F8E: - cmp r2, 0x4 - bhi _08028FC6 - lsls r0, r2, 2 - ldr r1, =_08028FA0 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08028FA0: - .4byte _08028FB4 - .4byte _08028FB8 - .4byte _08028FBC - .4byte _08028FC0 - .4byte _08028FC4 -_08028FB4: - movs r3, 0xF - b _08028FC6 -_08028FB8: - movs r3, 0x15 - b _08028FC6 -_08028FBC: - movs r3, 0x1B - b _08028FC6 -_08028FC0: - movs r3, 0x3 - b _08028FC6 -_08028FC4: - movs r3, 0x9 -_08028FC6: - lsls r0, r3, 3 - pop {r1} - bx r1 - thumb_func_end sub_8028F14 - - thumb_func_start sub_8028FCC -sub_8028FCC: @ 8028FCC - push {r4,lr} - movs r4, 0 -_08028FD0: - adds r0, r4, 0 - movs r1, 0x1 - bl sub_8028BF8 - adds r0, r4, 0 - movs r1, 0x1 - bl sub_8028C7C - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0xA - bls _08028FD0 - movs r0, 0 - bl sub_80289E8 - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_8028FCC - - thumb_func_start sub_8028FF8 -sub_8028FF8: @ 8028FF8 - push {r4,lr} - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - adds r0, r4, 0 - bl GetWindowFrameTilesPal - ldr r1, [r0] - movs r2, 0x90 - lsls r2, 1 - movs r0, 0 - movs r3, 0x1 - bl LoadBgTiles - adds r0, r4, 0 - bl GetWindowFrameTilesPal - ldr r0, [r0, 0x4] - movs r1, 0xA0 - movs r2, 0x20 - bl LoadPalette - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_8028FF8 - - thumb_func_start sub_802902C -sub_802902C: @ 802902C - push {lr} - movs r0, 0 - movs r1, 0xA - movs r2, 0xB0 - bl LoadUserWindowBorderGfx_ - pop {r0} - bx r0 - thumb_func_end sub_802902C - - thumb_func_start sub_802903C -sub_802903C: @ 802903C - ldr r3, =gUnknown_02022CF8 - ldr r0, [r3] - movs r2, 0xC0 - lsls r2, 6 - adds r1, r0, r2 - movs r2, 0 - str r2, [r1] - ldr r1, =0x00003014 - adds r0, r1 - strb r2, [r0] - ldr r0, [r3] - adds r1, 0x4 - adds r0, r1 - strb r2, [r0] - ldr r0, [r3] - adds r1, 0x8 - adds r0, r1 - strb r2, [r0] - ldr r0, [r3] - adds r1, 0x4 - adds r0, r1 - strb r2, [r0] - bx lr - .pool - thumb_func_end sub_802903C - - thumb_func_start sub_8029074 -sub_8029074: @ 8029074 - push {r4-r6,lr} - sub sp, 0xC - adds r4, r0, 0 - movs r6, 0xA - ldrb r2, [r4, 0x1] - subs r2, 0x1 - lsls r2, 24 - lsrs r2, 24 - ldrb r3, [r4, 0x2] - subs r3, 0x1 - lsls r3, 24 - lsrs r3, 24 - movs r5, 0x1 - str r5, [sp] - str r5, [sp, 0x4] - str r6, [sp, 0x8] - movs r0, 0 - movs r1, 0x1 - bl FillBgTilemapBufferRect - ldrb r2, [r4, 0x1] - ldrb r3, [r4, 0x2] - subs r3, 0x1 - lsls r3, 24 - lsrs r3, 24 - ldrb r0, [r4, 0x3] - str r0, [sp] - str r5, [sp, 0x4] - str r6, [sp, 0x8] - movs r0, 0 - movs r1, 0x2 - bl FillBgTilemapBufferRect - ldrb r2, [r4, 0x3] - ldrb r0, [r4, 0x1] - adds r2, r0 - lsls r2, 24 - lsrs r2, 24 - ldrb r3, [r4, 0x2] - subs r3, 0x1 - lsls r3, 24 - lsrs r3, 24 - str r5, [sp] - str r5, [sp, 0x4] - str r6, [sp, 0x8] - movs r0, 0 - movs r1, 0x3 - bl FillBgTilemapBufferRect - ldrb r2, [r4, 0x1] - subs r2, 0x1 - lsls r2, 24 - lsrs r2, 24 - ldrb r3, [r4, 0x2] - str r5, [sp] - ldrb r0, [r4, 0x4] - str r0, [sp, 0x4] - str r6, [sp, 0x8] - movs r0, 0 - movs r1, 0x4 - bl FillBgTilemapBufferRect - ldrb r2, [r4, 0x3] - ldrb r0, [r4, 0x1] - adds r2, r0 - lsls r2, 24 - lsrs r2, 24 - ldrb r3, [r4, 0x2] - str r5, [sp] - ldrb r0, [r4, 0x4] - str r0, [sp, 0x4] - str r6, [sp, 0x8] - movs r0, 0 - movs r1, 0x6 - bl FillBgTilemapBufferRect - ldrb r2, [r4, 0x1] - subs r2, 0x1 - lsls r2, 24 - lsrs r2, 24 - ldrb r3, [r4, 0x4] - ldrb r0, [r4, 0x2] - adds r3, r0 - lsls r3, 24 - lsrs r3, 24 - str r5, [sp] - str r5, [sp, 0x4] - str r6, [sp, 0x8] - movs r0, 0 - movs r1, 0x7 - bl FillBgTilemapBufferRect - ldrb r2, [r4, 0x1] - ldrb r3, [r4, 0x4] - ldrb r0, [r4, 0x2] - adds r3, r0 - lsls r3, 24 - lsrs r3, 24 - ldrb r0, [r4, 0x3] - str r0, [sp] - str r5, [sp, 0x4] - str r6, [sp, 0x8] - movs r0, 0 - movs r1, 0x8 - bl FillBgTilemapBufferRect - ldrb r2, [r4, 0x3] - ldrb r0, [r4, 0x1] - adds r2, r0 - lsls r2, 24 - lsrs r2, 24 - ldrb r3, [r4, 0x4] - ldrb r4, [r4, 0x2] - adds r3, r4 - lsls r3, 24 - lsrs r3, 24 - str r5, [sp] - str r5, [sp, 0x4] - str r6, [sp, 0x8] - movs r0, 0 - movs r1, 0x9 - bl FillBgTilemapBufferRect - add sp, 0xC - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_8029074 - - thumb_func_start sub_8029174 -sub_8029174: @ 8029174 - push {r4-r6,lr} - sub sp, 0xC - adds r4, r0, 0 - movs r6, 0xB - ldrb r2, [r4, 0x1] - subs r2, 0x1 - lsls r2, 24 - lsrs r2, 24 - ldrb r3, [r4, 0x2] - subs r3, 0x1 - lsls r3, 24 - lsrs r3, 24 - movs r5, 0x1 - str r5, [sp] - str r5, [sp, 0x4] - str r6, [sp, 0x8] - movs r0, 0 - movs r1, 0xA - bl FillBgTilemapBufferRect - ldrb r2, [r4, 0x1] - ldrb r3, [r4, 0x2] - subs r3, 0x1 - lsls r3, 24 - lsrs r3, 24 - ldrb r0, [r4, 0x3] - str r0, [sp] - str r5, [sp, 0x4] - str r6, [sp, 0x8] - movs r0, 0 - movs r1, 0xB - bl FillBgTilemapBufferRect - ldrb r2, [r4, 0x3] - ldrb r0, [r4, 0x1] - adds r2, r0 - lsls r2, 24 - lsrs r2, 24 - ldrb r3, [r4, 0x2] - subs r3, 0x1 - lsls r3, 24 - lsrs r3, 24 - str r5, [sp] - str r5, [sp, 0x4] - str r6, [sp, 0x8] - movs r0, 0 - movs r1, 0xC - bl FillBgTilemapBufferRect - ldrb r2, [r4, 0x1] - subs r2, 0x1 - lsls r2, 24 - lsrs r2, 24 - ldrb r3, [r4, 0x2] - str r5, [sp] - ldrb r0, [r4, 0x4] - str r0, [sp, 0x4] - str r6, [sp, 0x8] - movs r0, 0 - movs r1, 0xD - bl FillBgTilemapBufferRect - ldrb r2, [r4, 0x3] - ldrb r0, [r4, 0x1] - adds r2, r0 - lsls r2, 24 - lsrs r2, 24 - ldrb r3, [r4, 0x2] - str r5, [sp] - ldrb r0, [r4, 0x4] - str r0, [sp, 0x4] - str r6, [sp, 0x8] - movs r0, 0 - movs r1, 0xF - bl FillBgTilemapBufferRect - ldrb r2, [r4, 0x1] - subs r2, 0x1 - lsls r2, 24 - lsrs r2, 24 - ldrb r3, [r4, 0x4] - ldrb r0, [r4, 0x2] - adds r3, r0 - lsls r3, 24 - lsrs r3, 24 - str r5, [sp] - str r5, [sp, 0x4] - str r6, [sp, 0x8] - movs r0, 0 - movs r1, 0x10 - bl FillBgTilemapBufferRect - ldrb r2, [r4, 0x1] - ldrb r3, [r4, 0x4] - ldrb r0, [r4, 0x2] - adds r3, r0 - lsls r3, 24 - lsrs r3, 24 - ldrb r0, [r4, 0x3] - str r0, [sp] - str r5, [sp, 0x4] - str r6, [sp, 0x8] - movs r0, 0 - movs r1, 0x11 - bl FillBgTilemapBufferRect - ldrb r2, [r4, 0x3] - ldrb r0, [r4, 0x1] - adds r2, r0 - lsls r2, 24 - lsrs r2, 24 - ldrb r3, [r4, 0x4] - ldrb r4, [r4, 0x2] - adds r3, r4 - lsls r3, 24 - lsrs r3, 24 - str r5, [sp] - str r5, [sp, 0x4] - str r6, [sp, 0x8] - movs r0, 0 - movs r1, 0x12 - bl FillBgTilemapBufferRect - add sp, 0xC - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_8029174 - - thumb_func_start sub_8029274 -sub_8029274: @ 8029274 - push {r4,lr} - ldr r4, =gUnknown_02022CF8 - str r0, [r4] - movs r2, 0xC0 - lsls r2, 6 - adds r1, r0, r2 - movs r2, 0 - str r2, [r1] - ldr r3, =0x00003014 - adds r1, r0, r3 - strb r2, [r1] - ldr r1, =0x00003018 - adds r0, r1 - strb r2, [r0] - ldr r0, [r4] - adds r3, 0xC - adds r0, r3 - strb r2, [r0] - ldr r0, [r4] - adds r1, 0xC - adds r0, r1 - strb r2, [r0] - ldr r0, =sub_8029314 - movs r1, 0x3 - bl CreateTask - ldr r1, [r4] - ldr r2, =0x00003004 - adds r1, r2 - strb r0, [r1] - ldr r0, =sub_8029338 - bl sub_802A72C - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8029274 - - thumb_func_start sub_80292D4 -sub_80292D4: @ 80292D4 - push {lr} - bl FreeAllWindowBuffers - pop {r0} - bx r0 - thumb_func_end sub_80292D4 - - thumb_func_start sub_80292E0 -sub_80292E0: @ 80292E0 - push {r4-r7,lr} - lsls r0, 24 - lsrs r6, r0, 24 - movs r4, 0 - ldr r5, =gUnknown_082FB40C - adds r7, r5, 0x4 -_080292EC: - lsls r1, r4, 3 - adds r0, r1, r5 - ldrb r0, [r0] - cmp r0, r6 - bne _080292FE - adds r0, r1, r7 - ldr r0, [r0] - bl sub_802A72C -_080292FE: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x9 - bls _080292EC - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80292E0 - - thumb_func_start sub_8029314 -sub_8029314: @ 8029314 - push {lr} - ldr r0, =gUnknown_02022CF8 - ldr r0, [r0] - movs r1, 0xC0 - lsls r1, 6 - adds r0, r1 - ldr r0, [r0] - cmp r0, 0 - bne _0802932E - bl sub_802A75C - bl _call_via_r0 -_0802932E: - pop {r0} - bx r0 - .pool - thumb_func_end sub_8029314 - - thumb_func_start sub_8029338 -sub_8029338: @ 8029338 - push {lr} - ldr r0, =gUnknown_02022CF8 - ldr r1, [r0] - ldr r2, =0x00003014 - adds r0, r1, r2 - ldrb r0, [r0] - cmp r0, 0x4 - bhi _08029430 - lsls r0, 2 - ldr r1, =_08029360 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08029360: - .4byte _08029374 - .4byte _0802937A - .4byte _08029394 - .4byte _080293D8 - .4byte _08029404 -_08029374: - bl sub_802A7A8 - b _08029414 -_0802937A: - bl sub_802A8E8 - cmp r0, 0x1 - bne _0802943A - ldr r0, =gUnknown_02022CF8 - ldr r1, [r0] - ldr r2, =0x00003014 - adds r1, r2 - b _0802941C - .pool -_08029394: - ldr r1, =gDodrioBerryBgTilemap1 - movs r0, 0x3 - movs r2, 0 - movs r3, 0 - bl CopyToBgTilemapBuffer - ldr r1, =gDodrioBerryBgTilemap2Left - movs r0, 0x1 - movs r2, 0 - movs r3, 0 - bl CopyToBgTilemapBuffer - ldr r1, =gDodrioBerryBgTilemap2Right - movs r0, 0x2 - movs r2, 0 - movs r3, 0 - bl CopyToBgTilemapBuffer - movs r0, 0x3 - bl CopyBgTilemapBufferToVram - movs r0, 0x1 - bl CopyBgTilemapBufferToVram - movs r0, 0x2 - bl CopyBgTilemapBufferToVram - b _08029414 - .pool -_080293D8: - movs r0, 0 - bl ShowBg - movs r0, 0x3 - bl ShowBg - movs r0, 0x1 - bl ShowBg - movs r0, 0x2 - bl ShowBg - ldr r0, =gUnknown_02022CF8 - ldr r1, [r0] - ldr r2, =0x00003014 - adds r1, r2 - b _0802941C - .pool -_08029404: - ldr r0, =gSaveBlock2Ptr - ldr r0, [r0] - ldrb r0, [r0, 0x14] - lsrs r0, 3 - bl sub_8028FF8 - bl sub_802902C -_08029414: - ldr r0, =gUnknown_02022CF8 - ldr r1, [r0] - ldr r0, =0x00003014 - adds r1, r0 -_0802941C: - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _0802943A - .pool -_08029430: - movs r2, 0xC0 - lsls r2, 6 - adds r1, r2 - movs r0, 0x1 - str r0, [r1] -_0802943A: - pop {r0} - bx r0 - thumb_func_end sub_8029338 - - thumb_func_start sub_8029440 -sub_8029440: @ 8029440 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x1C - ldr r4, =gUnknown_02022CF8 - ldr r0, [r4] - ldr r2, =0x00003014 - adds r1, r0, r2 - ldrb r0, [r1] - cmp r0, 0 - beq _08029488 - cmp r0, 0x1 - bne _08029460 - b _080295EC -_08029460: - adds r0, 0x1 - strb r0, [r1] - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xB4 - bhi _0802946E - b _0802968E -_0802946E: - bl sub_8027650 - lsls r0, 24 - lsrs r7, r0, 24 - movs r6, 0 - cmp r6, r7 - bcc _0802947E - b _08029666 -_0802947E: - b _08029640 - .pool -_08029488: - bl sub_8027650 - lsls r0, 24 - lsrs r7, r0, 24 - ldr r1, =gUnknown_082FB3C8 - subs r0, r7, 0x1 - lsls r0, 2 - adds r0, r1 - ldr r5, [r0] - ldr r2, =0xffffff00 - ldr r0, [sp, 0xC] - ands r0, r2 - ldr r1, =0x00ffffff - ands r0, r1 - movs r1, 0xE0 - lsls r1, 19 - orrs r0, r1 - str r0, [sp, 0xC] - ldr r0, [sp, 0x10] - ands r0, r2 - movs r1, 0x2 - orrs r0, r1 - ldr r1, =0xffff00ff - ands r0, r1 - movs r1, 0xD0 - lsls r1, 4 - orrs r0, r1 - ldr r1, =0x0000ffff - ands r0, r1 - movs r1, 0x98 - lsls r1, 13 - orrs r0, r1 - str r0, [sp, 0x10] - movs r6, 0 - cmp r6, r7 - bcs _080295B8 - mov r3, sp - adds r3, 0xC - str r3, [sp, 0x18] - mov r10, r4 - ldr r0, =0x00003008 - mov r9, r0 -_080294DC: - movs r1, 0 - mov r8, r1 - adds r0, r6, 0 - bl sub_8027A48 - lsls r0, 24 - lsrs r0, 24 - adds r4, r0, 0 - bl sub_8027660 - adds r1, r0, 0 - movs r0, 0x1 - movs r2, 0x1 - negs r2, r2 - bl GetStringWidth - movs r1, 0x38 - subs r1, r0 - lsrs r1, 1 - str r1, [sp, 0x14] - ldrb r0, [r5] - lsls r0, 8 - ldr r2, =0xffff00ff - ldr r1, [sp, 0xC] - ands r1, r2 - orrs r1, r0 - str r1, [sp, 0xC] - ldrb r2, [r5, 0x1] - lsls r2, 16 - ldr r0, =0xff00ffff - ands r0, r1 - orrs r0, r2 - str r0, [sp, 0xC] - add r0, sp, 0xC - bl AddWindow - mov r2, r10 - ldr r1, [r2] - add r1, r9 - adds r1, r6 - strb r0, [r1] - ldr r0, [r2] - add r0, r9 - adds r0, r6 - ldrb r0, [r0] - bl ClearWindowTilemap - mov r3, r10 - ldr r0, [r3] - add r0, r9 - adds r0, r6 - ldrb r0, [r0] - movs r1, 0x11 - bl FillWindowPixelBuffer - bl GetMultiplayerId - lsls r0, 24 - lsrs r0, 24 - cmp r4, r0 - bne _0802955A - movs r0, 0x2 - mov r8, r0 -_0802955A: - adds r0, r4, 0 - bl sub_8027660 - adds r4, r0, 0 - mov r1, r10 - ldr r0, [r1] - add r0, r9 - adds r0, r6 - ldrb r0, [r0] - ldr r3, [sp, 0x14] - lsls r2, r3, 24 - lsrs r2, 24 - mov r3, r8 - lsls r1, r3, 1 - add r1, r8 - ldr r3, =gUnknown_082FB380 - adds r1, r3 - str r1, [sp] - movs r1, 0x1 - negs r1, r1 - str r1, [sp, 0x4] - str r4, [sp, 0x8] - movs r1, 0x1 - movs r3, 0x1 - bl AddTextPrinterParameterized3 - mov r2, r10 - ldr r0, [r2] - add r0, r9 - adds r0, r6 - ldrb r0, [r0] - movs r1, 0x2 - bl CopyWindowToVram - ldr r3, [sp, 0x18] - ldrh r0, [r3, 0x6] - adds r0, 0xE - strh r0, [r3, 0x6] - add r0, sp, 0xC - bl sub_8029174 - adds r5, 0x4 - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 - cmp r6, r7 - bcc _080294DC -_080295B8: - ldr r0, =gUnknown_02022CF8 - ldr r1, [r0] - ldr r0, =0x00003014 - adds r1, r0 - b _0802962A - .pool -_080295EC: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802968E - bl sub_8027650 - lsls r0, 24 - lsrs r7, r0, 24 - movs r6, 0 - cmp r6, r7 - bcs _0802961C -_08029604: - ldr r0, [r4] - ldr r1, =0x00003008 - adds r0, r1 - adds r0, r6 - ldrb r0, [r0] - bl PutWindowTilemap - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 - cmp r6, r7 - bcc _08029604 -_0802961C: - movs r0, 0 - bl CopyBgTilemapBufferToVram - ldr r0, =gUnknown_02022CF8 - ldr r1, [r0] - ldr r2, =0x00003014 - adds r1, r2 -_0802962A: - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _0802968E - .pool -_08029640: - ldr r5, =gUnknown_02022CF8 - ldr r0, [r5] - ldr r4, =0x00003008 - adds r0, r4 - adds r0, r6 - ldrb r0, [r0] - bl ClearWindowTilemap - ldr r0, [r5] - adds r0, r4 - adds r0, r6 - ldrb r0, [r0] - bl RemoveWindow - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 - cmp r6, r7 - bcc _08029640 -_08029666: - movs r0, 0x1E - str r0, [sp] - movs r0, 0x14 - str r0, [sp, 0x4] - movs r0, 0 - movs r1, 0 - movs r2, 0 - movs r3, 0 - bl FillBgTilemapBufferRect_Palette0 - movs r0, 0 - bl CopyBgTilemapBufferToVram - ldr r0, =gUnknown_02022CF8 - ldr r0, [r0] - movs r3, 0xC0 - lsls r3, 6 - adds r0, r3 - movs r1, 0x1 - str r1, [r0] -_0802968E: - add sp, 0x1C - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8029440 - - thumb_func_start sub_80296A8 -sub_80296A8: @ 80296A8 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x6C - lsls r0, 24 - movs r1, 0 - mov r8, r1 - movs r6, 0 - lsrs r7, r0, 24 - add r4, sp, 0x2C - ldr r1, =gUnknown_082FB45C - adds r0, r4, 0 - movs r2, 0x5 - bl memcpy - movs r5, 0 - cmp r5, r7 - bcs _080296F8 - add r4, sp, 0x34 -_080296D2: - mov r0, sp - adds r0, r5 - adds r0, 0x2C - strb r5, [r0] - add r0, sp, 0x5C - adds r1, r5, 0 - bl sub_802793C - lsls r2, r5, 3 - adds r2, r4, r2 - ldr r0, [sp, 0x5C] - ldr r1, [sp, 0x60] - str r0, [r2] - str r1, [r2, 0x4] - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, r7 - bcc _080296D2 -_080296F8: - bl sub_8027748 - cmp r0, 0 - beq _0802972E -_08029700: - movs r5, 0 - cmp r5, r7 - bcs _08029728 - add r2, sp, 0x34 - add r1, sp, 0x2C -_0802970A: - lsls r0, r5, 3 - adds r0, r2, r0 - ldrb r0, [r0] - cmp r0, r8 - bne _0802971E - adds r0, r1, r6 - strb r5, [r0] - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 -_0802971E: - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, r7 - bcc _0802970A -_08029728: - mov r8, r6 - cmp r6, r7 - bcc _08029700 -_0802972E: - movs r5, 0 - ldr r4, =gText_SpacePoints - cmp r5, r7 - bcs _08029754 - add r1, sp, 0x34 - add r6, sp, 0x38 - subs r3, r7, 0x1 -_0802973C: - lsls r2, r5, 3 - adds r0, r6, r2 - ldr r0, [r0] - cmp r0, 0 - bne _0802974A - adds r0, r1, r2 - strb r3, [r0] -_0802974A: - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, r7 - bcc _0802973C -_08029754: - movs r0, 0x1 - adds r1, r4, 0 - movs r2, 0 - bl GetStringWidth - movs r1, 0xD8 - subs r1, r0 - str r1, [sp, 0x64] - movs r5, 0 - cmp r5, r7 - bcs _08029860 - mov r2, sp - adds r2, 0x34 - str r2, [sp, 0x68] - ldr r3, =0x00003009 - mov r10, r3 -_08029774: - movs r0, 0 - mov r8, r0 - mov r0, sp - adds r0, r5 - adds r0, 0x2C - ldrb r0, [r0] - adds r4, r0, 0 - lsls r1, r4, 3 - add r0, sp, 0x38 - adds r0, r1 - ldr r0, [r0] - mov r9, r0 - ldr r2, =gUnknown_02022CF8 - ldr r0, [r2] - add r0, r10 - ldrb r0, [r0] - ldr r2, =gUnknown_082FB3DC - ldr r3, [sp, 0x68] - adds r1, r3, r1 - ldrb r1, [r1] - lsls r1, 2 - adds r1, r2 - ldr r2, [r1] - ldr r3, =gUnknown_082FB402 - lsls r1, r5, 1 - adds r1, r3 - ldrb r6, [r1] - str r6, [sp] - movs r1, 0xFF - str r1, [sp, 0x4] - mov r3, r8 - str r3, [sp, 0x8] - movs r1, 0x1 - movs r3, 0x8 - bl AddTextPrinterParameterized - bl GetMultiplayerId - lsls r0, 24 - lsrs r0, 24 - cmp r4, r0 - bne _080297CC - movs r0, 0x2 - mov r8, r0 -_080297CC: - adds r0, r4, 0 - bl sub_8027660 - adds r3, r0, 0 - ldr r1, =gUnknown_02022CF8 - ldr r0, [r1] - add r0, r10 - ldrb r0, [r0] - mov r2, r8 - lsls r1, r2, 1 - add r1, r8 - ldr r2, =gUnknown_082FB380 - adds r1, r2 - str r1, [sp] - movs r1, 0x1 - negs r1, r1 - str r1, [sp, 0x4] - str r3, [sp, 0x8] - movs r1, 0x1 - movs r2, 0x1C - adds r3, r6, 0 - bl AddTextPrinterParameterized3 - add r0, sp, 0xC - mov r1, r9 - movs r2, 0 - movs r3, 0x7 - bl ConvertIntToDecimalStringN - movs r0, 0x1 - add r1, sp, 0xC - movs r2, 0x1 - negs r2, r2 - bl GetStringWidth - adds r3, r0, 0 - ldr r2, =gUnknown_02022CF8 - ldr r0, [r2] - add r0, r10 - ldrb r0, [r0] - ldr r1, [sp, 0x64] - subs r3, r1, r3 - lsls r3, 24 - lsrs r3, 24 - str r6, [sp] - movs r2, 0xFF - str r2, [sp, 0x4] - movs r1, 0 - str r1, [sp, 0x8] - movs r1, 0x1 - add r2, sp, 0xC - bl AddTextPrinterParameterized - ldr r2, =gUnknown_02022CF8 - ldr r0, [r2] - add r0, r10 - ldrb r0, [r0] - ldr r1, [sp, 0x64] - lsls r3, r1, 24 - str r6, [sp] - movs r2, 0xFF - str r2, [sp, 0x4] - movs r1, 0 - str r1, [sp, 0x8] - movs r1, 0x1 - ldr r2, =gText_SpacePoints - lsrs r3, 24 - bl AddTextPrinterParameterized - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, r7 - bcc _08029774 -_08029860: - add sp, 0x6C - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80296A8 - - thumb_func_start sub_802988C -sub_802988C: @ 802988C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x14 - bl sub_8027650 - lsls r0, 24 - lsrs r0, 24 - str r0, [sp, 0xC] - ldr r6, =gUnknown_02022CF8 - ldr r1, [r6] - ldr r2, =0x00003014 - adds r0, r1, r2 - ldrb r0, [r0] - cmp r0, 0xB - bls _080298B2 - b _08029FA8 -_080298B2: - lsls r0, 2 - ldr r1, =_080298C8 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_080298C8: - .4byte _080298F8 - .4byte _08029914 - .4byte _0802996C - .4byte _08029B6C - .4byte _08029BB8 - .4byte _08029BFC - .4byte _08029C60 - .4byte _08029C9C - .4byte _08029CE0 - .4byte _08029DA0 - .4byte _08029F08 - .4byte _08029F5C -_080298F8: - bl sub_802784C - ldr r0, =gUnknown_02022CF8 - ldr r1, [r0] - ldr r0, =0x0000301c - adds r2, r1, r0 - movs r0, 0 - strh r0, [r2] - b _08029F8A - .pool -_08029914: - ldr r6, =gUnknown_082F7BBC - adds r0, r6, 0 - bl AddWindow - ldr r4, =gUnknown_02022CF8 - ldr r1, [r4] - ldr r2, =0x00003008 - mov r8, r2 - add r1, r8 - strb r0, [r1] - movs r0, 0x8 - adds r0, r6 - mov r9, r0 - bl AddWindow - ldr r1, [r4] - ldr r5, =0x00003009 - adds r1, r5 - strb r0, [r1] - ldr r0, [r4] - add r0, r8 - ldrb r0, [r0] - bl ClearWindowTilemap - ldr r0, [r4] - adds r0, r5 - ldrb r0, [r0] - bl ClearWindowTilemap - adds r0, r6, 0 - bl sub_8029174 - mov r0, r9 - bl sub_8029174 - b _08029F88 - .pool -_0802996C: - ldr r4, =gUnknown_02022CF8 - ldr r0, [r4] - ldr r5, =0x00003008 - adds r0, r5 - ldrb r0, [r0] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r0, [r4] - ldr r1, =0x00003009 - mov r9, r1 - add r0, r9 - ldrb r0, [r0] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r2, =gText_BerryPickingResults - mov r8, r2 - movs r2, 0x1 - negs r2, r2 - movs r0, 0x1 - mov r1, r8 - bl GetStringWidth - adds r1, r0, 0 - movs r0, 0xE0 - subs r0, r1 - lsrs r3, r0, 1 - ldr r0, [r4] - adds r0, r5 - ldrb r0, [r0] - lsls r3, 24 - lsrs r3, 24 - movs r1, 0x1 - str r1, [sp] - movs r6, 0xFF - str r6, [sp, 0x4] - movs r5, 0 - str r5, [sp, 0x8] - mov r2, r8 - bl AddTextPrinterParameterized - ldr r0, [r4] - add r0, r9 - ldrb r0, [r0] - ldr r2, =gText_10P30P50P50P - movs r1, 0x11 - str r1, [sp] - str r6, [sp, 0x4] - str r5, [sp, 0x8] - movs r1, 0x1 - movs r3, 0x44 - bl AddTextPrinterParameterized - mov r9, r5 - ldr r0, [sp, 0xC] - cmp r9, r0 - bcc _080299E2 - b _08029B2A -_080299E2: - movs r4, 0 - bl GetMultiplayerId - lsls r0, 24 - lsrs r0, 24 - cmp r9, r0 - bne _080299F2 - movs r4, 0x2 -_080299F2: - mov r0, r9 - bl sub_8027660 - adds r6, r0, 0 - ldr r0, =gUnknown_02022CF8 - ldr r0, [r0] - ldr r1, =0x00003009 - adds r0, r1 - ldrb r0, [r0] - mov r2, r9 - lsls r5, r2, 1 - ldr r2, =gUnknown_082FB3F8 - adds r1, r5, r2 - ldrb r3, [r1] - lsls r1, r4, 1 - adds r1, r4 - ldr r2, =gUnknown_082FB380 - adds r1, r2 - str r1, [sp] - movs r4, 0x1 - negs r4, r4 - str r4, [sp, 0x4] - str r6, [sp, 0x8] - movs r1, 0x1 - movs r2, 0 - bl AddTextPrinterParameterized3 - movs r7, 0 - mov r8, r5 - mov r0, r9 - adds r0, 0x1 - str r0, [sp, 0x10] - ldr r1, =gStringVar4 - mov r10, r1 -_08029A36: - mov r0, r9 - adds r1, r7, 0 - bl sub_80276A0 - lsls r0, 16 - lsrs r0, 16 - ldr r1, =0x0000270f - bl sub_8027A38 - adds r4, r0, 0 - lsls r4, 16 - lsrs r4, 16 - adds r0, r7, 0 - bl sub_802778C - ldr r1, =0x0000270f - bl sub_8027A38 - lsls r0, 16 - lsrs r6, r0, 16 - mov r0, r10 - adds r1, r4, 0 - movs r2, 0 - movs r3, 0x4 - bl ConvertIntToDecimalStringN - movs r0, 0x1 - mov r1, r10 - movs r2, 0x1 - negs r2, r2 - bl GetStringWidth - adds r5, r0, 0 - cmp r6, r4 - bne _08029AE0 - cmp r6, 0 - beq _08029AE0 - ldr r0, =gUnknown_02022CF8 - ldr r0, [r0] - ldr r2, =0x00003009 - adds r0, r2 - ldrb r0, [r0] - lsls r1, r7, 1 - ldr r2, =gUnknown_082FB3F0 - adds r1, r2 - ldrb r2, [r1] - subs r2, r5 - lsls r2, 24 - lsrs r2, 24 - ldr r1, =gUnknown_082FB3F8 - add r1, r8 - ldrb r3, [r1] - ldr r1, =gUnknown_082FB383 - str r1, [sp] - movs r1, 0x1 - negs r1, r1 - str r1, [sp, 0x4] - mov r1, r10 - str r1, [sp, 0x8] - movs r1, 0x1 - bl AddTextPrinterParameterized3 - b _08029B10 - .pool -_08029AE0: - ldr r0, =gUnknown_02022CF8 - ldr r0, [r0] - ldr r2, =0x00003009 - adds r0, r2 - ldrb r0, [r0] - lsls r1, r7, 1 - ldr r2, =gUnknown_082FB3F0 - adds r1, r2 - ldrb r3, [r1] - subs r3, r5 - lsls r3, 24 - lsrs r3, 24 - ldr r1, =gUnknown_082FB3F8 - add r1, r8 - ldrb r1, [r1] - str r1, [sp] - movs r1, 0xFF - str r1, [sp, 0x4] - movs r1, 0 - str r1, [sp, 0x8] - movs r1, 0x1 - ldr r2, =gStringVar4 - bl AddTextPrinterParameterized -_08029B10: - adds r0, r7, 0x1 - lsls r0, 24 - lsrs r7, r0, 24 - cmp r7, 0x3 - bls _08029A36 - ldr r1, [sp, 0x10] - lsls r0, r1, 24 - lsrs r0, 24 - mov r9, r0 - ldr r2, [sp, 0xC] - cmp r9, r2 - bcs _08029B2A - b _080299E2 -_08029B2A: - ldr r4, =gUnknown_02022CF8 - ldr r0, [r4] - ldr r1, =0x00003008 - adds r0, r1 - ldrb r0, [r0] - movs r1, 0x2 - bl CopyWindowToVram - ldr r0, [r4] - ldr r2, =0x00003009 - adds r0, r2 - ldrb r0, [r0] - movs r1, 0x2 - bl CopyWindowToVram - ldr r1, [r4] - ldr r0, =0x00003014 - adds r1, r0 - b _08029F8E - .pool -_08029B6C: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _08029B90 - ldr r4, =gUnknown_02022CF8 - ldr r0, [r4] - ldr r1, =0x00003008 - adds r0, r1 - ldrb r0, [r0] - bl PutWindowTilemap - ldr r0, [r4] - ldr r2, =0x00003009 - adds r0, r2 - ldrb r0, [r0] - bl PutWindowTilemap -_08029B90: - movs r0, 0 - bl CopyBgTilemapBufferToVram - movs r0, 0 - bl sub_8028C30 - ldr r0, =gUnknown_02022CF8 - ldr r1, [r0] - ldr r0, =0x00003014 - adds r1, r0 - b _08029F8E - .pool -_08029BB8: - ldr r4, =gUnknown_02022CF8 - ldr r0, [r4] - ldr r1, =0x0000301c - adds r2, r0, r1 - ldrh r0, [r2] - adds r0, 0x1 - strh r0, [r2] - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0x1D - bhi _08029BD0 - b _08029FF8 -_08029BD0: - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _08029BDE - b _08029FF8 -_08029BDE: - movs r0, 0 - strh r0, [r2] - movs r0, 0x5 - bl PlaySE - movs r0, 0x1 - bl sub_8028C30 - b _08029F88 - .pool -_08029BFC: - ldr r4, =gUnknown_02022CF8 - ldr r0, [r4] - ldr r5, =0x00003008 - adds r0, r5 - ldrb r0, [r0] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r0, [r4] - ldr r1, =0x00003009 - adds r0, r1 - ldrb r0, [r0] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r6, =gText_AnnouncingRankings - movs r2, 0x1 - negs r2, r2 - movs r0, 0x1 - adds r1, r6, 0 - bl GetStringWidth - adds r1, r0, 0 - movs r0, 0xE0 - subs r0, r1 - lsrs r3, r0, 1 - ldr r0, [r4] - adds r0, r5 - ldrb r0, [r0] - lsls r3, 24 - lsrs r3, 24 - movs r1, 0x1 - str r1, [sp] - movs r1, 0xFF - str r1, [sp, 0x4] - movs r1, 0 - str r1, [sp, 0x8] - movs r1, 0x1 - adds r2, r6, 0 - bl AddTextPrinterParameterized - b _08029F88 - .pool -_08029C60: - ldr r0, [sp, 0xC] - bl sub_80296A8 - ldr r4, =gUnknown_02022CF8 - ldr r0, [r4] - ldr r1, =0x00003008 - adds r0, r1 - ldrb r0, [r0] - movs r1, 0x2 - bl CopyWindowToVram - ldr r0, [r4] - ldr r2, =0x00003009 - adds r0, r2 - ldrb r0, [r0] - movs r1, 0x2 - bl CopyWindowToVram - ldr r1, [r4] - ldr r0, =0x00003014 - adds r1, r0 - b _08029F8E - .pool -_08029C9C: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _08029CC0 - ldr r4, =gUnknown_02022CF8 - ldr r0, [r4] - ldr r1, =0x00003008 - adds r0, r1 - ldrb r0, [r0] - bl PutWindowTilemap - ldr r0, [r4] - ldr r2, =0x00003009 - adds r0, r2 - ldrb r0, [r0] - bl PutWindowTilemap -_08029CC0: - movs r0, 0 - bl CopyBgTilemapBufferToVram - ldr r0, =gUnknown_02022CF8 - ldr r1, [r0] - ldr r0, =0x00003014 - adds r1, r0 - b _08029F8E - .pool -_08029CE0: - ldr r4, =gUnknown_02022CF8 - ldr r0, [r4] - ldr r1, =0x0000301c - adds r2, r0, r1 - ldrh r0, [r2] - adds r0, 0x1 - strh r0, [r2] - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0x1D - bhi _08029CF8 - b _08029FF8 -_08029CF8: - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _08029D06 - b _08029FF8 -_08029D06: - movs r0, 0 - strh r0, [r2] - movs r0, 0x5 - bl PlaySE - bl sub_8027748 - ldr r1, =0x00000bb7 - cmp r0, r1 - bhi _08029D3C - ldr r0, [r4] - ldr r2, =0x00003014 - adds r0, r2 - movs r1, 0x7F - strb r1, [r0] - b _08029D4C - .pool -_08029D3C: - bl StopMapMusic - ldr r1, [r4] - ldr r0, =0x00003014 - adds r1, r0 - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] -_08029D4C: - movs r0, 0x1E - str r0, [sp] - movs r0, 0xF - str r0, [sp, 0x4] - movs r0, 0 - movs r1, 0 - movs r2, 0 - movs r3, 0x5 - bl FillBgTilemapBufferRect_Palette0 - ldr r5, =gUnknown_02022CF8 - ldr r0, [r5] - ldr r4, =0x00003009 - adds r0, r4 - ldrb r0, [r0] - bl RemoveWindow - ldr r6, =gUnknown_082F7BCC - adds r0, r6, 0 - bl AddWindow - ldr r1, [r5] - adds r1, r4 - strb r0, [r1] - ldr r0, [r5] - adds r0, r4 - ldrb r0, [r0] - bl ClearWindowTilemap - adds r0, r6, 0 - bl sub_8029174 - b _08029FF8 - .pool -_08029DA0: - ldr r0, =0x0000016f - bl PlayNewMapMusic - ldr r4, =gUnknown_02022CF8 - ldr r0, [r4] - ldr r6, =0x00003008 - adds r0, r6 - ldrb r0, [r0] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r0, [r4] - ldr r1, =0x00003009 - mov r10, r1 - add r0, r10 - ldrb r0, [r0] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r5, =gText_AnnouncingPrizes - movs r2, 0x1 - negs r2, r2 - movs r0, 0x1 - adds r1, r5, 0 - bl GetStringWidth - adds r1, r0, 0 - movs r0, 0xE0 - subs r0, r1 - lsrs r3, r0, 1 - ldr r0, [r4] - adds r0, r6 - ldrb r0, [r0] - lsls r3, 24 - lsrs r3, 24 - movs r2, 0x1 - mov r9, r2 - str r2, [sp] - movs r1, 0xFF - mov r8, r1 - str r1, [sp, 0x4] - movs r6, 0 - str r6, [sp, 0x8] - movs r1, 0x1 - adds r2, r5, 0 - bl AddTextPrinterParameterized - bl DynamicPlaceholderTextUtil_Reset - bl sub_802762C - lsls r0, 16 - lsrs r0, 16 - ldr r5, =gStringVar1 - adds r1, r5, 0 - bl CopyItemName - movs r0, 0 - adds r1, r5, 0 - bl DynamicPlaceholderTextUtil_SetPlaceholderPtr - ldr r7, =gStringVar4 - ldr r1, =gText_FirstPlacePrize - adds r0, r7, 0 - bl DynamicPlaceholderTextUtil_ExpandPlaceholders - ldr r0, [r4] - add r0, r10 - ldrb r0, [r0] - mov r2, r9 - str r2, [sp] - mov r1, r8 - str r1, [sp, 0x4] - str r6, [sp, 0x8] - movs r1, 0x1 - adds r2, r7, 0 - movs r3, 0 - bl AddTextPrinterParameterized - bl sub_80279C8 - lsls r0, 24 - lsrs r4, r0, 24 - adds r6, r4, 0 - cmp r4, 0 - beq _08029EC8 - cmp r4, 0x3 - beq _08029EC8 - bl DynamicPlaceholderTextUtil_Reset - bl sub_802762C - lsls r0, 16 - lsrs r0, 16 - adds r1, r5, 0 - bl CopyItemName - movs r0, 0 - adds r1, r5, 0 - bl DynamicPlaceholderTextUtil_SetPlaceholderPtr - cmp r4, 0x2 - bne _08029E9C - ldr r1, =gText_CantHoldAnyMore - adds r0, r7, 0 - bl DynamicPlaceholderTextUtil_ExpandPlaceholders - b _08029EA8 - .pool -_08029E9C: - cmp r6, 0x1 - bne _08029EA8 - ldr r1, =gText_FilledStorageSpace - adds r0, r7, 0 - bl DynamicPlaceholderTextUtil_ExpandPlaceholders -_08029EA8: - ldr r0, =gUnknown_02022CF8 - ldr r0, [r0] - ldr r2, =0x00003009 - adds r0, r2 - ldrb r0, [r0] - ldr r2, =gStringVar4 - movs r1, 0x29 - str r1, [sp] - movs r1, 0xFF - str r1, [sp, 0x4] - movs r1, 0 - str r1, [sp, 0x8] - movs r1, 0x1 - movs r3, 0 - bl AddTextPrinterParameterized -_08029EC8: - ldr r4, =gUnknown_02022CF8 - ldr r0, [r4] - ldr r1, =0x00003008 - adds r0, r1 - ldrb r0, [r0] - movs r1, 0x2 - bl CopyWindowToVram - ldr r0, [r4] - ldr r2, =0x00003009 - adds r0, r2 - ldrb r0, [r0] - movs r1, 0x2 - bl CopyWindowToVram - ldr r1, [r4] - ldr r0, =0x00003014 - adds r1, r0 - b _08029F8E - .pool -_08029F08: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _08029F2C - ldr r4, =gUnknown_02022CF8 - ldr r0, [r4] - ldr r1, =0x00003008 - adds r0, r1 - ldrb r0, [r0] - bl PutWindowTilemap - ldr r0, [r4] - ldr r2, =0x00003009 - adds r0, r2 - ldrb r0, [r0] - bl PutWindowTilemap -_08029F2C: - movs r0, 0 - bl CopyBgTilemapBufferToVram - ldr r0, =0x0000020b - movs r1, 0x14 - movs r2, 0xA - bl FadeOutAndFadeInNewMapMusic - ldr r0, =gUnknown_02022CF8 - ldr r1, [r0] - ldr r0, =0x00003014 - adds r1, r0 - b _08029F8E - .pool -_08029F5C: - ldr r4, =gUnknown_02022CF8 - ldr r0, [r4] - ldr r1, =0x0000301c - adds r2, r0, r1 - ldrh r0, [r2] - adds r0, 0x1 - strh r0, [r2] - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0x1D - bls _08029FF8 - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _08029FF8 - movs r0, 0 - strh r0, [r2] - movs r0, 0x5 - bl PlaySE -_08029F88: - ldr r1, [r4] -_08029F8A: - ldr r2, =0x00003014 - adds r1, r2 -_08029F8E: - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _08029FF8 - .pool -_08029FA8: - ldr r5, =0x00003008 - adds r0, r1, r5 - ldrb r0, [r0] - bl ClearWindowTilemap - ldr r0, [r6] - ldr r4, =0x00003009 - adds r0, r4 - ldrb r0, [r0] - bl ClearWindowTilemap - ldr r0, [r6] - adds r0, r5 - ldrb r0, [r0] - bl RemoveWindow - ldr r0, [r6] - adds r0, r4 - ldrb r0, [r0] - bl RemoveWindow - movs r0, 0x1E - str r0, [sp] - movs r0, 0x14 - str r0, [sp, 0x4] - movs r0, 0 - movs r1, 0 - movs r2, 0 - movs r3, 0 - bl FillBgTilemapBufferRect_Palette0 - movs r0, 0 - bl CopyBgTilemapBufferToVram - ldr r0, [r6] - movs r1, 0xC0 - lsls r1, 6 - adds r0, r1 - movs r1, 0x1 - str r1, [r0] -_08029FF8: - add sp, 0x14 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_802988C - - thumb_func_start sub_802A010 -sub_802A010: @ 802A010 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x10 - ldr r1, =gUnknown_02022CF8 - ldr r2, [r1] - ldr r3, =0x00003014 - adds r0, r2, r3 - ldrb r6, [r0] - adds r7, r1, 0 - cmp r6, 0x1 - beq _0802A0CC - cmp r6, 0x1 - bgt _0802A040 - cmp r6, 0 - beq _0802A04E - b _0802A2FC - .pool -_0802A040: - cmp r6, 0x2 - bne _0802A046 - b _0802A194 -_0802A046: - cmp r6, 0x3 - bne _0802A04C - b _0802A1D0 -_0802A04C: - b _0802A2FC -_0802A04E: - ldr r0, =gUnknown_082F7BD4 - mov r9, r0 - bl AddWindow - ldr r1, [r7] - ldr r4, =0x00003008 - adds r1, r4 - strb r0, [r1] - movs r1, 0x8 - add r1, r9 - mov r8, r1 - mov r0, r8 - bl AddWindow - ldr r1, [r7] - ldr r2, =0x00003009 - adds r1, r2 - strb r0, [r1] - ldr r0, [r7] - adds r0, r4 - ldrb r0, [r0] - bl ClearWindowTilemap - ldr r0, [r7] - ldr r3, =0x00003009 - adds r0, r3 - ldrb r0, [r0] - bl ClearWindowTilemap - mov r0, r9 - bl sub_8029174 - mov r0, r8 - bl sub_8029074 - ldr r1, [r7] - ldr r0, =0x00003014 - adds r1, r0 - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - ldr r0, [r7] - ldr r1, =0x00003020 - adds r0, r1 - strb r6, [r0] - ldr r0, [r7] - ldr r2, =0x00003024 - adds r0, r2 - strb r6, [r0] - b _0802A35E - .pool -_0802A0CC: - ldr r3, =0x00003008 - mov r8, r3 - adds r0, r2, r3 - ldrb r0, [r0] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r0, [r7] - ldr r1, =0x00003009 - mov r10, r1 - add r0, r10 - ldrb r0, [r0] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r0, [r7] - add r0, r8 - ldrb r0, [r0] - ldr r2, =gText_WantToPlayAgain - movs r1, 0x5 - str r1, [sp] - movs r3, 0xFF - mov r9, r3 - str r3, [sp, 0x4] - movs r1, 0 - str r1, [sp, 0x8] - movs r1, 0x1 - movs r3, 0 - bl AddTextPrinterParameterized - ldr r0, [r7] - add r0, r10 - ldrb r0, [r0] - ldr r2, =gText_Yes - str r6, [sp] - mov r3, r9 - str r3, [sp, 0x4] - movs r1, 0 - str r1, [sp, 0x8] - movs r1, 0x1 - movs r3, 0x8 - bl AddTextPrinterParameterized - ldr r0, [r7] - add r0, r10 - ldrb r0, [r0] - ldr r2, =gText_No - movs r1, 0x11 - str r1, [sp] - mov r3, r9 - str r3, [sp, 0x4] - movs r1, 0 - str r1, [sp, 0x8] - movs r1, 0x1 - movs r3, 0x8 - bl AddTextPrinterParameterized - ldr r0, [r7] - add r0, r10 - ldrb r0, [r0] - ldr r2, =gText_SelectorArrow2 - str r6, [sp] - mov r3, r9 - str r3, [sp, 0x4] - movs r1, 0 - str r1, [sp, 0x8] - movs r1, 0x1 - movs r3, 0 - bl AddTextPrinterParameterized - ldr r0, [r7] - add r0, r8 - ldrb r0, [r0] - movs r1, 0x2 - bl CopyWindowToVram - ldr r0, [r7] - add r0, r10 - ldrb r0, [r0] - movs r1, 0x2 - bl CopyWindowToVram - ldr r1, [r7] - ldr r2, =0x00003014 - adds r1, r2 - b _0802A2EA - .pool -_0802A194: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802A1B6 - ldr r0, [r7] - ldr r3, =0x00003008 - adds r0, r3 - ldrb r0, [r0] - bl PutWindowTilemap - ldr r0, [r7] - ldr r1, =0x00003009 - adds r0, r1 - ldrb r0, [r0] - bl PutWindowTilemap -_0802A1B6: - movs r0, 0 - bl CopyBgTilemapBufferToVram - ldr r1, [r7] - ldr r2, =0x00003014 - adds r1, r2 - b _0802A2EA - .pool -_0802A1D0: - ldr r3, =0x00003020 - adds r0, r2, r3 - ldrb r5, [r0] - cmp r5, 0 - bne _0802A1DC - movs r5, 0x1 -_0802A1DC: - ldr r0, =0x00003009 - mov r8, r0 - adds r0, r2, r0 - ldrb r0, [r0] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r0, [r7] - add r0, r8 - ldrb r0, [r0] - ldr r2, =gText_Yes - movs r1, 0x1 - str r1, [sp] - movs r3, 0xFF - mov r10, r3 - str r3, [sp, 0x4] - movs r1, 0 - mov r9, r1 - str r1, [sp, 0x8] - movs r1, 0x1 - movs r3, 0x8 - bl AddTextPrinterParameterized - ldr r0, [r7] - add r0, r8 - ldrb r0, [r0] - ldr r2, =gText_No - movs r1, 0x11 - str r1, [sp] - mov r3, r10 - str r3, [sp, 0x4] - mov r1, r9 - str r1, [sp, 0x8] - movs r1, 0x1 - movs r3, 0x8 - bl AddTextPrinterParameterized - ldr r0, [r7] - add r0, r8 - ldrb r0, [r0] - ldr r2, =gText_SelectorArrow2 - subs r1, r5, 0x1 - lsls r1, 4 - adds r1, 0x1 - lsls r1, 24 - lsrs r1, 24 - str r1, [sp] - mov r3, r10 - str r3, [sp, 0x4] - mov r1, r9 - str r1, [sp, 0x8] - movs r1, 0x1 - movs r3, 0 - bl AddTextPrinterParameterized - ldr r0, [r7] - add r0, r8 - ldrb r0, [r0] - movs r1, 0x3 - bl CopyWindowToVram - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r5, 0x1 - movs r2, 0x1 - ands r2, r1 - cmp r2, 0 - beq _0802A294 - movs r0, 0x5 - bl PlaySE - ldr r0, [r7] - ldr r3, =0x00003020 - adds r1, r0, r3 - ldrb r0, [r1] - cmp r0, 0 - bne _0802A2E4 - strb r5, [r1] - b _0802A2E4 - .pool -_0802A294: - movs r0, 0xC0 - ands r0, r1 - cmp r0, 0 - beq _0802A2CC - movs r0, 0x5 - bl PlaySE - ldr r0, [r7] - ldr r2, =0x00003020 - adds r1, r0, r2 - ldrb r0, [r1] - cmp r0, 0x1 - beq _0802A2C2 - cmp r0, 0x1 - bgt _0802A2BC - cmp r0, 0 - beq _0802A2C2 - b _0802A35E - .pool -_0802A2BC: - cmp r0, 0x2 - beq _0802A2C8 - b _0802A35E -_0802A2C2: - movs r0, 0x2 - strb r0, [r1] - b _0802A35E -_0802A2C8: - strb r5, [r1] - b _0802A35E -_0802A2CC: - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _0802A35E - movs r0, 0x5 - bl PlaySE - ldr r0, [r7] - ldr r3, =0x00003020 - adds r0, r3 - movs r1, 0x2 - strb r1, [r0] -_0802A2E4: - ldr r1, [r7] - ldr r0, =0x00003014 - adds r1, r0 -_0802A2EA: - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _0802A35E - .pool -_0802A2FC: - ldr r0, [r7] - ldr r2, =0x00003020 - adds r1, r0, r2 - ldrb r1, [r1] - ldr r3, =0x00003024 - adds r0, r3 - strb r1, [r0] - ldr r0, [r7] - ldr r6, =0x00003008 - adds r0, r6 - ldrb r0, [r0] - bl ClearWindowTilemap - ldr r0, [r7] - ldr r1, =0x00003009 - adds r0, r1 - ldrb r0, [r0] - bl ClearWindowTilemap - ldr r0, [r7] - adds r0, r6 - ldrb r0, [r0] - bl RemoveWindow - ldr r0, [r7] - ldr r2, =0x00003009 - adds r0, r2 - ldrb r0, [r0] - bl RemoveWindow - movs r0, 0x1E - str r0, [sp] - movs r0, 0x14 - str r0, [sp, 0x4] - movs r0, 0 - movs r1, 0 - movs r2, 0 - movs r3, 0 - bl FillBgTilemapBufferRect_Palette0 - movs r0, 0 - bl CopyBgTilemapBufferToVram - ldr r0, [r7] - movs r3, 0xC0 - lsls r3, 6 - adds r0, r3 - movs r1, 0x1 - str r1, [r0] -_0802A35E: - add sp, 0x10 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_802A010 - - thumb_func_start sub_802A380 -sub_802A380: @ 802A380 - push {r4-r6,lr} - sub sp, 0x10 - ldr r5, =gUnknown_02022CF8 - ldr r0, [r5] - ldr r6, =0x00003014 - adds r0, r6 - ldrb r4, [r0] - cmp r4, 0x1 - beq _0802A3D8 - cmp r4, 0x1 - bgt _0802A3A4 - cmp r4, 0 - beq _0802A3AE - b _0802A420 - .pool -_0802A3A4: - cmp r4, 0x2 - beq _0802A3EC - cmp r4, 0x3 - beq _0802A404 - b _0802A420 -_0802A3AE: - movs r0, 0 - movs r1, 0 - bl DrawDialogueFrame - ldr r2, =gText_SavingDontTurnOffPower - str r4, [sp] - movs r0, 0x2 - str r0, [sp, 0x4] - movs r0, 0x1 - str r0, [sp, 0x8] - movs r0, 0x3 - str r0, [sp, 0xC] - movs r0, 0 - movs r1, 0x1 - movs r3, 0 - bl AddTextPrinterParameterized2 - b _0802A410 - .pool -_0802A3D8: - movs r0, 0 - movs r1, 0x3 - bl CopyWindowToVram - ldr r1, [r5] - ldr r0, =0x00003014 - adds r1, r0 - b _0802A414 - .pool -_0802A3EC: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802A448 - ldr r0, =sub_8153688 - movs r1, 0 - bl CreateTask - b _0802A410 - .pool -_0802A404: - ldr r0, =sub_8153688 - bl FuncIsActiveTask - lsls r0, 24 - cmp r0, 0 - bne _0802A448 -_0802A410: - ldr r1, [r5] - adds r1, r6 -_0802A414: - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _0802A448 - .pool -_0802A420: - movs r0, 0x1E - str r0, [sp] - movs r0, 0x14 - str r0, [sp, 0x4] - movs r0, 0 - movs r1, 0 - movs r2, 0 - movs r3, 0 - bl FillBgTilemapBufferRect_Palette0 - movs r0, 0 - bl CopyBgTilemapBufferToVram - ldr r0, =gUnknown_02022CF8 - ldr r0, [r0] - movs r1, 0xC0 - lsls r1, 6 - adds r0, r1 - movs r1, 0x1 - str r1, [r0] -_0802A448: - add sp, 0x10 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_802A380 - - thumb_func_start sub_802A454 -sub_802A454: @ 802A454 - push {r4-r6,lr} - sub sp, 0xC - ldr r1, =gUnknown_02022CF8 - ldr r2, [r1] - ldr r6, =0x00003014 - adds r0, r2, r6 - ldrb r0, [r0] - adds r5, r1, 0 - cmp r0, 0x1 - beq _0802A4AC - cmp r0, 0x1 - bgt _0802A47C - cmp r0, 0 - beq _0802A482 - b _0802A520 - .pool -_0802A47C: - cmp r0, 0x2 - beq _0802A4F4 - b _0802A520 -_0802A482: - ldr r4, =gUnknown_082F7BEC - adds r0, r4, 0 - bl AddWindow - ldr r1, [r5] - ldr r2, =0x00003008 - adds r1, r2 - strb r0, [r1] - ldr r0, [r5] - adds r0, r2 - ldrb r0, [r0] - bl ClearWindowTilemap - adds r0, r4, 0 - bl sub_8029174 - b _0802A510 - .pool -_0802A4AC: - ldr r4, =0x00003008 - adds r0, r2, r4 - ldrb r0, [r0] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r0, [r5] - adds r0, r4 - ldrb r0, [r0] - ldr r2, =gText_CommunicationStandby3 - movs r1, 0x5 - str r1, [sp] - movs r1, 0xFF - str r1, [sp, 0x4] - movs r1, 0 - str r1, [sp, 0x8] - movs r1, 0x1 - movs r3, 0 - bl AddTextPrinterParameterized - ldr r0, [r5] - adds r0, r4 - ldrb r0, [r0] - movs r1, 0x2 - bl CopyWindowToVram - ldr r1, [r5] - ldr r0, =0x00003014 - adds r1, r0 - b _0802A514 - .pool -_0802A4F4: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802A50A - ldr r0, [r5] - ldr r1, =0x00003008 - adds r0, r1 - ldrb r0, [r0] - bl PutWindowTilemap -_0802A50A: - movs r0, 0 - bl CopyBgTilemapBufferToVram -_0802A510: - ldr r1, [r5] - adds r1, r6 -_0802A514: - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _0802A52C - .pool -_0802A520: - ldr r0, [r5] - movs r1, 0xC0 - lsls r1, 6 - adds r0, r1 - movs r1, 0x1 - str r1, [r0] -_0802A52C: - add sp, 0xC - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_802A454 - - thumb_func_start sub_802A534 -sub_802A534: @ 802A534 - push {r4,r5,lr} - sub sp, 0x8 - ldr r5, =gUnknown_02022CF8 - ldr r0, [r5] - ldr r4, =0x00003008 - adds r0, r4 - ldrb r0, [r0] - bl ClearWindowTilemap - ldr r0, [r5] - adds r0, r4 - ldrb r0, [r0] - bl RemoveWindow - movs r0, 0x1E - str r0, [sp] - movs r0, 0x14 - str r0, [sp, 0x4] - movs r0, 0 - movs r1, 0 - movs r2, 0 - movs r3, 0 - bl FillBgTilemapBufferRect_Palette0 - movs r0, 0 - bl CopyBgTilemapBufferToVram - ldr r0, [r5] - movs r1, 0xC0 - lsls r1, 6 - adds r0, r1 - movs r1, 0x1 - str r1, [r0] - add sp, 0x8 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_802A534 - - thumb_func_start sub_802A588 -sub_802A588: @ 802A588 - push {r4-r7,lr} - sub sp, 0xC - ldr r0, =gUnknown_02022CF8 - ldr r1, [r0] - ldr r7, =0x00003014 - adds r2, r1, r7 - ldrb r5, [r2] - adds r6, r0, 0 - cmp r5, 0x1 - beq _0802A610 - cmp r5, 0x1 - bgt _0802A5B0 - cmp r5, 0 - beq _0802A5BA - b _0802A6A4 - .pool -_0802A5B0: - cmp r5, 0x2 - beq _0802A658 - cmp r5, 0x3 - beq _0802A684 - b _0802A6A4 -_0802A5BA: - ldr r4, =gUnknown_082F7BE4 - adds r0, r4, 0 - bl AddWindow - ldr r1, [r6] - ldr r2, =0x00003008 - adds r1, r2 - strb r0, [r1] - ldr r0, [r6] - adds r0, r2 - ldrb r0, [r0] - bl ClearWindowTilemap - adds r0, r4, 0 - bl sub_8029174 - ldr r1, [r6] - adds r1, r7 - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - ldr r0, [r6] - ldr r2, =0x0000301c - adds r1, r0, r2 - movs r2, 0 - strh r5, [r1] - ldr r1, =0x00003020 - adds r0, r1 - strb r2, [r0] - ldr r0, [r6] - adds r1, 0x4 - adds r0, r1 - strb r2, [r0] - b _0802A6EA - .pool -_0802A610: - ldr r4, =0x00003008 - adds r0, r1, r4 - ldrb r0, [r0] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r0, [r6] - adds r0, r4 - ldrb r0, [r0] - ldr r2, =gText_SomeoneDroppedOut - movs r1, 0x5 - str r1, [sp] - movs r1, 0xFF - str r1, [sp, 0x4] - movs r1, 0 - str r1, [sp, 0x8] - movs r1, 0x1 - movs r3, 0 - bl AddTextPrinterParameterized - ldr r0, [r6] - adds r0, r4 - ldrb r0, [r0] - movs r1, 0x2 - bl CopyWindowToVram - ldr r1, [r6] - ldr r2, =0x00003014 - adds r1, r2 - b _0802A678 - .pool -_0802A658: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802A66E - ldr r0, [r6] - ldr r1, =0x00003008 - adds r0, r1 - ldrb r0, [r0] - bl PutWindowTilemap -_0802A66E: - movs r0, 0 - bl CopyBgTilemapBufferToVram - ldr r1, [r6] - adds r1, r7 -_0802A678: - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _0802A6EA - .pool -_0802A684: - ldr r0, =0x0000301c - adds r1, r0 - ldrh r0, [r1] - adds r0, 0x1 - strh r0, [r1] - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0x77 - bls _0802A6EA - ldrb r0, [r2] - adds r0, 0x1 - strb r0, [r2] - b _0802A6EA - .pool -_0802A6A4: - ldr r0, [r6] - ldr r1, =0x00003024 - adds r0, r1 - movs r1, 0x5 - strb r1, [r0] - ldr r0, [r6] - ldr r4, =0x00003008 - adds r0, r4 - ldrb r0, [r0] - bl ClearWindowTilemap - ldr r0, [r6] - adds r0, r4 - ldrb r0, [r0] - bl RemoveWindow - movs r0, 0x1E - str r0, [sp] - movs r0, 0x14 - str r0, [sp, 0x4] - movs r0, 0 - movs r1, 0 - movs r2, 0 - movs r3, 0 - bl FillBgTilemapBufferRect_Palette0 - movs r0, 0 - bl CopyBgTilemapBufferToVram - ldr r0, [r6] - movs r2, 0xC0 - lsls r2, 6 - adds r0, r2 - movs r1, 0x1 - str r1, [r0] -_0802A6EA: - add sp, 0xC - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_802A588 - - thumb_func_start unused_0 -unused_0: @ 802A6FC - push {r4,lr} - ldr r4, =gUnknown_02022CF8 - ldr r0, [r4] - ldr r1, =0x00003004 - adds r0, r1 - ldrb r0, [r0] - bl DestroyTask - ldr r0, [r4] - movs r1, 0xC0 - lsls r1, 6 - adds r0, r1 - movs r1, 0x1 - str r1, [r0] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end unused_0 - - thumb_func_start nullsub_16 -nullsub_16: @ 802A728 - bx lr - thumb_func_end nullsub_16 - - thumb_func_start sub_802A72C -sub_802A72C: @ 802A72C - push {r4,lr} - ldr r2, =gUnknown_02022CF8 - ldr r1, [r2] - ldr r3, =0x00003014 - adds r1, r3 - movs r3, 0 - strb r3, [r1] - ldr r1, [r2] - movs r4, 0xC0 - lsls r4, 6 - adds r2, r1, r4 - str r3, [r2] - ldr r2, =0x00003028 - adds r1, r2 - str r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_802A72C - - thumb_func_start sub_802A75C -sub_802A75C: @ 802A75C - ldr r0, =gUnknown_02022CF8 - ldr r0, [r0] - ldr r1, =0x00003028 - adds r0, r1 - ldr r0, [r0] - bx lr - .pool - thumb_func_end sub_802A75C - - thumb_func_start sub_802A770 -sub_802A770: @ 802A770 - push {lr} - ldr r0, =gUnknown_02022CF8 - ldr r0, [r0] - movs r1, 0xC0 - lsls r1, 6 - adds r0, r1 - ldr r0, [r0] - cmp r0, 0x1 - beq _0802A78C - movs r0, 0x1 - b _0802A78E - .pool -_0802A78C: - movs r0, 0 -_0802A78E: - pop {r1} - bx r1 - thumb_func_end sub_802A770 - - thumb_func_start sub_802A794 -sub_802A794: @ 802A794 - ldr r0, =gUnknown_02022CF8 - ldr r0, [r0] - ldr r1, =0x00003024 - adds r0, r1 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end sub_802A794 - - thumb_func_start sub_802A7A8 -sub_802A7A8: @ 802A7A8 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x8 - movs r3, 0xC0 - lsls r3, 19 - movs r4, 0xC0 - lsls r4, 9 - add r0, sp, 0x4 - mov r8, r0 - mov r2, sp - movs r6, 0 - ldr r1, =0x040000d4 - movs r5, 0x80 - lsls r5, 5 - ldr r7, =0x81000800 - movs r0, 0x81 - lsls r0, 24 - mov r12, r0 -_0802A7CE: - strh r6, [r2] - mov r0, sp - str r0, [r1] - str r3, [r1, 0x4] - str r7, [r1, 0x8] - ldr r0, [r1, 0x8] - adds r3, r5 - subs r4, r5 - cmp r4, r5 - bhi _0802A7CE - strh r6, [r2] - mov r2, sp - str r2, [r1] - str r3, [r1, 0x4] - lsrs r0, r4, 1 - mov r2, r12 - orrs r0, r2 - str r0, [r1, 0x8] - ldr r0, [r1, 0x8] - movs r0, 0xE0 - lsls r0, 19 - movs r3, 0x80 - lsls r3, 3 - movs r4, 0 - str r4, [sp, 0x4] - ldr r2, =0x040000d4 - mov r1, r8 - str r1, [r2] - str r0, [r2, 0x4] - lsrs r0, r3, 2 - movs r1, 0x85 - lsls r1, 24 - orrs r0, r1 - str r0, [r2, 0x8] - ldr r0, [r2, 0x8] - movs r1, 0xA0 - lsls r1, 19 - mov r0, sp - strh r4, [r0] - str r0, [r2] - str r1, [r2, 0x4] - lsrs r3, 1 - movs r0, 0x81 - lsls r0, 24 - orrs r3, r0 - str r3, [r2, 0x8] - ldr r0, [r2, 0x8] - movs r0, 0 - movs r1, 0 - bl SetGpuReg - movs r0, 0 - bl ResetBgsAndClearDma3BusyFlags - ldr r1, =gUnknown_082F7BA4 - movs r0, 0 - movs r2, 0x4 - bl InitBgsFromTemplates - movs r0, 0 - movs r1, 0 - movs r2, 0 - bl ChangeBgX - movs r0, 0 - movs r1, 0 - movs r2, 0 - bl ChangeBgY - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - bl ChangeBgX - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - bl ChangeBgY - movs r0, 0x2 - movs r1, 0 - movs r2, 0 - bl ChangeBgX - movs r0, 0x2 - movs r1, 0 - movs r2, 0 - bl ChangeBgY - movs r0, 0x3 - movs r1, 0 - movs r2, 0 - bl ChangeBgX - movs r0, 0x3 - movs r1, 0 - movs r2, 0 - bl ChangeBgY - bl InitStandardTextBoxWindows - bl sub_8197200 - movs r1, 0x82 - lsls r1, 5 - movs r0, 0 - bl SetGpuReg - ldr r4, =gUnknown_02022CF8 - ldr r1, [r4] - movs r0, 0x3 - bl SetBgTilemapBuffer - ldr r1, [r4] - movs r2, 0x80 - lsls r2, 5 - adds r1, r2 - movs r0, 0x1 - bl SetBgTilemapBuffer - ldr r1, [r4] - movs r0, 0x80 - lsls r0, 6 - adds r1, r0 - movs r0, 0x2 - bl SetBgTilemapBuffer - add sp, 0x8 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_802A7A8 - - thumb_func_start sub_802A8E8 -sub_802A8E8: @ 802A8E8 - push {lr} - sub sp, 0x4 - ldr r0, =gUnknown_02022CF8 - ldr r0, [r0] - ldr r2, =0x00003018 - adds r1, r0, r2 - ldrb r0, [r1] - cmp r0, 0x5 - bhi _0802A982 - lsls r0, 2 - ldr r1, =_0802A910 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0802A910: - .4byte _0802A928 - .4byte _0802A938 - .4byte _0802A93E - .4byte _0802A94C - .4byte _0802A964 - .4byte _0802A972 -_0802A928: - ldr r0, =gDodrioBerryBgPal1 - movs r1, 0 - movs r2, 0x40 - bl LoadPalette - b _0802A98A - .pool -_0802A938: - bl reset_temp_tile_data_buffers - b _0802A98A -_0802A93E: - ldr r1, =gDodrioBerryBgGfx1 - movs r0, 0 - str r0, [sp] - movs r0, 0x3 - b _0802A954 - .pool -_0802A94C: - ldr r1, =gDodrioBerryBgGfx2 - movs r0, 0 - str r0, [sp] - movs r0, 0x1 -_0802A954: - movs r2, 0 - movs r3, 0 - bl decompress_and_copy_tile_data_to_vram - b _0802A98A - .pool -_0802A964: - bl free_temp_tile_data_buffers_if_possible - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0802A98A - b _0802A998 -_0802A972: - movs r0, 0x3 - bl stdpal_get - movs r1, 0xD0 - movs r2, 0x20 - bl LoadPalette - b _0802A98A -_0802A982: - movs r0, 0 - strb r0, [r1] - movs r0, 0x1 - b _0802A99A -_0802A98A: - ldr r0, =gUnknown_02022CF8 - ldr r1, [r0] - ldr r0, =0x00003018 - adds r1, r0 - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] -_0802A998: - movs r0, 0 -_0802A99A: - add sp, 0x4 - pop {r1} - bx r1 - .pool - thumb_func_end sub_802A8E8 - - .align 2, 0 @ don't pad with nop diff --git a/asm/pokemon_jump.s b/asm/pokemon_jump.s index 4327bb920..73582cb06 100755 --- a/asm/pokemon_jump.s +++ b/asm/pokemon_jump.s @@ -5,1446 +5,8 @@ .text - thumb_func_start sub_802CE9C -sub_802CE9C: @ 802CE9C - push {r4-r7,lr} - adds r7, r0, 0 - movs r5, 0 - movs r4, 0 - ldr r6, =gUnknown_082FBE58 -_0802CEA6: - ldr r1, =gUnknown_082FBEB8 - lsls r0, r4, 2 - adds r0, r1 - ldr r0, [r0] - ldr r2, =gUnknown_082FBEA8 - lsls r1, r5, 1 - adds r1, r2 - movs r2, 0 - ldrsh r1, [r1, r2] - movs r3, 0 - ldrsh r2, [r6, r3] - movs r3, 0x2 - bl CreateSprite - lsls r0, 24 - lsrs r1, r0, 24 - lsls r0, r5, 2 - ldr r3, =0x000081d0 - adds r2, r7, r3 - adds r2, r0 - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - str r0, [r2] - adds r5, 0x1 - adds r6, 0x14 - adds r4, 0x1 - cmp r4, 0x3 - ble _0802CEA6 - movs r4, 0x3 - movs r6, 0x3C -_0802CEE8: - ldr r1, =gUnknown_082FBEB8 - lsls r0, r4, 2 - adds r0, r1 - ldr r0, [r0] - ldr r2, =gUnknown_082FBEA8 - lsls r1, r5, 1 - adds r1, r2 - movs r2, 0 - ldrsh r1, [r1, r2] - ldr r2, =gUnknown_082FBE58 - adds r2, r6, r2 - movs r3, 0 - ldrsh r2, [r2, r3] - movs r3, 0x2 - bl CreateSprite - lsls r0, 24 - lsrs r1, r0, 24 - lsls r0, r5, 2 - ldr r3, =0x000081d0 - adds r2, r7, r3 - adds r2, r0 - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - str r0, [r2] - adds r0, 0x3F - ldrb r1, [r0] - movs r2, 0x1 - orrs r1, r2 - strb r1, [r0] - adds r5, 0x1 - subs r6, 0x14 - subs r4, 0x1 - cmp r4, 0 - bge _0802CEE8 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_802CE9C - - thumb_func_start sub_802CF50 -sub_802CF50: @ 802CF50 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0xC - str r0, [sp, 0x8] - cmp r1, 0x5 - ble _0802CF70 - movs r0, 0xA - subs r1, r0, r1 - movs r0, 0x3 - str r0, [sp] - ldr r2, [sp, 0x8] - ldrb r0, [r2, 0xF] - b _0802CF78 -_0802CF70: - movs r3, 0x2 - str r3, [sp] - ldr r7, [sp, 0x8] - ldrb r0, [r7, 0xE] -_0802CF78: - movs r6, 0 - lsls r2, r1, 1 - str r2, [sp, 0x4] - lsls r0, 4 - mov r9, r0 - lsls r1, 24 - mov r8, r1 - ldr r0, =gUnknown_082FBE58 - adds r4, r2, r0 - ldr r3, [sp] - lsls r3, 2 - mov r10, r3 - movs r5, 0x3 -_0802CF92: - lsls r0, r6, 2 - ldr r7, [sp, 0x8] - ldr r1, =0x000081d0 - adds r2, r7, r1 - adds r2, r0 - ldr r1, [r2] - ldrh r0, [r4] - strh r0, [r1, 0x22] - ldr r3, [r2] - ldrb r0, [r3, 0x5] - movs r7, 0xD - negs r7, r7 - adds r1, r7, 0 - ands r0, r1 - mov r1, r10 - orrs r0, r1 - strb r0, [r3, 0x5] - ldr r3, [r2] - ldrb r1, [r3, 0x5] - movs r0, 0xF - ands r0, r1 - mov r7, r9 - orrs r0, r7 - strb r0, [r3, 0x5] - ldr r0, [r2] - mov r2, r8 - lsrs r1, r2, 24 - bl StartSpriteAnim - adds r6, 0x1 - adds r4, 0x14 - subs r5, 0x1 - cmp r5, 0 - bge _0802CF92 - movs r5, 0x3 - ldr r0, =gUnknown_082FBE58 - ldr r3, [sp, 0x4] - adds r0, r3, r0 - adds r4, r0, 0 - adds r4, 0x3C - ldr r7, [sp] - lsls r7, 2 - mov r10, r7 -_0802CFE8: - lsls r0, r6, 2 - ldr r1, [sp, 0x8] - ldr r3, =0x000081d0 - adds r2, r1, r3 - adds r2, r0 - ldr r1, [r2] - ldrh r0, [r4] - strh r0, [r1, 0x22] - ldr r3, [r2] - ldrb r0, [r3, 0x5] - movs r7, 0xD - negs r7, r7 - adds r1, r7, 0 - ands r0, r1 - mov r1, r10 - orrs r0, r1 - strb r0, [r3, 0x5] - ldr r3, [r2] - ldrb r1, [r3, 0x5] - movs r0, 0xF - ands r0, r1 - mov r7, r9 - orrs r0, r7 - strb r0, [r3, 0x5] - ldr r0, [r2] - mov r2, r8 - lsrs r1, r2, 24 - bl StartSpriteAnim - adds r6, 0x1 - subs r4, 0x14 - subs r5, 0x1 - cmp r5, 0 - bge _0802CFE8 - add sp, 0xC - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_802CF50 - - thumb_func_start sub_802D044 -sub_802D044: @ 802D044 - push {r4,lr} - sub sp, 0x4 - adds r4, r0, 0 - movs r0, 0 - str r0, [sp] - movs r0, 0x9 - movs r1, 0x7 - movs r2, 0x78 - movs r3, 0x50 - bl sub_802EB24 - adds r0, r4, 0 - bl sub_802CD3C - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_802D044 - - thumb_func_start sub_802D068 -sub_802D068: @ 802D068 - push {lr} - bl sub_802EB84 - pop {r1} - bx r1 - thumb_func_end sub_802D068 - - thumb_func_start sub_802D074 -sub_802D074: @ 802D074 - push {r4,lr} - ldr r4, =gUnknown_02022D00 - str r0, [r4] - bl sub_802D0BC - ldr r0, =sub_802D12C - movs r1, 0x3 - bl CreateTask - ldr r1, [r4] - strb r0, [r1, 0x6] - ldr r2, [r4] - ldrb r0, [r2, 0x6] - movs r1, 0x2 - bl SetWordTaskArg - ldr r0, =sub_802D150 - bl sub_802D108 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_802D074 + - thumb_func_start sub_802D0AC -sub_802D0AC: @ 802D0AC - push {lr} - bl FreeAllWindowBuffers - bl sub_8034CC8 - pop {r0} - bx r0 - thumb_func_end sub_802D0AC - - thumb_func_start sub_802D0BC -sub_802D0BC: @ 802D0BC - movs r1, 0 - strh r1, [r0, 0x4] - str r1, [r0] - movs r1, 0xFF - strh r1, [r0, 0x12] - bx lr - thumb_func_end sub_802D0BC - - thumb_func_start sub_802D0C8 -sub_802D0C8: @ 802D0C8 - push {r4-r6,lr} - adds r6, r0, 0 - movs r5, 0 - ldr r4, =gUnknown_082FE18C -_0802D0D0: - ldr r0, [r4] - cmp r0, r6 - bne _0802D0DC - ldr r0, [r4, 0x4] - bl sub_802D108 -_0802D0DC: - adds r4, 0x8 - adds r5, 0x1 - cmp r5, 0x9 - bls _0802D0D0 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_802D0C8 - - thumb_func_start sub_802D0F0 -sub_802D0F0: @ 802D0F0 - ldr r0, =gUnknown_02022D00 - ldr r0, [r0] - ldr r1, [r0] - movs r0, 0x1 - eors r1, r0 - negs r0, r1 - orrs r0, r1 - lsrs r0, 31 - bx lr - .pool - thumb_func_end sub_802D0F0 - - thumb_func_start sub_802D108 -sub_802D108: @ 802D108 - push {r4,lr} - adds r2, r0, 0 - ldr r4, =gUnknown_02022D00 - ldr r0, [r4] - ldrb r0, [r0, 0x6] - movs r1, 0 - bl SetWordTaskArg - ldr r1, [r4] - movs r0, 0 - strh r0, [r1, 0x4] - str r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_802D108 - - thumb_func_start sub_802D12C -sub_802D12C: @ 802D12C - push {lr} - lsls r0, 24 - lsrs r1, r0, 24 - ldr r0, =gUnknown_02022D00 - ldr r0, [r0] - ldr r0, [r0] - cmp r0, 0 - bne _0802D148 - adds r0, r1, 0 - movs r1, 0 - bl GetWordTaskArg - bl _call_via_r0 -_0802D148: - pop {r0} - bx r0 - .pool - thumb_func_end sub_802D12C - - thumb_func_start sub_802D150 -sub_802D150: @ 802D150 - push {r4-r6,lr} - sub sp, 0x8 - ldr r6, =gUnknown_02022D00 - ldr r1, [r6] - ldrh r5, [r1, 0x4] - cmp r5, 0x1 - bne _0802D160 - b _0802D298 -_0802D160: - cmp r5, 0x1 - bgt _0802D170 - cmp r5, 0 - beq _0802D178 - b _0802D2DA - .pool -_0802D170: - cmp r5, 0x2 - bne _0802D176 - b _0802D2D6 -_0802D176: - b _0802D2DA -_0802D178: - movs r0, 0 - bl ResetBgsAndClearDma3BusyFlags - ldr r1, =gUnknown_082FE164 - movs r0, 0 - movs r2, 0x4 - bl InitBgsFromTemplates - ldr r0, =gUnknown_082FE174 - bl InitWindows - bl reset_temp_tile_data_buffers - ldr r0, [r6] - bl sub_802C974 - bl sub_802DD08 - ldr r0, =gPkmnJumpBgPal - movs r1, 0 - movs r2, 0x20 - bl LoadPalette - ldr r1, =gPkmnJumpBgGfx - str r5, [sp] - movs r0, 0x3 - movs r2, 0 - movs r3, 0 - bl decompress_and_copy_tile_data_to_vram - ldr r1, =gPkmnJumpBgTilemap - movs r4, 0x1 - str r4, [sp] - movs r0, 0x3 - movs r2, 0 - movs r3, 0 - bl decompress_and_copy_tile_data_to_vram - ldr r0, =gPkmnJumpVenusaurPal - movs r1, 0x30 - movs r2, 0x20 - bl LoadPalette - ldr r1, =gPkmnJumpVenusaurGfx - str r5, [sp] - movs r0, 0x2 - movs r2, 0 - movs r3, 0 - bl decompress_and_copy_tile_data_to_vram - ldr r1, =gPkmnJumpVenusaurTilemap - str r4, [sp] - movs r0, 0x2 - movs r2, 0 - movs r3, 0 - bl decompress_and_copy_tile_data_to_vram - ldr r0, =gPkmnJumpResultsPal - movs r1, 0x10 - movs r2, 0x20 - bl LoadPalette - ldr r1, =gPkmnJumpResultsGfx - str r5, [sp] - movs r0, 0x1 - movs r2, 0 - movs r3, 0 - bl decompress_and_copy_tile_data_to_vram - ldr r1, =gPkmnJumpResultsTilemap - str r4, [sp] - movs r0, 0x1 - movs r2, 0 - movs r3, 0 - bl decompress_and_copy_tile_data_to_vram - ldr r0, =gPkmnJumpPal3 - movs r1, 0x20 - movs r2, 0x20 - bl LoadPalette - ldr r1, [r6] - movs r0, 0xD3 - lsls r0, 1 - adds r1, r0 - movs r0, 0 - bl SetBgTilemapBuffer - movs r0, 0x20 - str r0, [sp] - str r0, [sp, 0x4] - movs r0, 0 - movs r1, 0 - movs r2, 0 - movs r3, 0 - bl FillBgTilemapBufferRect_Palette0 - bl sub_802DB8C - movs r0, 0 - bl sub_802DD64 - movs r0, 0 - movs r1, 0x1 - movs r2, 0xE0 - bl sub_8098C6C - movs r0, 0 - bl CopyBgTilemapBufferToVram - movs r0, 0x2 - bl CopyBgTilemapBufferToVram - movs r0, 0x1 - bl CopyBgTilemapBufferToVram - bl ResetBgPositions - b _0802D2CC - .pool -_0802D298: - bl free_temp_tile_data_buffers_if_possible - lsls r0, 24 - cmp r0, 0 - bne _0802D2DA - bl sub_802DBF8 - ldr r0, [r6] - bl sub_802CE9C - ldr r0, [r6] - movs r1, 0x6 - bl sub_802CF50 - movs r0, 0x3 - bl ShowBg - movs r0, 0 - bl ShowBg - movs r0, 0x2 - bl ShowBg - movs r0, 0x1 - bl HideBg -_0802D2CC: - ldr r1, [r6] - ldrh r0, [r1, 0x4] - adds r0, 0x1 - strh r0, [r1, 0x4] - b _0802D2DA -_0802D2D6: - movs r0, 0x1 - str r0, [r1] -_0802D2DA: - add sp, 0x8 - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_802D150 - - thumb_func_start sub_802D2E4 -sub_802D2E4: @ 802D2E4 - push {r4,lr} - ldr r4, =gUnknown_02022D00 - ldr r0, [r4] - ldrh r0, [r0, 0x4] - cmp r0, 0x1 - beq _0802D310 - cmp r0, 0x1 - bgt _0802D300 - cmp r0, 0 - beq _0802D30A - b _0802D34A - .pool -_0802D300: - cmp r0, 0x2 - beq _0802D322 - cmp r0, 0x3 - beq _0802D33A - b _0802D34A -_0802D30A: - bl sub_802DE1C - b _0802D330 -_0802D310: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802D34A - movs r0, 0 - bl sub_802DF70 - b _0802D330 -_0802D322: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802D34A - bl sub_802DFD4 -_0802D330: - ldr r1, [r4] - ldrh r0, [r1, 0x4] - adds r0, 0x1 - strh r0, [r1, 0x4] - b _0802D34A -_0802D33A: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802D34A - ldr r1, [r4] - movs r0, 0x1 - str r0, [r1] -_0802D34A: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_802D2E4 - - thumb_func_start sub_802D350 -sub_802D350: @ 802D350 - push {r4,lr} - ldr r4, =gUnknown_02022D00 - ldr r0, [r4] - ldrh r0, [r0, 0x4] - cmp r0, 0x1 - beq _0802D37C - cmp r0, 0x1 - bgt _0802D36C - cmp r0, 0 - beq _0802D376 - b _0802D3B6 - .pool -_0802D36C: - cmp r0, 0x2 - beq _0802D38E - cmp r0, 0x3 - beq _0802D3A6 - b _0802D3B6 -_0802D376: - bl sub_802DE1C - b _0802D39C -_0802D37C: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802D3B6 - movs r0, 0x1 - bl sub_802DF70 - b _0802D39C -_0802D38E: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802D3B6 - bl sub_802DFD4 -_0802D39C: - ldr r1, [r4] - ldrh r0, [r1, 0x4] - adds r0, 0x1 - strh r0, [r1, 0x4] - b _0802D3B6 -_0802D3A6: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802D3B6 - ldr r1, [r4] - movs r0, 0x1 - str r0, [r1] -_0802D3B6: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_802D350 - - thumb_func_start sub_802D3BC -sub_802D3BC: @ 802D3BC - push {r4,r5,lr} - bl sub_802C8AC - lsls r0, 16 - lsrs r5, r0, 16 - ldr r0, =gUnknown_02022D00 - ldr r0, [r0] - ldrh r0, [r0, 0x4] - cmp r0, 0 - beq _0802D3DC - cmp r0, 0x1 - beq _0802D410 - b _0802D43E - .pool -_0802D3DC: - movs r4, 0 - cmp r4, r5 - bge _0802D3F8 -_0802D3E2: - ldr r0, =gUnknown_02022D00 - ldr r0, [r0] - lsls r1, r4, 1 - adds r0, 0x1C - adds r0, r1 - ldrb r0, [r0] - bl ClearWindowTilemap - adds r4, 0x1 - cmp r4, r5 - blt _0802D3E2 -_0802D3F8: - movs r0, 0 - bl CopyBgTilemapBufferToVram - ldr r0, =gUnknown_02022D00 - ldr r1, [r0] - ldrh r0, [r1, 0x4] - adds r0, 0x1 - strh r0, [r1, 0x4] - b _0802D43E - .pool -_0802D410: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802D43E - movs r4, 0 - cmp r4, r5 - bge _0802D436 -_0802D420: - ldr r0, =gUnknown_02022D00 - ldr r0, [r0] - lsls r1, r4, 1 - adds r0, 0x1C - adds r0, r1 - ldrb r0, [r0] - bl RemoveWindow - adds r4, 0x1 - cmp r4, r5 - blt _0802D420 -_0802D436: - ldr r0, =gUnknown_02022D00 - ldr r1, [r0] - movs r0, 0x1 - str r0, [r1] -_0802D43E: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_802D3BC - - thumb_func_start sub_802D448 -sub_802D448: @ 802D448 - push {r4,r5,lr} - sub sp, 0xC - ldr r5, =gUnknown_02022D00 - ldr r0, [r5] - ldrh r4, [r0, 0x4] - cmp r4, 0x1 - beq _0802D4A4 - cmp r4, 0x1 - bgt _0802D464 - cmp r4, 0 - beq _0802D46A - b _0802D4EC - .pool -_0802D464: - cmp r4, 0x2 - beq _0802D4DC - b _0802D4EC -_0802D46A: - movs r0, 0x1 - movs r1, 0x8 - movs r2, 0x14 - movs r3, 0x2 - bl sub_802DA9C - ldr r1, [r5] - strh r0, [r1, 0x12] - lsls r0, 24 - lsrs r0, 24 - ldr r2, =gText_WantToPlayAgain2 - movs r1, 0x1 - str r1, [sp] - movs r1, 0xFF - str r1, [sp, 0x4] - str r4, [sp, 0x8] - movs r1, 0x1 - movs r3, 0 - bl AddTextPrinterParameterized - ldr r0, [r5] - ldrb r0, [r0, 0x12] - movs r1, 0x2 - bl CopyWindowToVram - b _0802D4D2 - .pool -_0802D4A4: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802D4EC - ldr r0, [r5] - ldrb r0, [r0, 0x12] - bl PutWindowTilemap - ldr r0, [r5] - ldrb r0, [r0, 0x12] - movs r1, 0x1 - movs r2, 0xE - bl DrawTextBorderOuter - movs r0, 0x17 - movs r1, 0x7 - movs r2, 0 - bl sub_802DB18 - movs r0, 0 - bl CopyBgTilemapBufferToVram -_0802D4D2: - ldr r1, [r5] - ldrh r0, [r1, 0x4] - adds r0, 0x1 - strh r0, [r1, 0x4] - b _0802D4EC -_0802D4DC: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802D4EC - ldr r1, [r5] - movs r0, 0x1 - str r0, [r1] -_0802D4EC: - add sp, 0xC - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_802D448 - - thumb_func_start sub_802D4F4 -sub_802D4F4: @ 802D4F4 - push {r4,r5,lr} - sub sp, 0xC - ldr r5, =gUnknown_02022D00 - ldr r0, [r5] - ldrh r4, [r0, 0x4] - cmp r4, 0x1 - beq _0802D550 - cmp r4, 0x1 - bgt _0802D510 - cmp r4, 0 - beq _0802D516 - b _0802D58E - .pool -_0802D510: - cmp r4, 0x2 - beq _0802D57E - b _0802D58E -_0802D516: - movs r0, 0x2 - movs r1, 0x7 - movs r2, 0x1A - movs r3, 0x4 - bl sub_802DA9C - ldr r1, [r5] - strh r0, [r1, 0x12] - lsls r0, 24 - lsrs r0, 24 - ldr r2, =gText_SavingDontTurnOffPower - movs r1, 0x1 - str r1, [sp] - movs r1, 0xFF - str r1, [sp, 0x4] - str r4, [sp, 0x8] - movs r1, 0x1 - movs r3, 0 - bl AddTextPrinterParameterized - ldr r0, [r5] - ldrb r0, [r0, 0x12] - movs r1, 0x2 - bl CopyWindowToVram - b _0802D574 - .pool -_0802D550: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802D58E - ldr r0, [r5] - ldrb r0, [r0, 0x12] - bl PutWindowTilemap - ldr r0, [r5] - ldrb r0, [r0, 0x12] - movs r1, 0x1 - movs r2, 0xE - bl DrawTextBorderOuter - movs r0, 0 - bl CopyBgTilemapBufferToVram -_0802D574: - ldr r1, [r5] - ldrh r0, [r1, 0x4] - adds r0, 0x1 - strh r0, [r1, 0x4] - b _0802D58E -_0802D57E: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802D58E - ldr r1, [r5] - movs r0, 0x1 - str r0, [r1] -_0802D58E: - add sp, 0xC - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_802D4F4 - - thumb_func_start sub_802D598 -sub_802D598: @ 802D598 - push {r4,r5,lr} - ldr r5, =gUnknown_02022D00 - ldr r0, [r5] - ldrh r4, [r0, 0x4] - cmp r4, 0 - beq _0802D5B0 - cmp r4, 0x1 - beq _0802D5C8 - b _0802D5DE - .pool -_0802D5B0: - bl sub_802DA14 - bl sub_8198C78 - movs r0, 0 - bl CopyBgTilemapBufferToVram - ldr r1, [r5] - ldrh r0, [r1, 0x4] - adds r0, 0x1 - strh r0, [r1, 0x4] - b _0802D5DE -_0802D5C8: - bl sub_802DA44 - cmp r0, 0 - bne _0802D5DE - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802D5DE - ldr r0, [r5] - str r4, [r0] -_0802D5DE: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_802D598 - - thumb_func_start sub_802D5E4 -sub_802D5E4: @ 802D5E4 - push {r4,r5,lr} - sub sp, 0xC - ldr r5, =gUnknown_02022D00 - ldr r0, [r5] - ldrh r4, [r0, 0x4] - cmp r4, 0x1 - beq _0802D640 - cmp r4, 0x1 - bgt _0802D600 - cmp r4, 0 - beq _0802D606 - b _0802D67E - .pool -_0802D600: - cmp r4, 0x2 - beq _0802D66E - b _0802D67E -_0802D606: - movs r0, 0x2 - movs r1, 0x8 - movs r2, 0x16 - movs r3, 0x4 - bl sub_802DA9C - ldr r1, [r5] - strh r0, [r1, 0x12] - lsls r0, 24 - lsrs r0, 24 - ldr r2, =gText_SomeoneDroppedOut2 - movs r1, 0x1 - str r1, [sp] - movs r1, 0xFF - str r1, [sp, 0x4] - str r4, [sp, 0x8] - movs r1, 0x1 - movs r3, 0 - bl AddTextPrinterParameterized - ldr r0, [r5] - ldrb r0, [r0, 0x12] - movs r1, 0x2 - bl CopyWindowToVram - b _0802D664 - .pool -_0802D640: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802D67E - ldr r0, [r5] - ldrb r0, [r0, 0x12] - bl PutWindowTilemap - ldr r0, [r5] - ldrb r0, [r0, 0x12] - movs r1, 0x1 - movs r2, 0xE - bl DrawTextBorderOuter - movs r0, 0 - bl CopyBgTilemapBufferToVram -_0802D664: - ldr r1, [r5] - ldrh r0, [r1, 0x4] - adds r0, 0x1 - strh r0, [r1, 0x4] - b _0802D67E -_0802D66E: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802D67E - ldr r1, [r5] - movs r0, 0x1 - str r0, [r1] -_0802D67E: - add sp, 0xC - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_802D5E4 - - thumb_func_start sub_802D688 -sub_802D688: @ 802D688 - push {r4,r5,lr} - sub sp, 0xC - ldr r5, =gUnknown_02022D00 - ldr r0, [r5] - ldrh r4, [r0, 0x4] - cmp r4, 0x1 - beq _0802D6E4 - cmp r4, 0x1 - bgt _0802D6A4 - cmp r4, 0 - beq _0802D6AA - b _0802D722 - .pool -_0802D6A4: - cmp r4, 0x2 - beq _0802D712 - b _0802D722 -_0802D6AA: - movs r0, 0x7 - movs r1, 0xA - movs r2, 0x10 - movs r3, 0x2 - bl sub_802DA9C - ldr r1, [r5] - strh r0, [r1, 0x12] - lsls r0, 24 - lsrs r0, 24 - ldr r2, =gText_CommunicationStandby4 - movs r1, 0x1 - str r1, [sp] - movs r1, 0xFF - str r1, [sp, 0x4] - str r4, [sp, 0x8] - movs r1, 0x1 - movs r3, 0 - bl AddTextPrinterParameterized - ldr r0, [r5] - ldrb r0, [r0, 0x12] - movs r1, 0x2 - bl CopyWindowToVram - b _0802D708 - .pool -_0802D6E4: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802D722 - ldr r0, [r5] - ldrb r0, [r0, 0x12] - bl PutWindowTilemap - ldr r0, [r5] - ldrb r0, [r0, 0x12] - movs r1, 0x1 - movs r2, 0xE - bl DrawTextBorderOuter - movs r0, 0 - bl CopyBgTilemapBufferToVram -_0802D708: - ldr r1, [r5] - ldrh r0, [r1, 0x4] - adds r0, 0x1 - strh r0, [r1, 0x4] - b _0802D722 -_0802D712: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802D722 - ldr r1, [r5] - movs r0, 0x1 - str r0, [r1] -_0802D722: - add sp, 0xC - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_802D688 - - thumb_func_start sub_802D72C -sub_802D72C: @ 802D72C - push {r4,r5,lr} - ldr r5, =gUnknown_02022D00 - ldr r0, [r5] - ldrh r4, [r0, 0x4] - cmp r4, 0 - beq _0802D744 - cmp r4, 0x1 - beq _0802D752 - b _0802D75E - .pool -_0802D744: - bl sub_802D044 - ldr r1, [r5] - ldrh r0, [r1, 0x4] - adds r0, 0x1 - strh r0, [r1, 0x4] - b _0802D75E -_0802D752: - bl sub_802D068 - cmp r0, 0 - bne _0802D75E - ldr r0, [r5] - str r4, [r0] -_0802D75E: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_802D72C - - thumb_func_start sub_802D764 -sub_802D764: @ 802D764 - push {lr} - ldr r1, =gUnknown_02022D00 - ldr r0, [r1] - movs r2, 0 - strb r2, [r0, 0xA] - ldr r0, [r1] - strb r2, [r0, 0xB] - ldr r2, [r1] - movs r0, 0x6 - strb r0, [r2, 0xC] - ldr r0, [r1] - ldrb r0, [r0, 0xC] - bl sub_802DC9C - pop {r0} - bx r0 - .pool - thumb_func_end sub_802D764 - - thumb_func_start sub_802D788 -sub_802D788: @ 802D788 - push {r4,lr} - ldr r0, =gUnknown_02022D00 - ldr r2, [r0] - ldrb r3, [r2, 0xA] - adds r4, r0, 0 - cmp r3, 0 - beq _0802D7A0 - cmp r3, 0x1 - beq _0802D7DA - b _0802D7DE - .pool -_0802D7A0: - ldrb r0, [r2, 0xB] - adds r0, 0x1 - strb r0, [r2, 0xB] - ldr r1, [r4] - ldrb r0, [r1, 0xB] - cmp r0, 0xA - bls _0802D7CA - strb r3, [r1, 0xB] - ldr r0, [r4] - ldrb r1, [r0, 0xC] - adds r1, 0x1 - strb r1, [r0, 0xC] - ldr r1, [r4] - ldrb r0, [r1, 0xC] - cmp r0, 0x9 - bls _0802D7CA - strb r3, [r1, 0xC] - ldr r1, [r4] - ldrb r0, [r1, 0xA] - adds r0, 0x1 - strb r0, [r1, 0xA] -_0802D7CA: - ldr r0, [r4] - ldrb r0, [r0, 0xC] - bl sub_802DC9C - ldr r0, [r4] - ldrb r0, [r0, 0xC] - cmp r0, 0x7 - bne _0802D7DE -_0802D7DA: - movs r0, 0 - b _0802D7E0 -_0802D7DE: - movs r0, 0x1 -_0802D7E0: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_802D788 - - thumb_func_start sub_802D7E8 -sub_802D7E8: @ 802D7E8 - push {r4,r5,lr} - sub sp, 0xC - adds r4, r1, 0 - lsls r0, 16 - lsrs r0, 16 - lsls r4, 16 - lsrs r4, 16 - ldr r5, =gUnknown_02022D00 - ldr r1, [r5] - adds r1, 0x26 - adds r2, r4, 0 - bl CopyItemNameHandlePlural - ldr r0, [r5] - adds r0, 0x66 - adds r1, r4, 0 - movs r2, 0 - movs r3, 0x1 - bl ConvertIntToDecimalStringN - bl DynamicPlaceholderTextUtil_Reset - ldr r1, [r5] - adds r1, 0x26 - movs r0, 0 - bl DynamicPlaceholderTextUtil_SetPlaceholderPtr - ldr r1, [r5] - adds r1, 0x66 - movs r0, 0x1 - bl DynamicPlaceholderTextUtil_SetPlaceholderPtr - ldr r0, [r5] - adds r0, 0xA6 - ldr r1, =gText_AwesomeWonF701F700 - bl DynamicPlaceholderTextUtil_ExpandPlaceholders - movs r0, 0x4 - movs r1, 0x8 - movs r2, 0x16 - movs r3, 0x4 - bl sub_802DA9C - ldr r2, [r5] - movs r4, 0 - movs r3, 0 - strh r0, [r2, 0x12] - lsls r0, 24 - lsrs r0, 24 - adds r2, 0xA6 - movs r1, 0x1 - str r1, [sp] - movs r1, 0xFF - str r1, [sp, 0x4] - str r3, [sp, 0x8] - movs r1, 0x1 - bl AddTextPrinterParameterized - ldr r0, [r5] - ldrb r0, [r0, 0x12] - movs r1, 0x2 - bl CopyWindowToVram - ldr r1, [r5] - ldr r0, =0x0000016f - strh r0, [r1, 0x14] - strb r4, [r1, 0xD] - add sp, 0xC - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_802D7E8 - - thumb_func_start sub_802D884 -sub_802D884: @ 802D884 - push {r4-r6,lr} - sub sp, 0xC - lsls r0, 16 - lsrs r0, 16 - ldr r4, =gUnknown_02022D00 - ldr r1, [r4] - adds r1, 0x26 - bl CopyItemName - bl DynamicPlaceholderTextUtil_Reset - ldr r1, [r4] - adds r1, 0x26 - movs r0, 0 - bl DynamicPlaceholderTextUtil_SetPlaceholderPtr - ldr r0, [r4] - adds r0, 0xA6 - ldr r1, =gText_FilledStorageSpace2 - bl DynamicPlaceholderTextUtil_ExpandPlaceholders - movs r0, 0x4 - movs r1, 0x8 - movs r2, 0x16 - movs r3, 0x4 - bl sub_802DA9C - ldr r2, [r4] - movs r6, 0 - movs r5, 0 - strh r0, [r2, 0x12] - lsls r0, 24 - lsrs r0, 24 - adds r2, 0xA6 - movs r1, 0x1 - str r1, [sp] - movs r1, 0xFF - str r1, [sp, 0x4] - str r5, [sp, 0x8] - movs r1, 0x1 - movs r3, 0 - bl AddTextPrinterParameterized - ldr r0, [r4] - ldrb r0, [r0, 0x12] - movs r1, 0x2 - bl CopyWindowToVram - ldr r0, [r4] - strh r5, [r0, 0x14] - strb r6, [r0, 0xD] - add sp, 0xC - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_802D884 - - thumb_func_start sub_802D8FC -sub_802D8FC: @ 802D8FC - push {r4-r6,lr} - sub sp, 0xC - lsls r0, 16 - lsrs r0, 16 - ldr r4, =gUnknown_02022D00 - ldr r1, [r4] - adds r1, 0x26 - bl CopyItemName - bl DynamicPlaceholderTextUtil_Reset - ldr r1, [r4] - adds r1, 0x26 - movs r0, 0 - bl DynamicPlaceholderTextUtil_SetPlaceholderPtr - ldr r0, [r4] - adds r0, 0xA6 - ldr r1, =gText_CantHoldMore - bl DynamicPlaceholderTextUtil_ExpandPlaceholders - movs r0, 0x4 - movs r1, 0x9 - movs r2, 0x16 - movs r3, 0x2 - bl sub_802DA9C - ldr r2, [r4] - movs r6, 0 - movs r5, 0 - strh r0, [r2, 0x12] - lsls r0, 24 - lsrs r0, 24 - adds r2, 0xA6 - movs r1, 0x1 - str r1, [sp] - movs r1, 0xFF - str r1, [sp, 0x4] - str r5, [sp, 0x8] - movs r1, 0x1 - movs r3, 0 - bl AddTextPrinterParameterized - ldr r0, [r4] - ldrb r0, [r0, 0x12] - movs r1, 0x2 - bl CopyWindowToVram - ldr r0, [r4] - strh r5, [r0, 0x14] - strb r6, [r0, 0xD] - add sp, 0xC - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_802D8FC - - thumb_func_start sub_802D974 -sub_802D974: @ 802D974 - push {r4,lr} - ldr r4, =gUnknown_02022D00 - ldr r0, [r4] - ldrb r0, [r0, 0xD] - cmp r0, 0x1 - beq _0802D9C8 - cmp r0, 0x1 - bgt _0802D990 - cmp r0, 0 - beq _0802D99A - b _0802DA0C - .pool -_0802D990: - cmp r0, 0x2 - beq _0802D9EE - cmp r0, 0x3 - beq _0802DA02 - b _0802DA0C -_0802D99A: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802DA0C - ldr r0, [r4] - ldrb r0, [r0, 0x12] - bl PutWindowTilemap - ldr r0, [r4] - ldrb r0, [r0, 0x12] - movs r1, 0x1 - movs r2, 0xE - bl DrawTextBorderOuter - movs r0, 0 - bl CopyBgTilemapBufferToVram - ldr r1, [r4] - ldrb r0, [r1, 0xD] - adds r0, 0x1 - strb r0, [r1, 0xD] - b _0802DA0C -_0802D9C8: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0802DA0C - ldr r1, [r4] - ldrh r0, [r1, 0x14] - cmp r0, 0 - bne _0802D9E0 - ldrb r0, [r1, 0xD] - adds r0, 0x2 - b _0802DA00 -_0802D9E0: - ldrh r0, [r1, 0x14] - bl PlayFanfare - ldr r1, [r4] - ldrb r0, [r1, 0xD] - adds r0, 0x1 - strb r0, [r1, 0xD] -_0802D9EE: - bl IsFanfareTaskInactive - lsls r0, 24 - cmp r0, 0 - beq _0802DA0C - ldr r0, =gUnknown_02022D00 - ldr r1, [r0] - ldrb r0, [r1, 0xD] - adds r0, 0x1 -_0802DA00: - strb r0, [r1, 0xD] -_0802DA02: - movs r0, 0 - b _0802DA0E - .pool -_0802DA0C: - movs r0, 0x1 -_0802DA0E: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_802D974 - - thumb_func_start sub_802DA14 -sub_802DA14: @ 802DA14 - push {r4,lr} - ldr r4, =gUnknown_02022D00 - ldr r0, [r4] - ldrh r0, [r0, 0x12] - cmp r0, 0xFF - beq _0802DA38 - lsls r0, 24 - lsrs r0, 24 - bl rbox_fill_rectangle - ldr r0, [r4] - ldrb r0, [r0, 0x12] - movs r1, 0x1 - bl CopyWindowToVram - ldr r1, [r4] - movs r0, 0 - strb r0, [r1, 0xD] -_0802DA38: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_802DA14 thumb_func_start sub_802DA44 sub_802DA44: @ 802DA44 diff --git a/asm/pokenav_unk_10.s b/asm/pokenav_unk_10.s index b24f0b406..bf621e6a6 100644 --- a/asm/pokenav_unk_10.s +++ b/asm/pokenav_unk_10.s @@ -1305,881 +1305,5 @@ _081D0E5A: bx r1 thumb_func_end sub_81D0E00 - thumb_func_start sub_81D0E60 -sub_81D0E60: @ 81D0E60 - push {r4,lr} - adds r4, r0, 0 - ldr r0, =gUnknown_08624BB8 - bl AddWindow - strh r0, [r4, 0xA] - lsls r0, 24 - lsrs r0, 24 - bl PutWindowTilemap - adds r0, r4, 0 - bl sub_81D0E84 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81D0E60 - - thumb_func_start sub_81D0E84 -sub_81D0E84: @ 81D0E84 - push {r4,r5,lr} - sub sp, 0x10 - adds r5, r0, 0 - ldr r1, =gUnknown_08624BC0 - add r0, sp, 0xC - movs r2, 0x3 - bl memcpy - ldr r4, =gStringVar1 - bl sub_81D07D8 - adds r1, r0, 0 - adds r0, r4, 0 - movs r2, 0 - movs r3, 0x2 - bl ConvertIntToDecimalStringN - bl DynamicPlaceholderTextUtil_Reset - movs r0, 0 - adds r1, r4, 0 - bl DynamicPlaceholderTextUtil_SetPlaceholderPtr - ldr r4, =gStringVar4 - ldr r1, =gText_RibbonsF700 - adds r0, r4, 0 - bl DynamicPlaceholderTextUtil_ExpandPlaceholders - ldrb r0, [r5, 0xA] - movs r1, 0x44 - bl FillWindowPixelBuffer - ldrb r0, [r5, 0xA] - add r1, sp, 0xC - str r1, [sp] - movs r1, 0x1 - negs r1, r1 - str r1, [sp, 0x4] - str r4, [sp, 0x8] - movs r1, 0x1 - movs r2, 0 - movs r3, 0x1 - bl AddTextPrinterParameterized3 - ldrb r0, [r5, 0xA] - movs r1, 0x2 - bl CopyWindowToVram - add sp, 0x10 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81D0E84 - - thumb_func_start sub_81D0EFC -sub_81D0EFC: @ 81D0EFC - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x10 - adds r7, r0, 0 - bl sub_81D0954 - adds r5, r0, 0 - ldr r1, =gUnknown_08624BC0 - add r0, sp, 0xC - movs r2, 0x3 - bl memcpy - ldrb r0, [r7, 0xA] - movs r1, 0x44 - bl FillWindowPixelBuffer - cmp r5, 0x18 - bhi _081D0F60 - lsls r1, r5, 3 - ldr r0, =gRibbonDescriptionPointers - adds r6, r1, r0 - movs r5, 0x80 - lsls r5, 17 - movs r4, 0x1 -_081D0F2E: - ldrb r0, [r7, 0xA] - lsrs r3, r5, 24 - add r1, sp, 0xC - str r1, [sp] - movs r1, 0x1 - negs r1, r1 - str r1, [sp, 0x4] - ldm r6!, {r1} - str r1, [sp, 0x8] - movs r1, 0x1 - movs r2, 0 - bl AddTextPrinterParameterized3 - movs r0, 0x80 - lsls r0, 21 - adds r5, r0 - subs r4, 0x1 - cmp r4, 0 - bge _081D0F2E - b _081D0FAA - .pool -_081D0F60: - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - adds r0, r5 - ldr r1, =0x0000318f - adds r0, r1 - ldrb r5, [r0] - cmp r5, 0 - beq _081D0FB2 - subs r5, 0x1 - movs r4, 0 - ldr r0, =gGiftRibbonDescriptionPointers - mov r8, r0 - movs r6, 0x80 - lsls r6, 17 -_081D0F7C: - ldrb r0, [r7, 0xA] - lsrs r3, r6, 24 - add r1, sp, 0xC - str r1, [sp] - movs r1, 0x1 - negs r1, r1 - str r1, [sp, 0x4] - lsls r1, r4, 2 - lsls r2, r5, 3 - adds r1, r2 - add r1, r8 - ldr r1, [r1] - str r1, [sp, 0x8] - movs r1, 0x1 - movs r2, 0 - bl AddTextPrinterParameterized3 - movs r0, 0x80 - lsls r0, 21 - adds r6, r0 - adds r4, 0x1 - cmp r4, 0x1 - ble _081D0F7C -_081D0FAA: - ldrb r0, [r7, 0xA] - movs r1, 0x2 - bl CopyWindowToVram -_081D0FB2: - add sp, 0x10 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81D0EFC - - thumb_func_start sub_81D0FCC -sub_81D0FCC: @ 81D0FCC - push {r4,lr} - adds r4, r0, 0 - ldr r0, =gUnknown_08624BC4 - bl AddWindow - strh r0, [r4, 0x8] - lsls r0, 24 - lsrs r0, 24 - bl PutWindowTilemap - adds r0, r4, 0 - bl sub_81D0FF0 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81D0FCC - - thumb_func_start sub_81D0FF0 -sub_81D0FF0: @ 81D0FF0 - push {r4-r7,lr} - sub sp, 0x10 - ldrh r7, [r0, 0x8] - ldrb r5, [r0, 0x8] - adds r0, r5, 0 - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r4, =gStringVar3 - mov r6, sp - adds r6, 0xD - adds r0, r4, 0 - add r1, sp, 0xC - adds r2, r6, 0 - bl sub_81D06E4 - movs r0, 0x1 - str r0, [sp] - movs r0, 0xFF - str r0, [sp, 0x4] - movs r0, 0 - str r0, [sp, 0x8] - adds r0, r5, 0 - movs r1, 0x1 - adds r2, r4, 0 - movs r3, 0 - bl AddTextPrinterParameterized - ldrb r0, [r6] - cmp r0, 0 - beq _081D1040 - cmp r0, 0xFE - beq _081D1048 - ldr r1, =gUnknown_08624BE4 - b _081D104A - .pool -_081D1040: - ldr r1, =gUnknown_08624BCC - b _081D104A - .pool -_081D1048: - ldr r1, =gUnknown_08624BD8 -_081D104A: - ldr r5, =gStringVar1 - adds r0, r5, 0 - bl StringCopy - movs r1, 0xBA - strb r1, [r0] - adds r0, 0x1 - movs r1, 0xF9 - strb r1, [r0] - adds r0, 0x1 - movs r1, 0x5 - strb r1, [r0] - adds r0, 0x1 - add r1, sp, 0xC - ldrb r1, [r1] - movs r2, 0 - movs r3, 0x3 - bl ConvertIntToDecimalStringN - lsls r4, r7, 24 - lsrs r4, 24 - movs r0, 0x1 - str r0, [sp] - movs r0, 0xFF - str r0, [sp, 0x4] - movs r0, 0 - str r0, [sp, 0x8] - adds r0, r4, 0 - movs r1, 0x1 - adds r2, r5, 0 - movs r3, 0x3C - bl AddTextPrinterParameterized - adds r0, r4, 0 - movs r1, 0x2 - bl CopyWindowToVram - add sp, 0x10 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81D0FF0 - - thumb_func_start sub_81D10A4 -sub_81D10A4: @ 81D10A4 - push {r4,lr} - adds r4, r0, 0 - ldr r0, =gUnknown_08624BE8 - bl AddWindow - strh r0, [r4, 0xC] - lsls r0, 24 - lsrs r0, 24 - movs r1, 0x11 - bl FillWindowPixelBuffer - ldrb r0, [r4, 0xC] - bl PutWindowTilemap - adds r0, r4, 0 - bl sub_81D10D0 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81D10A4 - - thumb_func_start sub_81D10D0 -sub_81D10D0: @ 81D10D0 - push {r4-r6,lr} - mov r6, r8 - push {r6} - sub sp, 0xC - mov r8, r0 - bl sub_81D06C4 - adds r4, r0, 0 - adds r4, 0x1 - bl sub_81D06D4 - adds r6, r0, 0 - ldr r5, =gStringVar1 - adds r0, r5, 0 - adds r1, r4, 0 - movs r2, 0x1 - movs r3, 0x3 - bl ConvertIntToDecimalStringN - movs r1, 0xBA - strb r1, [r0] - adds r0, 0x1 - adds r1, r6, 0 - movs r2, 0x1 - movs r3, 0x3 - bl ConvertIntToDecimalStringN - movs r0, 0x1 - adds r1, r5, 0 - movs r2, 0x38 - bl GetStringCenterAlignXOffset - adds r3, r0, 0 - mov r1, r8 - ldrb r0, [r1, 0xC] - lsls r3, 24 - lsrs r3, 24 - movs r1, 0x1 - str r1, [sp] - movs r1, 0xFF - str r1, [sp, 0x4] - movs r1, 0 - str r1, [sp, 0x8] - movs r1, 0x1 - adds r2, r5, 0 - bl AddTextPrinterParameterized - mov r1, r8 - ldrb r0, [r1, 0xC] - movs r1, 0x2 - bl CopyWindowToVram - add sp, 0xC - pop {r3} - mov r8, r3 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81D10D0 - - thumb_func_start sub_81D1148 -sub_81D1148: @ 81D1148 - push {r4,lr} - sub sp, 0xC - adds r4, r0, 0 - add r1, sp, 0x4 - add r2, sp, 0x8 - mov r0, sp - bl sub_81D0760 - bl ResetAllPicSprites - movs r0, 0x28 - movs r1, 0x68 - bl sub_81D1184 - strh r0, [r4, 0x10] - movs r0, 0xF - movs r1, 0 - bl sub_81C7990 - add sp, 0xC - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_81D1148 - - thumb_func_start sub_81D1178 -sub_81D1178: @ 81D1178 - push {lr} - ldrh r0, [r0, 0x10] - bl FreeAndDestroyMonPicSprite - pop {r0} - bx r0 - thumb_func_end sub_81D1178 - - thumb_func_start sub_81D1184 -sub_81D1184: @ 81D1184 - push {lr} - sub sp, 0x1C - add r1, sp, 0x14 - add r2, sp, 0x18 - add r0, sp, 0x10 - bl sub_81D0760 - add r0, sp, 0x10 - ldrh r0, [r0] - ldr r1, [sp, 0x18] - ldr r2, [sp, 0x14] - movs r3, 0x28 - str r3, [sp] - movs r3, 0x68 - str r3, [sp, 0x4] - movs r3, 0xF - str r3, [sp, 0x8] - ldr r3, =0x0000ffff - str r3, [sp, 0xC] - movs r3, 0x1 - bl CreateMonPicSprite_HandleDeoxys - lsls r0, 16 - lsrs r0, 16 - ldr r1, =gSprites - lsls r2, r0, 4 - adds r2, r0 - lsls r2, 2 - adds r2, r1 - ldrb r3, [r2, 0x5] - movs r1, 0xD - negs r1, r1 - ands r1, r3 - strb r1, [r2, 0x5] - add sp, 0x1C - pop {r1} - bx r1 - .pool - thumb_func_end sub_81D1184 - - thumb_func_start sub_81D11D8 -sub_81D11D8: @ 81D11D8 - push {lr} - ldrh r1, [r0, 0x10] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - movs r2, 0x20 - negs r2, r2 - movs r1, 0x28 - movs r3, 0x6 - bl sub_81D1258 - pop {r0} - bx r0 - .pool - thumb_func_end sub_81D11D8 - - thumb_func_start sub_81D11FC -sub_81D11FC: @ 81D11FC - push {r4,r5,lr} - adds r4, r0, 0 - ldrh r0, [r4, 0x10] - bl FreeAndDestroyMonPicSprite - movs r5, 0x20 - negs r5, r5 - adds r0, r5, 0 - movs r1, 0x68 - bl sub_81D1184 - strh r0, [r4, 0x10] - ldrh r1, [r4, 0x10] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - adds r1, r5, 0 - movs r2, 0x28 - movs r3, 0x6 - bl sub_81D1258 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81D11FC - - thumb_func_start sub_81D1234 -sub_81D1234: @ 81D1234 - ldr r2, =gSprites - ldrh r1, [r0, 0x10] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r2, 0x1C - adds r0, r2 - ldr r1, [r0] - ldr r0, =SpriteCallbackDummy - eors r1, r0 - negs r0, r1 - orrs r0, r1 - lsrs r0, 31 - bx lr - .pool - thumb_func_end sub_81D1234 - - thumb_func_start sub_81D1258 -sub_81D1258: @ 81D1258 - push {r4-r6,lr} - adds r4, r0, 0 - adds r6, r2, 0 - adds r5, r3, 0 - subs r0, r6, r1 - strh r1, [r4, 0x20] - lsls r1, 4 - strh r1, [r4, 0x2E] - lsls r0, 4 - adds r1, r5, 0 - bl __udivsi3 - strh r0, [r4, 0x30] - strh r5, [r4, 0x32] - strh r6, [r4, 0x34] - ldr r0, =sub_81D1284 - str r0, [r4, 0x1C] - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81D1258 - - thumb_func_start sub_81D1284 -sub_81D1284: @ 81D1284 - push {lr} - adds r2, r0, 0 - ldrh r1, [r2, 0x32] - movs r3, 0x32 - ldrsh r0, [r2, r3] - cmp r0, 0 - beq _081D12C8 - subs r0, r1, 0x1 - strh r0, [r2, 0x32] - ldrh r0, [r2, 0x30] - ldrh r1, [r2, 0x2E] - adds r0, r1 - strh r0, [r2, 0x2E] - lsls r0, 16 - asrs r0, 20 - strh r0, [r2, 0x20] - movs r1, 0x20 - negs r1, r1 - cmp r0, r1 - bgt _081D12BA - adds r0, r2, 0 - adds r0, 0x3E - ldrb r1, [r0] - movs r2, 0x4 - orrs r1, r2 - strb r1, [r0] - b _081D12D0 -_081D12BA: - adds r2, 0x3E - ldrb r1, [r2] - movs r0, 0x5 - negs r0, r0 - ands r0, r1 - strb r0, [r2] - b _081D12D0 -_081D12C8: - ldrh r0, [r2, 0x34] - strh r0, [r2, 0x20] - ldr r0, =SpriteCallbackDummy - str r0, [r2, 0x1C] -_081D12D0: - pop {r0} - bx r0 - .pool - thumb_func_end sub_81D1284 - - thumb_func_start sub_81D12D8 -sub_81D12D8: @ 81D12D8 - push {r4-r6,lr} - bl sub_81D1350 - ldr r5, =gUnknown_030012C0 - adds r0, r5, 0 - bl sub_81D0914 - adds r6, r0, 0 - ldr r2, =gUnknown_030012C4 - movs r1, 0 - str r1, [r2] - ldr r0, [r5] - cmp r1, r0 - bcs _081D130A - adds r4, r2, 0 -_081D12F6: - ldr r0, [r4] - ldm r6!, {r1} - bl sub_81D1370 - ldr r1, [r4] - adds r1, 0x1 - str r1, [r4] - ldr r0, [r5] - cmp r1, r0 - bcc _081D12F6 -_081D130A: - ldr r4, =gUnknown_030012C0 - adds r0, r4, 0 - bl sub_81D092C - adds r6, r0, 0 - ldr r2, =gUnknown_030012C4 - movs r1, 0 - str r1, [r2] - ldr r0, [r4] - cmp r1, r0 - bcs _081D133A - adds r4, r2, 0 -_081D1322: - ldr r0, [r4] - adds r0, 0x1B - ldm r6!, {r1} - bl sub_81D1370 - ldr r1, [r4] - adds r1, 0x1 - str r1, [r4] - ldr r0, =gUnknown_030012C0 - ldr r0, [r0] - cmp r1, r0 - bcc _081D1322 -_081D133A: - movs r0, 0x1 - bl CopyBgTilemapBufferToVram - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81D12D8 - - thumb_func_start sub_81D1350 -sub_81D1350: @ 81D1350 - push {lr} - sub sp, 0x8 - movs r0, 0x20 - str r0, [sp] - movs r0, 0x14 - str r0, [sp, 0x4] - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - movs r3, 0 - bl FillBgTilemapBufferRect_Palette0 - add sp, 0x8 - pop {r0} - bx r0 - thumb_func_end sub_81D1350 - - thumb_func_start sub_81D1370 -sub_81D1370: @ 81D1370 - push {r4-r6,lr} - sub sp, 0x10 - adds r4, r0, 0 - adds r6, r1, 0 - movs r1, 0x9 - bl __umodsi3 - adds r5, r0, 0 - lsls r5, 1 - adds r5, 0xB - adds r0, r4, 0 - movs r1, 0x9 - bl __udivsi3 - adds r4, r0, 0 - lsls r4, 1 - adds r4, 0x4 - add r0, sp, 0x8 - adds r1, r6, 0 - bl sub_81D13BC - lsls r5, 24 - lsrs r5, 24 - lsls r4, 24 - lsrs r4, 24 - movs r0, 0x2 - str r0, [sp] - str r0, [sp, 0x4] - movs r0, 0x1 - add r1, sp, 0x8 - adds r2, r5, 0 - adds r3, r4, 0 - bl CopyToBgTilemapBufferRect - add sp, 0x10 - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_81D1370 - - thumb_func_start sub_81D13BC -sub_81D13BC: @ 81D13BC - push {r4,r5,lr} - ldr r2, =gUnknown_08624BF8 - lsls r1, 2 - adds r1, r2 - ldrh r3, [r1, 0x2] - adds r3, 0x2 - lsls r3, 16 - ldrh r1, [r1] - lsls r1, 1 - adds r1, 0x1 - lsls r1, 16 - lsrs r1, 16 - lsrs r3, 4 - adds r2, r1, 0 - orrs r2, r3 - strh r2, [r0] - movs r5, 0x80 - lsls r5, 3 - adds r4, r5, 0 - orrs r2, r4 - strh r2, [r0, 0x2] - adds r1, 0x1 - orrs r1, r3 - strh r1, [r0, 0x4] - orrs r1, r4 - strh r1, [r0, 0x6] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81D13BC - - thumb_func_start sub_81D13FC -sub_81D13FC: @ 81D13FC - push {r4,lr} - adds r4, r0, 0 - ldr r0, =gUnknown_08624C78 - bl LoadCompressedSpriteSheet - ldr r0, =gUnknown_08624C80 - bl Pokenav_AllocAndLoadPalettes - ldr r0, =gUnknown_08624D04 - movs r1, 0 - movs r2, 0 - movs r3, 0 - bl CreateSprite - lsls r0, 24 - lsrs r0, 24 - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - ldr r0, =gSprites - adds r1, r0 - str r1, [r4, 0x14] - adds r1, 0x3E - ldrb r0, [r1] - movs r2, 0x4 - orrs r0, r2 - strb r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81D13FC - - thumb_func_start sub_81D1448 -sub_81D1448: @ 81D1448 - push {r4-r6,lr} - mov r6, r8 - push {r6} - adds r6, r0, 0 - bl sub_81D0944 - adds r4, r0, 0 - lsls r4, 16 - lsrs r4, 16 - adds r0, r4, 0 - movs r1, 0x9 - bl __modsi3 - adds r5, r0, 0 - lsls r5, 4 - adds r5, 0x60 - adds r0, r4, 0 - movs r1, 0x9 - bl __divsi3 - lsls r0, 4 - adds r0, 0x28 - ldr r1, [r6, 0x14] - movs r2, 0 - mov r8, r2 - strh r5, [r1, 0x20] - ldr r1, [r6, 0x14] - strh r0, [r1, 0x22] - bl sub_81D0954 - adds r4, r0, 0 - movs r0, 0x9 - bl GetSpriteTileStartByTag - ldr r3, [r6, 0x14] - ldr r1, =gUnknown_08624BF8 - lsls r4, 2 - adds r4, r1 - ldrh r1, [r4] - lsls r1, 4 - adds r0, r1 - ldr r2, =0x000003ff - adds r1, r2, 0 - ands r0, r1 - ldrh r2, [r3, 0x4] - ldr r1, =0xfffffc00 - ands r1, r2 - orrs r1, r0 - strh r1, [r3, 0x4] - ldrh r0, [r4, 0x2] - adds r0, 0xF - lsls r0, 16 - lsrs r0, 16 - bl IndexOfSpritePaletteTag - ldr r3, [r6, 0x14] - lsls r0, 4 - ldrb r2, [r3, 0x5] - movs r1, 0xF - ands r1, r2 - orrs r1, r0 - strb r1, [r3, 0x5] - ldr r0, [r6, 0x14] - movs r1, 0x1 - bl StartSpriteAffineAnim - ldr r1, [r6, 0x14] - adds r1, 0x3E - ldrb r2, [r1] - movs r0, 0x5 - negs r0, r0 - ands r0, r2 - strb r0, [r1] - ldr r0, [r6, 0x14] - mov r1, r8 - strh r1, [r0, 0x2E] - ldr r1, [r6, 0x14] - ldr r0, =sub_81D1538 - str r0, [r1, 0x1C] - pop {r3} - mov r8, r3 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81D1448 - - thumb_func_start sub_81D1500 -sub_81D1500: @ 81D1500 - push {r4,lr} - adds r4, r0, 0 - ldr r1, [r4, 0x14] - movs r0, 0x1 - strh r0, [r1, 0x2E] - ldr r0, [r4, 0x14] - movs r1, 0x2 - bl StartSpriteAffineAnim - ldr r1, [r4, 0x14] - ldr r0, =sub_81D1538 - str r0, [r1, 0x1C] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81D1500 - - thumb_func_start sub_81D1524 -sub_81D1524: @ 81D1524 - ldr r0, [r0, 0x14] - ldr r1, [r0, 0x1C] - ldr r0, =SpriteCallbackDummy - eors r1, r0 - negs r0, r1 - orrs r0, r1 - lsrs r0, 31 - bx lr - .pool - thumb_func_end sub_81D1524 - - thumb_func_start sub_81D1538 -sub_81D1538: @ 81D1538 - push {lr} - adds r3, r0, 0 - adds r0, 0x3F - ldrb r1, [r0] - movs r0, 0x20 - ands r0, r1 - cmp r0, 0 - beq _081D156A - movs r0, 0x3E - adds r0, r3 - mov r12, r0 - movs r0, 0x1 - ldrh r1, [r3, 0x2E] - ands r1, r0 - lsls r1, 2 - mov r0, r12 - ldrb r2, [r0] - movs r0, 0x5 - negs r0, r0 - ands r0, r2 - orrs r0, r1 - mov r1, r12 - strb r0, [r1] - ldr r0, =SpriteCallbackDummy - str r0, [r3, 0x1C] -_081D156A: - pop {r0} - bx r0 - .pool - thumb_func_end sub_81D1538 .align 2, 0 @ Don't pad with nop. diff --git a/asm/pokenav_unk_2.s b/asm/pokenav_unk_2.s index fd076973c..da83ccf55 100644 --- a/asm/pokenav_unk_2.s +++ b/asm/pokenav_unk_2.s @@ -5,44 +5,6 @@ @ File centered around AllocSubstruct(2) - thumb_func_start sub_81C98D4 -sub_81C98D4: @ 81C98D4 - push {r4,lr} - movs r4, 0 -_081C98D8: - adds r0, r4, 0 - bl sub_81CB0C8 - ldr r1, =gMapHeader - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r1, 0x14] - cmp r0, r1 - bne _081C9914 - adds r0, r4, 0 - bl sub_81CAE08 - cmp r0, 0 - beq _081C9914 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, =0x000009ca - adds r0, r1 - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0 - beq _081C9914 - movs r0, 0x1 - b _081C991C - .pool -_081C9914: - adds r4, 0x1 - cmp r4, 0x4D - ble _081C98D8 - movs r0, 0 -_081C991C: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_81C98D4 thumb_func_start sub_81C9924 sub_81C9924: @ 81C9924 @@ -981,7 +943,7 @@ sub_81CA0C8: @ 81CA0C8 lsls r2, r0, 3 subs r2, r0 lsls r2, 2 - ldr r1, =gUnknown_08620244 + ldr r1, =gUnknown_08620240+4 adds r0, r2, r1 subs r1, 0x4 adds r2, r1 diff --git a/asm/pokenav_unk_6.s b/asm/pokenav_unk_6.s deleted file mode 100644 index f5e017816..000000000 --- a/asm/pokenav_unk_6.s +++ /dev/null @@ -1,1752 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - -@ File centered around AllocSubstruct(0xB) - - thumb_func_start sub_81CCFD8 -sub_81CCFD8: @ 81CCFD8 - push {r4,lr} - ldr r1, =0x0000678c - movs r0, 0xB - bl AllocSubstruct - adds r4, r0, 0 - cmp r4, 0 - beq _081CD01C - ldr r1, =0x00006428 - adds r0, r4, r1 - bl sub_81D1ED4 - bl sub_81CD970 - ldr r1, =gKeyRepeatStartDelay - movs r0, 0x14 - strh r0, [r1] - ldr r0, =0x00006304 - adds r1, r4, r0 - ldr r0, =sub_81CD08C - str r0, [r1] - movs r0, 0x1 - b _081CD01E - .pool -_081CD01C: - movs r0, 0 -_081CD01E: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_81CCFD8 - - thumb_func_start sub_81CD024 -sub_81CD024: @ 81CD024 - push {r4,lr} - ldr r1, =0x0000678c - movs r0, 0xB - bl AllocSubstruct - adds r4, r0, 0 - cmp r4, 0 - beq _081CD068 - ldr r1, =0x00006428 - adds r0, r4, r1 - bl sub_81D1ED4 - bl sub_81CD9F8 - ldr r1, =gKeyRepeatStartDelay - movs r0, 0x14 - strh r0, [r1] - ldr r0, =0x00006304 - adds r1, r4, r0 - ldr r0, =sub_81CD08C - str r0, [r1] - movs r0, 0x1 - b _081CD06A - .pool -_081CD068: - movs r0, 0 -_081CD06A: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_81CD024 - - thumb_func_start sub_81CD070 -sub_81CD070: @ 81CD070 - push {lr} - movs r0, 0xB - bl GetSubstructPtr - ldr r2, =0x00006304 - adds r1, r0, r2 - ldr r1, [r1] - bl _call_via_r1 - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CD070 - - thumb_func_start sub_81CD08C -sub_81CD08C: @ 81CD08C - push {r4,r5,lr} - adds r4, r0, 0 - movs r0, 0x12 - bl GetSubstructPtr - adds r5, r0, 0 - adds r0, r4, 0 - bl sub_81CD1E4 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0 - bne _081CD100 - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - bne _081CD0D0 - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _081CD100 - movs r1, 0xC6 - lsls r1, 7 - adds r0, r4, r1 - ldrb r0, [r0] - cmp r0, 0 - bne _081CD0F0 - ldrh r1, [r5, 0x2] - ldrh r0, [r5] - subs r0, 0x1 - cmp r1, r0 - bne _081CD100 -_081CD0D0: - movs r0, 0x5 - bl PlaySE - ldr r0, =0x00006304 - adds r1, r4, r0 - ldr r0, =sub_81CD19C - str r0, [r1] - movs r2, 0x2 - b _081CD100 - .pool -_081CD0F0: - movs r0, 0x5 - bl PlaySE - movs r2, 0x5 - ldr r0, =0x00006304 - adds r1, r4, r0 - ldr r0, =sub_81CD110 - str r0, [r1] -_081CD100: - adds r0, r2, 0 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CD08C - - thumb_func_start sub_81CD110 -sub_81CD110: @ 81CD110 - push {r4-r6,lr} - sub sp, 0x4 - adds r6, r0, 0 - movs r4, 0 - bl sub_811FBA4 - lsls r0, 24 - cmp r0, 0 - bne _081CD18A - bl sub_81CEF14 - ldr r1, =0x00006786 - adds r5, r6, r1 - movs r1, 0 - ldrsb r1, [r5, r1] - ldr r2, =0x00006783 - adds r4, r6, r2 - adds r1, r4, r1 - strb r0, [r1] - movs r0, 0x12 - bl GetSubstructPtr - ldrh r1, [r0, 0x2] - lsls r1, 2 - adds r0, r1 - ldrb r2, [r0, 0x4] - ldrb r3, [r0, 0x5] - movs r0, 0 - ldrsb r0, [r5, r0] - adds r4, r0 - ldrb r1, [r4] - mov r0, sp - strb r1, [r0] - cmp r2, 0xE - bne _081CD174 - movs r0, 0x64 - muls r0, r3 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0x8 - mov r2, sp - bl SetMonData - b _081CD180 - .pool -_081CD174: - adds r0, r2, 0 - adds r1, r3, 0 - movs r2, 0x8 - mov r3, sp - bl SetBoxMonDataAt -_081CD180: - ldr r0, =0x00006304 - adds r1, r6, r0 - ldr r0, =sub_81CD08C - str r0, [r1] - movs r4, 0x6 -_081CD18A: - adds r0, r4, 0 - add sp, 0x4 - pop {r4-r6} - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CD110 - - thumb_func_start sub_81CD19C -sub_81CD19C: @ 81CD19C - push {lr} - movs r1, 0xC6 - lsls r1, 7 - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0 - beq _081CD1B4 - ldr r0, =0x000186aa - b _081CD1B6 - .pool -_081CD1B4: - ldr r0, =0x000186a2 -_081CD1B6: - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CD19C - - thumb_func_start sub_81CD1C0 -sub_81CD1C0: @ 81CD1C0 - push {lr} - movs r0, 0xB - bl GetSubstructPtr - movs r1, 0xC6 - lsls r1, 7 - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0 - bne _081CD1DA - movs r0, 0x12 - bl FreePokenavSubstruct -_081CD1DA: - movs r0, 0xB - bl FreePokenavSubstruct - pop {r0} - bx r0 - thumb_func_end sub_81CD1C0 - - thumb_func_start sub_81CD1E4 -sub_81CD1E4: @ 81CD1E4 - push {r4,lr} - adds r4, r0, 0 - movs r0, 0x12 - bl GetSubstructPtr - adds r2, r0, 0 - movs r3, 0 - ldr r0, =gMain - ldrh r1, [r0, 0x2C] - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _081CD220 - movs r1, 0xC6 - lsls r1, 7 - adds r0, r4, r1 - ldrb r0, [r0] - cmp r0, 0 - beq _081CD210 - ldrh r0, [r2, 0x2] - cmp r0, 0 - beq _081CD24E -_081CD210: - movs r0, 0x5 - bl PlaySE - movs r0, 0x1 - b _081CD246 - .pool -_081CD220: - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _081CD24E - movs r1, 0xC6 - lsls r1, 7 - adds r0, r4, r1 - ldrb r0, [r0] - cmp r0, 0 - beq _081CD23E - ldrh r1, [r2, 0x2] - ldrh r0, [r2] - subs r0, 0x1 - cmp r1, r0 - bge _081CD24E -_081CD23E: - movs r0, 0x5 - bl PlaySE - movs r0, 0 -_081CD246: - bl sub_81CD258 - lsls r0, 24 - lsrs r3, r0, 24 -_081CD24E: - adds r0, r3, 0 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_81CD1E4 - - thumb_func_start sub_81CD258 -sub_81CD258: @ 81CD258 - push {r4-r7,lr} - mov r7, r8 - push {r7} - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - movs r0, 0xB - bl GetSubstructPtr - adds r4, r0, 0 - movs r0, 0x12 - bl GetSubstructPtr - adds r5, r0, 0 - mov r0, r8 - cmp r0, 0 - beq _081CD284 - ldr r1, =0x00006788 - adds r0, r4, r1 - b _081CD288 - .pool -_081CD284: - ldr r2, =0x00006787 - adds r0, r4, r2 -_081CD288: - ldrb r0, [r0] - lsls r0, 24 - asrs r0, 24 - lsls r0, 16 - lsrs r0, 16 - adds r7, r0, 0 - ldr r1, =0x00006428 - adds r0, r4, r1 - ldr r2, =0x00006786 - adds r1, r4, r2 - movs r2, 0 - ldrsb r2, [r1, r2] - lsls r1, r2, 2 - adds r1, r2 - lsls r1, 2 - ldr r3, =0x0000643c - adds r1, r3 - adds r1, r4, r1 - lsls r2, r7, 2 - adds r2, r7 - lsls r2, 2 - adds r2, r3 - adds r2, r4, r2 - bl sub_81D1F84 - ldrh r6, [r5, 0x2] - bl sub_81CDD5C - cmp r0, 0 - beq _081CD2D8 - ldrh r1, [r5] - b _081CD2DC - .pool -_081CD2D8: - ldrh r1, [r5] - subs r1, 0x1 -_081CD2DC: - eors r1, r6 - negs r0, r1 - orrs r0, r1 - lsrs r0, 31 - adds r6, r0, 0 - mov r0, r8 - cmp r0, 0 - beq _081CD332 - ldr r1, =0x00006787 - adds r2, r4, r1 - ldrb r0, [r2] - adds r1, 0x1 - adds r3, r4, r1 - strb r0, [r3] - ldr r0, =0x00006786 - adds r1, r4, r0 - ldrb r0, [r1] - strb r0, [r2] - strb r7, [r1] - ldrb r1, [r3] - ldr r2, =0x00006789 - adds r0, r4, r2 - strb r1, [r0] - ldrh r0, [r5, 0x2] - cmp r0, 0 - bne _081CD312 - ldrh r0, [r5] -_081CD312: - subs r1, r0, 0x1 - strh r1, [r5, 0x2] - lsls r0, r1, 16 - cmp r0, 0 - beq _081CD32C - subs r1, 0x1 - b _081CD384 - .pool -_081CD32C: - ldrh r0, [r5] - subs r1, r0, 0x1 - b _081CD384 -_081CD332: - ldr r0, =0x00006788 - adds r2, r4, r0 - ldrb r0, [r2] - ldr r1, =0x00006787 - adds r3, r4, r1 - strb r0, [r3] - ldr r0, =0x00006786 - adds r1, r4, r0 - ldrb r0, [r1] - strb r0, [r2] - strb r7, [r1] - ldrb r1, [r3] - ldr r2, =0x00006789 - adds r0, r4, r2 - strb r1, [r0] - ldrh r1, [r5, 0x2] - ldrh r0, [r5] - subs r0, 0x1 - cmp r1, r0 - bge _081CD370 - adds r0, r1, 0x1 - b _081CD372 - .pool -_081CD370: - movs r0, 0 -_081CD372: - strh r0, [r5, 0x2] - ldrh r1, [r5, 0x2] - ldrh r0, [r5] - subs r0, 0x1 - cmp r1, r0 - bge _081CD382 - adds r1, 0x1 - b _081CD384 -_081CD382: - movs r1, 0 -_081CD384: - ldr r2, =0x00006302 - adds r0, r4, r2 - strh r1, [r0] - ldrh r4, [r5, 0x2] - bl sub_81CDD5C - cmp r0, 0 - beq _081CD39C - ldrh r1, [r5] - b _081CD3A0 - .pool -_081CD39C: - ldrh r1, [r5] - subs r1, 0x1 -_081CD3A0: - eors r1, r4 - negs r0, r1 - orrs r0, r1 - lsrs r0, 31 - cmp r6, 0 - bne _081CD3B0 - movs r0, 0x3 - b _081CD3BA -_081CD3B0: - cmp r0, 0 - beq _081CD3B8 - movs r0, 0x1 - b _081CD3BA -_081CD3B8: - movs r0, 0x4 -_081CD3BA: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_81CD258 - - thumb_func_start sub_81CD3C4 -sub_81CD3C4: @ 81CD3C4 - push {r4,lr} - movs r0, 0xB - bl GetSubstructPtr - adds r4, r0, 0 - movs r0, 0x12 - bl GetSubstructPtr - adds r2, r0, 0 - ldr r1, =0x0000678a - adds r0, r4, r1 - ldrb r0, [r0] - cmp r0, 0x9 - bls _081CD3E2 - b _081CD530 -_081CD3E2: - lsls r0, 2 - ldr r1, =_081CD3F4 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081CD3F4: - .4byte _081CD41C - .4byte _081CD428 - .4byte _081CD434 - .4byte _081CD440 - .4byte _081CD490 - .4byte _081CD4A8 - .4byte _081CD4C0 - .4byte _081CD4D8 - .4byte _081CD4F0 - .4byte _081CD508 -_081CD41C: - movs r1, 0x2 - ldrsh r0, [r2, r1] - movs r1, 0 - bl sub_81CD824 - b _081CD530 -_081CD428: - movs r1, 0x2 - ldrsh r0, [r2, r1] - movs r1, 0 - bl sub_81CDA1C - b _081CD530 -_081CD434: - movs r1, 0x2 - ldrsh r0, [r2, r1] - movs r1, 0 - bl sub_81CDB98 - b _081CD530 -_081CD440: - ldrh r0, [r2] - cmp r0, 0x1 - bne _081CD468 - ldr r2, =0x00006786 - adds r0, r4, r2 - movs r1, 0 - strb r1, [r0] - adds r2, 0x1 - adds r0, r4, r2 - strb r1, [r0] - adds r2, 0x1 - adds r0, r4, r2 - strb r1, [r0] - adds r2, 0x2 - adds r0, r4, r2 - strb r1, [r0] - movs r0, 0x1 - b _081CD53C - .pool -_081CD468: - ldr r0, =0x00006786 - adds r1, r4, r0 - movs r0, 0 - strb r0, [r1] - ldr r2, =0x00006787 - adds r1, r4, r2 - movs r0, 0x1 - strb r0, [r1] - ldr r0, =0x00006788 - adds r1, r4, r0 - movs r0, 0x2 - strb r0, [r1] - b _081CD530 - .pool -_081CD490: - ldrh r0, [r2, 0x2] - adds r0, 0x1 - ldrh r2, [r2] - cmp r0, r2 - blt _081CD49C - movs r0, 0 -_081CD49C: - lsls r0, 16 - asrs r0, 16 - movs r1, 0x1 - bl sub_81CD824 - b _081CD530 -_081CD4A8: - ldrh r0, [r2, 0x2] - adds r0, 0x1 - ldrh r2, [r2] - cmp r0, r2 - blt _081CD4B4 - movs r0, 0 -_081CD4B4: - lsls r0, 16 - asrs r0, 16 - movs r1, 0x1 - bl sub_81CDA1C - b _081CD530 -_081CD4C0: - ldrh r0, [r2, 0x2] - adds r0, 0x1 - ldrh r2, [r2] - cmp r0, r2 - blt _081CD4CC - movs r0, 0 -_081CD4CC: - lsls r0, 16 - asrs r0, 16 - movs r1, 0x1 - bl sub_81CDB98 - b _081CD530 -_081CD4D8: - ldrh r0, [r2, 0x2] - subs r0, 0x1 - cmp r0, 0 - bge _081CD4E4 - ldrh r0, [r2] - subs r0, 0x1 -_081CD4E4: - lsls r0, 16 - asrs r0, 16 - movs r1, 0x2 - bl sub_81CD824 - b _081CD530 -_081CD4F0: - ldrh r0, [r2, 0x2] - subs r0, 0x1 - cmp r0, 0 - bge _081CD4FC - ldrh r0, [r2] - subs r0, 0x1 -_081CD4FC: - lsls r0, 16 - asrs r0, 16 - movs r1, 0x2 - bl sub_81CDA1C - b _081CD530 -_081CD508: - ldrh r0, [r2, 0x2] - subs r0, 0x1 - cmp r0, 0 - bge _081CD514 - ldrh r0, [r2] - subs r0, 0x1 -_081CD514: - lsls r0, 16 - asrs r0, 16 - movs r1, 0x2 - bl sub_81CDB98 - ldr r2, =0x0000678a - adds r1, r4, r2 - movs r0, 0 - strb r0, [r1] - movs r0, 0x1 - b _081CD53C - .pool -_081CD530: - ldr r0, =0x0000678a - adds r1, r4, r0 - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - movs r0, 0 -_081CD53C: - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CD3C4 - - thumb_func_start sub_81CD548 -sub_81CD548: @ 81CD548 - push {r4,r5,lr} - lsls r0, 24 - lsrs r4, r0, 24 - adds r5, r4, 0 - movs r0, 0xB - bl GetSubstructPtr - adds r1, r0, 0 - cmp r4, 0x1 - beq _081CD588 - cmp r4, 0x1 - bgt _081CD566 - cmp r4, 0 - beq _081CD56C - b _081CD5C4 -_081CD566: - cmp r5, 0x2 - beq _081CD5A4 - b _081CD5C4 -_081CD56C: - ldr r2, =0x00006302 - adds r0, r1, r2 - movs r2, 0 - ldrsh r0, [r0, r2] - ldr r2, =0x00006789 - adds r1, r2 - ldrb r1, [r1] - bl sub_81CD824 - b _081CD5C4 - .pool -_081CD588: - ldr r2, =0x00006302 - adds r0, r1, r2 - movs r2, 0 - ldrsh r0, [r0, r2] - ldr r2, =0x00006789 - adds r1, r2 - ldrb r1, [r1] - bl sub_81CDA1C - b _081CD5C4 - .pool -_081CD5A4: - ldr r2, =0x00006302 - adds r0, r1, r2 - movs r2, 0 - ldrsh r0, [r0, r2] - ldr r2, =0x00006789 - adds r1, r2 - ldrb r1, [r1] - bl sub_81CDB98 - movs r0, 0x1 - b _081CD5C6 - .pool -_081CD5C4: - movs r0, 0 -_081CD5C6: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_81CD548 - - thumb_func_start sub_81CD5CC -sub_81CD5CC: @ 81CD5CC - push {r4,lr} - adds r4, r0, 0 - lsls r2, 16 - lsrs r2, 16 - b _081CD5E4 -_081CD5D6: - strb r3, [r4] - adds r1, 0x1 - adds r4, 0x1 - lsls r0, r2, 16 - ldr r2, =0xffff0000 - adds r0, r2 - lsrs r2, r0, 16 -_081CD5E4: - ldrb r3, [r1] - adds r0, r3, 0 - cmp r0, 0xFF - bne _081CD5D6 - adds r1, r2, 0 - lsls r0, r1, 16 - ldr r2, =0xffff0000 - adds r0, r2 - lsrs r2, r0, 16 - lsls r1, 16 - cmp r1, 0 - ble _081CD612 - movs r3, 0 -_081CD5FE: - strb r3, [r4] - adds r4, 0x1 - adds r1, r2, 0 - lsls r0, r1, 16 - ldr r2, =0xffff0000 - adds r0, r2 - lsrs r2, r0, 16 - lsls r1, 16 - cmp r1, 0 - bgt _081CD5FE -_081CD612: - movs r0, 0xFF - strb r0, [r4] - adds r0, r4, 0 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CD5CC - - thumb_func_start sub_81CD624 -sub_81CD624: @ 81CD624 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - adds r5, r0, 0 - adds r4, r1, 0 - lsls r4, 16 - lsrs r4, 16 - lsls r2, 24 - lsrs r2, 24 - mov r10, r2 - movs r0, 0x12 - bl GetSubstructPtr - lsls r4, 2 - adds r0, r4 - ldrb r4, [r0, 0x4] - mov r8, r4 - ldrb r6, [r0, 0x5] - mov r9, r6 - movs r0, 0xFC - strb r0, [r5] - adds r5, 0x1 - movs r0, 0x4 - strb r0, [r5] - adds r5, 0x1 - movs r0, 0x8 - strb r0, [r5] - adds r5, 0x1 - movs r0, 0 - strb r0, [r5] - adds r5, 0x1 - movs r0, 0x9 - strb r0, [r5] - adds r5, 0x1 - adds r0, r4, 0 - adds r1, r6, 0 - movs r2, 0x2D - movs r3, 0 - bl GetBoxOrPartyMonData - cmp r0, 0 - beq _081CD690 - ldr r1, =gText_EggNickname - adds r0, r5, 0 - movs r2, 0 - movs r3, 0xC - bl StringCopyPadded - b _081CD80E - .pool -_081CD690: - adds r0, r4, 0 - adds r1, r6, 0 - movs r2, 0x2 - adds r3, r5, 0 - bl GetBoxOrPartyMonData - adds r0, r5, 0 - bl StringGetEnd10 - adds r0, r4, 0 - adds r1, r6, 0 - movs r2, 0xB - movs r3, 0 - bl GetBoxOrPartyMonData - lsls r0, 16 - lsrs r7, r0, 16 - cmp r4, 0xE - bne _081CD6E0 - movs r0, 0x64 - adds r4, r6, 0 - muls r4, r0 - ldr r0, =gPlayerParty - adds r4, r0 - adds r0, r4, 0 - movs r1, 0x38 - bl GetMonData - lsls r0, 16 - lsrs r0, 16 - mov r8, r0 - adds r0, r4, 0 - bl GetMonGender - lsls r0, 24 - lsrs r6, r0, 24 - b _081CD6FE - .pool -_081CD6E0: - mov r0, r8 - mov r1, r9 - bl GetBoxedMonPtr - adds r4, r0, 0 - bl GetBoxMonGender - lsls r0, 24 - lsrs r6, r0, 24 - adds r0, r4, 0 - bl GetLevelFromBoxMonExp - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 -_081CD6FE: - cmp r7, 0x1D - beq _081CD706 - cmp r7, 0x20 - bne _081CD71C -_081CD706: - movs r0, 0xB - adds r1, r7, 0 - muls r1, r0 - ldr r0, =gSpeciesNames - adds r1, r0 - adds r0, r5, 0 - bl StringCompare - cmp r0, 0 - bne _081CD71C - movs r6, 0xFF -_081CD71C: - adds r3, r5, 0 - b _081CD726 - .pool -_081CD724: - adds r3, 0x1 -_081CD726: - ldrb r0, [r3] - cmp r0, 0xFF - bne _081CD724 - movs r1, 0xFC - strb r1, [r3] - adds r3, 0x1 - movs r0, 0x12 - strb r0, [r3] - adds r3, 0x1 - movs r0, 0x3C - strb r0, [r3] - adds r3, 0x1 - cmp r6, 0 - beq _081CD74A - cmp r6, 0xFE - beq _081CD76E - movs r0, 0x77 - b _081CD790 -_081CD74A: - strb r1, [r3] - adds r3, 0x1 - movs r0, 0x1 - strb r0, [r3] - adds r3, 0x1 - movs r0, 0x4 - strb r0, [r3] - adds r3, 0x1 - strb r1, [r3] - adds r3, 0x1 - movs r0, 0x3 - strb r0, [r3] - adds r3, 0x1 - movs r0, 0x5 - strb r0, [r3] - adds r3, 0x1 - movs r0, 0xB5 - b _081CD790 -_081CD76E: - strb r1, [r3] - adds r3, 0x1 - movs r0, 0x1 - strb r0, [r3] - adds r3, 0x1 - movs r0, 0x6 - strb r0, [r3] - adds r3, 0x1 - strb r1, [r3] - adds r3, 0x1 - movs r0, 0x3 - strb r0, [r3] - adds r3, 0x1 - movs r0, 0x7 - strb r0, [r3] - adds r3, 0x1 - movs r0, 0xB6 -_081CD790: - strb r0, [r3] - adds r3, 0x1 - movs r0, 0xFC - strb r0, [r3] - adds r3, 0x1 - movs r0, 0x4 - strb r0, [r3] - adds r3, 0x1 - movs r0, 0x8 - strb r0, [r3] - adds r3, 0x1 - movs r5, 0 - strb r5, [r3] - adds r3, 0x1 - movs r0, 0x9 - strb r0, [r3] - adds r3, 0x1 - movs r0, 0xBA - strb r0, [r3] - adds r3, 0x1 - movs r0, 0xF9 - strb r0, [r3] - adds r3, 0x1 - movs r0, 0x5 - strb r0, [r3] - adds r3, 0x1 - adds r4, r3, 0 - adds r0, r4, 0 - mov r1, r8 - movs r2, 0 - movs r3, 0x3 - bl ConvertIntToDecimalStringN - adds r3, r0, 0 - subs r4, r3, r4 - lsls r4, 16 - lsrs r4, 16 - strb r5, [r3] - adds r3, 0x1 - mov r0, r10 - cmp r0, 0 - bne _081CD808 - movs r0, 0x3 - subs r0, r4 - lsls r0, 16 - ldr r1, =0xffff0000 - adds r0, r1 - lsrs r4, r0, 16 - ldr r0, =0x0000ffff - cmp r4, r0 - beq _081CD808 - movs r2, 0 - adds r1, r0, 0 -_081CD7FA: - strb r2, [r3] - adds r3, 0x1 - subs r0, r4, 0x1 - lsls r0, 16 - lsrs r4, r0, 16 - cmp r4, r1 - bne _081CD7FA -_081CD808: - movs r0, 0xFF - strb r0, [r3] - adds r0, r3, 0 -_081CD80E: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CD624 - - thumb_func_start sub_81CD824 -sub_81CD824: @ 81CD824 - push {r4-r7,lr} - mov r7, r8 - push {r7} - lsls r0, 16 - lsrs r0, 16 - mov r8, r0 - lsls r1, 24 - lsrs r6, r1, 24 - movs r0, 0xB - bl GetSubstructPtr - adds r5, r0, 0 - movs r0, 0x12 - bl GetSubstructPtr - adds r7, r0, 0 - mov r1, r8 - lsls r0, r1, 16 - asrs r4, r0, 16 - bl sub_81CDD5C - cmp r0, 0 - beq _081CD85A - ldrh r2, [r7] - cmp r4, r2 - bne _081CD862 - b _081CD900 -_081CD85A: - ldrh r0, [r7] - subs r0, 0x1 - cmp r4, r0 - beq _081CD900 -_081CD862: - lsls r0, r6, 6 - ldr r1, =0x00006368 - adds r0, r1 - adds r0, r5, r0 - mov r2, r8 - lsls r4, r2, 16 - lsrs r1, r4, 16 - movs r2, 0 - bl sub_81CD624 - asrs r4, 14 - adds r4, r7, r4 - ldrb r3, [r4, 0x4] - lsls r0, r6, 1 - adds r0, r6 - lsls r4, r0, 3 - ldr r1, =0x00006320 - adds r0, r5, r1 - adds r0, r4 - movs r2, 0 - movs r1, 0xFC - strb r1, [r0] - ldr r1, =0x00006321 - adds r0, r5, r1 - adds r0, r4 - movs r1, 0x4 - strb r1, [r0] - ldr r1, =0x00006322 - adds r0, r5, r1 - adds r0, r4 - movs r1, 0x8 - strb r1, [r0] - ldr r1, =0x00006323 - adds r0, r5, r1 - adds r0, r4 - strb r2, [r0] - ldr r2, =0x00006324 - adds r0, r5, r2 - adds r0, r4 - movs r1, 0x9 - strb r1, [r0] - cmp r3, 0xE - bne _081CD8E4 - adds r0, r4, r5 - ldr r1, =0x00006325 - adds r0, r1 - ldr r1, =gText_InParty - b _081CD8F4 - .pool -_081CD8E4: - adds r4, r5 - ldr r2, =0x00006325 - adds r4, r2 - adds r0, r3, 0 - bl GetBoxNamePtr - adds r1, r0, 0 - adds r0, r4, 0 -_081CD8F4: - movs r2, 0x8 - bl sub_81CD5CC - b _081CD95C - .pool -_081CD900: - movs r1, 0 - lsls r4, r6, 6 - lsls r0, r6, 1 - mov r8, r0 - adds r3, r4, 0 - ldr r0, =0x00006368 - adds r2, r5, r0 - movs r7, 0 -_081CD910: - adds r0, r1, r3 - adds r0, r2, r0 - strb r7, [r0] - adds r0, r1, 0x1 - lsls r0, 16 - lsrs r1, r0, 16 - cmp r1, 0xB - bls _081CD910 - adds r1, r4 - ldr r2, =0x00006368 - adds r0, r5, r2 - adds r0, r1 - movs r1, 0xFF - strb r1, [r0] - movs r1, 0 - mov r2, r8 - adds r0, r2, r6 - lsls r3, r0, 3 - ldr r0, =0x00006320 - adds r2, r5, r0 - movs r4, 0 -_081CD93A: - adds r0, r1, r3 - adds r0, r2, r0 - strb r4, [r0] - adds r0, r1, 0x1 - lsls r0, 16 - lsrs r1, r0, 16 - cmp r1, 0x7 - bls _081CD93A - mov r2, r8 - adds r0, r2, r6 - lsls r0, 3 - adds r0, r1, r0 - ldr r2, =0x00006320 - adds r1, r5, r2 - adds r1, r0 - movs r0, 0xFF - strb r0, [r1] -_081CD95C: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CD824 - - thumb_func_start sub_81CD970 -sub_81CD970: @ 81CD970 - push {r4-r7,lr} - movs r0, 0xB - bl GetSubstructPtr - adds r7, r0, 0 - ldr r1, =0x000006ac - movs r0, 0x12 - bl AllocSubstruct - adds r6, r0, 0 - movs r0, 0xC6 - lsls r0, 7 - adds r1, r7, r0 - movs r0, 0 - strb r0, [r1] - movs r4, 0 - movs r5, 0 - b _081CD9C4 - .pool -_081CD998: - movs r0, 0x64 - muls r0, r4 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0x2D - bl GetMonData - adds r2, r0, 0 - cmp r2, 0 - bne _081CD9BE - lsls r1, r5, 2 - adds r1, r6, r1 - movs r0, 0xE - strb r0, [r1, 0x4] - strb r4, [r1, 0x5] - strh r2, [r1, 0x6] - adds r0, r5, 0x1 - lsls r0, 16 - lsrs r5, r0, 16 -_081CD9BE: - adds r0, r4, 0x1 - lsls r0, 16 - lsrs r4, r0, 16 -_081CD9C4: - bl CalculatePlayerPartyCount - lsls r0, 24 - lsrs r0, 24 - cmp r4, r0 - bcc _081CD998 - lsls r0, r5, 2 - adds r0, r6, r0 - movs r1, 0 - strb r1, [r0, 0x4] - strb r1, [r0, 0x5] - movs r2, 0 - strh r1, [r0, 0x6] - strh r1, [r6, 0x2] - adds r0, r5, 0x1 - strh r0, [r6] - ldr r1, =0x0000678a - adds r0, r7, r1 - strb r2, [r0] - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CD970 - - thumb_func_start sub_81CD9F8 -sub_81CD9F8: @ 81CD9F8 - push {lr} - movs r0, 0xB - bl GetSubstructPtr - movs r1, 0xC6 - lsls r1, 7 - adds r2, r0, r1 - movs r3, 0 - movs r1, 0x1 - strb r1, [r2] - ldr r1, =0x0000678a - adds r0, r1 - strb r3, [r0] - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CD9F8 - - thumb_func_start sub_81CDA1C -sub_81CDA1C: @ 81CDA1C - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - lsls r0, 16 - lsrs r6, r0, 16 - lsls r1, 24 - lsrs r1, 24 - mov r9, r1 - movs r0, 0xB - bl GetSubstructPtr - mov r8, r0 - movs r0, 0x12 - bl GetSubstructPtr - adds r4, r0, 0 - lsls r0, r6, 16 - asrs r5, r0, 16 - bl sub_81CDD5C - cmp r0, 0 - beq _081CDA52 - ldrh r0, [r4] - cmp r5, r0 - bne _081CDA5A - b _081CDB48 -_081CDA52: - ldrh r0, [r4] - subs r0, 0x1 - cmp r5, r0 - beq _081CDB48 -_081CDA5A: - lsls r0, r6, 16 - asrs r0, 14 - adds r0, r4, r0 - ldrb r6, [r0, 0x4] - ldrb r7, [r0, 0x5] - adds r0, r6, 0 - adds r1, r7, 0 - movs r2, 0x16 - movs r3, 0 - bl GetBoxOrPartyMonData - mov r1, r9 - lsls r5, r1, 2 - adds r4, r5, r1 - ldr r1, =0x00006428 - add r1, r8 - adds r1, r4 - strb r0, [r1] - adds r0, r6, 0 - adds r1, r7, 0 - movs r2, 0x2F - movs r3, 0 - bl GetBoxOrPartyMonData - ldr r1, =0x00006429 - add r1, r8 - adds r1, r4 - strb r0, [r1] - adds r0, r6, 0 - adds r1, r7, 0 - movs r2, 0x21 - movs r3, 0 - bl GetBoxOrPartyMonData - ldr r1, =0x0000642a - add r1, r8 - adds r1, r4 - strb r0, [r1] - adds r0, r6, 0 - adds r1, r7, 0 - movs r2, 0x18 - movs r3, 0 - bl GetBoxOrPartyMonData - ldr r1, =0x0000642b - add r1, r8 - adds r1, r4 - strb r0, [r1] - adds r0, r6, 0 - adds r1, r7, 0 - movs r2, 0x17 - movs r3, 0 - bl GetBoxOrPartyMonData - ldr r1, =0x0000642c - add r1, r8 - adds r1, r4 - strb r0, [r1] - movs r0, 0xCF - lsls r0, 7 - add r0, r8 - mov r2, r9 - adds r4, r0, r2 - adds r0, r6, 0 - adds r1, r7, 0 - movs r2, 0x30 - movs r3, 0 - bl GetBoxOrPartyMonData - cmp r0, 0xFF - beq _081CDB10 - adds r0, r6, 0 - adds r1, r7, 0 - movs r2, 0x30 - movs r3, 0 - bl GetBoxOrPartyMonData - movs r1, 0x1D - bl __udivsi3 - b _081CDB12 - .pool -_081CDB10: - movs r0, 0x9 -_081CDB12: - strb r0, [r4] - adds r0, r6, 0 - adds r1, r7, 0 - movs r2, 0x8 - movs r3, 0 - bl GetBoxOrPartyMonData - ldr r1, =0x00006783 - add r1, r8 - add r1, r9 - strb r0, [r1] - mov r0, r9 - adds r1, r5, r0 - ldr r2, =0x00006428 - adds r0, r1, r2 - add r0, r8 - lsls r1, 2 - adds r2, 0x14 - adds r1, r2 - add r1, r8 - bl sub_81D2754 - b _081CDB80 - .pool -_081CDB48: - movs r2, 0 - mov r0, r9 - lsls r5, r0, 2 - add r5, r9 - ldr r4, =0x00006428 - add r4, r8 - lsls r3, r5, 2 - mov r9, r2 - ldr r7, =0x0000643c - movs r6, 0x9B -_081CDB5C: - adds r0, r2, r5 - adds r0, r4, r0 - mov r1, r9 - strb r1, [r0] - lsls r0, r2, 2 - adds r0, r3 - add r0, r8 - adds r1, r0, r7 - strh r6, [r1] - ldr r1, =0x0000643e - adds r0, r1 - movs r1, 0x5B - strh r1, [r0] - adds r0, r2, 0x1 - lsls r0, 16 - lsrs r2, r0, 16 - cmp r2, 0x4 - bls _081CDB5C -_081CDB80: - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CDA1C - - thumb_func_start sub_81CDB98 -sub_81CDB98: @ 81CDB98 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x4 - lsls r0, 16 - lsrs r6, r0, 16 - lsls r1, 24 - lsrs r1, 24 - mov r9, r1 - movs r0, 0xB - bl GetSubstructPtr - adds r7, r0, 0 - movs r0, 0x12 - bl GetSubstructPtr - adds r4, r0, 0 - lsls r0, r6, 16 - asrs r5, r0, 16 - bl sub_81CDD5C - cmp r0, 0 - beq _081CDBCC - ldrh r0, [r4] - b _081CDBD0 -_081CDBCC: - ldrh r0, [r4] - subs r0, 0x1 -_081CDBD0: - cmp r5, r0 - beq _081CDC3E - lsls r0, r6, 16 - asrs r0, 14 - adds r0, r4, r0 - ldrb r5, [r0, 0x4] - ldrb r6, [r0, 0x5] - adds r0, r5, 0 - adds r1, r6, 0 - movs r2, 0x41 - movs r3, 0 - bl GetBoxOrPartyMonData - adds r4, r0, 0 - lsls r4, 16 - lsrs r4, 16 - adds r0, r5, 0 - adds r1, r6, 0 - movs r2, 0x1 - movs r3, 0 - bl GetBoxOrPartyMonData - mov r8, r0 - adds r0, r5, 0 - adds r1, r6, 0 - movs r2, 0 - movs r3, 0 - bl GetBoxOrPartyMonData - adds r5, r0, 0 - lsls r0, r4, 3 - ldr r1, =gMonFrontPicTable - adds r0, r1 - mov r2, r9 - lsls r1, r2, 13 - movs r2, 0xC0 - lsls r2, 2 - adds r1, r2 - adds r1, r7, r1 - movs r2, 0x1 - str r2, [sp] - adds r2, r4, 0 - adds r3, r5, 0 - bl LoadSpecialPokePic - adds r0, r4, 0 - mov r1, r8 - adds r2, r5, 0 - bl GetFrontSpritePalFromSpeciesAndPersonality - mov r2, r9 - lsls r1, r2, 7 - adds r1, r7, r1 - bl LZ77UnCompWram -_081CDC3E: - add sp, 0x4 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CDB98 - - thumb_func_start sub_81CDC50 -sub_81CDC50: @ 81CDC50 - push {lr} - movs r0, 0x12 - bl GetSubstructPtr - ldrh r0, [r0] - pop {r1} - bx r1 - thumb_func_end sub_81CDC50 - - thumb_func_start sub_81CDC60 -sub_81CDC60: @ 81CDC60 - push {lr} - movs r0, 0x12 - bl GetSubstructPtr - ldrh r0, [r0, 0x2] - pop {r1} - bx r1 - thumb_func_end sub_81CDC60 - - thumb_func_start sub_81CDC70 -sub_81CDC70: @ 81CDC70 - push {lr} - movs r0, 0xB - bl GetSubstructPtr - ldr r1, =0x00006428 - adds r0, r1 - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CDC70 - - thumb_func_start sub_81CDC84 -sub_81CDC84: @ 81CDC84 - push {lr} - movs r0, 0xB - bl GetSubstructPtr - ldr r1, =0x00006786 - adds r0, r1 - ldrb r0, [r0] - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CDC84 - - thumb_func_start sub_81CDC9C -sub_81CDC9C: @ 81CDC9C - push {lr} - movs r0, 0xB - bl GetSubstructPtr - ldr r1, =0x00006302 - adds r0, r1 - ldrb r0, [r0] - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CDC9C - - thumb_func_start sub_81CDCB4 -sub_81CDCB4: @ 81CDCB4 - push {r4,lr} - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - movs r0, 0xB - bl GetSubstructPtr - lsls r4, 13 - movs r1, 0xC0 - lsls r1, 2 - adds r4, r1 - adds r0, r4 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_81CDCB4 - - thumb_func_start sub_81CDCD4 -sub_81CDCD4: @ 81CDCD4 - push {r4,lr} - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - movs r0, 0xB - bl GetSubstructPtr - lsls r4, 7 - adds r0, r4 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_81CDCD4 - - thumb_func_start sub_81CDCEC -sub_81CDCEC: @ 81CDCEC - push {lr} - movs r0, 0xB - bl GetSubstructPtr - ldr r1, =0x00006789 - adds r0, r1 - ldrb r0, [r0] - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CDCEC - - thumb_func_start sub_81CDD04 -sub_81CDD04: @ 81CDD04 - push {r4,lr} - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - movs r0, 0xB - bl GetSubstructPtr - lsls r4, 6 - ldr r1, =0x00006368 - adds r4, r1 - adds r0, r4 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CDD04 - - thumb_func_start sub_81CDD24 -sub_81CDD24: @ 81CDD24 - push {r4,lr} - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - movs r0, 0xB - bl GetSubstructPtr - lsls r1, r4, 1 - adds r1, r4 - lsls r1, 3 - ldr r2, =0x00006320 - adds r1, r2 - adds r0, r1 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CDD24 - - thumb_func_start sub_81CDD48 -sub_81CDD48: @ 81CDD48 - push {lr} - movs r0, 0x12 - bl GetSubstructPtr - ldrh r1, [r0, 0x2] - lsls r1, 2 - adds r0, r1 - ldrh r0, [r0, 0x6] - pop {r1} - bx r1 - thumb_func_end sub_81CDD48 - - thumb_func_start sub_81CDD5C -sub_81CDD5C: @ 81CDD5C - push {lr} - movs r0, 0xB - bl GetSubstructPtr - movs r1, 0xC6 - lsls r1, 7 - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0x1 - beq _081CDD74 - movs r0, 0 - b _081CDD76 -_081CDD74: - movs r0, 0x1 -_081CDD76: - pop {r1} - bx r1 - thumb_func_end sub_81CDD5C - - thumb_func_start sub_81CDD7C -sub_81CDD7C: @ 81CDD7C - push {lr} - movs r0, 0xB - bl GetSubstructPtr - adds r2, r0, 0 - movs r1, 0xC6 - lsls r1, 7 - adds r0, r2, r1 - ldrb r0, [r0] - cmp r0, 0x1 - beq _081CDD96 - movs r0, 0 - b _081CDDA6 -_081CDD96: - ldr r3, =0x00006786 - adds r0, r2, r3 - movs r1, 0 - ldrsb r1, [r0, r1] - subs r3, 0x3 - adds r0, r2, r3 - adds r0, r1 - ldrb r0, [r0] -_081CDDA6: - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CDD7C - - thumb_func_start sub_81CDDB0 -sub_81CDDB0: @ 81CDDB0 - push {lr} - movs r0, 0xB - bl GetSubstructPtr - ldr r2, =0x00006786 - adds r1, r0, r2 - ldrb r1, [r1] - lsls r1, 24 - asrs r1, 24 - subs r2, 0x6 - adds r0, r2 - adds r0, r1 - ldrb r0, [r0] - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CDDB0 - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/pokenav_unk_7.s b/asm/pokenav_unk_7.s deleted file mode 100644 index 6c363c01f..000000000 --- a/asm/pokenav_unk_7.s +++ /dev/null @@ -1,2001 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - -@ File centered around AllocSubstruct(0xC) - - thumb_func_start sub_81CDDD4 -sub_81CDDD4: @ 81CDDD4 - push {r4,lr} - ldr r1, =0x000038ac - movs r0, 0xC - bl AllocSubstruct - adds r4, r0, 0 - cmp r4, 0 - beq _081CDE24 - ldr r0, =0x00001816 - adds r1, r4, r0 - movs r0, 0xFF - strb r0, [r1] - ldr r0, =sub_81CDE94 - movs r1, 0x1 - bl CreateLoopedTask - str r0, [r4] - ldr r0, =0x00001810 - adds r1, r4, r0 - ldr r0, =sub_81CDE80 - str r0, [r1] - ldr r0, =0x00002908 - adds r1, r4, r0 - movs r0, 0 - strb r0, [r1] - movs r0, 0x1 - b _081CDE26 - .pool -_081CDE24: - movs r0, 0 -_081CDE26: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_81CDDD4 - - thumb_func_start sub_81CDE2C -sub_81CDE2C: @ 81CDE2C - push {r4,r5,lr} - adds r4, r0, 0 - movs r0, 0xC - bl GetSubstructPtr - adds r5, r0, 0 - ldr r0, =gUnknown_08623384 - lsls r4, 2 - adds r4, r0 - ldr r0, [r4] - movs r1, 0x1 - bl CreateLoopedTask - str r0, [r5] - ldr r0, =0x00001810 - adds r5, r0 - ldr r0, =sub_81CDE80 - str r0, [r5] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CDE2C - - thumb_func_start sub_81CDE64 -sub_81CDE64: @ 81CDE64 - push {lr} - movs r0, 0xC - bl GetSubstructPtr - ldr r1, =0x00001810 - adds r0, r1 - ldr r0, [r0] - bl _call_via_r0 - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CDE64 - - thumb_func_start sub_81CDE80 -sub_81CDE80: @ 81CDE80 - push {lr} - movs r0, 0xC - bl GetSubstructPtr - ldr r0, [r0] - bl IsLoopedTaskActive - pop {r1} - bx r1 - thumb_func_end sub_81CDE80 - - thumb_func_start sub_81CDE94 -sub_81CDE94: @ 81CDE94 - push {r4-r6,lr} - sub sp, 0xC - adds r4, r0, 0 - movs r0, 0xC - bl GetSubstructPtr - adds r5, r0, 0 - cmp r4, 0x14 - bls _081CDEA8 - b _081CE2C4 -_081CDEA8: - lsls r0, r4, 2 - ldr r1, =_081CDEB8 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081CDEB8: - .4byte _081CDF0C - .4byte _081CDF18 - .4byte _081CDF94 - .4byte _081CDFB8 - .4byte _081CE030 - .4byte _081CE074 - .4byte _081CE0B0 - .4byte _081CE118 - .4byte _081CE120 - .4byte _081CE126 - .4byte _081CE136 - .4byte _081CE146 - .4byte _081CE156 - .4byte _081CE16C - .4byte _081CE1C8 - .4byte _081CE1EC - .4byte _081CE218 - .4byte _081CE23C - .4byte _081CE24A - .4byte _081CE25A - .4byte _081CE262 -_081CDF0C: - bl sub_81CD3C4 - cmp r0, 0x1 - beq _081CDF16 - b _081CE2C0 -_081CDF16: - b _081CDFB0 -_081CDF18: - ldr r0, =gUnknown_08623358 - movs r1, 0x3 - bl InitBgTemplates - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - bl ChangeBgX - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - bl ChangeBgY - movs r0, 0x2 - movs r1, 0 - movs r2, 0 - bl ChangeBgX - movs r0, 0x2 - movs r1, 0 - movs r2, 0 - bl ChangeBgY - movs r0, 0x3 - movs r1, 0 - movs r2, 0 - bl ChangeBgX - movs r0, 0x3 - movs r1, 0 - movs r2, 0 - bl ChangeBgY - ldr r1, =0x00007940 - movs r0, 0 - bl SetGpuReg - ldr r1, =0x00000844 - movs r0, 0x50 - bl SetGpuReg - ldr r1, =0x0000040b - movs r0, 0x52 - bl SetGpuReg - ldr r1, =gPokenavCondition_Gfx - movs r0, 0 - str r0, [sp] - movs r0, 0x3 - b _081CDFA8 - .pool -_081CDF94: - bl free_temp_tile_data_buffers_if_possible - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0 - beq _081CDFA2 - b _081CE2C0 -_081CDFA2: - ldr r1, =gUnknown_08623228 - str r0, [sp] - movs r0, 0x2 -_081CDFA8: - movs r2, 0 - movs r3, 0 - bl decompress_and_copy_tile_data_to_vram -_081CDFB0: - movs r0, 0 - b _081CE2C6 - .pool -_081CDFB8: - bl free_temp_tile_data_buffers_if_possible - lsls r0, 24 - cmp r0, 0 - beq _081CDFC4 - b _081CE2C0 -_081CDFC4: - ldr r0, =gPokenavCondition_Tilemap - adds r4, r5, 0x4 - adds r1, r4, 0 - bl LZ77UnCompVram - movs r0, 0x3 - adds r1, r4, 0 - bl SetBgTilemapBuffer - bl sub_81CDD5C - cmp r0, 0x1 - bne _081CDFF2 - ldr r1, =gPokenavOptions_Tilemap - movs r0, 0x9 - str r0, [sp] - movs r0, 0x4 - str r0, [sp, 0x4] - movs r0, 0x3 - movs r2, 0 - movs r3, 0x5 - bl CopyToBgTilemapBufferRect -_081CDFF2: - movs r0, 0x3 - bl CopyBgTilemapBufferToVram - ldr r0, =gPokenavCondition_Pal - movs r1, 0x10 - movs r2, 0x20 - bl CopyPaletteIntoBufferUnfaded - ldr r0, =gUnknown_08623208 - movs r1, 0xF0 - movs r2, 0x20 - bl CopyPaletteIntoBufferUnfaded - ldr r0, =0x00001814 - adds r1, r5, r0 - ldr r0, =0x0000ffb0 - strh r0, [r1] - b _081CDFB0 - .pool -_081CE030: - bl free_temp_tile_data_buffers_if_possible - lsls r0, 24 - cmp r0, 0 - beq _081CE03C - b _081CE2C0 -_081CE03C: - ldr r0, =gUnknown_0862323C - ldr r1, =0x00001004 - adds r4, r5, r1 - adds r1, r4, 0 - bl LZ77UnCompVram - movs r0, 0x2 - adds r1, r4, 0 - bl SetBgTilemapBuffer - movs r0, 0x2 - bl CopyBgTilemapBufferToVram - ldr r0, =gUnknown_086231E8 - movs r1, 0x30 - movs r2, 0x20 - bl CopyPaletteIntoBufferUnfaded - movs r0, 0x2 - bl sub_81D21DC - b _081CDFB0 - .pool -_081CE074: - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - movs r3, 0x1 - bl sub_8199DF0 - movs r0, 0x1 - movs r1, 0x11 - movs r2, 0x1 - movs r3, 0x1 - bl sub_8199DF0 - movs r0, 0 - str r0, [sp, 0x8] - ldr r2, =0x00000804 - adds r4, r5, r2 - ldr r2, =0x05000200 - add r0, sp, 0x8 - adds r1, r4, 0 - bl CpuSet - movs r0, 0x1 - adds r1, r4, 0 - bl SetBgTilemapBuffer - b _081CDFB0 - .pool -_081CE0B0: - bl free_temp_tile_data_buffers_if_possible - lsls r0, 24 - cmp r0, 0 - beq _081CE0BC - b _081CE2C0 -_081CE0BC: - ldr r0, =gUnknown_08623364 - bl AddWindow - movs r2, 0xC1 - lsls r2, 5 - adds r1, r5, r2 - strb r0, [r1] - bl sub_81CDD5C - cmp r0, 0x1 - bne _081CE0F6 - ldr r0, =gUnknown_0862336C - bl AddWindow - ldr r2, =0x00001821 - adds r1, r5, r2 - strb r0, [r1] - ldr r0, =gUnknown_08623374 - bl AddWindow - ldr r2, =0x00001822 - adds r1, r5, r2 - strb r0, [r1] - ldr r0, =gUnknown_0862337C - bl AddWindow - ldr r2, =0x00001823 - adds r1, r5, r2 - strb r0, [r1] -_081CE0F6: - bl DeactivateAllTextPrinters - b _081CDFB0 - .pool -_081CE118: - movs r0, 0 - bl sub_81CED30 - b _081CDFB0 -_081CE120: - bl sub_81CE9E4 - b _081CDFB0 -_081CE126: - bl sub_81CDD5C - cmp r0, 0x1 - beq _081CE130 - b _081CDFB0 -_081CE130: - bl sub_81CE934 - b _081CDFB0 -_081CE136: - bl sub_81CDC84 - adds r1, r0, 0 - lsls r1, 24 - asrs r1, 8 - lsrs r1, 16 - movs r0, 0 - b _081CE164 -_081CE146: - bl sub_81CDC84 - adds r1, r0, 0 - lsls r1, 24 - asrs r1, 8 - lsrs r1, 16 - movs r0, 0x1 - b _081CE164 -_081CE156: - bl sub_81CDC84 - adds r1, r0, 0 - lsls r1, 24 - asrs r1, 8 - lsrs r1, 16 - movs r0, 0x2 -_081CE164: - movs r2, 0x1 - bl sub_81CE754 - b _081CDFB0 -_081CE16C: - bl sub_81CDC84 - adds r1, r0, 0 - lsls r1, 24 - asrs r1, 8 - lsrs r1, 16 - movs r0, 0x3 - movs r2, 0x1 - bl sub_81CE754 - cmp r0, 0x1 - beq _081CE186 - b _081CE2C0 -_081CE186: - movs r1, 0xC1 - lsls r1, 5 - adds r0, r5, r1 - ldrb r0, [r0] - bl PutWindowTilemap - bl sub_81CDD5C - cmp r0, 0x1 - beq _081CE19C - b _081CDFB0 -_081CE19C: - ldr r2, =0x00001821 - adds r0, r5, r2 - ldrb r0, [r0] - bl PutWindowTilemap - ldr r1, =0x00001822 - adds r0, r5, r1 - ldrb r0, [r0] - bl PutWindowTilemap - ldr r2, =0x00001823 - adds r0, r5, r2 - ldrb r0, [r0] - bl PutWindowTilemap - b _081CDFB0 - .pool -_081CE1C8: - movs r0, 0x1 - bl ShowBg - movs r0, 0x2 - bl HideBg - movs r0, 0x3 - bl ShowBg - bl sub_81CDD5C - cmp r0, 0x1 - beq _081CE1E4 - b _081CDFB0 -_081CE1E4: - movs r0, 0x4 - bl sub_81C7BA4 - b _081CDFB0 -_081CE1EC: - movs r0, 0x1 - bl sub_81C7AC0 - bl sub_81CDD5C - cmp r0, 0 - beq _081CE1FC - b _081CDFB0 -_081CE1FC: - movs r0, 0x6 - bl LoadLeftHeaderGfxForIndex - movs r0, 0x1 - movs r1, 0x1 - movs r2, 0 - bl sub_81C7FA0 - movs r0, 0x6 - movs r1, 0x1 - movs r2, 0 - bl sub_81C7FA0 - b _081CDFB0 -_081CE218: - bl IsPaletteFadeActive - cmp r0, 0 - bne _081CE2C0 - bl sub_81CDD5C - cmp r0, 0 - bne _081CE230 - bl sub_81C8010 - cmp r0, 0 - bne _081CE2C0 -_081CE230: - ldr r0, =sub_81CEE44 - bl SetVBlankCallback_ - b _081CDFB0 - .pool -_081CE23C: - bl sub_81CEE90 - bl sub_81CDC70 - bl sub_81D20AC - b _081CDFB0 -_081CE24A: - bl sub_81CDC70 - bl sub_81D20BC - lsls r0, 24 - cmp r0, 0 - bne _081CE2C0 - b _081CDFB0 -_081CE25A: - movs r0, 0x1 - bl sub_81CEE74 - b _081CDFB0 -_081CE262: - bl sub_81CDC70 - ldr r2, =0x00001814 - adds r1, r5, r2 - bl sub_81D3178 - lsls r0, 24 - cmp r0, 0 - bne _081CE2C0 - ldr r0, =0x000028e0 - adds r6, r5, r0 - adds r0, r6, 0 - bl sub_81D3464 - bl sub_81CDD5C - cmp r0, 0x1 - beq _081CE298 - bl sub_81CDC60 - adds r4, r0, 0 - bl sub_81CDC50 - lsls r4, 16 - lsls r0, 16 - cmp r4, r0 - beq _081CE2C4 -_081CE298: - ldr r1, =0x00001816 - adds r0, r5, r1 - ldrb r4, [r0] - bl sub_81CDDB0 - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r6, 0 - adds r1, r4, 0 - bl sub_81D3480 - b _081CE2C4 - .pool -_081CE2C0: - movs r0, 0x2 - b _081CE2C6 -_081CE2C4: - movs r0, 0x4 -_081CE2C6: - add sp, 0xC - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_81CDE94 - - thumb_func_start sub_81CE2D0 -sub_81CE2D0: @ 81CE2D0 - push {r4,r5,lr} - adds r4, r0, 0 - movs r0, 0xC - bl GetSubstructPtr - adds r5, r0, 0 - cmp r4, 0x1 - beq _081CE308 - cmp r4, 0x1 - bgt _081CE2EA - cmp r4, 0 - beq _081CE2F4 - b _081CE374 -_081CE2EA: - cmp r4, 0x2 - beq _081CE328 - cmp r4, 0x3 - beq _081CE33E - b _081CE374 -_081CE2F4: - bl sub_81CEEC8 - ldr r1, =0x000028e0 - adds r0, r5, r1 - bl sub_81D3520 - movs r0, 0x1 - b _081CE376 - .pool -_081CE308: - bl sub_81CDC70 - ldr r2, =0x00001814 - adds r1, r5, r2 - bl sub_81D31A4 - lsls r0, 24 - cmp r0, 0 - bne _081CE34E - movs r0, 0 - bl sub_81CEE74 - movs r0, 0x1 - b _081CE376 - .pool -_081CE328: - movs r0, 0 - bl sub_81C7AC0 - bl sub_81CDD5C - cmp r0, 0 - bne _081CE33A - bl sub_81C78A0 -_081CE33A: - movs r0, 0 - b _081CE376 -_081CE33E: - bl IsPaletteFadeActive - cmp r0, 0 - bne _081CE34E - bl MainMenuLoopedTaskIsBusy - cmp r0, 0 - beq _081CE352 -_081CE34E: - movs r0, 0x2 - b _081CE376 -_081CE352: - ldr r1, =0x000028e0 - adds r0, r5, r1 - bl sub_81D354C - movs r0, 0x1 - bl HideBg - movs r0, 0x2 - bl HideBg - movs r0, 0x3 - bl HideBg - movs r0, 0x1 - b _081CE376 - .pool -_081CE374: - movs r0, 0x4 -_081CE376: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_81CE2D0 - - thumb_func_start sub_81CE37C -sub_81CE37C: @ 81CE37C - push {r4-r6,lr} - adds r4, r0, 0 - movs r0, 0xC - bl GetSubstructPtr - adds r6, r0, 0 - bl sub_81CDC70 - adds r2, r0, 0 - cmp r4, 0x9 - bls _081CE394 - b _081CE4D0 -_081CE394: - lsls r0, r4, 2 - ldr r1, =_081CE3A4 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081CE3A4: - .4byte _081CE3CC - .4byte _081CE3D0 - .4byte _081CE3DA - .4byte _081CE3F0 - .4byte _081CE3F8 - .4byte _081CE418 - .4byte _081CE428 - .4byte _081CE438 - .4byte _081CE44E - .4byte _081CE468 -_081CE3CC: - movs r0, 0 - b _081CE3D2 -_081CE3D0: - movs r0, 0x1 -_081CE3D2: - bl sub_81CD548 -_081CE3D6: - movs r0, 0x1 - b _081CE4D2 -_081CE3DA: - movs r0, 0x2 - bl sub_81CD548 - ldr r1, =0x000028e0 - adds r0, r6, r1 - bl sub_81D3520 - b _081CE3D6 - .pool -_081CE3F0: - adds r0, r2, 0 - bl sub_81D2074 - b _081CE3D6 -_081CE3F8: - ldr r1, =0x00001814 - adds r0, r6, r1 - bl sub_81D3150 - lsls r0, 24 - cmp r0, 0 - bne _081CE4CC - bl sub_81CDC84 - lsls r0, 24 - lsrs r0, 24 - bl sub_81CED30 - b _081CE3D6 - .pool -_081CE418: - bl sub_81CDC84 - adds r1, r0, 0 - lsls r1, 24 - asrs r1, 8 - lsrs r1, 16 - movs r0, 0 - b _081CE446 -_081CE428: - bl sub_81CDC84 - adds r1, r0, 0 - lsls r1, 24 - asrs r1, 8 - lsrs r1, 16 - movs r0, 0x1 - b _081CE446 -_081CE438: - bl sub_81CDC84 - adds r1, r0, 0 - lsls r1, 24 - asrs r1, 8 - lsrs r1, 16 - movs r0, 0x2 -_081CE446: - movs r2, 0 - bl sub_81CE754 - b _081CE3D6 -_081CE44E: - bl sub_81CDC84 - adds r1, r0, 0 - lsls r1, 24 - asrs r1, 8 - lsrs r1, 16 - movs r0, 0x3 - movs r2, 0 - bl sub_81CE754 - cmp r0, 0x1 - beq _081CE3D6 - b _081CE4CC -_081CE468: - bl sub_81CDC70 - adds r2, r0, 0 - ldr r0, =0x00001814 - adds r1, r6, r0 - adds r0, r2, 0 - bl sub_81D3178 - lsls r0, 24 - cmp r0, 0 - bne _081CE4CC - ldr r1, =0x000028e0 - adds r0, r6, r1 - bl sub_81D3464 - bl sub_81CDD5C - cmp r0, 0x1 - beq _081CE4A0 - bl sub_81CDC60 - adds r4, r0, 0 - bl sub_81CDC50 - lsls r4, 16 - lsls r0, 16 - cmp r4, r0 - beq _081CE3D6 -_081CE4A0: - ldr r0, =0x000028e0 - adds r5, r6, r0 - ldr r1, =0x00001816 - adds r0, r6, r1 - ldrb r4, [r0] - bl sub_81CDDB0 - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r5, 0 - adds r1, r4, 0 - bl sub_81D3480 - b _081CE3D6 - .pool -_081CE4CC: - movs r0, 0x2 - b _081CE4D2 -_081CE4D0: - movs r0, 0x4 -_081CE4D2: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_81CE37C - - thumb_func_start sub_81CE4D8 -sub_81CE4D8: @ 81CE4D8 - push {r4,r5,lr} - adds r4, r0, 0 - movs r0, 0xC - bl GetSubstructPtr - adds r5, r0, 0 - cmp r4, 0x8 - bhi _081CE5DC - lsls r0, r4, 2 - ldr r1, =_081CE4F8 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081CE4F8: - .4byte _081CE51C - .4byte _081CE520 - .4byte _081CE524 - .4byte _081CE52E - .4byte _081CE53E - .4byte _081CE54E - .4byte _081CE55E - .4byte _081CE576 - .4byte _081CE592 -_081CE51C: - movs r0, 0 - b _081CE526 -_081CE520: - movs r0, 0x1 - b _081CE526 -_081CE524: - movs r0, 0x2 -_081CE526: - bl sub_81CD548 - movs r0, 0x1 - b _081CE5DE -_081CE52E: - bl sub_81CDC84 - lsls r0, 24 - lsrs r0, 24 - bl sub_81CED30 - movs r0, 0x1 - b _081CE5DE -_081CE53E: - bl sub_81CDC84 - adds r1, r0, 0 - lsls r1, 24 - asrs r1, 8 - lsrs r1, 16 - movs r0, 0 - b _081CE56C -_081CE54E: - bl sub_81CDC84 - adds r1, r0, 0 - lsls r1, 24 - asrs r1, 8 - lsrs r1, 16 - movs r0, 0x1 - b _081CE56C -_081CE55E: - bl sub_81CDC84 - adds r1, r0, 0 - lsls r1, 24 - asrs r1, 8 - lsrs r1, 16 - movs r0, 0x2 -_081CE56C: - movs r2, 0 - bl sub_81CE754 - movs r0, 0x1 - b _081CE5DE -_081CE576: - bl sub_81CDC84 - adds r1, r0, 0 - lsls r1, 24 - asrs r1, 8 - lsrs r1, 16 - movs r0, 0x3 - movs r2, 0 - bl sub_81CE754 - cmp r0, 0x1 - bne _081CE5D8 - movs r0, 0x1 - b _081CE5DE -_081CE592: - bl sub_81CDC70 - ldr r2, =0x00001814 - adds r1, r5, r2 - bl sub_81D3178 - lsls r0, 24 - cmp r0, 0 - bne _081CE5D8 - ldr r0, =0x000028e0 - adds r4, r5, r0 - adds r0, r4, 0 - bl sub_81D3464 - ldr r1, =0x00001816 - adds r0, r5, r1 - ldrb r5, [r0] - bl sub_81CDDB0 - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_81D3480 - movs r0, 0x1 - b _081CE5DE - .pool -_081CE5D8: - movs r0, 0x2 - b _081CE5DE -_081CE5DC: - movs r0, 0x4 -_081CE5DE: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_81CE4D8 - - thumb_func_start sub_81CE5E4 -sub_81CE5E4: @ 81CE5E4 - push {r4,r5,lr} - adds r4, r0, 0 - movs r0, 0xC - bl GetSubstructPtr - adds r5, r0, 0 - cmp r4, 0x7 - bhi _081CE6B2 - lsls r0, r4, 2 - ldr r1, =_081CE604 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081CE604: - .4byte _081CE624 - .4byte _081CE628 - .4byte _081CE632 - .4byte _081CE648 - .4byte _081CE660 - .4byte _081CE670 - .4byte _081CE680 - .4byte _081CE696 -_081CE624: - movs r0, 0 - b _081CE62A -_081CE628: - movs r0, 0x1 -_081CE62A: - bl sub_81CD548 -_081CE62E: - movs r0, 0x1 - b _081CE6B4 -_081CE632: - movs r0, 0x2 - bl sub_81CD548 - ldr r1, =0x000028e0 - adds r0, r5, r1 - bl sub_81D3520 - b _081CE62E - .pool -_081CE648: - bl sub_81CDC70 - ldr r2, =0x00001814 - adds r1, r5, r2 - bl sub_81D31A4 - lsls r0, 24 - cmp r0, 0 - beq _081CE62E - b _081CE6AE - .pool -_081CE660: - bl sub_81CDC84 - adds r1, r0, 0 - lsls r1, 24 - asrs r1, 8 - lsrs r1, 16 - movs r0, 0 - b _081CE68E -_081CE670: - bl sub_81CDC84 - adds r1, r0, 0 - lsls r1, 24 - asrs r1, 8 - lsrs r1, 16 - movs r0, 0x1 - b _081CE68E -_081CE680: - bl sub_81CDC84 - adds r1, r0, 0 - lsls r1, 24 - asrs r1, 8 - lsrs r1, 16 - movs r0, 0x2 -_081CE68E: - movs r2, 0 - bl sub_81CE754 - b _081CE62E -_081CE696: - bl sub_81CDC84 - adds r1, r0, 0 - lsls r1, 24 - asrs r1, 8 - lsrs r1, 16 - movs r0, 0x3 - movs r2, 0 - bl sub_81CE754 - cmp r0, 0x1 - beq _081CE62E -_081CE6AE: - movs r0, 0x2 - b _081CE6B4 -_081CE6B2: - movs r0, 0x4 -_081CE6B4: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_81CE5E4 - - thumb_func_start sub_81CE6BC -sub_81CE6BC: @ 81CE6BC - push {lr} - cmp r0, 0x1 - beq _081CE6E6 - cmp r0, 0x1 - bgt _081CE6CC - cmp r0, 0 - beq _081CE6D2 - b _081CE6FA -_081CE6CC: - cmp r0, 0x2 - beq _081CE6EE - b _081CE6FA -_081CE6D2: - bl sub_81CDD7C - lsls r0, 24 - lsrs r0, 24 - movs r1, 0xB0 - movs r2, 0x20 - bl sub_811FAA4 -_081CE6E2: - movs r0, 0x1 - b _081CE6FC -_081CE6E6: - movs r0, 0x5 - bl sub_81C7BA4 - b _081CE6E2 -_081CE6EE: - bl IsDma3ManagerBusyWithBgCopy_ - cmp r0, 0x1 - bne _081CE6E2 - movs r0, 0x2 - b _081CE6FC -_081CE6FA: - movs r0, 0x4 -_081CE6FC: - pop {r1} - bx r1 - thumb_func_end sub_81CE6BC - - thumb_func_start sub_81CE700 -sub_81CE700: @ 81CE700 - push {lr} - cmp r0, 0x1 - beq _081CE71E - cmp r0, 0x1 - bgt _081CE710 - cmp r0, 0 - beq _081CE716 - b _081CE732 -_081CE710: - cmp r0, 0x2 - beq _081CE726 - b _081CE732 -_081CE716: - bl sub_811FAF8 -_081CE71A: - movs r0, 0x1 - b _081CE734 -_081CE71E: - movs r0, 0x4 - bl sub_81C7BA4 - b _081CE71A -_081CE726: - bl IsDma3ManagerBusyWithBgCopy_ - cmp r0, 0x1 - bne _081CE71A - movs r0, 0x2 - b _081CE734 -_081CE732: - movs r0, 0x4 -_081CE734: - pop {r1} - bx r1 - thumb_func_end sub_81CE700 - - thumb_func_start sub_81CE738 -sub_81CE738: @ 81CE738 - push {lr} - lsls r1, 16 - lsrs r1, 16 - movs r2, 0x1 - movs r3, 0x4 - bl ConvertIntToDecimalStringN - ldr r1, =gText_Number2 - bl StringCopy - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CE738 - - thumb_func_start sub_81CE754 -sub_81CE754: @ 81CE754 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x2C - lsls r0, 24 - lsrs r4, r0, 24 - adds r7, r4, 0 - lsls r1, 16 - lsrs r1, 16 - mov r8, r1 - lsls r2, 24 - lsrs r5, r2, 24 - movs r0, 0xC - bl GetSubstructPtr - adds r6, r0, 0 - cmp r4, 0x1 - beq _081CE7B8 - cmp r4, 0x1 - bgt _081CE782 - cmp r4, 0 - beq _081CE78E - b _081CE924 -_081CE782: - cmp r4, 0x2 - beq _081CE800 - cmp r4, 0x3 - bne _081CE78C - b _081CE89C -_081CE78C: - b _081CE924 -_081CE78E: - movs r1, 0xC1 - lsls r1, 5 - adds r0, r6, r1 - ldrb r0, [r0] - movs r1, 0 - bl FillWindowPixelBuffer - bl sub_81CDD5C - cmp r0, 0x1 - beq _081CE7A6 - b _081CE924 -_081CE7A6: - ldr r1, =0x00001821 - adds r0, r6, r1 - ldrb r0, [r0] - movs r1, 0 - bl FillWindowPixelBuffer - b _081CE924 - .pool -_081CE7B8: - bl sub_81CDC60 - adds r4, r0, 0 - lsls r4, 16 - lsrs r4, 16 - bl sub_81CDC50 - lsls r0, 16 - lsrs r0, 16 - subs r0, 0x1 - cmp r4, r0 - bne _081CE7DA - bl sub_81CDD5C - cmp r0, 0x1 - beq _081CE7DA - b _081CE924 -_081CE7DA: - mov r1, r8 - lsls r0, r1, 24 - lsrs r0, 24 - bl sub_81CDD04 - adds r2, r0, 0 - movs r1, 0xC1 - lsls r1, 5 - adds r0, r6, r1 - ldrb r0, [r0] - str r7, [sp] - movs r1, 0 - str r1, [sp, 0x4] - str r1, [sp, 0x8] - movs r1, 0x1 - movs r3, 0 - bl AddTextPrinterParameterized - b _081CE924 -_081CE800: - bl sub_81CDD5C - adds r7, r0, 0 - cmp r7, 0x1 - beq _081CE80C - b _081CE924 -_081CE80C: - mov r1, r8 - lsls r0, r1, 24 - lsrs r0, 24 - bl sub_81CDD24 - adds r2, r0, 0 - movs r1, 0xC1 - lsls r1, 5 - adds r0, r6, r1 - ldrb r0, [r0] - movs r1, 0x11 - str r1, [sp] - movs r4, 0 - str r4, [sp, 0x4] - str r4, [sp, 0x8] - movs r1, 0x1 - movs r3, 0 - bl AddTextPrinterParameterized - add r1, sp, 0xC - movs r0, 0xFC - strb r0, [r1] - movs r0, 0x4 - strb r0, [r1, 0x1] - movs r0, 0x8 - strb r0, [r1, 0x2] - adds r0, r1, 0 - strb r4, [r0, 0x3] - movs r0, 0x9 - strb r0, [r1, 0x4] - mov r5, sp - adds r5, 0x11 - ldr r1, =gText_Number2 - adds r0, r5, 0 - bl StringCopy - ldr r0, =0x00001821 - adds r6, r0 - ldrb r0, [r6] - str r7, [sp] - str r4, [sp, 0x4] - str r4, [sp, 0x8] - movs r1, 0x1 - add r2, sp, 0xC - movs r3, 0x4 - bl AddTextPrinterParameterized - bl sub_81CDD48 - adds r1, r0, 0 - lsls r1, 16 - lsrs r1, 16 - adds r0, r5, 0 - movs r2, 0x1 - movs r3, 0x4 - bl ConvertIntToDecimalStringN - ldrb r0, [r6] - str r7, [sp] - str r4, [sp, 0x4] - str r4, [sp, 0x8] - movs r1, 0x1 - add r2, sp, 0xC - movs r3, 0x1C - bl AddTextPrinterParameterized - b _081CE924 - .pool -_081CE89C: - ldr r1, =0x00002908 - adds r0, r6, r1 - ldrb r0, [r0] - cmp r0, 0 - beq _081CE8B0 - cmp r0, 0x1 - beq _081CE8EC - b _081CE924 - .pool -_081CE8B0: - cmp r5, 0 - beq _081CE8C4 - movs r1, 0xC1 - lsls r1, 5 - adds r0, r6, r1 - ldrb r0, [r0] - movs r1, 0x3 - bl CopyWindowToVram - b _081CE8D2 -_081CE8C4: - movs r1, 0xC1 - lsls r1, 5 - adds r0, r6, r1 - ldrb r0, [r0] - movs r1, 0x2 - bl CopyWindowToVram -_081CE8D2: - bl sub_81CDD5C - cmp r0, 0x1 - bne _081CE910 - ldr r0, =0x00002908 - adds r1, r6, r0 - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _081CE924 - .pool -_081CE8EC: - cmp r5, 0 - beq _081CE904 - ldr r1, =0x00001821 - adds r0, r6, r1 - ldrb r0, [r0] - movs r1, 0x3 - bl CopyWindowToVram - b _081CE910 - .pool -_081CE904: - ldr r1, =0x00001821 - adds r0, r6, r1 - ldrb r0, [r0] - movs r1, 0x2 - bl CopyWindowToVram -_081CE910: - ldr r0, =0x00002908 - adds r1, r6, r0 - movs r0, 0 - strb r0, [r1] - movs r0, 0x1 - b _081CE926 - .pool -_081CE924: - movs r0, 0 -_081CE926: - add sp, 0x2C - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_81CE754 - - thumb_func_start sub_81CE934 -sub_81CE934: @ 81CE934 - push {r4,lr} - movs r0, 0xC - bl GetSubstructPtr - adds r4, r0, 0 - ldr r1, =0x00001822 - adds r0, r4, r1 - ldrb r0, [r0] - movs r1, 0x3 - bl CopyWindowToVram - ldr r0, =0x00001823 - adds r4, r0 - ldrb r0, [r4] - movs r1, 0x3 - bl CopyWindowToVram - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CE934 - - thumb_func_start sub_81CE964 -sub_81CE964: @ 81CE964 - push {r4,r5,lr} - adds r5, r0, 0 - movs r0, 0x2E - ldrsh r4, [r5, r0] - bl sub_81CDC60 - lsls r0, 16 - lsrs r0, 16 - cmp r4, r0 - bne _081CE982 - adds r0, r5, 0 - movs r1, 0 - bl StartSpriteAnim - b _081CE98A -_081CE982: - adds r0, r5, 0 - movs r1, 0x1 - bl StartSpriteAnim -_081CE98A: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_81CE964 - - thumb_func_start sub_81CE990 -sub_81CE990: @ 81CE990 - push {r4,r5,lr} - adds r5, r0, 0 - bl sub_81CDC60 - adds r4, r0, 0 - lsls r4, 16 - lsrs r4, 16 - bl sub_81CDC50 - lsls r0, 16 - lsrs r0, 16 - subs r0, 0x1 - cmp r4, r0 - bne _081CE9B0 - movs r0, 0x65 - b _081CE9B2 -_081CE9B0: - movs r0, 0x66 -_081CE9B2: - bl IndexOfSpritePaletteTag - lsls r0, 4 - ldrb r2, [r5, 0x5] - movs r1, 0xF - ands r1, r2 - orrs r1, r0 - strb r1, [r5, 0x5] - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_81CE990 - - thumb_func_start sub_81CE9C8 -sub_81CE9C8: @ 81CE9C8 - push {r4,lr} - adds r4, r0, 0 - bl sub_81CDD7C - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - adds r0, r4, 0 - bl StartSpriteAnim - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_81CE9C8 - - thumb_func_start sub_81CE9E4 -sub_81CE9E4: @ 81CE9E4 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x58 - movs r0, 0xC - bl GetSubstructPtr - adds r6, r0, 0 - add r4, sp, 0x20 - add r5, sp, 0x38 - mov r0, sp - adds r1, r4, 0 - adds r2, r5, 0 - bl sub_81D321C - bl sub_81CDD5C - adds r7, r4, 0 - mov r10, r5 - cmp r0, 0x1 - bne _081CEA78 - ldr r1, =0x00001824 - adds r0, r6, r1 - movs r2, 0x6A - strh r2, [r0] - ldr r3, =0x00001826 - adds r1, r6, r3 - strh r2, [r1] - bl sub_811F90C - bl sub_811FA90 - ldr r2, =gUnknown_08623338 - movs r0, 0x69 - movs r1, 0x69 - bl sub_811FF94 - ldrb r1, [r0, 0x5] - movs r2, 0xC - orrs r1, r2 - strb r1, [r0, 0x5] - movs r1, 0xC0 - strh r1, [r0, 0x20] - movs r1, 0x20 - strh r1, [r0, 0x22] - ldr r1, =sub_81CE9C8 - str r1, [r0, 0x1C] - ldr r2, =0x000028dc - adds r1, r6, r2 - str r0, [r1] - movs r0, 0x69 - bl IndexOfSpritePaletteTag - lsls r0, 24 - lsrs r0, 24 - movs r1, 0 - bl sub_81C7990 - add r3, sp, 0x50 - mov r8, r3 - b _081CEBC6 - .pool -_081CEA78: - mov r0, sp - bl LoadSpriteSheets - mov r0, r10 - bl Pokenav_AllocAndLoadPalettes - movs r4, 0 - add r0, sp, 0x50 - mov r8, r0 - b _081CEAE8 -_081CEA8C: - lsls r2, r4, 2 - adds r2, r4 - lsls r2, 18 - movs r1, 0x80 - lsls r1, 12 - adds r2, r1 - asrs r2, 16 - adds r0, r7, 0 - movs r1, 0xE2 - movs r3, 0 - bl CreateSprite - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0x40 - beq _081CEAD8 - ldr r2, =0x00001806 - adds r0, r6, r2 - adds r0, r4 - strb r3, [r0] - ldr r2, =gSprites - lsls r0, r3, 4 - adds r0, r3 - lsls r0, 2 - adds r1, r0, r2 - strh r4, [r1, 0x2E] - adds r2, 0x1C - adds r0, r2 - ldr r1, =sub_81CE964 - str r1, [r0] - b _081CEAE2 - .pool -_081CEAD8: - ldr r3, =0x00001806 - adds r0, r6, r3 - adds r0, r4 - movs r1, 0xFF - strb r1, [r0] -_081CEAE2: - adds r0, r4, 0x1 - lsls r0, 16 - lsrs r4, r0, 16 -_081CEAE8: - bl sub_81CDC50 - lsls r0, 16 - lsrs r0, 16 - subs r0, 0x1 - cmp r4, r0 - blt _081CEA8C - movs r0, 0x67 - strh r0, [r7] - ldr r0, =SpriteCallbackDummy - str r0, [r7, 0x14] - cmp r4, 0x5 - bhi _081CEB5C - ldr r0, =0x00001806 - adds r5, r6, r0 - ldr r1, =gSprites - mov r9, r1 -_081CEB0A: - lsls r2, r4, 2 - adds r2, r4 - lsls r2, 18 - movs r3, 0x80 - lsls r3, 12 - adds r2, r3 - asrs r2, 16 - adds r0, r7, 0 - movs r1, 0xE6 - movs r3, 0 - bl CreateSprite - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0x40 - beq _081CEB4C - adds r0, r5, r4 - strb r3, [r0] - lsls r1, r3, 4 - adds r1, r3 - lsls r1, 2 - add r1, r9 - ldrb r2, [r1, 0x3] - movs r0, 0x3F - ands r0, r2 - strb r0, [r1, 0x3] - b _081CEB52 - .pool -_081CEB4C: - adds r1, r5, r4 - movs r0, 0xFF - strb r0, [r1] -_081CEB52: - adds r0, r4, 0x1 - lsls r0, 16 - lsrs r4, r0, 16 - cmp r4, 0x5 - bls _081CEB0A -_081CEB5C: - movs r0, 0x66 - strh r0, [r7] - ldr r0, =sub_81CE990 - str r0, [r7, 0x14] - lsls r2, r4, 2 - adds r2, r4 - lsls r2, 18 - movs r0, 0x80 - lsls r0, 12 - adds r2, r0 - asrs r2, 16 - adds r0, r7, 0 - movs r1, 0xDE - movs r3, 0 - bl CreateSprite - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0x40 - beq _081CEBBC - ldr r1, =0x00001806 - adds r0, r6, r1 - adds r0, r4 - strb r3, [r0] - ldr r0, =gSprites - lsls r2, r3, 4 - adds r2, r3 - lsls r2, 2 - adds r2, r0 - ldrb r3, [r2, 0x1] - movs r1, 0x3F - adds r0, r1, 0 - ands r0, r3 - movs r3, 0x40 - orrs r0, r3 - strb r0, [r2, 0x1] - ldrb r0, [r2, 0x3] - ands r1, r0 - movs r0, 0x80 - orrs r1, r0 - strb r1, [r2, 0x3] - b _081CEBC6 - .pool -_081CEBBC: - ldr r2, =0x00001806 - adds r0, r6, r2 - adds r0, r4 - movs r1, 0xFF - strb r1, [r0] -_081CEBC6: - mov r0, r8 - mov r1, r10 - bl sub_81D32B0 - mov r0, r8 - bl LoadSpriteSheet - movs r0, 0 - mov r3, r10 - str r0, [r3, 0x8] - mov r0, r10 - bl Pokenav_AllocAndLoadPalettes - add sp, 0x58 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CE9E4 - - thumb_func_start sub_81CEBF4 -sub_81CEBF4: @ 81CEBF4 - push {r4,r5,lr} - adds r5, r0, 0 - bl sub_81CDD5C - cmp r0, 0x1 - bne _081CEC28 - ldr r1, =0x000028dc - adds r0, r5, r1 - ldr r0, [r0] - bl DestroySprite - movs r0, 0x6A - bl FreeSpriteTilesByTag - movs r0, 0x69 - bl FreeSpriteTilesByTag - movs r0, 0x6A - bl FreeSpritePaletteByTag - movs r0, 0x69 - bl FreeSpritePaletteByTag - b _081CEC68 - .pool -_081CEC28: - movs r4, 0 -_081CEC2A: - ldr r1, =0x00001806 - adds r0, r5, r1 - adds r0, r4 - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - bl DestroySprite - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x6 - bls _081CEC2A - movs r0, 0x65 - bl FreeSpriteTilesByTag - movs r0, 0x66 - bl FreeSpriteTilesByTag - movs r0, 0x67 - bl FreeSpriteTilesByTag - movs r0, 0x65 - bl FreeSpritePaletteByTag - movs r0, 0x66 - bl FreeSpritePaletteByTag -_081CEC68: - ldr r0, =0x00001816 - adds r1, r5, r0 - ldrb r0, [r1] - cmp r0, 0xFF - beq _081CEC8E - adds r1, r0, 0 - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - bl DestroySprite - movs r0, 0x64 - bl FreeSpriteTilesByTag - movs r0, 0x64 - bl FreeSpritePaletteByTag -_081CEC8E: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CEBF4 - - thumb_func_start sub_81CECA0 -sub_81CECA0: @ 81CECA0 - push {r4,lr} - movs r0, 0xC - bl GetSubstructPtr - adds r4, r0, 0 - movs r1, 0xC1 - lsls r1, 5 - adds r0, r4, r1 - ldrb r0, [r0] - bl RemoveWindow - bl sub_81CDD5C - cmp r0, 0x1 - bne _081CECEC - ldr r1, =0x00001821 - adds r0, r4, r1 - ldrb r0, [r0] - bl RemoveWindow - ldr r1, =0x00001822 - adds r0, r4, r1 - ldrb r0, [r0] - bl RemoveWindow - ldr r1, =0x00001823 - adds r0, r4, r1 - ldrb r0, [r0] - bl RemoveWindow - b _081CECF0 - .pool -_081CECEC: - bl sub_81C7FDC -_081CECF0: - movs r1, 0x8A - lsls r1, 5 - movs r0, 0 - bl SetGpuReg - adds r0, r4, 0 - bl sub_81CEBF4 - bl sub_81CEE68 - movs r0, 0xC - bl FreePokenavSubstruct - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_81CECA0 - - thumb_func_start sub_81CED10 -sub_81CED10: @ 81CED10 - push {r4,lr} - adds r4, r0, 0 - movs r0, 0xC - bl GetSubstructPtr - ldr r1, =0x00001814 - adds r0, r1 - ldrh r0, [r0] - adds r0, 0x26 - strh r0, [r4, 0x20] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CED10 - - thumb_func_start sub_81CED30 -sub_81CED30: @ 81CED30 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x28 - lsls r0, 24 - lsrs r6, r0, 24 - movs r0, 0xC - bl GetSubstructPtr - mov r8, r0 - ldr r7, =0x00001816 - add r7, r8 - ldrb r0, [r7] - cmp r0, 0xFF - bne _081CEDFC - add r5, sp, 0x18 - add r4, sp, 0x20 - adds r0, r5, 0 - mov r1, sp - adds r2, r4, 0 - bl sub_81D31D0 - adds r0, r6, 0 - bl sub_81CDCB4 - str r0, [sp, 0x18] - adds r0, r6, 0 - bl sub_81CDCD4 - str r0, [sp, 0x20] - adds r0, r4, 0 - bl LoadSpritePalette - lsls r0, 24 - lsrs r0, 24 - ldr r4, =0x00001818 - add r4, r8 - strh r0, [r4] - adds r0, r5, 0 - bl LoadSpriteSheet - ldr r5, =0x0000181a - add r5, r8 - strh r0, [r5] - mov r0, sp - movs r1, 0x26 - movs r2, 0x68 - movs r3, 0 - bl CreateSprite - lsls r0, 24 - lsrs r0, 24 - strb r0, [r7] - cmp r0, 0x40 - bne _081CEDBC - movs r0, 0x64 - bl FreeSpriteTilesByTag - movs r0, 0x64 - bl FreeSpritePaletteByTag - movs r0, 0xFF - strb r0, [r7] - b _081CEE26 - .pool -_081CEDBC: - strb r0, [r7] - ldr r2, =gSprites - ldrb r1, [r7] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r2, 0x1C - adds r0, r2 - ldr r1, =sub_81CED10 - str r1, [r0] - ldr r1, =0x0000181c - add r1, r8 - ldrh r0, [r5] - lsls r0, 5 - ldr r2, =0x06010000 - adds r0, r2 - str r0, [r1] - ldrh r0, [r4] - lsls r0, 4 - movs r1, 0x80 - lsls r1, 1 - adds r0, r1 - strh r0, [r4] - b _081CEE26 - .pool -_081CEDFC: - adds r0, r6, 0 - bl sub_81CDCB4 - ldr r1, =0x0000181c - add r1, r8 - ldr r2, [r1] - ldr r1, =0x040000d4 - str r0, [r1] - str r2, [r1, 0x4] - ldr r0, =0x80000400 - str r0, [r1, 0x8] - ldr r0, [r1, 0x8] - adds r0, r6, 0 - bl sub_81CDCD4 - ldr r1, =0x00001818 - add r1, r8 - ldrh r1, [r1] - movs r2, 0x20 - bl LoadPalette -_081CEE26: - add sp, 0x28 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CED30 - - thumb_func_start sub_81CEE44 -sub_81CEE44: @ 81CEE44 - push {r4,lr} - bl sub_81CDC70 - adds r4, r0, 0 - bl LoadOam - bl ProcessSpriteCopyRequests - bl TransferPlttBuffer - adds r0, r4, 0 - bl sub_81D2108 - bl ScanlineEffect_InitHBlankDmaTransfer - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_81CEE44 - - thumb_func_start sub_81CEE68 -sub_81CEE68: @ 81CEE68 - push {lr} - bl SetPokenavVBlankCallback - pop {r0} - bx r0 - thumb_func_end sub_81CEE68 - - thumb_func_start sub_81CEE74 -sub_81CEE74: @ 81CEE74 - push {lr} - lsls r0, 24 - cmp r0, 0 - beq _081CEE84 - movs r0, 0x2 - bl ShowBg - b _081CEE8A -_081CEE84: - movs r0, 0x2 - bl HideBg -_081CEE8A: - pop {r0} - bx r0 - thumb_func_end sub_81CEE74 - - thumb_func_start sub_81CEE90 -sub_81CEE90: @ 81CEE90 - push {r4,lr} - bl sub_81CDC70 - adds r4, r0, 0 - bl sub_81CDC84 - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_030012BC - strb r0, [r1] - adds r1, r4, 0 - adds r1, 0x50 - lsls r2, r0, 2 - adds r2, r0 - lsls r2, 2 - adds r2, 0x14 - adds r2, r4, r2 - adds r0, r4, 0 - bl sub_81D1F84 - adds r0, r4, 0 - bl sub_81D2074 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CEE90 - - thumb_func_start sub_81CEEC8 -sub_81CEEC8: @ 81CEEC8 - push {r4,r5,lr} - bl sub_81CDC70 - adds r5, r0, 0 - bl sub_81CDD5C - cmp r0, 0 - bne _081CEEF0 - bl sub_81CDC60 - adds r4, r0, 0 - lsls r4, 16 - lsrs r4, 16 - bl sub_81CDC50 - lsls r0, 16 - lsrs r0, 16 - subs r0, 0x1 - cmp r4, r0 - beq _081CEF0C -_081CEEF0: - bl sub_81CDC84 - lsls r0, 24 - asrs r0, 24 - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 2 - adds r1, 0x14 - adds r1, r5, r1 - adds r2, r5, 0 - adds r2, 0x50 - adds r0, r5, 0 - bl sub_81D1F84 -_081CEF0C: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_81CEEC8 - - thumb_func_start sub_81CEF14 -sub_81CEF14: @ 81CEF14 - push {r4,lr} - movs r0, 0xC - bl GetSubstructPtr - adds r4, r0, 0 - bl sub_81CDD5C - cmp r0, 0x1 - beq _081CEF2A - movs r0, 0 - b _081CEF30 -_081CEF2A: - ldr r1, =0x00001828 - adds r0, r4, r1 - ldrb r0, [r0] -_081CEF30: - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CEF14 - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/pokenav_unk_8.s b/asm/pokenav_unk_8.s index 5bba161bb..6fcf21374 100644 --- a/asm/pokenav_unk_8.s +++ b/asm/pokenav_unk_8.s @@ -5,219 +5,7 @@ @ File centered around AllocSubstruct(7) - thumb_func_start sub_81CEF3C -sub_81CEF3C: @ 81CEF3C - push {r4,lr} - movs r0, 0x7 - movs r1, 0x24 - bl AllocSubstruct - adds r4, r0, 0 - cmp r4, 0 - beq _081CEF90 - ldr r1, =0x000006ac - movs r0, 0x12 - bl AllocSubstruct - str r0, [r4, 0x20] - cmp r0, 0 - beq _081CEF90 - ldr r0, =sub_81CF010 - str r0, [r4] - ldr r0, =sub_81CF11C - movs r1, 0x1 - bl CreateLoopedTask - str r0, [r4, 0x4] - movs r0, 0 - str r0, [r4, 0x18] - bl sub_81C76AC - ldr r1, =gUnknown_086233A0 - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - str r0, [r4, 0x14] - movs r0, 0x1 - b _081CEF92 - .pool -_081CEF90: - movs r0, 0 -_081CEF92: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_81CEF3C - - thumb_func_start sub_81CEF98 -sub_81CEF98: @ 81CEF98 - push {r4,lr} - movs r0, 0x7 - movs r1, 0x24 - bl AllocSubstruct - adds r4, r0, 0 - cmp r4, 0 - beq _081CEFD4 - movs r0, 0x12 - bl GetSubstructPtr - str r0, [r4, 0x20] - ldr r0, =sub_81CF030 - str r0, [r4] - movs r0, 0x1 - str r0, [r4, 0x18] - bl sub_81C76AC - ldr r1, =gUnknown_086233A0 - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - str r0, [r4, 0x14] - movs r0, 0x1 - b _081CEFD6 - .pool -_081CEFD4: - movs r0, 0 -_081CEFD6: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_81CEF98 - - thumb_func_start sub_81CEFDC -sub_81CEFDC: @ 81CEFDC - push {lr} - movs r0, 0x7 - bl GetSubstructPtr - ldr r1, [r0] - bl _call_via_r1 - pop {r1} - bx r1 - thumb_func_end sub_81CEFDC - thumb_func_start sub_81CEFF0 -sub_81CEFF0: @ 81CEFF0 - push {lr} - movs r0, 0x7 - bl GetSubstructPtr - ldr r0, [r0, 0x1C] - cmp r0, 0 - bne _081CF004 - movs r0, 0x12 - bl FreePokenavSubstruct -_081CF004: - movs r0, 0x7 - bl FreePokenavSubstruct - pop {r0} - bx r0 - thumb_func_end sub_81CEFF0 - - thumb_func_start sub_81CF010 -sub_81CF010: @ 81CF010 - push {r4,lr} - adds r4, r0, 0 - ldr r0, [r4, 0x4] - bl IsLoopedTaskActive - cmp r0, 0 - bne _081CF022 - ldr r0, =sub_81CF030 - str r0, [r4] -_081CF022: - movs r0, 0 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CF010 - - thumb_func_start sub_81CF030 -sub_81CF030: @ 81CF030 - push {r4,r5,lr} - adds r4, r0, 0 - ldr r2, =gMain - ldrh r1, [r2, 0x30] - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _081CF048 - movs r0, 0x1 - b _081CF0A6 - .pool -_081CF048: - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _081CF054 - movs r0, 0x2 - b _081CF0A6 -_081CF054: - ldrh r1, [r2, 0x2E] - movs r0, 0x20 - ands r0, r1 - cmp r0, 0 - beq _081CF062 - movs r0, 0x3 - b _081CF0A6 -_081CF062: - movs r0, 0x10 - ands r0, r1 - lsls r0, 16 - lsrs r2, r0, 16 - cmp r2, 0 - beq _081CF072 - movs r0, 0x4 - b _081CF0A6 -_081CF072: - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _081CF088 - str r2, [r4, 0x1C] - ldr r0, =sub_81CF0B0 - str r0, [r4] - movs r0, 0x5 - b _081CF0A6 - .pool -_081CF088: - movs r5, 0x1 - adds r0, r5, 0 - ands r0, r1 - cmp r0, 0 - bne _081CF096 - movs r0, 0 - b _081CF0A6 -_081CF096: - bl GetSelectedMatchCall - ldr r1, [r4, 0x20] - strh r0, [r1, 0x2] - str r5, [r4, 0x1C] - ldr r0, =sub_81CF0B8 - str r0, [r4] - movs r0, 0x6 -_081CF0A6: - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CF030 - - thumb_func_start sub_81CF0B0 -sub_81CF0B0: @ 81CF0B0 - ldr r0, =0x000186a3 - bx lr - .pool - thumb_func_end sub_81CF0B0 - - thumb_func_start sub_81CF0B8 -sub_81CF0B8: @ 81CF0B8 - ldr r0, =0x000186a9 - bx lr - .pool - thumb_func_end sub_81CF0B8 - - thumb_func_start sub_81CF0C0 -sub_81CF0C0: @ 81CF0C0 - push {lr} - movs r0, 0x7 - bl GetSubstructPtr - ldr r0, [r0, 0x18] - pop {r1} - bx r1 - thumb_func_end sub_81CF0C0 thumb_func_start sub_81CF0D0 sub_81CF0D0: @ 81CF0D0 diff --git a/asmdiff.sh b/asmdiff.sh index 1d2141c32..9e8749acf 100755 --- a/asmdiff.sh +++ b/asmdiff.sh @@ -4,4 +4,4 @@ OBJDUMP="$DEVKITARM/bin/arm-none-eabi-objdump -D -bbinary -marmv4t -Mforce-thumb OPTIONS="--start-address=$(($1)) --stop-address=$(($1 + $2))" $OBJDUMP $OPTIONS baserom.gba > baserom.dump $OBJDUMP $OPTIONS pokeemerald.gba > pokeemerald.dump -diff baserom.dump pokeemerald.dump +diff -u baserom.dump pokeemerald.dump diff --git a/build_tools.sh b/build_tools.sh index 429a9cef0..b11a9a1b2 100755 --- a/build_tools.sh +++ b/build_tools.sh @@ -9,3 +9,4 @@ make -C tools/ramscrgen CXX=${1:-g++} make -C tools/gbafix CXX=${1:-g++} make -C tools/mid2agb CXX=${1:-g++} make -C tools/mapjson CXX=${1:-g++} +make -C tools/jsonproc CXX=${1:-g++} diff --git a/common_syms/ereader_screen.txt b/common_syms/ereader_screen.txt new file mode 100644 index 000000000..5a89d370d --- /dev/null +++ b/common_syms/ereader_screen.txt @@ -0,0 +1 @@ +gUnknown_03006370 diff --git a/common_syms/librfu.txt b/common_syms/librfu.txt new file mode 100644 index 000000000..e81d78795 --- /dev/null +++ b/common_syms/librfu.txt @@ -0,0 +1,6 @@ +gUnknown_03007870 +gUnknown_03007880 +gUnknown_03007890 +gUnknown_03007894 +gUnknown_03007898 +gUnknown_030078A0 diff --git a/common_syms/librfu_stwi.txt b/common_syms/librfu_stwi.txt new file mode 100644 index 000000000..0e8468f4d --- /dev/null +++ b/common_syms/librfu_stwi.txt @@ -0,0 +1 @@ +gRfuState diff --git a/data/dodrio_berry_picking.s b/data/dodrio_berry_picking.s deleted file mode 100755 index 38701c199..000000000 --- a/data/dodrio_berry_picking.s +++ /dev/null @@ -1,663 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - - .align 2 -gUnknown_082F449C:: @ 82F449C - .byte 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 - .byte 0x08, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x03, 0x08 - .byte 0x09, 0x00, 0x00, 0x01, 0x02, 0x05, 0x06, 0x03 - .byte 0x04, 0x05, 0x08, 0x09, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 - .byte 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x02, 0x09 - .byte 0x00, 0x00, 0x01, 0x04, 0x05, 0x06, 0x07, 0x02 - .byte 0x03, 0x04, 0x09, 0x00, 0x00, 0x01, 0x06, 0x07 - .byte 0x02, 0x03, 0x04, 0x05, 0x06, 0x09, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02 - .byte 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x01, 0x00 - .byte 0x00, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x01 - .byte 0x02, 0x03, 0x00, 0x00, 0x05, 0x06, 0x07, 0x08 - .byte 0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x07 - .byte 0x08, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03 - .byte 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x00, 0x02 - .byte 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x00 - .byte 0x01, 0x02, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09 - .byte 0x00, 0x01, 0x02, 0x03, 0x04, 0x06, 0x07, 0x08 - .byte 0x09, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 - .byte 0x08, 0x09, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 - .byte 0x06, 0x07, 0x08, 0x04, 0x05, 0x06, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x03, 0x04, 0x05, 0x05, 0x06, 0x03 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x04, 0x05, 0x06, 0x06, 0x07, 0x02, 0x02 - .byte 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x03, 0x04, 0x05, 0x05, 0x06, 0x07, 0x07, 0x08 - .byte 0x01, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x04 - .byte 0x05, 0x06, 0x06, 0x07, 0x08, 0x08, 0x09, 0x00 - .byte 0x00, 0x01, 0x02, 0x02, 0x03, 0x04, 0x01, 0x00 - .byte 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01 - .byte 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00 - .byte 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0x01 - .byte 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00 - .byte 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x01, 0x02 - .byte 0x01, 0x02, 0x03, 0x02, 0x03, 0x04, 0x03, 0x04 - .byte 0x00, 0x00, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09 - .byte 0x01, 0x01, 0x01, 0x09, 0x09, 0x09, 0x09, 0x09 - .byte 0x09, 0x09, 0x00, 0x00, 0x01, 0x01, 0x00, 0x09 - .byte 0x09, 0x09, 0x09, 0x09, 0x02, 0x02, 0x00, 0x00 - .byte 0x01, 0x01, 0x01, 0x09, 0x09, 0x09, 0x03, 0x03 - .byte 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x09 - .byte 0x03, 0x03, 0x04, 0x04, 0x00, 0x00, 0x01, 0x01 - .byte 0x02, 0x02, 0x03, 0x05, 0x00, 0x00, 0x00, 0x00 - .byte 0x04, 0x06, 0x00, 0x00, 0x00, 0x03, 0x05, 0x07 - .byte 0x00, 0x00, 0x02, 0x04, 0x06, 0x08, 0x00, 0x01 - .byte 0x03, 0x05, 0x06, 0x09 - - .align 2 -gUnknown_082F7DF0_UnrefDupe:: @ 82F4698 - .incbin "graphics/link_games/dodrioberry_bg1.gbapal" - - .align 2 - .incbin "graphics/link_games/dodrioberry_bg2.gbapal" - - .align 2 -gUnknown_082F7E30_UnrefDupe:: @ 82F46B8 - .incbin "graphics/link_games/dodrioberry_pkmn.gbapal" - - .align 2 -gUnknown_082F7E50_UnrefDupe:: @ 82F46D8 - .incbin "graphics/link_games/dodrioberry_shiny.gbapal" - - .align 2 -gUnknown_082F7E70_UnrefDupe:: @ 82F46F8 - .incbin "graphics/link_games/dodrioberry_status.gbapal" - - .align 2 -gUnknown_082F7E90_UnrefDupe:: @ 82F4718 - .incbin "graphics/link_games/dodrioberry_berrysprites.gbapal" - - .align 2 -gUnknown_082F7EB0_UnrefDupe:: @ 82F4738 - .incbin "graphics/link_games/dodrioberry_berrysprites.4bpp.lz" - - .align 2 -gUnknown_082F8064_UnrefDupe:: @ 82F490C - .incbin "graphics/link_games/dodrioberry_platform.gbapal" - - .align 2 -gUnknown_082F8084_UnrefDupe:: @ 82F492C - .incbin "graphics/link_games/dodrioberry_bg1.4bpp.lz" - - .align 2 -gUnknown_082F8914_UnrefDupe:: @ 82F51BC - .incbin "graphics/link_games/dodrioberry_bg2.4bpp.lz" - - .align 2 -gUnknown_082F96E0_UnrefDupe:: @ 82F5F88 - .incbin "graphics/link_games/dodrioberry_status.4bpp.lz" - - .align 2 -gUnknown_082F9774_UnrefDupe:: @ 82F601C - .incbin "graphics/link_games/dodrioberry_platform.4bpp.lz" - - .align 2 -gUnknown_082F98BC_UnrefDupe:: @ 82F6164 - .incbin "graphics/link_games/dodrioberry_pkmn.4bpp.lz" - - .align 2 -gUnknown_082FAAD8_UnrefDupe:: @ 82F7380 - .incbin "graphics/link_games/dodrioberry_bg1.bin.lz" - - .align 2 -gUnknown_082FAD44_UnrefDupe:: @ 82F75EC - .incbin "graphics/link_games/dodrioberry_bg2right.bin.lz" - - .align 2 -gUnknown_082FAF94_UnrefDupe:: @ 82F783C - .incbin "graphics/link_games/dodrioberry_bg2left.bin.lz" - - .align 2 -gUnknown_082F7A88:: @ 82F7A88 - .byte 0x28, 0x18, 0x0d, 0x20, 0x13, 0x0a, 0x16, 0x0d - .byte 0x07, 0x00, 0x00, 0x00 - - .align 2 -gUnknown_082F7A94:: @ 82F7A94 - .byte 0x08, 0x05, 0x08, 0x0b, 0x0f, 0x00, 0x00, 0x00 - - .align 2 -gUnknown_082F7A9C:: @ 82F7A9C - .byte 0x05, 0x0a, 0x14, 0x1e, 0x32, 0x46, 0x64, 0x00 - - .align 2 -gUnknown_082F7AA4:: @ 82F7AA4 - .byte 0x0f, 0x10, 0x11, 0x12, 0x13, 0x13, 0x12, 0x11 - .byte 0x10, 0x0f, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19 - .byte 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21 - .byte 0x22, 0x22, 0x21, 0x20, 0x1f, 0x1e, 0x00, 0x00 - - .align 2 -gUnknown_082F7AC4:: @ 82F7AC4 - .4byte sub_8024DBC - .4byte sub_8024E00 - .4byte sub_8024E38 - .4byte sub_8024F10 - .4byte sub_8024F38 - .4byte sub_8025198 - .4byte sub_8025324 - .4byte sub_8025470 - .4byte sub_8025644 - .4byte sub_80256AC - .4byte sub_8025758 - .4byte sub_80250D4 - - .align 2 -gUnknown_082F7AF4:: @ 82F7AF4 - .4byte sub_8024DBC - .4byte sub_8024E00 - .4byte sub_8024E38 - .4byte sub_8024F10 - .4byte sub_8024FFC - .4byte sub_8025230 - .4byte sub_8025324 - .4byte sub_8025470 - .4byte sub_8025644 - .4byte sub_80256AC - .4byte sub_8025758 - .4byte sub_8025158 - - .align 2 -gUnknown_082F7B24:: @ 82F7B24 - .2byte 0x000a, 0x001e, 0x0032, 0x0032 - - .align 2 -gUnknown_082F7B2C:: @ 82F7B2C - .byte 0x00, 0x05, 0x01, 0x14, 0x0b, 0x0f, 0x01, 0x00 - - .align 2 -gUnknown_082F7B34:: @ 82F7B34 - .4byte gText_BerriesPicked - .4byte gText_BestScore - .4byte gText_BerriesInRowFivePlayers - - .align 2 -gUnknown_082F7B40:: @ 82F7B40 - .byte 0x04, 0x07, 0x04, 0x00 - - .align 2 -gUnknown_082F7B44:: @ 82F7B44 - .2byte 0x0019, 0x0029, 0x0039 - -gUnknown_082F7B4A:: @ 82F7B4A - .2byte 0x0019, 0x0029, 0x0049 - - .align 2 -gUnknown_082F7B50:: @ 82F7B50 - .2byte 0x270f, 0x0000, 0x005a, 0x270f, 0x270f, 0x270f, 0x0046, 0x270f - .2byte 0x270f, 0x0000, 0x270f, 0x0000, 0x270f, 0x270f, 0x003c, 0x0000 - .2byte 0x270f, 0x270f, 0x270f, 0x0000 - - .align 2 -gUnknown_082F7B78:: @ 82F7B78 - .string "ÀÁÂÇÈÉÊ$" - - .align 2 -gUnknown_082F7B80:: @ 82F7B80 - .string "ABCDEFG$" - - .align 2 -gUnknown_082F7B88:: @ 82F7B88 - .string "0123456$" - - .align 2 -gUnknown_082F7B90:: @ 82F7B90 - .4byte gUnknown_082F7B78 - .4byte gUnknown_082F7B78 - .4byte gUnknown_082F7B78 - .4byte gUnknown_082F7B80 - .4byte gUnknown_082F7B88 - - .align 2 -gUnknown_082F7BA4:: @ 82F7BA4 struct BgTemplate - .4byte 0x000001e0 - .4byte 0x000012c9 - .4byte 0x000012ea - .4byte 0x000021ff - .4byte 0x000000ff - .4byte 0x00000000 - - .align 2 -gUnknown_082F7BBC:: @ 82F7BBC - window_template 0x00, 0x01, 0x01, 0x1c, 0x02, 0x0d, 0x0013 - window_template 0x00, 0x01, 0x05, 0x1c, 0x0e, 0x0d, 0x004b - - .align 2 -gUnknown_082F7BCC:: @ 82F7BCC - window_template 0x00, 0x01, 0x05, 0x1c, 0x07, 0x0d, 0x004b - - .align 2 -gUnknown_082F7BD4:: @ 82F7BD4 - window_template 0x00, 0x01, 0x08, 0x13, 0x03, 0x0d, 0x0013 - window_template 0x00, 0x16, 0x07, 0x06, 0x04, 0x0d, 0x004c - - .align 2 -gUnknown_082F7BE4:: @ 82F7BE4 - window_template 0x00, 0x04, 0x06, 0x16, 0x05, 0x0d, 0x0013 - - .align 2 -gUnknown_082F7BEC:: @ 82F7BEC - window_template 0x00, 0x05, 0x08, 0x13, 0x03, 0x0d, 0x0013 - - .align 2 -gUnknown_082F449C_UnrefDupe:: @ 82F7BF4 - .byte 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 - .byte 0x08, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x03, 0x08 - .byte 0x09, 0x00, 0x00, 0x01, 0x02, 0x05, 0x06, 0x03 - .byte 0x04, 0x05, 0x08, 0x09, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 - .byte 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x02, 0x09 - .byte 0x00, 0x00, 0x01, 0x04, 0x05, 0x06, 0x07, 0x02 - .byte 0x03, 0x04, 0x09, 0x00, 0x00, 0x01, 0x06, 0x07 - .byte 0x02, 0x03, 0x04, 0x05, 0x06, 0x09, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02 - .byte 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x01, 0x00 - .byte 0x00, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x01 - .byte 0x02, 0x03, 0x00, 0x00, 0x05, 0x06, 0x07, 0x08 - .byte 0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x07 - .byte 0x08, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03 - .byte 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x00, 0x02 - .byte 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x00 - .byte 0x01, 0x02, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09 - .byte 0x00, 0x01, 0x02, 0x03, 0x04, 0x06, 0x07, 0x08 - .byte 0x09, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 - .byte 0x08, 0x09, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 - .byte 0x06, 0x07, 0x08, 0x04, 0x05, 0x06, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x03, 0x04, 0x05, 0x05, 0x06, 0x03 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x04, 0x05, 0x06, 0x06, 0x07, 0x02, 0x02 - .byte 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x03, 0x04, 0x05, 0x05, 0x06, 0x07, 0x07, 0x08 - .byte 0x01, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x04 - .byte 0x05, 0x06, 0x06, 0x07, 0x08, 0x08, 0x09, 0x00 - .byte 0x00, 0x01, 0x02, 0x02, 0x03, 0x04, 0x01, 0x00 - .byte 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01 - .byte 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00 - .byte 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0x01 - .byte 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00 - .byte 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x01, 0x02 - .byte 0x01, 0x02, 0x03, 0x02, 0x03, 0x04, 0x03, 0x04 - .byte 0x00, 0x00, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09 - .byte 0x01, 0x01, 0x01, 0x09, 0x09, 0x09, 0x09, 0x09 - .byte 0x09, 0x09, 0x00, 0x00, 0x01, 0x01, 0x00, 0x09 - .byte 0x09, 0x09, 0x09, 0x09, 0x02, 0x02, 0x00, 0x00 - .byte 0x01, 0x01, 0x01, 0x09, 0x09, 0x09, 0x03, 0x03 - .byte 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x09 - .byte 0x03, 0x03, 0x04, 0x04, 0x00, 0x00, 0x01, 0x01 - .byte 0x02, 0x02, 0x03, 0x05, 0x00, 0x00, 0x00, 0x00 - .byte 0x04, 0x06, 0x00, 0x00, 0x00, 0x03, 0x05, 0x07 - .byte 0x00, 0x00, 0x02, 0x04, 0x06, 0x08, 0x00, 0x01 - .byte 0x03, 0x05, 0x06, 0x09 - - .align 2 -gDodrioBerryBgPal1:: @ 82F7DF0 - .incbin "graphics/link_games/dodrioberry_bg1.gbapal" - - .align 2 - .incbin "graphics/link_games/dodrioberry_bg2.gbapal" - - .align 2 -gDodrioBerryPkmnPal:: @ 82F7E30 - .incbin "graphics/link_games/dodrioberry_pkmn.gbapal" - - .align 2 -gDodrioBerryShinyPal:: @ 82F7E50 - .incbin "graphics/link_games/dodrioberry_shiny.gbapal" - - .align 2 -gDodrioBerryStatusPal:: @ 82F7E70 - .incbin "graphics/link_games/dodrioberry_status.gbapal" - - .align 2 -gDodrioBerrySpritesPal:: @ 82F7E90 - .incbin "graphics/link_games/dodrioberry_berrysprites.gbapal" - - .align 2 -gDodrioBerrySpritesGfx:: @ 82F7EB0 - .incbin "graphics/link_games/dodrioberry_berrysprites.4bpp.lz" - - .align 2 -gDodrioBerryPlatformPal:: @ 82F8064 - .incbin "graphics/link_games/dodrioberry_platform.gbapal" - - .align 2 -gDodrioBerryBgGfx1:: @ 82F8084 - .incbin "graphics/link_games/dodrioberry_bg1.4bpp.lz" - - .align 2 -gDodrioBerryBgGfx2:: @ 82F8914 - .incbin "graphics/link_games/dodrioberry_bg2.4bpp.lz" - - .align 2 -gDodrioBerryStatusGfx:: @ 82F96E0 - .incbin "graphics/link_games/dodrioberry_status.4bpp.lz" - - .align 2 -gDodrioBerryPlatformGfx:: @ 82F9774 - .incbin "graphics/link_games/dodrioberry_platform.4bpp.lz" - - .align 2 -gDodrioBerryPkmnGfx:: @ 82F98BC - .incbin "graphics/link_games/dodrioberry_pkmn.4bpp.lz" - - .align 2 -gDodrioBerryBgTilemap1:: @ 82FAAD8 - .incbin "graphics/link_games/dodrioberry_bg1.bin.lz" - - .align 2 -gDodrioBerryBgTilemap2Right:: @ 82FAD44 - .incbin "graphics/link_games/dodrioberry_bg2right.bin.lz" - - .align 2 -gDodrioBerryBgTilemap2Left:: @ 82FAF94 - .incbin "graphics/link_games/dodrioberry_bg2left.bin.lz" - - .align 2 -gUnknown_082FB1E0:: @ 82FB1E0 - .byte 0x00, 0x00, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_082FB1E8:: @ 82FB1E8 - .byte 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00 - - .align 2 -gUnknown_082FB1F0:: @ 82FB1F0 - .byte 0x00, 0x00, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_082FB1F8:: @ 82FB1F8 - .byte 0x00, 0x40, 0x00, 0xc0, 0x00, 0x0c, 0x00, 0x00 - - .align 2 -gUnknown_082FB200:: @ 82FB200 - .2byte 0x0000, 0x0014 - .2byte 0xfffe, 0x0000 - - .align 2 -gUnknown_082FB208:: @ 82FB208 - .2byte 0x0040, 0x0014 - .2byte 0xfffe, 0x0000 - - .align 2 -gUnknown_082FB210:: @ 82FB210 - .2byte 0x0080, 0x0014 - .2byte 0xfffe, 0x0000 - - .align 2 -gUnknown_082FB218:: @ 82FB218 - .2byte 0x00c0, 0x0014 - .2byte 0xfffe, 0x0000 - - .align 2 -gUnknown_082FB220:: @ 82FB220 - .2byte 0x0100, 0x0014 - .2byte 0xfffe, 0x0000 - - .align 2 -gUnknown_082FB228:: @ 82FB228 - .4byte gUnknown_082FB200 - .4byte gUnknown_082FB208 - .4byte gUnknown_082FB210 - .4byte gUnknown_082FB218 - .4byte gUnknown_082FB220 - - .align 2 -gUnknown_082FB23C:: @ 82FB23C - .2byte 0x0000, 0x0014 - .2byte 0xfffe, 0x0000 - - .align 2 -gUnknown_082FB244:: @ 82FB244 - .2byte 0x0004, 0x0014 - .2byte 0xfffe, 0x0000 - - .align 2 -gUnknown_082FB24C:: @ 82FB24C - .2byte 0x0008, 0x0014 - .2byte 0xfffe, 0x0000 - - .align 2 -gUnknown_082FB254:: @ 82FB254 - .4byte gUnknown_082FB23C - .4byte gUnknown_082FB244 - .4byte gUnknown_082FB24C - - .align 2 -gUnknown_082FB260:: @ 82FB260 - .2byte 0x0000, 0x0014 - .2byte 0xfffe, 0x0000 - - .align 2 -gUnknown_082FB268:: @ 82FB268 - .2byte 0x0004, 0x0014 - .2byte 0xfffe, 0x0000 - - .align 2 -gUnknown_082FB270:: @ 82FB270 - .2byte 0x0008, 0x0014 - .2byte 0xfffe, 0x0000 - - .align 2 -gUnknown_082FB278:: @ 82FB278 - .2byte 0x000c, 0x0014 - .2byte 0xfffe, 0x0000 - - .align 2 -gUnknown_082FB280:: @ 82FB280 - .2byte 0x0010, 0x0014 - .2byte 0xfffe, 0x0000 - - .align 2 -gUnknown_082FB288:: @ 82FB288 - .2byte 0x0014, 0x0014 - .2byte 0xfffe, 0x0000 - - .align 2 -gUnknown_082FB290:: @ 82FB290 - .2byte 0x0018, 0x0014 - .2byte 0xfffe, 0x0000 - - .align 2 -gUnknown_082FB298:: @ 82FB298 - .2byte 0x001c, 0x0014 - .2byte 0xfffe, 0x0000 - - .align 2 -gUnknown_082FB2A0:: @ 82FB2A0 - .2byte 0x0020, 0x0014 - .2byte 0xfffe, 0x0000 - - .align 2 -gUnknown_082FB2A8:: @ 82FB2A8 - .4byte gUnknown_082FB260 - .4byte gUnknown_082FB268 - .4byte gUnknown_082FB270 - .4byte gUnknown_082FB278 - .4byte gUnknown_082FB280 - .4byte gUnknown_082FB288 - .4byte gUnknown_082FB290 - .4byte gUnknown_082FB298 - .4byte gUnknown_082FB2A0 - - .align 2 -gUnknown_082FB2CC:: @ 82FB2CC - .2byte 0x0000, 0x0014 - .2byte 0xfffe, 0x0000 - - .align 2 -gUnknown_082FB2D4:: @ 82FB2D4 - .4byte gUnknown_082FB2CC - - .align 2 -gUnknown_082FB2D8:: @ 82FB2D8 - obj_pal gDodrioBerryPkmnPal, 0x0000 - - .align 2 -gUnknown_082FB2E0:: @ 82FB2E0 - obj_pal gDodrioBerryShinyPal, 0x0001 - - .align 2 -gUnknown_082FB2E8:: @ 82FB2E8 - obj_pal gDodrioBerryStatusPal, 0x0002 - - .align 2 -gUnknown_082FB2F0:: @ 82FB2F0 - spr_template 0x0001, 0x0002, gUnknown_082FB1E8, gUnknown_082FB254, NULL, gDummySpriteAffineAnimTable, nullsub_15 - - .align 2 - .byte 0xD4, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44 - .byte 0x45, 0xFB, 0x00, 0x00 - - .align 2 -gUnknown_082FB314:: @ 82FB314 - obj_pal gDodrioBerrySpritesPal, 0x0003 - - .align 2 -gUnknown_082FB31C:: @ 82FB31C - .2byte 0x0058, 0x0080, 0x00a8, 0x00d0 - - .align 2 -gUnknown_082FB324:: @ 82FB324 - spr_template 0x0002, 0x0003, gUnknown_082FB1F0, gUnknown_082FB2A8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy - - .align 2 -gUnknown_082FB33C:: @ 82FB33C - spr_template 0x0002, 0x0003, gUnknown_082FB1E8, gUnknown_082FB2A8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy - - .align 2 -gUnknown_082FB354:: @ 82FB354 - .byte 0x1E, 0x14 - -gUnknown_082FB356:: @ 82FB356 - .byte 0xE6, 0x00 - - .align 2 -gUnknown_082FB358:: @ 82FB358 - .2byte 0x0037, 0x001e, 0x004a, 0x0000 - - .align 2 -gUnknown_082FB360:: @ 82FB360 - obj_pal gDodrioBerryPlatformPal, 0x0006 - - .align 2 -gUnknown_082FB368:: @ 82FB368 - spr_template 0x0005, 0x0006, gUnknown_082FB1F8, gUnknown_082FB2D4, NULL, gDummySpriteAffineAnimTable, sub_8028CF4 - - .align 2 -gUnknown_082FB380:: @ 82FB380 - .byte 0x01, 0x02, 0x03 - -gUnknown_082FB383:: @ 82FB383 - .byte 0x01, 0x04, 0x05 - .byte 0x01, 0x08, 0x09 - .byte 0x01, 0x06, 0x07 - - .align 2 -gUnknown_082FB38C:: @ 82FB38C - .byte 0x0c, 0x06, 0x00, 0x00 - - .align 2 -gUnknown_082FB390:: @ 82FB390 - .byte 0x09, 0x0a, 0x00, 0x00, 0x0f, 0x06, 0x00, 0x00 - - .align 2 -gUnknown_082FB398:: @ 82FB398 - .byte 0x0c, 0x06, 0x00, 0x00, 0x12, 0x0a, 0x00, 0x00 - .byte 0x06, 0x0a, 0x00, 0x00 - - .align 2 -gUnknown_082FB3A4:: @ 82FB3A4 - .byte 0x09, 0x0a, 0x00, 0x00, 0x0f, 0x06, 0x00, 0x00 - .byte 0x15, 0x0a, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00 - - .align 2 -gUnknown_082FB3B4:: @ 82FB3B4 - .byte 0x0c, 0x06, 0x00, 0x00, 0x12, 0x0a, 0x00, 0x00 - .byte 0x17, 0x06, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00 - .byte 0x06, 0x0a, 0x00, 0x00 - - .align 2 -gUnknown_082FB3C8:: @ 82FB3C8 - .4byte gUnknown_082FB38C - .4byte gUnknown_082FB390 - .4byte gUnknown_082FB398 - .4byte gUnknown_082FB3A4 - .4byte gUnknown_082FB3B4 - - .align 2 -gUnknown_082FB3DC:: @ 82FB3DC - .4byte gText_1Colon - .4byte gText_2Colon - .4byte gText_3Colon - .4byte gText_4Colon - .4byte gText_5Colon - - .align 2 -gUnknown_082FB3F0:: @ 82FB3F0 - .2byte 0x005c, 0x0084, 0x00ac, 0x00d4 - -gUnknown_082FB3F8:: @ 82FB3F8 - .2byte 0x0021, 0x0031, 0x0041, 0x0051, 0x0061 - -gUnknown_082FB402:: @ 82FB402 - .2byte 0x0011, 0x0021, 0x0031, 0x0041, 0x0051 - - .align 2 -gUnknown_082FB40C:: @ 82FB40C - .4byte 0x00000000, sub_8029338 - .4byte 0x00000001, sub_8029440 - .4byte 0x00000002, sub_802988C - .4byte 0x00000003, sub_802A010 - .4byte 0x00000004, sub_802A380 - .4byte 0x00000005, sub_802A454 - .4byte 0x00000006, sub_802A534 - .4byte 0x00000007, sub_802A588 - .4byte 0x00000008, unused_0 - .4byte 0x00000009, nullsub_16 - - .align 2 -gUnknown_082FB45C:: @ 82FB45C - .byte 0x00, 0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00 diff --git a/data/event_scripts.s b/data/event_scripts.s index bf32eae83..a05069709 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -20,6 +20,7 @@ #include "constants/weather.h" #include "constants/trainer_hill.h" #include "constants/battle.h" +#include "constants/metatile_labels.h" .include "asm/macros.inc" .include "asm/macros/event.inc" .include "constants/constants.inc" @@ -848,86 +849,86 @@ Std_MsgboxAutoclose:: @ 8271494 return EventScript_ResetAllBerries:: @ 827149D - setberrytree 2, 7, 5 - setberrytree 1, 3, 5 - setberrytree 11, 7, 5 - setberrytree 13, 3, 5 - setberrytree 4, 7, 5 - setberrytree 76, 1, 5 - setberrytree 8, 1, 5 - setberrytree 10, 6, 5 - setberrytree 25, 20, 5 - setberrytree 26, 2, 5 - setberrytree 66, 2, 5 - setberrytree 67, 20, 5 - setberrytree 69, 22, 5 - setberrytree 70, 22, 5 - setberrytree 71, 22, 5 - setberrytree 55, 17, 5 - setberrytree 56, 17, 5 - setberrytree 5, 1, 5 - setberrytree 6, 6, 5 - setberrytree 7, 1, 5 - setberrytree 16, 18, 5 - setberrytree 17, 18, 5 - setberrytree 18, 18, 5 - setberrytree 29, 19, 5 - setberrytree 28, 19, 5 - setberrytree 27, 19, 5 - setberrytree 24, 4, 5 - setberrytree 23, 3, 5 - setberrytree 22, 3, 5 - setberrytree 21, 4, 5 - setberrytree 19, 16, 5 - setberrytree 20, 16, 5 - setberrytree 80, 7, 5 - setberrytree 81, 7, 5 - setberrytree 77, 8, 5 - setberrytree 78, 8, 5 - setberrytree 68, 8, 5 - setberrytree 31, 10, 5 - setberrytree 33, 10, 5 - setberrytree 34, 21, 5 - setberrytree 35, 21, 5 - setberrytree 36, 21, 5 - setberrytree 83, 24, 5 - setberrytree 84, 24, 5 - setberrytree 85, 10, 5 - setberrytree 86, 6, 5 - setberrytree 37, 5, 5 - setberrytree 38, 5, 5 - setberrytree 39, 5, 5 - setberrytree 40, 3, 5 - setberrytree 41, 3, 5 - setberrytree 42, 3, 5 - setberrytree 46, 19, 5 - setberrytree 45, 20, 5 - setberrytree 44, 18, 5 - setberrytree 43, 16, 5 - setberrytree 47, 8, 5 - setberrytree 48, 5, 5 - setberrytree 49, 4, 5 - setberrytree 50, 2, 5 - setberrytree 52, 18, 5 - setberrytree 53, 18, 5 - setberrytree 62, 6, 5 - setberrytree 64, 6, 5 - setberrytree 58, 21, 5 - setberrytree 59, 21, 5 - setberrytree 60, 25, 5 - setberrytree 61, 25, 5 - setberrytree 79, 23, 5 - setberrytree 14, 23, 5 - setberrytree 15, 21, 5 - setberrytree 30, 21, 5 - setberrytree 65, 25, 5 - setberrytree 72, 25, 5 - setberrytree 73, 23, 5 - setberrytree 74, 23, 5 - setberrytree 87, 3, 5 - setberrytree 88, 10, 5 - setberrytree 89, 4, 5 - setberrytree 82, 36, 5 + setberrytree 2, ITEM_TO_BERRY(ITEM_ORAN_BERRY), 5 + setberrytree 1, ITEM_TO_BERRY(ITEM_PECHA_BERRY), 5 + setberrytree 11, ITEM_TO_BERRY(ITEM_ORAN_BERRY), 5 + setberrytree 13, ITEM_TO_BERRY(ITEM_PECHA_BERRY), 5 + setberrytree 4, ITEM_TO_BERRY(ITEM_ORAN_BERRY), 5 + setberrytree 76, ITEM_TO_BERRY(ITEM_CHERI_BERRY), 5 + setberrytree 8, ITEM_TO_BERRY(ITEM_CHERI_BERRY), 5 + setberrytree 10, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), 5 + setberrytree 25, ITEM_TO_BERRY(ITEM_PINAP_BERRY), 5 + setberrytree 26, ITEM_TO_BERRY(ITEM_CHESTO_BERRY), 5 + setberrytree 66, ITEM_TO_BERRY(ITEM_CHESTO_BERRY), 5 + setberrytree 67, ITEM_TO_BERRY(ITEM_PINAP_BERRY), 5 + setberrytree 69, ITEM_TO_BERRY(ITEM_KELPSY_BERRY), 5 + setberrytree 70, ITEM_TO_BERRY(ITEM_KELPSY_BERRY), 5 + setberrytree 71, ITEM_TO_BERRY(ITEM_KELPSY_BERRY), 5 + setberrytree 55, ITEM_TO_BERRY(ITEM_BLUK_BERRY), 5 + setberrytree 56, ITEM_TO_BERRY(ITEM_BLUK_BERRY), 5 + setberrytree 5, ITEM_TO_BERRY(ITEM_CHERI_BERRY), 5 + setberrytree 6, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), 5 + setberrytree 7, ITEM_TO_BERRY(ITEM_CHERI_BERRY), 5 + setberrytree 16, ITEM_TO_BERRY(ITEM_NANAB_BERRY), 5 + setberrytree 17, ITEM_TO_BERRY(ITEM_NANAB_BERRY), 5 + setberrytree 18, ITEM_TO_BERRY(ITEM_NANAB_BERRY), 5 + setberrytree 29, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), 5 + setberrytree 28, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), 5 + setberrytree 27, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), 5 + setberrytree 24, ITEM_TO_BERRY(ITEM_RAWST_BERRY), 5 + setberrytree 23, ITEM_TO_BERRY(ITEM_PECHA_BERRY), 5 + setberrytree 22, ITEM_TO_BERRY(ITEM_PECHA_BERRY), 5 + setberrytree 21, ITEM_TO_BERRY(ITEM_RAWST_BERRY), 5 + setberrytree 19, ITEM_TO_BERRY(ITEM_RAZZ_BERRY), 5 + setberrytree 20, ITEM_TO_BERRY(ITEM_RAZZ_BERRY), 5 + setberrytree 80, ITEM_TO_BERRY(ITEM_ORAN_BERRY), 5 + setberrytree 81, ITEM_TO_BERRY(ITEM_ORAN_BERRY), 5 + setberrytree 77, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), 5 + setberrytree 78, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), 5 + setberrytree 68, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), 5 + setberrytree 31, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), 5 + setberrytree 33, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), 5 + setberrytree 34, ITEM_TO_BERRY(ITEM_POMEG_BERRY), 5 + setberrytree 35, ITEM_TO_BERRY(ITEM_POMEG_BERRY), 5 + setberrytree 36, ITEM_TO_BERRY(ITEM_POMEG_BERRY), 5 + setberrytree 83, ITEM_TO_BERRY(ITEM_HONDEW_BERRY), 5 + setberrytree 84, ITEM_TO_BERRY(ITEM_HONDEW_BERRY), 5 + setberrytree 85, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), 5 + setberrytree 86, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), 5 + setberrytree 37, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), 5 + setberrytree 38, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), 5 + setberrytree 39, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), 5 + setberrytree 40, ITEM_TO_BERRY(ITEM_PECHA_BERRY), 5 + setberrytree 41, ITEM_TO_BERRY(ITEM_PECHA_BERRY), 5 + setberrytree 42, ITEM_TO_BERRY(ITEM_PECHA_BERRY), 5 + setberrytree 46, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), 5 + setberrytree 45, ITEM_TO_BERRY(ITEM_PINAP_BERRY), 5 + setberrytree 44, ITEM_TO_BERRY(ITEM_NANAB_BERRY), 5 + setberrytree 43, ITEM_TO_BERRY(ITEM_RAZZ_BERRY), 5 + setberrytree 47, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), 5 + setberrytree 48, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), 5 + setberrytree 49, ITEM_TO_BERRY(ITEM_RAWST_BERRY), 5 + setberrytree 50, ITEM_TO_BERRY(ITEM_CHESTO_BERRY), 5 + setberrytree 52, ITEM_TO_BERRY(ITEM_NANAB_BERRY), 5 + setberrytree 53, ITEM_TO_BERRY(ITEM_NANAB_BERRY), 5 + setberrytree 62, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), 5 + setberrytree 64, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), 5 + setberrytree 58, ITEM_TO_BERRY(ITEM_POMEG_BERRY), 5 + setberrytree 59, ITEM_TO_BERRY(ITEM_POMEG_BERRY), 5 + setberrytree 60, ITEM_TO_BERRY(ITEM_GREPA_BERRY), 5 + setberrytree 61, ITEM_TO_BERRY(ITEM_GREPA_BERRY), 5 + setberrytree 79, ITEM_TO_BERRY(ITEM_QUALOT_BERRY), 5 + setberrytree 14, ITEM_TO_BERRY(ITEM_QUALOT_BERRY), 5 + setberrytree 15, ITEM_TO_BERRY(ITEM_POMEG_BERRY), 5 + setberrytree 30, ITEM_TO_BERRY(ITEM_POMEG_BERRY), 5 + setberrytree 65, ITEM_TO_BERRY(ITEM_GREPA_BERRY), 5 + setberrytree 72, ITEM_TO_BERRY(ITEM_GREPA_BERRY), 5 + setberrytree 73, ITEM_TO_BERRY(ITEM_QUALOT_BERRY), 5 + setberrytree 74, ITEM_TO_BERRY(ITEM_QUALOT_BERRY), 5 + setberrytree 87, ITEM_TO_BERRY(ITEM_PECHA_BERRY), 5 + setberrytree 88, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), 5 + setberrytree 89, ITEM_TO_BERRY(ITEM_RAWST_BERRY), 5 + setberrytree 82, ITEM_TO_BERRY(ITEM_LIECHI_BERRY), 5 return EventScript_ResetAllMapFlags:: @ 82715DE @@ -2292,21 +2293,22 @@ EverGrandeCity_DrakesRoom_EventScript_2723F8:: @ 82723F8 EverGrandeCity_GlaciasRoom_EventScript_2723F8:: @ 82723F8 EverGrandeCity_PhoebesRoom_EventScript_2723F8:: @ 82723F8 EverGrandeCity_SidneysRoom_EventScript_2723F8:: @ 82723F8 +PokemonLeague_EliteFour_SetAdvanceToNextRoomMetatiles:: @ 82723F8 applymovement EVENT_OBJ_ID_PLAYER, EverGrandeCity_SidneysRoom_Movement_2725C6 waitmovement 0 playse SE_DOOR - setmetatile 6, 1, 836, 0 - setmetatile 6, 2, 837, 0 - setmetatile 0, 2, 734, 1 - setmetatile 1, 2, 733, 1 - setmetatile 2, 2, 734, 1 - setmetatile 3, 2, 733, 1 - setmetatile 4, 2, 734, 1 - setmetatile 8, 2, 733, 1 - setmetatile 9, 2, 734, 1 - setmetatile 10, 2, 733, 1 - setmetatile 11, 2, 734, 1 - setmetatile 12, 2, 733, 1 + setmetatile 6, 1, METATILE_EliteFour_OpenDoor_Frame, 0 + setmetatile 6, 2, METATILE_EliteFour_OpenDoor_Opening, 0 + setmetatile 0, 2, METATILE_EliteFour_RightSpotlightOff, 1 + setmetatile 1, 2, METATILE_EliteFour_LeftSpotlightOff, 1 + setmetatile 2, 2, METATILE_EliteFour_RightSpotlightOff, 1 + setmetatile 3, 2, METATILE_EliteFour_LeftSpotlightOff, 1 + setmetatile 4, 2, METATILE_EliteFour_RightSpotlightOff, 1 + setmetatile 8, 2, METATILE_EliteFour_LeftSpotlightOff, 1 + setmetatile 9, 2, METATILE_EliteFour_RightSpotlightOff, 1 + setmetatile 10, 2, METATILE_EliteFour_LeftSpotlightOff, 1 + setmetatile 11, 2, METATILE_EliteFour_RightSpotlightOff, 1 + setmetatile 12, 2, METATILE_EliteFour_LeftSpotlightOff, 1 special DrawWholeMapView return @@ -2317,12 +2319,12 @@ EverGrandeCity_SidneysRoom_EventScript_272475:: @ 8272475 applymovement EVENT_OBJ_ID_PLAYER, EverGrandeCity_SidneysRoom_Movement_2725BA waitmovement 0 playse SE_TRACK_DOOR - setmetatile 5, 12, 518, 1 - setmetatile 6, 12, 518, 1 - setmetatile 7, 12, 518, 1 - setmetatile 5, 13, 526, 1 - setmetatile 6, 13, 526, 1 - setmetatile 7, 13, 526, 1 + setmetatile 5, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 + setmetatile 6, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 + setmetatile 7, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 + setmetatile 5, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 + setmetatile 6, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 + setmetatile 7, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 special DrawWholeMapView return @@ -2330,36 +2332,36 @@ EverGrandeCity_DrakesRoom_EventScript_2724BC:: @ 82724BC EverGrandeCity_GlaciasRoom_EventScript_2724BC:: @ 82724BC EverGrandeCity_PhoebesRoom_EventScript_2724BC:: @ 82724BC EverGrandeCity_SidneysRoom_EventScript_2724BC:: @ 82724BC - setmetatile 6, 1, 836, 0 - setmetatile 6, 2, 837, 0 - setmetatile 5, 12, 518, 1 - setmetatile 6, 12, 518, 1 - setmetatile 7, 12, 518, 1 - setmetatile 5, 13, 526, 1 - setmetatile 6, 13, 526, 1 - setmetatile 7, 13, 526, 1 - setmetatile 0, 2, 734, 1 - setmetatile 1, 2, 733, 1 - setmetatile 2, 2, 734, 1 - setmetatile 3, 2, 733, 1 - setmetatile 4, 2, 734, 1 - setmetatile 8, 2, 733, 1 - setmetatile 9, 2, 734, 1 - setmetatile 10, 2, 733, 1 - setmetatile 11, 2, 734, 1 - setmetatile 12, 2, 733, 1 + setmetatile 6, 1, METATILE_EliteFour_OpenDoor_Frame, 0 + setmetatile 6, 2, METATILE_EliteFour_OpenDoor_Opening, 0 + setmetatile 5, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 + setmetatile 6, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 + setmetatile 7, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 + setmetatile 5, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 + setmetatile 6, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 + setmetatile 7, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 + setmetatile 0, 2, METATILE_EliteFour_RightSpotlightOff, 1 + setmetatile 1, 2, METATILE_EliteFour_LeftSpotlightOff, 1 + setmetatile 2, 2, METATILE_EliteFour_RightSpotlightOff, 1 + setmetatile 3, 2, METATILE_EliteFour_LeftSpotlightOff, 1 + setmetatile 4, 2, METATILE_EliteFour_RightSpotlightOff, 1 + setmetatile 8, 2, METATILE_EliteFour_LeftSpotlightOff, 1 + setmetatile 9, 2, METATILE_EliteFour_RightSpotlightOff, 1 + setmetatile 10, 2, METATILE_EliteFour_LeftSpotlightOff, 1 + setmetatile 11, 2, METATILE_EliteFour_RightSpotlightOff, 1 + setmetatile 12, 2, METATILE_EliteFour_LeftSpotlightOff, 1 return EverGrandeCity_DrakesRoom_EventScript_27255F:: @ 827255F EverGrandeCity_GlaciasRoom_EventScript_27255F:: @ 827255F EverGrandeCity_PhoebesRoom_EventScript_27255F:: @ 827255F EverGrandeCity_SidneysRoom_EventScript_27255F:: @ 827255F - setmetatile 5, 12, 518, 1 - setmetatile 6, 12, 518, 1 - setmetatile 7, 12, 518, 1 - setmetatile 5, 13, 526, 1 - setmetatile 6, 13, 526, 1 - setmetatile 7, 13, 526, 1 + setmetatile 5, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 + setmetatile 6, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 + setmetatile 7, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 + setmetatile 5, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 + setmetatile 6, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 + setmetatile 7, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 return SlateportCity_Movement_272596: @ 8272596 @@ -2995,163 +2997,163 @@ EventScript_2738FF:: @ 82738FF end UnusualWeather_EventScript_PlaceTilesRoute114North:: @ 8273913 - setmetatile 7, 3, 839, 1 - setmetatile 7, 4, 847, 0 + setmetatile 7, 3, METATILE_Fallarbor_RedCaveEntrance_Top, 1 + setmetatile 7, 4, METATILE_Fallarbor_RedCaveEntrance_Bottom, 0 return UnusualWeather_EventScript_PlaceTilesRoute114South:: @ 8273926 - setmetatile 6, 45, 601, 1 - setmetatile 6, 46, 609, 0 + setmetatile 6, 45, METATILE_Fallarbor_BrownCaveEntrance_Top, 1 + setmetatile 6, 46, METATILE_Fallarbor_BrownCaveEntrance_Bottom, 0 return UnusualWeather_EventScript_PlaceTilesRoute115West:: @ 8273939 - setmetatile 21, 5, 601, 1 - setmetatile 21, 6, 609, 0 + setmetatile 21, 5, METATILE_Fallarbor_BrownCaveEntrance_Top, 1 + setmetatile 21, 6, METATILE_Fallarbor_BrownCaveEntrance_Bottom, 0 return UnusualWeather_EventScript_PlaceTilesRoute115East:: @ 827394C - setmetatile 36, 9, 601, 1 - setmetatile 36, 10, 609, 0 + setmetatile 36, 9, METATILE_Fallarbor_BrownCaveEntrance_Top, 1 + setmetatile 36, 10, METATILE_Fallarbor_BrownCaveEntrance_Bottom, 0 return UnusualWeather_EventScript_PlaceTilesRoute116North:: @ 827395F - setmetatile 59, 12, 159, 1 - setmetatile 59, 13, 167, 0 + setmetatile 59, 12, METATILE_General_CaveEntrance_Top, 1 + setmetatile 59, 13, METATILE_General_CaveEntrance_Bottom, 0 return UnusualWeather_EventScript_PlaceTilesRoute116South:: @ 8273972 - setmetatile 79, 5, 159, 1 - setmetatile 79, 6, 167, 0 + setmetatile 79, 5, METATILE_General_CaveEntrance_Top, 1 + setmetatile 79, 6, METATILE_General_CaveEntrance_Bottom, 0 return UnusualWeather_EventScript_PlaceTilesRoute118East:: @ 8273985 - setmetatile 42, 5, 159, 1 - setmetatile 42, 6, 167, 0 + setmetatile 42, 5, METATILE_General_CaveEntrance_Top, 1 + setmetatile 42, 6, METATILE_General_CaveEntrance_Bottom, 0 return UnusualWeather_EventScript_PlaceTilesRoute118West:: @ 8273998 - setmetatile 9, 5, 159, 1 - setmetatile 9, 6, 167, 0 + setmetatile 9, 5, METATILE_General_CaveEntrance_Top, 1 + setmetatile 9, 6, METATILE_General_CaveEntrance_Bottom, 0 return UnusualWeather_EventScript_PlaceTilesRoute105North:: @ 82739AB - setmetatile 10, 28, 334, 0 - setmetatile 11, 28, 334, 0 - setmetatile 9, 29, 334, 0 - setmetatile 10, 29, 335, 0 - setmetatile 11, 29, 335, 0 - setmetatile 12, 29, 334, 0 - setmetatile 9, 30, 334, 0 - setmetatile 10, 30, 335, 0 - setmetatile 11, 30, 335, 0 - setmetatile 12, 30, 334, 0 - setmetatile 10, 31, 334, 0 - setmetatile 11, 31, 334, 0 + setmetatile 10, 28, METATILE_General_RoughWater, 0 + setmetatile 11, 28, METATILE_General_RoughWater, 0 + setmetatile 9, 29, METATILE_General_RoughWater, 0 + setmetatile 10, 29, METATILE_General_RoughDeepWater, 0 + setmetatile 11, 29, METATILE_General_RoughDeepWater, 0 + setmetatile 12, 29, METATILE_General_RoughWater, 0 + setmetatile 9, 30, METATILE_General_RoughWater, 0 + setmetatile 10, 30, METATILE_General_RoughDeepWater, 0 + setmetatile 11, 30, METATILE_General_RoughDeepWater, 0 + setmetatile 12, 30, METATILE_General_RoughWater, 0 + setmetatile 10, 31, METATILE_General_RoughWater, 0 + setmetatile 11, 31, METATILE_General_RoughWater, 0 return UnusualWeather_EventScript_PlaceTilesRoute105South:: @ 8273A18 - setmetatile 20, 53, 334, 0 - setmetatile 21, 53, 334, 0 - setmetatile 19, 54, 334, 0 - setmetatile 20, 54, 335, 0 - setmetatile 21, 54, 335, 0 - setmetatile 22, 54, 334, 0 - setmetatile 19, 55, 334, 0 - setmetatile 20, 55, 335, 0 - setmetatile 21, 55, 335, 0 - setmetatile 22, 55, 334, 0 - setmetatile 20, 56, 334, 0 - setmetatile 21, 56, 334, 0 + setmetatile 20, 53, METATILE_General_RoughWater, 0 + setmetatile 21, 53, METATILE_General_RoughWater, 0 + setmetatile 19, 54, METATILE_General_RoughWater, 0 + setmetatile 20, 54, METATILE_General_RoughDeepWater, 0 + setmetatile 21, 54, METATILE_General_RoughDeepWater, 0 + setmetatile 22, 54, METATILE_General_RoughWater, 0 + setmetatile 19, 55, METATILE_General_RoughWater, 0 + setmetatile 20, 55, METATILE_General_RoughDeepWater, 0 + setmetatile 21, 55, METATILE_General_RoughDeepWater, 0 + setmetatile 22, 55, METATILE_General_RoughWater, 0 + setmetatile 20, 56, METATILE_General_RoughWater, 0 + setmetatile 21, 56, METATILE_General_RoughWater, 0 return UnusualWeather_EventScript_PlaceTilesRoute125West:: @ 8273A85 - setmetatile 8, 16, 334, 0 - setmetatile 9, 16, 334, 0 - setmetatile 7, 17, 334, 0 - setmetatile 8, 17, 335, 0 - setmetatile 9, 17, 335, 0 - setmetatile 10, 17, 334, 0 - setmetatile 7, 18, 334, 0 - setmetatile 8, 18, 335, 0 - setmetatile 9, 18, 335, 0 - setmetatile 10, 18, 334, 0 - setmetatile 8, 19, 334, 0 - setmetatile 9, 19, 334, 0 + setmetatile 8, 16, METATILE_General_RoughWater, 0 + setmetatile 9, 16, METATILE_General_RoughWater, 0 + setmetatile 7, 17, METATILE_General_RoughWater, 0 + setmetatile 8, 17, METATILE_General_RoughDeepWater, 0 + setmetatile 9, 17, METATILE_General_RoughDeepWater, 0 + setmetatile 10, 17, METATILE_General_RoughWater, 0 + setmetatile 7, 18, METATILE_General_RoughWater, 0 + setmetatile 8, 18, METATILE_General_RoughDeepWater, 0 + setmetatile 9, 18, METATILE_General_RoughDeepWater, 0 + setmetatile 10, 18, METATILE_General_RoughWater, 0 + setmetatile 8, 19, METATILE_General_RoughWater, 0 + setmetatile 9, 19, METATILE_General_RoughWater, 0 return UnusualWeather_EventScript_PlaceTilesRoute125East:: @ 8273AF2 - setmetatile 53, 18, 334, 0 - setmetatile 54, 18, 334, 0 - setmetatile 52, 19, 334, 0 - setmetatile 53, 19, 335, 0 - setmetatile 54, 19, 335, 0 - setmetatile 55, 19, 334, 0 - setmetatile 52, 20, 334, 0 - setmetatile 53, 20, 335, 0 - setmetatile 54, 20, 335, 0 - setmetatile 55, 20, 334, 0 - setmetatile 53, 21, 334, 0 - setmetatile 54, 21, 334, 0 + setmetatile 53, 18, METATILE_General_RoughWater, 0 + setmetatile 54, 18, METATILE_General_RoughWater, 0 + setmetatile 52, 19, METATILE_General_RoughWater, 0 + setmetatile 53, 19, METATILE_General_RoughDeepWater, 0 + setmetatile 54, 19, METATILE_General_RoughDeepWater, 0 + setmetatile 55, 19, METATILE_General_RoughWater, 0 + setmetatile 52, 20, METATILE_General_RoughWater, 0 + setmetatile 53, 20, METATILE_General_RoughDeepWater, 0 + setmetatile 54, 20, METATILE_General_RoughDeepWater, 0 + setmetatile 55, 20, METATILE_General_RoughWater, 0 + setmetatile 53, 21, METATILE_General_RoughWater, 0 + setmetatile 54, 21, METATILE_General_RoughWater, 0 return UnusualWeather_EventScript_PlaceTilesRoute127North:: @ 8273B5F - setmetatile 57, 9, 334, 0 - setmetatile 58, 9, 334, 0 - setmetatile 56, 10, 334, 0 - setmetatile 57, 10, 335, 0 - setmetatile 58, 10, 335, 0 - setmetatile 59, 10, 334, 0 - setmetatile 56, 11, 334, 0 - setmetatile 57, 11, 335, 0 - setmetatile 58, 11, 335, 0 - setmetatile 59, 11, 334, 0 - setmetatile 57, 12, 334, 0 - setmetatile 58, 12, 334, 0 + setmetatile 57, 9, METATILE_General_RoughWater, 0 + setmetatile 58, 9, METATILE_General_RoughWater, 0 + setmetatile 56, 10, METATILE_General_RoughWater, 0 + setmetatile 57, 10, METATILE_General_RoughDeepWater, 0 + setmetatile 58, 10, METATILE_General_RoughDeepWater, 0 + setmetatile 59, 10, METATILE_General_RoughWater, 0 + setmetatile 56, 11, METATILE_General_RoughWater, 0 + setmetatile 57, 11, METATILE_General_RoughDeepWater, 0 + setmetatile 58, 11, METATILE_General_RoughDeepWater, 0 + setmetatile 59, 11, METATILE_General_RoughWater, 0 + setmetatile 57, 12, METATILE_General_RoughWater, 0 + setmetatile 58, 12, METATILE_General_RoughWater, 0 return UnusualWeather_EventScript_PlaceTilesRoute127South:: @ 8273BCC - setmetatile 61, 30, 334, 0 - setmetatile 62, 30, 334, 0 - setmetatile 60, 31, 334, 0 - setmetatile 61, 31, 335, 0 - setmetatile 62, 31, 335, 0 - setmetatile 63, 31, 334, 0 - setmetatile 60, 32, 334, 0 - setmetatile 61, 32, 335, 0 - setmetatile 62, 32, 335, 0 - setmetatile 63, 32, 334, 0 - setmetatile 61, 33, 334, 0 - setmetatile 62, 33, 334, 0 + setmetatile 61, 30, METATILE_General_RoughWater, 0 + setmetatile 62, 30, METATILE_General_RoughWater, 0 + setmetatile 60, 31, METATILE_General_RoughWater, 0 + setmetatile 61, 31, METATILE_General_RoughDeepWater, 0 + setmetatile 62, 31, METATILE_General_RoughDeepWater, 0 + setmetatile 63, 31, METATILE_General_RoughWater, 0 + setmetatile 60, 32, METATILE_General_RoughWater, 0 + setmetatile 61, 32, METATILE_General_RoughDeepWater, 0 + setmetatile 62, 32, METATILE_General_RoughDeepWater, 0 + setmetatile 63, 32, METATILE_General_RoughWater, 0 + setmetatile 61, 33, METATILE_General_RoughWater, 0 + setmetatile 62, 33, METATILE_General_RoughWater, 0 return UnusualWeather_EventScript_PlaceTilesRoute129West:: @ 8273C39 - setmetatile 16, 14, 334, 0 - setmetatile 17, 14, 334, 0 - setmetatile 15, 15, 334, 0 - setmetatile 16, 15, 335, 0 - setmetatile 17, 15, 335, 0 - setmetatile 18, 15, 334, 0 - setmetatile 15, 16, 334, 0 - setmetatile 16, 16, 335, 0 - setmetatile 17, 16, 335, 0 - setmetatile 18, 16, 334, 0 - setmetatile 16, 17, 334, 0 - setmetatile 17, 17, 334, 0 + setmetatile 16, 14, METATILE_General_RoughWater, 0 + setmetatile 17, 14, METATILE_General_RoughWater, 0 + setmetatile 15, 15, METATILE_General_RoughWater, 0 + setmetatile 16, 15, METATILE_General_RoughDeepWater, 0 + setmetatile 17, 15, METATILE_General_RoughDeepWater, 0 + setmetatile 18, 15, METATILE_General_RoughWater, 0 + setmetatile 15, 16, METATILE_General_RoughWater, 0 + setmetatile 16, 16, METATILE_General_RoughDeepWater, 0 + setmetatile 17, 16, METATILE_General_RoughDeepWater, 0 + setmetatile 18, 16, METATILE_General_RoughWater, 0 + setmetatile 16, 17, METATILE_General_RoughWater, 0 + setmetatile 17, 17, METATILE_General_RoughWater, 0 return UnusualWeather_EventScript_PlaceTilesRoute129East:: @ 8273CA6 - setmetatile 42, 19, 334, 0 - setmetatile 43, 19, 334, 0 - setmetatile 41, 20, 334, 0 - setmetatile 42, 20, 335, 0 - setmetatile 43, 20, 335, 0 - setmetatile 44, 20, 334, 0 - setmetatile 41, 21, 334, 0 - setmetatile 42, 21, 335, 0 - setmetatile 43, 21, 335, 0 - setmetatile 44, 21, 334, 0 - setmetatile 42, 22, 334, 0 - setmetatile 43, 22, 334, 0 + setmetatile 42, 19, METATILE_General_RoughWater, 0 + setmetatile 43, 19, METATILE_General_RoughWater, 0 + setmetatile 41, 20, METATILE_General_RoughWater, 0 + setmetatile 42, 20, METATILE_General_RoughDeepWater, 0 + setmetatile 43, 20, METATILE_General_RoughDeepWater, 0 + setmetatile 44, 20, METATILE_General_RoughWater, 0 + setmetatile 41, 21, METATILE_General_RoughWater, 0 + setmetatile 42, 21, METATILE_General_RoughDeepWater, 0 + setmetatile 43, 21, METATILE_General_RoughDeepWater, 0 + setmetatile 44, 21, METATILE_General_RoughWater, 0 + setmetatile 42, 22, METATILE_General_RoughWater, 0 + setmetatile 43, 22, METATILE_General_RoughWater, 0 return Route105_EventScript_273D13:: @ 8273D13 @@ -3225,163 +3227,163 @@ UnusualWeather_EventScript_CleanupMapTiles:: @ 8273D6D return UnusualWeather_EventScript_CleanupRoute114North:: @ 8273E23 - setmetatile 7, 3, 617, 1 - setmetatile 7, 4, 617, 1 + setmetatile 7, 3, METATILE_Fallarbor_RedRockWall, 1 + setmetatile 7, 4, METATILE_Fallarbor_RedRockWall, 1 return UnusualWeather_EventScript_CleanupRoute114South:: @ 8273E36 - setmetatile 6, 45, 613, 1 - setmetatile 6, 46, 613, 1 + setmetatile 6, 45, METATILE_Fallarbor_BrownRockWall, 1 + setmetatile 6, 46, METATILE_Fallarbor_BrownRockWall, 1 return UnusualWeather_EventScript_CleanupRoute115West:: @ 8273E49 - setmetatile 21, 5, 613, 1 - setmetatile 21, 6, 613, 1 + setmetatile 21, 5, METATILE_Fallarbor_BrownRockWall, 1 + setmetatile 21, 6, METATILE_Fallarbor_BrownRockWall, 1 return UnusualWeather_EventScript_CleanupRoute115East:: @ 8273E5C - setmetatile 36, 9, 613, 1 - setmetatile 36, 10, 613, 1 + setmetatile 36, 9, METATILE_Fallarbor_BrownRockWall, 1 + setmetatile 36, 10, METATILE_Fallarbor_BrownRockWall, 1 return UnusualWeather_EventScript_CleanupRoute116North:: @ 8273E6F - setmetatile 59, 12, 124, 1 - setmetatile 59, 13, 124, 1 + setmetatile 59, 12, METATILE_General_RockWall_RockBase, 1 + setmetatile 59, 13, METATILE_General_RockWall_RockBase, 1 return UnusualWeather_EventScript_CleanupRoute116South:: @ 8273E82 - setmetatile 79, 5, 124, 1 - setmetatile 79, 6, 124, 1 + setmetatile 79, 5, METATILE_General_RockWall_RockBase, 1 + setmetatile 79, 6, METATILE_General_RockWall_RockBase, 1 return UnusualWeather_EventScript_CleanupRoute118East:: @ 8273E95 - setmetatile 42, 5, 124, 1 - setmetatile 42, 6, 121, 1 + setmetatile 42, 5, METATILE_General_RockWall_RockBase, 1 + setmetatile 42, 6, METATILE_General_RockWall_GrassBase, 1 return UnusualWeather_EventScript_CleanupRoute118West:: @ 8273EA8 - setmetatile 9, 5, 124, 1 - setmetatile 9, 6, 121, 1 + setmetatile 9, 5, METATILE_General_RockWall_RockBase, 1 + setmetatile 9, 6, METATILE_General_RockWall_GrassBase, 1 return UnusualWeather_EventScript_CleanupRoute105North:: @ 8273EBB - setmetatile 10, 28, 368, 0 - setmetatile 11, 28, 368, 0 - setmetatile 9, 29, 368, 0 - setmetatile 10, 29, 368, 0 - setmetatile 11, 29, 368, 0 - setmetatile 12, 29, 368, 0 - setmetatile 9, 30, 368, 0 - setmetatile 10, 30, 368, 0 - setmetatile 11, 30, 368, 0 - setmetatile 12, 30, 368, 0 - setmetatile 10, 31, 368, 0 - setmetatile 11, 31, 368, 0 + setmetatile 10, 28, METATILE_General_CalmWater, 0 + setmetatile 11, 28, METATILE_General_CalmWater, 0 + setmetatile 9, 29, METATILE_General_CalmWater, 0 + setmetatile 10, 29, METATILE_General_CalmWater, 0 + setmetatile 11, 29, METATILE_General_CalmWater, 0 + setmetatile 12, 29, METATILE_General_CalmWater, 0 + setmetatile 9, 30, METATILE_General_CalmWater, 0 + setmetatile 10, 30, METATILE_General_CalmWater, 0 + setmetatile 11, 30, METATILE_General_CalmWater, 0 + setmetatile 12, 30, METATILE_General_CalmWater, 0 + setmetatile 10, 31, METATILE_General_CalmWater, 0 + setmetatile 11, 31, METATILE_General_CalmWater, 0 return UnusualWeather_EventScript_CleanupRoute105South:: @ 8273F28 - setmetatile 20, 53, 368, 0 - setmetatile 21, 53, 368, 0 - setmetatile 19, 54, 368, 0 - setmetatile 20, 54, 368, 0 - setmetatile 21, 54, 368, 0 - setmetatile 22, 54, 368, 0 - setmetatile 19, 55, 368, 0 - setmetatile 20, 55, 368, 0 - setmetatile 21, 55, 368, 0 - setmetatile 22, 55, 368, 0 - setmetatile 20, 56, 368, 0 - setmetatile 21, 56, 368, 0 + setmetatile 20, 53, METATILE_General_CalmWater, 0 + setmetatile 21, 53, METATILE_General_CalmWater, 0 + setmetatile 19, 54, METATILE_General_CalmWater, 0 + setmetatile 20, 54, METATILE_General_CalmWater, 0 + setmetatile 21, 54, METATILE_General_CalmWater, 0 + setmetatile 22, 54, METATILE_General_CalmWater, 0 + setmetatile 19, 55, METATILE_General_CalmWater, 0 + setmetatile 20, 55, METATILE_General_CalmWater, 0 + setmetatile 21, 55, METATILE_General_CalmWater, 0 + setmetatile 22, 55, METATILE_General_CalmWater, 0 + setmetatile 20, 56, METATILE_General_CalmWater, 0 + setmetatile 21, 56, METATILE_General_CalmWater, 0 return UnusualWeather_EventScript_CleanupRoute125West:: @ 8273F95 - setmetatile 8, 16, 368, 0 - setmetatile 9, 16, 368, 0 - setmetatile 7, 17, 368, 0 - setmetatile 8, 17, 368, 0 - setmetatile 9, 17, 368, 0 - setmetatile 10, 17, 368, 0 - setmetatile 7, 18, 368, 0 - setmetatile 8, 18, 368, 0 - setmetatile 9, 18, 368, 0 - setmetatile 10, 18, 368, 0 - setmetatile 8, 19, 368, 0 - setmetatile 9, 19, 368, 0 + setmetatile 8, 16, METATILE_General_CalmWater, 0 + setmetatile 9, 16, METATILE_General_CalmWater, 0 + setmetatile 7, 17, METATILE_General_CalmWater, 0 + setmetatile 8, 17, METATILE_General_CalmWater, 0 + setmetatile 9, 17, METATILE_General_CalmWater, 0 + setmetatile 10, 17, METATILE_General_CalmWater, 0 + setmetatile 7, 18, METATILE_General_CalmWater, 0 + setmetatile 8, 18, METATILE_General_CalmWater, 0 + setmetatile 9, 18, METATILE_General_CalmWater, 0 + setmetatile 10, 18, METATILE_General_CalmWater, 0 + setmetatile 8, 19, METATILE_General_CalmWater, 0 + setmetatile 9, 19, METATILE_General_CalmWater, 0 return UnusualWeather_EventScript_CleanupRoute125East:: @ 8274002 - setmetatile 53, 18, 368, 0 - setmetatile 54, 18, 368, 0 - setmetatile 52, 19, 368, 0 - setmetatile 53, 19, 368, 0 - setmetatile 54, 19, 368, 0 - setmetatile 55, 19, 368, 0 - setmetatile 52, 20, 368, 0 - setmetatile 53, 20, 368, 0 - setmetatile 54, 20, 368, 0 - setmetatile 55, 20, 368, 0 - setmetatile 53, 21, 368, 0 - setmetatile 54, 21, 368, 0 + setmetatile 53, 18, METATILE_General_CalmWater, 0 + setmetatile 54, 18, METATILE_General_CalmWater, 0 + setmetatile 52, 19, METATILE_General_CalmWater, 0 + setmetatile 53, 19, METATILE_General_CalmWater, 0 + setmetatile 54, 19, METATILE_General_CalmWater, 0 + setmetatile 55, 19, METATILE_General_CalmWater, 0 + setmetatile 52, 20, METATILE_General_CalmWater, 0 + setmetatile 53, 20, METATILE_General_CalmWater, 0 + setmetatile 54, 20, METATILE_General_CalmWater, 0 + setmetatile 55, 20, METATILE_General_CalmWater, 0 + setmetatile 53, 21, METATILE_General_CalmWater, 0 + setmetatile 54, 21, METATILE_General_CalmWater, 0 return UnusualWeather_EventScript_CleanupRoute127North:: @ 827406F - setmetatile 57, 9, 368, 0 - setmetatile 58, 9, 368, 0 - setmetatile 56, 10, 368, 0 - setmetatile 57, 10, 368, 0 - setmetatile 58, 10, 368, 0 - setmetatile 59, 10, 368, 0 - setmetatile 56, 11, 368, 0 - setmetatile 57, 11, 368, 0 - setmetatile 58, 11, 368, 0 - setmetatile 59, 11, 368, 0 - setmetatile 57, 12, 368, 0 - setmetatile 58, 12, 368, 0 + setmetatile 57, 9, METATILE_General_CalmWater, 0 + setmetatile 58, 9, METATILE_General_CalmWater, 0 + setmetatile 56, 10, METATILE_General_CalmWater, 0 + setmetatile 57, 10, METATILE_General_CalmWater, 0 + setmetatile 58, 10, METATILE_General_CalmWater, 0 + setmetatile 59, 10, METATILE_General_CalmWater, 0 + setmetatile 56, 11, METATILE_General_CalmWater, 0 + setmetatile 57, 11, METATILE_General_CalmWater, 0 + setmetatile 58, 11, METATILE_General_CalmWater, 0 + setmetatile 59, 11, METATILE_General_CalmWater, 0 + setmetatile 57, 12, METATILE_General_CalmWater, 0 + setmetatile 58, 12, METATILE_General_CalmWater, 0 return UnusualWeather_EventScript_CleanupRoute127South:: @ 82740DC - setmetatile 61, 30, 368, 0 - setmetatile 62, 30, 368, 0 - setmetatile 60, 31, 368, 0 - setmetatile 61, 31, 368, 0 - setmetatile 62, 31, 368, 0 - setmetatile 63, 31, 368, 0 - setmetatile 60, 32, 368, 0 - setmetatile 61, 32, 368, 0 - setmetatile 62, 32, 368, 0 - setmetatile 63, 32, 368, 0 - setmetatile 61, 33, 368, 0 - setmetatile 62, 33, 368, 0 + setmetatile 61, 30, METATILE_General_CalmWater, 0 + setmetatile 62, 30, METATILE_General_CalmWater, 0 + setmetatile 60, 31, METATILE_General_CalmWater, 0 + setmetatile 61, 31, METATILE_General_CalmWater, 0 + setmetatile 62, 31, METATILE_General_CalmWater, 0 + setmetatile 63, 31, METATILE_General_CalmWater, 0 + setmetatile 60, 32, METATILE_General_CalmWater, 0 + setmetatile 61, 32, METATILE_General_CalmWater, 0 + setmetatile 62, 32, METATILE_General_CalmWater, 0 + setmetatile 63, 32, METATILE_General_CalmWater, 0 + setmetatile 61, 33, METATILE_General_CalmWater, 0 + setmetatile 62, 33, METATILE_General_CalmWater, 0 return UnusualWeather_EventScript_CleanupRoute129West:: @ 8274149 - setmetatile 16, 14, 368, 0 - setmetatile 17, 14, 368, 0 - setmetatile 15, 15, 368, 0 - setmetatile 16, 15, 368, 0 - setmetatile 17, 15, 368, 0 - setmetatile 18, 15, 368, 0 - setmetatile 15, 16, 368, 0 - setmetatile 16, 16, 368, 0 - setmetatile 17, 16, 368, 0 - setmetatile 18, 16, 368, 0 - setmetatile 16, 17, 368, 0 - setmetatile 17, 17, 368, 0 + setmetatile 16, 14, METATILE_General_CalmWater, 0 + setmetatile 17, 14, METATILE_General_CalmWater, 0 + setmetatile 15, 15, METATILE_General_CalmWater, 0 + setmetatile 16, 15, METATILE_General_CalmWater, 0 + setmetatile 17, 15, METATILE_General_CalmWater, 0 + setmetatile 18, 15, METATILE_General_CalmWater, 0 + setmetatile 15, 16, METATILE_General_CalmWater, 0 + setmetatile 16, 16, METATILE_General_CalmWater, 0 + setmetatile 17, 16, METATILE_General_CalmWater, 0 + setmetatile 18, 16, METATILE_General_CalmWater, 0 + setmetatile 16, 17, METATILE_General_CalmWater, 0 + setmetatile 17, 17, METATILE_General_CalmWater, 0 return UnusualWeather_EventScript_CleanupRoute129East:: @ 82741B6 - setmetatile 42, 19, 368, 0 - setmetatile 43, 19, 368, 0 - setmetatile 41, 20, 368, 0 - setmetatile 42, 20, 368, 0 - setmetatile 43, 20, 368, 0 - setmetatile 44, 20, 368, 0 - setmetatile 41, 21, 368, 0 - setmetatile 42, 21, 368, 0 - setmetatile 43, 21, 368, 0 - setmetatile 44, 21, 368, 0 - setmetatile 42, 22, 368, 0 - setmetatile 43, 22, 368, 0 + setmetatile 42, 19, METATILE_General_CalmWater, 0 + setmetatile 43, 19, METATILE_General_CalmWater, 0 + setmetatile 41, 20, METATILE_General_CalmWater, 0 + setmetatile 42, 20, METATILE_General_CalmWater, 0 + setmetatile 43, 20, METATILE_General_CalmWater, 0 + setmetatile 44, 20, METATILE_General_CalmWater, 0 + setmetatile 41, 21, METATILE_General_CalmWater, 0 + setmetatile 42, 21, METATILE_General_CalmWater, 0 + setmetatile 43, 21, METATILE_General_CalmWater, 0 + setmetatile 44, 21, METATILE_General_CalmWater, 0 + setmetatile 42, 22, METATILE_General_CalmWater, 0 + setmetatile 43, 22, METATILE_General_CalmWater, 0 return UnusualWeather_Underwater_SetupEscapeWarp:: @ 8274223 diff --git a/data/maps/AbandonedShip_Corridors_B1F/scripts.inc b/data/maps/AbandonedShip_Corridors_B1F/scripts.inc index e69666120..1012ebce7 100644 --- a/data/maps/AbandonedShip_Corridors_B1F/scripts.inc +++ b/data/maps/AbandonedShip_Corridors_B1F/scripts.inc @@ -13,11 +13,11 @@ AbandonedShip_Corridors_B1F_MapScript1_237D98: @ 8237D98 end AbandonedShip_Corridors_B1F_EventScript_237DAB:: @ 8237DAB - setmetatile 11, 4, 563, 1 + setmetatile 11, 4, METATILE_InsideShip_InTactDoor0_Bottom, 1 return AbandonedShip_Corridors_B1F_EventScript_237DB5:: @ 8237DB5 - setmetatile 11, 4, 555, 1 + setmetatile 11, 4, METATILE_InsideShip_InTactDoor1_Bottom, 1 return AbandonedShip_Corridors_B1F_EventScript_237DBF:: @ 8237DBF diff --git a/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc b/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc index 1c495c377..9c6474b6f 100644 --- a/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc +++ b/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc @@ -19,35 +19,35 @@ AbandonedShip_HiddenFloorCorridors_MapScript1_238980: @ 8238980 end AbandonedShip_HiddenFloorCorridors_EventScript_2389C9:: @ 82389C9 - setmetatile 3, 8, 555, 1 + setmetatile 3, 8, METATILE_InsideShip_InTactDoor1_Bottom, 1 return AbandonedShip_HiddenFloorCorridors_EventScript_2389D3:: @ 82389D3 - setmetatile 6, 8, 555, 1 + setmetatile 6, 8, METATILE_InsideShip_InTactDoor1_Bottom, 1 return AbandonedShip_HiddenFloorCorridors_EventScript_2389DD:: @ 82389DD - setmetatile 3, 3, 538, 0 + setmetatile 3, 3, METATILE_InsideShip_DoorIndent1, 0 return AbandonedShip_HiddenFloorCorridors_EventScript_2389E7:: @ 82389E7 - setmetatile 9, 3, 538, 0 + setmetatile 9, 3, METATILE_InsideShip_DoorIndent1, 0 return AbandonedShip_HiddenFloorCorridors_EventScript_2389F1:: @ 82389F1 - setmetatile 3, 8, 563, 1 + setmetatile 3, 8, METATILE_InsideShip_InTactDoor0_Bottom, 1 return AbandonedShip_HiddenFloorCorridors_EventScript_2389FB:: @ 82389FB - setmetatile 6, 8, 563, 1 + setmetatile 6, 8, METATILE_InsideShip_InTactDoor0_Bottom, 1 return AbandonedShip_HiddenFloorCorridors_EventScript_238A05:: @ 8238A05 - setmetatile 3, 3, 564, 0 + setmetatile 3, 3, METATILE_InsideShip_DoorIndent0, 0 return AbandonedShip_HiddenFloorCorridors_EventScript_238A0F:: @ 8238A0F - setmetatile 9, 3, 564, 0 + setmetatile 9, 3, METATILE_InsideShip_DoorIndent0, 0 return AbandonedShip_HiddenFloorCorridors_EventScript_238A19:: @ 8238A19 diff --git a/data/maps/AncientTomb/scripts.inc b/data/maps/AncientTomb/scripts.inc index ad8e683bb..9bc404af6 100644 --- a/data/maps/AncientTomb/scripts.inc +++ b/data/maps/AncientTomb/scripts.inc @@ -29,12 +29,12 @@ AncientTomb_MapScript1_238FF2: @ 8238FF2 end AncientTomb_EventScript_238FFC:: @ 8238FFC - setmetatile 7, 19, 553, 1 - setmetatile 8, 19, 553, 1 - setmetatile 9, 19, 553, 1 - setmetatile 7, 20, 565, 1 - setmetatile 8, 20, 565, 1 - setmetatile 9, 20, 565, 1 + setmetatile 7, 19, METATILE_Cave_EntranceCover, 1 + setmetatile 8, 19, METATILE_Cave_EntranceCover, 1 + setmetatile 9, 19, METATILE_Cave_EntranceCover, 1 + setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 return AncientTomb_EventScript_239033:: @ 8239033 diff --git a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc index e50ad9f0a..96e9f86f5 100644 --- a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc @@ -595,76 +595,76 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24C52F:: @ 824C52F return BattleFrontier_BattleDomeBattleRoom_EventScript_24C530:: @ 824C530 - createvobject 46, 1, 3, 0, 3, 1 - createvobject 22, 4, 6, 0, 3, 1 - createvobject 5, 6, 8, 0, 3, 1 - createvobject 12, 9, 11, 0, 3, 1 - createvobject 46, 11, 13, 0, 3, 1 - createvobject 66, 13, 15, 0, 3, 1 - createvobject 45, 19, 7, 1, 3, 1 - createvobject 34, 22, 11, 1, 3, 1 - createvobject 11, 25, 15, 1, 3, 1 - createvobject 35, 26, 2, 2, 3, 1 - createvobject 38, 29, 5, 1, 3, 1 + createvobject EVENT_OBJ_GFX_SCIENTIST_1, 1, 3, 0, 3, 1 + createvobject EVENT_OBJ_GFX_EXPERT_F, 4, 6, 0, 3, 1 + createvobject EVENT_OBJ_GFX_NINJA_BOY, 6, 8, 0, 3, 1 + createvobject EVENT_OBJ_GFX_LITTLE_GIRL, 9, 11, 0, 3, 1 + createvobject EVENT_OBJ_GFX_SCIENTIST_1, 11, 13, 0, 3, 1 + createvobject EVENT_OBJ_GFX_MAN_5, 13, 15, 0, 3, 1 + createvobject EVENT_OBJ_GFX_BEAUTY, 19, 7, 1, 3, 1 + createvobject EVENT_OBJ_GFX_WOMAN_5, 22, 11, 1, 3, 1 + createvobject EVENT_OBJ_GFX_LITTLE_BOY, 25, 15, 1, 3, 1 + createvobject EVENT_OBJ_GFX_YOUNGSTER, 26, 2, 2, 3, 1 + createvobject EVENT_OBJ_GFX_SCHOOL_KID_M, 29, 5, 1, 3, 1 return BattleFrontier_BattleDomeBattleRoom_EventScript_24C594:: @ 824C594 - createvobject 46, 1, 3, 0, 3, 1 - createvobject 22, 4, 6, 0, 3, 1 - createvobject 5, 6, 8, 0, 3, 1 - createvobject 20, 7, 9, 0, 3, 1 - createvobject 12, 9, 11, 0, 3, 1 - createvobject 47, 10, 12, 0, 3, 1 - createvobject 46, 11, 13, 0, 3, 1 - createvobject 66, 13, 15, 0, 3, 1 - createvobject 48, 15, 2, 1, 3, 1 - createvobject 5, 16, 3, 1, 3, 1 - createvobject 20, 17, 4, 1, 3, 1 - createvobject 45, 19, 7, 1, 3, 1 - createvobject 22, 20, 9, 1, 3, 1 - createvobject 34, 22, 11, 1, 3, 1 - createvobject 46, 23, 13, 1, 3, 1 - createvobject 11, 25, 15, 1, 3, 1 - createvobject 35, 26, 2, 2, 3, 1 - createvobject 40, 28, 5, 2, 3, 1 - createvobject 38, 29, 5, 1, 3, 1 - createvobject 83, 30, 6, 2, 3, 1 - createvobject 34, 31, 8, 2, 3, 1 + createvobject EVENT_OBJ_GFX_SCIENTIST_1, 1, 3, 0, 3, 1 + createvobject EVENT_OBJ_GFX_EXPERT_F, 4, 6, 0, 3, 1 + createvobject EVENT_OBJ_GFX_NINJA_BOY, 6, 8, 0, 3, 1 + createvobject EVENT_OBJ_GFX_WOMAN_2, 7, 9, 0, 3, 1 + createvobject EVENT_OBJ_GFX_LITTLE_GIRL, 9, 11, 0, 3, 1 + createvobject EVENT_OBJ_GFX_LASS, 10, 12, 0, 3, 1 + createvobject EVENT_OBJ_GFX_SCIENTIST_1, 11, 13, 0, 3, 1 + createvobject EVENT_OBJ_GFX_MAN_5, 13, 15, 0, 3, 1 + createvobject EVENT_OBJ_GFX_GENTLEMAN, 15, 2, 1, 3, 1 + createvobject EVENT_OBJ_GFX_NINJA_BOY, 16, 3, 1, 3, 1 + createvobject EVENT_OBJ_GFX_WOMAN_2, 17, 4, 1, 3, 1 + createvobject EVENT_OBJ_GFX_BEAUTY, 19, 7, 1, 3, 1 + createvobject EVENT_OBJ_GFX_EXPERT_F, 20, 9, 1, 3, 1 + createvobject EVENT_OBJ_GFX_WOMAN_5, 22, 11, 1, 3, 1 + createvobject EVENT_OBJ_GFX_SCIENTIST_1, 23, 13, 1, 3, 1 + createvobject EVENT_OBJ_GFX_LITTLE_BOY, 25, 15, 1, 3, 1 + createvobject EVENT_OBJ_GFX_YOUNGSTER, 26, 2, 2, 3, 1 + createvobject EVENT_OBJ_GFX_HEX_MANIAC, 28, 5, 2, 3, 1 + createvobject EVENT_OBJ_GFX_SCHOOL_KID_M, 29, 5, 1, 3, 1 + createvobject EVENT_OBJ_GFX_MART_EMPLOYEE, 30, 6, 2, 3, 1 + createvobject EVENT_OBJ_GFX_WOMAN_5, 31, 8, 2, 3, 1 return BattleFrontier_BattleDomeBattleRoom_EventScript_24C652:: @ 824C652 - createvobject 5, 0, 2, 0, 3, 1 - createvobject 46, 1, 3, 0, 3, 1 - createvobject 45, 2, 15, 0, 3, 1 - createvobject 66, 3, 5, 0, 3, 1 - createvobject 22, 4, 6, 0, 3, 1 - createvobject 46, 5, 7, 0, 3, 1 - createvobject 5, 6, 8, 0, 3, 1 - createvobject 20, 7, 9, 0, 3, 1 - createvobject 24, 8, 10, 0, 3, 1 - createvobject 12, 9, 11, 0, 3, 1 - createvobject 47, 10, 12, 0, 3, 1 - createvobject 46, 11, 13, 0, 3, 1 - createvobject 45, 12, 14, 0, 3, 1 - createvobject 66, 13, 15, 2, 3, 1 - createvobject 55, 14, 12, 2, 3, 1 - createvobject 48, 15, 2, 1, 3, 1 - createvobject 5, 16, 3, 1, 3, 1 - createvobject 20, 17, 4, 1, 3, 1 - createvobject 24, 18, 6, 1, 3, 1 - createvobject 45, 19, 7, 1, 3, 1 - createvobject 22, 20, 9, 1, 3, 1 - createvobject 23, 21, 10, 1, 3, 1 - createvobject 34, 22, 11, 1, 3, 1 - createvobject 46, 23, 13, 1, 3, 1 - createvobject 48, 24, 14, 1, 3, 1 - createvobject 11, 25, 15, 1, 3, 1 - createvobject 35, 26, 2, 2, 3, 1 - createvobject 17, 27, 3, 2, 3, 1 - createvobject 40, 28, 5, 2, 3, 1 - createvobject 38, 29, 5, 1, 3, 1 - createvobject 83, 30, 6, 2, 3, 1 - createvobject 34, 31, 8, 2, 3, 1 + createvobject EVENT_OBJ_GFX_NINJA_BOY, 0, 2, 0, 3, 1 + createvobject EVENT_OBJ_GFX_SCIENTIST_1, 1, 3, 0, 3, 1 + createvobject EVENT_OBJ_GFX_BEAUTY, 2, 15, 0, 3, 1 + createvobject EVENT_OBJ_GFX_MAN_5, 3, 5, 0, 3, 1 + createvobject EVENT_OBJ_GFX_EXPERT_F, 4, 6, 0, 3, 1 + createvobject EVENT_OBJ_GFX_SCIENTIST_1, 5, 7, 0, 3, 1 + createvobject EVENT_OBJ_GFX_NINJA_BOY, 6, 8, 0, 3, 1 + createvobject EVENT_OBJ_GFX_WOMAN_2, 7, 9, 0, 3, 1 + createvobject EVENT_OBJ_GFX_WOMAN_3, 8, 10, 0, 3, 1 + createvobject EVENT_OBJ_GFX_LITTLE_GIRL, 9, 11, 0, 3, 1 + createvobject EVENT_OBJ_GFX_LASS, 10, 12, 0, 3, 1 + createvobject EVENT_OBJ_GFX_SCIENTIST_1, 11, 13, 0, 3, 1 + createvobject EVENT_OBJ_GFX_BEAUTY, 12, 14, 0, 3, 1 + createvobject EVENT_OBJ_GFX_MAN_5, 13, 15, 2, 3, 1 + createvobject EVENT_OBJ_GFX_HIKER, 14, 12, 2, 3, 1 + createvobject EVENT_OBJ_GFX_GENTLEMAN, 15, 2, 1, 3, 1 + createvobject EVENT_OBJ_GFX_NINJA_BOY, 16, 3, 1, 3, 1 + createvobject EVENT_OBJ_GFX_WOMAN_2, 17, 4, 1, 3, 1 + createvobject EVENT_OBJ_GFX_WOMAN_3, 18, 6, 1, 3, 1 + createvobject EVENT_OBJ_GFX_BEAUTY, 19, 7, 1, 3, 1 + createvobject EVENT_OBJ_GFX_EXPERT_F, 20, 9, 1, 3, 1 + createvobject EVENT_OBJ_GFX_MAN_2, 21, 10, 1, 3, 1 + createvobject EVENT_OBJ_GFX_WOMAN_5, 22, 11, 1, 3, 1 + createvobject EVENT_OBJ_GFX_SCIENTIST_1, 23, 13, 1, 3, 1 + createvobject EVENT_OBJ_GFX_GENTLEMAN, 24, 14, 1, 3, 1 + createvobject EVENT_OBJ_GFX_LITTLE_BOY, 25, 15, 1, 3, 1 + createvobject EVENT_OBJ_GFX_YOUNGSTER, 26, 2, 2, 3, 1 + createvobject EVENT_OBJ_GFX_FAT_MAN, 27, 3, 2, 3, 1 + createvobject EVENT_OBJ_GFX_HEX_MANIAC, 28, 5, 2, 3, 1 + createvobject EVENT_OBJ_GFX_SCHOOL_KID_M, 29, 5, 1, 3, 1 + createvobject EVENT_OBJ_GFX_MART_EMPLOYEE, 30, 6, 2, 3, 1 + createvobject EVENT_OBJ_GFX_WOMAN_5, 31, 8, 2, 3, 1 return BattleFrontier_BattleArenaBattleRoom_Movement_24C773: @ 824C773 diff --git a/data/maps/BattleFrontier_BattlePikeRandomRoom1/scripts.inc b/data/maps/BattleFrontier_BattlePikeRandomRoom1/scripts.inc index 87f83371c..ea959387b 100644 --- a/data/maps/BattleFrontier_BattlePikeRandomRoom1/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRandomRoom1/scripts.inc @@ -645,46 +645,46 @@ BattleFrontier_BattlePikeRandomRoom1_EventScript_25D88D:: @ 825D88D end BattleFrontier_BattlePikeRandomRoom1_EventScript_25D8A4:: @ 825D8A4 - setmetatile 4, 1, 554, 1 - setmetatile 3, 2, 561, 1 - setmetatile 4, 2, 562, 1 - setmetatile 5, 2, 563, 1 - setmetatile 3, 3, 569, 1 - setmetatile 4, 3, 570, 0 - setmetatile 5, 3, 571, 1 + setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage1_Tile0, 1 + setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage1_Tile1, 1 + setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage1_Tile2, 1 + setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage1_Tile3, 1 + setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage1_Tile4, 1 + setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage1_Tile5, 0 + setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage1_Tile6, 1 special DrawWholeMapView return BattleFrontier_BattlePikeRandomRoom1_EventScript_25D8E7:: @ 825D8E7 - setmetatile 4, 1, 522, 1 - setmetatile 3, 2, 529, 1 - setmetatile 4, 2, 530, 1 - setmetatile 5, 2, 531, 1 - setmetatile 3, 3, 537, 1 - setmetatile 4, 3, 538, 0 - setmetatile 5, 3, 539, 1 + setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage2_Tile0, 1 + setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage2_Tile1, 1 + setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage2_Tile2, 1 + setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage2_Tile3, 1 + setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage2_Tile4, 1 + setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage2_Tile5, 0 + setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage2_Tile6, 1 special DrawWholeMapView return BattleFrontier_BattlePikeRandomRoom1_EventScript_25D92A:: @ 825D92A - setmetatile 4, 1, 683, 1 - setmetatile 3, 2, 690, 1 - setmetatile 4, 2, 691, 1 - setmetatile 5, 2, 692, 1 - setmetatile 3, 3, 698, 1 - setmetatile 4, 3, 699, 0 - setmetatile 5, 3, 700, 1 + setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage3_Tile0, 1 + setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage3_Tile1, 1 + setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage3_Tile2, 1 + setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage3_Tile3, 1 + setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage3_Tile4, 1 + setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage3_Tile5, 0 + setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage3_Tile6, 1 special DrawWholeMapView return BattleFrontier_BattlePikeRandomRoom1_EventScript_25D96D:: @ 825D96D - setmetatile 4, 1, 586, 1 - setmetatile 3, 2, 593, 1 - setmetatile 4, 2, 594, 1 - setmetatile 5, 2, 595, 1 - setmetatile 3, 3, 601, 1 - setmetatile 4, 3, 602, 0 - setmetatile 5, 3, 603, 1 + setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage0_Tile0, 1 + setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage0_Tile1, 1 + setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage0_Tile2, 1 + setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage0_Tile3, 1 + setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage0_Tile4, 1 + setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage0_Tile5, 0 + setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage0_Tile6, 1 special DrawWholeMapView return diff --git a/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc b/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc index cf0a50e98..a72961562 100644 --- a/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc @@ -6,13 +6,13 @@ BattleFrontier_BattleTowerCorridor_MapScripts:: @ 8241AAA BattleFrontier_BattleTowerCorridor_MapScript1_241AB5: @ 8241AB5 compare VAR_0x8006, 1 goto_if_eq BattleFrontier_BattleTowerCorridor_EventScript_241AD3 - setmetatile 12, 0, 519, 0 - setmetatile 12, 1, 527, 0 + setmetatile 12, 0, METATILE_BattleFrontier_CorridorOpenDoor_Top, 0 + setmetatile 12, 1, METATILE_BattleFrontier_CorridorOpenDoor_Bottom, 0 end BattleFrontier_BattleTowerCorridor_EventScript_241AD3:: @ 8241AD3 - setmetatile 15, 0, 519, 0 - setmetatile 15, 1, 527, 0 + setmetatile 15, 0, METATILE_BattleFrontier_CorridorOpenDoor_Top, 0 + setmetatile 15, 1, METATILE_BattleFrontier_CorridorOpenDoor_Bottom, 0 end BattleFrontier_BattleTowerCorridor_MapScript2_241AE6: @ 8241AE6 diff --git a/data/maps/DesertRuins/scripts.inc b/data/maps/DesertRuins/scripts.inc index e796b1668..5cadf3ec0 100644 --- a/data/maps/DesertRuins/scripts.inc +++ b/data/maps/DesertRuins/scripts.inc @@ -20,12 +20,12 @@ DesertRuins_MapScript1_22D989: @ 822D989 end DesertRuins_EventScript_22D993:: @ 822D993 - setmetatile 7, 19, 553, 1 - setmetatile 8, 19, 553, 1 - setmetatile 9, 19, 553, 1 - setmetatile 7, 20, 565, 1 - setmetatile 8, 20, 565, 1 - setmetatile 9, 20, 565, 1 + setmetatile 7, 19, METATILE_Cave_EntranceCover, 1 + setmetatile 8, 19, METATILE_Cave_EntranceCover, 1 + setmetatile 9, 19, METATILE_Cave_EntranceCover, 1 + setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 return DesertRuins_OnTransition: @ 822D9CA diff --git a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc index 72c5cc916..88d02b29b 100644 --- a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc +++ b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc @@ -46,8 +46,8 @@ EverGrandeCity_ChampionsRoom_EventScript_228A45:: @ 8228A45 EverGrandeCity_ChampionsRoom_EventScript_228A61:: @ 8228A61 playse SE_DOOR - setmetatile 6, 1, 838, 0 - setmetatile 6, 2, 839, 0 + setmetatile 6, 1, METATILE_EliteFour_OpenDoorChampion_Frame, 0 + setmetatile 6, 2, METATILE_EliteFour_OpenDoorChampion_Opening, 0 special DrawWholeMapView msgbox EverGrandeCity_ChampionsRoom_Text_228F66, MSGBOX_DEFAULT closemessage diff --git a/data/maps/InsideOfTruck/scripts.inc b/data/maps/InsideOfTruck/scripts.inc index 0f7f5447d..043c8a8d8 100644 --- a/data/maps/InsideOfTruck/scripts.inc +++ b/data/maps/InsideOfTruck/scripts.inc @@ -4,9 +4,9 @@ InsideOfTruck_MapScripts:: @ 823BEDA .byte 0 InsideOfTruck_MapScript1_23BEE5: @ 823BEE5 - setmetatile 4, 1, 520, 0 - setmetatile 4, 2, 528, 0 - setmetatile 4, 3, 536, 0 + setmetatile 4, 1, METATILE_InsideOfTruck_ExitLight_Top, 0 + setmetatile 4, 2, METATILE_InsideOfTruck_ExitLight_Mid, 0 + setmetatile 4, 3, METATILE_InsideOfTruck_ExitLight_Bottom, 0 end InsideOfTruck_MapScript1_23BF01: @ 823BF01 diff --git a/data/maps/IslandCave/scripts.inc b/data/maps/IslandCave/scripts.inc index 4f5339b1a..911e882f2 100644 --- a/data/maps/IslandCave/scripts.inc +++ b/data/maps/IslandCave/scripts.inc @@ -20,12 +20,12 @@ IslandCave_MapScript1_238E58: @ 8238E58 end IslandCave_EventScript_238E62:: @ 8238E62 - setmetatile 7, 19, 553, 1 - setmetatile 8, 19, 553, 1 - setmetatile 9, 19, 553, 1 - setmetatile 7, 20, 565, 1 - setmetatile 8, 20, 565, 1 - setmetatile 9, 20, 565, 1 + setmetatile 7, 19, METATILE_Cave_EntranceCover, 1 + setmetatile 8, 19, METATILE_Cave_EntranceCover, 1 + setmetatile 9, 19, METATILE_Cave_EntranceCover, 1 + setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 return IslandCave_OnTransition: @ 8238E99 @@ -39,12 +39,12 @@ IslandCave_EventScript_238EAB:: @ 8238EAB return IslandCave_EventScript_238EAF:: @ 8238EAF - setmetatile 7, 19, 554, 1 - setmetatile 8, 19, 555, 1 - setmetatile 9, 19, 556, 1 - setmetatile 7, 20, 562, 1 - setmetatile 8, 20, 563, 0 - setmetatile 9, 20, 564, 1 + setmetatile 7, 19, METATILE_Cave_SealedChamberEntrance_TopLeft, 1 + setmetatile 8, 19, METATILE_Cave_SealedChamberEntrance_TopMid, 1 + setmetatile 9, 19, METATILE_Cave_SealedChamberEntrance_TopRight, 1 + setmetatile 7, 20, METATILE_Cave_SealedChamberEntrance_BottomLeft, 1 + setmetatile 8, 20, METATILE_Cave_SealedChamberEntrance_BottomMid, 0 + setmetatile 9, 20, METATILE_Cave_SealedChamberEntrance_BottomRight, 1 special DrawWholeMapView playse SE_BAN setflag FLAG_SYS_BRAILLE_REGICE_COMPLETED diff --git a/data/maps/JaggedPass/scripts.inc b/data/maps/JaggedPass/scripts.inc index 34ff367ae..1bb9e82a2 100644 --- a/data/maps/JaggedPass/scripts.inc +++ b/data/maps/JaggedPass/scripts.inc @@ -36,8 +36,8 @@ JaggedPass_MapScript1_23069C: @ 823069C end JaggedPass_EventScript_2306A8:: @ 82306A8 - setmetatile 16, 17, 628, 1 - setmetatile 16, 18, 628, 1 + setmetatile 16, 17, METATILE_Lavaridge_RockWall, 1 + setmetatile 16, 18, METATILE_Lavaridge_RockWall, 1 end JaggedPass_EventScript_2306BB:: @ 82306BB @@ -57,8 +57,8 @@ JaggedPass_EventScript_2306BB:: @ 82306BB special sub_8139560 waitstate playse SE_KOUKA_M - setmetatile 16, 17, 598, 1 - setmetatile 16, 18, 606, 0 + setmetatile 16, 17, METATILE_Lavaridge_CaveEntrance_Top, 1 + setmetatile 16, 18, METATILE_Lavaridge_CaveEntrance_Bottom, 0 special DrawWholeMapView delay 30 setvar VAR_JAGGED_PASS_STATE, 2 diff --git a/data/maps/LilycoveCity/scripts.inc b/data/maps/LilycoveCity/scripts.inc index 68ffd5f99..9a777e551 100644 --- a/data/maps/LilycoveCity/scripts.inc +++ b/data/maps/LilycoveCity/scripts.inc @@ -16,18 +16,18 @@ LilycoveCity_MapScript1_1E2B61: @ 81E2B61 end LilycoveCity_EventScript_1E2B6B:: @ 81E2B6B - setmetatile 76, 12, 656, 1 - setmetatile 77, 12, 657, 1 - setmetatile 76, 13, 672, 1 - setmetatile 77, 13, 673, 1 - setmetatile 76, 14, 664, 1 - setmetatile 77, 14, 665, 1 - setmetatile 76, 15, 672, 1 - setmetatile 77, 15, 673, 1 - setmetatile 77, 16, 664, 1 - setmetatile 78, 16, 665, 1 - setmetatile 77, 17, 672, 1 - setmetatile 78, 17, 673, 1 + setmetatile 76, 12, METATILE_Lilycove_Wailmer0, 1 + setmetatile 77, 12, METATILE_Lilycove_Wailmer1, 1 + setmetatile 76, 13, METATILE_Lilycove_Wailmer2, 1 + setmetatile 77, 13, METATILE_Lilycove_Wailmer3, 1 + setmetatile 76, 14, METATILE_Lilycove_Wailmer0_Alt, 1 + setmetatile 77, 14, METATILE_Lilycove_Wailmer1_Alt, 1 + setmetatile 76, 15, METATILE_Lilycove_Wailmer2, 1 + setmetatile 77, 15, METATILE_Lilycove_Wailmer3, 1 + setmetatile 77, 16, METATILE_Lilycove_Wailmer0_Alt, 1 + setmetatile 78, 16, METATILE_Lilycove_Wailmer1_Alt, 1 + setmetatile 77, 17, METATILE_Lilycove_Wailmer2, 1 + setmetatile 78, 17, METATILE_Lilycove_Wailmer3, 1 return LilycoveCity_EventScript_1E2BD8:: @ 81E2BD8 diff --git a/data/maps/LilycoveCity_ContestLobby/scripts.inc b/data/maps/LilycoveCity_ContestLobby/scripts.inc index 34afac0a5..cd4749bfc 100644 --- a/data/maps/LilycoveCity_ContestLobby/scripts.inc +++ b/data/maps/LilycoveCity_ContestLobby/scripts.inc @@ -408,14 +408,14 @@ LilycoveCity_ContestLobby_EventScript_21A670:: @ 821A670 applymovement 1, LilycoveCity_ContestLobby_Movement_21A6F5 waitmovement 0 playse SE_HASHI - setmetatile 12, 2, 545, 1 - setmetatile 12, 3, 609, 1 + setmetatile 12, 2, METATILE_Contest_WallShadow, 1 + setmetatile 12, 3, METATILE_Contest_FloorShadow, 1 special DrawWholeMapView applymovement 1, LilycoveCity_ContestLobby_Movement_21A6F9 waitmovement 0 playse SE_HASHI - setmetatile 12, 2, 721, 1 - setmetatile 12, 3, 729, 1 + setmetatile 12, 2, METATILE_Contest_CounterFlap_Top, 1 + setmetatile 12, 3, METATILE_Contest_CounterFlap_Bottom, 1 special DrawWholeMapView delay 20 applymovement 1, LilycoveCity_ContestLobby_Movement_21A706 @@ -931,14 +931,14 @@ LilycoveCity_ContestLobby_EventScript_21AC49:: @ 821AC49 applymovement 2, LilycoveCity_ContestLobby_Movement_21ACDD waitmovement 0 playse SE_HASHI - setmetatile 17, 2, 545, 1 - setmetatile 17, 3, 609, 1 + setmetatile 17, 2, METATILE_Contest_WallShadow, 1 + setmetatile 17, 3, METATILE_Contest_FloorShadow, 1 special DrawWholeMapView applymovement 2, LilycoveCity_ContestLobby_Movement_21ACE1 waitmovement 0 playse SE_HASHI - setmetatile 17, 2, 721, 1 - setmetatile 17, 3, 729, 1 + setmetatile 17, 2, METATILE_Contest_CounterFlap_Top, 1 + setmetatile 17, 3, METATILE_Contest_CounterFlap_Bottom, 1 special DrawWholeMapView delay 20 applymovement 2, LilycoveCity_ContestLobby_Movement_21ACEF diff --git a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc index 3bbfa8a38..add7ef22f 100644 --- a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc +++ b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc @@ -28,32 +28,32 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_219781:: @ 8219781 end LilycoveCity_LilycoveMuseum_2F_EventScript_21978B:: @ 821978B - setmetatile 10, 6, 606, 1 - setmetatile 11, 6, 607, 1 + setmetatile 10, 6, METATILE_LilycoveMuseum_Painting2_Left, 1 + setmetatile 11, 6, METATILE_LilycoveMuseum_Painting2_Right, 1 goto LilycoveCity_LilycoveMuseum_2F_EventScript_219754 end LilycoveCity_LilycoveMuseum_2F_EventScript_2197A3:: @ 82197A3 - setmetatile 18, 6, 604, 1 - setmetatile 19, 6, 605, 1 + setmetatile 18, 6, METATILE_LilycoveMuseum_Painting1_Left, 1 + setmetatile 19, 6, METATILE_LilycoveMuseum_Painting1_Right, 1 goto LilycoveCity_LilycoveMuseum_2F_EventScript_219763 end LilycoveCity_LilycoveMuseum_2F_EventScript_2197BB:: @ 82197BB - setmetatile 14, 10, 608, 1 - setmetatile 15, 10, 609, 1 + setmetatile 14, 10, METATILE_LilycoveMuseum_Painting3_Left, 1 + setmetatile 15, 10, METATILE_LilycoveMuseum_Painting3_Right, 1 goto LilycoveCity_LilycoveMuseum_2F_EventScript_219772 end LilycoveCity_LilycoveMuseum_2F_EventScript_2197D3:: @ 82197D3 - setmetatile 6, 10, 602, 1 - setmetatile 7, 10, 603, 1 + setmetatile 6, 10, METATILE_LilycoveMuseum_Painting0_Left, 1 + setmetatile 7, 10, METATILE_LilycoveMuseum_Painting0_Right, 1 goto LilycoveCity_LilycoveMuseum_2F_EventScript_219781 end LilycoveCity_LilycoveMuseum_2F_EventScript_2197EB:: @ 82197EB - setmetatile 2, 6, 610, 1 - setmetatile 3, 6, 611, 1 + setmetatile 2, 6, METATILE_LilycoveMuseum_Painting4_Left, 1 + setmetatile 3, 6, METATILE_LilycoveMuseum_Painting4_Right, 1 end LilycoveCity_LilycoveMuseum_2F_MapScript2_2197FE: @ 82197FE diff --git a/data/maps/LinkContestRoom1/scripts.inc b/data/maps/LinkContestRoom1/scripts.inc index 8b753471a..e0cd24eff 100644 --- a/data/maps/LinkContestRoom1/scripts.inc +++ b/data/maps/LinkContestRoom1/scripts.inc @@ -312,97 +312,97 @@ LinkContestRoom1_EventScript_23BB2B:: @ 823BB2B return LinkContestRoom1_EventScript_23BB78:: @ 823BB78 - createvobject 5, 20, 3, 2, 3, 1 - createvobject 46, 24, 11, 2, 3, 1 + createvobject EVENT_OBJ_GFX_NINJA_BOY, 20, 3, 2, 3, 1 + createvobject EVENT_OBJ_GFX_SCIENTIST_1, 24, 11, 2, 3, 1 return LinkContestRoom1_EventScript_23BB8B:: @ 823BB8B - createvobject 45, 0, 2, 3, 3, 4 - createvobject 66, 1, 2, 4, 3, 4 - createvobject 55, 2, 2, 7, 3, 4 - createvobject 46, 3, 2, 8, 3, 4 - createvobject 5, 10, 12, 3, 3, 3 - createvobject 20, 11, 12, 4, 3, 3 - createvobject 24, 12, 12, 7, 3, 3 - createvobject 12, 13, 12, 8, 3, 3 - createvobject 47, 20, 3, 2, 3, 1 - createvobject 46, 24, 11, 2, 3, 1 + createvobject EVENT_OBJ_GFX_BEAUTY, 0, 2, 3, 3, 4 + createvobject EVENT_OBJ_GFX_MAN_5, 1, 2, 4, 3, 4 + createvobject EVENT_OBJ_GFX_HIKER, 2, 2, 7, 3, 4 + createvobject EVENT_OBJ_GFX_SCIENTIST_1, 3, 2, 8, 3, 4 + createvobject EVENT_OBJ_GFX_NINJA_BOY, 10, 12, 3, 3, 3 + createvobject EVENT_OBJ_GFX_WOMAN_2, 11, 12, 4, 3, 3 + createvobject EVENT_OBJ_GFX_WOMAN_3, 12, 12, 7, 3, 3 + createvobject EVENT_OBJ_GFX_LITTLE_GIRL, 13, 12, 8, 3, 3 + createvobject EVENT_OBJ_GFX_LASS, 20, 3, 2, 3, 1 + createvobject EVENT_OBJ_GFX_SCIENTIST_1, 24, 11, 2, 3, 1 return LinkContestRoom1_EventScript_23BBE6:: @ 823BBE6 - createvobject 45, 0, 2, 3, 3, 4 - createvobject 66, 1, 2, 4, 3, 4 - createvobject 55, 2, 2, 7, 3, 4 - createvobject 48, 3, 2, 8, 3, 4 - createvobject 5, 10, 12, 3, 3, 3 - createvobject 20, 11, 12, 4, 3, 3 - createvobject 24, 12, 12, 7, 3, 3 - createvobject 45, 13, 12, 8, 3, 3 - createvobject 22, 20, 3, 2, 3, 1 - createvobject 23, 20, 6, 2, 3, 1 - createvobject 34, 20, 7, 2, 3, 1 - createvobject 46, 24, 8, 2, 3, 1 - createvobject 48, 24, 11, 2, 3, 1 - createvobject 11, 25, 3, 9, 3, 2 - createvobject 35, 26, 4, 9, 3, 2 - createvobject 17, 27, 5, 9, 3, 2 - createvobject 40, 28, 9, 9, 3, 2 - createvobject 38, 29, 10, 9, 3, 2 - createvobject 83, 30, 11, 9, 3, 2 + createvobject EVENT_OBJ_GFX_BEAUTY, 0, 2, 3, 3, 4 + createvobject EVENT_OBJ_GFX_MAN_5, 1, 2, 4, 3, 4 + createvobject EVENT_OBJ_GFX_HIKER, 2, 2, 7, 3, 4 + createvobject EVENT_OBJ_GFX_GENTLEMAN, 3, 2, 8, 3, 4 + createvobject EVENT_OBJ_GFX_NINJA_BOY, 10, 12, 3, 3, 3 + createvobject EVENT_OBJ_GFX_WOMAN_2, 11, 12, 4, 3, 3 + createvobject EVENT_OBJ_GFX_WOMAN_3, 12, 12, 7, 3, 3 + createvobject EVENT_OBJ_GFX_BEAUTY, 13, 12, 8, 3, 3 + createvobject EVENT_OBJ_GFX_EXPERT_F, 20, 3, 2, 3, 1 + createvobject EVENT_OBJ_GFX_MAN_2, 20, 6, 2, 3, 1 + createvobject EVENT_OBJ_GFX_WOMAN_5, 20, 7, 2, 3, 1 + createvobject EVENT_OBJ_GFX_SCIENTIST_1, 24, 8, 2, 3, 1 + createvobject EVENT_OBJ_GFX_GENTLEMAN, 24, 11, 2, 3, 1 + createvobject EVENT_OBJ_GFX_LITTLE_BOY, 25, 3, 9, 3, 2 + createvobject EVENT_OBJ_GFX_YOUNGSTER, 26, 4, 9, 3, 2 + createvobject EVENT_OBJ_GFX_FAT_MAN, 27, 5, 9, 3, 2 + createvobject EVENT_OBJ_GFX_HEX_MANIAC, 28, 9, 9, 3, 2 + createvobject EVENT_OBJ_GFX_SCHOOL_KID_M, 29, 10, 9, 3, 2 + createvobject EVENT_OBJ_GFX_MART_EMPLOYEE, 30, 11, 9, 3, 2 return LinkContestRoom1_EventScript_23BC92:: @ 823BC92 - createvobject 45, 0, 2, 3, 3, 4 - createvobject 66, 1, 2, 4, 3, 4 - createvobject 55, 2, 2, 7, 3, 4 - createvobject 12, 3, 2, 8, 3, 4 - createvobject 39, 4, 1, 3, 3, 4 - createvobject 34, 6, 1, 5, 3, 4 - createvobject 26, 7, 1, 6, 3, 4 - createvobject 48, 9, 1, 8, 3, 4 - createvobject 5, 10, 12, 3, 3, 3 - createvobject 20, 11, 12, 4, 3, 3 - createvobject 24, 12, 12, 7, 3, 3 - createvobject 45, 13, 12, 8, 3, 3 - createvobject 50, 14, 13, 3, 3, 3 - createvobject 52, 15, 13, 4, 3, 3 - createvobject 65, 17, 13, 6, 3, 3 - createvobject 83, 18, 13, 7, 3, 3 - createvobject 116, 19, 13, 8, 3, 3 - createvobject 25, 20, 3, 2, 3, 1 - createvobject 31, 21, 6, 2, 3, 1 - createvobject 33, 22, 7, 2, 3, 1 - createvobject 46, 24, 11, 2, 3, 1 - createvobject 49, 25, 3, 9, 3, 2 - createvobject 35, 26, 4, 9, 3, 2 - createvobject 48, 27, 5, 9, 3, 2 - createvobject 40, 28, 9, 9, 3, 2 - createvobject 38, 29, 10, 9, 3, 2 - createvobject 83, 30, 11, 9, 3, 2 + createvobject EVENT_OBJ_GFX_BEAUTY, 0, 2, 3, 3, 4 + createvobject EVENT_OBJ_GFX_MAN_5, 1, 2, 4, 3, 4 + createvobject EVENT_OBJ_GFX_HIKER, 2, 2, 7, 3, 4 + createvobject EVENT_OBJ_GFX_LITTLE_GIRL, 3, 2, 8, 3, 4 + createvobject EVENT_OBJ_GFX_MANIAC, 4, 1, 3, 3, 4 + createvobject EVENT_OBJ_GFX_WOMAN_5, 6, 1, 5, 3, 4 + createvobject EVENT_OBJ_GFX_WOMAN_4, 7, 1, 6, 3, 4 + createvobject EVENT_OBJ_GFX_GENTLEMAN, 9, 1, 8, 3, 4 + createvobject EVENT_OBJ_GFX_NINJA_BOY, 10, 12, 3, 3, 3 + createvobject EVENT_OBJ_GFX_WOMAN_2, 11, 12, 4, 3, 3 + createvobject EVENT_OBJ_GFX_WOMAN_3, 12, 12, 7, 3, 3 + createvobject EVENT_OBJ_GFX_BEAUTY, 13, 12, 8, 3, 3 + createvobject EVENT_OBJ_GFX_FISHERMAN, 14, 13, 3, 3, 3 + createvobject EVENT_OBJ_GFX_RUNNING_TRIATHLETE_F, 15, 13, 4, 3, 3 + createvobject EVENT_OBJ_GFX_MAN_4, 17, 13, 6, 3, 3 + createvobject EVENT_OBJ_GFX_MART_EMPLOYEE, 18, 13, 7, 3, 3 + createvobject EVENT_OBJ_GFX_DEVON_EMPLOYEE, 19, 13, 8, 3, 3 + createvobject EVENT_OBJ_GFX_POKEFAN_M, 20, 3, 2, 3, 1 + createvobject EVENT_OBJ_GFX_CAMPER, 21, 6, 2, 3, 1 + createvobject EVENT_OBJ_GFX_MAN_3, 22, 7, 2, 3, 1 + createvobject EVENT_OBJ_GFX_SCIENTIST_1, 24, 11, 2, 3, 1 + createvobject EVENT_OBJ_GFX_SAILOR, 25, 3, 9, 3, 2 + createvobject EVENT_OBJ_GFX_YOUNGSTER, 26, 4, 9, 3, 2 + createvobject EVENT_OBJ_GFX_GENTLEMAN, 27, 5, 9, 3, 2 + createvobject EVENT_OBJ_GFX_HEX_MANIAC, 28, 9, 9, 3, 2 + createvobject EVENT_OBJ_GFX_SCHOOL_KID_M, 29, 10, 9, 3, 2 + createvobject EVENT_OBJ_GFX_MART_EMPLOYEE, 30, 11, 9, 3, 2 return LinkContestRoom1_EventScript_23BD86:: @ 823BD86 - createvobject 45, 0, 2, 3, 3, 4 - createvobject 66, 1, 2, 4, 3, 4 - createvobject 55, 2, 2, 7, 3, 4 - createvobject 12, 3, 2, 8, 3, 4 - createvobject 39, 4, 1, 3, 3, 4 - createvobject 34, 6, 1, 5, 3, 4 - createvobject 26, 7, 1, 6, 3, 4 - createvobject 48, 9, 1, 8, 3, 4 - createvobject 5, 10, 12, 3, 3, 3 - createvobject 20, 11, 12, 4, 3, 3 - createvobject 24, 12, 12, 7, 3, 3 - createvobject 45, 13, 12, 8, 3, 3 - createvobject 50, 14, 13, 3, 3, 3 - createvobject 52, 15, 13, 4, 3, 3 - createvobject 65, 17, 13, 6, 3, 3 - createvobject 83, 18, 13, 7, 3, 3 - createvobject 116, 19, 13, 8, 3, 3 - createvobject 25, 20, 3, 2, 3, 1 - createvobject 31, 21, 6, 2, 3, 1 - createvobject 33, 22, 7, 2, 3, 1 - createvobject 46, 24, 11, 2, 3, 1 + createvobject EVENT_OBJ_GFX_BEAUTY, 0, 2, 3, 3, 4 + createvobject EVENT_OBJ_GFX_MAN_5, 1, 2, 4, 3, 4 + createvobject EVENT_OBJ_GFX_HIKER, 2, 2, 7, 3, 4 + createvobject EVENT_OBJ_GFX_LITTLE_GIRL, 3, 2, 8, 3, 4 + createvobject EVENT_OBJ_GFX_MANIAC, 4, 1, 3, 3, 4 + createvobject EVENT_OBJ_GFX_WOMAN_5, 6, 1, 5, 3, 4 + createvobject EVENT_OBJ_GFX_WOMAN_4, 7, 1, 6, 3, 4 + createvobject EVENT_OBJ_GFX_GENTLEMAN, 9, 1, 8, 3, 4 + createvobject EVENT_OBJ_GFX_NINJA_BOY, 10, 12, 3, 3, 3 + createvobject EVENT_OBJ_GFX_WOMAN_2, 11, 12, 4, 3, 3 + createvobject EVENT_OBJ_GFX_WOMAN_3, 12, 12, 7, 3, 3 + createvobject EVENT_OBJ_GFX_BEAUTY, 13, 12, 8, 3, 3 + createvobject EVENT_OBJ_GFX_FISHERMAN, 14, 13, 3, 3, 3 + createvobject EVENT_OBJ_GFX_RUNNING_TRIATHLETE_F, 15, 13, 4, 3, 3 + createvobject EVENT_OBJ_GFX_MAN_4, 17, 13, 6, 3, 3 + createvobject EVENT_OBJ_GFX_MART_EMPLOYEE, 18, 13, 7, 3, 3 + createvobject EVENT_OBJ_GFX_DEVON_EMPLOYEE, 19, 13, 8, 3, 3 + createvobject EVENT_OBJ_GFX_POKEFAN_M, 20, 3, 2, 3, 1 + createvobject EVENT_OBJ_GFX_CAMPER, 21, 6, 2, 3, 1 + createvobject EVENT_OBJ_GFX_MAN_3, 22, 7, 2, 3, 1 + createvobject EVENT_OBJ_GFX_SCIENTIST_1, 24, 11, 2, 3, 1 return LinkContestRoom1_EventScript_23BE44:: @ 823BE44 diff --git a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc index 31a526a25..d81340c6c 100644 --- a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc +++ b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc @@ -11,8 +11,8 @@ LittlerootTown_BrendansHouse_1F_MapScript1_1F7765: @ 81F7765 end LittlerootTown_BrendansHouse_1F_EventScript_1F777A:: @ 81F777A - setmetatile 5, 4, 624, 1 - setmetatile 5, 2, 616, 1 + setmetatile 5, 4, METATILE_BrendansMaysHouse_MovingBox_Open, 1 + setmetatile 5, 2, METATILE_BrendansMaysHouse_MovingBox_Closed, 1 return LittlerootTown_BrendansHouse_1F_EventScript_1F778D:: @ 81F778D @@ -22,7 +22,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_1F778D:: @ 81F778D return LittlerootTown_BrendansHouse_1F_EventScript_1F779A:: @ 81F779A - setmetatile 3, 7, 659, 1 + setmetatile 3, 7, METATILE_BrendansMaysHouse_BookOnTable, 1 return LittlerootTown_BrendansHouse_1F_MapScript1_1F77A4: @ 81F77A4 diff --git a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc index 6b226da24..0557330a8 100644 --- a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc +++ b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc @@ -11,8 +11,8 @@ LittlerootTown_MaysHouse_1F_MapScript1_1F88B5: @ 81F88B5 end LittlerootTown_MaysHouse_1F_EventScript_1F88CA:: @ 81F88CA - setmetatile 5, 4, 624, 1 - setmetatile 5, 2, 616, 1 + setmetatile 5, 4, METATILE_BrendansMaysHouse_MovingBox_Open, 1 + setmetatile 5, 2, METATILE_BrendansMaysHouse_MovingBox_Closed, 1 return LittlerootTown_MaysHouse_1F_EventScript_1F88DD:: @ 81F88DD @@ -22,7 +22,7 @@ LittlerootTown_MaysHouse_1F_EventScript_1F88DD:: @ 81F88DD return LittlerootTown_MaysHouse_1F_EventScript_1F88EA:: @ 81F88EA - setmetatile 6, 7, 659, 1 + setmetatile 6, 7, METATILE_BrendansMaysHouse_BookOnTable, 1 return LittlerootTown_MaysHouse_1F_MapScript1_1F88F4: @ 81F88F4 diff --git a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc index a3ad4dff7..2b0dde7ae 100644 --- a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc +++ b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc @@ -334,7 +334,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA061:: @ 81FA061 LittlerootTown_ProfessorBirchsLab_EventScript_1FA06C:: @ 81FA06C bufferspeciesname 0, SPECIES_CYNDAQUIL - setvar VAR_TEMP_1, 155 + setvar VAR_TEMP_1, SPECIES_CYNDAQUIL givemon SPECIES_CYNDAQUIL, 5, ITEM_NONE, 0x0, 0x0, 0 compare VAR_RESULT, 0 goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA0A1 @@ -379,7 +379,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA0FD:: @ 81FA0FD LittlerootTown_ProfessorBirchsLab_EventScript_1FA10D:: @ 81FA10D bufferspeciesname 0, SPECIES_TOTODILE - setvar VAR_TEMP_1, 158 + setvar VAR_TEMP_1, SPECIES_TOTODILE givemon SPECIES_TOTODILE, 5, ITEM_NONE, 0x0, 0x0, 0 compare VAR_RESULT, 0 goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA142 @@ -424,7 +424,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA19E:: @ 81FA19E LittlerootTown_ProfessorBirchsLab_EventScript_1FA1AE:: @ 81FA1AE bufferspeciesname 0, SPECIES_CHIKORITA - setvar VAR_TEMP_1, 152 + setvar VAR_TEMP_1, SPECIES_CHIKORITA givemon SPECIES_CHIKORITA, 5, ITEM_NONE, 0x0, 0x0, 0 compare VAR_RESULT, 0 goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA1E3 diff --git a/data/maps/MauvilleCity_Gym/scripts.inc b/data/maps/MauvilleCity_Gym/scripts.inc index e23d48332..811cdc9de 100644 --- a/data/maps/MauvilleCity_Gym/scripts.inc +++ b/data/maps/MauvilleCity_Gym/scripts.inc @@ -17,32 +17,32 @@ MauvilleCity_Gym_EventScript_20DDBA:: @ 820DDBA end MauvilleCity_Gym_EventScript_20DDC4:: @ 820DDC4 - setmetatile 3, 11, 577, 1 - setmetatile 3, 12, 585, 1 - setmetatile 3, 13, 592, 1 - setmetatile 4, 10, 546, 0 - setmetatile 5, 10, 547, 0 - setmetatile 4, 11, 554, 1 - setmetatile 5, 11, 555, 1 - setmetatile 7, 10, 546, 0 - setmetatile 8, 10, 547, 0 - setmetatile 7, 11, 554, 1 - setmetatile 8, 11, 555, 1 - setmetatile 4, 13, 560, 0 - setmetatile 5, 13, 561, 0 - setmetatile 4, 14, 568, 0 - setmetatile 5, 14, 569, 0 - setmetatile 1, 10, 560, 0 - setmetatile 2, 10, 561, 0 - setmetatile 1, 11, 568, 0 - setmetatile 2, 11, 569, 0 - setmetatile 6, 8, 578, 1 - setmetatile 6, 9, 538, 0 - setmetatile 6, 10, 593, 0 - setmetatile 4, 6, 560, 0 - setmetatile 5, 6, 561, 0 - setmetatile 4, 7, 568, 0 - setmetatile 5, 7, 569, 0 + setmetatile 3, 11, METATILE_MauvilleGym_RedBeamV1_On, 1 + setmetatile 3, 12, METATILE_MauvilleGym_RedBeamV2_On, 1 + setmetatile 3, 13, METATILE_MauvilleGym_PoleTop_On, 1 + setmetatile 4, 10, METATILE_MauvilleGym_RedBeamH1_On, 0 + setmetatile 5, 10, METATILE_MauvilleGym_RedBeamH2_On, 0 + setmetatile 4, 11, METATILE_MauvilleGym_RedBeamH3_On, 1 + setmetatile 5, 11, METATILE_MauvilleGym_RedBeamH4_On, 1 + setmetatile 7, 10, METATILE_MauvilleGym_RedBeamH1_On, 0 + setmetatile 8, 10, METATILE_MauvilleGym_RedBeamH2_On, 0 + setmetatile 7, 11, METATILE_MauvilleGym_RedBeamH3_On, 1 + setmetatile 8, 11, METATILE_MauvilleGym_RedBeamH4_On, 1 + setmetatile 4, 13, METATILE_MauvilleGym_GreenBeamH1_Off, 0 + setmetatile 5, 13, METATILE_MauvilleGym_GreenBeamH2_Off, 0 + setmetatile 4, 14, METATILE_MauvilleGym_GreenBeamH3_Off, 0 + setmetatile 5, 14, METATILE_MauvilleGym_GreenBeamH4_Off, 0 + setmetatile 1, 10, METATILE_MauvilleGym_GreenBeamH1_Off, 0 + setmetatile 2, 10, METATILE_MauvilleGym_GreenBeamH2_Off, 0 + setmetatile 1, 11, METATILE_MauvilleGym_GreenBeamH3_Off, 0 + setmetatile 2, 11, METATILE_MauvilleGym_GreenBeamH4_Off, 0 + setmetatile 6, 8, METATILE_MauvilleGym_PoleBottom_On, 1 + setmetatile 6, 9, METATILE_MauvilleGym_FloorTile, 0 + setmetatile 6, 10, METATILE_MauvilleGym_PoleTop_Off, 0 + setmetatile 4, 6, METATILE_MauvilleGym_GreenBeamH1_Off, 0 + setmetatile 5, 6, METATILE_MauvilleGym_GreenBeamH2_Off, 0 + setmetatile 4, 7, METATILE_MauvilleGym_GreenBeamH3_Off, 0 + setmetatile 5, 7, METATILE_MauvilleGym_GreenBeamH4_Off, 0 end MauvilleCity_Gym_EventScript_20DEAF:: @ 820DEAF diff --git a/data/maps/MeteorFalls_1F_1R/scripts.inc b/data/maps/MeteorFalls_1F_1R/scripts.inc index bd1b8d090..8211034a6 100644 --- a/data/maps/MeteorFalls_1F_1R/scripts.inc +++ b/data/maps/MeteorFalls_1F_1R/scripts.inc @@ -7,10 +7,10 @@ MeteorFalls_1F_1R_MapScript1_22BD30: @ 822BD30 end MeteorFalls_1F_1R_EventScript_22BD3A:: @ 822BD3A - setmetatile 4, 1, 582, 1 - setmetatile 3, 2, 589, 1 - setmetatile 4, 2, 590, 0 - setmetatile 5, 2, 591, 1 + setmetatile 4, 1, METATILE_MeteorFalls_CaveEntrance_Top, 1 + setmetatile 3, 2, METATILE_MeteorFalls_CaveEntrance_Left, 1 + setmetatile 4, 2, METATILE_MeteorFalls_CaveEntrance_Bottom, 0 + setmetatile 5, 2, METATILE_MeteorFalls_CaveEntrance_Right, 1 return MeteorFalls_1F_1R_EventScript_22BD5F:: @ 822BD5F diff --git a/data/maps/MossdeepCity_Gym/scripts.inc b/data/maps/MossdeepCity_Gym/scripts.inc index 7fc98dc54..c0f092c6a 100644 --- a/data/maps/MossdeepCity_Gym/scripts.inc +++ b/data/maps/MossdeepCity_Gym/scripts.inc @@ -22,26 +22,26 @@ MossdeepCity_Gym_EventScript_220833:: @ 8220833 end MossdeepCity_Gym_EventScript_22083D:: @ 822083D - setmetatile 5, 5, 516, 0 - setmetatile 2, 7, 569, 1 + setmetatile 5, 5, METATILE_MossdeepGym_Obelisk_Top, 0 + setmetatile 2, 7, METATILE_MossdeepGym_Empty1, 1 goto MossdeepCity_Gym_EventScript_220815 end MossdeepCity_Gym_EventScript_220855:: @ 8220855 - setmetatile 8, 14, 516, 0 - setmetatile 8, 10, 569, 1 + setmetatile 8, 14, METATILE_MossdeepGym_Obelisk_Top, 0 + setmetatile 8, 10, METATILE_MossdeepGym_Empty1, 1 goto MossdeepCity_Gym_EventScript_220824 end MossdeepCity_Gym_EventScript_22086D:: @ 822086D - setmetatile 15, 17, 524, 0 - setmetatile 17, 15, 569, 1 + setmetatile 15, 17, METATILE_MossdeepGym_Obelisk_Base, 0 + setmetatile 17, 15, METATILE_MossdeepGym_Empty1, 1 goto MossdeepCity_Gym_EventScript_220833 end MossdeepCity_Gym_EventScript_220885:: @ 8220885 - setmetatile 1, 23, 525, 0 - setmetatile 5, 24, 569, 1 + setmetatile 1, 23, METATILE_MossdeepGym_Wall_LeftCorner, 0 + setmetatile 5, 24, METATILE_MossdeepGym_Empty1, 1 end MossdeepCity_Gym_EventScript_220898:: @ 8220898 @@ -114,8 +114,8 @@ MossdeepCity_Gym_EventScript_220999:: @ 8220999 setflag FLAG_MOSSDEEP_GYM_SWITCH_1 applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30 waitmovement 0 - setmetatile 5, 5, 516, 0 - setmetatile 2, 7, 569, 1 + setmetatile 5, 5, METATILE_MossdeepGym_Obelisk_Top, 0 + setmetatile 2, 7, METATILE_MossdeepGym_Empty1, 1 goto MossdeepCity_Gym_EventScript_2209C8 end @@ -129,8 +129,8 @@ MossdeepCity_Gym_EventScript_2209D0:: @ 82209D0 clearflag FLAG_MOSSDEEP_GYM_SWITCH_1 applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30 waitmovement 0 - setmetatile 5, 5, 524, 0 - setmetatile 2, 7, 568, 1 + setmetatile 5, 5, METATILE_MossdeepGym_Obelisk_Base, 0 + setmetatile 2, 7, METATILE_MossdeepGym_Empty0, 1 goto MossdeepCity_Gym_EventScript_2209C8 end @@ -140,8 +140,8 @@ MossdeepCity_Gym_EventScript_2209F5:: @ 82209F5 setflag FLAG_MOSSDEEP_GYM_SWITCH_2 applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30 waitmovement 0 - setmetatile 8, 14, 516, 0 - setmetatile 8, 10, 569, 1 + setmetatile 8, 14, METATILE_MossdeepGym_Obelisk_Top, 0 + setmetatile 8, 10, METATILE_MossdeepGym_Empty1, 1 goto MossdeepCity_Gym_EventScript_2209C8 end @@ -149,8 +149,8 @@ MossdeepCity_Gym_EventScript_220A24:: @ 8220A24 clearflag FLAG_MOSSDEEP_GYM_SWITCH_2 applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30 waitmovement 0 - setmetatile 8, 14, 517, 0 - setmetatile 8, 10, 568, 1 + setmetatile 8, 14, METATILE_MossdeepGym_OuterWall_RightCorner, 0 + setmetatile 8, 10, METATILE_MossdeepGym_Empty0, 1 goto MossdeepCity_Gym_EventScript_2209C8 end @@ -160,8 +160,8 @@ MossdeepCity_Gym_EventScript_220A49:: @ 8220A49 setflag FLAG_MOSSDEEP_GYM_SWITCH_3 applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30 waitmovement 0 - setmetatile 15, 17, 524, 0 - setmetatile 17, 15, 569, 1 + setmetatile 15, 17, METATILE_MossdeepGym_Obelisk_Base, 0 + setmetatile 17, 15, METATILE_MossdeepGym_Empty1, 1 goto MossdeepCity_Gym_EventScript_2209C8 end @@ -169,8 +169,8 @@ MossdeepCity_Gym_EventScript_220A78:: @ 8220A78 clearflag FLAG_MOSSDEEP_GYM_SWITCH_3 applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30 waitmovement 0 - setmetatile 15, 17, 516, 0 - setmetatile 17, 15, 568, 1 + setmetatile 15, 17, METATILE_MossdeepGym_Obelisk_Top, 0 + setmetatile 17, 15, METATILE_MossdeepGym_Empty0, 1 goto MossdeepCity_Gym_EventScript_2209C8 end @@ -180,8 +180,8 @@ MossdeepCity_Gym_EventScript_220A9D:: @ 8220A9D setflag FLAG_MOSSDEEP_GYM_SWITCH_4 applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30 waitmovement 0 - setmetatile 1, 23, 525, 0 - setmetatile 5, 24, 569, 1 + setmetatile 1, 23, METATILE_MossdeepGym_Wall_LeftCorner, 0 + setmetatile 5, 24, METATILE_MossdeepGym_Empty1, 1 goto MossdeepCity_Gym_EventScript_2209C8 end @@ -189,8 +189,8 @@ MossdeepCity_Gym_EventScript_220ACC:: @ 8220ACC clearflag FLAG_MOSSDEEP_GYM_SWITCH_4 applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_220C30 waitmovement 0 - setmetatile 1, 23, 516, 0 - setmetatile 5, 24, 568, 1 + setmetatile 1, 23, METATILE_MossdeepGym_Obelisk_Top, 0 + setmetatile 5, 24, METATILE_MossdeepGym_Empty0, 1 goto MossdeepCity_Gym_EventScript_2209C8 end diff --git a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc index bb60fc2f6..66fd663b1 100644 --- a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc +++ b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc @@ -44,7 +44,7 @@ MossdeepCity_SpaceCenter_1F_MapScript1_222FC2: @ 8222FC2 end MossdeepCity_SpaceCenter_1F_EventScript_222FCE:: @ 8222FCE - setmetatile 2, 5, 996, 1 + setmetatile 2, 5, METATILE_Facility_DataPad, 1 return MossdeepCity_SpaceCenter_1F_EventScript_222FD8:: @ 8222FD8 diff --git a/data/maps/MossdeepCity_StevensHouse/scripts.inc b/data/maps/MossdeepCity_StevensHouse/scripts.inc index 55c32653a..69b5a01d4 100644 --- a/data/maps/MossdeepCity_StevensHouse/scripts.inc +++ b/data/maps/MossdeepCity_StevensHouse/scripts.inc @@ -9,7 +9,7 @@ MossdeepCity_StevensHouse_MapScript1_222794: @ 8222794 end MossdeepCity_StevensHouse_EventScript_22279E:: @ 822279E - setmetatile 6, 4, 753, 1 + setmetatile 6, 4, METATILE_GenericBuilding_TableEdge, 1 return MossdeepCity_StevensHouse_OnTransition: @ 82227A8 @@ -84,7 +84,7 @@ MossdeepCity_StevensHouse_EventScript_22285B:: @ 822285B end MossdeepCity_StevensHouse_EventScript_222865:: @ 8222865 - setvar VAR_TEMP_1, 398 + setvar VAR_TEMP_1, SPECIES_BELDUM givemon SPECIES_BELDUM, 5, ITEM_NONE, 0x0, 0x0, 0 compare VAR_RESULT, 0 goto_if_eq MossdeepCity_StevensHouse_EventScript_222895 diff --git a/data/maps/NewMauville_Entrance/scripts.inc b/data/maps/NewMauville_Entrance/scripts.inc index 7adb2d7ce..1fadc7b7d 100644 --- a/data/maps/NewMauville_Entrance/scripts.inc +++ b/data/maps/NewMauville_Entrance/scripts.inc @@ -9,12 +9,12 @@ NewMauville_Entrance_MapScript1_2372B8: @ 82372B8 end NewMauville_Entrance_EventScript_2372C4:: @ 82372C4 - setmetatile 3, 0, 788, 1 - setmetatile 4, 0, 789, 1 - setmetatile 5, 0, 790, 1 - setmetatile 3, 1, 796, 1 - setmetatile 4, 1, 797, 1 - setmetatile 5, 1, 798, 1 + setmetatile 3, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile0, 1 + setmetatile 4, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile1, 1 + setmetatile 5, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile2, 1 + setmetatile 3, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile3, 1 + setmetatile 4, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile4, 1 + setmetatile 5, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile5, 1 return NewMauville_Entrance_OnTransition: @ 82372FB @@ -33,12 +33,12 @@ NewMauville_Entrance_EventScript_2372FF:: @ 82372FF compare VAR_RESULT, 0 goto_if_eq NewMauville_Entrance_EventScript_237380 msgbox NewMauville_Entrance_Text_2373AC, MSGBOX_DEFAULT - setmetatile 3, 0, 707, 0 - setmetatile 4, 0, 708, 0 - setmetatile 5, 0, 709, 0 - setmetatile 3, 1, 715, 1 - setmetatile 4, 1, 716, 0 - setmetatile 5, 1, 717, 1 + setmetatile 3, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile0, 0 + setmetatile 4, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile1, 0 + setmetatile 5, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile2, 0 + setmetatile 3, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile3, 1 + setmetatile 4, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile4, 0 + setmetatile 5, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile5, 1 special DrawWholeMapView playse SE_BAN setvar VAR_NEW_MAUVILLE_STATE, 1 diff --git a/data/maps/NewMauville_Inside/scripts.inc b/data/maps/NewMauville_Inside/scripts.inc index 0582e2a32..5d871f170 100644 --- a/data/maps/NewMauville_Inside/scripts.inc +++ b/data/maps/NewMauville_Inside/scripts.inc @@ -65,83 +65,83 @@ NewMauville_Inside_EventScript_237471:: @ 8237471 end NewMauville_Inside_EventScript_237489:: @ 8237489 - setmetatile 23, 34, 617, 1 - setmetatile 23, 35, 625, 1 - setmetatile 23, 36, 621, 0 - setmetatile 23, 37, 641, 0 - setmetatile 10, 16, 617, 1 - setmetatile 10, 17, 625, 1 - setmetatile 10, 18, 621, 0 - setmetatile 10, 19, 641, 0 - setmetatile 10, 0, 617, 1 - setmetatile 10, 1, 625, 1 - setmetatile 10, 2, 621, 0 - setmetatile 10, 3, 641, 0 - setmetatile 37, 33, 694, 1 - setmetatile 37, 34, 702, 1 - setmetatile 37, 35, 710, 1 - setmetatile 37, 36, 718, 1 - setmetatile 28, 22, 694, 1 - setmetatile 28, 23, 702, 1 - setmetatile 28, 24, 710, 1 - setmetatile 28, 25, 718, 1 - setmetatile 10, 24, 694, 1 - setmetatile 10, 25, 702, 1 - setmetatile 10, 26, 710, 1 - setmetatile 10, 27, 718, 1 - setmetatile 21, 2, 694, 1 - setmetatile 21, 3, 702, 1 - setmetatile 21, 4, 710, 1 - setmetatile 21, 5, 718, 1 - setmetatile 6, 11, 591, 0 - setmetatile 13, 10, 591, 0 - setmetatile 16, 22, 591, 0 - setmetatile 4, 26, 591, 0 - setmetatile 30, 38, 591, 0 - setmetatile 2, 11, 558, 0 - setmetatile 17, 10, 558, 0 - setmetatile 25, 18, 558, 0 - setmetatile 18, 36, 558, 0 + setmetatile 23, 34, METATILE_BikeShop_Barrier_Hidden_Top, 1 + setmetatile 23, 35, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 + setmetatile 23, 36, METATILE_BikeShop_Floor_Shadow_Top, 0 + setmetatile 23, 37, METATILE_BikeShop_Wall_Edge_Top, 0 + setmetatile 10, 16, METATILE_BikeShop_Barrier_Hidden_Top, 1 + setmetatile 10, 17, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 + setmetatile 10, 18, METATILE_BikeShop_Floor_Shadow_Top, 0 + setmetatile 10, 19, METATILE_BikeShop_Wall_Edge_Top, 0 + setmetatile 10, 0, METATILE_BikeShop_Barrier_Hidden_Top, 1 + setmetatile 10, 1, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 + setmetatile 10, 2, METATILE_BikeShop_Floor_Shadow_Top, 0 + setmetatile 10, 3, METATILE_BikeShop_Wall_Edge_Top, 0 + setmetatile 37, 33, METATILE_BikeShop_Barrier_Green_Top, 1 + setmetatile 37, 34, METATILE_BikeShop_Barrier_Green_TopMid, 1 + setmetatile 37, 35, METATILE_BikeShop_Barrier_Green_BottomMid, 1 + setmetatile 37, 36, METATILE_BikeShop_Barrier_Green_Bottom, 1 + setmetatile 28, 22, METATILE_BikeShop_Barrier_Green_Top, 1 + setmetatile 28, 23, METATILE_BikeShop_Barrier_Green_TopMid, 1 + setmetatile 28, 24, METATILE_BikeShop_Barrier_Green_BottomMid, 1 + setmetatile 28, 25, METATILE_BikeShop_Barrier_Green_Bottom, 1 + setmetatile 10, 24, METATILE_BikeShop_Barrier_Green_Top, 1 + setmetatile 10, 25, METATILE_BikeShop_Barrier_Green_TopMid, 1 + setmetatile 10, 26, METATILE_BikeShop_Barrier_Green_BottomMid, 1 + setmetatile 10, 27, METATILE_BikeShop_Barrier_Green_Bottom, 1 + setmetatile 21, 2, METATILE_BikeShop_Barrier_Green_Top, 1 + setmetatile 21, 3, METATILE_BikeShop_Barrier_Green_TopMid, 1 + setmetatile 21, 4, METATILE_BikeShop_Barrier_Green_BottomMid, 1 + setmetatile 21, 5, METATILE_BikeShop_Barrier_Green_Bottom, 1 + setmetatile 6, 11, METATILE_BikeShop_Button_Pressed, 0 + setmetatile 13, 10, METATILE_BikeShop_Button_Pressed, 0 + setmetatile 16, 22, METATILE_BikeShop_Button_Pressed, 0 + setmetatile 4, 26, METATILE_BikeShop_Button_Pressed, 0 + setmetatile 30, 38, METATILE_BikeShop_Button_Pressed, 0 + setmetatile 2, 11, METATILE_BikeShop_Button_Green, 0 + setmetatile 17, 10, METATILE_BikeShop_Button_Green, 0 + setmetatile 25, 18, METATILE_BikeShop_Button_Green, 0 + setmetatile 18, 36, METATILE_BikeShop_Button_Green, 0 return NewMauville_Inside_EventScript_2375D7:: @ 82375D7 - setmetatile 23, 34, 695, 1 - setmetatile 23, 35, 703, 1 - setmetatile 23, 36, 711, 1 - setmetatile 23, 37, 719, 1 - setmetatile 10, 16, 695, 1 - setmetatile 10, 17, 703, 1 - setmetatile 10, 18, 711, 1 - setmetatile 10, 19, 719, 1 - setmetatile 10, 0, 695, 1 - setmetatile 10, 1, 703, 1 - setmetatile 10, 2, 711, 1 - setmetatile 10, 3, 719, 1 - setmetatile 37, 33, 617, 1 - setmetatile 37, 34, 625, 1 - setmetatile 37, 35, 621, 0 - setmetatile 37, 36, 641, 0 - setmetatile 28, 22, 617, 1 - setmetatile 28, 23, 625, 1 - setmetatile 28, 24, 621, 0 - setmetatile 28, 25, 641, 0 - setmetatile 10, 24, 617, 1 - setmetatile 10, 25, 625, 1 - setmetatile 10, 26, 621, 0 - setmetatile 10, 27, 641, 0 - setmetatile 21, 2, 617, 1 - setmetatile 21, 3, 625, 1 - setmetatile 21, 4, 621, 0 - setmetatile 21, 5, 641, 0 - setmetatile 2, 11, 591, 0 - setmetatile 17, 10, 591, 0 - setmetatile 25, 18, 591, 0 - setmetatile 18, 36, 591, 0 - setmetatile 6, 11, 566, 0 - setmetatile 13, 10, 566, 0 - setmetatile 16, 22, 566, 0 - setmetatile 4, 26, 566, 0 - setmetatile 30, 38, 566, 0 + setmetatile 23, 34, METATILE_BikeShop_Barrier_Blue_Top, 1 + setmetatile 23, 35, METATILE_BikeShop_Barrier_Blue_TopMid, 1 + setmetatile 23, 36, METATILE_BikeShop_Barrier_Blue_BottomMid, 1 + setmetatile 23, 37, METATILE_BikeShop_Barrier_Blue_Bottom, 1 + setmetatile 10, 16, METATILE_BikeShop_Barrier_Blue_Top, 1 + setmetatile 10, 17, METATILE_BikeShop_Barrier_Blue_TopMid, 1 + setmetatile 10, 18, METATILE_BikeShop_Barrier_Blue_BottomMid, 1 + setmetatile 10, 19, METATILE_BikeShop_Barrier_Blue_Bottom, 1 + setmetatile 10, 0, METATILE_BikeShop_Barrier_Blue_Top, 1 + setmetatile 10, 1, METATILE_BikeShop_Barrier_Blue_TopMid, 1 + setmetatile 10, 2, METATILE_BikeShop_Barrier_Blue_BottomMid, 1 + setmetatile 10, 3, METATILE_BikeShop_Barrier_Blue_Bottom, 1 + setmetatile 37, 33, METATILE_BikeShop_Barrier_Hidden_Top, 1 + setmetatile 37, 34, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 + setmetatile 37, 35, METATILE_BikeShop_Floor_Shadow_Top, 0 + setmetatile 37, 36, METATILE_BikeShop_Wall_Edge_Top, 0 + setmetatile 28, 22, METATILE_BikeShop_Barrier_Hidden_Top, 1 + setmetatile 28, 23, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 + setmetatile 28, 24, METATILE_BikeShop_Floor_Shadow_Top, 0 + setmetatile 28, 25, METATILE_BikeShop_Wall_Edge_Top, 0 + setmetatile 10, 24, METATILE_BikeShop_Barrier_Hidden_Top, 1 + setmetatile 10, 25, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 + setmetatile 10, 26, METATILE_BikeShop_Floor_Shadow_Top, 0 + setmetatile 10, 27, METATILE_BikeShop_Wall_Edge_Top, 0 + setmetatile 21, 2, METATILE_BikeShop_Barrier_Hidden_Top, 1 + setmetatile 21, 3, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 + setmetatile 21, 4, METATILE_BikeShop_Floor_Shadow_Top, 0 + setmetatile 21, 5, METATILE_BikeShop_Wall_Edge_Top, 0 + setmetatile 2, 11, METATILE_BikeShop_Button_Pressed, 0 + setmetatile 17, 10, METATILE_BikeShop_Button_Pressed, 0 + setmetatile 25, 18, METATILE_BikeShop_Button_Pressed, 0 + setmetatile 18, 36, METATILE_BikeShop_Button_Pressed, 0 + setmetatile 6, 11, METATILE_BikeShop_Button_Blue, 0 + setmetatile 13, 10, METATILE_BikeShop_Button_Blue, 0 + setmetatile 16, 22, METATILE_BikeShop_Button_Blue, 0 + setmetatile 4, 26, METATILE_BikeShop_Button_Blue, 0 + setmetatile 30, 38, METATILE_BikeShop_Button_Blue, 0 return NewMauville_Inside_EventScript_237725:: @ 8237725 @@ -153,15 +153,15 @@ NewMauville_Inside_EventScript_237725:: @ 8237725 end NewMauville_Inside_EventScript_23773A:: @ 823773A - setmetatile 33, 6, 591, 0 - setmetatile 32, 2, 752, 1 - setmetatile 33, 2, 753, 1 - setmetatile 34, 2, 754, 1 - setmetatile 35, 2, 755, 1 - setmetatile 32, 3, 756, 1 - setmetatile 33, 3, 757, 1 - setmetatile 34, 3, 758, 1 - setmetatile 35, 3, 759, 1 + setmetatile 33, 6, METATILE_BikeShop_Button_Pressed, 0 + setmetatile 32, 2, METATILE_BikeShop_Generator_Off_Tile0, 1 + setmetatile 33, 2, METATILE_BikeShop_Generator_Off_Tile1, 1 + setmetatile 34, 2, METATILE_BikeShop_Generator_Off_Tile2, 1 + setmetatile 35, 2, METATILE_BikeShop_Generator_Off_Tile3, 1 + setmetatile 32, 3, METATILE_BikeShop_Generator_Off_Tile4, 1 + setmetatile 33, 3, METATILE_BikeShop_Generator_Off_Tile5, 1 + setmetatile 34, 3, METATILE_BikeShop_Generator_Off_Tile6, 1 + setmetatile 35, 3, METATILE_BikeShop_Generator_Off_Tile7, 1 special DrawWholeMapView return diff --git a/data/maps/PetalburgCity_Gym/map.json b/data/maps/PetalburgCity_Gym/map.json index 297c58a30..ff317c943 100644 --- a/data/maps/PetalburgCity_Gym/map.json +++ b/data/maps/PetalburgCity_Gym/map.json @@ -25,7 +25,7 @@ "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", "script": "PetalburgCity_Gym_EventScript_2049F1", - "flag": "FLAG_HIDE_PETALYBURG_GYM_NORMAN" + "flag": "FLAG_HIDE_PETALBURG_GYM_NORMAN" }, { "graphics_id": "EVENT_OBJ_GFX_WOMAN_5", diff --git a/data/maps/PetalburgCity_Gym/scripts.inc b/data/maps/PetalburgCity_Gym/scripts.inc index f5d1f3ff6..d37bcfd91 100644 --- a/data/maps/PetalburgCity_Gym/scripts.inc +++ b/data/maps/PetalburgCity_Gym/scripts.inc @@ -1146,51 +1146,51 @@ PetalburgCity_Gym_EventScript_205645:: @ 8205645 return PetalburgCity_Gym_EventScript_205666:: @ 8205666 - setmetatile 6, 85, 528, 0 - setmetatile 7, 85, 529, 0 - setmetatile 1, 98, 528, 0 - setmetatile 2, 98, 529, 0 + setmetatile 6, 85, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 7, 85, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 1, 98, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 2, 98, METATILE_PetalburgGym_RoomEntrance_Right, 0 return PetalburgCity_Gym_EventScript_20568B:: @ 820568B - setmetatile 6, 46, 528, 0 - setmetatile 7, 46, 529, 0 - setmetatile 1, 59, 528, 0 - setmetatile 2, 59, 529, 0 + setmetatile 6, 46, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 7, 46, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 1, 59, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 2, 59, METATILE_PetalburgGym_RoomEntrance_Right, 0 return PetalburgCity_Gym_EventScript_2056B0:: @ 82056B0 - setmetatile 6, 59, 528, 0 - setmetatile 7, 59, 529, 0 - setmetatile 1, 72, 528, 0 - setmetatile 2, 72, 529, 0 + setmetatile 6, 59, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 7, 59, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 1, 72, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 2, 72, METATILE_PetalburgGym_RoomEntrance_Right, 0 return PetalburgCity_Gym_EventScript_2056D5:: @ 82056D5 - setmetatile 1, 20, 528, 0 - setmetatile 2, 20, 529, 0 + setmetatile 1, 20, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 2, 20, METATILE_PetalburgGym_RoomEntrance_Right, 0 return PetalburgCity_Gym_EventScript_2056E8:: @ 82056E8 - setmetatile 6, 20, 528, 0 - setmetatile 7, 20, 529, 0 - setmetatile 1, 33, 528, 0 - setmetatile 2, 33, 529, 0 + setmetatile 6, 20, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 7, 20, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 1, 33, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 2, 33, METATILE_PetalburgGym_RoomEntrance_Right, 0 return PetalburgCity_Gym_EventScript_20570D:: @ 820570D - setmetatile 6, 33, 528, 0 - setmetatile 7, 33, 529, 0 + setmetatile 6, 33, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 7, 33, METATILE_PetalburgGym_RoomEntrance_Right, 0 return PetalburgCity_Gym_EventScript_205720:: @ 8205720 - setmetatile 1, 7, 528, 0 - setmetatile 2, 7, 529, 0 + setmetatile 1, 7, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 2, 7, METATILE_PetalburgGym_RoomEntrance_Right, 0 return PetalburgCity_Gym_EventScript_205733:: @ 8205733 - setmetatile 6, 7, 528, 0 - setmetatile 7, 7, 529, 0 + setmetatile 6, 7, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 7, 7, METATILE_PetalburgGym_RoomEntrance_Right, 0 return PetalburgCity_Gym_EventScript_205746:: @ 8205746 diff --git a/data/maps/Route103/scripts.inc b/data/maps/Route103/scripts.inc index 710f26e7c..0183d385b 100644 --- a/data/maps/Route103/scripts.inc +++ b/data/maps/Route103/scripts.inc @@ -13,8 +13,8 @@ Route103_MapScript1_1EC3A4: @ 81EC3A4 end Route103_EventScript_1EC3AE:: @ 81EC3AE - setmetatile 45, 5, 159, 1 - setmetatile 45, 6, 167, 0 + setmetatile 45, 5, METATILE_General_CaveEntrance_Top, 1 + setmetatile 45, 6, METATILE_General_CaveEntrance_Bottom, 0 return Route103_EventScript_1EC3C1:: @ 81EC3C1 diff --git a/data/maps/Route105/scripts.inc b/data/maps/Route105/scripts.inc index 041a64709..c95511397 100644 --- a/data/maps/Route105/scripts.inc +++ b/data/maps/Route105/scripts.inc @@ -13,8 +13,8 @@ Route105_MapScript1_1EE1EB: @ 81EE1EB end Route105_EventScript_1EE20B:: @ 81EE20B - setmetatile 9, 19, 124, 1 - setmetatile 9, 20, 145, 1 + setmetatile 9, 19, METATILE_General_RockWall_RockBase, 1 + setmetatile 9, 20, METATILE_General_RockWall_SandBase, 1 return Route105_OnTransition: @ 81EE21E diff --git a/data/maps/Route110_TrickHouseEnd/scripts.inc b/data/maps/Route110_TrickHouseEnd/scripts.inc index 1c1aa76b4..52a0f19f5 100644 --- a/data/maps/Route110_TrickHouseEnd/scripts.inc +++ b/data/maps/Route110_TrickHouseEnd/scripts.inc @@ -37,7 +37,7 @@ Route110_TrickHouseEnd_EventScript_26ACFF:: @ 826ACFF end Route110_TrickHouseEnd_EventScript_26AD0D:: @ 826AD0D - setmetatile 10, 1, 539, 1 + setmetatile 10, 1, METATILE_GenericBuilding_TrickHouse_Door_Closed, 1 return Route110_TrickHouseEnd_EventScript_26AD17:: @ 826AD17 diff --git a/data/maps/Route110_TrickHouseEntrance/scripts.inc b/data/maps/Route110_TrickHouseEntrance/scripts.inc index aae615a62..9c2fc3aec 100644 --- a/data/maps/Route110_TrickHouseEntrance/scripts.inc +++ b/data/maps/Route110_TrickHouseEntrance/scripts.inc @@ -503,7 +503,7 @@ Route110_TrickHouseEntrance_EventScript_26A110:: @ 826A110 end Route110_TrickHouseEntrance_EventScript_26A126:: @ 826A126 - setmetatile 5, 1, 537, 0 + setmetatile 5, 1, METATILE_GenericBuilding_TrickHouse_Stairs_Down, 0 special DrawWholeMapView delay 20 applymovement EVENT_OBJ_ID_PLAYER, Route110_TrickHouseEntrance_Movement_2725C9 @@ -609,7 +609,7 @@ Route110_TrickHouseEntrance_EventScript_26A289:: @ 826A289 msgbox Route110_TrickHousePuzzle1_Text_26B98D, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_1_STATE, 2 - setmetatile 13, 1, 523, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 special DrawWholeMapView releaseall end @@ -620,7 +620,7 @@ Route110_TrickHouseEntrance_EventScript_26A2B2:: @ 826A2B2 msgbox Route110_TrickHousePuzzle2_Text_26BCBA, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_2_STATE, 2 - setmetatile 13, 1, 523, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 special DrawWholeMapView releaseall end @@ -631,7 +631,7 @@ Route110_TrickHouseEntrance_EventScript_26A2DB:: @ 826A2DB msgbox Route110_TrickHousePuzzle3_Text_26C609, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_3_STATE, 2 - setmetatile 13, 1, 523, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 special DrawWholeMapView releaseall end @@ -642,7 +642,7 @@ Route110_TrickHouseEntrance_EventScript_26A304:: @ 826A304 msgbox Route110_TrickHousePuzzle4_Text_26C8C3, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_4_STATE, 2 - setmetatile 13, 1, 523, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 special DrawWholeMapView releaseall end @@ -653,7 +653,7 @@ Route110_TrickHouseEntrance_EventScript_26A32D:: @ 826A32D msgbox Route110_TrickHousePuzzle5_Text_26D660, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_5_STATE, 2 - setmetatile 13, 1, 523, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 special DrawWholeMapView releaseall end @@ -664,7 +664,7 @@ Route110_TrickHouseEntrance_EventScript_26A356:: @ 826A356 msgbox Route110_TrickHousePuzzle6_Text_26DE26, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_6_STATE, 2 - setmetatile 13, 1, 523, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 special DrawWholeMapView releaseall end @@ -675,7 +675,7 @@ Route110_TrickHouseEntrance_EventScript_26A37F:: @ 826A37F msgbox Route110_TrickHousePuzzle7_EventScript_26E413, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_7_STATE, 2 - setmetatile 13, 1, 523, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 special DrawWholeMapView releaseall end @@ -686,7 +686,7 @@ Route110_TrickHouseEntrance_EventScript_26A3A8:: @ 826A3A8 msgbox Route110_TrickHousePuzzle8_EventScript_26E864, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_8_STATE, 2 - setmetatile 13, 1, 523, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 special DrawWholeMapView releaseall end diff --git a/data/maps/Route110_TrickHousePuzzle1/scripts.inc b/data/maps/Route110_TrickHousePuzzle1/scripts.inc index 73526d3ee..ef81b03cf 100644 --- a/data/maps/Route110_TrickHousePuzzle1/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle1/scripts.inc @@ -8,7 +8,7 @@ Route110_TrickHousePuzzle1_MapScript1_26B915: @ 826B915 end Route110_TrickHousePuzzle1_EventScript_26B921:: @ 826B921 - setmetatile 13, 1, 523, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 end Route110_TrickHousePuzzle1_EventScript_26B92B:: @ 826B92B diff --git a/data/maps/Route110_TrickHousePuzzle2/scripts.inc b/data/maps/Route110_TrickHousePuzzle2/scripts.inc index 057f6ea32..334637624 100644 --- a/data/maps/Route110_TrickHousePuzzle2/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle2/scripts.inc @@ -70,23 +70,23 @@ Route110_TrickHousePuzzle2_EventScript_26BC16:: @ 826BC16 end Route110_TrickHousePuzzle2_EventScript_26BC29:: @ 826BC29 - setmetatile 11, 12, 601, 0 - setmetatile 1, 13, 618, 0 + setmetatile 11, 12, METATILE_TrickHousePuzzle_Button_Pressed, 0 + setmetatile 1, 13, METATILE_TrickHousePuzzle_Door_Shuttered, 0 return Route110_TrickHousePuzzle2_EventScript_26BC3C:: @ 826BC3C - setmetatile 0, 4, 601, 0 - setmetatile 5, 6, 618, 0 + setmetatile 0, 4, METATILE_TrickHousePuzzle_Button_Pressed, 0 + setmetatile 5, 6, METATILE_TrickHousePuzzle_Door_Shuttered, 0 return Route110_TrickHousePuzzle2_EventScript_26BC4F:: @ 826BC4F - setmetatile 14, 5, 601, 0 - setmetatile 7, 15, 618, 0 + setmetatile 14, 5, METATILE_TrickHousePuzzle_Button_Pressed, 0 + setmetatile 7, 15, METATILE_TrickHousePuzzle_Door_Shuttered, 0 return Route110_TrickHousePuzzle2_EventScript_26BC62:: @ 826BC62 - setmetatile 7, 11, 601, 0 - setmetatile 14, 12, 618, 0 + setmetatile 7, 11, METATILE_TrickHousePuzzle_Button_Pressed, 0 + setmetatile 14, 12, METATILE_TrickHousePuzzle_Door_Shuttered, 0 return Route110_TrickHousePuzzle2_EventScript_26BC75:: @ 826BC75 diff --git a/data/maps/Route110_TrickHousePuzzle3/scripts.inc b/data/maps/Route110_TrickHousePuzzle3/scripts.inc index 48b81e0cc..dfae2d359 100644 --- a/data/maps/Route110_TrickHousePuzzle3/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle3/scripts.inc @@ -21,10 +21,10 @@ Route110_TrickHousePuzzle3_OnTransition: @ 826BEFF end Route110_TrickHousePuzzle3_EventScript_26BF1E:: @ 826BF1E - setmetatile 4, 14, 600, 0 - setmetatile 3, 11, 600, 0 - setmetatile 12, 5, 600, 0 - setmetatile 8, 2, 600, 0 + setmetatile 4, 14, METATILE_TrickHousePuzzle_Button_Up, 0 + setmetatile 3, 11, METATILE_TrickHousePuzzle_Button_Up, 0 + setmetatile 12, 5, METATILE_TrickHousePuzzle_Button_Up, 0 + setmetatile 8, 2, METATILE_TrickHousePuzzle_Button_Up, 0 compare VAR_TEMP_8, 1 call_if_eq Route110_TrickHousePuzzle3_EventScript_26BF6F compare VAR_TEMP_8, 2 @@ -36,173 +36,173 @@ Route110_TrickHousePuzzle3_EventScript_26BF1E:: @ 826BF1E return Route110_TrickHousePuzzle3_EventScript_26BF6F:: @ 826BF6F - setmetatile 4, 14, 601, 0 + setmetatile 4, 14, METATILE_TrickHousePuzzle_Button_Pressed, 0 return Route110_TrickHousePuzzle3_EventScript_26BF79:: @ 826BF79 - setmetatile 3, 11, 601, 0 + setmetatile 3, 11, METATILE_TrickHousePuzzle_Button_Pressed, 0 return Route110_TrickHousePuzzle3_EventScript_26BF83:: @ 826BF83 - setmetatile 12, 5, 601, 0 + setmetatile 12, 5, METATILE_TrickHousePuzzle_Button_Pressed, 0 return Route110_TrickHousePuzzle3_EventScript_26BF8D:: @ 826BF8D - setmetatile 8, 2, 601, 0 + setmetatile 8, 2, METATILE_TrickHousePuzzle_Button_Pressed, 0 return Route110_TrickHousePuzzle3_EventScript_26BF97:: @ 826BF97 - setmetatile 1, 6, 587, 0 - setmetatile 2, 6, 588, 0 - setmetatile 1, 7, 595, 0 - setmetatile 2, 7, 596, 0 - setmetatile 1, 9, 587, 0 - setmetatile 2, 9, 588, 0 - setmetatile 1, 10, 595, 0 - setmetatile 2, 10, 596, 0 - setmetatile 4, 15, 587, 0 - setmetatile 5, 15, 588, 0 - setmetatile 4, 16, 595, 0 - setmetatile 5, 16, 596, 0 - setmetatile 13, 9, 587, 0 - setmetatile 14, 9, 588, 0 - setmetatile 13, 10, 595, 0 - setmetatile 14, 10, 596, 0 - setmetatile 13, 15, 587, 0 - setmetatile 14, 15, 588, 0 - setmetatile 13, 16, 595, 0 - setmetatile 14, 16, 596, 0 - setmetatile 3, 7, 589, 1 - setmetatile 3, 8, 597, 0 - setmetatile 3, 13, 589, 1 - setmetatile 3, 14, 597, 0 - setmetatile 6, 4, 589, 1 - setmetatile 6, 5, 597, 0 - setmetatile 9, 16, 589, 1 - setmetatile 9, 17, 597, 0 - setmetatile 12, 7, 589, 1 - setmetatile 12, 8, 597, 0 - setmetatile 1, 3, 568, 0 - setmetatile 2, 3, 569, 0 - setmetatile 1, 4, 576, 1 - setmetatile 2, 4, 577, 1 - setmetatile 1, 12, 568, 0 - setmetatile 2, 12, 569, 0 - setmetatile 1, 13, 576, 1 - setmetatile 2, 13, 577, 1 - setmetatile 4, 6, 568, 0 - setmetatile 5, 6, 569, 0 - setmetatile 4, 7, 576, 1 - setmetatile 5, 7, 577, 1 - setmetatile 4, 12, 568, 0 - setmetatile 5, 12, 569, 0 - setmetatile 4, 13, 576, 1 - setmetatile 5, 13, 577, 1 - setmetatile 4, 18, 568, 0 - setmetatile 5, 18, 569, 0 - setmetatile 4, 19, 576, 1 - setmetatile 5, 19, 577, 1 - setmetatile 7, 9, 568, 0 - setmetatile 8, 9, 569, 0 - setmetatile 7, 10, 576, 1 - setmetatile 8, 10, 577, 1 - setmetatile 10, 6, 568, 0 - setmetatile 11, 6, 569, 0 - setmetatile 10, 7, 576, 1 - setmetatile 11, 7, 577, 1 - setmetatile 10, 12, 568, 0 - setmetatile 11, 12, 569, 0 - setmetatile 10, 13, 576, 1 - setmetatile 11, 13, 577, 1 - setmetatile 10, 18, 568, 0 - setmetatile 11, 18, 569, 0 - setmetatile 10, 19, 576, 1 - setmetatile 11, 19, 577, 1 - setmetatile 13, 3, 568, 0 - setmetatile 14, 3, 569, 0 - setmetatile 13, 4, 576, 1 - setmetatile 14, 4, 577, 1 - setmetatile 3, 16, 570, 1 - setmetatile 3, 17, 578, 1 - setmetatile 9, 4, 570, 1 - setmetatile 9, 5, 578, 1 + setmetatile 1, 6, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 + setmetatile 2, 6, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 + setmetatile 1, 7, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 + setmetatile 2, 7, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 + setmetatile 1, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 + setmetatile 2, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 + setmetatile 1, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 + setmetatile 2, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 + setmetatile 4, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 + setmetatile 5, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 + setmetatile 4, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 + setmetatile 5, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 + setmetatile 13, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 + setmetatile 14, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 + setmetatile 13, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 + setmetatile 14, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 + setmetatile 13, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 + setmetatile 14, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 + setmetatile 13, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 + setmetatile 14, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 + setmetatile 3, 7, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1 + setmetatile 3, 8, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0 + setmetatile 3, 13, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1 + setmetatile 3, 14, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0 + setmetatile 6, 4, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1 + setmetatile 6, 5, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0 + setmetatile 9, 16, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1 + setmetatile 9, 17, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0 + setmetatile 12, 7, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1 + setmetatile 12, 8, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0 + setmetatile 1, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 + setmetatile 2, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 + setmetatile 1, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 + setmetatile 2, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 + setmetatile 1, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 + setmetatile 2, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 + setmetatile 1, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 + setmetatile 2, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 + setmetatile 4, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 + setmetatile 5, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 + setmetatile 4, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 + setmetatile 5, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 + setmetatile 4, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 + setmetatile 5, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 + setmetatile 4, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 + setmetatile 5, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 + setmetatile 4, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 + setmetatile 5, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 + setmetatile 4, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 + setmetatile 5, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 + setmetatile 7, 9, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 + setmetatile 8, 9, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 + setmetatile 7, 10, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 + setmetatile 8, 10, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 + setmetatile 10, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 + setmetatile 11, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 + setmetatile 10, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 + setmetatile 11, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 + setmetatile 10, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 + setmetatile 11, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 + setmetatile 10, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 + setmetatile 11, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 + setmetatile 10, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 + setmetatile 11, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 + setmetatile 10, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 + setmetatile 11, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 + setmetatile 13, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 + setmetatile 14, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 + setmetatile 13, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 + setmetatile 14, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 + setmetatile 3, 16, METATILE_TrickHousePuzzle_RedDoorV_Open0, 1 + setmetatile 3, 17, METATILE_TrickHousePuzzle_RedDoorV_Open1, 1 + setmetatile 9, 4, METATILE_TrickHousePuzzle_RedDoorV_Open0, 1 + setmetatile 9, 5, METATILE_TrickHousePuzzle_RedDoorV_Open1, 1 return Route110_TrickHousePuzzle3_EventScript_26C232:: @ 826C232 - setmetatile 1, 6, 571, 0 - setmetatile 2, 6, 572, 0 - setmetatile 1, 7, 579, 1 - setmetatile 2, 7, 580, 1 - setmetatile 1, 9, 571, 0 - setmetatile 2, 9, 572, 0 - setmetatile 1, 10, 579, 1 - setmetatile 2, 10, 580, 1 - setmetatile 4, 15, 571, 0 - setmetatile 5, 15, 572, 0 - setmetatile 4, 16, 579, 1 - setmetatile 5, 16, 580, 1 - setmetatile 13, 9, 571, 0 - setmetatile 14, 9, 572, 0 - setmetatile 13, 10, 579, 1 - setmetatile 14, 10, 580, 1 - setmetatile 13, 15, 571, 0 - setmetatile 14, 15, 572, 0 - setmetatile 13, 16, 579, 1 - setmetatile 14, 16, 580, 1 - setmetatile 3, 7, 573, 1 - setmetatile 3, 8, 581, 1 - setmetatile 3, 13, 573, 1 - setmetatile 3, 14, 581, 1 - setmetatile 6, 4, 573, 1 - setmetatile 6, 5, 581, 1 - setmetatile 9, 16, 573, 1 - setmetatile 9, 17, 581, 1 - setmetatile 12, 7, 573, 1 - setmetatile 12, 8, 581, 1 - setmetatile 1, 3, 584, 0 - setmetatile 2, 3, 585, 0 - setmetatile 1, 4, 592, 0 - setmetatile 2, 4, 593, 0 - setmetatile 1, 12, 584, 0 - setmetatile 2, 12, 585, 0 - setmetatile 1, 13, 592, 0 - setmetatile 2, 13, 593, 0 - setmetatile 4, 6, 584, 0 - setmetatile 5, 6, 585, 0 - setmetatile 4, 7, 592, 0 - setmetatile 5, 7, 593, 0 - setmetatile 4, 12, 584, 0 - setmetatile 5, 12, 585, 0 - setmetatile 4, 13, 592, 0 - setmetatile 5, 13, 593, 0 - setmetatile 4, 18, 584, 0 - setmetatile 5, 18, 585, 0 - setmetatile 4, 19, 592, 0 - setmetatile 5, 19, 593, 0 - setmetatile 7, 9, 584, 0 - setmetatile 8, 9, 585, 0 - setmetatile 7, 10, 592, 0 - setmetatile 8, 10, 593, 0 - setmetatile 10, 6, 584, 0 - setmetatile 11, 6, 585, 0 - setmetatile 10, 7, 592, 0 - setmetatile 11, 7, 593, 0 - setmetatile 10, 12, 584, 0 - setmetatile 11, 12, 585, 0 - setmetatile 10, 13, 592, 0 - setmetatile 11, 13, 593, 0 - setmetatile 10, 18, 584, 0 - setmetatile 11, 18, 585, 0 - setmetatile 10, 19, 592, 0 - setmetatile 11, 19, 593, 0 - setmetatile 13, 3, 584, 0 - setmetatile 14, 3, 585, 0 - setmetatile 13, 4, 592, 0 - setmetatile 14, 4, 593, 0 - setmetatile 3, 16, 586, 1 - setmetatile 3, 17, 594, 0 - setmetatile 9, 4, 586, 1 - setmetatile 9, 5, 594, 0 + setmetatile 1, 6, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 + setmetatile 2, 6, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 + setmetatile 1, 7, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 + setmetatile 2, 7, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 + setmetatile 1, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 + setmetatile 2, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 + setmetatile 1, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 + setmetatile 2, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 + setmetatile 4, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 + setmetatile 5, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 + setmetatile 4, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 + setmetatile 5, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 + setmetatile 13, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 + setmetatile 14, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 + setmetatile 13, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 + setmetatile 14, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 + setmetatile 13, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 + setmetatile 14, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 + setmetatile 13, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 + setmetatile 14, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 + setmetatile 3, 7, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1 + setmetatile 3, 8, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1 + setmetatile 3, 13, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1 + setmetatile 3, 14, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1 + setmetatile 6, 4, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1 + setmetatile 6, 5, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1 + setmetatile 9, 16, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1 + setmetatile 9, 17, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1 + setmetatile 12, 7, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1 + setmetatile 12, 8, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1 + setmetatile 1, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 + setmetatile 2, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 + setmetatile 1, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 + setmetatile 2, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 + setmetatile 1, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 + setmetatile 2, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 + setmetatile 1, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 + setmetatile 2, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 + setmetatile 4, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 + setmetatile 5, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 + setmetatile 4, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 + setmetatile 5, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 + setmetatile 4, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 + setmetatile 5, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 + setmetatile 4, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 + setmetatile 5, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 + setmetatile 4, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 + setmetatile 5, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 + setmetatile 4, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 + setmetatile 5, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 + setmetatile 7, 9, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 + setmetatile 8, 9, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 + setmetatile 7, 10, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 + setmetatile 8, 10, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 + setmetatile 10, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 + setmetatile 11, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 + setmetatile 10, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 + setmetatile 11, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 + setmetatile 10, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 + setmetatile 11, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 + setmetatile 10, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 + setmetatile 11, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 + setmetatile 10, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 + setmetatile 11, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 + setmetatile 10, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 + setmetatile 11, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 + setmetatile 13, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 + setmetatile 14, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 + setmetatile 13, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 + setmetatile 14, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 + setmetatile 3, 16, METATILE_TrickHousePuzzle_RedDoorV_Retracted, 1 + setmetatile 3, 17, METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt, 0 + setmetatile 9, 4, METATILE_TrickHousePuzzle_RedDoorV_Retracted, 1 + setmetatile 9, 5, METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt, 0 return Route110_TrickHousePuzzle3_EventScript_26C4CD:: @ 826C4CD diff --git a/data/maps/Route110_TrickHousePuzzle7/scripts.inc b/data/maps/Route110_TrickHousePuzzle7/scripts.inc index 27177ed22..db651d8ce 100644 --- a/data/maps/Route110_TrickHousePuzzle7/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle7/scripts.inc @@ -18,53 +18,53 @@ Route110_TrickHousePuzzle7_EventScript_26E0AC:: @ 826E0AC return Route110_TrickHousePuzzle7_EventScript_26E0DA:: @ 826E0DA - setmetatile 13, 17, 610, 0 - setmetatile 12, 16, 575, 1 + setmetatile 13, 17, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, 0 + setmetatile 12, 16, METATILE_TrickHousePuzzle_Lever_On, 1 return Route110_TrickHousePuzzle7_EventScript_26E0ED:: @ 826E0ED - setmetatile 12, 13, 610, 0 - setmetatile 12, 11, 575, 1 + setmetatile 12, 13, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, 0 + setmetatile 12, 11, METATILE_TrickHousePuzzle_Lever_On, 1 return Route110_TrickHousePuzzle7_EventScript_26E100:: @ 826E100 - setmetatile 7, 12, 610, 0 - setmetatile 5, 10, 575, 1 + setmetatile 7, 12, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, 0 + setmetatile 5, 10, METATILE_TrickHousePuzzle_Lever_On, 1 return Route110_TrickHousePuzzle7_EventScript_26E113:: @ 826E113 - setmetatile 6, 6, 636, 0 - setmetatile 4, 4, 575, 1 + setmetatile 6, 6, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right_Alt, 0 + setmetatile 4, 4, METATILE_TrickHousePuzzle_Lever_On, 1 return Route110_TrickHousePuzzle7_EventScript_26E126:: @ 826E126 - setmetatile 8, 4, 609, 0 - setmetatile 7, 5, 575, 1 + setmetatile 8, 4, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left, 0 + setmetatile 7, 5, METATILE_TrickHousePuzzle_Lever_On, 1 return Route110_TrickHousePuzzle7_EventScript_26E139:: @ 826E139 - setmetatile 13, 17, 611, 0 - setmetatile 12, 16, 574, 1 + setmetatile 13, 17, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down, 0 + setmetatile 12, 16, METATILE_TrickHousePuzzle_Lever_Off, 1 return Route110_TrickHousePuzzle7_EventScript_26E14C:: @ 826E14C - setmetatile 12, 13, 609, 0 - setmetatile 12, 11, 574, 1 + setmetatile 12, 13, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left, 0 + setmetatile 12, 11, METATILE_TrickHousePuzzle_Lever_Off, 1 return Route110_TrickHousePuzzle7_EventScript_26E15F:: @ 826E15F - setmetatile 7, 12, 611, 0 - setmetatile 5, 10, 574, 1 + setmetatile 7, 12, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down, 0 + setmetatile 5, 10, METATILE_TrickHousePuzzle_Lever_Off, 1 return Route110_TrickHousePuzzle7_EventScript_26E172:: @ 826E172 - setmetatile 6, 6, 635, 0 - setmetatile 4, 4, 574, 1 + setmetatile 6, 6, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left_Alt, 0 + setmetatile 4, 4, METATILE_TrickHousePuzzle_Lever_Off, 1 return Route110_TrickHousePuzzle7_EventScript_26E185:: @ 826E185 - setmetatile 8, 4, 608, 0 - setmetatile 7, 5, 574, 1 + setmetatile 8, 4, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right, 0 + setmetatile 7, 5, METATILE_TrickHousePuzzle_Lever_Off, 1 return Route110_TrickHousePuzzle7_OnTransition: @ 826E198 diff --git a/data/maps/Route111/scripts.inc b/data/maps/Route111/scripts.inc index 8371071da..bf79c5eee 100644 --- a/data/maps/Route111/scripts.inc +++ b/data/maps/Route111/scripts.inc @@ -12,29 +12,29 @@ Route111_MapScript1_1F0CBC: @ 81F0CBC end Route111_EventScript_1F0CD1:: @ 81F0CD1 - setmetatile 29, 86, 124, 1 - setmetatile 29, 87, 145, 1 + setmetatile 29, 86, METATILE_General_RockWall_RockBase, 1 + setmetatile 29, 87, METATILE_General_RockWall_SandBase, 1 return Route111_EventScript_1F0CE4:: @ 81F0CE4 - setmetatile 18, 53, 984, 0 - setmetatile 19, 53, 985, 0 - setmetatile 20, 53, 986, 0 - setmetatile 18, 54, 992, 0 - setmetatile 19, 54, 993, 0 - setmetatile 20, 54, 994, 0 - setmetatile 18, 55, 1000, 0 - setmetatile 19, 55, 1001, 0 - setmetatile 20, 55, 1002, 0 - setmetatile 18, 56, 1008, 0 - setmetatile 19, 56, 1009, 0 - setmetatile 20, 56, 1010, 0 - setmetatile 18, 57, 987, 0 - setmetatile 19, 57, 988, 0 - setmetatile 20, 57, 989, 0 - setmetatile 18, 58, 995, 0 - setmetatile 19, 58, 996, 0 - setmetatile 20, 58, 997, 0 + setmetatile 18, 53, METATILE_Mauville_MirageTower_Tile0, 0 + setmetatile 19, 53, METATILE_Mauville_MirageTower_Tile1, 0 + setmetatile 20, 53, METATILE_Mauville_MirageTower_Tile2, 0 + setmetatile 18, 54, METATILE_Mauville_MirageTower_Tile3, 0 + setmetatile 19, 54, METATILE_Mauville_MirageTower_Tile4, 0 + setmetatile 20, 54, METATILE_Mauville_MirageTower_Tile5, 0 + setmetatile 18, 55, METATILE_Mauville_MirageTower_Tile6, 0 + setmetatile 19, 55, METATILE_Mauville_MirageTower_Tile7, 0 + setmetatile 20, 55, METATILE_Mauville_MirageTower_Tile8, 0 + setmetatile 18, 56, METATILE_Mauville_MirageTower_Tile9, 0 + setmetatile 19, 56, METATILE_Mauville_MirageTower_TileA, 0 + setmetatile 20, 56, METATILE_Mauville_MirageTower_TileB, 0 + setmetatile 18, 57, METATILE_Mauville_MirageTower_TileC, 0 + setmetatile 19, 57, METATILE_Mauville_MirageTower_TileD, 0 + setmetatile 20, 57, METATILE_Mauville_MirageTower_TileE, 0 + setmetatile 18, 58, METATILE_Mauville_MirageTower_TileF, 0 + setmetatile 19, 58, METATILE_Mauville_MirageTower_Tile10, 0 + setmetatile 20, 58, METATILE_Mauville_MirageTower_Tile11, 0 return Route111_OnTransition: @ 81F0D87 diff --git a/data/maps/Route114_FossilManiacsTunnel/scripts.inc b/data/maps/Route114_FossilManiacsTunnel/scripts.inc index 8cfd754a3..3de7350ac 100644 --- a/data/maps/Route114_FossilManiacsTunnel/scripts.inc +++ b/data/maps/Route114_FossilManiacsTunnel/scripts.inc @@ -17,8 +17,8 @@ Route114_FossilManiacsTunnel_MapScript1_22AF49: @ 822AF49 end Route114_FossilManiacsTunnel_EventScript_22AF53:: @ 822AF53 - setmetatile 6, 1, 617, 1 - setmetatile 6, 2, 617, 1 + setmetatile 6, 1, METATILE_Fallarbor_RedRockWall, 1 + setmetatile 6, 2, METATILE_Fallarbor_RedRockWall, 1 return Route114_FossilManiacsTunnel_EventScript_22AF66:: @ 822AF66 diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc index 1a9ccfa7e..d5a2de5ce 100644 --- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc @@ -83,7 +83,7 @@ Route119_WeatherInstitute_2F_EventScript_26FFC8:: @ 826FFC8 Route119_WeatherInstitute_2F_EventScript_27004D:: @ 827004D msgbox Route119_WeatherInstitute_2F_Text_270650, MSGBOX_DEFAULT - setvar VAR_TEMP_1, 385 + setvar VAR_TEMP_1, SPECIES_CASTFORM givemon SPECIES_CASTFORM, 25, ITEM_MYSTIC_WATER, 0x0, 0x0, 0 compare VAR_RESULT, 0 goto_if_eq Route119_WeatherInstitute_2F_EventScript_270085 diff --git a/data/maps/Route120/scripts.inc b/data/maps/Route120/scripts.inc index 1268b9965..fdd302fdb 100644 --- a/data/maps/Route120/scripts.inc +++ b/data/maps/Route120/scripts.inc @@ -45,15 +45,15 @@ Route120_MapScript1_1F5474: @ 81F5474 end Route120_EventScript_1F5490:: @ 81F5490 - setmetatile 7, 54, 124, 1 - setmetatile 7, 55, 145, 1 + setmetatile 7, 54, METATILE_General_RockWall_RockBase, 1 + setmetatile 7, 55, METATILE_General_RockWall_SandBase, 1 return Route120_EventScript_1F54A3:: @ 81F54A3 - setmetatile 13, 15, 663, 0 - setmetatile 12, 16, 671, 0 - setmetatile 12, 17, 161, 0 - setmetatile 13, 17, 161, 0 + setmetatile 13, 15, METATILE_Fortree_WoodBridge_Kecleon0, 0 + setmetatile 12, 16, METATILE_Fortree_WoodBridge_Kecleon1, 0 + setmetatile 12, 17, METATILE_General_ReflectiveWater, 0 + setmetatile 13, 17, METATILE_General_ReflectiveWater, 0 return Route120_EventScript_1F54C8:: @ 81F54C8 @@ -249,10 +249,10 @@ Route120_EventScript_1F572C:: @ 81F572C delay 15 removeobject 31 waitfieldeffect FLDEFF_NPCFLY_OUT - setmetatile 13, 15, 663, 0 - setmetatile 12, 16, 671, 0 - setmetatile 12, 17, 161, 0 - setmetatile 13, 17, 161, 0 + setmetatile 13, 15, METATILE_Fortree_WoodBridge_Kecleon0, 0 + setmetatile 12, 16, METATILE_Fortree_WoodBridge_Kecleon1, 0 + setmetatile 12, 17, METATILE_General_ReflectiveWater, 0 + setmetatile 13, 17, METATILE_General_ReflectiveWater, 0 special DrawWholeMapView release end diff --git a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc index dfcd03dc6..8549d1644 100644 --- a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc +++ b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc @@ -156,7 +156,7 @@ RustboroCity_DevonCorp_2F_EventScript_211A2C:: @ 8211A2C end RustboroCity_DevonCorp_2F_EventScript_211A3E:: @ 8211A3E - setvar VAR_TEMP_1, 388 + setvar VAR_TEMP_1, SPECIES_LILEEP givemon SPECIES_LILEEP, 20, ITEM_NONE, 0x0, 0x0, 0 compare VAR_RESULT, 0 goto_if_eq RustboroCity_DevonCorp_2F_EventScript_211A6E @@ -205,7 +205,7 @@ RustboroCity_DevonCorp_2F_EventScript_211AD7:: @ 8211AD7 end RustboroCity_DevonCorp_2F_EventScript_211AE1:: @ 8211AE1 - setvar VAR_TEMP_1, 390 + setvar VAR_TEMP_1, SPECIES_ANORITH givemon SPECIES_ANORITH, 20, ITEM_NONE, 0x0, 0x0, 0 compare VAR_RESULT, 0 goto_if_eq RustboroCity_DevonCorp_2F_EventScript_211B11 diff --git a/data/maps/SealedChamber_OuterRoom/scripts.inc b/data/maps/SealedChamber_OuterRoom/scripts.inc index 30228fda0..865be8963 100644 --- a/data/maps/SealedChamber_OuterRoom/scripts.inc +++ b/data/maps/SealedChamber_OuterRoom/scripts.inc @@ -18,12 +18,12 @@ SealedChamber_OuterRoom_MapScript1_23912B: @ 823912B end SealedChamber_OuterRoom_EventScript_239135:: @ 8239135 - setmetatile 9, 1, 553, 1 - setmetatile 10, 1, 553, 1 - setmetatile 11, 1, 553, 1 - setmetatile 9, 2, 565, 1 - setmetatile 10, 2, 565, 1 - setmetatile 11, 2, 565, 1 + setmetatile 9, 1, METATILE_Cave_EntranceCover, 1 + setmetatile 10, 1, METATILE_Cave_EntranceCover, 1 + setmetatile 11, 1, METATILE_Cave_EntranceCover, 1 + setmetatile 9, 2, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 10, 2, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 11, 2, METATILE_Cave_SealedChamberBraille_Mid, 1 return SealedChamber_OuterRoom_EventScript_23916C:: @ 823916C diff --git a/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc b/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc index 300d06317..c7f296319 100644 --- a/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc +++ b/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc @@ -22,38 +22,38 @@ ShoalCave_LowTideInnerRoom_MapScript1_236F16: @ 8236F16 ShoalCave_LowTideInnerRoom_EventScript_236F1C:: @ 8236F1C goto_if_set FLAG_RECEIVED_SHOAL_SALT_1, ShoalCave_LowTideInnerRoom_EventScript_236F3D goto_if_set FLAG_SYS_SHOAL_TIDE, ShoalCave_LowTideInnerRoom_EventScript_236F3D - setmetatile 31, 8, 856, 1 + setmetatile 31, 8, METATILE_Cave_ShoalCave_DirtPile_Large, 1 goto ShoalCave_LowTideInnerRoom_EventScript_236F3D end ShoalCave_LowTideInnerRoom_EventScript_236F3D:: @ 8236F3D goto_if_set FLAG_RECEIVED_SHOAL_SALT_2, ShoalCave_LowTideInnerRoom_EventScript_236F5E goto_if_set FLAG_SYS_SHOAL_TIDE, ShoalCave_LowTideInnerRoom_EventScript_236F5E - setmetatile 14, 26, 856, 1 + setmetatile 14, 26, METATILE_Cave_ShoalCave_DirtPile_Large, 1 goto ShoalCave_LowTideInnerRoom_EventScript_236F5E end ShoalCave_LowTideInnerRoom_EventScript_236F5E:: @ 8236F5E goto_if_set FLAG_RECEIVED_SHOAL_SHELL_1, ShoalCave_LowTideInnerRoom_EventScript_236F76 - setmetatile 41, 20, 857, 1 + setmetatile 41, 20, METATILE_Cave_ShoalCave_BlueStone_Large, 1 goto ShoalCave_LowTideInnerRoom_EventScript_236F76 end ShoalCave_LowTideInnerRoom_EventScript_236F76:: @ 8236F76 goto_if_set FLAG_RECEIVED_SHOAL_SHELL_2, ShoalCave_LowTideInnerRoom_EventScript_236F8E - setmetatile 41, 10, 857, 1 + setmetatile 41, 10, METATILE_Cave_ShoalCave_BlueStone_Large, 1 goto ShoalCave_LowTideInnerRoom_EventScript_236F8E end ShoalCave_LowTideInnerRoom_EventScript_236F8E:: @ 8236F8E goto_if_set FLAG_RECEIVED_SHOAL_SHELL_3, ShoalCave_LowTideInnerRoom_EventScript_236FA6 - setmetatile 6, 9, 857, 1 + setmetatile 6, 9, METATILE_Cave_ShoalCave_BlueStone_Large, 1 goto ShoalCave_LowTideInnerRoom_EventScript_236FA6 end ShoalCave_LowTideInnerRoom_EventScript_236FA6:: @ 8236FA6 goto_if_set FLAG_RECEIVED_SHOAL_SHELL_4, ShoalCave_LowTideInnerRoom_EventScript_236FB9 - setmetatile 16, 13, 857, 1 + setmetatile 16, 13, METATILE_Cave_ShoalCave_BlueStone_Large, 1 return ShoalCave_LowTideInnerRoom_EventScript_236FB9:: @ 8236FB9 @@ -65,7 +65,7 @@ ShoalCave_LowTideInnerRoom_EventScript_236FBA:: @ 8236FBA giveitem_std ITEM_SHOAL_SHELL compare VAR_RESULT, 0 goto_if_eq Common_EventScript_ShowBagIsFull - setmetatile 41, 20, 859, 0 + setmetatile 41, 20, METATILE_Cave_ShoalCave_BlueStone_Small, 0 special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SHELL_1 releaseall @@ -82,7 +82,7 @@ ShoalCave_LowTideInnerRoom_EventScript_236FF6:: @ 8236FF6 giveitem_std ITEM_SHOAL_SHELL compare VAR_RESULT, 0 goto_if_eq Common_EventScript_ShowBagIsFull - setmetatile 41, 10, 859, 0 + setmetatile 41, 10, METATILE_Cave_ShoalCave_BlueStone_Small, 0 special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SHELL_2 releaseall @@ -94,7 +94,7 @@ ShoalCave_LowTideInnerRoom_EventScript_237028:: @ 8237028 giveitem_std ITEM_SHOAL_SHELL compare VAR_RESULT, 0 goto_if_eq Common_EventScript_ShowBagIsFull - setmetatile 6, 9, 859, 0 + setmetatile 6, 9, METATILE_Cave_ShoalCave_BlueStone_Small, 0 special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SHELL_3 releaseall @@ -106,7 +106,7 @@ ShoalCave_LowTideInnerRoom_EventScript_23705A:: @ 823705A giveitem_std ITEM_SHOAL_SHELL compare VAR_RESULT, 0 goto_if_eq Common_EventScript_ShowBagIsFull - setmetatile 16, 13, 859, 0 + setmetatile 16, 13, METATILE_Cave_ShoalCave_BlueStone_Small, 0 special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SHELL_4 releaseall @@ -118,7 +118,7 @@ ShoalCave_LowTideInnerRoom_EventScript_23708C:: @ 823708C giveitem_std ITEM_SHOAL_SALT compare VAR_RESULT, 0 goto_if_eq Common_EventScript_ShowBagIsFull - setmetatile 31, 8, 858, 0 + setmetatile 31, 8, METATILE_Cave_ShoalCave_DirtPile_Small, 0 special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SALT_1 releaseall @@ -135,7 +135,7 @@ ShoalCave_LowTideInnerRoom_EventScript_2370C8:: @ 82370C8 giveitem_std ITEM_SHOAL_SALT compare VAR_RESULT, 0 goto_if_eq Common_EventScript_ShowBagIsFull - setmetatile 14, 26, 858, 0 + setmetatile 14, 26, METATILE_Cave_ShoalCave_DirtPile_Small, 0 special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SALT_2 releaseall diff --git a/data/maps/SkyPillar_Outside/scripts.inc b/data/maps/SkyPillar_Outside/scripts.inc index ffc581fd4..9ff7dd01e 100644 --- a/data/maps/SkyPillar_Outside/scripts.inc +++ b/data/maps/SkyPillar_Outside/scripts.inc @@ -24,8 +24,8 @@ SkyPillar_Outside_MapScript1_2392DD: @ 82392DD end SkyPillar_Outside_EventScript_2392E7:: @ 82392E7 - setmetatile 14, 4, 682, 0 - setmetatile 14, 5, 690, 0 + setmetatile 14, 4, METATILE_Pacifidlog_SkyPillar_DoorOpen_Top, 0 + setmetatile 14, 5, METATILE_Pacifidlog_SkyPillar_DoorOpen_Bottom, 0 return SkyPillar_Outside_MapScript2_2392FA: @ 82392FA diff --git a/data/maps/SlateportCity/scripts.inc b/data/maps/SlateportCity/scripts.inc index f537694dd..e2a3f5d93 100644 --- a/data/maps/SlateportCity/scripts.inc +++ b/data/maps/SlateportCity/scripts.inc @@ -1372,4 +1372,4 @@ SlateportCity_Text_1DF28C: @ 81DF28C .string "That's a really great idea!\p" .string "After all, a tough TRAINER is\n" .string "the perfect fit for the BATTLE TENT!\p" - .string "Give it your best effort!$"
\ No newline at end of file + .string "Give it your best effort!$" diff --git a/data/maps/SlateportCity_House1/scripts.inc b/data/maps/SlateportCity_House1/scripts.inc index 155081a1b..0a5808820 100644 --- a/data/maps/SlateportCity_House1/scripts.inc +++ b/data/maps/SlateportCity_House1/scripts.inc @@ -58,7 +58,7 @@ SlateportCity_House1_EventScript_209B50:: @ 8209B50 SlateportCity_House1_EventScript_209B5A:: @ 8209B5A msgbox SlateportCity_House1_Text_209CA4, MSGBOX_DEFAULT call Common_EventScript_NameReceivedPokemon - specialvar VAR_RESULT, TV_PutNameRaterShowOnTheAirIfNicnkameChanged + specialvar VAR_RESULT, TV_PutNameRaterShowOnTheAirIfNicknameChanged special TV_CopyNicknameToStringVar1AndEnsureTerminated compare VAR_RESULT, 1 goto_if_eq SlateportCity_House1_EventScript_209B84 diff --git a/data/maps/SootopolisCity/scripts.inc b/data/maps/SootopolisCity/scripts.inc index afad44536..ca562a87c 100644 --- a/data/maps/SootopolisCity/scripts.inc +++ b/data/maps/SootopolisCity/scripts.inc @@ -16,19 +16,19 @@ SootopolisCity_EventScript_1E5692:: @ 81E5692 end SootopolisCity_EventScript_1E5693:: @ 81E5693 - setmetatile 9, 6, 584, 1 - setmetatile 9, 17, 584, 1 - setmetatile 9, 26, 584, 1 - setmetatile 44, 17, 584, 1 - setmetatile 8, 35, 584, 1 - setmetatile 53, 28, 584, 1 - setmetatile 45, 6, 584, 1 - setmetatile 48, 25, 584, 1 - setmetatile 51, 36, 584, 1 + setmetatile 9, 6, METATILE_Sootopolis_Door_Closed, 1 + setmetatile 9, 17, METATILE_Sootopolis_Door_Closed, 1 + setmetatile 9, 26, METATILE_Sootopolis_Door_Closed, 1 + setmetatile 44, 17, METATILE_Sootopolis_Door_Closed, 1 + setmetatile 8, 35, METATILE_Sootopolis_Door_Closed, 1 + setmetatile 53, 28, METATILE_Sootopolis_Door_Closed, 1 + setmetatile 45, 6, METATILE_Sootopolis_Door_Closed, 1 + setmetatile 48, 25, METATILE_Sootopolis_Door_Closed, 1 + setmetatile 51, 36, METATILE_Sootopolis_Door_Closed, 1 return SootopolisCity_EventScript_1E56E5:: @ 81E56E5 - setmetatile 31, 32, 592, 1 + setmetatile 31, 32, METATILE_Sootopolis_GymDoor_Closed, 1 return SootopolisCity_OnTransition: @ 81E56EF @@ -603,30 +603,30 @@ SootopolisCity_EventScript_1E5CCE:: @ 81E5CCE end SootopolisCity_EventScript_1E5D82:: @ 81E5D82 - setmetatile 27, 43, 656, 0 - setmetatile 28, 43, 656, 0 - setmetatile 29, 43, 656, 0 - setmetatile 30, 43, 656, 0 - setmetatile 27, 44, 656, 0 - setmetatile 28, 44, 656, 0 - setmetatile 29, 44, 656, 0 - setmetatile 30, 44, 656, 0 - setmetatile 27, 45, 656, 0 - setmetatile 28, 45, 656, 0 - setmetatile 29, 45, 656, 0 - setmetatile 30, 45, 656, 0 - setmetatile 32, 43, 656, 0 - setmetatile 33, 43, 656, 0 - setmetatile 34, 43, 656, 0 - setmetatile 35, 43, 656, 0 - setmetatile 32, 44, 656, 0 - setmetatile 33, 44, 656, 0 - setmetatile 34, 44, 656, 0 - setmetatile 35, 44, 656, 0 - setmetatile 32, 45, 656, 0 - setmetatile 33, 45, 656, 0 - setmetatile 34, 45, 656, 0 - setmetatile 35, 45, 656, 0 + setmetatile 27, 43, METATILE_Sootopolis_RoughWater, 0 + setmetatile 28, 43, METATILE_Sootopolis_RoughWater, 0 + setmetatile 29, 43, METATILE_Sootopolis_RoughWater, 0 + setmetatile 30, 43, METATILE_Sootopolis_RoughWater, 0 + setmetatile 27, 44, METATILE_Sootopolis_RoughWater, 0 + setmetatile 28, 44, METATILE_Sootopolis_RoughWater, 0 + setmetatile 29, 44, METATILE_Sootopolis_RoughWater, 0 + setmetatile 30, 44, METATILE_Sootopolis_RoughWater, 0 + setmetatile 27, 45, METATILE_Sootopolis_RoughWater, 0 + setmetatile 28, 45, METATILE_Sootopolis_RoughWater, 0 + setmetatile 29, 45, METATILE_Sootopolis_RoughWater, 0 + setmetatile 30, 45, METATILE_Sootopolis_RoughWater, 0 + setmetatile 32, 43, METATILE_Sootopolis_RoughWater, 0 + setmetatile 33, 43, METATILE_Sootopolis_RoughWater, 0 + setmetatile 34, 43, METATILE_Sootopolis_RoughWater, 0 + setmetatile 35, 43, METATILE_Sootopolis_RoughWater, 0 + setmetatile 32, 44, METATILE_Sootopolis_RoughWater, 0 + setmetatile 33, 44, METATILE_Sootopolis_RoughWater, 0 + setmetatile 34, 44, METATILE_Sootopolis_RoughWater, 0 + setmetatile 35, 44, METATILE_Sootopolis_RoughWater, 0 + setmetatile 32, 45, METATILE_Sootopolis_RoughWater, 0 + setmetatile 33, 45, METATILE_Sootopolis_RoughWater, 0 + setmetatile 34, 45, METATILE_Sootopolis_RoughWater, 0 + setmetatile 35, 45, METATILE_Sootopolis_RoughWater, 0 return SootopolisCity_Movement_1E5E5B: @ 81E5E5B diff --git a/data/maps/SootopolisCity_Gym_1F/scripts.inc b/data/maps/SootopolisCity_Gym_1F/scripts.inc index e9b5d327f..2991cc482 100644 --- a/data/maps/SootopolisCity_Gym_1F/scripts.inc +++ b/data/maps/SootopolisCity_Gym_1F/scripts.inc @@ -25,16 +25,16 @@ SootopolisCity_Gym_1F_EventScript_224E73:: @ 8224E73 goto_if_lt SootopolisCity_Gym_1F_EventScript_224EB8 compare VAR_ICE_STEP_COUNT, 67 goto_if_lt SootopolisCity_Gym_1F_EventScript_224EA6 - setmetatile 8, 4, 519, 0 - setmetatile 8, 5, 519, 0 + setmetatile 8, 4, METATILE_SootopolisGym_Stairs, 0 + setmetatile 8, 5, METATILE_SootopolisGym_Stairs, 0 SootopolisCity_Gym_1F_EventScript_224EA6:: @ 8224EA6 - setmetatile 8, 10, 519, 0 - setmetatile 8, 11, 519, 0 + setmetatile 8, 10, METATILE_SootopolisGym_Stairs, 0 + setmetatile 8, 11, METATILE_SootopolisGym_Stairs, 0 SootopolisCity_Gym_1F_EventScript_224EB8:: @ 8224EB8 - setmetatile 8, 15, 519, 0 - setmetatile 8, 16, 519, 0 + setmetatile 8, 15, METATILE_SootopolisGym_Stairs, 0 + setmetatile 8, 16, METATILE_SootopolisGym_Stairs, 0 SootopolisCity_Gym_1F_EventScript_224ECA:: @ 8224ECA return diff --git a/data/maps/TrainerHill_Entrance/scripts.inc b/data/maps/TrainerHill_Entrance/scripts.inc index 60dc2149a..5be00aa9d 100644 --- a/data/maps/TrainerHill_Entrance/scripts.inc +++ b/data/maps/TrainerHill_Entrance/scripts.inc @@ -50,7 +50,7 @@ TrainerHill_Entrance_MapScript1_268128: @ 8268128 end TrainerHill_Entrance_EventScript_268134:: @ 8268134 - setmetatile 17, 10, 775, 0 + setmetatile 17, 10, METATILE_TrainerHill_GreenFloorTile, 0 return TrainerHill_Entrance_MapScript2_26813E: @ 826813E @@ -64,7 +64,7 @@ TrainerHill_Entrance_EventScript_268160:: @ 8268160 lockall applymovement EVENT_OBJ_ID_PLAYER, TrainerHill_Entrance_Movement_268385 waitmovement 0 - setmetatile 17, 10, 820, 1 + setmetatile 17, 10, METATILE_TrainerHill_CounterDoor, 1 special DrawWholeMapView playse SE_TK_KASYA waitse diff --git a/data/maps/Underwater_SeafloorCavern/scripts.inc b/data/maps/Underwater_SeafloorCavern/scripts.inc index 3e7c1e22c..ca94964cf 100644 --- a/data/maps/Underwater_SeafloorCavern/scripts.inc +++ b/data/maps/Underwater_SeafloorCavern/scripts.inc @@ -18,18 +18,18 @@ Underwater_SeafloorCavern_MapScript1_23435C: @ 823435C end Underwater_SeafloorCavern_EventScript_234366:: @ 8234366 - setmetatile 5, 3, 542, 1 - setmetatile 6, 3, 542, 1 - setmetatile 7, 3, 542, 1 - setmetatile 8, 3, 542, 1 - setmetatile 5, 4, 552, 0 - setmetatile 6, 4, 552, 0 - setmetatile 7, 4, 552, 0 - setmetatile 8, 4, 552, 0 - setmetatile 5, 5, 552, 0 - setmetatile 6, 5, 552, 0 - setmetatile 7, 5, 552, 0 - setmetatile 8, 5, 552, 0 + setmetatile 5, 3, METATILE_Underwater_RockWall, 1 + setmetatile 6, 3, METATILE_Underwater_RockWall, 1 + setmetatile 7, 3, METATILE_Underwater_RockWall, 1 + setmetatile 8, 3, METATILE_Underwater_RockWall, 1 + setmetatile 5, 4, METATILE_Underwater_FloorShadow, 0 + setmetatile 6, 4, METATILE_Underwater_FloorShadow, 0 + setmetatile 7, 4, METATILE_Underwater_FloorShadow, 0 + setmetatile 8, 4, METATILE_Underwater_FloorShadow, 0 + setmetatile 5, 5, METATILE_Underwater_FloorShadow, 0 + setmetatile 6, 5, METATILE_Underwater_FloorShadow, 0 + setmetatile 7, 5, METATILE_Underwater_FloorShadow, 0 + setmetatile 8, 5, METATILE_Underwater_FloorShadow, 0 return Underwater_SeafloorCavern_MapScript1_2343D3: @ 82343D3 diff --git a/data/pokenav.s b/data/pokenav.s deleted file mode 100644 index 81ee9024d..000000000 --- a/data/pokenav.s +++ /dev/null @@ -1,1765 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - -// pokenav_unk_2.s -gUnknown_0861FC78:: @ 861FC78 - .incbin "graphics/pokenav/bg.gbapal" - -gUnknown_0861FC98:: @ 861FC98 - .incbin "graphics/pokenav/bg.4bpp.lz" - -gUnknown_0861FCAC:: @ 861FCAC - .incbin "graphics/pokenav/bg.bin.lz" - -gUnknown_0861FD4C:: @ 861FD4C - .incbin "graphics/pokenav/outline.gbapal" - -gUnknown_0861FD6C:: @ 861FD6C - .incbin "graphics/pokenav/outline.4bpp.lz" - -gUnknown_0861FFF4:: @ 861FFF4 - .incbin "graphics/pokenav/outline_map.bin.lz" - -gUnknown_08620104:: @ 8620104 - .incbin "graphics/pokenav/blue_light.gbapal" - -gUnknown_08620124:: @ 8620124 - .incbin "graphics/pokenav/blue_light.4bpp.lz" - -gUnknown_08620194:: @ 8620194 - .byte 0xF5, 0x10, 0, 0, 0x7A, 0x21, 0, 0, 0xFF, 0x31, 0, 0 - -gUnknown_086201A0:: @ 86201A0 - .4byte NULL - .4byte sub_81C9C6C - .4byte sub_81C9CA8 - .4byte sub_81C9D44 - .4byte sub_81C9DD8 - .4byte sub_81C9E58 - .4byte sub_81C9EC8 - .4byte sub_81C9EF8 - .4byte sub_81C9F28 - -gUnknown_086201C4:: @ 86201C4 - .4byte gPokenavOptions_Gfx - .byte 0, 0x34, 3, 0 - .4byte gUnknown_08620124 - .byte 0, 1, 1, 0 - -gUnknown_086201D4:: @ 86201D4 - .4byte gPokenavOptions_Pal + 0x0, 4 - .4byte gPokenavOptions_Pal + 0x20, 5 - .4byte gPokenavOptions_Pal + 0x40, 6 - .4byte gPokenavOptions_Pal + 0x60, 7 - .4byte gPokenavOptions_Pal + 0x80, 8 - .4byte gUnknown_08620104, 3 - .4byte 0, 0 - -gUnknown_0862020C:: @ 862020C - .2byte 0, 0 - -gUnknown_08620210:: @ 8620210 - .2byte 0x20, 1 - -gUnknown_08620214:: @ 8620214 - .2byte 0x40, 4 - -gUnknown_08620218:: @ 8620218 - .2byte 0x60, 2 - -gUnknown_0862021C:: @ 862021C - .2byte 0x80, 3 - -gUnknown_08620220:: @ 8620220 - .2byte 0xA0, 1 - -gUnknown_08620224:: @ 8620224 - .2byte 0xC0, 1 - -gUnknown_08620228:: @ 8620228 - .2byte 0xE0, 4 - -gUnknown_0862022C:: @ 862022C - .2byte 0x100, 1 - -gUnknown_08620230:: @ 8620230 - .2byte 0x120, 2 - -gUnknown_08620234:: @ 8620234 - .2byte 0x140, 0 - -gUnknown_08620238:: @ 8620238 - .2byte 0x160, 0 - -gUnknown_0862023C:: @ 862023C - .2byte 0x180, 3 - -gUnknown_08620240:: @ 8620240 - .2byte 0x2A, 0x14 - -gUnknown_08620244:: @ 8620244 - .4byte gUnknown_0862020C - .4byte gUnknown_08620210 - .4byte gUnknown_0862021C - .4byte NULL - .4byte NULL - .4byte NULL - .2byte 0x2A, 0x14 - .4byte gUnknown_0862020C - .4byte gUnknown_08620210 - .4byte gUnknown_08620214 - .4byte gUnknown_0862021C - .4byte NULL - .4byte NULL - .2byte 0x2A, 0x14 - .4byte gUnknown_0862020C - .4byte gUnknown_08620210 - .4byte gUnknown_08620214 - .4byte gUnknown_08620218 - .4byte gUnknown_0862021C - .4byte NULL - .2byte 0x38, 0x14 - .4byte gUnknown_08620220 - .4byte gUnknown_08620224 - .4byte gUnknown_0862023C - .4byte NULL - .4byte NULL - .4byte NULL - .2byte 0x28, 0x10 - .4byte gUnknown_08620228 - .4byte gUnknown_0862022C - .4byte gUnknown_08620230 - .4byte gUnknown_08620234 - .4byte gUnknown_08620238 - .4byte gUnknown_0862023C - -gUnknown_086202CC:: @ 86202CC - window_template 1, 3, 17, 0x18, 2, 1, 8 - -gUnknown_086202D4:: @ 86202D4 - .4byte gUnknown_085EBCC5 - .4byte gUnknown_085EBCE8 - .4byte gUnknown_085EBD01 - .4byte gUnknown_085EBD1C - .4byte gUnknown_085EBD34 - .4byte gUnknown_085EBD83 - .4byte gUnknown_085EBDA2 - .4byte gUnknown_085EBDBF - .4byte gUnknown_085EBDDB - .4byte gUnknown_085EBDEE - .4byte gUnknown_085EBE06 - .4byte gUnknown_085EBE19 - .4byte gUnknown_085EBE2D - .4byte gUnknown_085EBE41 - -gUnknown_0862030C:: @ 862030C - .byte 6, 8, 7 - -gUnknown_0862030F:: @ 862030F - .byte 6, 8, 7, 0, 0 - -gUnknown_08620314:: @ 8620314 - .byte 0, 0x40, 0, 0x80, 0, 8, 0, 0 - -gUnknown_0862031C:: @ 862031C - obj_rot_scal_anim_frame 0x100, 0x100, 0, 0 - obj_rot_scal_anim_end - -gUnknown_0862032C:: @ 862032C - obj_rot_scal_anim_frame 0x100, 0x100, 0, 0 - obj_rot_scal_anim_frame 0x10, 0x10, 0, 0x12 - obj_rot_scal_anim_end - -gUnknown_08620344:: @ 8620344 - .4byte gUnknown_0862031C - .4byte gUnknown_0862032C - -gUnknown_0862034C:: @ 862034C - spr_template 3, 4, gUnknown_08620314, gDummySpriteAnimTable, NULL, gUnknown_08620344, SpriteCallbackDummy - -gUnknown_08620364:: @ 8620364 - .2byte 0x4000 - .2byte 0x8000 - .2byte 0x800 - .2byte 0 - -gUnknown_0862036C:: @ 862036C - spr_template 1, 3, gUnknown_08620364, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy - -gUnknown_08620384:: @ 8620384 - .4byte 0x4000040 - .4byte 0xa2600001 - .byte 1, 0, 0, 0 - -// pokenav_unk_3.s -gUnknown_08620390:: @ 8620390 - .string "Becalm fighting emotions.$" - -gUnknown_086203AA:: @ 86203AA - .string "Fragrant GRASS POKéMON.$" - -gUnknown_086203C2:: @ 86203C2 - .string "Soothing aromas make the$" - -gUnknown_086203DB:: @ 86203DB - .string "body and mind healthy.$" - -gUnknown_086203F2:: @ 86203F2 - .string "I'm not very good at this.$" - -gUnknown_0862040D:: @ 862040D - .string "Ruin-exploration partners.$" - -gUnknown_08620428:: @ 8620428 - .string "I am searching for undersea$" - -gUnknown_08620444:: @ 8620444 - .string "ruins and relics.$" - -gUnknown_08620456:: @ 8620456 - .string "Overwhelm with power!$" - -gUnknown_0862046C:: @ 862046C - .string "Craggy ROCK POKéMON.$" - -gUnknown_08620481:: @ 8620481 - .string "In search of ancient lore,$" - -gUnknown_0862049C:: @ 862049C - .string "I travel the world.$" - -gUnknown_086204B0:: @ 86204B0 - .string "I'm going to try hard!$" - -gUnknown_086204C7:: @ 86204C7 - .string "Good swimmer POKéMON.$" - -gUnknown_086204DD:: @ 86204DD - .string "I wish I could swim without$" - -gUnknown_086204F9:: @ 86204F9 - .string "using an inner tube.$" - -gUnknown_0862050E:: @ 862050E - .string "I don't know. I'll try hard.$" - -gUnknown_0862052B:: @ 862052B - .string "WATER POKéMON are buddies.$" - -gUnknown_08620546:: @ 8620546 - .string "It's not like I can't swim.$" - -gUnknown_08620562:: @ 8620562 - .string "I just like my inner tube.$" - -gUnknown_0862057D:: @ 862057D - .string "We split our duties.$" - -gUnknown_08620592:: @ 8620592 - .string "We like friendly POKéMON.$" - -gUnknown_086205AC:: @ 86205AC - .string "We enjoy POKéMON together$" - -gUnknown_086205C6:: @ 86205C6 - .string "as sister and brother.$" - -gUnknown_086205DD:: @ 86205DD - .string "I finish with power moves!$" - -gUnknown_086205F8:: @ 86205F8 - .string "A mix of different types.$" - -gUnknown_08620612:: @ 8620612 - .string "I aim to become the ultimate$" - -gUnknown_0862062F:: @ 862062F - .string "TRAINER!$" - -gUnknown_08620638:: @ 8620638 - .string "Exploit the foe's weakness.$" - -gUnknown_08620654:: @ 8620654 - .string "Balance is crucial.$" - -gUnknown_08620668:: @ 8620668 - .string "My goal is to become the$" - -gUnknown_08620681:: @ 8620681 - .string "POKéMON CHAMPION.$" - -gUnknown_08620693:: @ 8620693 - .string "Upset the opponent.$" - -gUnknown_086206A7:: @ 86206A7 - .string "Type doesn't matter.$" - -gUnknown_086206BC:: @ 86206BC - .string "I'm a top student at the$" - -gUnknown_086206D5:: @ 86206D5 - .string "TRAINER'S SCHOOL.$" - -gUnknown_086206E7:: @ 86206E7 - .string "Slow, steady suffering.$" - -gUnknown_086206FF:: @ 86206FF - .string "Scary to meet at night.$" - -gUnknown_08620717:: @ 8620717 - .string "I see things that others$" - -gUnknown_08620730:: @ 8620730 - .string "can't see...$" - -gUnknown_0862073D:: @ 862073D - .string "Anything to win.$" - -gUnknown_0862074E:: @ 862074E - .string "Gorgeous type!$" - -gUnknown_0862075D:: @ 862075D - .string "I have a pool specially for$" - -gUnknown_08620779:: @ 8620779 - .string "my POKéMON at home.$" - -gUnknown_0862078D:: @ 862078D - .string "You'll fall under my spell!$" - -gUnknown_086207A9:: @ 86207A9 - .string "Mature WATER type.$" - -gUnknown_086207BC:: @ 86207BC - .string "I dream of cruising around$" - -gUnknown_086207D7:: @ 86207D7 - .string "the world on a luxury liner.$" - -gUnknown_086207F4:: @ 86207F4 - .string "I'll lead you astray.$" - -gUnknown_0862080A:: @ 862080A - .string "Cute, of course.$" - -gUnknown_0862081B:: @ 862081B - .string "I love the SAFARI ZONE.$" - -gUnknown_08620833:: @ 8620833 - .string "I seem to end up there.$" - -gUnknown_0862084B:: @ 862084B - .string "Strategy? Who needs it?$" - -gUnknown_08620863:: @ 8620863 - .string "I spent big money on it!$" - -gUnknown_0862087C:: @ 862087C - .string "I, being rich, sleep in a$" - -gUnknown_08620896:: @ 8620896 - .string "custom POKéMON bed.$" - -gUnknown_086208AA:: @ 86208AA - .string "Wrestle down with power.$" - -gUnknown_086208C3:: @ 86208C3 - .string "Took all night to catch.$" - -gUnknown_086208DC:: @ 86208DC - .string "Big, burly, and buff$" - -gUnknown_086208F1:: @ 86208F1 - .string "POKéMON are the best...$" - -gUnknown_08620909:: @ 8620909 - .string "Ram at full speed!$" - -gUnknown_0862091C:: @ 862091C - .string "Funky WATER type!$" - -gUnknown_0862092E:: @ 862092E - .string "If I can't be out swimming,$" - -gUnknown_0862094A:: @ 862094A - .string "I'll be pumping weights.$" - -gUnknown_08620963:: @ 8620963 - .string "Grand slam pummeling!$" - -gUnknown_08620979:: @ 8620979 - .string "FIGHTING type.$" - -gUnknown_08620988:: @ 8620988 - .string "Not to brag, but I can bust$" - -gUnknown_086209A4:: @ 86209A4 - .string "ten roof tiles!$" - -gUnknown_086209B4:: @ 86209B4 - .string "Witness karate power!$" - -gUnknown_086209CA:: @ 86209CA - .string "My partners in training!$" - -gUnknown_086209E3:: @ 86209E3 - .string "Let us discuss matters of$" - -gUnknown_086209FD:: @ 86209FD - .string "the world with bare fists!$" - -gUnknown_08620A18:: @ 8620A18 - .string "Rock to stunning sounds!$" - -gUnknown_08620A31:: @ 8620A31 - .string "Electric-and-sound combo!$" - -gUnknown_08620A4B:: @ 8620A4B - .string "My compositions will shock$" - -gUnknown_08620A66:: @ 8620A66 - .string "you and stun you!$" - -gUnknown_08620A78:: @ 8620A78 - .string "I'll electrify you!$" - -gUnknown_08620A8C:: @ 8620A8C - .string "They're ELECTRIC!$" - -gUnknown_08620A9E:: @ 8620A9E - .string "I want to make people cry$" - -gUnknown_08620AB8:: @ 8620AB8 - .string "with songs from my heart.$" - -gUnknown_08620AD2:: @ 8620AD2 - .string "Burn it all down!$" - -gUnknown_08620AE4:: @ 8620AE4 - .string "Burn-inducing POKéMON.$" - -gUnknown_08620AFB:: @ 8620AFB - .string "When you light a campfire,$" - -gUnknown_08620B16:: @ 8620B16 - .string "be sure there's some water.$" - -gUnknown_08620B32:: @ 8620B32 - .string "Hang in and be tenacious!$" - -gUnknown_08620B4C:: @ 8620B4C - .string "I'll raise any POKéMON.$" - -gUnknown_08620B64:: @ 8620B64 - .string "POKéMON raised in the wild$" - -gUnknown_08620B7F:: @ 8620B7F - .string "grow strong!$" - -gUnknown_08620B8C:: @ 8620B8C - .string "Our love lets us prevail.$" - -gUnknown_08620BA6:: @ 8620BA6 - .string "We've had them for years.$" - -gUnknown_08620BC0:: @ 8620BC0 - .string "Married 50 years, we've$" - -gUnknown_08620BD8:: @ 8620BD8 - .string "devotedly raised POKéMON.$" - -gUnknown_08620BF2:: @ 8620BF2 - .string "Attack in waves!$" - -gUnknown_08620C03:: @ 8620C03 - .string "BUG POKéMON are cool.$" - -gUnknown_08620C19:: @ 8620C19 - .string "I go into the forest every$" - -gUnknown_08620C34:: @ 8620C34 - .string "day to catch BUG POKéMON.$" - -gUnknown_08620C4E:: @ 8620C4E - .string "Daze and confuse!$" - -gUnknown_08620C60:: @ 8620C60 - .string "Ones with weird powers.$" - -gUnknown_08620C78:: @ 8620C78 - .string "I can see through exactly$" - -gUnknown_08620C92:: @ 8620C92 - .string "what you're thinking!$" - -gUnknown_08620CA8:: @ 8620CA8 - .string "Battle at full power.$" - -gUnknown_08620CBE:: @ 8620CBE - .string "POKéMON of many mysteries.$" - -gUnknown_08620CD9:: @ 8620CD9 - .string "When we spoke, I was really$" - -gUnknown_08620CF5:: @ 8620CF5 - .string "using telepathy.$" - -gUnknown_08620D06:: @ 8620D06 - .string "Calm and collected.$" - -gUnknown_08620D1A:: @ 8620D1A - .string "POKéMON of distinction.$" - -gUnknown_08620D32:: @ 8620D32 - .string "We enjoy a spot of tea$" - -gUnknown_08620D49:: @ 8620D49 - .string "every day. It's imported.$" - -gUnknown_08620D63:: @ 8620D63 - .string "I use my head to battle.$" - -gUnknown_08620D7C:: @ 8620D7C - .string "I love any kind of POKéMON!$" - -gUnknown_08620D98:: @ 8620D98 - .string "My daddy gives me spending$" - -gUnknown_08620DB3:: @ 8620DB3 - .string "money if I ace a test.$" - -gUnknown_08620DCA:: @ 8620DCA - .string "My knowledge rules!$" - -gUnknown_08620DDE:: @ 8620DDE - .string "Any smart POKéMON!$" - -gUnknown_08620DF1:: @ 8620DF1 - .string "I want to be a POKéMON$" - -gUnknown_08620E08:: @ 8620E08 - .string "researcher in the future.$" - -gUnknown_08620E22:: @ 8620E22 - .string "We talk it over first.$" - -gUnknown_08620E39:: @ 8620E39 - .string "POKéMON that we both like.$" - -gUnknown_08620E54:: @ 8620E54 - .string "We're senior and junior$" - -gUnknown_08620E6C:: @ 8620E6C - .string "students into POKéMON!$" - -gUnknown_08620E83:: @ 8620E83 - .string "Go for it, my dears!$" - -gUnknown_08620E98:: @ 8620E98 - .string "I have no likes or dislikes.$" - -gUnknown_08620EB5:: @ 8620EB5 - .string "While out shopping for$" - -gUnknown_08620ECC:: @ 8620ECC - .string "supper, I battle too.$" - -gUnknown_08620EE2:: @ 8620EE2 - .string "I battle with love!$" - -gUnknown_08620EF6:: @ 8620EF6 - .string "A POKéMON raised with love!$" - -gUnknown_08620F12:: @ 8620F12 - .string "It's important to build$" - -gUnknown_08620F2A:: @ 8620F2A - .string "trust with your POKéMON.$" - -gUnknown_08620F43:: @ 8620F43 - .string "I see through your moves!$" - -gUnknown_08620F5D:: @ 8620F5D - .string "The essence of FIGHTING.$" - -gUnknown_08620F76:: @ 8620F76 - .string "I'm not ready to give way$" - -gUnknown_08620F90:: @ 8620F90 - .string "to the young yet!$" - -gUnknown_08620FA2:: @ 8620FA2 - .string "Attack while defending.$" - -gUnknown_08620FBA:: @ 8620FBA - .string "The FIGHTING type.$" - -gUnknown_08620FCD:: @ 8620FCD - .string "Being old, I have my own$" - -gUnknown_08620FE6:: @ 8620FE6 - .string "style of battling.$" - -gUnknown_08620FF9:: @ 8620FF9 - .string "I do what I can.$" - -gUnknown_0862100A:: @ 862100A - .string "I use different types.$" - -gUnknown_08621021:: @ 8621021 - .string "I'm going to keep working$" - -gUnknown_0862103B:: @ 862103B - .string "until I beat a GYM LEADER.$" - -gUnknown_08621056:: @ 8621056 - .string "I battle patiently.$" - -gUnknown_0862106A:: @ 862106A - .string "WATER POKéMON to battle!$" - -gUnknown_08621083:: @ 8621083 - .string "I'm the world's only guy to$" - -gUnknown_0862109F:: @ 862109F - .string "catch a huge POKéMON!$" - -gUnknown_086210B5:: @ 86210B5 - .string "Exploit the environment!$" - -gUnknown_086210CE:: @ 86210CE - .string "All hail the WATER type!$" - -gUnknown_086210E7:: @ 86210E7 - .string "I won't be beaten by some$" - -gUnknown_08621101:: @ 8621101 - .string "beach bum SWIMMER!$" - -gUnknown_08621114:: @ 8621114 - .string "Speed above all!$" - -gUnknown_08621125:: @ 8621125 - .string "I use a speedy POKéMON.$" - -gUnknown_0862113D:: @ 862113D - .string "A marathon is a challenge$" - -gUnknown_08621157:: @ 8621157 - .string "against your own self.$" - -gUnknown_0862116E:: @ 862116E - .string "Defense is crucial.$" - -gUnknown_08621182:: @ 8621182 - .string "My POKéMON is solid.$" - -gUnknown_08621197:: @ 8621197 - .string "I started this for dieting,$" - -gUnknown_086211B3:: @ 86211B3 - .string "but I got right into it.$" - -gUnknown_086211CC:: @ 86211CC - .string "Strike before stricken!$" - -gUnknown_086211E4:: @ 86211E4 - .string "A fast-running POKéMON!$" - -gUnknown_086211FC:: @ 86211FC - .string "If you ran and ran, you'd$" - -gUnknown_08621216:: @ 8621216 - .string "become one with the wind.$" - -gUnknown_08621230:: @ 8621230 - .string "All-out offensive!$" - -gUnknown_08621243:: @ 8621243 - .string "WATER POKéMON rule!$" - -gUnknown_08621257:: @ 8621257 - .string "I must swim over 6 miles$" - -gUnknown_08621270:: @ 8621270 - .string "every day.$" - -gUnknown_0862127B:: @ 862127B - .string "Push and push again!$" - -gUnknown_08621290:: @ 8621290 - .string "The strength of STEEL.$" - -gUnknown_086212A7:: @ 86212A7 - .string "If you're sweating, get$" - -gUnknown_086212BF:: @ 86212BF - .string "fluids into you regularly.$" - -gUnknown_086212DA:: @ 86212DA - .string "Draw the power of WATER.$" - -gUnknown_086212F3:: @ 86212F3 - .string "Toughened WATER POKéMON.$" - -gUnknown_0862130C:: @ 862130C - .string "Training POKéMON is good,$" - -gUnknown_08621326:: @ 8621326 - .string "but don't neglect yourself.$" - -gUnknown_08621342:: @ 8621342 - .string "It's about POKéMON power!$" - -gUnknown_0862135C:: @ 862135C - .string "See the power of DRAGONS!$" - -gUnknown_08621376:: @ 8621376 - .string "I'll become legendary as the$" - -gUnknown_08621393:: @ 8621393 - .string "strongest one day!$" - -gUnknown_086213A6:: @ 86213A6 - .string "I'll show you my technique!$" - -gUnknown_086213C2:: @ 86213C2 - .string "Elegantly wheeling BIRDS.$" - -gUnknown_086213DC:: @ 86213DC - .string "My BIRD POKéMON, deliver my$" - -gUnknown_086213F8:: @ 86213F8 - .string "love to that girl!$" - -gUnknown_0862140B:: @ 862140B - .string "You'll suffer from poison!$" - -gUnknown_08621426:: @ 8621426 - .string "Poisonous POKéMON.$" - -gUnknown_08621439:: @ 8621439 - .string "I undertake training so$" - -gUnknown_08621451:: @ 8621451 - .string "that I may become a ninja.$" - -gUnknown_0862146C:: @ 862146C - .string "The first strike wins!$" - -gUnknown_08621483:: @ 8621483 - .string "Speedy FIGHTING type.$" - -gUnknown_08621499:: @ 8621499 - .string "If my POKéMON lose,$" - -gUnknown_086214AD:: @ 86214AD - .string "I'll carry on the fight!$" - -gUnknown_086214C6:: @ 86214C6 - .string "Go, go, my POKéMON!$" - -gUnknown_086214DA:: @ 86214DA - .string "I'll raise anything.$" - -gUnknown_086214EF:: @ 86214EF - .string "UV rays are your skin's$" - -gUnknown_08621507:: @ 8621507 - .string "enemy. Get protected.$" - -gUnknown_0862151D:: @ 862151D - .string "No mercy!$" - -gUnknown_08621527:: @ 8621527 - .string "Cute WATER POKéMON.$" - -gUnknown_0862153B:: @ 862153B - .string "I have too many fans.$" - -gUnknown_08621551:: @ 8621551 - .string "I was interviewed on TV.$" - -gUnknown_0862156A:: @ 862156A - .string "I think about this & that.$" - -gUnknown_08621585:: @ 8621585 - .string "I like all POKéMON.$" - -gUnknown_08621599:: @ 8621599 - .string "What lies beyond that$" - -gUnknown_086215AF:: @ 86215AF - .string "yonder hill?$" - -gUnknown_086215BC:: @ 86215BC - .string "We battle together!$" - -gUnknown_086215D0:: @ 86215D0 - .string "We train together!$" - -gUnknown_086215E3:: @ 86215E3 - .string "We like the same POKéMON,$" - -gUnknown_086215FD:: @ 86215FD - .string "but different desserts.$" - -gUnknown_08621615:: @ 8621615 - .string "I force things with power!$" - -gUnknown_08621630:: @ 8621630 - .string "WATER and FIGHTING types.$" - -gUnknown_0862164A:: @ 862164A - .string "Seamen are rough spirits!$" - -gUnknown_08621664:: @ 8621664 - .string "Any complaints?$" - -gUnknown_08621674:: @ 8621674 - .string "Up for a fight anytime!$" - -gUnknown_0862168C:: @ 862168C - .string "WATER POKéMON are my faves!$" - -gUnknown_086216A8:: @ 86216A8 - .string "If you want to shout loud,$" - -gUnknown_086216C3:: @ 86216C3 - .string "suck in air with your belly!$" - -gUnknown_086216E0:: @ 86216E0 - .string "Protect POKéMON from harm.$" - -gUnknown_086216FB:: @ 86216FB - .string "I love rare POKéMON.$" - -gUnknown_08621710:: @ 8621710 - .string "I want to collect all the$" - -gUnknown_0862172A:: @ 862172A - .string "world's rare POKéMON.$" - -gUnknown_08621740:: @ 8621740 - .string "I count on power.$" - -gUnknown_08621752:: @ 8621752 - .string "POKéMON are my children.$" - -gUnknown_0862176B:: @ 862176B - .string "It takes knowledge and$" - -gUnknown_08621782:: @ 8621782 - .string "love to raise POKéMON.$" - -gUnknown_08621799:: @ 8621799 - .string "Full-on attack!$" - -gUnknown_086217A9:: @ 86217A9 - .string "Anything. I'll raise it.$" - -gUnknown_086217C2:: @ 86217C2 - .string "I give them {POKEBLOCK}S for$" - -gUnknown_086217D9:: @ 86217D9 - .string "going after CONTEST titles.$" - -gUnknown_086217F5:: @ 86217F5 - .string "I raise POKéMON with care.$" - -gUnknown_08621810:: @ 8621810 - .string "Fun-to-raise POKéMON.$" - -gUnknown_08621826:: @ 8621826 - .string "Treat every POKéMON you$" - -gUnknown_0862183E:: @ 862183E - .string "meet with respect.$" - -gUnknown_08621851:: @ 8621851 - .string "I believe in my POKéMON.$" - -gUnknown_0862186A:: @ 862186A - .string "I like strong POKéMON.$" - -gUnknown_08621881:: @ 8621881 - .string "I'm training for rescue$" - -gUnknown_08621899:: @ 8621899 - .string "work with my POKéMON.$" - -gUnknown_086218AF:: @ 86218AF - .string "Attack in waves!$" - -gUnknown_086218C0:: @ 86218C0 - .string "I use different types.$" - -gUnknown_086218D7:: @ 86218D7 - .string "Those who destroy nature$" - -gUnknown_086218F0:: @ 86218F0 - .string "must never be forgiven!$" - -gUnknown_08621908:: @ 8621908 - .string "I'll show you some guts!$" - -gUnknown_08621921:: @ 8621921 - .string "Cute POKéMON are my faves!$" - -gUnknown_0862193C:: @ 862193C - .string "After a battle, I always$" - -gUnknown_08621955:: @ 8621955 - .string "bathe with my POKéMON.$" - -gUnknown_0862196C:: @ 862196C - .string "Lightning-fast attack!$" - -gUnknown_08621983:: @ 8621983 - .string "BUG POKéMON are number 1!$" - -gUnknown_0862199D:: @ 862199D - .string "If you want to catch BUG$" - -gUnknown_086219B6:: @ 86219B6 - .string "POKéMON, wake up early.$" - -gUnknown_086219CE:: @ 86219CE - .string "I battle with power.$" - -gUnknown_086219E3:: @ 86219E3 - .string "Hard-bodied POKéMON.$" - -gUnknown_086219F8:: @ 86219F8 - .string "I've been planning a month$" - -gUnknown_08621A13:: @ 8621A13 - .string "for today's hike.$" - -gUnknown_08621A25:: @ 8621A25 - .string "I like it hot!$" - -gUnknown_08621A34:: @ 8621A34 - .string "Hot POKéMON!$" - -gUnknown_08621A41:: @ 8621A41 - .string "As much as I love POKéMON,$" - -gUnknown_08621A5C:: @ 8621A5C - .string "I surely like hiking!$" - -gUnknown_08621A72:: @ 8621A72 - .string "Lovey-dovey strategy!$" - -gUnknown_08621A88:: @ 8621A88 - .string "Lovey-dovey POKéMON!$" - -gUnknown_08621A9D:: @ 8621A9D - .string "We're lovey-dovey!$" - -gUnknown_08621AB0:: @ 8621AB0 - .string "Forever lovey-dovey!$" - -gUnknown_08621AC5:: @ 8621AC5 - .string "We let it all hang out.$" - -gUnknown_08621ADD:: @ 8621ADD - .string "The 1st POKéMON I caught.$" - -gUnknown_08621AF7:: @ 8621AF7 - .string "POKéMON and I have grown$" - -gUnknown_08621B10:: @ 8621B10 - .string "stronger together.$" - -gUnknown_08621B23:: @ 8621B23 - .string "ROCK-type power attack.$" - -gUnknown_08621B3B:: @ 8621B3B - .string "I prefer rock-hard POKéMON.$" - -gUnknown_08621B57:: @ 8621B57 - .string "A LEADER of a big GYM bears$" - -gUnknown_08621B73:: @ 8621B73 - .string "a lot of responsibility.$" - -gUnknown_08621B8C:: @ 8621B8C - .string "Direct physical action!$" - -gUnknown_08621BA4:: @ 8621BA4 - .string "FIGHTING POKéMON rule!$" - -gUnknown_08621BBB:: @ 8621BBB - .string "The world awaits me as the$" - -gUnknown_08621BD6:: @ 8621BD6 - .string "next big wave!$" - -gUnknown_08621BE5:: @ 8621BE5 - .string "I choose to electrify.$" - -gUnknown_08621BFC:: @ 8621BFC - .string "Get shocked by electricity!$" - -gUnknown_08621C18:: @ 8621C18 - .string "One must never throw a$" - -gUnknown_08621C2F:: @ 8621C2F - .string "match. Even I must not.$" - -gUnknown_08621C47:: @ 8621C47 - .string "Battle aggressively.$" - -gUnknown_08621C5C:: @ 8621C5C - .string "Burn with passion!$" - -gUnknown_08621C6F:: @ 8621C6F - .string "Completely wash away daily$" - -gUnknown_08621C8A:: @ 8621C8A - .string "fatigue in hot springs!$" - -gUnknown_08621CA2:: @ 8621CA2 - .string "I flexibly adapt my style.$" - -gUnknown_08621CBD:: @ 8621CBD - .string "Grown in a balanced manner.$" - -gUnknown_08621CD9:: @ 8621CD9 - .string "I walk the 30 minutes from$" - -gUnknown_08621CF4:: @ 8621CF4 - .string "home to here every day.$" - -gUnknown_08621D0C:: @ 8621D0C - .string "I take advantage of speed.$" - -gUnknown_08621D27:: @ 8621D27 - .string "Graceful sky dancers.$" - -gUnknown_08621D3D:: @ 8621D3D - .string "The ultimate would be to$" - -gUnknown_08621D56:: @ 8621D56 - .string "live as one with nature.$" - -gUnknown_08621D6F:: @ 8621D6F - .string "We battle in cooperation.$" - -gUnknown_08621D89:: @ 8621D89 - .string "Always friendly POKéMON.$" - -gUnknown_08621DA2:: @ 8621DA2 - .string "Papa has trouble telling$" - -gUnknown_08621DBB:: @ 8621DBB - .string "the two of us apart!$" - -gUnknown_08621DD0:: @ 8621DD0 - .string "I use splendid waterpower.$" - -gUnknown_08621DEB:: @ 8621DEB - .string "POKéMON of elegance!$" - -gUnknown_08621E00:: @ 8621E00 - .string "The adulation of beautiful$" - -gUnknown_08621E1B:: @ 8621E1B - .string "ladies fills me with energy!$" - -gUnknown_08621E38:: @ 8621E38 - .string "Offense over defense!$" - -gUnknown_08621E4E:: @ 8621E4E - .string "The DARK side's beauties.$" - -gUnknown_08621E68:: @ 8621E68 - .string "They said I was a punk, but$" - -gUnknown_08621E84:: @ 8621E84 - .string "I'm one of the ELITE FOUR!$" - -gUnknown_08621E9F:: @ 8621E9F - .string "Confuse and confound.$" - -gUnknown_08621EB5:: @ 8621EB5 - .string "There's nothing definite.$" - -gUnknown_08621ECF:: @ 8621ECF - .string "I wonder how my grandma at$" - -gUnknown_08621EEA:: @ 8621EEA - .string "MT. PYRE is doing?$" - -gUnknown_08621EFD:: @ 8621EFD - .string "I use items for help.$" - -gUnknown_08621F13:: @ 8621F13 - .string "Flaming passion in icy cold!$" - -gUnknown_08621F30:: @ 8621F30 - .string "The ICE type can be better$" - -gUnknown_08621F4B:: @ 8621F4B - .string "trained in this hot land.$" - -gUnknown_08621F65:: @ 8621F65 - .string "Harness strong abilities.$" - -gUnknown_08621F7F:: @ 8621F7F - .string "The raw power of DRAGONS!$" - -gUnknown_08621F99:: @ 8621F99 - .string "I dedicate myself to the$" - -gUnknown_08621FB2:: @ 8621FB2 - .string "POKéMON that saved me.$" - -gUnknown_08621FC9:: @ 8621FC9 - .string "Dignity and respect.$" - -gUnknown_08621FDE:: @ 8621FDE - .string "I prefer POKéMON of grace.$" - -gUnknown_08621FF9:: @ 8621FF9 - .string "I represent beauty as$" - -gUnknown_0862200F:: @ 862200F - .string "well as intelligence.$" - -.align 2 - -@ strategy, mon text, introduction1, introduction2 -gUnknown_08622028:: @ 8622028 - .4byte gUnknown_08620390, gUnknown_086203AA, gUnknown_086203C2, gUnknown_086203DB - .4byte gUnknown_086203F2, gUnknown_0862040D, gUnknown_08620428, gUnknown_08620444 - .4byte gUnknown_08620456, gUnknown_0862046C, gUnknown_08620481, gUnknown_0862049C - .4byte gUnknown_086204B0, gUnknown_086204C7, gUnknown_086204DD, gUnknown_086204F9 - .4byte gUnknown_0862050E, gUnknown_0862052B, gUnknown_08620546, gUnknown_08620562 - .4byte gUnknown_0862057D, gUnknown_08620592, gUnknown_086205AC, gUnknown_086205C6 - .4byte gUnknown_086205DD, gUnknown_086205F8, gUnknown_08620612, gUnknown_0862062F - .4byte gUnknown_08620638, gUnknown_08620654, gUnknown_08620668, gUnknown_08620681 - .4byte gUnknown_08620693, gUnknown_086206A7, gUnknown_086206BC, gUnknown_086206D5 - .4byte gUnknown_086206E7, gUnknown_086206FF, gUnknown_08620717, gUnknown_08620730 - .4byte gUnknown_0862073D, gUnknown_0862074E, gUnknown_0862075D, gUnknown_08620779 - .4byte gUnknown_0862078D, gUnknown_086207A9, gUnknown_086207BC, gUnknown_086207D7 - .4byte gUnknown_086207F4, gUnknown_0862080A, gUnknown_0862081B, gUnknown_08620833 - .4byte gUnknown_0862084B, gUnknown_08620863, gUnknown_0862087C, gUnknown_08620896 - .4byte gUnknown_086208AA, gUnknown_086208C3, gUnknown_086208DC, gUnknown_086208F1 - .4byte gUnknown_08620909, gUnknown_0862091C, gUnknown_0862092E, gUnknown_0862094A - .4byte gUnknown_08620963, gUnknown_08620979, gUnknown_08620988, gUnknown_086209A4 - .4byte gUnknown_086209B4, gUnknown_086209CA, gUnknown_086209E3, gUnknown_086209FD - .4byte gUnknown_08620A18, gUnknown_08620A31, gUnknown_08620A4B, gUnknown_08620A66 - .4byte gUnknown_08620A78, gUnknown_08620A8C, gUnknown_08620A9E, gUnknown_08620AB8 - .4byte gUnknown_08620AD2, gUnknown_08620AE4, gUnknown_08620AFB, gUnknown_08620B16 - .4byte gUnknown_08620B32, gUnknown_08620B4C, gUnknown_08620B64, gUnknown_08620B7F - .4byte gUnknown_08620B8C, gUnknown_08620BA6, gUnknown_08620BC0, gUnknown_08620BD8 - .4byte gUnknown_08620BF2, gUnknown_08620C03, gUnknown_08620C19, gUnknown_08620C34 - .4byte gUnknown_08620C4E, gUnknown_08620C60, gUnknown_08620C78, gUnknown_08620C92 - .4byte gUnknown_08620CA8, gUnknown_08620CBE, gUnknown_08620CD9, gUnknown_08620CF5 - .4byte gUnknown_08620D06, gUnknown_08620D1A, gUnknown_08620D32, gUnknown_08620D49 - .4byte gUnknown_08620D63, gUnknown_08620D7C, gUnknown_08620D98, gUnknown_08620DB3 - .4byte gUnknown_08620DCA, gUnknown_08620DDE, gUnknown_08620DF1, gUnknown_08620E08 - .4byte gUnknown_08620E22, gUnknown_08620E39, gUnknown_08620E54, gUnknown_08620E6C - .4byte gUnknown_08620E83, gUnknown_08620E98, gUnknown_08620EB5, gUnknown_08620ECC - .4byte gUnknown_08620EE2, gUnknown_08620EF6, gUnknown_08620F12, gUnknown_08620F2A - .4byte gUnknown_08620F43, gUnknown_08620F5D, gUnknown_08620F76, gUnknown_08620F90 - .4byte gUnknown_08620FA2, gUnknown_08620FBA, gUnknown_08620FCD, gUnknown_08620FE6 - .4byte gUnknown_08620FF9, gUnknown_0862100A, gUnknown_08621021, gUnknown_0862103B - .4byte gUnknown_08621056, gUnknown_0862106A, gUnknown_08621083, gUnknown_0862109F - .4byte gUnknown_086210B5, gUnknown_086210CE, gUnknown_086210E7, gUnknown_08621101 - .4byte gUnknown_08621114, gUnknown_08621125, gUnknown_0862113D, gUnknown_08621157 - .4byte gUnknown_0862116E, gUnknown_08621182, gUnknown_08621197, gUnknown_086211B3 - .4byte gUnknown_086211CC, gUnknown_086211E4, gUnknown_086211FC, gUnknown_08621216 - .4byte gUnknown_08621230, gUnknown_08621243, gUnknown_08621257, gUnknown_08621270 - .4byte gUnknown_0862127B, gUnknown_08621290, gUnknown_086212A7, gUnknown_086212BF - .4byte gUnknown_086212DA, gUnknown_086212F3, gUnknown_0862130C, gUnknown_08621326 - .4byte gUnknown_08621342, gUnknown_0862135C, gUnknown_08621376, gUnknown_08621393 - .4byte gUnknown_086213A6, gUnknown_086213C2, gUnknown_086213DC, gUnknown_086213F8 - .4byte gUnknown_0862140B, gUnknown_08621426, gUnknown_08621439, gUnknown_08621451 - .4byte gUnknown_0862146C, gUnknown_08621483, gUnknown_08621499, gUnknown_086214AD - .4byte gUnknown_086214C6, gUnknown_086214DA, gUnknown_086214EF, gUnknown_08621507 - .4byte gUnknown_0862151D, gUnknown_08621527, gUnknown_0862153B, gUnknown_08621551 - .4byte gUnknown_0862156A, gUnknown_08621585, gUnknown_08621599, gUnknown_086215AF - .4byte gUnknown_086215BC, gUnknown_086215D0, gUnknown_086215E3, gUnknown_086215FD - .4byte gUnknown_08621615, gUnknown_08621630, gUnknown_0862164A, gUnknown_08621664 - .4byte gUnknown_08621674, gUnknown_0862168C, gUnknown_086216A8, gUnknown_086216C3 - .4byte gUnknown_086216E0, gUnknown_086216FB, gUnknown_08621710, gUnknown_0862172A - .4byte gUnknown_08621740, gUnknown_08621752, gUnknown_0862176B, gUnknown_08621782 - .4byte gUnknown_08621799, gUnknown_086217A9, gUnknown_086217C2, gUnknown_086217D9 - .4byte gUnknown_086217F5, gUnknown_08621810, gUnknown_08621826, gUnknown_0862183E - .4byte gUnknown_08621851, gUnknown_0862186A, gUnknown_08621881, gUnknown_08621899 - .4byte gUnknown_086218AF, gUnknown_086218C0, gUnknown_086218D7, gUnknown_086218F0 - .4byte gUnknown_08621908, gUnknown_08621921, gUnknown_0862193C, gUnknown_08621955 - .4byte gUnknown_0862196C, gUnknown_08621983, gUnknown_0862199D, gUnknown_086219B6 - .4byte gUnknown_086219CE, gUnknown_086219E3, gUnknown_086219F8, gUnknown_08621A13 - .4byte gUnknown_08621A25, gUnknown_08621A34, gUnknown_08621A41, gUnknown_08621A5C - .4byte gUnknown_08621A72, gUnknown_08621A88, gUnknown_08621A9D, gUnknown_08621AB0 - .4byte gUnknown_08621AC5, gUnknown_08621ADD, gUnknown_08621AF7, gUnknown_08621B10 - .4byte gUnknown_08621B23, gUnknown_08621B3B, gUnknown_08621B57, gUnknown_08621B73 - .4byte gUnknown_08621B8C, gUnknown_08621BA4, gUnknown_08621BBB, gUnknown_08621BD6 - .4byte gUnknown_08621BE5, gUnknown_08621BFC, gUnknown_08621C18, gUnknown_08621C2F - .4byte gUnknown_08621C47, gUnknown_08621C5C, gUnknown_08621C6F, gUnknown_08621C8A - .4byte gUnknown_08621CA2, gUnknown_08621CBD, gUnknown_08621CD9, gUnknown_08621CF4 - .4byte gUnknown_08621D0C, gUnknown_08621D27, gUnknown_08621D3D, gUnknown_08621D56 - .4byte gUnknown_08621D6F, gUnknown_08621D89, gUnknown_08621DA2, gUnknown_08621DBB - .4byte gUnknown_08621DD0, gUnknown_08621DEB, gUnknown_08621E00, gUnknown_08621E1B - .4byte gUnknown_08621E38, gUnknown_08621E4E, gUnknown_08621E68, gUnknown_08621E84 - .4byte gUnknown_08621E9F, gUnknown_08621EB5, gUnknown_08621ECF, gUnknown_08621EEA - .4byte gUnknown_08621EFD, gUnknown_08621F13, gUnknown_08621F30, gUnknown_08621F4B - .4byte gUnknown_08621F65, gUnknown_08621F7F, gUnknown_08621F99, gUnknown_08621FB2 - .4byte gUnknown_08621FC9, gUnknown_08621FDE, gUnknown_08621FF9, gUnknown_0862200F - -gUnknown_08622508:: @ 8622508 - .byte 0, 2 - -gUnknown_0862250A:: @ 862250A - .byte 0, 1, 2, 0, 0, 0 - -// pokenav_unk_4.s -gUnknown_08622510:: @ 8622510 - .incbin "graphics/pokenav/ui_matchcall.gbapal" - -gUnknown_08622530:: @ 8622530 - .incbin "graphics/pokenav/ui_matchcall.4bpp.lz" - -gUnknown_086225D4:: @ 86225D4 - .incbin "graphics/pokenav/ui_matchcall.bin.lz" - -gUnknown_08622698:: @ 8622698 - .incbin "graphics/pokenav/arrow2.gbapal" - -gUnknown_086226B8:: @ 86226B8 - .incbin "graphics/pokenav/arrow2.4bpp.lz" - -gUnknown_086226E0:: @ 86226E0 - .incbin "graphics/pokenav/86226E0.gbapal" - -gUnknown_08622700:: @ 8622700 - .incbin "graphics/pokenav/8622700.gbapal" - -gUnknown_08622720:: @ 8622720 - .incbin "graphics/pokenav/pokeball_matchcall.gbapal" - -gUnknown_08622760:: @ 8622760 - .incbin "graphics/pokenav/pokeball_matchcall.4bpp.lz" - -gUnknown_0862278C:: @ 862278C - .4byte 0x11FD - .4byte 0x20206A - -gUnknown_08622794:: @ 8622794 - .4byte 0x00003077 - -gUnknown_08622798:: @ 8622798 - .4byte NULL - .4byte sub_81CB510 - .4byte sub_81CB588 - .4byte sub_81CB600 - .4byte sub_81CB678 - .4byte sub_81CB6F0 - .4byte sub_81CB734 - .4byte sub_81CB75C - .4byte sub_81CB7A0 - .4byte sub_81CB824 - .4byte sub_81CB888 - .4byte sub_81CB93C - .4byte sub_81CBAD4 - .4byte sub_81CB9C8 - .4byte sub_81CBA68 - .4byte sub_81CBB74 - -gUnknown_086227D8:: @ 86227D8 - window_template 2, 0, 5, 11, 2, 2, 16 - -gUnknown_086227E0:: @ 86227E0 - window_template 2, 0, 9, 11, 8, 2, 0x26 - -gUnknown_086227E8:: @ 86227E8 - .4byte gUnknown_085EC017 - .4byte gUnknown_085EC01C - .4byte gUnknown_085EC022 - -gUnknown_086227F4:: @ 86227F4 - .string "·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·\p" - .string "$" - .align 2 - -gUnknown_08622808:: @ 8622808 - window_template 1, 1, 12, 0x1C, 4, 1, 10 - -gUnknown_08622810:: @ 8622810 - obj_tiles gUnknown_086226B8, 0x40, 7 - -gUnknown_08622818:: @ 8622818 - obj_pal gUnknown_08622698, 12 - null_obj_pal - -gUnknown_08622828:: @ 8622828 - .2byte 0x8000 - .2byte 0x0 - .2byte 0x400 - .2byte 0x0 - -gUnknown_08622830:: @ 8622830 - spr_template 7, 12, gUnknown_08622828, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81CC34C - -gUnknown_08622848:: @ 8622848 - .2byte 0x0 - .2byte 0xC000 - .2byte 0x400 - .2byte 0x0 - -gUnknown_08622850:: @ 8622850 - spr_template 8, 13, gUnknown_08622848, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy - -// pokenav_unk_5.s -gUnknown_08622868:: @ 8622868 - .incbin "graphics/pokenav/8622868.gbapal" - -gUnknown_08622888:: @ 8622888 - .incbin "graphics/pokenav/zoom_tiles.4bpp.lz" - -gUnknown_08622A7C:: @ 8622A7C - .incbin "graphics/pokenav/city_maps/lavaridge_0.bin.lz" - -gUnknown_08622AC0:: @ 8622AC0 - .incbin "graphics/pokenav/city_maps/fallarbor_0.bin.lz" - -gUnknown_08622B08:: @ 8622B08 - .incbin "graphics/pokenav/city_maps/fortree_0.bin.lz" - -gUnknown_08622B58:: @ 8622B58 - .incbin "graphics/pokenav/city_maps/slateport_0.bin.lz" - -gUnknown_08622BB8:: @ 8622BB8 - .incbin "graphics/pokenav/city_maps/slateport_1.bin.lz" - -gUnknown_08622C04:: @ 8622C04 - .incbin "graphics/pokenav/city_maps/rustboro_0.bin.lz" - -gUnknown_08622C58:: @ 8622C58 - .incbin "graphics/pokenav/city_maps/rustboro_1.bin.lz" - -gUnknown_08622CAC:: @ 8622CAC - .incbin "graphics/pokenav/city_maps/pacifidlog_0.bin.lz" - -gUnknown_08622CEC:: @ 8622CEC - .incbin "graphics/pokenav/city_maps/mauville_0.bin.lz" - -gUnknown_08622D44:: @ 8622D44 - .incbin "graphics/pokenav/city_maps/mauville_1.bin.lz" - -gUnknown_08622D98:: @ 8622D98 - .incbin "graphics/pokenav/city_maps/oldale_0.bin.lz" - -gUnknown_08622DC8:: @ 8622DC8 - .incbin "graphics/pokenav/city_maps/lilycove_0.bin.lz" - -gUnknown_08622E14:: @ 8622E14 - .incbin "graphics/pokenav/city_maps/lilycove_1.bin.lz" - -gUnknown_08622E6C:: @ 8622E6C - .incbin "graphics/pokenav/city_maps/littleroot_0.bin.lz" - -gUnknown_08622E9C:: @ 8622E9C - .incbin "graphics/pokenav/city_maps/dewford_0.bin.lz" - -gUnknown_08622ED4:: @ 8622ED4 - .incbin "graphics/pokenav/city_maps/sootopolis_0.bin.lz" - -gUnknown_08622F14:: @ 8622F14 - .incbin "graphics/pokenav/city_maps/ever_grande_0.bin.lz" - -gUnknown_08622F5C:: @ 8622F5C - .incbin "graphics/pokenav/city_maps/ever_grande_1.bin.lz" - -gUnknown_08622FA0:: @ 8622FA0 - .incbin "graphics/pokenav/city_maps/verdanturf_0.bin.lz" - -gUnknown_08622FD8:: @ 8622FD8 - .incbin "graphics/pokenav/city_maps/mossdeep_0.bin.lz" - -gUnknown_08623020:: @ 8623020 - .incbin "graphics/pokenav/city_maps/mossdeep_1.bin.lz" - -gUnknown_0862307C:: @ 862307C - .incbin "graphics/pokenav/city_maps/petalburg_0.bin.lz" - -gUnknown_086230D8:: @ 86230D8 - .4byte 0x11F5 - .4byte 0x206A - .4byte 0x3402 - -gUnknown_086230E4:: @ 86230E4 - .4byte NULL - .4byte sub_81CC848 - .4byte sub_81CC878 - .4byte sub_81CC8D8 - .4byte sub_81CC95C - -gUnknown_086230F8:: @ 86230F8 - obj_tiles gHoennMapZoomIcons_Gfx, 0x800, 6 - -gUnknown_08623100:: @ 8623100 - obj_pal gHoennMapZoomIcons_Pal, 11 - null_obj_pal - -gUnknown_08623110:: @ 8623110 - .byte 1 - .byte 17 - .byte 4 - .byte 12 - .byte 13 - .byte 1 - .2byte 0x4C - -gUnknown_08623118:: @ 8623118 - .4byte 0, gUnknown_08622E6C - .4byte 1, gUnknown_08622D98 - .4byte 2, gUnknown_08622E9C - .4byte 3, gUnknown_08622A7C - .4byte 4, gUnknown_08622AC0 - .4byte 5, gUnknown_08622FA0 - .4byte 6, gUnknown_08622CAC - .4byte 7, gUnknown_0862307C - .4byte 8, gUnknown_08622B58 - .4byte 0x10008, gUnknown_08622BB8 - .4byte 9, gUnknown_08622D44 - .4byte 0x10009, gUnknown_08622CEC - .4byte 0xA, gUnknown_08622C04 - .4byte 0x1000A, gUnknown_08622C58 - .4byte 0xB, gUnknown_08622B08 - .4byte 0xC, gUnknown_08622E14 - .4byte 0x1000C, gUnknown_08622DC8 - .4byte 0xD, gUnknown_08623020 - .4byte 0x1000D, gUnknown_08622FD8 - .4byte 0xE, gUnknown_08622ED4 - .4byte 0xF, gUnknown_08622F14 - .4byte 0x1000F, gUnknown_08622F5C - -gUnknown_086231C8:: @ 86231C8 - .2byte 0x4000 - .2byte 0x4000 - .2byte 0x400 - .2byte 0x0 - -gUnknown_086231D0:: @ 86231D0 - spr_template 6, 11, gUnknown_086231C8, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81CCEF4 - -// pokenav_unk_6.s -// <none> - -// pokenav_unk_7.s -gUnknown_086231E8:: @ 86231E8 - .incbin "graphics/pokenav/86231E8.gbapal" - -gUnknown_08623208:: @ 8623208 - .incbin "graphics/pokenav/8623208.gbapal" - -gUnknown_08623228:: @ 8623228 - .incbin "graphics/pokenav/8623228.4bpp.lz" - -gUnknown_0862323C:: @ 862323C - .incbin "graphics/pokenav/862323C.bin.lz" - -gUnknown_08623338:: @ 8623338 - .incbin "graphics/pokenav/8623338.gbapal" - -gUnknown_08623358:: @ 8623358 - .4byte 0x11F5 - .4byte 0x21DE - .4byte 0x31EB - -gUnknown_08623364:: @ 8623364 - window_template 1, 13, 1, 13, 4, 15, 2 - -gUnknown_0862336C:: @ 862336C - window_template 1, 1, 6, 7, 2, 15, 0x36 - -gUnknown_08623374:: @ 8623374 - window_template 1, 1, 0x1C, 5, 2, 15, 0x44 - -gUnknown_0862337C:: @ 862337C - window_template 1, 13, 0x1C, 3, 2, 15, 0x44 - -// pokenav_unk_8.s -gUnknown_08623384:: @ 8623384 - .4byte NULL - .4byte sub_81CE37C - .4byte sub_81CE2D0 - .4byte sub_81CE4D8 - .4byte sub_81CE5E4 - .4byte sub_81CE6BC - .4byte sub_81CE700 - -gUnknown_086233A0:: @ 86233A0 - .4byte 0x16, 0x17, 0x18, 0x21, 0x2F - -gUnknown_086233B4:: @ 86233B4 - .4byte sub_81CF134 - .4byte sub_81CF1C4 - .4byte sub_81CF1D8 - .4byte sub_81CF278 - -gUnknown_086233C4:: @ 86233C4 - .incbin "graphics/pokenav/condition_search2.gbapal" - -gUnknown_086233E4:: @ 86233E4 - .incbin "graphics/pokenav/condition_search2.4bpp.lz" - -gUnknown_086234AC:: @ 86234AC - .incbin "graphics/pokenav/condition_search2.bin.lz" - -gUnknown_08623570:: @ 8623570 - .incbin "graphics/pokenav/8623570.gbapal" - -gUnknown_08623590:: @ 8623590 - .4byte 0x2065 - -gUnknown_08623594:: @ 8623594 - .4byte 0x307A - -gUnknown_08623598:: @ 8623598 - .4byte NULL - .4byte sub_81CF578 - .4byte sub_81CF5F0 - .4byte sub_81CF668 - .4byte sub_81CF6E0 - .4byte sub_81CF758 - .4byte sub_81CF798 - -gUnknown_086235B4:: @ 86235B4 - window_template 1, 1, 6, 7, 2, 1, 20 - -gUnknown_086235BC:: @ 86235BC - .string "{COLOR_HIGHLIGHT_SHADOW}{LIGHT_RED}{WHITE}{GREEN}♂{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}$" - .align 2 - -gUnknown_086235C8:: @ 86235C8 - .string "{COLOR_HIGHLIGHT_SHADOW}{LIGHT_GREEN}{WHITE}{BLUE}♀{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}$" - .align 2 - -gUnknown_086235D4:: @ 86235D4 - .string "{UNK_SPACER}$" - .align 2 - -// pokenav_unk_9.s -gUnknown_086235D8:: @ 86235D8 - .4byte sub_81CFB8C - .4byte sub_81CFC2C - .4byte sub_81CFC40 - -gUnknown_086235E4:: @ 86235E4 - .incbin "graphics/pokenav/ui_ribbons.gbapal" - -gUnknown_08623604:: @ 8623604 - .incbin "graphics/pokenav/ui_ribbons.4bpp.lz" - -gUnknown_086236CC:: @ 86236CC - .incbin "graphics/pokenav/ui_ribbons.bin.lz" - -gUnknown_08623790:: @ 8623790 - .incbin "graphics/pokenav/8623790.gbapal" - -gUnknown_086237B0:: @ 86237B0 - .4byte 0x2065 - -gUnknown_086237B4:: @ 86237B4 - .4byte 0x307A - -gUnknown_086237B8:: @ 86237B8 - .4byte NULL - .4byte sub_81CFFFC - .4byte sub_81D0074 - .4byte sub_81D00EC - .4byte sub_81D0164 - .4byte sub_81D01DC - .4byte sub_81D021C - -gUnknown_086237D4:: @ 86237D4 - window_template 1, 1, 6, 7, 2, 1, 20 - -gUnknown_086237DC:: @ 86237DC - .string "{COLOR_HIGHLIGHT_SHADOW}{LIGHT_RED}{WHITE}{GREEN}♂{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}$" - .align 2 - -gUnknown_086237E8:: @ 86237E8 - .string "{COLOR_HIGHLIGHT_SHADOW}{LIGHT_GREEN}{WHITE}{BLUE}♀{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}$" - .align 2 - -gUnknown_086237F4:: @ 86237F4 - .string "{UNK_SPACER}$" - .align 2 - -// pokenav_unk_10.s -gUnknown_086237F8:: @ 86237F8 - .byte 1, 1, 0, 0 - .byte 3, 4, 1, 0 - .byte 3, 4, 5, 0 - .byte 3, 4, 9, 0 - .byte 3, 4, 13, 0 - .byte 3, 4, 17, 0 - .byte 1, 1, 21, 0 - .byte 1, 1, 22, 0 - .byte 1, 1, 23, 0 - .byte 1, 1, 24, 0 - .byte 1, 1, 25, 1 - .byte 1, 1, 26, 1 - .byte 1, 1, 27, 1 - .byte 1, 1, 28, 1 - .byte 1, 1, 29, 1 - .byte 1, 1, 30, 1 - .byte 1, 1, 31, 1 - -@ 862383C - .include "data/text/ribbon_descriptions.inc" - -@ 8623A74 - .include "data/text/gift_ribbon_descriptions.inc" - -gUnknown_08623FF8:: @ 8623FF8 - .incbin "graphics/pokenav/ribbons_icon1.gbapal" - -gUnknown_08624018:: @ 8624018 - .incbin "graphics/pokenav/ribbons_icon2.gbapal" - -gUnknown_08624038:: @ 8624038 - .incbin "graphics/pokenav/ribbons_icon3.gbapal" - -gUnknown_08624058:: @ 8624058 - .incbin "graphics/pokenav/ribbons_icon4.gbapal" - -gUnknown_08624078:: @ 8624078 - .incbin "graphics/pokenav/ribbons_icon5.gbapal" - -gUnknown_08624098:: @ 8624098 - .incbin "graphics/pokenav/8624098.gbapal" - -gUnknown_086240B8:: @ 86240B8 - .incbin "graphics/pokenav/ribbons_icon.4bpp.lz" - -gUnknown_08624280:: @ 8624280 - .incbin "graphics/pokenav/ribbons_icon_big.4bpp.lz" - -gUnknown_08624B98:: @ 8624B98 - .4byte 0x107D - .4byte 0x2066 - -gUnknown_08624BA0:: @ 8624BA0 - .4byte NULL - .4byte sub_81D0C84 - .4byte sub_81D0D2C - .4byte sub_81D0D8C - .4byte sub_81D0E00 - .4byte sub_81D0C54 - -gUnknown_08624BB8:: @ 8624BB8 - window_template 2, 12, 13, 16, 4, 1, 20 - -gUnknown_08624BC0:: @ 8624BC0 - .byte 4, 2, 3, 0 - -gUnknown_08624BC4:: @ 8624BC4 - window_template 2, 14, 1, 13, 2, 10, 0x54 - -gUnknown_08624BCC:: @ 8624BCC - .string "{COLOR_HIGHLIGHT_SHADOW}{LIGHT_RED}{WHITE}{GREEN}♂{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}$" - .align 2 - -gUnknown_08624BD8:: @ 8624BD8 - .string "{COLOR_HIGHLIGHT_SHADOW}{LIGHT_GREEN}{WHITE}{BLUE}♀{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}$" - .align 2 - -gUnknown_08624BE4:: @ 8624BE4 - .string "{UNK_SPACER}$" - .align 2 - -gUnknown_08624BE8:: @ 8624BE8 - window_template 2, 1, 5, 7, 2, 1, 0x6E - .4byte NULL - .4byte NULL - -gUnknown_08624BF8:: @ 8624BF8 - .2byte 0, 0, 1, 0 - .2byte 2, 0, 3, 0 - .2byte 4, 0, 1, 1 - .2byte 2, 1, 3, 1 - .2byte 4, 1, 1, 2 - .2byte 2, 2, 3, 2 - .2byte 4, 2, 1, 3 - .2byte 2, 3, 3, 3 - .2byte 4, 3, 1, 4 - .2byte 2, 4, 3, 4 - .2byte 4, 4, 5, 0 - .2byte 6, 0, 7, 1 - .2byte 8, 2, 9, 1 - .2byte 9, 3, 9, 4 - .2byte 10, 3, 10, 4 - .2byte 11, 0, 11, 1 - -gUnknown_08624C78:: @ 8624C78 - obj_tiles gUnknown_08624280, 0x1800, 9 - -gUnknown_08624C80:: @ 8624C80 - obj_pal gUnknown_08623FF8, 15 - obj_pal gUnknown_08624018, 16 - obj_pal gUnknown_08624038, 17 - obj_pal gUnknown_08624058, 18 - obj_pal gUnknown_08624078, 19 - null_obj_pal - -gUnknown_08624CB0:: @ 8624CB0 - .2byte 0x100 - .2byte 0x8000 - .2byte 0x400 - .2byte 0x0 - -gUnknown_08624CB8:: @ 8624CB8 - .2byte 0x80 - .2byte 0x80 - .2byte 0 - .2byte 0 - .2byte 0x7FFF - .2byte 0 - .2byte 0 - .2byte 0 - -gUnknown_08624CC8:: @ 8624CC8 - .2byte 0x80 - .2byte 0x80 - .2byte 0 - .2byte 0 - .2byte 0x20 - .2byte 0x20 - .2byte 0x400 - .2byte 0 - .2byte 0x7FFF - .2byte 0 - .2byte 0 - .2byte 0 - -gUnknown_08624CE0:: @ 8624CE0 - .2byte 0x100 - .2byte 0x100 - .2byte 0 - .2byte 0 - .2byte 0xFFE0 - .2byte 0xFFE0 - .2byte 0x400 - .2byte 0 - .2byte 0x7FFF - .2byte 0 - .2byte 0 - .2byte 0 - -gUnknown_08624CF8:: @ 8624CF8 - .4byte gUnknown_08624CB8 - .4byte gUnknown_08624CC8 - .4byte gUnknown_08624CE0 - -gUnknown_08624D04:: @ 8624D04 - spr_template 9, 15, gUnknown_08624CB0, gDummySpriteAnimTable, NULL, gUnknown_08624CF8, SpriteCallbackDummy diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index fe3fa9fae..eeecf2d75 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -1390,34 +1390,34 @@ EventScript_277BB4:: @ 8277BB4 end OldaleTown_PokemonCenter_2F_EventScript_277BBE:: @ 8277BBE - setmetatile 5, 2, 732, 0 - setmetatile 5, 3, 740, 0 + setmetatile 5, 2, METATILE_PokemonCenter_Floor_ShadowTop_Alt, 0 + setmetatile 5, 3, METATILE_PokemonCenter_Floor_Plain_Alt, 0 return OldaleTown_PokemonCenter_2F_EventScript_277BD1:: @ 8277BD1 - setmetatile 5, 2, 542, 1 - setmetatile 5, 3, 605, 1 + setmetatile 5, 2, METATILE_PokemonCenter_Floor_ShadowTop, 1 + setmetatile 5, 3, METATILE_PokemonCenter_CounterBarrier, 1 return OldaleTown_PokemonCenter_2F_EventScript_277BE4:: @ 8277BE4 - setmetatile 9, 2, 732, 0 - setmetatile 9, 3, 740, 0 + setmetatile 9, 2, METATILE_PokemonCenter_Floor_ShadowTop_Alt, 0 + setmetatile 9, 3, METATILE_PokemonCenter_Floor_Plain_Alt, 0 return OldaleTown_PokemonCenter_2F_EventScript_277BF7:: @ 8277BF7 - setmetatile 9, 2, 542, 1 - setmetatile 9, 3, 605, 1 + setmetatile 9, 2, METATILE_PokemonCenter_Floor_ShadowTop, 1 + setmetatile 9, 3, METATILE_PokemonCenter_CounterBarrier, 1 return MossdeepCity_GameCorner_1F_EventScript_277C0A:: @ 8277C0A OldaleTown_PokemonCenter_2F_EventScript_277C0A:: @ 8277C0A - setmetatile 5, 2, 556, 0 - setmetatile 5, 3, 564, 0 + setmetatile 5, 2, METATILE_MossdeepGameCorner_CounterOpen_Top, 0 + setmetatile 5, 3, METATILE_MossdeepGameCorner_CounterOpen_Bottom, 0 return OldaleTown_PokemonCenter_2F_EventScript_277C1D:: @ 8277C1D - setmetatile 5, 2, 554, 1 - setmetatile 5, 3, 562, 1 + setmetatile 5, 2, METATILE_MossdeepGameCorner_CounterClosed_Top, 1 + setmetatile 5, 3, METATILE_MossdeepGameCorner_CounterClosed_Bottom, 1 return BattleFrontier_PokemonCenter_1F_MapScript1_277C30: @ 8277C30 diff --git a/data/specials.inc b/data/specials.inc index 7a2b0f975..78a949df5 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -134,7 +134,7 @@ gSpecials:: @ 81DBA64 def_special CompareSeedotSize def_special GetLotadSizeRecordInfo def_special CompareLotadSize - def_special TV_PutNameRaterShowOnTheAirIfNicnkameChanged + def_special TV_PutNameRaterShowOnTheAirIfNicknameChanged def_special TV_CopyNicknameToStringVar1AndEnsureTerminated def_special TV_CheckMonOTIDEqualsPlayerID def_special BufferTrendyPhraseString diff --git a/data/text/gift_ribbon_descriptions.inc b/data/text/gift_ribbon_descriptions.inc deleted file mode 100644 index 47e004d67..000000000 --- a/data/text/gift_ribbon_descriptions.inc +++ /dev/null @@ -1,207 +0,0 @@ -gGiftRibbonDescriptionPart1_2003RegionalTourney:: @ 8623A74 - .string "2003 REGIONAL TOURNEY$" - -gGiftRibbonDescriptionPart2_Champion:: @ 8623A8A - .string "CHAMPION RIBBON$" - -gGiftRibbonDescriptionPart1_2003NationalTourney:: @ 8623A9A - .string "2003 NATIONAL TOURNEY$" - -gGiftRibbonDescriptionPart1_2003GlobalCup:: @ 8623AB0 - .string "2003 GLOBAL CUP$" - -gGiftRibbonDescriptionPart2_RunnerUp:: @ 8623AC0 - .string "Runner-up RIBBON$" - -gGiftRibbonDescriptionPart2_Semifinalist:: @ 8623AD1 - .string "Semifinalist RIBBON$" - -gGiftRibbonDescriptionPart1_2004RegionalTourney:: @ 8623AE5 - .string "2004 REGIONAL TOURNEY$" - -gGiftRibbonDescriptionPart1_2004NationalTourney:: @ 8623AFB - .string "2004 NATIONAL TOURNEY$" - -gGiftRibbonDescriptionPart1_2004GlobalCup:: @ 8623B11 - .string "2004 GLOBAL CUP$" - -gGiftRibbonDescriptionPart1_2005RegionalTourney:: @ 8623B21 - .string "2005 REGIONAL TOURNEY$" - -gGiftRibbonDescriptionPart1_2005NationalTourney:: @ 8623B37 - .string "2005 NATIONAL TOURNEY$" - -gGiftRibbonDescriptionPart1_2005GlobalCup:: @ 8623B4D - .string "2005 GLOBAL CUP$" - -gGiftRibbonDescriptionPart1_PokemonBattleCup:: @ 8623B5D - .string "POKéMON BATTLE CUP$" - -gGiftRibbonDescriptionPart2_Participation:: @ 8623B70 - .string "Participation RIBBON$" - -gGiftRibbonDescriptionPart1_PokemonLeague:: @ 8623B85 - .string "POKéMON LEAGUE$" - -gGiftRibbonDescriptionPart1_AdvanceCup:: @ 8623B94 - .string "ADVANCE CUP$" - -gGiftRibbonDescriptionPart1_PokemonTournament:: @ 8623BA0 - .string "POKéMON Tournament$" - -gGiftRibbonDescriptionPart2_Participation2:: @ 8623BB3 - .string "Participation RIBBON$" - -gGiftRibbonDescriptionPart1_PokemonEvent:: @ 8623BC8 - .string "POKéMON Event$" - -gGiftRibbonDescriptionPart1_PokemonFestival:: @ 8623BD6 - .string "POKéMON Festival$" - -gGiftRibbonDescriptionPart1_DifficultyClearing:: @ 8623BE7 - .string "Difficulty-clearing$" - -gGiftRibbonDescriptionPart2_Commemorative:: @ 8623BFB - .string "Commemorative RIBBON$" - -gGiftRibbonDescriptionPart1_ClearingAllChallenges:: @ 8623C10 - .string "RIBBON awarded for$" - -gGiftRibbonDescriptionPart2_ClearingAllChallenges:: @ 8623C23 - .string "clearing all challenges.$" - -gGiftRibbonDescriptionPart1_100StraightWin:: @ 8623C3C - .string "100-straight Win$" - -gGiftRibbonDescriptionPart1_DarknessTower:: @ 8623C4D - .string "DARKNESS TOWER Clear$" - -gGiftRibbonDescriptionPart1_RedTower:: @ 8623C62 - .string "RED TOWER Clear$" - -gGiftRibbonDescriptionPart1_BlackironTower:: @ 8623C72 - .string "BLACKIRON TOWER Clear$" - -gGiftRibbonDescriptionPart1_FinalTower:: @ 8623C88 - .string "FINAL TOWER Clear$" - -gGiftRibbonDescriptionPart1_LegendMaking:: @ 8623C9A - .string "Legend-making$" - -gGiftRibbonDescriptionPart1_PokemonCenterTokyo:: @ 8623CA8 - .string "POKéMON CENTER TOKYO$" - -gGiftRibbonDescriptionPart1_PokemonCenterOsaka:: @ 8623CBD - .string "POKéMON CENTER OSAKA$" - -gGiftRibbonDescriptionPart1_PokemonCenterNagoya:: @ 8623CD2 - .string "POKéMON CENTER NAGOYA$" - -gGiftRibbonDescriptionPart1_PokemonCenterNY:: @ 8623CE8 - .string "POKéMON CENTER NY$" - -gGiftRibbonDescriptionPart1_SummerHolidays:: @ 8623CFA - .string "Summer Holidays RIBBON$" - -gGiftRibbonDescriptionPart2_EmptyString:: @ 8623D11 - .string "$" - -gGiftRibbonDescriptionPart1_WinterHolidays:: @ 8623D12 - .string "Winter Holidays RIBBON$" - -gGiftRibbonDescriptionPart1_SpringHolidays:: @ 8623D29 - .string "Spring Holidays RIBBON$" - -gGiftRibbonDescriptionPart1_Evergreen:: @ 8623D40 - .string "Evergreen RIBBON$" - -gGiftRibbonDescriptionPart1_SpecialHoliday:: @ 8623D51 - .string "Special Holiday RIBBON$" - -gGiftRibbonDescriptionPart1_HardWorker:: @ 8623D68 - .string "Hard Worker RIBBON$" - -gGiftRibbonDescriptionPart1_LotsOfFriends:: @ 8623D7B - .string "Lots of Friends RIBBON$" - -gGiftRibbonDescriptionPart1_FullOfEnergy:: @ 8623D92 - .string "Full of Energy RIBBON$" - -gGiftRibbonDescriptionPart1_LovedPokemon:: @ 8623DA8 - .string "A commemorative RIBBON$" - -gGiftRibbonDescriptionPart2_LovedPokemon:: @ 8623DBF - .string "for a loved POKéMON.$" - -gGiftRibbonDescriptionPart1_LoveForPokemon:: @ 8623DD4 - .string "RIBBON that shows$" - -gGiftRibbonDescriptionPart2_LoveForPokemon:: @ 8623DE6 - .string "love for POKéMON.$" - - .align 2 -gGiftRibbonDescriptionPointers:: @ 8623DF8 - .4byte gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Participation - .4byte gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Participation - .4byte gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Participation - .4byte gGiftRibbonDescriptionPart1_PokemonTournament, gGiftRibbonDescriptionPart2_Participation2 - .4byte gGiftRibbonDescriptionPart1_PokemonEvent, gGiftRibbonDescriptionPart2_Participation2 - .4byte gGiftRibbonDescriptionPart1_PokemonFestival, gGiftRibbonDescriptionPart2_Participation2 - .4byte gGiftRibbonDescriptionPart1_DifficultyClearing, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_ClearingAllChallenges, gGiftRibbonDescriptionPart2_ClearingAllChallenges - .4byte gGiftRibbonDescriptionPart1_100StraightWin, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_DarknessTower, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_RedTower, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_BlackironTower, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_FinalTower, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_LegendMaking, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_PokemonCenterTokyo, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_PokemonCenterOsaka, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_PokemonCenterNagoya, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_PokemonCenterNY, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_SummerHolidays, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_WinterHolidays, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_SpringHolidays, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_Evergreen, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_SpecialHoliday, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_HardWorker, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_LotsOfFriends, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_FullOfEnergy, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_LovedPokemon, gGiftRibbonDescriptionPart2_LovedPokemon - .4byte gGiftRibbonDescriptionPart1_LoveForPokemon, gGiftRibbonDescriptionPart2_LoveForPokemon diff --git a/data/text/ribbon_descriptions.inc b/data/text/ribbon_descriptions.inc deleted file mode 100644 index 6dd82c288..000000000 --- a/data/text/ribbon_descriptions.inc +++ /dev/null @@ -1,84 +0,0 @@ -gRibbonDescriptionPart1_Champion:: @ 862383C - .string "CHAMPION-beating, HALL$" - -gRibbonDescriptionPart2_Champion:: @ 8623853 - .string "OF FAME Member RIBBON$" - -gRibbonDescriptionPart1_CoolContest:: @ 8623869 - .string "COOL CONTEST$" - -gRibbonDescriptionPart1_BeautyContest:: @ 8623876 - .string "BEAUTY CONTEST$" - -gRibbonDescriptionPart1_CuteContest:: @ 8623885 - .string "CUTE CONTEST$" - -gRibbonDescriptionPart1_SmartContest:: @ 8623892 - .string "SMART CONTEST$" - -gRibbonDescriptionPart1_ToughContest:: @ 86238A0 - .string "TOUGH CONTEST$" - -gRibbonDescriptionPart2_NormalRank:: @ 86238AE - .string "Normal Rank winner!$" - -gRibbonDescriptionPart2_SuperRank:: @ 86238C2 - .string "Super Rank winner!$" - -gRibbonDescriptionPart2_HyperRank:: @ 86238D5 - .string "Hyper Rank winner!$" - -gRibbonDescriptionPart2_MasterRank:: @ 86238E8 - .string "Master Rank winner!$" - -gRibbonDescriptionPart1_Winning:: @ 86238FC - .string "For clearing LV50$" - -gRibbonDescriptionPart2_Winning:: @ 862390E - .string "at the BATTLE TOWER.$" - -gRibbonDescriptionPart1_Victory:: @ 8623923 - .string "For clearing Open Level$" - -gRibbonDescriptionPart2_Victory:: @ 862393B - .string "at the BATTLE TOWER.$" - -gRibbonDescriptionPart1_Artist:: @ 8623950 - .string "RIBBON for being chosen$" - -gRibbonDescriptionPart2_Artist:: @ 8623968 - .string "as a super sketch model.$" - -gRibbonDescriptionPart1_Effort:: @ 8623981 - .string "RIBBON awarded for$" - -gRibbonDescriptionPart2_Effort:: @ 8623994 - .string "being a hard worker.$" - - .align 2 -gRibbonDescriptionPointers:: @ 86239AC - .4byte gRibbonDescriptionPart1_Champion, gRibbonDescriptionPart2_Champion - .4byte gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_NormalRank - .4byte gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_SuperRank - .4byte gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_HyperRank - .4byte gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_MasterRank - .4byte gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_NormalRank - .4byte gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_SuperRank - .4byte gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_HyperRank - .4byte gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_MasterRank - .4byte gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_NormalRank - .4byte gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_SuperRank - .4byte gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_HyperRank - .4byte gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_MasterRank - .4byte gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_NormalRank - .4byte gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_SuperRank - .4byte gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_HyperRank - .4byte gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_MasterRank - .4byte gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_NormalRank - .4byte gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_SuperRank - .4byte gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_HyperRank - .4byte gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_MasterRank - .4byte gRibbonDescriptionPart1_Winning, gRibbonDescriptionPart2_Winning - .4byte gRibbonDescriptionPart1_Victory, gRibbonDescriptionPart2_Victory - .4byte gRibbonDescriptionPart1_Artist, gRibbonDescriptionPart2_Artist - .4byte gRibbonDescriptionPart1_Effort, gRibbonDescriptionPart2_Effort diff --git a/data/use_pokeblock.s b/data/use_pokeblock.s deleted file mode 100644 index dc2c7bd70..000000000 --- a/data/use_pokeblock.s +++ /dev/null @@ -1,113 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - -.align 4 - -gUnknown_085DFA60:: @ 85DFA60 - .incbin "graphics/interface/85DFA60.bin" - -gUnknown_085DFA80:: @ 85DFA80 - .incbin "graphics/interface/85DFA80.4bpp" - -gUnknown_085DFB60:: @ 85DFB60 - .incbin "graphics/interface/85DFB60.bin" - -gUnknown_085DFC0C:: @ 85DFC0C - .incbin "graphics/interface/85DFC0C.bin" - -gUnknown_085DFCB0:: @ 85DFCB0 - .4byte 22, 47, 33, 24, 23 - -gUnknown_085DFCC4:: @ 85DFCC4 - .byte 0, 4, 3, 2, 1 - -gUnknown_085DFCC9:: @ 85DFCC9 - .byte 0, 8, 1 - -gUnknown_085DFCCC:: @ 85DFCCC - .4byte 0x1F8 - .4byte 0x31E1 - .4byte 0x4021DF - .4byte 0x1172 - -gUnknown_085DFCDC:: @ 85DFCDC - window_template 0, 0xD, 1, 0xD, 4, 0xF, 1 - window_template 0, 0, 0xE, 0xB, 2, 0xF, 0x35 - window_template 0, 1, 0x11, 0x1C, 2, 0xF, 0x4B - null_window_template - -sUsePokeblockYesNoWinTemplate:: @ 85DFCFC - window_template 0, 0x18, 0xB, 5, 4, 0xF, 0x83 - -sContestStatNames:: @ 85DFD04 - .4byte gText_Coolness - .4byte gText_Toughness - .4byte gText_Smartness - .4byte gText_Cuteness - .4byte gText_Beauty3 - -gSpriteSheet_ConditionUpDown:: @ 85DFD18 - obj_tiles gUsePokeblockUpDown_Gfx, 0x200, 0 - -gSpritePalette_ConditionUpDown:: @ 85DFD20 - obj_pal gUsePokeblockUpDown_Pal, 0 - -gUnknown_085DFD28:: @ 85DFD28 - .2byte 0x9c, 0x24 - .2byte 0x75, 0x3b - .2byte 0x75, 0x76 - .2byte 0xc5, 0x76 - .2byte 0xc5, 0x3b - -gUnknown_085DFD3C:: @ 85DFD3C - .2byte 0x4000 - .2byte 0x8000 - .2byte 0x400 - .2byte 0 - -gUnknown_085DFD44:: @ 85DFD44 - obj_image_anim_frame 0, 5 - obj_image_anim_end - -gUnknown_085DFD4C:: @ 85DFD4C - obj_image_anim_frame 8, 5 - obj_image_anim_end - -gUnknown_085DFD54:: @ 85DFD54 - .4byte gUnknown_085DFD44 - .4byte gUnknown_085DFD4C - -gSpriteTemplate_085DFD5C:: @ 85DFD5C - spr_template 0, 0, gUnknown_085DFD3C, gUnknown_085DFD54, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy - -gUnknown_085DFD74:: @ 85DFD74 - .2byte 0x4000 - .2byte 0xC000 - .2byte 0x400 - .2byte 0 - -gUnknown_085DFD7C:: @ 85DFD7C - obj_image_anim_frame 0, 5 - obj_image_anim_end - -gUnknown_085DFD84:: @ 85DFD84 - obj_image_anim_frame 32, 5 - obj_image_anim_end - -gUnknown_085DFD8C:: @ 85DFD8C - obj_image_anim_frame 64, 5 - obj_image_anim_end - -gUnknown_085DFD94:: @ 85DFD94 - .4byte gUnknown_085DFD7C - .4byte gUnknown_085DFD84 - .4byte gUnknown_085DFD8C - -gUnknown_085DFDA0:: @ 85DFDA0 - spr_template 1, 1, gUnknown_085DFD74, gUnknown_085DFD94, NULL, gDummySpriteAffineAnimTable, sub_8168374 - -gUnknown_085DFDB8:: @ 85DFDB8 - .4byte gUsePokeblockCondition_Pal - .4byte 1 diff --git a/graphics/unknown/unknown_D9AE04.bin b/graphics/interface/bag_pyramid_tilemap.bin Binary files differindex 28ad3f927..28ad3f927 100644 --- a/graphics/unknown/unknown_D9AE04.bin +++ b/graphics/interface/bag_pyramid_tilemap.bin diff --git a/graphics/unknown/unknown_D9A88C.bin b/graphics/interface/bag_screen_tilemap.bin Binary files differindex c2ceaf139..c2ceaf139 100644 --- a/graphics/unknown/unknown_D9A88C.bin +++ b/graphics/interface/bag_screen_tilemap.bin diff --git a/graphics/pokenav/city_maps/lilycove_0.bin b/graphics/pokenav/city_maps/lilycove_0.bin index e8bf09eae..99895574d 100644 --- a/graphics/pokenav/city_maps/lilycove_0.bin +++ b/graphics/pokenav/city_maps/lilycove_0.bin @@ -1 +1,3 @@ -0000000000000000000000000000000 0
0000000000000000000
00000000000000000000
00000000000000000000000000000
\ No newline at end of file +000000000000000000000000000000000 0 0 0 00 000000000 +00000 0 0 0 0 00 000000000 +000000 0 0 0 00 0000000000000000000000
\ No newline at end of file diff --git a/graphics/pokenav/city_maps/lilycove_1.bin b/graphics/pokenav/city_maps/lilycove_1.bin index 99895574d..e8bf09eae 100644 --- a/graphics/pokenav/city_maps/lilycove_1.bin +++ b/graphics/pokenav/city_maps/lilycove_1.bin @@ -1,3 +1 @@ -000000000000000000000000000000000 0 0 0 00 000000000 -00000 0 0 0 0 00 000000000 -000000 0 0 0 00 0000000000000000000000
\ No newline at end of file +0000000000000000000000000000000 0
0000000000000000000
00000000000000000000
00000000000000000000000000000
\ No newline at end of file diff --git a/graphics/pokenav/city_maps/mauville_0.bin b/graphics/pokenav/city_maps/mauville_0.bin index 103d39e54..a0662010a 100644 --- a/graphics/pokenav/city_maps/mauville_0.bin +++ b/graphics/pokenav/city_maps/mauville_0.bin @@ -1,3 +1,3 @@ -000000000000000000000000000000000000000000 00 00 0
000000 -0000000000 -00000000 0 00
00000000000000000000000000
\ No newline at end of file +000000000000000000000000000000000000 +000000000 00 0 000000 +00000000000000000000000 0 0000000000000000000000
\ No newline at end of file diff --git a/graphics/pokenav/city_maps/mauville_1.bin b/graphics/pokenav/city_maps/mauville_1.bin index a0662010a..103d39e54 100644 --- a/graphics/pokenav/city_maps/mauville_1.bin +++ b/graphics/pokenav/city_maps/mauville_1.bin @@ -1,3 +1,3 @@ -000000000000000000000000000000000000 -000000000 00 0 000000 -00000000000000000000000 0 0000000000000000000000
\ No newline at end of file +000000000000000000000000000000000000000000 00 00 0
000000 +0000000000 +00000000 0 00
00000000000000000000000000
\ No newline at end of file diff --git a/graphics/pokenav/city_maps/mossdeep_0.bin b/graphics/pokenav/city_maps/mossdeep_0.bin index fd03cfe02..6c11d5624 100644 --- a/graphics/pokenav/city_maps/mossdeep_0.bin +++ b/graphics/pokenav/city_maps/mossdeep_0.bin @@ -1 +1,3 @@ -0000000000000000000000000000000000000000000000000000000000000000000000000000000000 0 00000000000000000
\ No newline at end of file +00000000000000000000000000 0
00000000 +0000000000 +000000000 000000000000 0 000000000000000000000000000000000
\ No newline at end of file diff --git a/graphics/pokenav/city_maps/mossdeep_1.bin b/graphics/pokenav/city_maps/mossdeep_1.bin index 6c11d5624..fd03cfe02 100644 --- a/graphics/pokenav/city_maps/mossdeep_1.bin +++ b/graphics/pokenav/city_maps/mossdeep_1.bin @@ -1,3 +1 @@ -00000000000000000000000000 0
00000000 -0000000000 -000000000 000000000000 0 000000000000000000000000000000000
\ No newline at end of file +0000000000000000000000000000000000000000000000000000000000000000000000000000000000 0 00000000000000000
\ No newline at end of file diff --git a/include/battle_message.h b/include/battle_message.h index 5d811fe69..88ccbb90f 100644 --- a/include/battle_message.h +++ b/include/battle_message.h @@ -154,7 +154,7 @@ { \ textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \ textVar[1] = B_BUFF_MOVE; \ - textVar[2] = move; \ + textVar[2] = (move & 0xFF); \ textVar[3] = (move & 0xFF00) >> 8; \ textVar[4] = B_BUFF_EOS; \ } diff --git a/include/berry_crush.h b/include/berry_crush.h index 101450a33..8909ae821 100755 --- a/include/berry_crush.h +++ b/include/berry_crush.h @@ -1,6 +1,8 @@ #ifndef GUARD_BERRY_CRUSH_H #define GUARD_BERRY_CRUSH_H +#include "main.h" + void sub_8020C70(MainCallback callback); #endif // GUARD_BERRY_CRUSH_H diff --git a/include/constants/flags.h b/include/constants/flags.h index 732c68764..7aa5c3ed3 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -725,7 +725,7 @@ #define FLAG_HIDE_ROUTE_111_VICTORIA_WINSTRATE 0x301 #define FLAG_HIDE_ROUTE_111_VIVI_WINSTRATE 0x302 #define FLAG_HIDE_ROUTE_111_VICKY_WINSTRATE 0x303 -#define FLAG_HIDE_PETALYBURG_GYM_NORMAN 0x304 +#define FLAG_HIDE_PETALBURG_GYM_NORMAN 0x304 #define FLAG_HIDE_SKY_PILLAR_TOP_RAYQUAZA_2 0x305 #define FLAG_HIDE_LILYCOVE_CONTEST_HALL_CONTEST_ATTENDANT_1 0x306 #define FLAG_HIDE_LILYCOVE_MUSEUM_CURATOR 0x307 diff --git a/include/constants/map_scripts.h b/include/constants/map_scripts.h index d5fd40156..26de3ebc6 100644 --- a/include/constants/map_scripts.h +++ b/include/constants/map_scripts.h @@ -9,4 +9,4 @@ #define MAP_SCRIPT_ON_DIVE_WARP 6 #define MAP_SCRIPT_ON_RETURN_TO_FIELD 7 -#endif // GUARD_CONSTANTS_MAP_SCRIPTS_H
\ No newline at end of file +#endif // GUARD_CONSTANTS_MAP_SCRIPTS_H diff --git a/include/constants/metatile_labels.h b/include/constants/metatile_labels.h new file mode 100644 index 000000000..8fe95b464 --- /dev/null +++ b/include/constants/metatile_labels.h @@ -0,0 +1,413 @@ +#ifndef GUARD_METATILE_LABELS_H +#define GUARD_METATILE_LABELS_H + +// gTileset_General +#define METATILE_General_Grass 0x001 +#define METATILE_General_TallGrass 0x00D +#define METATILE_General_LongGrass 0x015 +#define METATILE_General_TallGrass_TreeUp 0x025 +#define METATILE_General_Grass_TreeUp 0x00E +#define METATILE_General_TallGrass_TreeLeft 0x1C6 +#define METATILE_General_TallGrass_TreeRight 0x1C7 +#define METATILE_General_Grass_TreeLeft 0x1CE +#define METATILE_General_Grass_TreeRight 0x1CF +#define METATILE_General_MuddySlope_Frame0 0x0E8 +#define METATILE_General_MuddySlope_Frame1 0x0E9 +#define METATILE_General_MuddySlope_Frame2 0x0EA +#define METATILE_General_MuddySlope_Frame3 0x0EB +#define METATILE_General_SandPit_Center 0x121 +#define METATILE_General_CaveEntrance_Top 0x09F +#define METATILE_General_CaveEntrance_Bottom 0x0A7 +#define METATILE_General_RockWall_GrassBase 0x079 +#define METATILE_General_RockWall_RockBase 0x07C +#define METATILE_General_RockWall_SandBase 0x091 +#define METATILE_General_CalmWater 0x170 +#define METATILE_General_RoughWater 0x14E +#define METATILE_General_RoughDeepWater 0x14F +#define METATILE_General_ReflectiveWater 0x0A1 + +// gTileset_Building +#define METATILE_Building_PC_Off 0x004 +#define METATILE_Building_PC_On 0x005 + +// gTileset_MauvilleGym +#define METATILE_MauvilleGym_RaisedSwitch 0x205 +#define METATILE_MauvilleGym_PressedSwitch 0x206 +#define METATILE_MauvilleGym_FloorTile 0x21A +#define METATILE_MauvilleGym_GreenBeamH1_On 0x220 +#define METATILE_MauvilleGym_GreenBeamH2_On 0x221 +#define METATILE_MauvilleGym_GreenBeamH3_On 0x228 +#define METATILE_MauvilleGym_GreenBeamH4_On 0x229 +#define METATILE_MauvilleGym_GreenBeamH1_Off 0x230 +#define METATILE_MauvilleGym_GreenBeamH2_Off 0x231 +#define METATILE_MauvilleGym_GreenBeamH3_Off 0x238 +#define METATILE_MauvilleGym_GreenBeamH4_Off 0x239 +#define METATILE_MauvilleGym_RedBeamH1_On 0x222 +#define METATILE_MauvilleGym_RedBeamH2_On 0x223 +#define METATILE_MauvilleGym_RedBeamH3_On 0x22A +#define METATILE_MauvilleGym_RedBeamH4_On 0x22B +#define METATILE_MauvilleGym_RedBeamH1_Off 0x232 +#define METATILE_MauvilleGym_RedBeamH2_Off 0x233 +#define METATILE_MauvilleGym_RedBeamH3_Off 0x23A +#define METATILE_MauvilleGym_RedBeamH4_Off 0x23B +#define METATILE_MauvilleGym_GreenBeamV1_On 0x240 +#define METATILE_MauvilleGym_GreenBeamV2_On 0x248 +#define METATILE_MauvilleGym_RedBeamV1_On 0x241 +#define METATILE_MauvilleGym_RedBeamV2_On 0x249 +#define METATILE_MauvilleGym_PoleTop_On 0x250 +#define METATILE_MauvilleGym_PoleTop_Off 0x251 +#define METATILE_MauvilleGym_PoleBottom_On 0x242 +#define METATILE_MauvilleGym_PoleBottom_Off 0x243 + +// gTileset_PetalburgGym +#define METATILE_PetalburgGym_RoomEntrance_Left 0x210 +#define METATILE_PetalburgGym_RoomEntrance_Right 0x211 +#define METATILE_PetalburgGym_SlidingDoor_Frame0 0x218 +#define METATILE_PetalburgGym_SlidingDoor_Frame1 0x219 +#define METATILE_PetalburgGym_SlidingDoor_Frame2 0x21A +#define METATILE_PetalburgGym_SlidingDoor_Frame3 0x21B +#define METATILE_PetalburgGym_SlidingDoor_Frame4 0x21C + +// gTileset_MossdeepGym +#define METATILE_MossdeepGym_Obelisk_Top 0x204 +#define METATILE_MossdeepGym_Obelisk_Base 0x20C +#define METATILE_MossdeepGym_Wall_LeftCorner 0x20D +#define METATILE_MossdeepGym_OuterWall_RightCorner 0x205 +#define METATILE_MossdeepGym_Empty0 0x238 +#define METATILE_MossdeepGym_Empty1 0x239 + +// gTileset_BrendansMaysHouse +#define METATILE_BrendansMaysHouse_BrendanPC_Off 0x25A +#define METATILE_BrendansMaysHouse_BrendanPC_On 0x27F +#define METATILE_BrendansMaysHouse_MayPC_Off 0x259 +#define METATILE_BrendansMaysHouse_MayPC_On 0x27E +#define METATILE_BrendansMaysHouse_MovingBox_Closed 0x268 +#define METATILE_BrendansMaysHouse_MovingBox_Open 0x270 +#define METATILE_BrendansMaysHouse_BookOnTable 0x293 + +// gTileset_Shop +#define METATILE_Shop_Laptop1_Normal 0x29D +#define METATILE_Shop_Laptop2_Normal 0x2A5 +#define METATILE_Shop_Laptop1_Flash 0x258 +#define METATILE_Shop_Laptop2_Flash 0x260 + +// gTileset_BattleFrontier +#define METATILE_BattleFrontier_CorridorOpenDoor_Top 0x207 +#define METATILE_BattleFrontier_CorridorOpenDoor_Bottom 0x20F +#define METATILE_BattleFrontier_Elevator_Top0 0x329 +#define METATILE_BattleFrontier_Elevator_Top1 0x32A +#define METATILE_BattleFrontier_Elevator_Top2 0x32B +#define METATILE_BattleFrontier_Elevator_Mid0 0x331 +#define METATILE_BattleFrontier_Elevator_Mid1 0x332 +#define METATILE_BattleFrontier_Elevator_Mid2 0x333 +#define METATILE_BattleFrontier_Elevator_Bottom0 0x339 +#define METATILE_BattleFrontier_Elevator_Bottom1 0x33A +#define METATILE_BattleFrontier_Elevator_Bottom2 0x33B + +// gTileset_Cave +#define METATILE_Cave_EntranceCover 0x229 +#define METATILE_Cave_SealedChamberEntrance_TopLeft 0x22A +#define METATILE_Cave_SealedChamberEntrance_TopMid 0x22B +#define METATILE_Cave_SealedChamberEntrance_TopRight 0x22C +#define METATILE_Cave_SealedChamberEntrance_BottomLeft 0x232 +#define METATILE_Cave_SealedChamberEntrance_BottomMid 0x233 +#define METATILE_Cave_SealedChamberEntrance_BottomRight 0x234 +#define METATILE_Cave_SealedChamberBraille_Mid 0x235 +#define METATILE_Cave_ShoalCave_DirtPile_Large 0x358 +#define METATILE_Cave_ShoalCave_DirtPile_Small 0x35A +#define METATILE_Cave_ShoalCave_BlueStone_Large 0x359 +#define METATILE_Cave_ShoalCave_BlueStone_Small 0x35B + +// gTileset_Pacifidlog +#define METATILE_Pacifidlog_FloatingLogs_Horizontal0 0x250 +#define METATILE_Pacifidlog_FloatingLogs_Horizontal1 0x251 +#define METATILE_Pacifidlog_HalfSubmergedLogs_Horizontal0 0x252 +#define METATILE_Pacifidlog_HalfSubmergedLogs_Horizontal1 0x253 +#define METATILE_Pacifidlog_SubmergedLogs_Horizontal0 0x254 +#define METATILE_Pacifidlog_SubmergedLogs_Horizontal1 0x255 +#define METATILE_Pacifidlog_FloatingLogs_Vertical0 0x258 +#define METATILE_Pacifidlog_FloatingLogs_Vertical1 0x260 +#define METATILE_Pacifidlog_HalfSubmergedLogs_Vertical0 0x259 +#define METATILE_Pacifidlog_HalfSubmergedLogs_Vertical1 0x261 +#define METATILE_Pacifidlog_SubmergedLogs_Vertical0 0x25A +#define METATILE_Pacifidlog_SubmergedLogs_Vertical1 0x262 +#define METATILE_Pacifidlog_SkyPillar_DoorOpen_Top 0x2AA +#define METATILE_Pacifidlog_SkyPillar_DoorOpen_Bottom 0x2B2 + +// gTileset_Fortree +#define METATILE_Fortree_LongGrass_Root 0x208 +#define METATILE_Fortree_BridgeOverGrass_Raised 0x24E +#define METATILE_Fortree_BridgeOverGrass_Lowered 0x24F +#define METATILE_Fortree_BridgeOverTrees_Raised 0x256 +#define METATILE_Fortree_BridgeOverTrees_Lowered 0x257 +#define METATILE_Fortree_SecretBase_LongGrass_TopLeft 0x279 +#define METATILE_Fortree_SecretBase_LongGrass_TopMid 0x27A +#define METATILE_Fortree_SecretBase_LongGrass_TopRight 0x27B +#define METATILE_Fortree_SecretBase_LongGrass_BottomLeft 0x281 +#define METATILE_Fortree_SecretBase_LongGrass_BottomMid 0x282 +#define METATILE_Fortree_SecretBase_LongGrass_BottomRight 0x283 +#define METATILE_Fortree_WoodBridge_Kecleon0 0x297 +#define METATILE_Fortree_WoodBridge_Kecleon1 0x29F + +// gTileset_Sootopolis +#define METATILE_Sootopolis_Door_Closed 0x248 +#define METATILE_Sootopolis_GymDoor_Closed 0x250 +#define METATILE_Sootopolis_RoughWater 0x290 + +// gTileset_SootopolisGym +#define METATILE_SootopolisGym_Ice_Cracked 0x20E +#define METATILE_SootopolisGym_Ice_Broken 0x206 +#define METATILE_SootopolisGym_Stairs 0x207 + +// gTileset_Fallarbor +#define METATILE_Fallarbor_AshGrass 0x20A +#define METATILE_Fallarbor_NormalGrass 0x212 +#define METATILE_Fallarbor_AshField 0x218 +#define METATILE_Fallarbor_BrownCaveEntrance_Top 0x259 +#define METATILE_Fallarbor_BrownCaveEntrance_Bottom 0x261 +#define METATILE_Fallarbor_RedCaveEntrance_Top 0x347 +#define METATILE_Fallarbor_RedCaveEntrance_Bottom 0x34F +#define METATILE_Fallarbor_BrownRockWall 0x265 +#define METATILE_Fallarbor_RedRockWall 0x269 + +// gTileset_Lavaridge +#define METATILE_Lavaridge_NormalGrass 0x206 +#define METATILE_Lavaridge_AshGrass 0x207 +#define METATILE_Lavaridge_LavaField 0x271 +#define METATILE_Lavaridge_RockWall 0x274 +#define METATILE_Lavaridge_CaveEntrance_Top 0x256 +#define METATILE_Lavaridge_CaveEntrance_Bottom 0x25E + +// gTileset_Mauville +#define METATILE_Mauville_DeepSand_Center 0x251 +#define METATILE_Mauville_DeepSand_BottomMid 0x259 +#define METATILE_Mauville_MirageTower_Tile0 0x3D8 +#define METATILE_Mauville_MirageTower_Tile1 0x3D9 +#define METATILE_Mauville_MirageTower_Tile2 0x3DA +#define METATILE_Mauville_MirageTower_Tile3 0x3E0 +#define METATILE_Mauville_MirageTower_Tile4 0x3E1 +#define METATILE_Mauville_MirageTower_Tile5 0x3E2 +#define METATILE_Mauville_MirageTower_Tile6 0x3E8 +#define METATILE_Mauville_MirageTower_Tile7 0x3E9 +#define METATILE_Mauville_MirageTower_Tile8 0x3EA +#define METATILE_Mauville_MirageTower_Tile9 0x3F0 +#define METATILE_Mauville_MirageTower_TileA 0x3F1 +#define METATILE_Mauville_MirageTower_TileB 0x3F2 +#define METATILE_Mauville_MirageTower_TileC 0x3DB +#define METATILE_Mauville_MirageTower_TileD 0x3DC +#define METATILE_Mauville_MirageTower_TileE 0x3DD +#define METATILE_Mauville_MirageTower_TileF 0x3E3 +#define METATILE_Mauville_MirageTower_Tile10 0x3E4 +#define METATILE_Mauville_MirageTower_Tile11 0x3E5 + +// gTileset_PokemonCenter +#define METATILE_PokemonCenter_Elevator1F_Tile0_Frame0 0x280 +#define METATILE_PokemonCenter_Elevator1F_Tile0_Frame1 0x282 +#define METATILE_PokemonCenter_Elevator1F_Tile0_Frame2 0x284 +#define METATILE_PokemonCenter_Elevator1F_Tile1_Frame0 0x281 +#define METATILE_PokemonCenter_Elevator1F_Tile1_Frame1 0x283 +#define METATILE_PokemonCenter_Elevator1F_Tile1_Frame2 0x285 +#define METATILE_PokemonCenter_Elevator1F_Tile2_Frame0 0x288 +#define METATILE_PokemonCenter_Elevator1F_Tile2_Frame1 0x28A +#define METATILE_PokemonCenter_Elevator1F_Tile2_Frame2 0x28C +#define METATILE_PokemonCenter_Elevator1F_Tile3_Frame0 0x289 +#define METATILE_PokemonCenter_Elevator1F_Tile3_Frame1 0x28B +#define METATILE_PokemonCenter_Elevator1F_Tile3_Frame2 0x28D +#define METATILE_PokemonCenter_Elevator2F_Tile0_Frame0 0x2A0 +#define METATILE_PokemonCenter_Elevator2F_Tile0_Frame1 0x2A2 +#define METATILE_PokemonCenter_Elevator2F_Tile0_Frame2 0x2A4 +#define METATILE_PokemonCenter_Elevator2F_Tile1_Frame0 0x2A1 +#define METATILE_PokemonCenter_Elevator2F_Tile1_Frame1 0x2A3 +#define METATILE_PokemonCenter_Elevator2F_Tile1_Frame2 0x2A5 +#define METATILE_PokemonCenter_Elevator2F_Tile2_Frame0 0x2A8 +#define METATILE_PokemonCenter_Elevator2F_Tile2_Frame1 0x2AA +#define METATILE_PokemonCenter_Elevator2F_Tile2_Frame2 0x2AC +#define METATILE_PokemonCenter_Floor_ShadowTop_Alt 0x2DC +#define METATILE_PokemonCenter_Floor_Plain_Alt 0x2E4 +#define METATILE_PokemonCenter_Floor_ShadowTop 0x21E +#define METATILE_PokemonCenter_CounterBarrier 0x25D + +// gTileset_InsideOfTruck +#define METATILE_InsideOfTruck_ExitLight_Top 0x208 +#define METATILE_InsideOfTruck_ExitLight_Mid 0x210 +#define METATILE_InsideOfTruck_ExitLight_Bottom 0x218 +#define METATILE_InsideOfTruck_DoorClosedFloor_Top 0x20D +#define METATILE_InsideOfTruck_DoorClosedFloor_Mid 0x215 +#define METATILE_InsideOfTruck_DoorClosedFloor_Bottom 0x21D + +// gTileset_MossdeepGameCorner +#define METATILE_MossdeepGameCorner_CounterOpen_Top 0x22C +#define METATILE_MossdeepGameCorner_CounterOpen_Bottom 0x234 +#define METATILE_MossdeepGameCorner_CounterClosed_Top 0x22A +#define METATILE_MossdeepGameCorner_CounterClosed_Bottom 0x232 + +// gTileset_EliteFour +#define METATILE_EliteFour_OpenDoor_Frame 0x344 +#define METATILE_EliteFour_OpenDoor_Opening 0x345 +#define METATILE_EliteFour_OpenDoorChampion_Frame 0x346 +#define METATILE_EliteFour_OpenDoorChampion_Opening 0x347 +#define METATILE_EliteFour_LeftSpotlightOff 0x2DD +#define METATILE_EliteFour_RightSpotlightOff 0x2DE +#define METATILE_EliteFour_EntryDoor_ClosedTop 0x206 +#define METATILE_EliteFour_EntryDoor_ClosedBottom 0x20E + +// gTileset_InsideShip +#define METATILE_InsideShip_InTactDoor0_Bottom 0x233 +#define METATILE_InsideShip_InTactDoor1_Bottom 0x22B +#define METATILE_InsideShip_DoorIndent1 0x21A +#define METATILE_InsideShip_DoorIndent0 0x234 + +// gTileset_BattlePike +#define METATILE_BattlePike_Curtain_Stage0_Tile0 0x24A +#define METATILE_BattlePike_Curtain_Stage0_Tile1 0x251 +#define METATILE_BattlePike_Curtain_Stage0_Tile2 0x252 +#define METATILE_BattlePike_Curtain_Stage0_Tile3 0x253 +#define METATILE_BattlePike_Curtain_Stage0_Tile4 0x259 +#define METATILE_BattlePike_Curtain_Stage0_Tile5 0x25A +#define METATILE_BattlePike_Curtain_Stage0_Tile6 0x25B +#define METATILE_BattlePike_Curtain_Stage1_Tile0 0x22A +#define METATILE_BattlePike_Curtain_Stage1_Tile1 0x231 +#define METATILE_BattlePike_Curtain_Stage1_Tile2 0x232 +#define METATILE_BattlePike_Curtain_Stage1_Tile3 0x233 +#define METATILE_BattlePike_Curtain_Stage1_Tile4 0x239 +#define METATILE_BattlePike_Curtain_Stage1_Tile5 0x23A +#define METATILE_BattlePike_Curtain_Stage1_Tile6 0x23B +#define METATILE_BattlePike_Curtain_Stage2_Tile0 0x20A +#define METATILE_BattlePike_Curtain_Stage2_Tile1 0x211 +#define METATILE_BattlePike_Curtain_Stage2_Tile2 0x212 +#define METATILE_BattlePike_Curtain_Stage2_Tile3 0x213 +#define METATILE_BattlePike_Curtain_Stage2_Tile4 0x219 +#define METATILE_BattlePike_Curtain_Stage2_Tile5 0x21A +#define METATILE_BattlePike_Curtain_Stage2_Tile6 0x21B +#define METATILE_BattlePike_Curtain_Stage3_Tile0 0x2AB +#define METATILE_BattlePike_Curtain_Stage3_Tile1 0x2B2 +#define METATILE_BattlePike_Curtain_Stage3_Tile2 0x2B3 +#define METATILE_BattlePike_Curtain_Stage3_Tile3 0x2B4 +#define METATILE_BattlePike_Curtain_Stage3_Tile4 0x2BA +#define METATILE_BattlePike_Curtain_Stage3_Tile5 0x2BB +#define METATILE_BattlePike_Curtain_Stage3_Tile6 0x2BC + +// gTileset_Lilycove +#define METATILE_Lilycove_Wailmer0 0x290 +#define METATILE_Lilycove_Wailmer1 0x291 +#define METATILE_Lilycove_Wailmer2 0x2A0 +#define METATILE_Lilycove_Wailmer3 0x2A1 +#define METATILE_Lilycove_Wailmer0_Alt 0x298 +#define METATILE_Lilycove_Wailmer1_Alt 0x299 + +// gTileset_Contest +#define METATILE_Contest_WallShadow 0x221 +#define METATILE_Contest_FloorShadow 0x261 +#define METATILE_Contest_CounterFlap_Top 0x2D1 +#define METATILE_Contest_CounterFlap_Bottom 0x2D9 + +// gTileset_LilycoveMuseum +#define METATILE_LilycoveMuseum_Painting0_Left 0x25A +#define METATILE_LilycoveMuseum_Painting0_Right 0x25B +#define METATILE_LilycoveMuseum_Painting1_Left 0x25C +#define METATILE_LilycoveMuseum_Painting1_Right 0x25D +#define METATILE_LilycoveMuseum_Painting2_Left 0x25E +#define METATILE_LilycoveMuseum_Painting2_Right 0x25F +#define METATILE_LilycoveMuseum_Painting3_Left 0x260 +#define METATILE_LilycoveMuseum_Painting3_Right 0x261 +#define METATILE_LilycoveMuseum_Painting4_Left 0x262 +#define METATILE_LilycoveMuseum_Painting4_Right 0x263 + +// gTileset_MeteorFalls +#define METATILE_MeteorFalls_CaveEntrance_Top 0x246 +#define METATILE_MeteorFalls_CaveEntrance_Left 0x24D +#define METATILE_MeteorFalls_CaveEntrance_Bottom 0x24E +#define METATILE_MeteorFalls_CaveEntrance_Right 0x24F + +// gTileset_Facility +#define METATILE_Facility_NewMauvilleDoor_Closed_Tile0 0x314 +#define METATILE_Facility_NewMauvilleDoor_Closed_Tile1 0x315 +#define METATILE_Facility_NewMauvilleDoor_Closed_Tile2 0x316 +#define METATILE_Facility_NewMauvilleDoor_Closed_Tile3 0x31C +#define METATILE_Facility_NewMauvilleDoor_Closed_Tile4 0x31D +#define METATILE_Facility_NewMauvilleDoor_Closed_Tile5 0x31E +#define METATILE_Facility_NewMauvilleDoor_Open_Tile0 0x2C3 +#define METATILE_Facility_NewMauvilleDoor_Open_Tile1 0x2C4 +#define METATILE_Facility_NewMauvilleDoor_Open_Tile2 0x2C5 +#define METATILE_Facility_NewMauvilleDoor_Open_Tile3 0x2CB +#define METATILE_Facility_NewMauvilleDoor_Open_Tile4 0x2CC +#define METATILE_Facility_NewMauvilleDoor_Open_Tile5 0x2CD +#define METATILE_Facility_DataPad 0x3E4 + +// gTileset_GenericBuilding +#define METATILE_GenericBuilding_TableEdge 0x2F1 +#define METATILE_GenericBuilding_TrickHouse_Door_Closed 0x21B +#define METATILE_GenericBuilding_TrickHouse_Stairs_Down 0x219 + +// gTileset_TrickHousePuzzle +#define METATILE_TrickHousePuzzle_Stairs_Down 0x20B +#define METATILE_TrickHousePuzzle_Lever_Off 0x23E +#define METATILE_TrickHousePuzzle_Lever_On 0x23F +#define METATILE_TrickHousePuzzle_Button_Up 0x258 +#define METATILE_TrickHousePuzzle_Button_Pressed 0x259 +#define METATILE_TrickHousePuzzle_Door_Shuttered 0x26A +#define METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt 0x252 +#define METATILE_TrickHousePuzzle_Floor_ShadowTop 0x255 +#define METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0 0x24B +#define METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1 0x24C +#define METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2 0x253 +#define METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3 0x254 +#define METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0 0x23B +#define METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1 0x23C +#define METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2 0x243 +#define METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3 0x244 +#define METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0 0x248 +#define METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1 0x249 +#define METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2 0x250 +#define METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3 0x251 +#define METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0 0x238 +#define METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1 0x239 +#define METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2 0x240 +#define METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3 0x241 +#define METATILE_TrickHousePuzzle_BlueDoorV_Retracted 0x24D +#define METATILE_TrickHousePuzzle_RedDoorV_Retracted 0x24A +#define METATILE_TrickHousePuzzle_RedDoorV_Open0 0x23A +#define METATILE_TrickHousePuzzle_RedDoorV_Open1 0x242 +#define METATILE_TrickHousePuzzle_BlueDoorV_Open0 0x23D +#define METATILE_TrickHousePuzzle_BlueDoorV_Open1 0x245 +#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right 0x260 +#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left 0x261 +#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up 0x262 +#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down 0x263 +#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left_Alt 0x27B +#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right_Alt 0x27C + +// gTileset_BikeShop +#define METATILE_BikeShop_Barrier_Hidden_Top 0x269 +#define METATILE_BikeShop_Barrier_Hidden_Bottom 0x271 +#define METATILE_BikeShop_Floor_Shadow_Top 0x26D +#define METATILE_BikeShop_Wall_Edge_Top 0x281 +#define METATILE_BikeShop_Button_Pressed 0x24F +#define METATILE_BikeShop_Button_Green 0x22E +#define METATILE_BikeShop_Button_Blue 0x236 +#define METATILE_BikeShop_Barrier_Green_Top 0x2B6 +#define METATILE_BikeShop_Barrier_Green_TopMid 0x2BE +#define METATILE_BikeShop_Barrier_Green_BottomMid 0x2C6 +#define METATILE_BikeShop_Barrier_Green_Bottom 0x2CE +#define METATILE_BikeShop_Barrier_Blue_Top 0x2B7 +#define METATILE_BikeShop_Barrier_Blue_TopMid 0x2BF +#define METATILE_BikeShop_Barrier_Blue_BottomMid 0x2C7 +#define METATILE_BikeShop_Barrier_Blue_Bottom 0x2CF +#define METATILE_BikeShop_Generator_Off_Tile0 0x2F0 +#define METATILE_BikeShop_Generator_Off_Tile1 0x2F1 +#define METATILE_BikeShop_Generator_Off_Tile2 0x2F2 +#define METATILE_BikeShop_Generator_Off_Tile3 0x2F3 +#define METATILE_BikeShop_Generator_Off_Tile4 0x2F4 +#define METATILE_BikeShop_Generator_Off_Tile5 0x2F5 +#define METATILE_BikeShop_Generator_Off_Tile6 0x2F6 +#define METATILE_BikeShop_Generator_Off_Tile7 0x2F7 + +// gTileset_TrainerHill +#define METATILE_TrainerHill_GreenFloorTile 0x307 +#define METATILE_TrainerHill_CounterDoor 0x334 + +// gTileset_Underwater +#define METATILE_Underwater_RockWall 0x21E +#define METATILE_Underwater_FloorShadow 0x228 + +#endif // GUARD_METATILE_LABELS_H diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index f63d755ad..5d0e562bc 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -82,4 +82,7 @@ #define NUM_STATS 6 #define NUM_BATTLE_STATS 8 +// Shiny odds +#define SHINY_ODDS 8 // Actual probability is SHINY_ODDS/65536 + #endif // GUARD_CONSTANTS_POKEMON_H diff --git a/include/constants/trainer_hill.h b/include/constants/trainer_hill.h index e231a6043..4aae1dbbc 100644 --- a/include/constants/trainer_hill.h +++ b/include/constants/trainer_hill.h @@ -26,4 +26,4 @@ #define TRAINER_HILL_PLAYER_STATUS_ECARD_SCANNED 1 #define TRAINER_HILL_PLAYER_STATUS_NORMAL 2 -#endif
\ No newline at end of file +#endif diff --git a/include/constants/trainers.h b/include/constants/trainers.h index 2a6c306b4..c0abfe6b6 100644 --- a/include/constants/trainers.h +++ b/include/constants/trainers.h @@ -202,8 +202,8 @@ #define FACILITY_CLASSES_COUNT 0x52 -#define TRAINER_CLASS_PKMN_TRAINER_1 0x0 -#define TRAINER_CLASS_PKMN_TRAINER_2 0x1 +#define TRAINER_CLASS_PKMN_TRAINER_1 0x0 // Unused +#define TRAINER_CLASS_PKMN_TRAINER_2 0x1 // Unused #define TRAINER_CLASS_HIKER 0x2 #define TRAINER_CLASS_TEAM_AQUA 0x3 #define TRAINER_CLASS_PKMN_BREEDER 0x4 @@ -250,7 +250,7 @@ #define TRAINER_CLASS_SWIMMER_F 0x2d #define TRAINER_CLASS_TWINS 0x2e #define TRAINER_CLASS_SAILOR 0x2f -#define TRAINER_CLASS_COOLTRAINER_UNUSED 0x30 +#define TRAINER_CLASS_COOLTRAINER_2 0x30 // Used for only one trainer. #define TRAINER_CLASS_MAGMA_ADMIN 0x31 #define TRAINER_CLASS_PKMN_TRAINER_3 0x32 #define TRAINER_CLASS_BUG_CATCHER 0x33 @@ -267,7 +267,7 @@ #define TRAINER_CLASS_FACTORY_HEAD 0x3e #define TRAINER_CLASS_PIKE_QUEEN 0x3f #define TRAINER_CLASS_PYRAMID_KING 0x40 -#define TRAINER_CLASS_PKMN_TRAINER_4 0x41 +#define TRAINER_CLASS_RS_PROTAG 0x41 #define TRAINER_ENCOUNTER_MUSIC_MALE 0 // standard male encounter music #define TRAINER_ENCOUNTER_MUSIC_FEMALE 1 // standard female encounter music diff --git a/include/dodrio_berry_picking.h b/include/dodrio_berry_picking.h new file mode 100644 index 000000000..55e8fa880 --- /dev/null +++ b/include/dodrio_berry_picking.h @@ -0,0 +1,8 @@ +#ifndef GUARD_DODRIO_BERRY_PICKING_H +#define GUARD_DODRIO_BERRY_PICKING_H + +void sub_802493C(u16 a0, void (*callback)(void)); +void sub_8027A5C(void); +void sub_8027AAC(void); + +#endif // GUARD_DODRIO_BERRY_PICKING_H diff --git a/include/fieldmap.h b/include/fieldmap.h index 2384ed46a..be5610a46 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -23,9 +23,9 @@ int GetMapBorderIdAt(int x, int y); int CanCameraMoveInDirection(int direction); u16 GetBehaviorByMetatileId(u16 metatileId); void GetCameraFocusCoords(u16 *x, u16 *y); -u8 MapGridGetMetatileLayerTypeAt(s32 x, s32 y); +u8 MapGridGetMetatileLayerTypeAt(int x, int y); u8 MapGridGetZCoordAt(int x, int y); -u8 CameraMove(s32 deltaX, s32 deltaY); +bool8 CameraMove(int deltaX, int deltaY); struct MapConnection *sub_8088950(u8 direction, int x, int y); bool8 sub_80889A8(u8 direction, int x, int y, struct MapConnection *connection); bool8 sub_8088A0C(int x, int src_width, int dest_width, int offset); diff --git a/include/gba/defines.h b/include/gba/defines.h index b68a2ad1e..9bd695aaa 100644 --- a/include/gba/defines.h +++ b/include/gba/defines.h @@ -6,9 +6,16 @@ #define TRUE 1 #define FALSE 0 +#define BSS_DATA __attribute__((section(".bss"))) #define IWRAM_DATA __attribute__((section("iwram_data"))) #define EWRAM_DATA __attribute__((section("ewram_data"))) +#if MODERN +#define NOINLINE __attribute__((noinline)) +#else +#define NOINLINE +#endif + #define ALIGNED(n) __attribute__((aligned(n))) #define SOUND_INFO_PTR (*(struct SoundInfo **)0x3007FF0) diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 3aa44ec9a..b5a86e311 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -8,6 +8,8 @@ #define METATILE_COLLISION_SHIFT 10 #define METATILE_ELEVATION_MASK 0xF000 +#define METATILE_ID(tileset, name) (METATILE_##tileset##_##name) + enum { CONNECTION_SOUTH = 1, diff --git a/include/global.h b/include/global.h index 4523ece21..a76d6e4e3 100644 --- a/include/global.h +++ b/include/global.h @@ -2,6 +2,7 @@ #define GUARD_GLOBAL_H #include <string.h> +#include <limits.h> #include "config.h" // we need to define config before gba headers as print stuff needs the functions nulled before defines. #include "gba/gba.h" #include "constants/global.h" @@ -62,6 +63,10 @@ #define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) >= (b) ? (a) : (b)) +#if MODERN +#define abs(x) (((x) < 0) ? -(x) : (x)) +#endif + // Extracts the upper 16 bits of a 32-bit number #define HIHALF(n) (((n) & 0xFFFF0000) >> 16) @@ -86,6 +91,11 @@ #define T2_READ_32(ptr) ((ptr)[0] + ((ptr)[1] << 8) + ((ptr)[2] << 16) + ((ptr)[3] << 24)) #define T2_READ_PTR(ptr) (void*) T2_READ_32(ptr) +// Macros for checking the joypad +#define TEST_BUTTON(field, button) ({(field) & (button);}) +#define JOY_NEW(button) TEST_BUTTON(gMain.newKeys, button) +#define JOY_HELD(button) TEST_BUTTON(gMain.heldKeys, button) + #define S16TOPOSFLOAT(val) \ ({ \ s16 v = (val); \ @@ -235,7 +245,7 @@ struct BattleTowerPokemon u32 spAttackIV:5; u32 spDefenseIV:5; u32 gap:1; - u32 altAbility:1; + u32 abilityNum:1; u32 personality; u8 nickname[POKEMON_NAME_LENGTH + 1]; u8 friendship; @@ -282,7 +292,7 @@ struct RentalMon u16 monId; u32 personality; u8 ivs; - u8 abilityBit; + u8 abilityNum; }; struct BattleDomeTrainer diff --git a/include/graphics.h b/include/graphics.h index 4e558b508..bbb70590d 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -3301,10 +3301,10 @@ extern const u32 gPokedexSearch1_Tilemap[]; extern const u16 gPokedexSearchMenu_Pal[]; // berry tag screen -extern const u32 gUnknown_08D9BB44[]; -extern const u32 gUnknown_08D9BF98[]; -extern const u32 gUnknown_08D9C13C[]; -extern const u32 gUnknown_08D9BEF0[]; +extern const u32 gBerryCheck_Gfx[]; +extern const u32 gBerryCheck_Pal[]; +extern const u32 gBerryTag_Gfx[]; +extern const u32 gBerryTag_Pal[]; // rayquaza scene gfx extern const u32 gRaySceneGroudon_Gfx[]; @@ -3859,6 +3859,7 @@ extern const u8 gFireRedMenuElements_Gfx[]; // item menu graphics extern const u32 gBagScreen_Gfx[]; +extern const u32 gBagScreen_GfxTileMap[]; extern const u32 gBagScreenFemale_Pal[]; extern const u32 gBagScreenMale_Pal[]; extern const u8 gBagMenuHMIcon_Gfx[]; @@ -4004,10 +4005,13 @@ extern const u32 gBerryPalette_Starf[]; extern const u32 gBerryPic_Enigma[]; extern const u32 gBerryPalette_Enigma[]; -//credits -extern const u32 gCreditsCopyrightEnd_Gfx[]; - //pokenav +extern const u16 gPokenavCondition_Pal[]; +extern const u32 gPokenavCondition_Gfx[]; +extern const u32 gPokenavCondition_Tilemap[]; +extern const u16 gPokenavOptions_Tilemap[]; +extern const u32 gPokenavOptions_Gfx[]; +extern const u16 gPokenavOptions_Pal[]; extern const u8 gPokenavConditionMarker_Gfx[]; extern const u16 gPokenavConditionMarker_Pal[]; extern const u16 gPokenavLeftHeader_Pal[]; @@ -4092,11 +4096,11 @@ extern const u16 gBattleInterface_BallDisplayPal[]; extern const u32 gBagSwapLineGfx[]; extern const u32 gBagSwapLinePal[]; -extern const u32 gUnknown_08D9ADD0[]; -extern const u32 gUnknown_08D9AE04[]; +extern const u32 gBattleFrontierGfx_PyramidBag[]; +extern const u32 gBattleFrontierGfx_PyramidBag_Pal[]; +extern const u32 gBattleFrontierGfx_PyramidBagTileMap[]; extern const u32 gUnknown_08D9AF44[]; extern const u16 gUnknown_0860F074[]; -extern const u32 gBattleFrontierGfx_PyramidBag[]; extern const u32 gTitleScreenEmeraldVersionGfx[]; extern const u32 gTitleScreenPressStartGfx[]; @@ -4762,7 +4766,6 @@ extern const u32 gBattleStatMask6_Pal[]; extern const u32 gBattleStatMask7_Pal[]; extern const u32 gBattleStatMask8_Pal[]; -extern const u32 gUnknown_08D9A88C[]; extern const u32 gContestMiscGfx[]; extern const u32 gContestAudienceGfx[]; extern const u8 gContestApplauseMeterGfx[]; @@ -4936,6 +4939,9 @@ extern const u32 gLinkMiscMenu_Tilemap[]; // Use Pokeblock extern const u8 gPokenavConditionCancel_Gfx[]; extern const u16 gPokenavConditionCancel_Pal[]; +extern const u8 gUsePokeblockUpDown_Gfx[]; +extern const u16 gUsePokeblockUpDown_Pal[]; +extern const u16 gUsePokeblockCondition_Pal[]; // Berry Crush extern const u32 gUnknown_08DE34B8[]; diff --git a/include/item_menu.h b/include/item_menu.h index 70d6b5a94..5580fa4b4 100644 --- a/include/item_menu.h +++ b/include/item_menu.h @@ -29,9 +29,9 @@ struct BagStruct u16 scrollPosition[POCKETS_COUNT]; }; -extern struct BagStruct gUnknown_0203CE58; +extern struct BagStruct gBagPositionStruct; -struct UnkBagStruct +struct BagMenuStruct { void (*mainCallback2)(void); u8 tilemapBuffer[0x800]; @@ -61,7 +61,7 @@ struct UnkBagStruct u8 filler2[4]; }; -extern struct UnkBagStruct *gUnknown_0203CE54; +extern struct BagMenuStruct *gBagMenu; // Exported RAM declarations @@ -85,7 +85,7 @@ void ResetBagScrollPositions(void); void sub_81AABF0(void (*callback)(void)); void CB2_ChooseBerry(void); void unknown_ItemMenu_Confirm(u8 taskId); -void bag_menu_yes_no(u8, u8, const struct YesNoFuncTable*); +void BagMenu_YesNo(u8, u8, const struct YesNoFuncTable*); void sub_81AB9A8(u8 pocketId); diff --git a/include/item_menu_icons.h b/include/item_menu_icons.h index aee7599df..50f0d5544 100644 --- a/include/item_menu_icons.h +++ b/include/item_menu_icons.h @@ -1,11 +1,11 @@ #ifndef GUARD_ITEM_MENU_ICONS #define GUARD_ITEM_MENU_ICONS -extern const struct CompressedSpriteSheet gUnknown_0857FB34; -extern const struct CompressedSpriteSheet gUnknown_0857FB3C; -extern const struct CompressedSpritePalette gUnknown_0857FB44; -extern const struct CompressedSpriteSheet gUnknown_0857FDEC; -extern const struct CompressedSpritePalette gUnknown_0857FDF4; +extern const struct CompressedSpriteSheet gBagMaleSpriteSheet; +extern const struct CompressedSpriteSheet gBagFemaleSpriteSheet; +extern const struct CompressedSpritePalette gBagPaletteTable; +extern const struct CompressedSpriteSheet gBerryCheckCircleSpriteSheet; +extern const struct CompressedSpritePalette gBerryCheckCirclePaletteTable; void RemoveBagSprite(u8 id); void AddBagVisualSprite(u8 bagPocketId); @@ -19,7 +19,13 @@ void sub_80D4FC8(u8 arg0); void sub_80D4FEC(u8 arg0); u8 CreateBerryTagSprite(u8 id, s16 x, s16 y); void FreeBerryTagSpritePalette(void); -u8 sub_80D511C(u8 berryId, u8 x, u8 y, bool8 startAffine); +u8 LoadSpinningBerryPicGfx(u8 berryId, u8 x, u8 y, bool8 startAffine); u8 CreateBerryFlavorCircleSprite(s16 x); +#define TAG_BAG_GFX 100 +#define TAG_ROTATING_BALL_GFX 101 +#define TAG_BERRY_CHECK_CIRCLE_GFX 10000 +#define TAG_BERRY_PIC_TILE 0xFFFF +#define TAG_BERRY_PIC_PAL 0x7544 + #endif // GUARD_ITEM_MENU_ICONS diff --git a/include/link_rfu.h b/include/link_rfu.h index edfd0ed20..d6e1009e1 100644 --- a/include/link_rfu.h +++ b/include/link_rfu.h @@ -275,15 +275,17 @@ void sub_8010FCC(u32 a0, u32 a1, u32 a2); void sub_8011C84(void); void sub_8012188(const u8 *name, struct UnkLinkRfuStruct_02022B14 *structPtr, u8 a2); bool32 sub_8011B90(void); -void sub_800FE50(u16 *a0); +void sub_800FE50(void *a0); bool32 sub_800E540(u16 id, u8 *name); void sub_8011DE0(u32 arg0); -u8 sub_801100C(int a0); +u8 sub_801100C(s32 a0); void sub_800EF7C(void); bool8 sub_800DE7C(struct UnkLinkRfuStruct_02022B14 *buff1, u8 *buff2, u8 idx); bool8 sub_800DF34(struct UnkLinkRfuStruct_02022B14 *buff1, u8 *buff2, u8 idx); s32 sub_800E87C(u8 idx); void sub_8011BA4(void); +void sub_8010198(void); +void sub_8011AC8(void); void LinkRfu_FatalError(void); bool32 sub_8011A9C(void); void sub_80104B0(void); diff --git a/include/menu.h b/include/menu.h index 08cad40bd..62e2558dc 100644 --- a/include/menu.h +++ b/include/menu.h @@ -25,7 +25,7 @@ void InitStandardTextBoxWindows(void); void sub_8197200(void); u16 RunTextPrintersAndIsPrinter0Active(void); void sub_81973A4(void); -void DrawDialogueFrame(u8, u8); +void DrawDialogueFrame(u8 windowId, bool8 copyToVram); void ClearStdWindowAndFrame(u8 windowId, bool8 copyToVram); u16 AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16), u8 fgColor, u8 bgColor, u8 shadowColor); void PrintPlayerNameOnWindow(u8, const u8*, u16, u16); diff --git a/include/menu_specialized.h b/include/menu_specialized.h index 014ee2585..14a246468 100644 --- a/include/menu_specialized.h +++ b/include/menu_specialized.h @@ -34,6 +34,7 @@ void sub_81D1EC0(void); void sub_81D1D04(u8 a0); void sub_81D1ED4(struct UnknownStruct_81D1ED4 *a0); void sub_81D2108(struct UnknownStruct_81D1ED4 *arg0); +void sub_81D21DC(u8 bg); void sub_81D20AC(struct UnknownStruct_81D1ED4 *arg0); void sub_81D2230(struct UnknownStruct_81D1ED4 *arg0); bool8 sub_81D20BC(struct UnknownStruct_81D1ED4 *arg0); diff --git a/include/party_menu.h b/include/party_menu.h index 413a89689..c9843e484 100644 --- a/include/party_menu.h +++ b/include/party_menu.h @@ -33,7 +33,7 @@ struct Struct203CEC8 u8 unk8_0:4; u8 mode:2; u8 unk8_2:2; - s8 unk9; + s8 slotId; s8 unkA; u8 unkB; u16 unkC; diff --git a/include/player_pc.h b/include/player_pc.h index 53bb25c6b..219c11440 100644 --- a/include/player_pc.h +++ b/include/player_pc.h @@ -1,6 +1,8 @@ #ifndef GUARD_PLAYER_PC_H #define GUARD_PLAYER_PC_H +#include "menu.h" + // local task defines #define PAGE_INDEX data[0] #define ITEMS_ABOVE_TOP data[1] diff --git a/include/pokemon.h b/include/pokemon.h index 26d715d89..07bcff2e3 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -14,7 +14,7 @@ #define MON_DATA_OT_NAME 7 #define MON_DATA_MARKINGS 8 #define MON_DATA_CHECKSUM 9 -#define MON_DATA_10 10 +#define MON_DATA_ENCRYPT_SEPARATOR 10 #define MON_DATA_SPECIES 11 #define MON_DATA_HELD_ITEM 12 #define MON_DATA_MOVE1 13 @@ -50,7 +50,7 @@ #define MON_DATA_SPATK_IV 43 #define MON_DATA_SPDEF_IV 44 #define MON_DATA_IS_EGG 45 -#define MON_DATA_ALT_ABILITY 46 +#define MON_DATA_ABILITY_NUM 46 #define MON_DATA_TOUGH 47 #define MON_DATA_SHEEN 48 #define MON_DATA_OT_GENDER 49 @@ -182,7 +182,7 @@ struct PokemonSubstruct3 /* 0x05 */ u32 spAttackIV:5; /* 0x06 */ u32 spDefenseIV:5; /* 0x07 */ u32 isEgg:1; - /* 0x07 */ u32 altAbility:1; + /* 0x07 */ u32 abilityNum:1; /* 0x08 */ u32 coolRibbon:3; /* 0x08 */ u32 beautyRibbon:3; @@ -281,7 +281,7 @@ struct BattlePokemon /*0x16*/ u32 spAttackIV:5; /*0x17*/ u32 spDefenseIV:5; /*0x17*/ u32 isEgg:1; - /*0x17*/ u32 altAbility:1; + /*0x17*/ u32 abilityNum:1; /*0x18*/ s8 statStages[NUM_BATTLE_STATS]; /*0x20*/ u8 ability; /*0x21*/ u8 type1; @@ -295,7 +295,7 @@ struct BattlePokemon /*0x2E*/ u16 item; /*0x30*/ u8 nickname[POKEMON_NAME_LENGTH + 1]; /*0x3B*/ u8 ppBonuses; - /*0x3C*/ u8 otName[8]; + /*0x3C*/ u8 otName[PLAYER_NAME_LENGTH + 1]; /*0x44*/ u32 experience; /*0x48*/ u32 personality; /*0x4C*/ u32 status1; @@ -329,8 +329,7 @@ struct BaseStats /* 0x13 */ u8 growthRate; /* 0x14 */ u8 eggGroup1; /* 0x15 */ u8 eggGroup2; - /* 0x16 */ u8 ability1; - /* 0x17 */ u8 ability2; + /* 0x16 */ u8 abilities[2]; /* 0x18 */ u8 safariZoneFleeRate; /* 0x19 */ u8 bodyColor : 7; u8 noFlip : 1; @@ -435,7 +434,7 @@ extern const u8 gPPUpGetMask[]; extern const u8 gPPUpSetMask[]; extern const u8 gPPUpAddMask[]; extern const u8 gStatStageRatios[][2]; -extern const u16 gUnknown_08329D54[]; +extern const u16 gLinkPlayerFacilityClasses[]; extern const struct SpriteTemplate gUnknown_08329D98[]; extern const s8 gNatureStatTable[][5]; @@ -507,7 +506,7 @@ u8 CalculatePlayerPartyCount(void); u8 CalculateEnemyPartyCount(void); u8 GetMonsStateToDoubles(void); u8 GetMonsStateToDoubles_2(void); -u8 GetAbilityBySpecies(u16 species, bool8 altAbility); +u8 GetAbilityBySpecies(u16 species, bool8 abilityNum); u8 GetMonAbility(struct Pokemon *mon); void CreateSecretBaseEnemyParty(struct SecretBase *secretBaseRecord); u8 GetSecretBaseTrainerPicIndex(void); @@ -564,7 +563,7 @@ void PlayBattleBGM(void); void PlayMapChosenOrBattleBGM(u16 songId); void sub_806E694(u16 songId); const u32 *GetMonFrontSpritePal(struct Pokemon *mon); -const u32 *GetFrontSpritePalFromSpeciesAndPersonality(u16 species, u32 otId, u32 personality); +const u32 *GetMonSpritePalFromSpeciesAndPersonality(u16 species, u32 otId, u32 personality); const struct CompressedSpritePalette *GetMonSpritePalStruct(struct Pokemon *mon); const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u16 species, u32 otId , u32 personality); bool32 IsHMMove2(u16 move); diff --git a/include/pokemon_icon.h b/include/pokemon_icon.h index c7b895028..8af43c753 100644 --- a/include/pokemon_icon.h +++ b/include/pokemon_icon.h @@ -23,6 +23,6 @@ void LoadMonIconPalette(u16 species); void sub_80D328C(struct Sprite *sprite); void sub_80D3014(struct Sprite *sprite); void sub_80D32C8(struct Sprite *sprite, u8 animNum); -u8 sub_80D30A0(u16 species); +u8 GetMonIconPaletteIndexFromSpecies(u16 species); #endif // GUARD_POKEMON_ICON_H diff --git a/include/pokemon_jump.h b/include/pokemon_jump.h index 9e8a6fade..d137c37b2 100755..100644 --- a/include/pokemon_jump.h +++ b/include/pokemon_jump.h @@ -3,9 +3,9 @@ #include "main.h" +void sub_802EB24(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8 arg4); +bool32 sub_802EB84(void); void sub_802A9A8(u16 monId, MainCallback callback); bool32 sub_802C908(u16 species); -#endif // GUARD_POKEMON_JUMP_H - - +#endif //GUARD_POKEMON_JUMP_H diff --git a/include/pokenav.h b/include/pokenav.h index 0d46f04f3..69a9f1f58 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -3,8 +3,21 @@ #include "bg.h" #include "main.h" +#include "pokemon_storage_system.h" -typedef u32 (*LoopedTask)(int state); +typedef u32 (*LoopedTask)(s32 state); + +struct PokenavSub18 +{ + u16 unk0; + u16 unk2; + struct + { + u8 boxId; + u8 monId; + u16 unk6; + } unk4[TOTAL_BOXES_COUNT * IN_BOX_COUNT + PARTY_SIZE]; +}; // Return values of LoopedTask functions. #define LT_INC_AND_PAUSE 0 @@ -43,7 +56,7 @@ enum // pokenav.c void sub_81C7694(u32); -u16 sub_81C76AC(void); +u32 sub_81C76AC(void); void CB2_InitPokeNav(void); u32 CreateLoopedTask(LoopedTask loopedTask, u32 priority); @@ -94,7 +107,7 @@ void sub_81C8234(void); // pokenav_match_call_data.c bool32 sub_81D17E8(u32 idx); -u8 sub_81D16DC(u32 idx); +u8 MatchCallMapSecGetByIndex(u32 idx); bool32 sub_81D1BF8(u32 idx); bool32 MatchCallFlagGetByIndex(u32 idx); u32 MatchCall_GetRematchTableIdx(u32 idx); @@ -111,7 +124,7 @@ void sub_81C7850(u32 a0); u32 sub_81C786C(void); void LoadLeftHeaderGfxForIndex(u32 arg0); void sub_81C7FA0(u32 arg0, bool32 arg1, bool32 arg2); -void sub_81C7AC0(int a0); +void sub_81C7AC0(s32 a0); bool32 sub_81C8010(void); void InitBgTemplates(const struct BgTemplate *templates, int count); bool32 IsPaletteFadeActive(void); @@ -125,6 +138,7 @@ void sub_81C7B40(void); struct Sprite *PauseSpinningPokenavSprite(void); void ResumeSpinningPokenavSprite(void); void sub_81C7E14(u32 arg0); +void sub_81C7990(u32 a0, u16 a1); // pokenav_unk_1.c bool32 sub_81C9298(void); @@ -162,7 +176,7 @@ const u8 *sub_81CAFD8(int index, int textType); u16 sub_81CB01C(void); u16 sub_81CB02C(int arg0); void sub_81CB050(u32 arg0, u8 *str); -int sub_81CB0C8(int rematchIndex); +u8 sub_81CB0C8(int rematchIndex); int sub_81CB0E4(int index); bool32 sub_81CAE08(int); int sub_81CB128(int index); @@ -183,4 +197,22 @@ void sub_81CC62C(int); u32 sub_81CC65C(void); void sub_81CC670(void); -#endif //GUARD_POKENAV_H +// pokenav_unk_6.c +bool32 sub_81CD3C4(void); +bool32 sub_81CDD5C(void); +struct UnknownStruct_81D1ED4 *sub_81CDC70(void); +u16 sub_81CDC60(void); +u16 sub_81CDC50(void); +u8 sub_81CDDB0(void); +bool32 sub_81CD548(u8 arg0); +u8 sub_81CDD7C(void); +u8 *sub_81CDD04(u8 id); +u8 *sub_81CDD24(u8 id); +u16 sub_81CDD48(void); +void *sub_81CDCB4(u8 id); +void *sub_81CDCD4(u8 id); + +// pokenav_unk_7.c +u8 sub_81CEF14(void); + +#endif // GUARD_POKENAV_H diff --git a/include/shop.h b/include/shop.h index 9a5f8eb14..10e2b1060 100644 --- a/include/shop.h +++ b/include/shop.h @@ -49,4 +49,4 @@ void CreateDecorationShop1Menu(const u16 *); void CreateDecorationShop2Menu(const u16 *); void CB2_ExitSellMenu(void); -#endif // GUARD_SHOP_H
\ No newline at end of file +#endif // GUARD_SHOP_H diff --git a/include/strings.h b/include/strings.h index 964c46ef2..d1a90cfaa 100644 --- a/include/strings.h +++ b/include/strings.h @@ -485,7 +485,6 @@ extern const u8 gText_CryOf[]; extern const u8 gText_SizeComparedTo[]; extern const u8 gText_PokedexRegistration[]; extern const u8 gText_UnkCtrlF908Clear01[]; -extern const u8 sText_TenDashes2[]; extern const u8 gText_5MarksPokemon[]; extern const u8 gText_UnkHeight[]; extern const u8 gText_UnkWeight[]; @@ -1023,6 +1022,7 @@ extern const u8 gText_PokenavMatchCall_CheckTrainerButtons[]; extern const u8 gText_PokenavRibbons_MonListButtons[]; extern const u8 gText_PokenavRibbons_RibbonListButtons[]; extern const u8 gText_PokenavRibbons_RibbonCheckButtons[]; +extern const u8 gText_Number2[]; extern const u8 gUnknown_085EAD37[]; extern const u8 gUnknown_085EAD41[]; @@ -2091,45 +2091,45 @@ extern const u8 gDaycareText_DontLikeOther[]; extern const u8 gDaycareText_PlayOther[]; // party menu -extern const u8 gUnknown_085E9E43[]; -extern const u8 gUnknown_085EA010[]; -extern const u8 gUnknown_085EA02A[]; -extern const u8 gUnknown_085E9E55[]; -extern const u8 gUnknown_085E9E64[]; -extern const u8 gUnknown_085E9E79[]; -extern const u8 gUnknown_085E9E8F[]; -extern const u8 gUnknown_085E9EBC[]; -extern const u8 gUnknown_085E9ED4[]; -extern const u8 gUnknown_085E9EE9[]; -extern const u8 gUnknown_085E9FDB[]; -extern const u8 gUnknown_085EA046[]; -extern const u8 gUnknown_085EA05B[]; -extern const u8 gUnknown_085E9F01[]; -extern const u8 gUnknown_085E9F58[]; -extern const u8 gUnknown_085E9F6F[]; -extern const u8 gUnknown_085E9F81[]; -extern const u8 gUnknown_085E9F90[]; -extern const u8 gUnknown_085E9FA7[]; -extern const u8 gUnknown_085E9FC2[]; -extern const u8 gUnknown_085E9EA6[]; -extern const u8 gUnknown_085E9F16[]; -extern const u8 gUnknown_085E9F2A[]; -extern const u8 gUnknown_085E9F42[]; -extern const u8 gUnknown_085E9FF9[]; -extern const u8 gUnknown_085EA073[]; -extern const u8 gUnknown_085EA091[]; -extern const u8 gUnknown_085EA099[]; -extern const u8 gUnknown_085EA09E[]; -extern const u8 gUnknown_085EA0A4[]; -extern const u8 gUnknown_085EA0AB[]; -extern const u8 gUnknown_085EA0E7[]; -extern const u8 gUnknown_085EA0B1[]; -extern const u8 gUnknown_085EA0B6[]; -extern const u8 gUnknown_085EA0BF[]; -extern const u8 gUnknown_085EA0C5[]; -extern const u8 gUnknown_085EA0CF[]; -extern const u8 gUnknown_085EA0D7[]; -extern const u8 gUnknown_085EA0DC[]; +extern const u8 gText_ChoosePokemon[]; +extern const u8 gText_ChoosePokemonCancel[]; +extern const u8 gText_ChoosePokemonConfirm[]; +extern const u8 gText_MoveToWhere[]; +extern const u8 gText_TeachWhichPokemon[]; +extern const u8 gText_UseOnWhichPokemon[]; +extern const u8 gText_GiveToWhichPokemon[]; +extern const u8 gText_NothingToCut[]; +extern const u8 gText_CantSurfHere[]; +extern const u8 gText_AlreadySurfing[]; +extern const u8 gText_CurrentIsTooFast[]; +extern const u8 gText_EnjoyCycling[]; +extern const u8 gText_InUseAlready_PM[]; +extern const u8 gText_CantUseHere[]; +extern const u8 gText_NoPokemonForBattle[]; +extern const u8 gText_ChoosePokemon2[]; +extern const u8 gText_NotEnoughHp[]; +extern const u8 gText_PokemonAreNeeded[]; +extern const u8 gText_PokemonCantBeSame[]; +extern const u8 gText_NoIdenticalHoldItems[]; +extern const u8 gText_DoWhatWithPokemon[]; +extern const u8 gText_RestoreWhichMove[]; +extern const u8 gText_BoostPp[]; +extern const u8 gText_DoWhatWithItem[]; +extern const u8 gText_DoWhatWithMail[]; +extern const u8 gText_AlreadyHoldingOne[]; +extern const u8 gText_NoUse[]; +extern const u8 gText_Able[]; +extern const u8 gText_First_PM[]; +extern const u8 gText_Second_PM[]; +extern const u8 gText_Third_PM[]; +extern const u8 gText_Fourth[]; +extern const u8 gText_Able2[]; +extern const u8 gText_NotAble[]; +extern const u8 gText_Able3[]; +extern const u8 gText_NotAble2[]; +extern const u8 gText_Learned[]; +extern const u8 gText_Have[]; +extern const u8 gText_DontHave[]; extern const u8 gText_Take[]; extern const u8 gText_Mail[]; extern const u8 gText_Take2[]; @@ -2708,6 +2708,36 @@ extern const u8 gText_Symbols[]; extern const u8 gText_Register2[]; extern const u8 gText_Exit2[]; +// Dodrio Berry Picking +extern const u8 gText_BerryPickingRecords[]; +extern const u8 gText_BerriesPicked[]; +extern const u8 gText_BerriesInRowFivePlayers[]; +extern const u8 gText_BestScore[]; +extern const u8 gText_1Colon[]; +extern const u8 gText_2Colon[]; +extern const u8 gText_3Colon[]; +extern const u8 gText_4Colon[]; +extern const u8 gText_5Colon[]; +extern const u8 gText_SpacePoints[]; +extern const u8 gText_10P30P50P50P[]; +extern const u8 gText_AnnouncingPrizes[]; +extern const u8 gText_AnnouncingRankings[]; +extern const u8 gText_FirstPlacePrize[]; +extern const u8 gText_CantHoldAnyMore[]; +extern const u8 gText_FilledStorageSpace[]; +extern const u8 gText_BerryPickingResults[]; +extern const u8 gText_WantToPlayAgain[]; +extern const u8 gText_CommunicationStandby3[]; +extern const u8 gText_SomeoneDroppedOut[]; + +// Pokemon jump +extern const u8 gText_WantToPlayAgain2[]; +extern const u8 gText_SomeoneDroppedOut2[]; +extern const u8 gText_CommunicationStandby4[]; +extern const u8 gText_AwesomeWonF701F700[]; +extern const u8 gText_FilledStorageSpace2[]; +extern const u8 gText_CantHoldMore[]; + // Pokenav Match Call extern const u8 gText_CallCantBeMadeHere[]; extern const u8 gText_NumberRegistered[]; @@ -2715,4 +2745,32 @@ extern const u8 gText_NumberOfBattles[]; extern const u8 gText_Unknown[]; extern const u8 gText_TrainerCloseBy[]; +// pokenav_unk_2 +extern const u8 gUnknown_085EBCC5[]; +extern const u8 gUnknown_085EBCE8[]; +extern const u8 gUnknown_085EBD01[]; +extern const u8 gUnknown_085EBD1C[]; +extern const u8 gUnknown_085EBD34[]; +extern const u8 gUnknown_085EBD83[]; +extern const u8 gUnknown_085EBDA2[]; +extern const u8 gUnknown_085EBDBF[]; +extern const u8 gUnknown_085EBDDB[]; +extern const u8 gUnknown_085EBDEE[]; +extern const u8 gUnknown_085EBE06[]; +extern const u8 gUnknown_085EBE19[]; +extern const u8 gUnknown_085EBE2D[]; +extern const u8 gUnknown_085EBE41[]; + +// pokenav_unk_4 +extern const u8 gUnknown_085EC017[]; +extern const u8 gUnknown_085EC01C[]; +extern const u8 gUnknown_085EC022[]; + +// use_pokeblock +extern const u8 gText_Coolness[]; +extern const u8 gText_Toughness[]; +extern const u8 gText_Smartness[]; +extern const u8 gText_Cuteness[]; +extern const u8 gText_Beauty3[]; + #endif // GUARD_STRINGS_H diff --git a/include/text.h b/include/text.h index eba3d0c4e..d3ff663bb 100644 --- a/include/text.h +++ b/include/text.h @@ -166,7 +166,11 @@ struct TextPrinter void (*callback)(struct TextPrinterTemplate *, u16); // 0x10 - union __attribute__((packed)) { + union +#if !MODERN + __attribute__((packed)) +#endif + { struct TextPrinterSubStruct sub; u8 fields[7]; } subUnion; diff --git a/json_data_rules.mk b/json_data_rules.mk new file mode 100755 index 000000000..1de3c79f3 --- /dev/null +++ b/json_data_rules.mk @@ -0,0 +1,8 @@ +# JSON files are run through jsonproc, which is a tool that converts JSON data to an output file +# based on an Inja template. https://github.com/pantor/inja + +AUTO_GEN_TARGETS += $(DATA_SRC_SUBDIR)/wild_encounters.h +$(DATA_SRC_SUBDIR)/wild_encounters.h: $(DATA_SRC_SUBDIR)/wild_encounters.json $(DATA_SRC_SUBDIR)/wild_encounters.json.txt + $(JSONPROC) $^ $@ + +$(C_BUILDDIR)/wild_encounter.o: c_dep += $(DATA_SRC_SUBDIR)/wild_encounters.h diff --git a/ld_script.txt b/ld_script.txt index f210e83ca..60f8892e6 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -3,6 +3,12 @@ ENTRY(Start) gNumMusicPlayers = 4; gMaxLines = 0; +/* Modify the following load addresses as needed to make more room. Alternately, delete both the + declarations below and their references further down to get rid of the gaps. */ + +__anim_mon_load_address = 0x8b00000; +__gfx_load_address = 0x8c00000; + SECTIONS { . = 0x2000000; @@ -41,290 +47,293 @@ SECTIONS { .text : ALIGN(4) { - asm/crt0.o(.text); - src/main.o(.text); - src/alloc.o(.text); - src/dma3_manager.o(.text); - src/gpu_regs.o(.text); - src/bg.o(.text); - src/blit.o(.text); - src/window.o(.text); - src/text.o(.text); - src/sprite.o(.text); - src/string_util.o(.text); - src/link.o(.text); - src/link_rfu.o(.text); - src/union_room.o(.text); - src/mystery_gift.o(.text); - src/union_room_player_avatar.o(.text); - src/union_room_battle.o(.text); - src/mevent2.o(.text); - src/mevent_801BAAC.o(.text); - src/mevent_server.o(.text); - src/mevent_client.o(.text); - src/mevent_server_helpers.o(.text); - src/mevent_news.o(.text); - src/union_room_chat.o(.text); - src/berry_crush.o(.text); - asm/berry_crush.o(.text); - src/berry_powder.o(.text); - asm/dodrio_berry_picking.o(.text); - src/pokemon_jump.o(.text); - asm/pokemon_jump.o(.text); - src/rtc.o(.text); - src/main_menu.o(.text); - src/battle_controllers.o(.text); - src/decompress.o(.text); - src/rom_8034C54.o(.text); - src/battle_bg.o(.text); - src/battle_main.o(.text); - src/battle_util.o(.text); - src/battle_script_commands.o(.text); - src/battle_util2.o(.text); - src/battle_controller_player.o(.text); - src/battle_gfx_sfx_util.o(.text); - src/battle_controller_opponent.o(.text); - src/battle_ai_switch_items.o(.text); - src/battle_controller_link_opponent.o(.text); - src/pokemon.o(.text); - src/trig.o(.text); - src/random.o(.text); - src/util.o(.text); - src/daycare.o(.text); - src/egg_hatch.o(.text); - src/battle_interface.o(.text); - src/smokescreen.o(.text); - src/pokeball.o(.text); - src/load_save.o(.text); - src/trade.o(.text); - src/berry_blender.o(.text); - src/play_time.o(.text); - src/new_game.o(.text); - src/overworld.o(.text); - src/fieldmap.o(.text); - src/metatile_behavior.o(.text); - src/field_camera.o(.text); - src/field_door.o(.text); - src/field_player_avatar.o(.text); - src/event_object_movement.o(.text); - src/field_message_box.o(.text); - src/event_obj_lock.o(.text); - src/text_window.o(.text); - src/script.o(.text); - src/scrcmd.o(.text); - src/field_control_avatar.o(.text); - src/event_data.o(.text); - src/coord_event_weather.o(.text); - src/field_tasks.o(.text); - src/clock.o(.text); - src/reset_rtc_screen.o(.text); - src/start_menu.o(.text); - src/tileset_anims.o(.text); - src/palette.o(.text); - src/sound.o(.text); - src/battle_anim.o(.text); - src/battle_anim_mons.o(.text); - src/task.o(.text); - src/reshow_battle_screen.o(.text); - src/battle_anim_status_effects.o(.text); - src/title_screen.o(.text); - src/field_weather.o(.text); - src/field_weather_effect.o(.text); - src/field_screen_effect.o(.text); - src/battle_setup.o(.text); - src/cable_club.o(.text); - src/trainer_see.o(.text); - src/wild_encounter.o(.text); - src/field_effect.o(.text); - src/scanline_effect.o(.text); - src/option_menu.o(.text); - src/pokedex.o(.text); - src/trainer_card.o(.text); - src/frontier_pass.o(.text); - src/pokemon_storage_system.o(.text); - src/pokemon_icon.o(.text); - src/script_movement.o(.text); - src/fldeff_cut.o(.text); - src/mail_data.o(.text); - src/map_name_popup.o(.text); - src/item_menu_icons.o(.text); - src/battle_anim_mon_movement.o(.text); - src/item.o(.text); - src/contest.o(.text); - src/shop.o(.text); - src/fldeff_escalator.o(.text); - src/berry.o(.text); - src/script_menu.o(.text); - src/naming_screen.o(.text); - src/money.o(.text); - src/contest_effect.o(.text); - src/record_mixing.o(.text); - src/secret_base.o(.text); - src/tv.o(.text); - src/contest_link_80F57C4.o(.text); - src/script_pokemon_util_80F87D8.o(.text); - src/field_poison.o(.text); - src/pokemon_size_record.o(.text); - src/fldeff_misc.o(.text); - src/field_special_scene.o(.text); - src/rotating_gate.o(.text); - src/safari_zone.o(.text); - src/contest_link_80FC4F4.o(.text); - src/item_use.o(.text); - src/battle_anim_effects_1.o(.text); - src/battle_anim_effects_2.o(.text); - src/water.o(.text); - src/fire.o(.text); - src/electric.o(.text); - src/ice.o(.text); - src/fight.o(.text); - src/poison.o(.text); - src/flying.o(.text); - src/psychic.o(.text); - src/bug.o(.text); - src/rock.o(.text); - src/ghost.o(.text); - src/dragon.o(.text); - src/dark.o(.text); - src/ground.o(.text); - src/normal.o(.text); - src/battle_anim_utility_funcs.o(.text); - src/battle_intro.o(.text); - src/bike.o(.text); - src/easy_chat.o(.text); - src/mon_markings.o(.text); - src/mauville_old_man.o(.text); - src/mail.o(.text); - src/menu_helpers.o(.text); - src/dewford_trend.o(.text); - src/heal_location.o(.text); - src/region_map.o(.text); - src/contest_painting_effects.o(.text); - src/decoration.o(.text); - src/slot_machine.o(.text); - src/contest_painting.o(.text); - src/battle_ai_script_commands.o(.text); - src/trader.o(.text); - src/starter_choose.o(.text); - src/wallclock.o(.text); - src/fldeff_rocksmash.o(.text); - src/fldeff_dig.o(.text); - src/pokeblock.o(.text); - src/fldeff_flash.o(.text); - src/post_battle_event_funcs.o(.text); - src/time_events.o(.text); - src/birch_pc.o(.text); - src/hof_pc.o(.text); - src/field_specials.o(.text); - src/battle_records.o(.text); - src/pokedex_area_screen.o(.text); - src/evolution_scene.o(.text); - src/roulette.o(.text); - src/pokedex_cry_screen.o(.text); - src/coins.o(.text); - src/landmark.o(.text); - src/fldeff_strength.o(.text); - src/battle_transition.o(.text); - src/battle_controller_link_partner.o(.text); - src/battle_message.o(.text); - src/cable_car.o(.text); - src/math_util.o(.text); - src/roulette_util.o(.text); - src/rom_81520A8.o(.text); - src/save.o(.text); - src/mystery_event_script.o(.text); - src/field_effect_helpers.o(.text); - src/contest_ai.o(.text); - src/battle_anim_sound_tasks.o(.text); - src/battle_controller_safari.o(.text); - src/fldeff_sweetscent.o(.text); - src/battle_anim_effects_3.o(.text); - src/move_relearner.o(.text); - src/fldeff_softboiled.o(.text); - src/decoration_inventory.o(.text); - src/roamer.o(.text); - src/battle_tower.o(.text); - src/use_pokeblock.o(.text); - src/battle_controller_wally.o(.text); - src/player_pc.o(.text); - src/intro.o(.text); - src/reset_save_heap.o(.text); - src/field_region_map.o(.text); - src/battle_anim_special.o(.text); - src/hall_of_fame.o(.text); - src/credits.o(.text); - src/lottery_corner.o(.text); - src/diploma.o(.text); - src/berry_tag_screen.o(.text); - src/mystery_event_menu.o(.text); - src/save_failed_screen.o(.text); - src/braille_puzzles.o(.text); - src/pokeblock_feed.o(.text); - src/clear_save_data_screen.o(.text); - src/intro_credits_graphics.o(.text); - src/evolution_graphics.o(.text); - src/bard_music.o(.text); - src/fldeff_teleport.o(.text); - src/battle_tv.o(.text); - src/pokemon_animation.o(.text); - src/recorded_battle.o(.text); - src/battle_controller_recorded_opponent.o(.text); - src/battle_controller_recorded_player.o(.text); - src/trainer_pokemon_sprites.o(.text); - src/lilycove_lady.o(.text); - src/battle_dome.o(.text); - src/battle_palace.o(.text); - src/match_call.o(.text); - src/menu.o(.text); - src/battle_factory_screen.o(.text); - src/apprentice.o(.text); - src/frontier_util.o(.text); - src/battle_arena.o(.text); - src/battle_factory.o(.text); - src/battle_pike.o(.text); - src/mossdeep_gym.o(.text); - src/battle_pyramid.o(.text); - src/item_menu.o(.text); - src/list_menu.o(.text); - src/dynamic_placeholder_text_util.o(.text); - src/save_location.o(.text); - src/item_icon.o(.text); - src/party_menu.o(.text); - src/battle_tent.o(.text); - src/unk_text_util_2.o(.text); - src/multiboot.o(.text); - src/unk_81BAD84.o(.text); - src/battle_controller_player_partner.o(.text); - src/mirage_tower.o(.text); - src/berry_fix_program.o(.text); - src/pokemon_summary_screen.o(.text); - src/unk_pokedex_area_screen_helper.o(.text); - src/battle_pyramid_bag.o(.text); - src/pokenav.o(.text); - src/pokenav_main_menu.o(.text); - src/pokenav_match_call_ui.o(.text); - src/pokenav_unk_1.o(.text); - asm/pokenav_unk_2.o(.text); - src/pokenav_unk_3.o(.text); - src/pokenav_unk_4.o(.text); - src/pokenav_unk_5.o(.text); - asm/pokenav_unk_6.o(.text); - asm/pokenav_unk_7.o(.text); - asm/pokenav_unk_8.o(.text); - asm/pokenav_unk_9.o(.text); - asm/pokenav_unk_10.o(.text); - src/pokenav_match_call_data.o(.text); - src/menu_specialized.o(.text); - src/ereader_helpers.o(.text); - src/faraway_island.o(.text); - src/ereader_screen.o(.text); - src/trainer_hill.o(.text); - src/rayquaza_scene.o(.text); - src/walda_phrase.o(.text); - src/contest_link_81D9DE4.o(.text); - src/gym_leader_rematch.o(.text); - src/unk_transition.o(.text); - src/international_string_util.o(.text); + asm/crt0.o(.text*); + src/main.o(.text*); + src/alloc.o(.text*); + src/dma3_manager.o(.text*); + src/gpu_regs.o(.text*); + src/bg.o(.text*); + src/blit.o(.text*); + src/window.o(.text*); + src/text.o(.text*); + src/sprite.o(.text*); + src/string_util.o(.text*); + src/link.o(.text*); + src/link_rfu.o(.text*); + src/union_room.o(.text*); + src/mystery_gift.o(.text*); + src/union_room_player_avatar.o(.text*); + src/union_room_battle.o(.text*); + src/mevent2.o(.text*); + src/mevent_801BAAC.o(.text*); + src/mevent_server.o(.text*); + src/mevent_client.o(.text*); + src/mevent_server_helpers.o(.text*); + src/mevent_news.o(.text*); + src/union_room_chat.o(.text*); + src/berry_crush.o(.text*); + asm/berry_crush.o(.text*); + src/berry_powder.o(.text*); + src/dodrio_berry_picking.o(.text*); + src/pokemon_jump.o(.text*); + asm/pokemon_jump.o(.text*); + src/rtc.o(.text*); + src/main_menu.o(.text*); + src/battle_controllers.o(.text*); + src/decompress.o(.text*); + src/rom_8034C54.o(.text*); + src/battle_bg.o(.text*); + src/battle_main.o(.text*); + src/battle_util.o(.text*); + src/battle_script_commands.o(.text*); + src/battle_util2.o(.text*); + src/battle_controller_player.o(.text*); + src/battle_gfx_sfx_util.o(.text*); + src/battle_controller_opponent.o(.text*); + src/battle_ai_switch_items.o(.text*); + src/battle_controller_link_opponent.o(.text*); + src/pokemon.o(.text*); + src/trig.o(.text*); + src/random.o(.text*); + src/util.o(.text*); + src/daycare.o(.text*); + src/egg_hatch.o(.text*); + src/battle_interface.o(.text*); + src/smokescreen.o(.text*); + src/pokeball.o(.text*); + src/load_save.o(.text*); + src/trade.o(.text*); + src/berry_blender.o(.text*); + src/play_time.o(.text*); + src/new_game.o(.text*); + src/overworld.o(.text*); + src/fieldmap.o(.text*); + src/metatile_behavior.o(.text*); + src/field_camera.o(.text*); + src/field_door.o(.text*); + src/field_player_avatar.o(.text*); + src/event_object_movement.o(.text*); + src/field_message_box.o(.text*); + src/event_obj_lock.o(.text*); + src/text_window.o(.text*); + src/script.o(.text*); + src/scrcmd.o(.text*); + src/field_control_avatar.o(.text*); + src/event_data.o(.text*); + src/coord_event_weather.o(.text*); + src/field_tasks.o(.text*); + src/clock.o(.text*); + src/reset_rtc_screen.o(.text*); + src/start_menu.o(.text*); + src/tileset_anims.o(.text*); + src/palette.o(.text*); + src/sound.o(.text*); + src/battle_anim.o(.text*); + src/battle_anim_mons.o(.text*); + src/task.o(.text*); + src/reshow_battle_screen.o(.text*); + src/battle_anim_status_effects.o(.text*); + src/title_screen.o(.text*); + src/field_weather.o(.text*); + src/field_weather_effect.o(.text*); + src/field_screen_effect.o(.text*); + src/battle_setup.o(.text*); + src/cable_club.o(.text*); + src/trainer_see.o(.text*); + src/wild_encounter.o(.text*); + src/field_effect.o(.text*); + src/scanline_effect.o(.text*); + src/option_menu.o(.text*); + src/pokedex.o(.text*); + src/trainer_card.o(.text*); + src/frontier_pass.o(.text*); + src/pokemon_storage_system.o(.text*); + src/pokemon_icon.o(.text*); + src/script_movement.o(.text*); + src/fldeff_cut.o(.text*); + src/mail_data.o(.text*); + src/map_name_popup.o(.text*); + src/item_menu_icons.o(.text*); + src/battle_anim_mon_movement.o(.text*); + src/item.o(.text*); + src/contest.o(.text*); + src/shop.o(.text*); + src/fldeff_escalator.o(.text*); + src/berry.o(.text*); + src/script_menu.o(.text*); + src/naming_screen.o(.text*); + src/money.o(.text*); + src/contest_effect.o(.text*); + src/record_mixing.o(.text*); + src/secret_base.o(.text*); + src/tv.o(.text*); + src/contest_link_80F57C4.o(.text*); + src/script_pokemon_util_80F87D8.o(.text*); + src/field_poison.o(.text*); + src/pokemon_size_record.o(.text*); + src/fldeff_misc.o(.text*); + src/field_special_scene.o(.text*); + src/rotating_gate.o(.text*); + src/safari_zone.o(.text*); + src/contest_link_80FC4F4.o(.text*); + src/item_use.o(.text*); + src/battle_anim_effects_1.o(.text*); + src/battle_anim_effects_2.o(.text*); + src/water.o(.text*); + src/fire.o(.text*); + src/electric.o(.text*); + src/ice.o(.text*); + src/fight.o(.text*); + src/poison.o(.text*); + src/flying.o(.text*); + src/psychic.o(.text*); + src/bug.o(.text*); + src/rock.o(.text*); + src/ghost.o(.text*); + src/dragon.o(.text*); + src/dark.o(.text*); + src/ground.o(.text*); + src/normal.o(.text*); + src/battle_anim_utility_funcs.o(.text*); + src/battle_intro.o(.text*); + src/bike.o(.text*); + src/easy_chat.o(.text*); + src/mon_markings.o(.text*); + src/mauville_old_man.o(.text*); + src/mail.o(.text*); + src/menu_helpers.o(.text*); + src/dewford_trend.o(.text*); + src/heal_location.o(.text*); + src/region_map.o(.text*); + src/contest_painting_effects.o(.text*); + src/decoration.o(.text*); + src/slot_machine.o(.text*); + src/contest_painting.o(.text*); + src/battle_ai_script_commands.o(.text*); + src/trader.o(.text*); + src/starter_choose.o(.text*); + src/wallclock.o(.text*); + src/fldeff_rocksmash.o(.text*); + src/fldeff_dig.o(.text*); + src/pokeblock.o(.text*); + src/fldeff_flash.o(.text*); + src/post_battle_event_funcs.o(.text*); + src/time_events.o(.text*); + src/birch_pc.o(.text*); + src/hof_pc.o(.text*); + src/field_specials.o(.text*); + src/battle_records.o(.text*); + src/pokedex_area_screen.o(.text*); + src/evolution_scene.o(.text*); + src/roulette.o(.text*); + src/pokedex_cry_screen.o(.text*); + src/coins.o(.text*); + src/landmark.o(.text*); + src/fldeff_strength.o(.text*); + src/battle_transition.o(.text*); + src/battle_controller_link_partner.o(.text*); + src/battle_message.o(.text*); + src/cable_car.o(.text*); + src/math_util.o(.text*); + src/roulette_util.o(.text*); + src/rom_81520A8.o(.text*); + src/save.o(.text*); + src/mystery_event_script.o(.text*); + src/field_effect_helpers.o(.text*); + src/contest_ai.o(.text*); + src/battle_anim_sound_tasks.o(.text*); + src/battle_controller_safari.o(.text*); + src/fldeff_sweetscent.o(.text*); + src/battle_anim_effects_3.o(.text*); + src/move_relearner.o(.text*); + src/fldeff_softboiled.o(.text*); + src/decoration_inventory.o(.text*); + src/roamer.o(.text*); + src/battle_tower.o(.text*); + src/use_pokeblock.o(.text*); + src/battle_controller_wally.o(.text*); + src/player_pc.o(.text*); + src/intro.o(.text*); + src/reset_save_heap.o(.text*); + src/field_region_map.o(.text*); + src/battle_anim_special.o(.text*); + src/hall_of_fame.o(.text*); + src/credits.o(.text*); + src/lottery_corner.o(.text*); + src/diploma.o(.text*); + src/berry_tag_screen.o(.text*); + src/mystery_event_menu.o(.text*); + src/save_failed_screen.o(.text*); + src/braille_puzzles.o(.text*); + src/pokeblock_feed.o(.text*); + src/clear_save_data_screen.o(.text*); + src/intro_credits_graphics.o(.text*); + src/evolution_graphics.o(.text*); + src/bard_music.o(.text*); + src/fldeff_teleport.o(.text*); + src/battle_tv.o(.text*); + src/pokemon_animation.o(.text*); + src/recorded_battle.o(.text*); + src/battle_controller_recorded_opponent.o(.text*); + src/battle_controller_recorded_player.o(.text*); + src/trainer_pokemon_sprites.o(.text*); + src/lilycove_lady.o(.text*); + src/battle_dome.o(.text*); + src/battle_palace.o(.text*); + src/match_call.o(.text*); + src/menu.o(.text*); + src/battle_factory_screen.o(.text*); + src/apprentice.o(.text*); + src/frontier_util.o(.text*); + src/battle_arena.o(.text*); + src/battle_factory.o(.text*); + src/battle_pike.o(.text*); + src/mossdeep_gym.o(.text*); + src/battle_pyramid.o(.text*); + src/item_menu.o(.text*); + src/list_menu.o(.text*); + src/dynamic_placeholder_text_util.o(.text*); + src/save_location.o(.text*); + src/item_icon.o(.text*); + src/party_menu.o(.text*); + src/battle_tent.o(.text*); + src/unk_text_util_2.o(.text*); + src/multiboot.o(.text*); + src/unk_81BAD84.o(.text*); + src/battle_controller_player_partner.o(.text*); + src/mirage_tower.o(.text*); + src/berry_fix_program.o(.text*); + src/pokemon_summary_screen.o(.text*); + src/unk_pokedex_area_screen_helper.o(.text*); + src/battle_pyramid_bag.o(.text*); + src/pokenav.o(.text*); + src/pokenav_main_menu.o(.text*); + src/pokenav_match_call_ui.o(.text*); + src/pokenav_unk_1.o(.text*); + src/pokenav_unk_2.o(.text*); + asm/pokenav_unk_2.o(.text*); + src/pokenav_unk_3.o(.text*); + src/pokenav_unk_4.o(.text*); + src/pokenav_unk_5.o(.text*); + src/pokenav_unk_6.o(.text*); + src/pokenav_unk_7.o(.text*); + src/pokenav_unk_8.o(.text*); + asm/pokenav_unk_8.o(.text*); + asm/pokenav_unk_9.o(.text*); + asm/pokenav_unk_10.o(.text*); + src/pokenav_unk_10.o(.text*); + src/pokenav_match_call_data.o(.text*); + src/menu_specialized.o(.text*); + src/ereader_helpers.o(.text*); + src/faraway_island.o(.text*); + src/ereader_screen.o(.text*); + src/trainer_hill.o(.text*); + src/rayquaza_scene.o(.text*); + src/walda_phrase.o(.text*); + src/contest_link_81D9DE4.o(.text*); + src/gym_leader_rematch.o(.text*); + src/unk_transition.o(.text*); + src/international_string_util.o(.text*); } =0 script_data : @@ -343,70 +352,70 @@ SECTIONS { lib_text : ALIGN(4) { - asm/libgcnmultiboot.o(.text); - asm/m4a_1.o(.text); - src/m4a.o(.text); - src/agb_flash.o(.text); - src/agb_flash_1m.o(.text); - src/agb_flash_mx.o(.text); - src/siirtc.o(.text); - src/librfu_stwi.o(.text); - src/librfu_intr.o(.text); - asm/librfu_intr.o(.text); - src/librfu_rfu.o(.text); - asm/librfu.o(.text); - asm/libagbsyscall.o(.text); - *libgcc.a:_call_via_rX.o(.text); - *libgcc.a:_divdi3.o(.text); - *libgcc.a:_divsi3.o(.text); - *libgcc.a:_dvmd_tls.o(.text); - *libgcc.a:_fixunsdfsi.o(.text); - *libgcc.a:_fixunssfsi.o(.text); - *libgcc.a:_modsi3.o(.text); - *libgcc.a:_muldi3.o(.text); - *libgcc.a:_udivdi3.o(.text); - *libgcc.a:_udivsi3.o(.text); - *libgcc.a:_umodsi3.o(.text); - *libgcc.a:dp-bit.o(.text); - *libgcc.a:fp-bit.o(.text); - *libgcc.a:_lshrdi3.o(.text); - *libgcc.a:_negdi2.o(.text); - *libc.a:memcpy.o(.text); - *libc.a:memset.o(.text); - *libc.a:strcmp.o(.text); - *libc.a:strcpy.o(.text); - *libc.a:vfprintf.o(.text); - *libc.a:vsprintf.o(.text); - *libc.a:fvwrite.o(.text); - *libc.a:locale.o(.text); - *libc.a:findfp.o(.text); - *libc.a:fflush.o(.text); - *libc.a:wsetup.o(.text); - *libc.a:mbtowc_r.o(.text); - *libc.a:s_isinf.o(.text); - *libc.a:s_isnan.o(.text); - *libc.a:memchr.o(.text); - *libc.a:strlen.o(.text); - *libc.a:dtoa.o(.text); - *libc.a:memmove.o(.text); - *libc.a:stdio.o(.text); - *libc.a:mprec.o(.text); - *libc.a:mallocr.o(.text); - *libc.a:fwalk.o(.text); - *libc.a:freer.o(.text); - *libc.a:makebuf.o(.text); - *libc.a:readr.o(.text); - *libc.a:writer.o(.text); - *libc.a:lseekr.o(.text); - *libc.a:closer.o(.text); - *libc.a:callocr.o(.text); - *libc.a:sbrkr.o(.text); - *libc.a:mlock.o(.text); - *libc.a:fstatr.o(.text); - *libc.a:libcfunc.o(.text); - *libc.a:syscalls.o(.text); - *libc.a:errno.o(.text); - src/libisagbprn.o(.text); + asm/libgcnmultiboot.o(.text*); + asm/m4a_1.o(.text*); + src/m4a.o(.text*); + src/agb_flash.o(.text*); + src/agb_flash_1m.o(.text*); + src/agb_flash_mx.o(.text*); + src/siirtc.o(.text*); + src/librfu_stwi.o(.text*); + src/librfu_intr.o(.text*); + asm/librfu_intr.o(.text*); + src/librfu_rfu.o(.text*); + asm/librfu.o(.text*); + asm/libagbsyscall.o(.text*); + *libgcc.a:_call_via_rX.o(.text*); + *libgcc.a:_divdi3.o(.text*); + *libgcc.a:_divsi3.o(.text*); + *libgcc.a:_dvmd_tls.o(.text*); + *libgcc.a:_fixunsdfsi.o(.text*); + *libgcc.a:_fixunssfsi.o(.text*); + *libgcc.a:_modsi3.o(.text*); + *libgcc.a:_muldi3.o(.text*); + *libgcc.a:_udivdi3.o(.text*); + *libgcc.a:_udivsi3.o(.text*); + *libgcc.a:_umodsi3.o(.text*); + *libgcc.a:dp-bit.o(.text*); + *libgcc.a:fp-bit.o(.text*); + *libgcc.a:_lshrdi3.o(.text*); + *libgcc.a:_negdi2.o(.text*); + *libc.a:memcpy.o(.text*); + *libc.a:memset.o(.text*); + *libc.a:strcmp.o(.text*); + *libc.a:strcpy.o(.text*); + *libc.a:vfprintf.o(.text*); + *libc.a:vsprintf.o(.text*); + *libc.a:fvwrite.o(.text*); + *libc.a:locale.o(.text*); + *libc.a:findfp.o(.text*); + *libc.a:fflush.o(.text*); + *libc.a:wsetup.o(.text*); + *libc.a:mbtowc_r.o(.text*); + *libc.a:s_isinf.o(.text*); + *libc.a:s_isnan.o(.text*); + *libc.a:memchr.o(.text*); + *libc.a:strlen.o(.text*); + *libc.a:dtoa.o(.text*); + *libc.a:memmove.o(.text*); + *libc.a:stdio.o(.text*); + *libc.a:mprec.o(.text*); + *libc.a:mallocr.o(.text*); + *libc.a:fwalk.o(.text*); + *libc.a:freer.o(.text*); + *libc.a:makebuf.o(.text*); + *libc.a:readr.o(.text*); + *libc.a:writer.o(.text*); + *libc.a:lseekr.o(.text*); + *libc.a:closer.o(.text*); + *libc.a:callocr.o(.text*); + *libc.a:sbrkr.o(.text*); + *libc.a:mlock.o(.text*); + *libc.a:fstatr.o(.text*); + *libc.a:libcfunc.o(.text*); + *libc.a:syscalls.o(.text*); + *libc.a:errno.o(.text*); + src/libisagbprn.o(.text*); } =0 .rodata : @@ -420,7 +429,9 @@ SECTIONS { data/io_reg.o(.rodata); src/string_util.o(.rodata); src/link.o(.rodata); + src/link.o(.rodata.str1.4); src/link_rfu.o(.rodata); + src/link_rfu.o(.rodata.str1.4); src/union_room.o(.rodata); src/mystery_gift.o(.rodata); src/union_room_player_avatar.o(.rodata); @@ -431,13 +442,15 @@ SECTIONS { src/mevent_client.o(.rodata); src/mevent_scripts.o(.rodata); src/union_room_chat.o(.rodata); + src/berry_crush.o(.rodata); data/berry_crush.o(.rodata); data/berry_powder.o(.rodata); - data/dodrio_berry_picking.o(.rodata); + src/dodrio_berry_picking.o(.rodata); src/pokemon_jump.o(.rodata); data/pokemon_jump.o(.rodata); src/rtc.o(.rodata); src/main_menu.o(.rodata); + src/battle_controllers.o(.rodata); src/rom_8034C54.o(.rodata); src/data.o(.rodata); src/battle_bg.o(.rodata); @@ -447,6 +460,7 @@ SECTIONS { src/battle_controller_player.o(.rodata); data/smokescreen.o(.rodata); src/battle_controller_opponent.o(.rodata); + src/battle_ai_switch_items.o(.rodata); src/battle_controller_link_opponent.o(.rodata); src/pokemon.o(.rodata); src/trig.o(.rodata); @@ -469,6 +483,7 @@ SECTIONS { src/event_object_movement.o(.rodata); src/text_window.o(.rodata); src/scrcmd.o(.rodata); + src/field_control_avatar.o(.rodata); src/coord_event_weather.o(.rodata); src/field_tasks.o(.rodata); src/reset_rtc_screen.o(.rodata); @@ -479,6 +494,7 @@ SECTIONS { src/battle_anim.o(.rodata); src/battle_anim_mons.o(.rodata); data/map_events.o(.rodata); + src/reshow_battle_screen.o(.rodata); src/battle_anim_status_effects.o(.rodata); src/title_screen.o(.rodata); src/field_weather.o(.rodata); @@ -489,6 +505,7 @@ SECTIONS { src/trainer_see.o(.rodata); src/wild_encounter.o(.rodata); src/field_effect.o(.rodata); + src/scanline_effect.o(.rodata); src/option_menu.o(.rodata); src/pokedex.o(.rodata); src/trainer_card.o(.rodata); @@ -511,12 +528,14 @@ SECTIONS { src/record_mixing.o(.rodata); src/secret_base.o(.rodata); src/tv.o(.rodata); + src/contest_link_80F57C4.o(.rodata); data/contest_link_80F57C4.o(.rodata); src/script_pokemon_util_80F87D8.o(.rodata); src/pokemon_size_record.o(.rodata) src/fldeff_misc.o(.rodata); src/field_special_scene.o(.rodata); src/rotating_gate.o(.rodata); + src/contest_link_80FC4F4.o(.rodata); src/item_use.o(.rodata); src/battle_anim_effects_1.o(.rodata); src/battle_anim_effects_2.o(.rodata); @@ -545,6 +564,7 @@ SECTIONS { src/menu_helpers.o(.rodata); src/heal_location.o(.rodata); src/region_map.o(.rodata); + src/contest_painting_effects.o(.rodata); data/contest_painting_effects.o(.rodata); src/decoration.o(.rodata); src/slot_machine.o(.rodata); @@ -571,13 +591,13 @@ SECTIONS { src/save.o(.rodata); src/field_effect_helpers.o(.rodata); src/contest_ai.o(.rodata); + src/battle_anim_sound_tasks.o(.rodata); src/battle_controller_safari.o(.rodata); src/battle_anim_effects_3.o(.rodata); src/move_relearner.o(.rodata); src/roamer.o(.rodata); src/battle_tower.o(.rodata); src/use_pokeblock.o(.rodata); - data/use_pokeblock.o(.rodata); src/battle_controller_wally.o(.rodata); src/player_pc.o(.rodata); src/intro.o(.rodata); @@ -613,6 +633,7 @@ SECTIONS { src/battle_arena.o(.rodata); src/battle_factory.o(.rodata); src/battle_pike.o(.rodata); + src/mossdeep_gym.o(.rodata); data/mossdeep_gym.o(.rodata); src/battle_pyramid.o(.rodata); src/item_menu.o(.rodata); @@ -622,6 +643,7 @@ SECTIONS { src/party_menu.o(.rodata); src/battle_tent.o(.rodata); src/unk_text_util_2.o(.rodata); + src/multiboot.o(.rodata); src/unk_81BAD84.o(.rodata); src/battle_controller_player_partner.o(.rodata); src/mirage_tower.o(.rodata); @@ -633,11 +655,20 @@ SECTIONS { src/pokenav_main_menu.o(.rodata); src/pokenav_match_call_ui.o(.rodata); src/pokenav_unk_1.o(.rodata); - data/pokenav.o(.rodata); + src/pokenav_unk_2.o(.rodata); + src/pokenav_unk_3.o(.rodata); + src/pokenav_unk_4.o(.rodata); + src/pokenav_unk_5.o(.rodata); + src/pokenav_unk_7.o(.rodata); + src/pokenav_unk_8.o(.rodata); + src/pokenav_unk_9.o(.rodata); + src/pokenav_unk_10.o(.rodata); src/pokenav_match_call_data.o(.rodata); src/menu_specialized.o(.rodata); + src/ereader_helpers.o(.rodata); data/ereader_helpers.o(.rodata); src/faraway_island.o(.rodata); + src/ereader_screen.o(.rodata); data/ereader_screen.o(.rodata); src/trainer_hill.o(.rodata); src/rayquaza_scene.o(.rodata); @@ -1190,6 +1221,7 @@ SECTIONS { lib_rodata : SUBALIGN(4) { + src/m4a.o(.rodata); src/agb_flash.o(.rodata); src/agb_flash_1m.o(.rodata); src/agb_flash_mx.o(.rodata); @@ -1212,27 +1244,13 @@ SECTIONS { data/multiboot_pokemon_colosseum.o(.rodata); } =0 - gap1 : - { - gap1_start = ABSOLUTE(.); - BYTE(0x00) - . = 0x8B00000 - gap1_start; - } =0 - - anim_mon_front_pic_data : + anim_mon_front_pic_data __anim_mon_load_address : ALIGN(4) { src/anim_mon_front_pics.o(.rodata); } =0 - gap2 : - { - gap2_start = ABSOLUTE(.); - BYTE(0x00) - . = 0x8C00000 - gap2_start; - } =0 - - gfx_data : + gfx_data __gfx_load_address : ALIGN(4) { src/graphics.o(.rodata); diff --git a/ld_script_modern.txt b/ld_script_modern.txt new file mode 100644 index 000000000..98ef16b17 --- /dev/null +++ b/ld_script_modern.txt @@ -0,0 +1,156 @@ +ENTRY(Start) + +gNumMusicPlayers = 4; +gMaxLines = 0; + +SECTIONS { + . = 0x2000000; + + ewram (NOLOAD) : + ALIGN(4) + { + gHeap = .; + + . = 0x1C000; + + src/*.o(ewram_data); + + . = 0x40000; +} + + . = 0x3000000; + + iwram (NOLOAD) : + ALIGN(4) + { + /* .bss starts at 0x3000000 */ + src/*.o(.bss); + asm/m4a_1.o(.bss); + + /* .bss.code starts at 0x3001AA8 */ + src/m4a.o(.bss.code); + + /* COMMON starts at 0x30022A8 */ + src/*.o(COMMON); + *libc.a:sbrkr.o(COMMON); + end = .; + . = 0x8000; + } + + . = 0x8000000; + + .text : + ALIGN(4) + { + asm/crt0.o(.text); + src/*.o(.text); + asm/*.o(.text); + } =0 + + script_data : + ALIGN(4) + { + data/*.o(script_data); + } =0 + + lib_text : + ALIGN(4) + { + asm/libgcnmultiboot.o(.text); + asm/m4a_1.o(.text); + src/m4a.o(.text); + src/agb_flash.o(.text); + src/agb_flash_1m.o(.text); + src/agb_flash_mx.o(.text); + src/siirtc.o(.text); + src/librfu_stwi.o(.text); + src/librfu_intr.o(.text); + asm/librfu_intr.o(.text); + src/librfu_rfu.o(.text); + asm/librfu.o(.text); + asm/libagbsyscall.o(.text); + *libgcc.a:*.o(.text*); + *libc.a:*.o(.text*); + src/libisagbprn.o(.text); + } =0 + + .rodata : + ALIGN(4) + { + src/*.o(.rodata*); + data/*.o(.rodata*); + } =0 + + song_data : + ALIGN(4) + { + sound/songs/*.o(.rodata); + } =0 + + lib_rodata : + SUBALIGN(4) + { + src/m4a.o(.rodata); + src/agb_flash.o(.rodata); + src/agb_flash_1m.o(.rodata); + src/agb_flash_mx.o(.rodata); + src/agb_flash_le.o(.rodata); + src/siirtc.o(.rodata); + data/librfu_rodata.o(.rodata); + *libgcc.a:*.o(.rodata*); + *libc.a:*.o(.rodata*); + *libc.a:*.o(.data*); + src/libisagbprn.o(.rodata); + } =0 + + other_data : + ALIGN(4) + { + data/unknown_serial_data.o(.rodata); + data/multiboot_berry_glitch_fix.o(.rodata); + data/multiboot_pokemon_colosseum.o(.rodata); + } =0 + + anim_mon_front_pic_data : + ALIGN(4) + { + src/anim_mon_front_pics.o(.rodata); + } =0 + + gfx_data : + ALIGN(4) + { + src/graphics.o(.rodata); + } =0 + + /* DWARF debug sections. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + + /* Discard everything not specifically mentioned above. */ + /DISCARD/ : + { + *(*); + } +} diff --git a/sound/direct_sound_data.inc b/sound/direct_sound_data.inc index 5b1e2ffeb..f1518ee4b 100644 --- a/sound/direct_sound_data.inc +++ b/sound/direct_sound_data.inc @@ -1,2175 +1,2175 @@ .align 2 -DirectSoundWaveData_86B5D04:: @ 86B5D04 - .incbin "sound/direct_sound_samples/86B5D04.bin" +DirectSoundWaveData_sc88_glockenspiel:: + .incbin "sound/direct_sound_samples/sc88_glockenspiel.bin" .align 2 -DirectSoundWaveData_86B63A8:: @ 86B63A8 - .incbin "sound/direct_sound_samples/86B63A8.bin" +DirectSoundWaveData_sc88_organ2:: + .incbin "sound/direct_sound_samples/sc88_organ2.bin" .align 2 -DirectSoundWaveData_86B6BA0:: @ 86B6BA0 - .incbin "sound/direct_sound_samples/86B6BA0.bin" +DirectSoundWaveData_sc88_fretless_bass:: + .incbin "sound/direct_sound_samples/sc88_fretless_bass.bin" .align 2 -DirectSoundWaveData_86B776C:: @ 86B776C - .incbin "sound/direct_sound_samples/86B776C.bin" +DirectSoundWaveData_jv1080_slap_bass:: + .incbin "sound/direct_sound_samples/jv1080_slap_bass.bin" .align 2 -DirectSoundWaveData_86B86A4:: @ 86B86A4 - .incbin "sound/direct_sound_samples/86B86A4.bin" +DirectSoundWaveData_sc88_synth_bass:: + .incbin "sound/direct_sound_samples/sc88_synth_bass.bin" .align 2 -DirectSoundWaveData_86B9318:: @ 86B9318 - .incbin "sound/direct_sound_samples/86B9318.bin" +DirectSoundWaveData_sc88_timpani:: + .incbin "sound/direct_sound_samples/sc88_timpani.bin" .align 2 -DirectSoundWaveData_86BA7E8:: @ 86BA7E8 - .incbin "sound/direct_sound_samples/86BA7E8.bin" +DirectSoundWaveData_advanced_orchestra_voice_ahhs:: + .incbin "sound/direct_sound_samples/advanced_orchestra_voice_ahhs.bin" .align 2 -DirectSoundWaveData_86BBE98:: @ 86BBE98 - .incbin "sound/direct_sound_samples/86BBE98.bin" +DirectSoundWaveData_sd90_classical_oboe:: + .incbin "sound/direct_sound_samples/sd90_classical_oboe.bin" .align 2 -DirectSoundWaveData_86BD1DC:: @ 86BD1DC - .incbin "sound/direct_sound_samples/86BD1DC.bin" +DirectSoundWaveData_unused_sd90_oboe:: + .incbin "sound/direct_sound_samples/unused_sd90_oboe.bin" .align 2 -DirectSoundWaveData_86BDC80:: @ 86BDC80 - .incbin "sound/direct_sound_samples/86BDC80.bin" +DirectSoundWaveData_unused_electric_guitar:: + .incbin "sound/direct_sound_samples/unused_electric_guitar.bin" .align 2 -DirectSoundWaveData_86BEF94:: @ 86BEF94 - .incbin "sound/direct_sound_samples/86BEF94.bin" +DirectSoundWaveData_unused_sc88_unison_slap:: + .incbin "sound/direct_sound_samples/unused_sc88_unison_slap.bin" .align 2 -DirectSoundWaveData_86C2590:: @ 86C2590 - .incbin "sound/direct_sound_samples/86C2590.bin" +DirectSoundWaveData_unknown_snare:: + .incbin "sound/direct_sound_samples/unknown_snare.bin" .align 2 -DirectSoundWaveData_86C2A68:: @ 86C2A68 - .incbin "sound/direct_sound_samples/86C2A68.bin" +DirectSoundWaveData_unknown_wood_block_low:: + .incbin "sound/direct_sound_samples/unknown_wood_block_low.bin" .align 2 -DirectSoundWaveData_86C4344:: @ 86C4344 - .incbin "sound/direct_sound_samples/86C4344.bin" +DirectSoundWaveData_unknown_wood_block_high:: + .incbin "sound/direct_sound_samples/unknown_wood_block_high.bin" .align 2 -DirectSoundWaveData_86C566C:: @ 86C566C - .incbin "sound/direct_sound_samples/86C566C.bin" +DirectSoundWaveData_sc88_standard_kick:: + .incbin "sound/direct_sound_samples/sc88_standard_kick.bin" .align 2 -DirectSoundWaveData_86C5B0C:: @ 86C5B0C - .incbin "sound/direct_sound_samples/86C5B0C.bin" +DirectSoundWaveData_sc88_standard_snare1:: + .incbin "sound/direct_sound_samples/sc88_standard_snare1.bin" .align 2 -DirectSoundWaveData_86C6200:: @ 86C6200 - .incbin "sound/direct_sound_samples/86C6200.bin" +DirectSoundWaveData_sc88_standard_hand_clap:: + .incbin "sound/direct_sound_samples/sc88_standard_hand_clap.bin" .align 2 -DirectSoundWaveData_86C6A90:: @ 86C6A90 - .incbin "sound/direct_sound_samples/86C6A90.bin" +DirectSoundWaveData_sc88_standard_snare2:: + .incbin "sound/direct_sound_samples/sc88_standard_snare2.bin" .align 2 -DirectSoundWaveData_86C7308:: @ 86C7308 - .incbin "sound/direct_sound_samples/86C7308.bin" +DirectSoundWaveData_unknown_tom:: + .incbin "sound/direct_sound_samples/unknown_tom.bin" .align 2 -DirectSoundWaveData_86C8348:: @ 86C8348 - .incbin "sound/direct_sound_samples/86C8348.bin" +DirectSoundWaveData_unknown_close_hihat:: + .incbin "sound/direct_sound_samples/unknown_close_hihat.bin" .align 2 -DirectSoundWaveData_86C875C:: @ 86C875C - .incbin "sound/direct_sound_samples/86C875C.bin" +DirectSoundWaveData_unknown_open_hihat:: + .incbin "sound/direct_sound_samples/unknown_open_hihat.bin" .align 2 -DirectSoundWaveData_86C958C:: @ 86C958C - .incbin "sound/direct_sound_samples/86C958C.bin" +DirectSoundWaveData_unknown_bell:: + .incbin "sound/direct_sound_samples/unknown_bell.bin" .align 2 -DirectSoundWaveData_86CA520:: @ 86CA520 - .incbin "sound/direct_sound_samples/86CA520.bin" +DirectSoundWaveData_unknown_tambourine:: + .incbin "sound/direct_sound_samples/unknown_tambourine.bin" .align 2 -DirectSoundWaveData_86CADD4:: @ 86CADD4 - .incbin "sound/direct_sound_samples/86CADD4.bin" +DirectSoundWaveData_unknown_cymbal_crash:: + .incbin "sound/direct_sound_samples/unknown_cymbal_crash.bin" .align 2 -DirectSoundWaveData_86CB6B8:: @ 86CB6B8 - .incbin "sound/direct_sound_samples/86CB6B8.bin" +DirectSoundWaveData_sc88_standard_cymbal_crash:: + .incbin "sound/direct_sound_samples/sc88_standard_cymbal_crash.bin" .align 2 -DirectSoundWaveData_86CC5E4:: @ 86CC5E4 - .incbin "sound/direct_sound_samples/86CC5E4.bin" +DirectSoundWaveData_sc88_bongo:: + .incbin "sound/direct_sound_samples/sc88_bongo.bin" .align 2 -DirectSoundWaveData_86CCAFC:: @ 86CCAFC - .incbin "sound/direct_sound_samples/86CCAFC.bin" +DirectSoundWaveData_sc88_bongo_low:: + .incbin "sound/direct_sound_samples/sc88_bongo_low.bin" .align 2 -DirectSoundWaveData_86CD0C4:: @ 86CD0C4 - .incbin "sound/direct_sound_samples/86CD0C4.bin" +DirectSoundWaveData_drum_and_percussion_kick:: + .incbin "sound/direct_sound_samples/drum_and_percussion_kick.bin" .align 2 -DirectSoundWaveData_86CDFDC:: @ 86CDFDC - .incbin "sound/direct_sound_samples/86CDFDC.bin" +DirectSoundWaveData_sd90_solo_snare:: + .incbin "sound/direct_sound_samples/sd90_solo_snare.bin" .align 2 -DirectSoundWaveData_86CF950:: @ 86CF950 - .incbin "sound/direct_sound_samples/86CF950.bin" +DirectSoundWaveData_sd90_ambient_tom:: + .incbin "sound/direct_sound_samples/sd90_ambient_tom.bin" .align 2 -DirectSoundWaveData_86D1A2C:: @ 86D1A2C - .incbin "sound/direct_sound_samples/86D1A2C.bin" +DirectSoundWaveData_dance_drums_ride_bell:: + .incbin "sound/direct_sound_samples/dance_drums_ride_bell.bin" .align 2 -DirectSoundWaveData_86D925C:: @ 86D925C - .incbin "sound/direct_sound_samples/86D925C.bin" +DirectSoundWaveData_unknown_cowbell:: + .incbin "sound/direct_sound_samples/unknown_cowbell.bin" .align 2 -DirectSoundWaveData_86D9C14:: @ 86D9C14 - .incbin "sound/direct_sound_samples/86D9C14.bin" +DirectSoundWaveData_unknown_djembe:: + .incbin "sound/direct_sound_samples/unknown_djembe.bin" .align 2 -DirectSoundWaveData_86DAA94:: @ 86DAA94 - .incbin "sound/direct_sound_samples/86DAA94.bin" +DirectSoundWaveData_unknown_anvil_high:: + .incbin "sound/direct_sound_samples/unknown_anvil_high.bin" .align 2 -DirectSoundWaveData_86DB908:: @ 86DB908 - .incbin "sound/direct_sound_samples/86DB908.bin" +DirectSoundWaveData_sc88_standard_bells:: + .incbin "sound/direct_sound_samples/sc88_standard_bells.bin" .align 2 -DirectSoundWaveData_86DD11C:: @ 86DD11C - .incbin "sound/direct_sound_samples/86DD11C.bin" +DirectSoundWaveData_unknown_anvil_low:: + .incbin "sound/direct_sound_samples/unknown_anvil_low.bin" .align 2 -DirectSoundWaveData_86DE6C0:: @ 86DE6C0 - .incbin "sound/direct_sound_samples/86DE6C0.bin" +DirectSoundWaveData_unknown_ethnic_drum:: + .incbin "sound/direct_sound_samples/unknown_ethnic_drum.bin" .align 2 -DirectSoundWaveData_86DFCA4:: @ 86DFCA4 - .incbin "sound/direct_sound_samples/86DFCA4.bin" +DirectSoundWaveData_unknown_tsuzumi:: + .incbin "sound/direct_sound_samples/unknown_tsuzumi.bin" .align 2 -DirectSoundWaveData_86E0D98:: @ 86E0D98 - .incbin "sound/direct_sound_samples/86E0D98.bin" +DirectSoundWaveData_sc88_piano1_48:: + .incbin "sound/direct_sound_samples/sc88_piano1_48.bin" .align 2 -DirectSoundWaveData_86E1CF8:: @ 86E1CF8 - .incbin "sound/direct_sound_samples/86E1CF8.bin" +DirectSoundWaveData_sc88_piano1_60:: + .incbin "sound/direct_sound_samples/sc88_piano1_60.bin" .align 2 -DirectSoundWaveData_86E3358:: @ 86E3358 - .incbin "sound/direct_sound_samples/86E3358.bin" +DirectSoundWaveData_sc88_piano1_72:: + .incbin "sound/direct_sound_samples/sc88_piano1_72.bin" .align 2 -DirectSoundWaveData_86E48B4:: @ 86E48B4 - .incbin "sound/direct_sound_samples/86E48B4.bin" +DirectSoundWaveData_sc88_piano1_84:: + .incbin "sound/direct_sound_samples/sc88_piano1_84.bin" .align 2 -DirectSoundWaveData_86E5440:: @ 86E5440 - .incbin "sound/direct_sound_samples/86E5440.bin" +DirectSoundWaveData_sc88_string_ensemble_60:: + .incbin "sound/direct_sound_samples/sc88_string_ensemble_60.bin" .align 2 -DirectSoundWaveData_86E89E4:: @ 86E89E4 - .incbin "sound/direct_sound_samples/86E89E4.bin" +DirectSoundWaveData_sc88_string_ensemble_72:: + .incbin "sound/direct_sound_samples/sc88_string_ensemble_72.bin" .align 2 -DirectSoundWaveData_86EAD00:: @ 86EAD00 - .incbin "sound/direct_sound_samples/86EAD00.bin" +DirectSoundWaveData_sc88_string_ensemble_84:: + .incbin "sound/direct_sound_samples/sc88_string_ensemble_84.bin" .align 2 -DirectSoundWaveData_86EE3CC:: @ 86EE3CC - .incbin "sound/direct_sound_samples/86EE3CC.bin" +DirectSoundWaveData_sc88_trumpet_60:: + .incbin "sound/direct_sound_samples/sc88_trumpet_60.bin" .align 2 -DirectSoundWaveData_86EF71C:: @ 86EF71C - .incbin "sound/direct_sound_samples/86EF71C.bin" +DirectSoundWaveData_sc88_trumpet_72:: + .incbin "sound/direct_sound_samples/sc88_trumpet_72.bin" .align 2 -DirectSoundWaveData_86F0C2C:: @ 86F0C2C - .incbin "sound/direct_sound_samples/86F0C2C.bin" +DirectSoundWaveData_sc88_trumpet_84:: + .incbin "sound/direct_sound_samples/sc88_trumpet_84.bin" .align 2 -DirectSoundWaveData_86F204C:: @ 86F204C - .incbin "sound/direct_sound_samples/86F204C.bin" +DirectSoundWaveData_unknown_trombone_39:: + .incbin "sound/direct_sound_samples/unknown_trombone_39.bin" .align 2 -DirectSoundWaveData_86F30E8:: @ 86F30E8 - .incbin "sound/direct_sound_samples/86F30E8.bin" +DirectSoundWaveData_unknown_trombone_51:: + .incbin "sound/direct_sound_samples/unknown_trombone_51.bin" .align 2 -DirectSoundWaveData_86F4144:: @ 86F4144 - .incbin "sound/direct_sound_samples/86F4144.bin" +DirectSoundWaveData_sc88_french_horn_60:: + .incbin "sound/direct_sound_samples/sc88_french_horn_60.bin" .align 2 -DirectSoundWaveData_86FB0D8:: @ 86FB0D8 - .incbin "sound/direct_sound_samples/86FB0D8.bin" +DirectSoundWaveData_sc88_french_horn_72:: + .incbin "sound/direct_sound_samples/sc88_french_horn_72.bin" .align 2 -DirectSoundWaveData_86FF65C:: @ 86FF65C - .incbin "sound/direct_sound_samples/86FF65C.bin" +DirectSoundWaveData_sc88_flute:: + .incbin "sound/direct_sound_samples/sc88_flute.bin" .align 2 -DirectSoundWaveData_86FFDC0:: @ 86FFDC0 - .incbin "sound/direct_sound_samples/86FFDC0.bin" +DirectSoundWaveData_sc88_pick_bass:: + .incbin "sound/direct_sound_samples/sc88_pick_bass.bin" .align 2 -DirectSoundWaveData_8701A10:: @ 8701A10 - .incbin "sound/direct_sound_samples/8701A10.bin" +DirectSoundWaveData_unknown_koto_high:: + .incbin "sound/direct_sound_samples/unknown_koto_high.bin" .align 2 -DirectSoundWaveData_8703214:: @ 8703214 - .incbin "sound/direct_sound_samples/8703214.bin" +DirectSoundWaveData_sd90_classical_shakuhachi:: + .incbin "sound/direct_sound_samples/sd90_classical_shakuhachi.bin" .align 2 -DirectSoundWaveData_8706DCC:: @ 8706DCC - .incbin "sound/direct_sound_samples/8706DCC.bin" +DirectSoundWaveData_unknown_koto_low:: + .incbin "sound/direct_sound_samples/unknown_koto_low.bin" .align 2 -DirectSoundWaveData_8709004:: @ 8709004 - .incbin "sound/direct_sound_samples/8709004.bin" +DirectSoundWaveData_sd90_classical_overdrive_guitar:: + .incbin "sound/direct_sound_samples/sd90_classical_overdrive_guitar.bin" .align 2 -DirectSoundWaveData_870AE74:: @ 870AE74 - .incbin "sound/direct_sound_samples/870AE74.bin" +DirectSoundWaveData_sd90_classical_distortion_guitar_high:: + .incbin "sound/direct_sound_samples/sd90_classical_distortion_guitar_high.bin" .align 2 -DirectSoundWaveData_870DE64:: @ 870DE64 - .incbin "sound/direct_sound_samples/870DE64.bin" +DirectSoundWaveData_sd90_classical_distortion_guitar_low:: + .incbin "sound/direct_sound_samples/sd90_classical_distortion_guitar_low.bin" .align 2 -DirectSoundWaveData_8710AB8:: @ 8710AB8 - .incbin "sound/direct_sound_samples/8710AB8.bin" +DirectSoundWaveData_heart_of_asia_gamelan:: + .incbin "sound/direct_sound_samples/heart_of_asia_gamelan.bin" .align 2 -DirectSoundWaveData_8715038:: @ 8715038 - .incbin "sound/direct_sound_samples/8715038.bin" +DirectSoundWaveData_unknown_church_organ:: + .incbin "sound/direct_sound_samples/unknown_church_organ.bin" .align 2 -DirectSoundWaveData_8717980:: @ 8717980 - .incbin "sound/direct_sound_samples/8717980.bin" +DirectSoundWaveData_emu_ii_pipe_organ:: + .incbin "sound/direct_sound_samples/emu_ii_pipe_organ.bin" .align 2 -DirectSoundWaveData_87190E0:: @ 87190E0 - .incbin "sound/direct_sound_samples/87190E0.bin" +DirectSoundWaveData_unused_unknown_female_voice:: + .incbin "sound/direct_sound_samples/unused_unknown_female_voice.bin" .align 2 -DirectSoundWaveData_871A724:: @ 871A724 - .incbin "sound/direct_sound_samples/871A724.bin" +DirectSoundWaveData_unused_unknown_male_voice:: + .incbin "sound/direct_sound_samples/unused_unknown_male_voice.bin" .align 2 -DirectSoundWaveData_871CBCC:: @ 871CBCC - .incbin "sound/direct_sound_samples/871CBCC.bin" +DirectSoundWaveData_unknown_e_piano_low:: + .incbin "sound/direct_sound_samples/unknown_e_piano_low.bin" .align 2 -DirectSoundWaveData_871F234:: @ 871F234 - .incbin "sound/direct_sound_samples/871F234.bin" +DirectSoundWaveData_unknown_e_piano_high:: + .incbin "sound/direct_sound_samples/unknown_e_piano_high.bin" .align 2 -DirectSoundWaveData_87205DC:: @ 87205DC - .incbin "sound/direct_sound_samples/87205DC.bin" +DirectSoundWaveData_sc88_timpani_with_snare:: + .incbin "sound/direct_sound_samples/sc88_timpani_with_snare.bin" .align 2 -DirectSoundWaveData_8721AAC:: @ 8721AAC - .incbin "sound/direct_sound_samples/8721AAC.bin" +DirectSoundWaveData_unknown_synth_snare:: + .incbin "sound/direct_sound_samples/unknown_synth_snare.bin" .align 2 -DirectSoundWaveData_87224B8:: @ 87224B8 - .incbin "sound/direct_sound_samples/87224B8.bin" +DirectSoundWaveData_unused_sc88_square:: + .incbin "sound/direct_sound_samples/unused_sc88_square.bin" .align 2 -DirectSoundWaveData_87240CC:: @ 87240CC - .incbin "sound/direct_sound_samples/87240CC.bin" +DirectSoundWaveData_bicycle_bell:: + .incbin "sound/direct_sound_samples/bicycle_bell.bin" .align 2 -DirectSoundWaveData_8725A2C:: @ 8725A2C +DirectSoundWaveData_8725A2C:: .incbin "sound/direct_sound_samples/8725A2C.bin" .align 2 -DirectSoundWaveData_8726EF0:: @ 8726EF0 - .incbin "sound/direct_sound_samples/8726EF0.bin" +DirectSoundWaveData_sc88_pizzicato_strings:: + .incbin "sound/direct_sound_samples/sc88_pizzicato_strings.bin" .align 2 -DirectSoundWaveData_872762C:: @ 872762C +DirectSoundWaveData_872762C:: .incbin "sound/direct_sound_samples/872762C.bin" .align 2 -DirectSoundWaveData_872921C:: @ 872921C +DirectSoundWaveData_872921C:: .incbin "sound/direct_sound_samples/872921C.bin" .align 2 -DirectSoundWaveData_872A5D0:: @ 872A5D0 +DirectSoundWaveData_872A5D0:: .incbin "sound/direct_sound_samples/872A5D0.bin" .align 2 -DirectSoundWaveData_872CC54:: @ 872CC54 - .incbin "sound/direct_sound_samples/872CC54.bin" +DirectSoundWaveData_sc88_wind:: + .incbin "sound/direct_sound_samples/sc88_wind.bin" .align 2 -DirectSoundWaveData_872DE98:: @ 872DE98 - .incbin "sound/direct_sound_samples/872DE98.bin" +DirectSoundWaveData_sc88_bubbles:: + .incbin "sound/direct_sound_samples/sc88_bubbles.bin" .align 2 -DirectSoundWaveData_872EEA8:: @ 872EEA8 +DirectSoundWaveData_872EEA8:: .incbin "sound/direct_sound_samples/872EEA8.bin" .align 2 -DirectSoundWaveData_87301B0:: @ 87301B0 +DirectSoundWaveData_87301B0:: .incbin "sound/direct_sound_samples/87301B0.bin" .align 2 -DirectSoundWaveData_87322BC:: @ 87322BC - .incbin "sound/direct_sound_samples/87322BC.bin" +DirectSoundWaveData_unused_acid_bass:: + .incbin "sound/direct_sound_samples/unused_acid_bass.bin" .align 2 -DirectSoundWaveData_8734298:: @ 8734298 +DirectSoundWaveData_8734298:: .incbin "sound/direct_sound_samples/8734298.bin" .align 2 -DirectSoundWaveData_87364A8:: @ 87364A8 +DirectSoundWaveData_87364A8:: .incbin "sound/direct_sound_samples/87364A8.bin" .align 2 -DirectSoundWaveData_8736C74:: @ 8736C74 - .incbin "sound/direct_sound_samples/8736C74.bin" +DirectSoundWaveData_sc88_tubular_bell:: + .incbin "sound/direct_sound_samples/sc88_tubular_bell.bin" .align 2 -DirectSoundWaveData_87385E4:: @ 87385E4 +DirectSoundWaveData_87385E4:: .incbin "sound/direct_sound_samples/87385E4.bin" .align 2 -DirectSoundWaveData_873A594:: @ 873A594 - .incbin "sound/direct_sound_samples/873A594.bin" +DirectSoundWaveData_unknown_polysynth:: + .incbin "sound/direct_sound_samples/unknown_polysynth.bin" .align 2 -DirectSoundWaveData_873D874:: @ 873D874 - .incbin "sound/direct_sound_samples/873D874.bin" +DirectSoundWaveData_sc88_harp:: + .incbin "sound/direct_sound_samples/sc88_harp.bin" .align 2 -DirectSoundWaveData_873E2A4:: @ 873E2A4 - .incbin "sound/direct_sound_samples/873E2A4.bin" +DirectSoundWaveData_sc88_xylophone:: + .incbin "sound/direct_sound_samples/sc88_xylophone.bin" .align 2 -DirectSoundWaveData_873ECD8:: @ 873ECD8 +DirectSoundWaveData_873ECD8:: .incbin "sound/direct_sound_samples/873ECD8.bin" .align 2 -DirectSoundWaveData_8740818:: @ 8740818 +DirectSoundWaveData_8740818:: .incbin "sound/direct_sound_samples/8740818.bin" .align 2 -DirectSoundWaveData_87410E0:: @ 87410E0 - .incbin "sound/direct_sound_samples/87410E0.bin" +DirectSoundWaveData_sc88_accordion:: + .incbin "sound/direct_sound_samples/sc88_accordion.bin" .align 2 -DirectSoundWaveData_87424B0:: @ 87424B0 +DirectSoundWaveData_87424B0:: .incbin "sound/direct_sound_samples/87424B0.bin" .align 2 -DirectSoundWaveData_87430C0:: @ 87430C0 +DirectSoundWaveData_87430C0:: .incbin "sound/direct_sound_samples/87430C0.bin" .align 2 -DirectSoundWaveData_8743C50:: @ 8743C50 +DirectSoundWaveData_8743C50:: .incbin "sound/direct_sound_samples/8743C50.bin" .align 2 -DirectSoundWaveData_87446EC:: @ 87446EC +DirectSoundWaveData_87446EC:: .incbin "sound/direct_sound_samples/87446EC.bin" .align 2 -DirectSoundWaveData_8745034:: @ 8745034 +DirectSoundWaveData_8745034:: .incbin "sound/direct_sound_samples/8745034.bin" .align 2 -DirectSoundWaveData_8745A7C:: @ 8745A7C +DirectSoundWaveData_8745A7C:: .incbin "sound/direct_sound_samples/8745A7C.bin" .align 2 -Cry_Bulbasaur:: @ 8746704 +Cry_Bulbasaur:: .incbin "sound/direct_sound_samples/cry_bulbasaur.bin" .align 2 -Cry_Ivysaur:: @ 8747790 +Cry_Ivysaur:: .incbin "sound/direct_sound_samples/cry_ivysaur.bin" .align 2 -Cry_Venusaur:: @ 8748820 +Cry_Venusaur:: .incbin "sound/direct_sound_samples/cry_venusaur.bin" .align 2 -Cry_Charmander:: @ 8749B78 +Cry_Charmander:: .incbin "sound/direct_sound_samples/cry_charmander.bin" .align 2 -Cry_Charmeleon:: @ 874A9E8 +Cry_Charmeleon:: .incbin "sound/direct_sound_samples/cry_charmeleon.bin" .align 2 -Cry_Charizard:: @ 874B868 +Cry_Charizard:: .incbin "sound/direct_sound_samples/cry_charizard.bin" .align 2 -Cry_Squirtle:: @ 874CBB0 +Cry_Squirtle:: .incbin "sound/direct_sound_samples/cry_squirtle.bin" .align 2 -Cry_Wartortle:: @ 874DA24 +Cry_Wartortle:: .incbin "sound/direct_sound_samples/cry_wartortle.bin" .align 2 -Cry_Blastoise:: @ 874EB64 +Cry_Blastoise:: .incbin "sound/direct_sound_samples/cry_blastoise.bin" .align 2 -Cry_Caterpie:: @ 874FEAC +Cry_Caterpie:: .incbin "sound/direct_sound_samples/cry_caterpie.bin" .align 2 -Cry_Metapod:: @ 8750704 +Cry_Metapod:: .incbin "sound/direct_sound_samples/cry_metapod.bin" .align 2 -Cry_Butterfree:: @ 8751E54 +Cry_Butterfree:: .incbin "sound/direct_sound_samples/cry_butterfree.bin" .align 2 -Cry_Weedle:: @ 875285C +Cry_Weedle:: .incbin "sound/direct_sound_samples/cry_weedle.bin" .align 2 -Cry_Kakuna:: @ 87538A0 +Cry_Kakuna:: .incbin "sound/direct_sound_samples/cry_kakuna.bin" .align 2 -Cry_Beedrill:: @ 8754ADC +Cry_Beedrill:: .incbin "sound/direct_sound_samples/cry_beedrill.bin" .align 2 -Cry_Pidgey:: @ 8755E38 +Cry_Pidgey:: .incbin "sound/direct_sound_samples/cry_pidgey.bin" .align 2 -Cry_Pidgeotto:: @ 8756220 +Cry_Pidgeotto:: .incbin "sound/direct_sound_samples/cry_pidgeotto.bin" .align 2 -Cry_Pidgeot:: @ 8757128 +Cry_Pidgeot:: .incbin "sound/direct_sound_samples/cry_pidgeot.bin" .align 2 -Cry_Rattata:: @ 875825C +Cry_Rattata:: .incbin "sound/direct_sound_samples/cry_rattata.bin" .align 2 -Cry_Raticate:: @ 8758A3C +Cry_Raticate:: .incbin "sound/direct_sound_samples/cry_raticate.bin" .align 2 -Cry_Spearow:: @ 87593C0 +Cry_Spearow:: .incbin "sound/direct_sound_samples/cry_spearow.bin" .align 2 -Cry_Fearow:: @ 875A564 +Cry_Fearow:: .incbin "sound/direct_sound_samples/cry_fearow.bin" .align 2 -Cry_Ekans:: @ 875B6A0 +Cry_Ekans:: .incbin "sound/direct_sound_samples/cry_ekans.bin" .align 2 -Cry_Arbok:: @ 875C9EC +Cry_Arbok:: .incbin "sound/direct_sound_samples/cry_arbok.bin" .align 2 -Cry_Pikachu:: @ 875DD44 +Cry_Pikachu:: .incbin "sound/direct_sound_samples/cry_pikachu.bin" .align 2 -Cry_Raichu:: @ 875EDEC +Cry_Raichu:: .incbin "sound/direct_sound_samples/cry_raichu.bin" .align 2 -Cry_Sandshrew:: @ 87605AC +Cry_Sandshrew:: .incbin "sound/direct_sound_samples/cry_sandshrew.bin" .align 2 -Cry_Sandslash:: @ 8760F00 +Cry_Sandslash:: .incbin "sound/direct_sound_samples/cry_sandslash.bin" .align 2 -Cry_NidoranF:: @ 8761C90 +Cry_NidoranF:: .incbin "sound/direct_sound_samples/cry_nidoran_f.bin" .align 2 -Cry_Nidorina:: @ 8762640 +Cry_Nidorina:: .incbin "sound/direct_sound_samples/cry_nidorina.bin" .align 2 -Cry_Nidoqueen:: @ 8763308 +Cry_Nidoqueen:: .incbin "sound/direct_sound_samples/cry_nidoqueen.bin" .align 2 -Cry_NidoranM:: @ 87643E8 +Cry_NidoranM:: .incbin "sound/direct_sound_samples/cry_nidoran_m.bin" .align 2 -Cry_Nidorino:: @ 8764E50 +Cry_Nidorino:: .incbin "sound/direct_sound_samples/cry_nidorino.bin" .align 2 -Cry_Nidoking:: @ 8765A64 +Cry_Nidoking:: .incbin "sound/direct_sound_samples/cry_nidoking.bin" .align 2 -Cry_Clefairy:: @ 87672D0 +Cry_Clefairy:: .incbin "sound/direct_sound_samples/cry_clefairy.bin" .align 2 -Cry_Clefable:: @ 8767B40 +Cry_Clefable:: .incbin "sound/direct_sound_samples/cry_clefable.bin" .align 2 -Cry_Vulpix:: @ 87685D0 +Cry_Vulpix:: .incbin "sound/direct_sound_samples/cry_vulpix.bin" .align 2 -Cry_Ninetales:: @ 8769DA0 +Cry_Ninetales:: .incbin "sound/direct_sound_samples/cry_ninetales.bin" .align 2 -Cry_Jigglypuff:: @ 876B60C +Cry_Jigglypuff:: .incbin "sound/direct_sound_samples/cry_jigglypuff.bin" .align 2 -Cry_Wigglytuff:: @ 876BB70 +Cry_Wigglytuff:: .incbin "sound/direct_sound_samples/cry_wigglytuff.bin" .align 2 -Cry_Zubat:: @ 876C238 +Cry_Zubat:: .incbin "sound/direct_sound_samples/cry_zubat.bin" .align 2 -Cry_Golbat:: @ 876D5A4 +Cry_Golbat:: .incbin "sound/direct_sound_samples/cry_golbat.bin" .align 2 -Cry_Oddish:: @ 876E908 +Cry_Oddish:: .incbin "sound/direct_sound_samples/cry_oddish.bin" .align 2 -Cry_Gloom:: @ 876F7A4 +Cry_Gloom:: .incbin "sound/direct_sound_samples/cry_gloom.bin" .align 2 -Cry_Vileplume:: @ 8770420 +Cry_Vileplume:: .incbin "sound/direct_sound_samples/cry_vileplume.bin" .align 2 -Cry_Paras:: @ 8771DBC +Cry_Paras:: .incbin "sound/direct_sound_samples/cry_paras.bin" .align 2 -Cry_Parasect:: @ 87739B0 +Cry_Parasect:: .incbin "sound/direct_sound_samples/cry_parasect.bin" .align 2 -Cry_Venonat:: @ 8775818 +Cry_Venonat:: .incbin "sound/direct_sound_samples/cry_venonat.bin" .align 2 -Cry_Venomoth:: @ 8776798 +Cry_Venomoth:: .incbin "sound/direct_sound_samples/cry_venomoth.bin" .align 2 -Cry_Diglett:: @ 877779C +Cry_Diglett:: .incbin "sound/direct_sound_samples/cry_diglett.bin" .align 2 -Cry_Dugtrio:: @ 8778B0C +Cry_Dugtrio:: .incbin "sound/direct_sound_samples/cry_dugtrio.bin" .align 2 -Cry_Meowth:: @ 8779E78 +Cry_Meowth:: .incbin "sound/direct_sound_samples/cry_meowth.bin" .align 2 -Cry_Persian:: @ 877A808 +Cry_Persian:: .incbin "sound/direct_sound_samples/cry_persian.bin" .align 2 -Cry_Psyduck:: @ 877BAE4 +Cry_Psyduck:: .incbin "sound/direct_sound_samples/cry_psyduck.bin" .align 2 -Cry_Golduck:: @ 877C80C +Cry_Golduck:: .incbin "sound/direct_sound_samples/cry_golduck.bin" .align 2 -Cry_Mankey:: @ 877D354 +Cry_Mankey:: .incbin "sound/direct_sound_samples/cry_mankey.bin" .align 2 -Cry_Primeape:: @ 877E3B4 +Cry_Primeape:: .incbin "sound/direct_sound_samples/cry_primeape.bin" .align 2 -Cry_Growlithe:: @ 877F3E4 +Cry_Growlithe:: .incbin "sound/direct_sound_samples/cry_growlithe.bin" .align 2 -Cry_Arcanine:: @ 8780148 +Cry_Arcanine:: .incbin "sound/direct_sound_samples/cry_arcanine.bin" .align 2 -Cry_Poliwag:: @ 8781284 +Cry_Poliwag:: .incbin "sound/direct_sound_samples/cry_poliwag.bin" .align 2 -Cry_Poliwhirl:: @ 8781DA0 +Cry_Poliwhirl:: .incbin "sound/direct_sound_samples/cry_poliwhirl.bin" .align 2 -Cry_Poliwrath:: @ 8782448 +Cry_Poliwrath:: .incbin "sound/direct_sound_samples/cry_poliwrath.bin" .align 2 -Cry_Abra:: @ 8782F6C +Cry_Abra:: .incbin "sound/direct_sound_samples/cry_abra.bin" .align 2 -Cry_Kadabra:: @ 87846D0 +Cry_Kadabra:: .incbin "sound/direct_sound_samples/cry_kadabra.bin" .align 2 -Cry_Alakazam:: @ 87861B8 +Cry_Alakazam:: .incbin "sound/direct_sound_samples/cry_alakazam.bin" .align 2 -Cry_Machop:: @ 8788154 +Cry_Machop:: .incbin "sound/direct_sound_samples/cry_machop.bin" .align 2 -Cry_Machoke:: @ 8788EB8 +Cry_Machoke:: .incbin "sound/direct_sound_samples/cry_machoke.bin" .align 2 -Cry_Machamp:: @ 8789C48 +Cry_Machamp:: .incbin "sound/direct_sound_samples/cry_machamp.bin" .align 2 -Cry_Bellsprout:: @ 878ACD0 +Cry_Bellsprout:: .incbin "sound/direct_sound_samples/cry_bellsprout.bin" .align 2 -Cry_Weepinbell:: @ 878B45C +Cry_Weepinbell:: .incbin "sound/direct_sound_samples/cry_weepinbell.bin" .align 2 -Cry_Victreebel:: @ 878C2FC +Cry_Victreebel:: .incbin "sound/direct_sound_samples/cry_victreebel.bin" .align 2 -Cry_Tentacool:: @ 878D648 +Cry_Tentacool:: .incbin "sound/direct_sound_samples/cry_tentacool.bin" .align 2 -Cry_Tentacruel:: @ 878E638 +Cry_Tentacruel:: .incbin "sound/direct_sound_samples/cry_tentacruel.bin" .align 2 -Cry_Geodude:: @ 878FD34 +Cry_Geodude:: .incbin "sound/direct_sound_samples/cry_geodude.bin" .align 2 -Cry_Graveler:: @ 87914E8 +Cry_Graveler:: .incbin "sound/direct_sound_samples/cry_graveler.bin" .align 2 -Cry_Golem:: @ 87930D0 +Cry_Golem:: .incbin "sound/direct_sound_samples/cry_golem.bin" .align 2 -Cry_Ponyta:: @ 8793EFC +Cry_Ponyta:: .incbin "sound/direct_sound_samples/cry_ponyta.bin" .align 2 -Cry_Rapidash:: @ 8794E0C +Cry_Rapidash:: .incbin "sound/direct_sound_samples/cry_rapidash.bin" .align 2 -Cry_Slowpoke:: @ 87960AC +Cry_Slowpoke:: .incbin "sound/direct_sound_samples/cry_slowpoke.bin" .align 2 -Cry_Slowbro:: @ 8796814 +Cry_Slowbro:: .incbin "sound/direct_sound_samples/cry_slowbro.bin" .align 2 -Cry_Magnemite:: @ 8797584 +Cry_Magnemite:: .incbin "sound/direct_sound_samples/cry_magnemite.bin" .align 2 -Cry_Magneton:: @ 87988C8 +Cry_Magneton:: .incbin "sound/direct_sound_samples/cry_magneton.bin" .align 2 -Cry_Farfetchd:: @ 879A0B0 +Cry_Farfetchd:: .incbin "sound/direct_sound_samples/cry_farfetchd.bin" .align 2 -Cry_Doduo:: @ 879A82C +Cry_Doduo:: .incbin "sound/direct_sound_samples/cry_doduo.bin" .align 2 -Cry_Dodrio:: @ 879BB70 +Cry_Dodrio:: .incbin "sound/direct_sound_samples/cry_dodrio.bin" .align 2 -Cry_Seel:: @ 879CEE8 +Cry_Seel:: .incbin "sound/direct_sound_samples/cry_seel.bin" .align 2 -Cry_Dewgong:: @ 879E0D8 +Cry_Dewgong:: .incbin "sound/direct_sound_samples/cry_dewgong.bin" .align 2 -Cry_Grimer:: @ 879F5FC +Cry_Grimer:: .incbin "sound/direct_sound_samples/cry_grimer.bin" .align 2 -Cry_Muk:: @ 87A0084 +Cry_Muk:: .incbin "sound/direct_sound_samples/cry_muk.bin" .align 2 -Cry_Shellder:: @ 87A0F44 +Cry_Shellder:: .incbin "sound/direct_sound_samples/cry_shellder.bin" .align 2 -Cry_Cloyster:: @ 87A1EB8 +Cry_Cloyster:: .incbin "sound/direct_sound_samples/cry_cloyster.bin" .align 2 -Cry_Gastly:: @ 87A337C +Cry_Gastly:: .incbin "sound/direct_sound_samples/cry_gastly.bin" .align 2 -Cry_Haunter:: @ 87A4ACC +Cry_Haunter:: .incbin "sound/direct_sound_samples/cry_haunter.bin" .align 2 -Cry_Gengar:: @ 87A624C +Cry_Gengar:: .incbin "sound/direct_sound_samples/cry_gengar.bin" .align 2 -Cry_Onix:: @ 87A710C +Cry_Onix:: .incbin "sound/direct_sound_samples/cry_onix.bin" .align 2 -Cry_Drowzee:: @ 87A89D0 +Cry_Drowzee:: .incbin "sound/direct_sound_samples/cry_drowzee.bin" .align 2 -Cry_Hypno:: @ 87AA6E8 +Cry_Hypno:: .incbin "sound/direct_sound_samples/cry_hypno.bin" .align 2 -Cry_Krabby:: @ 87AC3EC +Cry_Krabby:: .incbin "sound/direct_sound_samples/cry_krabby.bin" .align 2 -Cry_Kingler:: @ 87ADC38 +Cry_Kingler:: .incbin "sound/direct_sound_samples/cry_kingler.bin" .align 2 -Cry_Voltorb:: @ 87AF490 +Cry_Voltorb:: .incbin "sound/direct_sound_samples/cry_voltorb.bin" .align 2 -Cry_Electrode:: @ 87B0D54 +Cry_Electrode:: .incbin "sound/direct_sound_samples/cry_electrode.bin" .align 2 -Cry_Exeggcute:: @ 87B268C +Cry_Exeggcute:: .incbin "sound/direct_sound_samples/cry_exeggcute.bin" .align 2 -Cry_Exeggutor:: @ 87B396C +Cry_Exeggutor:: .incbin "sound/direct_sound_samples/cry_exeggutor.bin" .align 2 -Cry_Cubone:: @ 87B5950 +Cry_Cubone:: .incbin "sound/direct_sound_samples/cry_cubone.bin" .align 2 -Cry_Marowak:: @ 87B6870 +Cry_Marowak:: .incbin "sound/direct_sound_samples/cry_marowak.bin" .align 2 -Cry_Hitmonlee:: @ 87B76E0 +Cry_Hitmonlee:: .incbin "sound/direct_sound_samples/cry_hitmonlee.bin" .align 2 -Cry_Hitmonchan:: @ 87B898C +Cry_Hitmonchan:: .incbin "sound/direct_sound_samples/cry_hitmonchan.bin" .align 2 -Cry_Lickitung:: @ 87B9B64 +Cry_Lickitung:: .incbin "sound/direct_sound_samples/cry_lickitung.bin" .align 2 -Cry_Koffing:: @ 87BAA8C +Cry_Koffing:: .incbin "sound/direct_sound_samples/cry_koffing.bin" .align 2 -Cry_Weezing:: @ 87BBEE8 +Cry_Weezing:: .incbin "sound/direct_sound_samples/cry_weezing.bin" .align 2 -Cry_Rhyhorn:: @ 87BD494 +Cry_Rhyhorn:: .incbin "sound/direct_sound_samples/cry_rhyhorn.bin" .align 2 -Cry_Rhydon:: @ 87BE800 +Cry_Rhydon:: .incbin "sound/direct_sound_samples/cry_rhydon.bin" .align 2 -Cry_Chansey:: @ 87BFC6C +Cry_Chansey:: .incbin "sound/direct_sound_samples/cry_chansey.bin" .align 2 -Cry_Tangela:: @ 87C0B38 +Cry_Tangela:: .incbin "sound/direct_sound_samples/cry_tangela.bin" .align 2 -Cry_Kangaskhan:: @ 87C1A54 +Cry_Kangaskhan:: .incbin "sound/direct_sound_samples/cry_kangaskhan.bin" .align 2 -Cry_Horsea:: @ 87C2D08 +Cry_Horsea:: .incbin "sound/direct_sound_samples/cry_horsea.bin" .align 2 -Cry_Seadra:: @ 87C3684 +Cry_Seadra:: .incbin "sound/direct_sound_samples/cry_seadra.bin" .align 2 -Cry_Goldeen:: @ 87C3EF0 +Cry_Goldeen:: .incbin "sound/direct_sound_samples/cry_goldeen.bin" .align 2 -Cry_Seaking:: @ 87C48C8 +Cry_Seaking:: .incbin "sound/direct_sound_samples/cry_seaking.bin" .align 2 -Cry_Staryu:: @ 87C5C20 +Cry_Staryu:: .incbin "sound/direct_sound_samples/cry_staryu.bin" .align 2 -Cry_Starmie:: @ 87C7008 +Cry_Starmie:: .incbin "sound/direct_sound_samples/cry_starmie.bin" .align 2 -Cry_MrMime:: @ 87C84E4 +Cry_MrMime:: .incbin "sound/direct_sound_samples/cry_mr_mime.bin" .align 2 -Cry_Scyther:: @ 87C97D4 +Cry_Scyther:: .incbin "sound/direct_sound_samples/cry_scyther.bin" .align 2 -Cry_Jynx:: @ 87CA530 +Cry_Jynx:: .incbin "sound/direct_sound_samples/cry_jynx.bin" .align 2 -Cry_Electabuzz:: @ 87CD4A4 +Cry_Electabuzz:: .incbin "sound/direct_sound_samples/cry_electabuzz.bin" .align 2 -Cry_Magmar:: @ 87CF388 +Cry_Magmar:: .incbin "sound/direct_sound_samples/cry_magmar.bin" .align 2 -Cry_Pinsir:: @ 87D0304 +Cry_Pinsir:: .incbin "sound/direct_sound_samples/cry_pinsir.bin" .align 2 -Cry_Tauros:: @ 87D0F60 +Cry_Tauros:: .incbin "sound/direct_sound_samples/cry_tauros.bin" .align 2 -Cry_Magikarp:: @ 87D21B4 +Cry_Magikarp:: .incbin "sound/direct_sound_samples/cry_magikarp.bin" .align 2 -Cry_Gyarados:: @ 87D34BC +Cry_Gyarados:: .incbin "sound/direct_sound_samples/cry_gyarados.bin" .align 2 -Cry_Lapras:: @ 87D48F0 +Cry_Lapras:: .incbin "sound/direct_sound_samples/cry_lapras.bin" .align 2 -Cry_Ditto:: @ 87D57C4 +Cry_Ditto:: .incbin "sound/direct_sound_samples/cry_ditto.bin" .align 2 -Cry_Eevee:: @ 87D62E0 +Cry_Eevee:: .incbin "sound/direct_sound_samples/cry_eevee.bin" .align 2 -Cry_Vaporeon:: @ 87D7118 +Cry_Vaporeon:: .incbin "sound/direct_sound_samples/cry_vaporeon.bin" .align 2 -Cry_Jolteon:: @ 87D8730 +Cry_Jolteon:: .incbin "sound/direct_sound_samples/cry_jolteon.bin" .align 2 -Cry_Flareon:: @ 87D9704 +Cry_Flareon:: .incbin "sound/direct_sound_samples/cry_flareon.bin" .align 2 -Cry_Porygon:: @ 87DA688 +Cry_Porygon:: .incbin "sound/direct_sound_samples/cry_porygon.bin" .align 2 -Cry_Omanyte:: @ 87DBA94 +Cry_Omanyte:: .incbin "sound/direct_sound_samples/cry_omanyte.bin" .align 2 -Cry_Omastar:: @ 87DC7EC +Cry_Omastar:: .incbin "sound/direct_sound_samples/cry_omastar.bin" .align 2 -Cry_Kabuto:: @ 87DD540 +Cry_Kabuto:: .incbin "sound/direct_sound_samples/cry_kabuto.bin" .align 2 -Cry_Kabutops:: @ 87DE194 +Cry_Kabutops:: .incbin "sound/direct_sound_samples/cry_kabutops.bin" .align 2 -Cry_Aerodactyl:: @ 87DEF50 +Cry_Aerodactyl:: .incbin "sound/direct_sound_samples/cry_aerodactyl.bin" .align 2 -Cry_Snorlax:: @ 87E07AC +Cry_Snorlax:: .incbin "sound/direct_sound_samples/cry_snorlax.bin" .align 2 -Cry_Articuno:: @ 87E0CE8 +Cry_Articuno:: .incbin "sound/direct_sound_samples/cry_articuno.bin" .align 2 -Cry_Zapdos:: @ 87E2490 +Cry_Zapdos:: .incbin "sound/direct_sound_samples/cry_zapdos.bin" .align 2 -Cry_Moltres:: @ 87E3408 +Cry_Moltres:: .incbin "sound/direct_sound_samples/cry_moltres.bin" .align 2 -Cry_Dratini:: @ 87E4BB4 +Cry_Dratini:: .incbin "sound/direct_sound_samples/cry_dratini.bin" .align 2 -Cry_Dragonair:: @ 87E5750 +Cry_Dragonair:: .incbin "sound/direct_sound_samples/cry_dragonair.bin" .align 2 -Cry_Dragonite:: @ 87E67F8 +Cry_Dragonite:: .incbin "sound/direct_sound_samples/cry_dragonite.bin" .align 2 -Cry_Mewtwo:: @ 87E7B04 +Cry_Mewtwo:: .incbin "sound/direct_sound_samples/cry_mewtwo.bin" .align 2 -Cry_Mew:: @ 87E996C +Cry_Mew:: .incbin "sound/direct_sound_samples/cry_mew.bin" .align 2 -Cry_Chikorita:: @ 87EB7D4 +Cry_Chikorita:: .incbin "sound/direct_sound_samples/cry_chikorita.bin" .align 2 -Cry_Bayleef:: @ 87EBD14 +Cry_Bayleef:: .incbin "sound/direct_sound_samples/cry_bayleef.bin" .align 2 -Cry_Meganium:: @ 87EC5E0 +Cry_Meganium:: .incbin "sound/direct_sound_samples/cry_meganium.bin" .align 2 -Cry_Cyndaquil:: @ 87ED618 +Cry_Cyndaquil:: .incbin "sound/direct_sound_samples/cry_cyndaquil.bin" .align 2 -Cry_Quilava:: @ 87EDD1C +Cry_Quilava:: .incbin "sound/direct_sound_samples/cry_quilava.bin" .align 2 -Cry_Typhlosion:: @ 87EE904 +Cry_Typhlosion:: .incbin "sound/direct_sound_samples/cry_typhlosion.bin" .align 2 -Cry_Totodile:: @ 87F0F14 +Cry_Totodile:: .incbin "sound/direct_sound_samples/cry_totodile.bin" .align 2 -Cry_Croconaw:: @ 87F216C +Cry_Croconaw:: .incbin "sound/direct_sound_samples/cry_croconaw.bin" .align 2 -Cry_Feraligatr:: @ 87F35A8 +Cry_Feraligatr:: .incbin "sound/direct_sound_samples/cry_feraligatr.bin" .align 2 -Cry_Sentret:: @ 87F4F2C +Cry_Sentret:: .incbin "sound/direct_sound_samples/cry_sentret.bin" .align 2 -Cry_Furret:: @ 87F5354 +Cry_Furret:: .incbin "sound/direct_sound_samples/cry_furret.bin" .align 2 -Cry_Hoothoot:: @ 87F599C +Cry_Hoothoot:: .incbin "sound/direct_sound_samples/cry_hoothoot.bin" .align 2 -Cry_Noctowl:: @ 87F6480 +Cry_Noctowl:: .incbin "sound/direct_sound_samples/cry_noctowl.bin" .align 2 -Cry_Ledyba:: @ 87F79B0 +Cry_Ledyba:: .incbin "sound/direct_sound_samples/cry_ledyba.bin" .align 2 -Cry_Ledian:: @ 87F80A8 +Cry_Ledian:: .incbin "sound/direct_sound_samples/cry_ledian.bin" .align 2 -Cry_Spinarak:: @ 87F890C +Cry_Spinarak:: .incbin "sound/direct_sound_samples/cry_spinarak.bin" .align 2 -Cry_Ariados:: @ 87F9670 +Cry_Ariados:: .incbin "sound/direct_sound_samples/cry_ariados.bin" .align 2 -Cry_Crobat:: @ 87FA2C4 +Cry_Crobat:: .incbin "sound/direct_sound_samples/cry_crobat.bin" .align 2 -Cry_Chinchou:: @ 87FB9F4 +Cry_Chinchou:: .incbin "sound/direct_sound_samples/cry_chinchou.bin" .align 2 -Cry_Lanturn:: @ 87FC6A4 +Cry_Lanturn:: .incbin "sound/direct_sound_samples/cry_lanturn.bin" .align 2 -Cry_Pichu:: @ 87FD130 +Cry_Pichu:: .incbin "sound/direct_sound_samples/cry_pichu.bin" .align 2 -Cry_Cleffa:: @ 87FD884 +Cry_Cleffa:: .incbin "sound/direct_sound_samples/cry_cleffa.bin" .align 2 -Cry_Igglybuff:: @ 87FDE74 +Cry_Igglybuff:: .incbin "sound/direct_sound_samples/cry_igglybuff.bin" .align 2 -Cry_Togepi:: @ 87FE570 +Cry_Togepi:: .incbin "sound/direct_sound_samples/cry_togepi.bin" .align 2 -Cry_Togetic:: @ 87FF058 +Cry_Togetic:: .incbin "sound/direct_sound_samples/cry_togetic.bin" .align 2 -Cry_Natu:: @ 87FF758 +Cry_Natu:: .incbin "sound/direct_sound_samples/cry_natu.bin" .align 2 -Cry_Xatu:: @ 88001E8 +Cry_Xatu:: .incbin "sound/direct_sound_samples/cry_xatu.bin" .align 2 -Cry_Mareep:: @ 88010B4 +Cry_Mareep:: .incbin "sound/direct_sound_samples/cry_mareep.bin" .align 2 -Cry_Flaaffy:: @ 880180C +Cry_Flaaffy:: .incbin "sound/direct_sound_samples/cry_flaaffy.bin" .align 2 -Cry_Ampharos:: @ 88025C0 +Cry_Ampharos:: .incbin "sound/direct_sound_samples/cry_ampharos.bin" .align 2 -Cry_Bellossom:: @ 8803640 +Cry_Bellossom:: .incbin "sound/direct_sound_samples/cry_bellossom.bin" .align 2 -Cry_Marill:: @ 8804458 +Cry_Marill:: .incbin "sound/direct_sound_samples/cry_marill.bin" .align 2 -Cry_Azumarill:: @ 880516C +Cry_Azumarill:: .incbin "sound/direct_sound_samples/cry_azumarill.bin" .align 2 -Cry_Sudowoodo:: @ 8806258 +Cry_Sudowoodo:: .incbin "sound/direct_sound_samples/cry_sudowoodo.bin" .align 2 -Cry_Politoed:: @ 8807288 +Cry_Politoed:: .incbin "sound/direct_sound_samples/cry_politoed.bin" .align 2 -Cry_Hoppip:: @ 88084CC +Cry_Hoppip:: .incbin "sound/direct_sound_samples/cry_hoppip.bin" .align 2 -Cry_Skiploom:: @ 8808D38 +Cry_Skiploom:: .incbin "sound/direct_sound_samples/cry_skiploom.bin" .align 2 -Cry_Jumpluff:: @ 8809A40 +Cry_Jumpluff:: .incbin "sound/direct_sound_samples/cry_jumpluff.bin" .align 2 -Cry_Aipom:: @ 880AA7C +Cry_Aipom:: .incbin "sound/direct_sound_samples/cry_aipom.bin" .align 2 -Cry_Sunkern:: @ 880B89C +Cry_Sunkern:: .incbin "sound/direct_sound_samples/cry_sunkern.bin" .align 2 -Cry_Sunflora:: @ 880C0B0 +Cry_Sunflora:: .incbin "sound/direct_sound_samples/cry_sunflora.bin" .align 2 -Cry_Yanma:: @ 880D090 +Cry_Yanma:: .incbin "sound/direct_sound_samples/cry_yanma.bin" .align 2 -Cry_Wooper:: @ 880E198 +Cry_Wooper:: .incbin "sound/direct_sound_samples/cry_wooper.bin" .align 2 -Cry_Quagsire:: @ 880E8F8 +Cry_Quagsire:: .incbin "sound/direct_sound_samples/cry_quagsire.bin" .align 2 -Cry_Espeon:: @ 880F658 +Cry_Espeon:: .incbin "sound/direct_sound_samples/cry_espeon.bin" .align 2 -Cry_Umbreon:: @ 8810A0C +Cry_Umbreon:: .incbin "sound/direct_sound_samples/cry_umbreon.bin" .align 2 -Cry_Murkrow:: @ 881198C +Cry_Murkrow:: .incbin "sound/direct_sound_samples/cry_murkrow.bin" .align 2 -Cry_Slowking:: @ 8812A50 +Cry_Slowking:: .incbin "sound/direct_sound_samples/cry_slowking.bin" .align 2 -Cry_Misdreavus:: @ 8814234 +Cry_Misdreavus:: .incbin "sound/direct_sound_samples/cry_misdreavus.bin" .align 2 -Cry_Unown:: @ 8814DD4 +Cry_Unown:: .incbin "sound/direct_sound_samples/cry_unown.bin" .align 2 -Cry_Wobbuffet:: @ 8815AFC +Cry_Wobbuffet:: .incbin "sound/direct_sound_samples/cry_wobbuffet.bin" .align 2 -Cry_Girafarig:: @ 8816F98 +Cry_Girafarig:: .incbin "sound/direct_sound_samples/cry_girafarig.bin" .align 2 -Cry_Pineco:: @ 8817E4C +Cry_Pineco:: .incbin "sound/direct_sound_samples/cry_pineco.bin" .align 2 -Cry_Forretress:: @ 8818BAC +Cry_Forretress:: .incbin "sound/direct_sound_samples/cry_forretress.bin" .align 2 -Cry_Dunsparce:: @ 8819FB4 +Cry_Dunsparce:: .incbin "sound/direct_sound_samples/cry_dunsparce.bin" .align 2 -Cry_Gligar:: @ 881AF94 +Cry_Gligar:: .incbin "sound/direct_sound_samples/cry_gligar.bin" .align 2 -Cry_Steelix:: @ 881BBB4 +Cry_Steelix:: .incbin "sound/direct_sound_samples/cry_steelix.bin" .align 2 -Cry_Snubbull:: @ 881E1DC +Cry_Snubbull:: .incbin "sound/direct_sound_samples/cry_snubbull.bin" .align 2 -Cry_Granbull:: @ 881F050 +Cry_Granbull:: .incbin "sound/direct_sound_samples/cry_granbull.bin" .align 2 -Cry_Qwilfish:: @ 88207F4 +Cry_Qwilfish:: .incbin "sound/direct_sound_samples/cry_qwilfish.bin" .align 2 -Cry_Scizor:: @ 8821390 +Cry_Scizor:: .incbin "sound/direct_sound_samples/cry_scizor.bin" .align 2 -Cry_Shuckle:: @ 8822A8C +Cry_Shuckle:: .incbin "sound/direct_sound_samples/cry_shuckle.bin" .align 2 -Cry_Heracross:: @ 88234C0 +Cry_Heracross:: .incbin "sound/direct_sound_samples/cry_heracross.bin" .align 2 -Cry_Sneasel:: @ 8824714 +Cry_Sneasel:: .incbin "sound/direct_sound_samples/cry_sneasel.bin" .align 2 -Cry_Teddiursa:: @ 8825038 +Cry_Teddiursa:: .incbin "sound/direct_sound_samples/cry_teddiursa.bin" .align 2 -Cry_Ursaring:: @ 88260C4 +Cry_Ursaring:: .incbin "sound/direct_sound_samples/cry_ursaring.bin" .align 2 -Cry_Slugma:: @ 8827E9C +Cry_Slugma:: .incbin "sound/direct_sound_samples/cry_slugma.bin" .align 2 -Cry_Magcargo:: @ 8828FB4 +Cry_Magcargo:: .incbin "sound/direct_sound_samples/cry_magcargo.bin" .align 2 -Cry_Swinub:: @ 882A4BC +Cry_Swinub:: .incbin "sound/direct_sound_samples/cry_swinub.bin" .align 2 -Cry_Piloswine:: @ 882B164 +Cry_Piloswine:: .incbin "sound/direct_sound_samples/cry_piloswine.bin" .align 2 -Cry_Corsola:: @ 882BE58 +Cry_Corsola:: .incbin "sound/direct_sound_samples/cry_corsola.bin" .align 2 -Cry_Remoraid:: @ 882CB38 +Cry_Remoraid:: .incbin "sound/direct_sound_samples/cry_remoraid.bin" .align 2 -Cry_Octillery:: @ 882D5C8 +Cry_Octillery:: .incbin "sound/direct_sound_samples/cry_octillery.bin" .align 2 -Cry_Delibird:: @ 882F00C +Cry_Delibird:: .incbin "sound/direct_sound_samples/cry_delibird.bin" .align 2 -Cry_Mantine:: @ 8830040 +Cry_Mantine:: .incbin "sound/direct_sound_samples/cry_mantine.bin" .align 2 -Cry_Skarmory:: @ 8831008 +Cry_Skarmory:: .incbin "sound/direct_sound_samples/cry_skarmory.bin" .align 2 -Cry_Houndour:: @ 8832810 +Cry_Houndour:: .incbin "sound/direct_sound_samples/cry_houndour.bin" .align 2 -Cry_Houndoom:: @ 88334B8 +Cry_Houndoom:: .incbin "sound/direct_sound_samples/cry_houndoom.bin" .align 2 -Cry_Kingdra:: @ 8834868 +Cry_Kingdra:: .incbin "sound/direct_sound_samples/cry_kingdra.bin" .align 2 -Cry_Phanpy:: @ 8835640 +Cry_Phanpy:: .incbin "sound/direct_sound_samples/cry_phanpy.bin" .align 2 -Cry_Donphan:: @ 8836190 +Cry_Donphan:: .incbin "sound/direct_sound_samples/cry_donphan.bin" .align 2 -Cry_Porygon2:: @ 88372B4 +Cry_Porygon2:: .incbin "sound/direct_sound_samples/cry_porygon2.bin" .align 2 -Cry_Stantler:: @ 883826C +Cry_Stantler:: .incbin "sound/direct_sound_samples/cry_stantler.bin" .align 2 -Cry_Smeargle:: @ 88398E8 +Cry_Smeargle:: .incbin "sound/direct_sound_samples/cry_smeargle.bin" .align 2 -Cry_Tyrogue:: @ 883A31C +Cry_Tyrogue:: .incbin "sound/direct_sound_samples/cry_tyrogue.bin" .align 2 -Cry_Hitmontop:: @ 883B344 +Cry_Hitmontop:: .incbin "sound/direct_sound_samples/cry_hitmontop.bin" .align 2 -Cry_Smoochum:: @ 883C124 +Cry_Smoochum:: .incbin "sound/direct_sound_samples/cry_smoochum.bin" .align 2 -Cry_Elekid:: @ 883CCD8 +Cry_Elekid:: .incbin "sound/direct_sound_samples/cry_elekid.bin" .align 2 -Cry_Magby:: @ 883D764 +Cry_Magby:: .incbin "sound/direct_sound_samples/cry_magby.bin" .align 2 -Cry_Miltank:: @ 883E5D4 +Cry_Miltank:: .incbin "sound/direct_sound_samples/cry_miltank.bin" .align 2 -Cry_Blissey:: @ 883F4B0 +Cry_Blissey:: .incbin "sound/direct_sound_samples/cry_blissey.bin" .align 2 -Cry_Raikou:: @ 8840544 +Cry_Raikou:: .incbin "sound/direct_sound_samples/cry_raikou.bin" .align 2 -Cry_Entei:: @ 88416B4 +Cry_Entei:: .incbin "sound/direct_sound_samples/cry_entei.bin" .align 2 -Cry_Suicune:: @ 8842B28 +Cry_Suicune:: .incbin "sound/direct_sound_samples/cry_suicune.bin" .align 2 -Cry_Larvitar:: @ 8843D70 +Cry_Larvitar:: .incbin "sound/direct_sound_samples/cry_larvitar.bin" .align 2 -Cry_Pupitar:: @ 8844A20 +Cry_Pupitar:: .incbin "sound/direct_sound_samples/cry_pupitar.bin" .align 2 -Cry_Tyranitar:: @ 8845290 +Cry_Tyranitar:: .incbin "sound/direct_sound_samples/cry_tyranitar.bin" .align 2 -Cry_Lugia:: @ 88469F0 +Cry_Lugia:: .incbin "sound/direct_sound_samples/cry_lugia.bin" .align 2 -Cry_HoOh:: @ 8848FE8 +Cry_HoOh:: .incbin "sound/direct_sound_samples/cry_ho_oh.bin" .align 2 -Cry_Celebi:: @ 884A67C +Cry_Celebi:: .incbin "sound/direct_sound_samples/cry_celebi.bin" .align 2 -Cry_Kecleon:: @ 884B4F4 +Cry_Kecleon:: .incbin "sound/direct_sound_samples/cry_kecleon.bin" .align 2 -Cry_Roselia:: @ 884BD54 +Cry_Roselia:: .incbin "sound/direct_sound_samples/cry_roselia.bin" .align 2 -Cry_Torkoal:: @ 884C814 +Cry_Torkoal:: .incbin "sound/direct_sound_samples/cry_torkoal.bin" .align 2 -Cry_Electrike:: @ 884D160 +Cry_Electrike:: .incbin "sound/direct_sound_samples/cry_electrike.bin" .align 2 -Cry_Manectric:: @ 884DDBC +Cry_Manectric:: .incbin "sound/direct_sound_samples/cry_manectric.bin" .align 2 -Cry_Duskull:: @ 884F2C4 +Cry_Duskull:: .incbin "sound/direct_sound_samples/cry_duskull.bin" .align 2 -Cry_Latias:: @ 884FD5C +Cry_Latias:: .incbin "sound/direct_sound_samples/cry_latias.bin" .align 2 -Cry_Wynaut:: @ 885098C +Cry_Wynaut:: .incbin "sound/direct_sound_samples/cry_wynaut.bin" .align 2 -Cry_Seviper:: @ 885176C +Cry_Seviper:: .incbin "sound/direct_sound_samples/cry_seviper.bin" .align 2 -Cry_Sharpedo:: @ 885230C +Cry_Sharpedo:: .incbin "sound/direct_sound_samples/cry_sharpedo.bin" .align 2 -Cry_Zangoose:: @ 8853A18 +Cry_Zangoose:: .incbin "sound/direct_sound_samples/cry_zangoose.bin" .align 2 -Cry_Azurill:: @ 88543A0 +Cry_Azurill:: .incbin "sound/direct_sound_samples/cry_azurill.bin" .align 2 -Cry_Swablu:: @ 8854E08 +Cry_Swablu:: .incbin "sound/direct_sound_samples/cry_swablu.bin" .align 2 -Cry_Altaria:: @ 88553A0 +Cry_Altaria:: .incbin "sound/direct_sound_samples/cry_altaria.bin" .align 2 -Cry_Unused265:: @ 8855EBC +Cry_Unused265:: .incbin "sound/direct_sound_samples/cry_unused_265.bin" .align 2 -Cry_Taillow:: @ 8856810 +Cry_Taillow:: .incbin "sound/direct_sound_samples/cry_taillow.bin" .align 2 -Cry_Swellow:: @ 8856E10 +Cry_Swellow:: .incbin "sound/direct_sound_samples/cry_swellow.bin" .align 2 -Cry_Unused268:: @ 8857714 +Cry_Unused268:: .incbin "sound/direct_sound_samples/cry_unused_268.bin" .align 2 -Cry_Spinda:: @ 88588C4 +Cry_Spinda:: .incbin "sound/direct_sound_samples/cry_spinda.bin" .align 2 -Cry_Torchic:: @ 8859530 +Cry_Torchic:: .incbin "sound/direct_sound_samples/cry_torchic.bin" .align 2 -Cry_Combusken:: @ 8859ED8 +Cry_Combusken:: .incbin "sound/direct_sound_samples/cry_combusken.bin" .align 2 -Cry_Blaziken:: @ 885BBAC +Cry_Blaziken:: .incbin "sound/direct_sound_samples/cry_blaziken.bin" .align 2 -Cry_Treecko:: @ 885DB2C +Cry_Treecko:: .incbin "sound/direct_sound_samples/cry_treecko.bin" .align 2 -Cry_Grovyle:: @ 885E6D4 +Cry_Grovyle:: .incbin "sound/direct_sound_samples/cry_grovyle.bin" .align 2 -Cry_Sceptile:: @ 885FB48 +Cry_Sceptile:: .incbin "sound/direct_sound_samples/cry_sceptile.bin" .align 2 -Cry_Mudkip:: @ 8861564 +Cry_Mudkip:: .incbin "sound/direct_sound_samples/cry_mudkip.bin" .align 2 -Cry_Marshtomp:: @ 8861CE8 +Cry_Marshtomp:: .incbin "sound/direct_sound_samples/cry_marshtomp.bin" .align 2 -Cry_Swampert:: @ 8862DEC +Cry_Swampert:: .incbin "sound/direct_sound_samples/cry_swampert.bin" .align 2 -Cry_Pelipper:: @ 886446C +Cry_Pelipper:: .incbin "sound/direct_sound_samples/cry_pelipper.bin" .align 2 -Cry_Wingull:: @ 8865034 +Cry_Wingull:: .incbin "sound/direct_sound_samples/cry_wingull.bin" .align 2 -Cry_Banette:: @ 8865C74 +Cry_Banette:: .incbin "sound/direct_sound_samples/cry_banette.bin" .align 2 -Cry_Shuppet:: @ 886691C +Cry_Shuppet:: .incbin "sound/direct_sound_samples/cry_shuppet.bin" .align 2 -Cry_Lotad:: @ 886715C +Cry_Lotad:: .incbin "sound/direct_sound_samples/cry_lotad.bin" .align 2 -Cry_Lombre:: @ 88675C4 +Cry_Lombre:: .incbin "sound/direct_sound_samples/cry_lombre.bin" .align 2 -Cry_Ludicolo:: @ 8868458 +Cry_Ludicolo:: .incbin "sound/direct_sound_samples/cry_ludicolo.bin" .align 2 -Cry_Seedot:: @ 8869528 +Cry_Seedot:: .incbin "sound/direct_sound_samples/cry_seedot.bin" .align 2 -Cry_Nuzleaf:: @ 8869D54 +Cry_Nuzleaf:: .incbin "sound/direct_sound_samples/cry_nuzleaf.bin" .align 2 -Cry_Shiftry:: @ 886A8BC +Cry_Shiftry:: .incbin "sound/direct_sound_samples/cry_shiftry.bin" .align 2 -Cry_Carvanha:: @ 886BC80 +Cry_Carvanha:: .incbin "sound/direct_sound_samples/cry_carvanha.bin" .align 2 -Cry_Wurmple:: @ 886C694 +Cry_Wurmple:: .incbin "sound/direct_sound_samples/cry_wurmple.bin" .align 2 -Cry_Silcoon:: @ 886CF60 +Cry_Silcoon:: .incbin "sound/direct_sound_samples/cry_silcoon.bin" .align 2 -Cry_Beautifly:: @ 886DF8C +Cry_Beautifly:: .incbin "sound/direct_sound_samples/cry_beautifly.bin" .align 2 -Cry_Cascoon:: @ 886E7C4 +Cry_Cascoon:: .incbin "sound/direct_sound_samples/cry_cascoon.bin" .align 2 -Cry_Dustox:: @ 886F808 +Cry_Dustox:: .incbin "sound/direct_sound_samples/cry_dustox.bin" .align 2 -Cry_Ralts:: @ 88704B4 +Cry_Ralts:: .incbin "sound/direct_sound_samples/cry_ralts.bin" .align 2 -Cry_Kirlia:: @ 8870ED0 +Cry_Kirlia:: .incbin "sound/direct_sound_samples/cry_kirlia.bin" .align 2 -Cry_Gardevoir:: @ 8871B00 +Cry_Gardevoir:: .incbin "sound/direct_sound_samples/cry_gardevoir.bin" .align 2 -Cry_Slakoth:: @ 8873364 +Cry_Slakoth:: .incbin "sound/direct_sound_samples/cry_slakoth.bin" .align 2 -Cry_Vigoroth:: @ 8873BE8 +Cry_Vigoroth:: .incbin "sound/direct_sound_samples/cry_vigoroth.bin" .align 2 -Cry_Slaking:: @ 8874A40 +Cry_Slaking:: .incbin "sound/direct_sound_samples/cry_slaking.bin" .align 2 -Cry_Nincada:: @ 887542C +Cry_Nincada:: .incbin "sound/direct_sound_samples/cry_nincada.bin" .align 2 -Cry_Ninjask:: @ 8875A9C +Cry_Ninjask:: .incbin "sound/direct_sound_samples/cry_ninjask.bin" .align 2 -Cry_Shedinja:: @ 88766C4 +Cry_Shedinja:: .incbin "sound/direct_sound_samples/cry_shedinja.bin" .align 2 -Cry_Makuhita:: @ 8876E7C +Cry_Makuhita:: .incbin "sound/direct_sound_samples/cry_makuhita.bin" .align 2 -Cry_Hariyama:: @ 88775D8 +Cry_Hariyama:: .incbin "sound/direct_sound_samples/cry_hariyama.bin" .align 2 -Cry_Nosepass:: @ 8878690 +Cry_Nosepass:: .incbin "sound/direct_sound_samples/cry_nosepass.bin" .align 2 -Cry_Glalie:: @ 88793F4 +Cry_Glalie:: .incbin "sound/direct_sound_samples/cry_glalie.bin" .align 2 -Cry_Plusle:: @ 887A8D8 +Cry_Plusle:: .incbin "sound/direct_sound_samples/cry_plusle.bin" .align 2 -Cry_Minun:: @ 887B1D4 +Cry_Minun:: .incbin "sound/direct_sound_samples/cry_minun.bin" .align 2 -Cry_Surskit:: @ 887C1DC +Cry_Surskit:: .incbin "sound/direct_sound_samples/cry_surskit.bin" .align 2 -Cry_Masquerain:: @ 887CC5C +Cry_Masquerain:: .incbin "sound/direct_sound_samples/cry_masquerain.bin" .align 2 -Cry_Skitty:: @ 887E010 +Cry_Skitty:: .incbin "sound/direct_sound_samples/cry_skitty.bin" .align 2 -Cry_Delcatty:: @ 887E724 +Cry_Delcatty:: .incbin "sound/direct_sound_samples/cry_delcatty.bin" .align 2 -Cry_Gulpin:: @ 887FC3C +Cry_Gulpin:: .incbin "sound/direct_sound_samples/cry_gulpin.bin" .align 2 -Cry_Swalot:: @ 8880440 +Cry_Swalot:: .incbin "sound/direct_sound_samples/cry_swalot.bin" .align 2 -Cry_Numel:: @ 88815A0 +Cry_Numel:: .incbin "sound/direct_sound_samples/cry_numel.bin" .align 2 -Cry_Camerupt:: @ 8881EEC +Cry_Camerupt:: .incbin "sound/direct_sound_samples/cry_camerupt.bin" .align 2 -Cry_Barboach:: @ 888360C +Cry_Barboach:: .incbin "sound/direct_sound_samples/cry_barboach.bin" .align 2 -Cry_Whiscash:: @ 8883F48 +Cry_Whiscash:: .incbin "sound/direct_sound_samples/cry_whiscash.bin" .align 2 -Cry_Corphish:: @ 8885044 +Cry_Corphish:: .incbin "sound/direct_sound_samples/cry_corphish.bin" .align 2 -Cry_Crawdaunt:: @ 8885C48 +Cry_Crawdaunt:: .incbin "sound/direct_sound_samples/cry_crawdaunt.bin" .align 2 -Cry_Spoink:: @ 8887500 +Cry_Spoink:: .incbin "sound/direct_sound_samples/cry_spoink.bin" .align 2 -Cry_Grumpig:: @ 8887C40 +Cry_Grumpig:: .incbin "sound/direct_sound_samples/cry_grumpig.bin" .align 2 -Cry_Trapinch:: @ 88888E0 +Cry_Trapinch:: .incbin "sound/direct_sound_samples/cry_trapinch.bin" .align 2 -Cry_Vibrava:: @ 8889304 +Cry_Vibrava:: .incbin "sound/direct_sound_samples/cry_vibrava.bin" .align 2 -Cry_Flygon:: @ 888A108 +Cry_Flygon:: .incbin "sound/direct_sound_samples/cry_flygon.bin" .align 2 -Cry_Cacnea:: @ 888BB10 +Cry_Cacnea:: .incbin "sound/direct_sound_samples/cry_cacnea.bin" .align 2 -Cry_Cacturne:: @ 888C400 +Cry_Cacturne:: .incbin "sound/direct_sound_samples/cry_cacturne.bin" .align 2 -Cry_Baltoy:: @ 888DAB0 +Cry_Baltoy:: .incbin "sound/direct_sound_samples/cry_baltoy.bin" .align 2 -Cry_Claydol:: @ 888E734 +Cry_Claydol:: .incbin "sound/direct_sound_samples/cry_claydol.bin" .align 2 -Cry_Lunatone:: @ 888FA94 +Cry_Lunatone:: .incbin "sound/direct_sound_samples/cry_lunatone.bin" .align 2 -Cry_Solrock:: @ 8891290 +Cry_Solrock:: .incbin "sound/direct_sound_samples/cry_solrock.bin" .align 2 -Cry_Feebas:: @ 88922BC +Cry_Feebas:: .incbin "sound/direct_sound_samples/cry_feebas.bin" .align 2 -Cry_Milotic:: @ 8892A90 +Cry_Milotic:: .incbin "sound/direct_sound_samples/cry_milotic.bin" .align 2 -Cry_Absol:: @ 88951D4 +Cry_Absol:: .incbin "sound/direct_sound_samples/cry_absol.bin" .align 2 -Cry_Meditite:: @ 8895C50 +Cry_Meditite:: .incbin "sound/direct_sound_samples/cry_meditite.bin" .align 2 -Cry_Medicham:: @ 8896470 +Cry_Medicham:: .incbin "sound/direct_sound_samples/cry_medicham.bin" .align 2 -Cry_Spheal:: @ 88974F4 +Cry_Spheal:: .incbin "sound/direct_sound_samples/cry_spheal.bin" .align 2 -Cry_Sealeo:: @ 8897AA8 +Cry_Sealeo:: .incbin "sound/direct_sound_samples/cry_sealeo.bin" .align 2 -Cry_Walrein:: @ 8898680 +Cry_Walrein:: .incbin "sound/direct_sound_samples/cry_walrein.bin" .align 2 -Cry_Clamperl:: @ 889AACC +Cry_Clamperl:: .incbin "sound/direct_sound_samples/cry_clamperl.bin" .align 2 -Cry_Huntail:: @ 889BD1C +Cry_Huntail:: .incbin "sound/direct_sound_samples/cry_huntail.bin" .align 2 -Cry_Gorebyss:: @ 889CD04 +Cry_Gorebyss:: .incbin "sound/direct_sound_samples/cry_gorebyss.bin" .align 2 -Cry_Lileep:: @ 889E370 +Cry_Lileep:: .incbin "sound/direct_sound_samples/cry_lileep.bin" .align 2 -Cry_Cradily:: @ 889ED18 +Cry_Cradily:: .incbin "sound/direct_sound_samples/cry_cradily.bin" .align 2 -Cry_Anorith:: @ 88A0A48 +Cry_Anorith:: .incbin "sound/direct_sound_samples/cry_anorith.bin" .align 2 -Cry_Armaldo:: @ 88A1600 +Cry_Armaldo:: .incbin "sound/direct_sound_samples/cry_armaldo.bin" .align 2 -Cry_Beldum:: @ 88A2CD4 +Cry_Beldum:: .incbin "sound/direct_sound_samples/cry_beldum.bin" .align 2 -Cry_Metang:: @ 88A3674 +Cry_Metang:: .incbin "sound/direct_sound_samples/cry_metang.bin" .align 2 -Cry_Metagross:: @ 88A4948 +Cry_Metagross:: .incbin "sound/direct_sound_samples/cry_metagross.bin" .align 2 -Cry_Bagon:: @ 88A70C0 +Cry_Bagon:: .incbin "sound/direct_sound_samples/cry_bagon.bin" .align 2 -Cry_Shelgon:: @ 88A7894 +Cry_Shelgon:: .incbin "sound/direct_sound_samples/cry_shelgon.bin" .align 2 -Cry_Regirock:: @ 88A8C9C +Cry_Regirock:: .incbin "sound/direct_sound_samples/cry_regirock.bin" .align 2 -Cry_Regice:: @ 88AAC78 +Cry_Regice:: .incbin "sound/direct_sound_samples/cry_regice.bin" .align 2 -Cry_Registeel:: @ 88ACC78 +Cry_Registeel:: .incbin "sound/direct_sound_samples/cry_registeel.bin" .align 2 -Cry_Castform:: @ 88AE37C +Cry_Castform:: .incbin "sound/direct_sound_samples/cry_castform.bin" .align 2 -Cry_Volbeat:: @ 88AF014 +Cry_Volbeat:: .incbin "sound/direct_sound_samples/cry_volbeat.bin" .align 2 -Cry_Illumise:: @ 88AFB9C +Cry_Illumise:: .incbin "sound/direct_sound_samples/cry_illumise.bin" .align 2 -Cry_Poochyena:: @ 88B0CB4 +Cry_Poochyena:: .incbin "sound/direct_sound_samples/cry_poochyena.bin" .align 2 -Cry_Mightyena:: @ 88B15FC +Cry_Mightyena:: .incbin "sound/direct_sound_samples/cry_mightyena.bin" .align 2 -Cry_Dusclops:: @ 88B2988 +Cry_Dusclops:: .incbin "sound/direct_sound_samples/cry_dusclops.bin" .align 2 -Cry_Sableye:: @ 88B3740 +Cry_Sableye:: .incbin "sound/direct_sound_samples/cry_sableye.bin" .align 2 -Cry_Mawile:: @ 88B42E4 +Cry_Mawile:: .incbin "sound/direct_sound_samples/cry_mawile.bin" .align 2 -Cry_Aron:: @ 88B4E64 +Cry_Aron:: .incbin "sound/direct_sound_samples/cry_aron.bin" .align 2 -Cry_Lairon:: @ 88B5790 +Cry_Lairon:: .incbin "sound/direct_sound_samples/cry_lairon.bin" .align 2 -Cry_Aggron:: @ 88B6C68 +Cry_Aggron:: .incbin "sound/direct_sound_samples/cry_aggron.bin" .align 2 -Cry_Relicanth:: @ 88B860C +Cry_Relicanth:: .incbin "sound/direct_sound_samples/cry_relicanth.bin" .align 2 -Cry_Luvdisc:: @ 88B9A3C +Cry_Luvdisc:: .incbin "sound/direct_sound_samples/cry_luvdisc.bin" .align 2 -Cry_Groudon:: @ 88B9F18 +Cry_Groudon:: .incbin "sound/direct_sound_samples/cry_groudon.bin" .align 2 -Cry_Kyogre:: @ 88BC424 +Cry_Kyogre:: .incbin "sound/direct_sound_samples/cry_kyogre.bin" .align 2 -Cry_Rayquaza:: @ 88BE7DC +Cry_Rayquaza:: .incbin "sound/direct_sound_samples/cry_rayquaza.bin" .align 2 -Cry_Salamence:: @ 88C0508 +Cry_Salamence:: .incbin "sound/direct_sound_samples/cry_salamence.bin" .align 2 -Cry_Breloom:: @ 88C1E24 +Cry_Breloom:: .incbin "sound/direct_sound_samples/cry_breloom.bin" .align 2 -Cry_Shroomish:: @ 88C2AE4 +Cry_Shroomish:: .incbin "sound/direct_sound_samples/cry_shroomish.bin" .align 2 -Cry_Linoone:: @ 88C33BC +Cry_Linoone:: .incbin "sound/direct_sound_samples/cry_linoone.bin" .align 2 -Cry_Tropius:: @ 88C5258 +Cry_Tropius:: .incbin "sound/direct_sound_samples/cry_tropius.bin" .align 2 -Cry_Wailmer:: @ 88C731C +Cry_Wailmer:: .incbin "sound/direct_sound_samples/cry_wailmer.bin" .align 2 -Cry_Zigzagoon:: @ 88C8F7C +Cry_Zigzagoon:: .incbin "sound/direct_sound_samples/cry_zigzagoon.bin" .align 2 -Cry_Exploud:: @ 88C9B0C +Cry_Exploud:: .incbin "sound/direct_sound_samples/cry_exploud.bin" .align 2 -Cry_Loudred:: @ 88CB754 +Cry_Loudred:: .incbin "sound/direct_sound_samples/cry_loudred.bin" .align 2 -Cry_Wailord:: @ 88CC47C +Cry_Wailord:: .incbin "sound/direct_sound_samples/cry_wailord.bin" .align 2 -Cry_Whismur:: @ 88CEE8C +Cry_Whismur:: .incbin "sound/direct_sound_samples/cry_whismur.bin" .align 2 -Cry_Snorunt:: @ 88CF6B0 +Cry_Snorunt:: .incbin "sound/direct_sound_samples/cry_snorunt.bin" .align 2 -Cry_Latios:: @ 88D07B8 +Cry_Latios:: .incbin "sound/direct_sound_samples/cry_latios.bin" .align 2 -Cry_Jirachi:: @ 88D1DB0 +Cry_Jirachi:: .incbin "sound/direct_sound_samples/cry_jirachi.bin" .align 2 -Cry_Deoxys:: @ 88D2B34 +Cry_Deoxys:: .incbin "sound/direct_sound_samples/cry_deoxys.bin" .align 2 -Cry_Chimecho:: @ 88D4008 +Cry_Chimecho:: .incbin "sound/direct_sound_samples/cry_chimecho.bin" .align 2 -DirectSoundWaveData_88D4A18:: @ 88D4A18 - .incbin "sound/direct_sound_samples/88D4A18.bin" +DirectSoundWaveData_register_noise:: + .incbin "sound/direct_sound_samples/register_noise.bin" .align 2 -DirectSoundWaveData_88D6978:: @ 88D6978 +DirectSoundWaveData_88D6978:: .incbin "sound/direct_sound_samples/88D6978.bin" .align 2 -DirectSoundWaveData_88D8418:: @ 88D8418 - .incbin "sound/direct_sound_samples/88D8418.bin" +DirectSoundWaveData_sc88_nylon_str_guitar:: + .incbin "sound/direct_sound_samples/sc88_nylon_str_guitar.bin" .align 2 -DirectSoundWaveData_88DA388:: @ 88DA388 - .incbin "sound/direct_sound_samples/88DA388.bin" +DirectSoundWaveData_sd90_classical_guitar_harmonics:: + .incbin "sound/direct_sound_samples/sd90_classical_guitar_harmonics.bin" .align 2 -DirectSoundWaveData_88DBBC0:: @ 88DBBC0 +DirectSoundWaveData_88DBBC0:: .incbin "sound/direct_sound_samples/88DBBC0.bin" .align 2 -DirectSoundWaveData_88DC220:: @ 88DC220 +DirectSoundWaveData_88DC220:: .incbin "sound/direct_sound_samples/88DC220.bin" .align 2 -DirectSoundWaveData_88DC704:: @ 88DC704 +DirectSoundWaveData_88DC704:: .incbin "sound/direct_sound_samples/88DC704.bin" .align 2 -DirectSoundWaveData_88DD054:: @ 88DD054 +DirectSoundWaveData_88DD054:: .incbin "sound/direct_sound_samples/88DD054.bin" .align 2 -DirectSoundWaveData_88DDAC4:: @ 88DDAC4 +DirectSoundWaveData_88DDAC4:: .incbin "sound/direct_sound_samples/88DDAC4.bin" .align 2 -DirectSoundWaveData_88DDDE4:: @ 88DDDE4 +DirectSoundWaveData_88DDDE4:: .incbin "sound/direct_sound_samples/88DDDE4.bin" .align 2 -DirectSoundWaveData_88DEA6C:: @ 88DEA6C +DirectSoundWaveData_88DEA6C:: .incbin "sound/direct_sound_samples/88DEA6C.bin" .align 2 -DirectSoundWaveData_88DF08C:: @ 88DF08C +DirectSoundWaveData_88DF08C:: .incbin "sound/direct_sound_samples/88DF08C.bin" .align 2 -DirectSoundWaveData_88DF414:: @ 88DF414 +DirectSoundWaveData_88DF414:: .incbin "sound/direct_sound_samples/88DF414.bin" .align 2 -DirectSoundWaveData_88E01F8:: @ 88E01F8 +DirectSoundWaveData_88E01F8:: .incbin "sound/direct_sound_samples/88E01F8.bin" .align 2 -DirectSoundWaveData_88E0B68:: @ 88E0B68 +DirectSoundWaveData_88E0B68:: .incbin "sound/direct_sound_samples/88E0B68.bin" .align 2 -DirectSoundWaveData_88E0F04:: @ 88E0F04 +DirectSoundWaveData_88E0F04:: .incbin "sound/direct_sound_samples/88E0F04.bin" .align 2 -DirectSoundWaveData_88E16B8:: @ 88E16B8 +DirectSoundWaveData_88E16B8:: .incbin "sound/direct_sound_samples/88E16B8.bin" .align 2 -DirectSoundWaveData_88E2414:: @ 88E2414 +DirectSoundWaveData_88E2414:: .incbin "sound/direct_sound_samples/88E2414.bin" .align 2 -DirectSoundWaveData_88E2658:: @ 88E2658 +DirectSoundWaveData_88E2658:: .incbin "sound/direct_sound_samples/88E2658.bin" .align 2 -DirectSoundWaveData_88E3498:: @ 88E3498 +DirectSoundWaveData_88E3498:: .incbin "sound/direct_sound_samples/88E3498.bin" .align 2 -DirectSoundWaveData_88E3DEC:: @ 88E3DEC +DirectSoundWaveData_88E3DEC:: .incbin "sound/direct_sound_samples/88E3DEC.bin" .align 2 -DirectSoundWaveData_88E4140:: @ 88E4140 +DirectSoundWaveData_88E4140:: .incbin "sound/direct_sound_samples/88E4140.bin" .align 2 -DirectSoundWaveData_88E4774:: @ 88E4774 +DirectSoundWaveData_88E4774:: .incbin "sound/direct_sound_samples/88E4774.bin" .align 2 -DirectSoundWaveData_88E53E0:: @ 88E53E0 +DirectSoundWaveData_88E53E0:: .incbin "sound/direct_sound_samples/88E53E0.bin" .align 2 -DirectSoundWaveData_88E5978:: @ 88E5978 +DirectSoundWaveData_88E5978:: .incbin "sound/direct_sound_samples/88E5978.bin" .align 2 -DirectSoundWaveData_88E647C:: @ 88E647C +DirectSoundWaveData_88E647C:: .incbin "sound/direct_sound_samples/88E647C.bin" .align 2 -DirectSoundWaveData_88E6A80:: @ 88E6A80 +DirectSoundWaveData_88E6A80:: .incbin "sound/direct_sound_samples/88E6A80.bin" .align 2 -DirectSoundWaveData_88E6C78:: @ 88E6C78 +DirectSoundWaveData_88E6C78:: .incbin "sound/direct_sound_samples/88E6C78.bin" .align 2 -DirectSoundWaveData_88E75DC:: @ 88E75DC +DirectSoundWaveData_88E75DC:: .incbin "sound/direct_sound_samples/88E75DC.bin" .align 2 -DirectSoundWaveData_88E8568:: @ 88E8568 +DirectSoundWaveData_88E8568:: .incbin "sound/direct_sound_samples/88E8568.bin" .align 2 -DirectSoundWaveData_88E8BA0:: @ 88E8BA0 +DirectSoundWaveData_88E8BA0:: .incbin "sound/direct_sound_samples/88E8BA0.bin" .align 2 -DirectSoundWaveData_88E9674:: @ 88E9674 +DirectSoundWaveData_88E9674:: .incbin "sound/direct_sound_samples/88E9674.bin" .align 2 -DirectSoundWaveData_88EA5B8:: @ 88EA5B8 +DirectSoundWaveData_88EA5B8:: .incbin "sound/direct_sound_samples/88EA5B8.bin" .align 2 -DirectSoundWaveData_88EAB30:: @ 88EAB30 +DirectSoundWaveData_88EAB30:: .incbin "sound/direct_sound_samples/88EAB30.bin" .align 2 -DirectSoundWaveData_88EB97C:: @ 88EB97C +DirectSoundWaveData_88EB97C:: .incbin "sound/direct_sound_samples/88EB97C.bin" .align 2 -DirectSoundWaveData_88EC884:: @ 88EC884 +DirectSoundWaveData_88EC884:: .incbin "sound/direct_sound_samples/88EC884.bin" .align 2 -DirectSoundWaveData_88ED358:: @ 88ED358 +DirectSoundWaveData_88ED358:: .incbin "sound/direct_sound_samples/88ED358.bin" .align 2 -DirectSoundWaveData_88EDEEC:: @ 88EDEEC +DirectSoundWaveData_88EDEEC:: .incbin "sound/direct_sound_samples/88EDEEC.bin" .align 2 -DirectSoundWaveData_88EE8C4:: @ 88EE8C4 +DirectSoundWaveData_88EE8C4:: .incbin "sound/direct_sound_samples/88EE8C4.bin" .align 2 -DirectSoundWaveData_88EEF04:: @ 88EEF04 +DirectSoundWaveData_88EEF04:: .incbin "sound/direct_sound_samples/88EEF04.bin" .align 2 -DirectSoundWaveData_88EF9E4:: @ 88EF9E4 +DirectSoundWaveData_88EF9E4:: .incbin "sound/direct_sound_samples/88EF9E4.bin" .align 2 -DirectSoundWaveData_88F0020:: @ 88F0020 +DirectSoundWaveData_88F0020:: .incbin "sound/direct_sound_samples/88F0020.bin" .align 2 -DirectSoundWaveData_88F0738:: @ 88F0738 +DirectSoundWaveData_88F0738:: .incbin "sound/direct_sound_samples/88F0738.bin" .align 2 -DirectSoundWaveData_88F1074:: @ 88F1074 +DirectSoundWaveData_88F1074:: .incbin "sound/direct_sound_samples/88F1074.bin" .align 2 -DirectSoundWaveData_88F1830:: @ 88F1830 +DirectSoundWaveData_88F1830:: .incbin "sound/direct_sound_samples/88F1830.bin" .align 2 -DirectSoundWaveData_88F1D94:: @ 88F1D94 +DirectSoundWaveData_88F1D94:: .incbin "sound/direct_sound_samples/88F1D94.bin" .align 2 -DirectSoundWaveData_88F2B08:: @ 88F2B08 +DirectSoundWaveData_88F2B08:: .incbin "sound/direct_sound_samples/88F2B08.bin" .align 2 -DirectSoundWaveData_88F2F84:: @ 88F2F84 +DirectSoundWaveData_88F2F84:: .incbin "sound/direct_sound_samples/88F2F84.bin" .align 2 -DirectSoundWaveData_88F3470:: @ 88F3470 +DirectSoundWaveData_88F3470:: .incbin "sound/direct_sound_samples/88F3470.bin" .align 2 -DirectSoundWaveData_88F3C38:: @ 88F3C38 +DirectSoundWaveData_88F3C38:: .incbin "sound/direct_sound_samples/88F3C38.bin" .align 2 -DirectSoundWaveData_88F4834:: @ 88F4834 +DirectSoundWaveData_88F4834:: .incbin "sound/direct_sound_samples/88F4834.bin" .align 2 -DirectSoundWaveData_88F4BAC:: @ 88F4BAC +DirectSoundWaveData_88F4BAC:: .incbin "sound/direct_sound_samples/88F4BAC.bin" .align 2 -DirectSoundWaveData_88F5368:: @ 88F5368 +DirectSoundWaveData_88F5368:: .incbin "sound/direct_sound_samples/88F5368.bin" .align 2 -DirectSoundWaveData_88F5FCC:: @ 88F5FCC +DirectSoundWaveData_88F5FCC:: .incbin "sound/direct_sound_samples/88F5FCC.bin" .align 2 -DirectSoundWaveData_88F6498:: @ 88F6498 +DirectSoundWaveData_88F6498:: .incbin "sound/direct_sound_samples/88F6498.bin" .align 2 -DirectSoundWaveData_88F6F48:: @ 88F6F48 - .incbin "sound/direct_sound_samples/88F6F48.bin" +DirectSoundWaveData_sc88_accordion_duplicate:: + .incbin "sound/direct_sound_samples/sc88_accordion_duplicate.bin" .align 2 -DirectSoundWaveData_88F8318:: @ 88F8318 - .incbin "sound/direct_sound_samples/88F8318.bin" +DirectSoundWaveData_steinway_b_piano:: + .incbin "sound/direct_sound_samples/steinway_b_piano.bin" .align 2 -DirectSoundWaveData_88F94DC:: @ 88F94DC - .incbin "sound/direct_sound_samples/88F94DC.bin" +DirectSoundWaveData_sd90_classical_whistle:: + .incbin "sound/direct_sound_samples/sd90_classical_whistle.bin" .align 2 -DirectSoundWaveData_88F9F3C:: @ 88F9F3C - .incbin "sound/direct_sound_samples/88F9F3C.bin" +DirectSoundWaveData_sd90_enhanced_delay_shaku:: + .incbin "sound/direct_sound_samples/sd90_enhanced_delay_shaku.bin" diff --git a/sound/direct_sound_samples/86BA7E8.aif b/sound/direct_sound_samples/advanced_orchestra_voice_ahhs.aif Binary files differindex e8784682e..e8784682e 100644 --- a/sound/direct_sound_samples/86BA7E8.aif +++ b/sound/direct_sound_samples/advanced_orchestra_voice_ahhs.aif diff --git a/sound/direct_sound_samples/87240CC.aif b/sound/direct_sound_samples/bicycle_bell.aif Binary files differindex 578a81c2f..578a81c2f 100644 --- a/sound/direct_sound_samples/87240CC.aif +++ b/sound/direct_sound_samples/bicycle_bell.aif diff --git a/sound/direct_sound_samples/86D1A2C.aif b/sound/direct_sound_samples/dance_drums_ride_bell.aif Binary files differindex db36a54bd..db36a54bd 100644 --- a/sound/direct_sound_samples/86D1A2C.aif +++ b/sound/direct_sound_samples/dance_drums_ride_bell.aif diff --git a/sound/direct_sound_samples/86CD0C4.aif b/sound/direct_sound_samples/drum_and_percussion_kick.aif Binary files differindex 628421990..628421990 100644 --- a/sound/direct_sound_samples/86CD0C4.aif +++ b/sound/direct_sound_samples/drum_and_percussion_kick.aif diff --git a/sound/direct_sound_samples/8717980.aif b/sound/direct_sound_samples/emu_ii_pipe_organ.aif Binary files differindex 8663a6261..8663a6261 100644 --- a/sound/direct_sound_samples/8717980.aif +++ b/sound/direct_sound_samples/emu_ii_pipe_organ.aif diff --git a/sound/direct_sound_samples/8710AB8.aif b/sound/direct_sound_samples/heart_of_asia_gamelan.aif Binary files differindex adaf6a0c5..adaf6a0c5 100644 --- a/sound/direct_sound_samples/8710AB8.aif +++ b/sound/direct_sound_samples/heart_of_asia_gamelan.aif diff --git a/sound/direct_sound_samples/86B776C.aif b/sound/direct_sound_samples/jv1080_slap_bass.aif Binary files differindex 9175b63c5..9175b63c5 100644 --- a/sound/direct_sound_samples/86B776C.aif +++ b/sound/direct_sound_samples/jv1080_slap_bass.aif diff --git a/sound/direct_sound_samples/88D4A18.aif b/sound/direct_sound_samples/register_noise.aif Binary files differindex e56c5c131..e56c5c131 100644 --- a/sound/direct_sound_samples/88D4A18.aif +++ b/sound/direct_sound_samples/register_noise.aif diff --git a/sound/direct_sound_samples/87410E0.aif b/sound/direct_sound_samples/sc88_accordion.aif Binary files differindex 6d6c2e998..6d6c2e998 100644 --- a/sound/direct_sound_samples/87410E0.aif +++ b/sound/direct_sound_samples/sc88_accordion.aif diff --git a/sound/direct_sound_samples/88F6F48.aif b/sound/direct_sound_samples/sc88_accordion_duplicate.aif Binary files differindex 6d6c2e998..6d6c2e998 100644 --- a/sound/direct_sound_samples/88F6F48.aif +++ b/sound/direct_sound_samples/sc88_accordion_duplicate.aif diff --git a/sound/direct_sound_samples/86CC5E4.aif b/sound/direct_sound_samples/sc88_bongo.aif Binary files differindex 2e1bf9c64..2e1bf9c64 100644 --- a/sound/direct_sound_samples/86CC5E4.aif +++ b/sound/direct_sound_samples/sc88_bongo.aif diff --git a/sound/direct_sound_samples/86CCAFC.aif b/sound/direct_sound_samples/sc88_bongo_low.aif Binary files differindex 8e1cb620a..8e1cb620a 100644 --- a/sound/direct_sound_samples/86CCAFC.aif +++ b/sound/direct_sound_samples/sc88_bongo_low.aif diff --git a/sound/direct_sound_samples/872DE98.aif b/sound/direct_sound_samples/sc88_bubbles.aif Binary files differindex 89872bf55..89872bf55 100644 --- a/sound/direct_sound_samples/872DE98.aif +++ b/sound/direct_sound_samples/sc88_bubbles.aif diff --git a/sound/direct_sound_samples/86FF65C.aif b/sound/direct_sound_samples/sc88_flute.aif Binary files differindex 703f3adbd..703f3adbd 100644 --- a/sound/direct_sound_samples/86FF65C.aif +++ b/sound/direct_sound_samples/sc88_flute.aif diff --git a/sound/direct_sound_samples/86F4144.aif b/sound/direct_sound_samples/sc88_french_horn_60.aif Binary files differindex 742c4385e..742c4385e 100644 --- a/sound/direct_sound_samples/86F4144.aif +++ b/sound/direct_sound_samples/sc88_french_horn_60.aif diff --git a/sound/direct_sound_samples/86FB0D8.aif b/sound/direct_sound_samples/sc88_french_horn_72.aif Binary files differindex 004fda6a1..004fda6a1 100644 --- a/sound/direct_sound_samples/86FB0D8.aif +++ b/sound/direct_sound_samples/sc88_french_horn_72.aif diff --git a/sound/direct_sound_samples/86B6BA0.aif b/sound/direct_sound_samples/sc88_fretless_bass.aif Binary files differindex f3aa47d91..f3aa47d91 100644 --- a/sound/direct_sound_samples/86B6BA0.aif +++ b/sound/direct_sound_samples/sc88_fretless_bass.aif diff --git a/sound/direct_sound_samples/86B5D04.aif b/sound/direct_sound_samples/sc88_glockenspiel.aif Binary files differindex 199ead811..199ead811 100644 --- a/sound/direct_sound_samples/86B5D04.aif +++ b/sound/direct_sound_samples/sc88_glockenspiel.aif diff --git a/sound/direct_sound_samples/873D874.aif b/sound/direct_sound_samples/sc88_harp.aif Binary files differindex 083c45e3d..083c45e3d 100644 --- a/sound/direct_sound_samples/873D874.aif +++ b/sound/direct_sound_samples/sc88_harp.aif diff --git a/sound/direct_sound_samples/88D8418.aif b/sound/direct_sound_samples/sc88_nylon_str_guitar.aif Binary files differindex dea429a25..dea429a25 100644 --- a/sound/direct_sound_samples/88D8418.aif +++ b/sound/direct_sound_samples/sc88_nylon_str_guitar.aif diff --git a/sound/direct_sound_samples/86B63A8.aif b/sound/direct_sound_samples/sc88_organ2.aif Binary files differindex 6372bbc32..6372bbc32 100644 --- a/sound/direct_sound_samples/86B63A8.aif +++ b/sound/direct_sound_samples/sc88_organ2.aif diff --git a/sound/direct_sound_samples/86E0D98.aif b/sound/direct_sound_samples/sc88_piano1_48.aif Binary files differindex c2b3757b0..c2b3757b0 100644 --- a/sound/direct_sound_samples/86E0D98.aif +++ b/sound/direct_sound_samples/sc88_piano1_48.aif diff --git a/sound/direct_sound_samples/86E1CF8.aif b/sound/direct_sound_samples/sc88_piano1_60.aif Binary files differindex 7de586c9b..7de586c9b 100644 --- a/sound/direct_sound_samples/86E1CF8.aif +++ b/sound/direct_sound_samples/sc88_piano1_60.aif diff --git a/sound/direct_sound_samples/86E3358.aif b/sound/direct_sound_samples/sc88_piano1_72.aif Binary files differindex 5236141ba..5236141ba 100644 --- a/sound/direct_sound_samples/86E3358.aif +++ b/sound/direct_sound_samples/sc88_piano1_72.aif diff --git a/sound/direct_sound_samples/86E48B4.aif b/sound/direct_sound_samples/sc88_piano1_84.aif Binary files differindex a7c4e94f8..a7c4e94f8 100644 --- a/sound/direct_sound_samples/86E48B4.aif +++ b/sound/direct_sound_samples/sc88_piano1_84.aif diff --git a/sound/direct_sound_samples/86FFDC0.aif b/sound/direct_sound_samples/sc88_pick_bass.aif Binary files differindex f244a9982..f244a9982 100644 --- a/sound/direct_sound_samples/86FFDC0.aif +++ b/sound/direct_sound_samples/sc88_pick_bass.aif diff --git a/sound/direct_sound_samples/8726EF0.aif b/sound/direct_sound_samples/sc88_pizzicato_strings.aif Binary files differindex 1c0a027f7..1c0a027f7 100644 --- a/sound/direct_sound_samples/8726EF0.aif +++ b/sound/direct_sound_samples/sc88_pizzicato_strings.aif diff --git a/sound/direct_sound_samples/86DB908.aif b/sound/direct_sound_samples/sc88_standard_bells.aif Binary files differindex 0eaf31309..0eaf31309 100644 --- a/sound/direct_sound_samples/86DB908.aif +++ b/sound/direct_sound_samples/sc88_standard_bells.aif diff --git a/sound/direct_sound_samples/86CB6B8.aif b/sound/direct_sound_samples/sc88_standard_cymbal_crash.aif Binary files differindex 576e3e19e..576e3e19e 100644 --- a/sound/direct_sound_samples/86CB6B8.aif +++ b/sound/direct_sound_samples/sc88_standard_cymbal_crash.aif diff --git a/sound/direct_sound_samples/86C6200.aif b/sound/direct_sound_samples/sc88_standard_hand_clap.aif Binary files differindex b11787ffc..b11787ffc 100644 --- a/sound/direct_sound_samples/86C6200.aif +++ b/sound/direct_sound_samples/sc88_standard_hand_clap.aif diff --git a/sound/direct_sound_samples/86C566C.aif b/sound/direct_sound_samples/sc88_standard_kick.aif Binary files differindex 9c504e3d0..9c504e3d0 100644 --- a/sound/direct_sound_samples/86C566C.aif +++ b/sound/direct_sound_samples/sc88_standard_kick.aif diff --git a/sound/direct_sound_samples/86C5B0C.aif b/sound/direct_sound_samples/sc88_standard_snare1.aif Binary files differindex 544b187d5..544b187d5 100644 --- a/sound/direct_sound_samples/86C5B0C.aif +++ b/sound/direct_sound_samples/sc88_standard_snare1.aif diff --git a/sound/direct_sound_samples/86C6A90.aif b/sound/direct_sound_samples/sc88_standard_snare2.aif Binary files differindex 36b640758..36b640758 100644 --- a/sound/direct_sound_samples/86C6A90.aif +++ b/sound/direct_sound_samples/sc88_standard_snare2.aif diff --git a/sound/direct_sound_samples/86E5440.aif b/sound/direct_sound_samples/sc88_string_ensemble_60.aif Binary files differindex bfaa5c196..bfaa5c196 100644 --- a/sound/direct_sound_samples/86E5440.aif +++ b/sound/direct_sound_samples/sc88_string_ensemble_60.aif diff --git a/sound/direct_sound_samples/86E89E4.aif b/sound/direct_sound_samples/sc88_string_ensemble_72.aif Binary files differindex 3e76cacdd..3e76cacdd 100644 --- a/sound/direct_sound_samples/86E89E4.aif +++ b/sound/direct_sound_samples/sc88_string_ensemble_72.aif diff --git a/sound/direct_sound_samples/86EAD00.aif b/sound/direct_sound_samples/sc88_string_ensemble_84.aif Binary files differindex 2647c78ec..2647c78ec 100644 --- a/sound/direct_sound_samples/86EAD00.aif +++ b/sound/direct_sound_samples/sc88_string_ensemble_84.aif diff --git a/sound/direct_sound_samples/86B86A4.aif b/sound/direct_sound_samples/sc88_synth_bass.aif Binary files differindex f39931a7e..f39931a7e 100644 --- a/sound/direct_sound_samples/86B86A4.aif +++ b/sound/direct_sound_samples/sc88_synth_bass.aif diff --git a/sound/direct_sound_samples/86B9318.aif b/sound/direct_sound_samples/sc88_timpani.aif Binary files differindex dfdfd702e..dfdfd702e 100644 --- a/sound/direct_sound_samples/86B9318.aif +++ b/sound/direct_sound_samples/sc88_timpani.aif diff --git a/sound/direct_sound_samples/87205DC.aif b/sound/direct_sound_samples/sc88_timpani_with_snare.aif Binary files differindex 7270872d6..7270872d6 100644 --- a/sound/direct_sound_samples/87205DC.aif +++ b/sound/direct_sound_samples/sc88_timpani_with_snare.aif diff --git a/sound/direct_sound_samples/86EE3CC.aif b/sound/direct_sound_samples/sc88_trumpet_60.aif Binary files differindex e56df7f60..e56df7f60 100644 --- a/sound/direct_sound_samples/86EE3CC.aif +++ b/sound/direct_sound_samples/sc88_trumpet_60.aif diff --git a/sound/direct_sound_samples/86EF71C.aif b/sound/direct_sound_samples/sc88_trumpet_72.aif Binary files differindex 8c68a83b3..8c68a83b3 100644 --- a/sound/direct_sound_samples/86EF71C.aif +++ b/sound/direct_sound_samples/sc88_trumpet_72.aif diff --git a/sound/direct_sound_samples/86F0C2C.aif b/sound/direct_sound_samples/sc88_trumpet_84.aif Binary files differindex a03bafc97..a03bafc97 100644 --- a/sound/direct_sound_samples/86F0C2C.aif +++ b/sound/direct_sound_samples/sc88_trumpet_84.aif diff --git a/sound/direct_sound_samples/8736C74.aif b/sound/direct_sound_samples/sc88_tubular_bell.aif Binary files differindex 9d00ecae6..9d00ecae6 100644 --- a/sound/direct_sound_samples/8736C74.aif +++ b/sound/direct_sound_samples/sc88_tubular_bell.aif diff --git a/sound/direct_sound_samples/872CC54.aif b/sound/direct_sound_samples/sc88_wind.aif Binary files differindex ece919ea5..ece919ea5 100644 --- a/sound/direct_sound_samples/872CC54.aif +++ b/sound/direct_sound_samples/sc88_wind.aif diff --git a/sound/direct_sound_samples/873E2A4.aif b/sound/direct_sound_samples/sc88_xylophone.aif Binary files differindex 1bd43ca92..1bd43ca92 100644 --- a/sound/direct_sound_samples/873E2A4.aif +++ b/sound/direct_sound_samples/sc88_xylophone.aif diff --git a/sound/direct_sound_samples/86CF950.aif b/sound/direct_sound_samples/sd90_ambient_tom.aif Binary files differindex 08f1acf38..08f1acf38 100644 --- a/sound/direct_sound_samples/86CF950.aif +++ b/sound/direct_sound_samples/sd90_ambient_tom.aif diff --git a/sound/direct_sound_samples/870AE74.aif b/sound/direct_sound_samples/sd90_classical_distortion_guitar_high.aif Binary files differindex b0f0e82a1..b0f0e82a1 100644 --- a/sound/direct_sound_samples/870AE74.aif +++ b/sound/direct_sound_samples/sd90_classical_distortion_guitar_high.aif diff --git a/sound/direct_sound_samples/870DE64.aif b/sound/direct_sound_samples/sd90_classical_distortion_guitar_low.aif Binary files differindex c4f7082ed..c4f7082ed 100644 --- a/sound/direct_sound_samples/870DE64.aif +++ b/sound/direct_sound_samples/sd90_classical_distortion_guitar_low.aif diff --git a/sound/direct_sound_samples/88DA388.aif b/sound/direct_sound_samples/sd90_classical_guitar_harmonics.aif Binary files differindex 8b7a7da40..8b7a7da40 100644 --- a/sound/direct_sound_samples/88DA388.aif +++ b/sound/direct_sound_samples/sd90_classical_guitar_harmonics.aif diff --git a/sound/direct_sound_samples/86BBE98.aif b/sound/direct_sound_samples/sd90_classical_oboe.aif Binary files differindex 41b6fec12..41b6fec12 100644 --- a/sound/direct_sound_samples/86BBE98.aif +++ b/sound/direct_sound_samples/sd90_classical_oboe.aif diff --git a/sound/direct_sound_samples/8709004.aif b/sound/direct_sound_samples/sd90_classical_overdrive_guitar.aif Binary files differindex d37c79c05..d37c79c05 100644 --- a/sound/direct_sound_samples/8709004.aif +++ b/sound/direct_sound_samples/sd90_classical_overdrive_guitar.aif diff --git a/sound/direct_sound_samples/8703214.aif b/sound/direct_sound_samples/sd90_classical_shakuhachi.aif Binary files differindex e04a34f64..e04a34f64 100644 --- a/sound/direct_sound_samples/8703214.aif +++ b/sound/direct_sound_samples/sd90_classical_shakuhachi.aif diff --git a/sound/direct_sound_samples/88F94DC.aif b/sound/direct_sound_samples/sd90_classical_whistle.aif Binary files differindex b4be7482f..b4be7482f 100644 --- a/sound/direct_sound_samples/88F94DC.aif +++ b/sound/direct_sound_samples/sd90_classical_whistle.aif diff --git a/sound/direct_sound_samples/88F9F3C.aif b/sound/direct_sound_samples/sd90_enhanced_delay_shaku.aif Binary files differindex c64ef6b03..c64ef6b03 100644 --- a/sound/direct_sound_samples/88F9F3C.aif +++ b/sound/direct_sound_samples/sd90_enhanced_delay_shaku.aif diff --git a/sound/direct_sound_samples/86CDFDC.aif b/sound/direct_sound_samples/sd90_solo_snare.aif Binary files differindex 93b679358..93b679358 100644 --- a/sound/direct_sound_samples/86CDFDC.aif +++ b/sound/direct_sound_samples/sd90_solo_snare.aif diff --git a/sound/direct_sound_samples/88F8318.aif b/sound/direct_sound_samples/steinway_b_piano.aif Binary files differindex e98c64db4..e98c64db4 100644 --- a/sound/direct_sound_samples/88F8318.aif +++ b/sound/direct_sound_samples/steinway_b_piano.aif diff --git a/sound/direct_sound_samples/86DAA94.aif b/sound/direct_sound_samples/unknown_anvil_high.aif Binary files differindex 0d0b3e3ca..0d0b3e3ca 100644 --- a/sound/direct_sound_samples/86DAA94.aif +++ b/sound/direct_sound_samples/unknown_anvil_high.aif diff --git a/sound/direct_sound_samples/86DD11C.aif b/sound/direct_sound_samples/unknown_anvil_low.aif Binary files differindex 4a4268210..4a4268210 100644 --- a/sound/direct_sound_samples/86DD11C.aif +++ b/sound/direct_sound_samples/unknown_anvil_low.aif diff --git a/sound/direct_sound_samples/86C958C.aif b/sound/direct_sound_samples/unknown_bell.aif Binary files differindex 7de79e747..7de79e747 100644 --- a/sound/direct_sound_samples/86C958C.aif +++ b/sound/direct_sound_samples/unknown_bell.aif diff --git a/sound/direct_sound_samples/8715038.aif b/sound/direct_sound_samples/unknown_church_organ.aif Binary files differindex a2618653f..a2618653f 100644 --- a/sound/direct_sound_samples/8715038.aif +++ b/sound/direct_sound_samples/unknown_church_organ.aif diff --git a/sound/direct_sound_samples/86C8348.aif b/sound/direct_sound_samples/unknown_close_hihat.aif Binary files differindex 8747aef28..8747aef28 100644 --- a/sound/direct_sound_samples/86C8348.aif +++ b/sound/direct_sound_samples/unknown_close_hihat.aif diff --git a/sound/direct_sound_samples/86D925C.aif b/sound/direct_sound_samples/unknown_cowbell.aif Binary files differindex 43515f542..43515f542 100644 --- a/sound/direct_sound_samples/86D925C.aif +++ b/sound/direct_sound_samples/unknown_cowbell.aif diff --git a/sound/direct_sound_samples/86CADD4.aif b/sound/direct_sound_samples/unknown_cymbal_crash.aif Binary files differindex 4aec6882f..4aec6882f 100644 --- a/sound/direct_sound_samples/86CADD4.aif +++ b/sound/direct_sound_samples/unknown_cymbal_crash.aif diff --git a/sound/direct_sound_samples/86D9C14.aif b/sound/direct_sound_samples/unknown_djembe.aif Binary files differindex 2e67f1d73..2e67f1d73 100644 --- a/sound/direct_sound_samples/86D9C14.aif +++ b/sound/direct_sound_samples/unknown_djembe.aif diff --git a/sound/direct_sound_samples/871F234.aif b/sound/direct_sound_samples/unknown_e_piano_high.aif Binary files differindex 86ea0fa76..86ea0fa76 100644 --- a/sound/direct_sound_samples/871F234.aif +++ b/sound/direct_sound_samples/unknown_e_piano_high.aif diff --git a/sound/direct_sound_samples/871CBCC.aif b/sound/direct_sound_samples/unknown_e_piano_low.aif Binary files differindex fced03712..fced03712 100644 --- a/sound/direct_sound_samples/871CBCC.aif +++ b/sound/direct_sound_samples/unknown_e_piano_low.aif diff --git a/sound/direct_sound_samples/86DE6C0.aif b/sound/direct_sound_samples/unknown_ethnic_drum.aif Binary files differindex a8046cee8..a8046cee8 100644 --- a/sound/direct_sound_samples/86DE6C0.aif +++ b/sound/direct_sound_samples/unknown_ethnic_drum.aif diff --git a/sound/direct_sound_samples/8701A10.aif b/sound/direct_sound_samples/unknown_koto_high.aif Binary files differindex 9c531de11..9c531de11 100644 --- a/sound/direct_sound_samples/8701A10.aif +++ b/sound/direct_sound_samples/unknown_koto_high.aif diff --git a/sound/direct_sound_samples/8706DCC.aif b/sound/direct_sound_samples/unknown_koto_low.aif Binary files differindex 67c40f196..67c40f196 100644 --- a/sound/direct_sound_samples/8706DCC.aif +++ b/sound/direct_sound_samples/unknown_koto_low.aif diff --git a/sound/direct_sound_samples/86C875C.aif b/sound/direct_sound_samples/unknown_open_hihat.aif Binary files differindex 5ad9410d0..5ad9410d0 100644 --- a/sound/direct_sound_samples/86C875C.aif +++ b/sound/direct_sound_samples/unknown_open_hihat.aif diff --git a/sound/direct_sound_samples/873A594.aif b/sound/direct_sound_samples/unknown_polysynth.aif Binary files differindex 455ced13e..455ced13e 100644 --- a/sound/direct_sound_samples/873A594.aif +++ b/sound/direct_sound_samples/unknown_polysynth.aif diff --git a/sound/direct_sound_samples/86C2590.aif b/sound/direct_sound_samples/unknown_snare.aif Binary files differindex e7184ec6f..e7184ec6f 100644 --- a/sound/direct_sound_samples/86C2590.aif +++ b/sound/direct_sound_samples/unknown_snare.aif diff --git a/sound/direct_sound_samples/8721AAC.aif b/sound/direct_sound_samples/unknown_synth_snare.aif Binary files differindex b3122457d..b3122457d 100644 --- a/sound/direct_sound_samples/8721AAC.aif +++ b/sound/direct_sound_samples/unknown_synth_snare.aif diff --git a/sound/direct_sound_samples/86CA520.aif b/sound/direct_sound_samples/unknown_tambourine.aif Binary files differindex 39ec57d29..39ec57d29 100644 --- a/sound/direct_sound_samples/86CA520.aif +++ b/sound/direct_sound_samples/unknown_tambourine.aif diff --git a/sound/direct_sound_samples/86C7308.aif b/sound/direct_sound_samples/unknown_tom.aif Binary files differindex 04f990b13..04f990b13 100644 --- a/sound/direct_sound_samples/86C7308.aif +++ b/sound/direct_sound_samples/unknown_tom.aif diff --git a/sound/direct_sound_samples/86F204C.aif b/sound/direct_sound_samples/unknown_trombone_39.aif Binary files differindex d4077b481..d4077b481 100644 --- a/sound/direct_sound_samples/86F204C.aif +++ b/sound/direct_sound_samples/unknown_trombone_39.aif diff --git a/sound/direct_sound_samples/86F30E8.aif b/sound/direct_sound_samples/unknown_trombone_51.aif Binary files differindex 2ad86876b..2ad86876b 100644 --- a/sound/direct_sound_samples/86F30E8.aif +++ b/sound/direct_sound_samples/unknown_trombone_51.aif diff --git a/sound/direct_sound_samples/86DFCA4.aif b/sound/direct_sound_samples/unknown_tsuzumi.aif Binary files differindex 1696bd02e..1696bd02e 100644 --- a/sound/direct_sound_samples/86DFCA4.aif +++ b/sound/direct_sound_samples/unknown_tsuzumi.aif diff --git a/sound/direct_sound_samples/86C4344.aif b/sound/direct_sound_samples/unknown_wood_block_high.aif Binary files differindex 5219bdf5d..5219bdf5d 100644 --- a/sound/direct_sound_samples/86C4344.aif +++ b/sound/direct_sound_samples/unknown_wood_block_high.aif diff --git a/sound/direct_sound_samples/86C2A68.aif b/sound/direct_sound_samples/unknown_wood_block_low.aif Binary files differindex 69267ca1c..69267ca1c 100644 --- a/sound/direct_sound_samples/86C2A68.aif +++ b/sound/direct_sound_samples/unknown_wood_block_low.aif diff --git a/sound/direct_sound_samples/87322BC.aif b/sound/direct_sound_samples/unused_acid_bass.aif Binary files differindex 09fe6f12e..09fe6f12e 100644 --- a/sound/direct_sound_samples/87322BC.aif +++ b/sound/direct_sound_samples/unused_acid_bass.aif diff --git a/sound/direct_sound_samples/86BDC80.aif b/sound/direct_sound_samples/unused_electric_guitar.aif Binary files differindex 7647a74a7..7647a74a7 100644 --- a/sound/direct_sound_samples/86BDC80.aif +++ b/sound/direct_sound_samples/unused_electric_guitar.aif diff --git a/sound/direct_sound_samples/87224B8.aif b/sound/direct_sound_samples/unused_sc88_square.aif Binary files differindex 09e17f0ca..09e17f0ca 100644 --- a/sound/direct_sound_samples/87224B8.aif +++ b/sound/direct_sound_samples/unused_sc88_square.aif diff --git a/sound/direct_sound_samples/86BEF94.aif b/sound/direct_sound_samples/unused_sc88_unison_slap.aif Binary files differindex 46d6e7d13..46d6e7d13 100644 --- a/sound/direct_sound_samples/86BEF94.aif +++ b/sound/direct_sound_samples/unused_sc88_unison_slap.aif diff --git a/sound/direct_sound_samples/86BD1DC.aif b/sound/direct_sound_samples/unused_sd90_oboe.aif Binary files differindex 2a0ea2a26..2a0ea2a26 100644 --- a/sound/direct_sound_samples/86BD1DC.aif +++ b/sound/direct_sound_samples/unused_sd90_oboe.aif diff --git a/sound/direct_sound_samples/87190E0.aif b/sound/direct_sound_samples/unused_unknown_female_voice.aif Binary files differindex b310823a7..b310823a7 100644 --- a/sound/direct_sound_samples/87190E0.aif +++ b/sound/direct_sound_samples/unused_unknown_female_voice.aif diff --git a/sound/direct_sound_samples/871A724.aif b/sound/direct_sound_samples/unused_unknown_male_voice.aif Binary files differindex a2382d700..a2382d700 100644 --- a/sound/direct_sound_samples/871A724.aif +++ b/sound/direct_sound_samples/unused_unknown_male_voice.aif diff --git a/sound/voice_groups.inc b/sound/voice_groups.inc index e725047b9..c0f546ccf 100644 --- a/sound/voice_groups.inc +++ b/sound/voice_groups.inc @@ -9,7 +9,7 @@ voicegroup000:: @ 8675D04 voice_square_2 2, 0, 0, 9, 2 @ 8675D4C voice_square_1 0, 2, 0, 0, 15, 0 @ 8675D58 voice_square_1 0, 2, 0, 0, 15, 0 @ 8675D64 - voice_directsound 60, 0, DirectSoundWaveData_86B5D04, 255, 165, 51, 235 @ 8675D70 + voice_directsound 60, 0, DirectSoundWaveData_sc88_glockenspiel, 255, 165, 51, 235 @ 8675D70 voice_square_1 0, 2, 0, 0, 15, 0 @ 8675D7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8675D88 voice_square_1 0, 2, 0, 0, 15, 0 @ 8675D94 @@ -17,7 +17,7 @@ voicegroup000:: @ 8675D04 voice_square_1 0, 2, 0, 0, 15, 0 @ 8675DAC voice_square_1 0, 2, 0, 0, 15, 0 @ 8675DB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8675DC4 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 127 @ 8675DD0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 127 @ 8675DD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8675DDC voice_square_1 0, 2, 0, 0, 15, 0 @ 8675DE8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8675DF4 @@ -32,13 +32,13 @@ voicegroup000:: @ 8675D04 voice_square_1 0, 2, 0, 0, 15, 0 @ 8675E60 voice_square_1 0, 2, 0, 0, 15, 0 @ 8675E6C voice_square_1 0, 2, 0, 0, 15, 0 @ 8675E78 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 149 @ 8675E84 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 149 @ 8675E84 voice_square_1 0, 2, 0, 0, 15, 0 @ 8675E90 voice_square_1 0, 2, 0, 0, 15, 0 @ 8675E9C voice_square_1 0, 2, 0, 0, 15, 0 @ 8675EA8 - voice_directsound 60, 0, DirectSoundWaveData_86B776C, 255, 235, 128, 115 @ 8675EB4 + voice_directsound 60, 0, DirectSoundWaveData_jv1080_slap_bass, 255, 235, 128, 115 @ 8675EB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8675EC0 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 8675ECC + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 8675ECC voice_square_1 0, 2, 0, 0, 15, 0 @ 8675ED8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8675EE4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8675EF0 @@ -47,7 +47,7 @@ voicegroup000:: @ 8675D04 voice_square_1 0, 2, 0, 0, 15, 0 @ 8675F14 voice_square_1 0, 2, 0, 0, 15, 0 @ 8675F20 voice_square_1 0, 2, 0, 0, 15, 0 @ 8675F2C - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 204, 193, 239 @ 8675F38 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 204, 193, 239 @ 8675F38 voice_keysplit voicegroup006, KeySplitTable2 @ 8675F44 voice_square_1 0, 2, 0, 0, 15, 0 @ 8675F50 voice_square_1 0, 2, 0, 0, 15, 0 @ 8675F5C @@ -93,78 +93,78 @@ voicegroup001:: @ 8675FEC voice_square_1 0, 0, 0, 1, 6, 0 @ 8676118 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676124 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676130 - voice_directsound 60, 0, DirectSoundWaveData_86BA7E8, 255, 0, 255, 0 @ 867613C + voice_directsound 60, 0, DirectSoundWaveData_advanced_orchestra_voice_ahhs, 255, 0, 255, 0 @ 867613C .align 2 voicegroup002:: @ 8676148 - voice_directsound 60, 0, DirectSoundWaveData_86BBE98, 255, 165, 154, 127 @ 8676148 - voice_directsound 60, 0, DirectSoundWaveData_86BD1DC, 255, 165, 154, 127 @ 8676154 - voice_directsound 60, 0, DirectSoundWaveData_86BDC80, 255, 165, 206, 127 @ 8676160 - voice_directsound 60, 0, DirectSoundWaveData_86BEF94, 255, 165, 206, 127 @ 867616C - voice_directsound 60, 0, DirectSoundWaveData_86C2590, 255, 0, 255, 0 @ 8676178 - voice_directsound 60, 0, DirectSoundWaveData_86C2A68, 255, 0, 255, 0 @ 8676184 - voice_directsound 60, 0, DirectSoundWaveData_86C4344, 255, 0, 255, 0 @ 8676190 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_86C566C, 255, 0, 255, 242 @ 867619C + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_oboe, 255, 165, 154, 127 @ 8676148 + voice_directsound 60, 0, DirectSoundWaveData_unused_sd90_oboe, 255, 165, 154, 127 @ 8676154 + voice_directsound 60, 0, DirectSoundWaveData_unused_electric_guitar, 255, 165, 206, 127 @ 8676160 + voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_unison_slap, 255, 165, 206, 127 @ 867616C + voice_directsound 60, 0, DirectSoundWaveData_unknown_snare, 255, 0, 255, 0 @ 8676178 + voice_directsound 60, 0, DirectSoundWaveData_unknown_wood_block_low, 255, 0, 255, 0 @ 8676184 + voice_directsound 60, 0, DirectSoundWaveData_unknown_wood_block_high, 255, 0, 255, 0 @ 8676190 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_kick, 255, 0, 255, 242 @ 867619C voice_square_1 0, 2, 0, 0, 15, 0 @ 86761A8 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_86C5B0C, 255, 0, 255, 242 @ 86761B4 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_86C6200, 255, 255, 255, 127 @ 86761C0 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_86C6A90, 255, 0, 255, 242 @ 86761CC - voice_directsound 48, 44, DirectSoundWaveData_86C7308, 255, 210, 77, 204 @ 86761D8 - voice_directsound_no_resample 60, 79, DirectSoundWaveData_86C8348, 255, 127, 0, 188 @ 86761E4 - voice_directsound 51, 54, DirectSoundWaveData_86C7308, 255, 216, 77, 204 @ 86761F0 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare1, 255, 0, 255, 242 @ 86761B4 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_hand_clap, 255, 255, 255, 127 @ 86761C0 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 86761CC + voice_directsound 48, 44, DirectSoundWaveData_unknown_tom, 255, 210, 77, 204 @ 86761D8 + voice_directsound_no_resample 60, 79, DirectSoundWaveData_unknown_close_hihat, 255, 127, 0, 188 @ 86761E4 + voice_directsound 51, 54, DirectSoundWaveData_unknown_tom, 255, 216, 77, 204 @ 86761F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86761FC - voice_directsound 54, 64, DirectSoundWaveData_86C7308, 255, 216, 77, 204 @ 8676208 - voice_directsound_no_resample 60, 79, DirectSoundWaveData_86C875C, 255, 242, 141, 0 @ 8676214 - voice_directsound 57, 69, DirectSoundWaveData_86C7308, 255, 210, 77, 204 @ 8676220 - voice_directsound 60, 79, DirectSoundWaveData_86C7308, 255, 204, 77, 204 @ 867622C + voice_directsound 54, 64, DirectSoundWaveData_unknown_tom, 255, 216, 77, 204 @ 8676208 + voice_directsound_no_resample 60, 79, DirectSoundWaveData_unknown_open_hihat, 255, 242, 141, 0 @ 8676214 + voice_directsound 57, 69, DirectSoundWaveData_unknown_tom, 255, 210, 77, 204 @ 8676220 + voice_directsound 60, 79, DirectSoundWaveData_unknown_tom, 255, 204, 77, 204 @ 867622C voice_square_1 0, 2, 0, 0, 15, 0 @ 8676238 - voice_directsound 62, 84, DirectSoundWaveData_86C7308, 255, 204, 77, 204 @ 8676244 + voice_directsound 62, 84, DirectSoundWaveData_unknown_tom, 255, 204, 77, 204 @ 8676244 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676250 voice_square_1 0, 2, 0, 0, 15, 0 @ 867625C - voice_directsound_no_resample 70, 49, DirectSoundWaveData_86C958C, 255, 165, 103, 231 @ 8676268 - voice_directsound_no_resample 32, 34, DirectSoundWaveData_86CA520, 255, 127, 77, 204 @ 8676274 - voice_directsound_no_resample 60, 14, DirectSoundWaveData_86CADD4, 255, 235, 0, 165 @ 8676280 + voice_directsound_no_resample 70, 49, DirectSoundWaveData_unknown_bell, 255, 165, 103, 231 @ 8676268 + voice_directsound_no_resample 32, 34, DirectSoundWaveData_unknown_tambourine, 255, 127, 77, 204 @ 8676274 + voice_directsound_no_resample 60, 14, DirectSoundWaveData_unknown_cymbal_crash, 255, 235, 0, 165 @ 8676280 voice_square_1 0, 2, 0, 0, 15, 0 @ 867628C - voice_directsound_no_resample 30, 54, DirectSoundWaveData_86CB6B8, 255, 246, 0, 216 @ 8676298 + voice_directsound_no_resample 30, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 246, 0, 216 @ 8676298 voice_square_1 0, 2, 0, 0, 15, 0 @ 86762A4 - voice_directsound_no_resample 30, 54, DirectSoundWaveData_86CB6B8, 255, 246, 0, 216 @ 86762B0 - voice_directsound_no_resample 30, 64, DirectSoundWaveData_86CB6B8, 8, 0, 255, 216 @ 86762BC + voice_directsound_no_resample 30, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 246, 0, 216 @ 86762B0 + voice_directsound_no_resample 30, 64, DirectSoundWaveData_sc88_standard_cymbal_crash, 8, 0, 255, 216 @ 86762BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86762C8 - voice_directsound_no_resample 72, 104, DirectSoundWaveData_86CC5E4, 255, 0, 255, 0 @ 86762D4 + voice_directsound_no_resample 72, 104, DirectSoundWaveData_sc88_bongo, 255, 0, 255, 0 @ 86762D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86762E0 - voice_directsound_no_resample 72, 94, DirectSoundWaveData_86CCAFC, 255, 0, 255, 0 @ 86762EC - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86CD0C4, 255, 0, 255, 0 @ 86762F8 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86CDFDC, 255, 180, 175, 228 @ 8676304 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86CDFDC, 255, 0, 255, 242 @ 8676310 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_86C6200, 255, 255, 255, 127 @ 867631C - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86C6A90, 255, 0, 255, 242 @ 8676328 - voice_directsound 64, 24, DirectSoundWaveData_86CF950, 255, 0, 255, 226 @ 8676334 - voice_directsound_no_resample 64, 80, DirectSoundWaveData_86C6A90, 255, 0, 255, 242 @ 8676340 - voice_directsound 68, 34, DirectSoundWaveData_86CF950, 255, 0, 255, 226 @ 867634C - voice_directsound_no_resample 60, 64, DirectSoundWaveData_86C5B0C, 255, 0, 255, 242 @ 8676358 - voice_directsound 72, 44, DirectSoundWaveData_86CF950, 255, 0, 255, 226 @ 8676364 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_86C5B0C, 255, 0, 255, 242 @ 8676370 - voice_directsound 76, 84, DirectSoundWaveData_86CF950, 255, 0, 255, 226 @ 867637C - voice_directsound 80, 94, DirectSoundWaveData_86CF950, 255, 0, 255, 226 @ 8676388 - voice_directsound_no_resample 33, 89, DirectSoundWaveData_86CB6B8, 255, 235, 0, 231 @ 8676394 - voice_directsound 84, 104, DirectSoundWaveData_86CF950, 255, 0, 255, 235 @ 86763A0 + voice_directsound_no_resample 72, 94, DirectSoundWaveData_sc88_bongo_low, 255, 0, 255, 0 @ 86762EC + voice_directsound_no_resample 64, 64, DirectSoundWaveData_drum_and_percussion_kick, 255, 0, 255, 0 @ 86762F8 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 180, 175, 228 @ 8676304 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 0, 255, 242 @ 8676310 + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_standard_hand_clap, 255, 255, 255, 127 @ 867631C + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 8676328 + voice_directsound 64, 24, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 8676334 + voice_directsound_no_resample 64, 80, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 8676340 + voice_directsound 68, 34, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 867634C + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare1, 255, 0, 255, 242 @ 8676358 + voice_directsound 72, 44, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 8676364 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare1, 255, 0, 255, 242 @ 8676370 + voice_directsound 76, 84, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 867637C + voice_directsound 80, 94, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 8676388 + voice_directsound_no_resample 33, 89, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 8676394 + voice_directsound 84, 104, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 235 @ 86763A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86763AC - voice_directsound 63, 64, DirectSoundWaveData_86CB6B8, 255, 235, 0, 231 @ 86763B8 - voice_directsound_no_resample 64, 24, DirectSoundWaveData_86D1A2C, 255, 165, 103, 231 @ 86763C4 + voice_directsound 63, 64, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86763B8 + voice_directsound_no_resample 64, 24, DirectSoundWaveData_dance_drums_ride_bell, 255, 165, 103, 231 @ 86763C4 .align 2 voicegroup003:: @ 86763D0 - voice_directsound_no_resample 64, 34, DirectSoundWaveData_86CA520, 255, 127, 77, 204 @ 86763D0 - voice_directsound_no_resample 64, 14, DirectSoundWaveData_86CADD4, 255, 231, 0, 188 @ 86763DC - voice_directsound_no_resample 64, 89, DirectSoundWaveData_86D925C, 255, 0, 255, 242 @ 86763E8 - voice_directsound_no_resample 64, 29, DirectSoundWaveData_86CB6B8, 255, 235, 0, 231 @ 86763F4 + voice_directsound_no_resample 64, 34, DirectSoundWaveData_unknown_tambourine, 255, 127, 77, 204 @ 86763D0 + voice_directsound_no_resample 64, 14, DirectSoundWaveData_unknown_cymbal_crash, 255, 231, 0, 188 @ 86763DC + voice_directsound_no_resample 64, 89, DirectSoundWaveData_unknown_cowbell, 255, 0, 255, 242 @ 86763E8 + voice_directsound_no_resample 64, 29, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86763F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676400 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_86CB6B8, 255, 235, 0, 231 @ 867640C - voice_directsound_no_resample 64, 54, DirectSoundWaveData_86CB6B8, 8, 0, 255, 216 @ 8676418 - voice_directsound_no_resample 64, 94, DirectSoundWaveData_86D9C14, 255, 0, 255, 0 @ 8676424 - voice_directsound_no_resample 64, 34, DirectSoundWaveData_86CC5E4, 255, 0, 255, 0 @ 8676430 - voice_directsound_no_resample 64, 34, DirectSoundWaveData_86CCAFC, 255, 0, 255, 0 @ 867643C - voice_directsound_no_resample 64, 90, DirectSoundWaveData_86CCAFC, 255, 0, 255, 0 @ 8676448 + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 867640C + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 8, 0, 255, 216 @ 8676418 + voice_directsound_no_resample 64, 94, DirectSoundWaveData_unknown_djembe, 255, 0, 255, 0 @ 8676424 + voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88_bongo, 255, 0, 255, 0 @ 8676430 + voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88_bongo_low, 255, 0, 255, 0 @ 867643C + voice_directsound_no_resample 64, 90, DirectSoundWaveData_sc88_bongo_low, 255, 0, 255, 0 @ 8676448 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676454 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676460 voice_square_1 0, 2, 0, 0, 15, 0 @ 867646C @@ -180,48 +180,48 @@ voicegroup003:: @ 86763D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86764E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86764F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86764FC - voice_directsound_no_resample 64, 39, DirectSoundWaveData_86DAA94, 255, 242, 103, 188 @ 8676508 - voice_directsound_no_resample 64, 79, DirectSoundWaveData_86DAA94, 255, 242, 103, 188 @ 8676514 - voice_directsound_no_resample 64, 39, DirectSoundWaveData_86DAA94, 255, 165, 103, 188 @ 8676520 - voice_directsound_no_resample 64, 24, DirectSoundWaveData_86DB908, 255, 0, 255, 0 @ 867652C + voice_directsound_no_resample 64, 39, DirectSoundWaveData_unknown_anvil_high, 255, 242, 103, 188 @ 8676508 + voice_directsound_no_resample 64, 79, DirectSoundWaveData_unknown_anvil_high, 255, 242, 103, 188 @ 8676514 + voice_directsound_no_resample 64, 39, DirectSoundWaveData_unknown_anvil_high, 255, 165, 103, 188 @ 8676520 + voice_directsound_no_resample 64, 24, DirectSoundWaveData_sc88_standard_bells, 255, 0, 255, 0 @ 867652C voice_square_1 0, 2, 0, 0, 15, 0 @ 8676538 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676544 - voice_directsound_no_resample 64, 104, DirectSoundWaveData_86DD11C, 255, 0, 255, 0 @ 8676550 - voice_directsound 63, 64, DirectSoundWaveData_86DE6C0, 255, 0, 255, 0 @ 867655C - voice_directsound 50, 84, DirectSoundWaveData_86DFCA4, 255, 0, 255, 0 @ 8676568 - voice_directsound 64, 84, DirectSoundWaveData_86DFCA4, 255, 0, 255, 0 @ 8676574 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_86DE6C0, 255, 0, 255, 0 @ 8676580 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86CDFDC, 255, 180, 175, 228 @ 867658C - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86CDFDC, 255, 0, 255, 242 @ 8676598 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_86C6200, 255, 255, 255, 127 @ 86765A4 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86C6A90, 255, 0, 255, 242 @ 86765B0 - voice_directsound 64, 24, DirectSoundWaveData_86CF950, 255, 0, 255, 226 @ 86765BC - voice_directsound_no_resample 64, 80, DirectSoundWaveData_86C6A90, 255, 0, 255, 242 @ 86765C8 - voice_directsound 68, 34, DirectSoundWaveData_86CF950, 255, 0, 255, 226 @ 86765D4 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_86C5B0C, 255, 0, 255, 242 @ 86765E0 - voice_directsound 72, 44, DirectSoundWaveData_86CF950, 255, 0, 255, 226 @ 86765EC + voice_directsound_no_resample 64, 104, DirectSoundWaveData_unknown_anvil_low, 255, 0, 255, 0 @ 8676550 + voice_directsound 63, 64, DirectSoundWaveData_unknown_ethnic_drum, 255, 0, 255, 0 @ 867655C + voice_directsound 50, 84, DirectSoundWaveData_unknown_tsuzumi, 255, 0, 255, 0 @ 8676568 + voice_directsound 64, 84, DirectSoundWaveData_unknown_tsuzumi, 255, 0, 255, 0 @ 8676574 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_unknown_ethnic_drum, 255, 0, 255, 0 @ 8676580 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 180, 175, 228 @ 867658C + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 0, 255, 242 @ 8676598 + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_standard_hand_clap, 255, 255, 255, 127 @ 86765A4 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 86765B0 + voice_directsound 64, 24, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 86765BC + voice_directsound_no_resample 64, 80, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 86765C8 + voice_directsound 68, 34, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 86765D4 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare1, 255, 0, 255, 242 @ 86765E0 + voice_directsound 72, 44, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 86765EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86765F8 - voice_directsound 76, 84, DirectSoundWaveData_86CF950, 255, 0, 255, 226 @ 8676604 - voice_directsound 80, 94, DirectSoundWaveData_86CF950, 255, 0, 255, 226 @ 8676610 - voice_directsound_no_resample 33, 89, DirectSoundWaveData_86CB6B8, 255, 235, 0, 231 @ 867661C - voice_directsound 64, 104, DirectSoundWaveData_86DE6C0, 255, 0, 255, 235 @ 8676628 + voice_directsound 76, 84, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 8676604 + voice_directsound 80, 94, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 8676610 + voice_directsound_no_resample 33, 89, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 867661C + voice_directsound 64, 104, DirectSoundWaveData_unknown_ethnic_drum, 255, 0, 255, 235 @ 8676628 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676634 - voice_directsound 63, 64, DirectSoundWaveData_86CB6B8, 255, 235, 0, 231 @ 8676640 - voice_directsound_no_resample 64, 24, DirectSoundWaveData_86D1A2C, 255, 165, 103, 231 @ 867664C + voice_directsound 63, 64, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 8676640 + voice_directsound_no_resample 64, 24, DirectSoundWaveData_dance_drums_ride_bell, 255, 165, 103, 231 @ 867664C .align 2 voicegroup004:: @ 8676658 - voice_directsound_no_resample 66, 34, DirectSoundWaveData_86CA520, 255, 127, 77, 204 @ 8676658 - voice_directsound_no_resample 64, 14, DirectSoundWaveData_86CADD4, 255, 231, 0, 188 @ 8676664 - voice_directsound_no_resample 64, 89, DirectSoundWaveData_86D925C, 255, 0, 255, 242 @ 8676670 - voice_directsound_no_resample 64, 29, DirectSoundWaveData_86CB6B8, 255, 235, 0, 231 @ 867667C + voice_directsound_no_resample 66, 34, DirectSoundWaveData_unknown_tambourine, 255, 127, 77, 204 @ 8676658 + voice_directsound_no_resample 64, 14, DirectSoundWaveData_unknown_cymbal_crash, 255, 231, 0, 188 @ 8676664 + voice_directsound_no_resample 64, 89, DirectSoundWaveData_unknown_cowbell, 255, 0, 255, 242 @ 8676670 + voice_directsound_no_resample 64, 29, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 867667C voice_square_1 0, 2, 0, 0, 15, 0 @ 8676688 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_86CB6B8, 255, 235, 0, 231 @ 8676694 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_86CB6B8, 8, 0, 255, 216 @ 86766A0 - voice_directsound_no_resample 64, 94, DirectSoundWaveData_86D9C14, 255, 0, 255, 0 @ 86766AC - voice_directsound_no_resample 64, 34, DirectSoundWaveData_86CC5E4, 255, 0, 255, 0 @ 86766B8 - voice_directsound_no_resample 64, 34, DirectSoundWaveData_86CCAFC, 255, 0, 255, 0 @ 86766C4 - voice_directsound_no_resample 64, 90, DirectSoundWaveData_86CCAFC, 255, 0, 255, 0 @ 86766D0 + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 8676694 + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 8, 0, 255, 216 @ 86766A0 + voice_directsound_no_resample 64, 94, DirectSoundWaveData_unknown_djembe, 255, 0, 255, 0 @ 86766AC + voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88_bongo, 255, 0, 255, 0 @ 86766B8 + voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88_bongo_low, 255, 0, 255, 0 @ 86766C4 + voice_directsound_no_resample 64, 90, DirectSoundWaveData_sc88_bongo_low, 255, 0, 255, 0 @ 86766D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86766DC voice_square_1 0, 2, 0, 0, 15, 0 @ 86766E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86766F4 @@ -232,50 +232,50 @@ voicegroup004:: @ 8676658 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676730 voice_square_1 0, 2, 0, 0, 15, 0 @ 867673C voice_square_1 0, 2, 0, 0, 15, 0 @ 8676748 - voice_directsound_no_resample 61, 84, DirectSoundWaveData_86C4344, 255, 0, 255, 0 @ 8676754 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86C2A68, 255, 0, 255, 0 @ 8676760 + voice_directsound_no_resample 61, 84, DirectSoundWaveData_unknown_wood_block_high, 255, 0, 255, 0 @ 8676754 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_unknown_wood_block_low, 255, 0, 255, 0 @ 8676760 voice_square_1 0, 2, 0, 0, 15, 0 @ 867676C voice_square_1 0, 2, 0, 0, 15, 0 @ 8676778 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676784 - voice_directsound_no_resample 64, 39, DirectSoundWaveData_86DAA94, 255, 242, 103, 188 @ 8676790 - voice_directsound_no_resample 64, 79, DirectSoundWaveData_86DAA94, 255, 242, 103, 188 @ 867679C - voice_directsound_no_resample 64, 39, DirectSoundWaveData_86DAA94, 255, 165, 103, 188 @ 86767A8 - voice_directsound_no_resample 64, 24, DirectSoundWaveData_86DB908, 255, 0, 255, 0 @ 86767B4 + voice_directsound_no_resample 64, 39, DirectSoundWaveData_unknown_anvil_high, 255, 242, 103, 188 @ 8676790 + voice_directsound_no_resample 64, 79, DirectSoundWaveData_unknown_anvil_high, 255, 242, 103, 188 @ 867679C + voice_directsound_no_resample 64, 39, DirectSoundWaveData_unknown_anvil_high, 255, 165, 103, 188 @ 86767A8 + voice_directsound_no_resample 64, 24, DirectSoundWaveData_sc88_standard_bells, 255, 0, 255, 0 @ 86767B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86767C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86767CC - voice_directsound_no_resample 64, 104, DirectSoundWaveData_86DD11C, 255, 0, 255, 0 @ 86767D8 - voice_directsound 63, 64, DirectSoundWaveData_86DE6C0, 255, 0, 255, 0 @ 86767E4 - voice_directsound 50, 84, DirectSoundWaveData_86DFCA4, 255, 0, 255, 0 @ 86767F0 - voice_directsound 64, 84, DirectSoundWaveData_86DFCA4, 255, 0, 255, 0 @ 86767FC - voice_directsound 62, 64, DirectSoundWaveData_86CD0C4, 255, 0, 255, 0 @ 8676808 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86CDFDC, 255, 180, 175, 228 @ 8676814 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86CDFDC, 255, 0, 255, 242 @ 8676820 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_86C6200, 255, 255, 255, 127 @ 867682C - voice_directsound 65, 64, DirectSoundWaveData_86C6A90, 255, 0, 255, 242 @ 8676838 - voice_directsound 64, 24, DirectSoundWaveData_86CF950, 255, 0, 255, 226 @ 8676844 - voice_directsound_no_resample 64, 80, DirectSoundWaveData_86C6A90, 255, 0, 255, 242 @ 8676850 - voice_directsound 68, 34, DirectSoundWaveData_86CF950, 255, 0, 255, 226 @ 867685C - voice_directsound_no_resample 60, 64, DirectSoundWaveData_86C5B0C, 255, 0, 255, 242 @ 8676868 - voice_directsound 72, 44, DirectSoundWaveData_86CF950, 255, 0, 255, 226 @ 8676874 + voice_directsound_no_resample 64, 104, DirectSoundWaveData_unknown_anvil_low, 255, 0, 255, 0 @ 86767D8 + voice_directsound 63, 64, DirectSoundWaveData_unknown_ethnic_drum, 255, 0, 255, 0 @ 86767E4 + voice_directsound 50, 84, DirectSoundWaveData_unknown_tsuzumi, 255, 0, 255, 0 @ 86767F0 + voice_directsound 64, 84, DirectSoundWaveData_unknown_tsuzumi, 255, 0, 255, 0 @ 86767FC + voice_directsound 62, 64, DirectSoundWaveData_drum_and_percussion_kick, 255, 0, 255, 0 @ 8676808 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 180, 175, 228 @ 8676814 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 0, 255, 242 @ 8676820 + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_standard_hand_clap, 255, 255, 255, 127 @ 867682C + voice_directsound 65, 64, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 8676838 + voice_directsound 64, 24, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 8676844 + voice_directsound_no_resample 64, 80, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 8676850 + voice_directsound 68, 34, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 867685C + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare1, 255, 0, 255, 242 @ 8676868 + voice_directsound 72, 44, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 8676874 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676880 - voice_directsound 76, 84, DirectSoundWaveData_86CF950, 255, 0, 255, 226 @ 867688C - voice_directsound 80, 94, DirectSoundWaveData_86CF950, 255, 0, 255, 226 @ 8676898 - voice_directsound 56, 89, DirectSoundWaveData_86CB6B8, 255, 235, 0, 231 @ 86768A4 - voice_directsound 64, 104, DirectSoundWaveData_86DE6C0, 255, 0, 255, 235 @ 86768B0 + voice_directsound 76, 84, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 867688C + voice_directsound 80, 94, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 8676898 + voice_directsound 56, 89, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86768A4 + voice_directsound 64, 104, DirectSoundWaveData_unknown_ethnic_drum, 255, 0, 255, 235 @ 86768B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86768BC - voice_directsound 63, 64, DirectSoundWaveData_86CB6B8, 255, 235, 0, 231 @ 86768C8 - voice_directsound_no_resample 64, 24, DirectSoundWaveData_86D1A2C, 255, 165, 103, 231 @ 86768D4 - voice_directsound_no_resample 66, 34, DirectSoundWaveData_86CA520, 255, 127, 77, 204 @ 86768E0 - voice_directsound 64, 14, DirectSoundWaveData_86CADD4, 255, 231, 0, 188 @ 86768EC - voice_directsound 64, 89, DirectSoundWaveData_86D925C, 255, 0, 255, 242 @ 86768F8 - voice_directsound 60, 29, DirectSoundWaveData_86CB6B8, 255, 235, 0, 231 @ 8676904 + voice_directsound 63, 64, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86768C8 + voice_directsound_no_resample 64, 24, DirectSoundWaveData_dance_drums_ride_bell, 255, 165, 103, 231 @ 86768D4 + voice_directsound_no_resample 66, 34, DirectSoundWaveData_unknown_tambourine, 255, 127, 77, 204 @ 86768E0 + voice_directsound 64, 14, DirectSoundWaveData_unknown_cymbal_crash, 255, 231, 0, 188 @ 86768EC + voice_directsound 64, 89, DirectSoundWaveData_unknown_cowbell, 255, 0, 255, 242 @ 86768F8 + voice_directsound 60, 29, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 8676904 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676910 - voice_directsound 58, 54, DirectSoundWaveData_86CB6B8, 255, 235, 0, 231 @ 867691C - voice_directsound 62, 54, DirectSoundWaveData_86CB6B8, 8, 0, 255, 216 @ 8676928 - voice_directsound 64, 94, DirectSoundWaveData_86D9C14, 255, 0, 255, 0 @ 8676934 - voice_directsound 64, 34, DirectSoundWaveData_86CC5E4, 255, 0, 255, 0 @ 8676940 - voice_directsound 64, 34, DirectSoundWaveData_86CCAFC, 255, 0, 255, 0 @ 867694C - voice_directsound 64, 90, DirectSoundWaveData_86CCAFC, 255, 0, 255, 0 @ 8676958 + voice_directsound 58, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 867691C + voice_directsound 62, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 8, 0, 255, 216 @ 8676928 + voice_directsound 64, 94, DirectSoundWaveData_unknown_djembe, 255, 0, 255, 0 @ 8676934 + voice_directsound 64, 34, DirectSoundWaveData_sc88_bongo, 255, 0, 255, 0 @ 8676940 + voice_directsound 64, 34, DirectSoundWaveData_sc88_bongo_low, 255, 0, 255, 0 @ 867694C + voice_directsound 64, 90, DirectSoundWaveData_sc88_bongo_low, 255, 0, 255, 0 @ 8676958 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676964 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676970 voice_square_1 0, 2, 0, 0, 15, 0 @ 867697C @@ -286,40 +286,40 @@ voicegroup004:: @ 8676658 voice_square_1 0, 2, 0, 0, 15, 0 @ 86769B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86769C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86769D0 - voice_directsound 61, 84, DirectSoundWaveData_86C4344, 255, 0, 255, 0 @ 86769DC - voice_directsound 64, 64, DirectSoundWaveData_86C2A68, 255, 0, 255, 0 @ 86769E8 + voice_directsound 61, 84, DirectSoundWaveData_unknown_wood_block_high, 255, 0, 255, 0 @ 86769DC + voice_directsound 64, 64, DirectSoundWaveData_unknown_wood_block_low, 255, 0, 255, 0 @ 86769E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86769F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676A00 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676A0C - voice_directsound 64, 39, DirectSoundWaveData_86DAA94, 255, 242, 103, 188 @ 8676A18 - voice_directsound 64, 79, DirectSoundWaveData_86DAA94, 255, 242, 103, 188 @ 8676A24 - voice_directsound 64, 39, DirectSoundWaveData_86DAA94, 255, 165, 103, 188 @ 8676A30 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86DB908, 255, 0, 255, 0 @ 8676A3C + voice_directsound 64, 39, DirectSoundWaveData_unknown_anvil_high, 255, 242, 103, 188 @ 8676A18 + voice_directsound 64, 79, DirectSoundWaveData_unknown_anvil_high, 255, 242, 103, 188 @ 8676A24 + voice_directsound 64, 39, DirectSoundWaveData_unknown_anvil_high, 255, 165, 103, 188 @ 8676A30 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_standard_bells, 255, 0, 255, 0 @ 8676A3C voice_square_1 0, 2, 0, 0, 15, 0 @ 8676A48 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676A54 - voice_directsound 64, 104, DirectSoundWaveData_86DD11C, 255, 0, 255, 0 @ 8676A60 - voice_directsound 63, 64, DirectSoundWaveData_86DE6C0, 255, 0, 255, 0 @ 8676A6C - voice_directsound 50, 84, DirectSoundWaveData_86DFCA4, 255, 0, 255, 0 @ 8676A78 - voice_directsound 64, 84, DirectSoundWaveData_86DFCA4, 255, 0, 255, 0 @ 8676A84 + voice_directsound 64, 104, DirectSoundWaveData_unknown_anvil_low, 255, 0, 255, 0 @ 8676A60 + voice_directsound 63, 64, DirectSoundWaveData_unknown_ethnic_drum, 255, 0, 255, 0 @ 8676A6C + voice_directsound 50, 84, DirectSoundWaveData_unknown_tsuzumi, 255, 0, 255, 0 @ 8676A78 + voice_directsound 64, 84, DirectSoundWaveData_unknown_tsuzumi, 255, 0, 255, 0 @ 8676A84 .align 2 voicegroup005:: @ 8676A90 - voice_directsound 60, 0, DirectSoundWaveData_86E0D98, 255, 252, 0, 239 @ 8676A90 - voice_directsound 60, 0, DirectSoundWaveData_86E1CF8, 255, 250, 0, 221 @ 8676A9C - voice_directsound 60, 0, DirectSoundWaveData_86E3358, 255, 250, 0, 221 @ 8676AA8 - voice_directsound 60, 0, DirectSoundWaveData_86E48B4, 255, 247, 0, 221 @ 8676AB4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_piano1_48, 255, 252, 0, 239 @ 8676A90 + voice_directsound 60, 0, DirectSoundWaveData_sc88_piano1_60, 255, 250, 0, 221 @ 8676A9C + voice_directsound 60, 0, DirectSoundWaveData_sc88_piano1_72, 255, 250, 0, 221 @ 8676AA8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_piano1_84, 255, 247, 0, 221 @ 8676AB4 .align 2 voicegroup006:: @ 8676AC0 - voice_directsound 60, 0, DirectSoundWaveData_86E5440, 255, 0, 255, 196 @ 8676AC0 - voice_directsound 60, 0, DirectSoundWaveData_86E89E4, 255, 0, 255, 196 @ 8676ACC - voice_directsound 60, 0, DirectSoundWaveData_86EAD00, 255, 0, 255, 196 @ 8676AD8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_string_ensemble_60, 255, 0, 255, 196 @ 8676AC0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_string_ensemble_72, 255, 0, 255, 196 @ 8676ACC + voice_directsound 60, 0, DirectSoundWaveData_sc88_string_ensemble_84, 255, 0, 255, 196 @ 8676AD8 .align 2 voicegroup007:: @ 8676AE4 - voice_directsound 60, 0, DirectSoundWaveData_86EE3CC, 255, 0, 193, 127 @ 8676AE4 - voice_directsound 60, 0, DirectSoundWaveData_86EF71C, 255, 0, 193, 127 @ 8676AF0 - voice_directsound 60, 0, DirectSoundWaveData_86F0C2C, 255, 0, 193, 127 @ 8676AFC + voice_directsound 60, 0, DirectSoundWaveData_sc88_trumpet_60, 255, 0, 193, 127 @ 8676AE4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_trumpet_72, 255, 0, 193, 127 @ 8676AF0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_trumpet_84, 255, 0, 193, 127 @ 8676AFC voice_square_1_alt 38, 2, 1, 0, 0, 0 @ 8676B08 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676B14 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676B20 @@ -451,13 +451,13 @@ voicegroup007:: @ 8676AE4 .align 2 voicegroup008:: @ 8677108 - voice_directsound 60, 0, DirectSoundWaveData_86F204C, 255, 0, 255, 165 @ 8677108 - voice_directsound 60, 0, DirectSoundWaveData_86F30E8, 255, 0, 255, 165 @ 8677114 + voice_directsound 60, 0, DirectSoundWaveData_unknown_trombone_39, 255, 0, 255, 165 @ 8677108 + voice_directsound 60, 0, DirectSoundWaveData_unknown_trombone_51, 255, 0, 255, 165 @ 8677114 .align 2 voicegroup009:: @ 8677120 - voice_directsound 60, 0, DirectSoundWaveData_86F4144, 255, 0, 224, 165 @ 8677120 - voice_directsound 60, 0, DirectSoundWaveData_86FB0D8, 255, 0, 218, 165 @ 867712C + voice_directsound 60, 0, DirectSoundWaveData_sc88_french_horn_60, 255, 0, 224, 165 @ 8677120 + voice_directsound 60, 0, DirectSoundWaveData_sc88_french_horn_72, 255, 0, 218, 165 @ 867712C .align 2 voicegroup010:: @ 8677138 @@ -475,7 +475,7 @@ voicegroup010:: @ 8677138 voice_square_1 0, 2, 0, 0, 15, 0 @ 86771BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86771C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86771D4 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 216, 90, 242 @ 86771E0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 216, 90, 242 @ 86771E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86771EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86771F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677204 @@ -507,8 +507,8 @@ voicegroup010:: @ 8677138 voice_square_1 0, 2, 0, 0, 15, 0 @ 867733C voice_square_1 0, 2, 0, 0, 15, 0 @ 8677348 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677354 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 0, 204 @ 8677360 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 867736C + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 0, 204 @ 8677360 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 867736C voice_keysplit voicegroup006, KeySplitTable2 @ 8677378 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677384 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677390 @@ -572,7 +572,7 @@ voicegroup011:: @ 8677528 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677624 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677630 voice_square_1 0, 2, 0, 0, 15, 0 @ 867763C - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 149 @ 8677648 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 149 @ 8677648 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677654 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677660 voice_square_1 0, 2, 0, 0, 15, 0 @ 867766C @@ -583,7 +583,7 @@ voicegroup011:: @ 8677528 voice_square_1 0, 2, 0, 0, 15, 0 @ 86776A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86776B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86776C0 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 149 @ 86776CC + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 149 @ 86776CC voice_square_1 0, 2, 0, 0, 15, 0 @ 86776D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86776E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86776F0 @@ -621,7 +621,7 @@ voicegroup011:: @ 8677528 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677870 voice_square_1 0, 2, 0, 0, 15, 0 @ 867787C voice_square_1 0, 2, 0, 0, 15, 0 @ 8677888 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 8677894 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 8677894 voice_programmable_wave_alt ProgrammableWaveData_86B4830, 0, 7, 15, 1 @ 86778A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86778AC voice_square_1 0, 2, 0, 0, 15, 0 @ 86778B8 @@ -681,18 +681,18 @@ voicegroup011:: @ 8677528 voicegroup012:: @ 8677B28 voice_keysplit_all voicegroup001 @ 8677B28 voice_keysplit voicegroup005, KeySplitTable1 @ 8677B34 - voice_directsound 60, 0, DirectSoundWaveData_87322BC, 255, 178, 180, 165 @ 8677B40 + voice_directsound 60, 0, DirectSoundWaveData_unused_acid_bass, 255, 178, 180, 165 @ 8677B40 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677B4C voice_square_1 0, 2, 0, 0, 15, 0 @ 8677B58 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677B64 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677B70 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677B7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8677B88 - voice_directsound 60, 0, DirectSoundWaveData_86B5D04, 255, 165, 51, 235 @ 8677B94 + voice_directsound 60, 0, DirectSoundWaveData_sc88_glockenspiel, 255, 165, 51, 235 @ 8677B94 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677BA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677BAC voice_square_1 0, 2, 0, 0, 15, 0 @ 8677BB8 - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 8677BC4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 8677BC4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677BD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677BDC voice_square_1 0, 2, 0, 0, 15, 0 @ 8677BE8 @@ -717,7 +717,7 @@ voicegroup012:: @ 8677B28 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677CCC voice_square_1 0, 2, 0, 0, 15, 0 @ 8677CD8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677CE4 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 8677CF0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 8677CF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677CFC voice_square_1 0, 2, 0, 0, 15, 0 @ 8677D08 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677D14 @@ -725,8 +725,8 @@ voicegroup012:: @ 8677B28 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677D2C voice_square_1 0, 2, 0, 0, 15, 0 @ 8677D38 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677D44 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 0, 204 @ 8677D50 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 8677D5C + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 0, 204 @ 8677D50 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 8677D5C voice_keysplit voicegroup006, KeySplitTable2 @ 8677D68 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677D74 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677D80 @@ -752,7 +752,7 @@ voicegroup012:: @ 8677B28 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677E70 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677E7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8677E88 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 8677E94 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 8677E94 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677EA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8677EAC voice_square_1 0, 2, 0, 0, 15, 0 @ 8677EB8 @@ -831,7 +831,7 @@ voicegroup013:: @ 8677FF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678200 voice_square_1 0, 2, 0, 0, 15, 0 @ 867820C voice_square_1 0, 2, 0, 0, 15, 0 @ 8678218 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 8678224 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 8678224 voice_keysplit voicegroup006, KeySplitTable2 @ 8678230 voice_square_1 0, 2, 0, 0, 15, 0 @ 867823C voice_square_1 0, 2, 0, 0, 15, 0 @ 8678248 @@ -901,7 +901,7 @@ voicegroup014:: @ 8678428 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678524 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678530 voice_square_1 0, 2, 0, 0, 15, 0 @ 867853C - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 149 @ 8678548 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 149 @ 8678548 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678554 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678560 voice_square_1 0, 2, 0, 0, 15, 0 @ 867856C @@ -923,8 +923,8 @@ voicegroup014:: @ 8678428 voice_square_1 0, 2, 0, 0, 15, 0 @ 867862C voice_square_1 0, 2, 0, 0, 15, 0 @ 8678638 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678644 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 246, 0, 235 @ 8678650 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 867865C + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 246, 0, 235 @ 8678650 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 867865C voice_keysplit voicegroup006, KeySplitTable2 @ 8678668 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678674 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678680 @@ -950,7 +950,7 @@ voicegroup014:: @ 8678428 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678770 voice_square_1 0, 2, 0, 0, 15, 0 @ 867877C voice_square_1 0, 2, 0, 0, 15, 0 @ 8678788 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 8678794 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 8678794 voice_square_1 0, 2, 0, 0, 15, 0 @ 86787A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86787AC voice_square_1 0, 2, 0, 0, 15, 0 @ 86787B8 @@ -1000,7 +1000,7 @@ voicegroup015:: @ 8678824 voice_square_1 0, 2, 0, 0, 15, 0 @ 86789A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86789B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86789BC - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 149 @ 86789C8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 149 @ 86789C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86789D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86789E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86789EC @@ -1021,7 +1021,7 @@ voicegroup015:: @ 8678824 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678AA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678AAC voice_square_1 0, 2, 0, 0, 15, 0 @ 8678AB8 - voice_directsound 60, 0, DirectSoundWaveData_87410E0, 255, 0, 255, 165 @ 8678AC4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 255, 0, 255, 165 @ 8678AC4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678AD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678ADC voice_square_1 0, 2, 0, 0, 15, 0 @ 8678AE8 @@ -1038,7 +1038,7 @@ voicegroup015:: @ 8678824 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678B6C voice_square_1 0, 2, 0, 0, 15, 0 @ 8678B78 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678B84 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 8678B90 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 8678B90 voice_programmable_wave ProgrammableWaveData_86B4830, 0, 7, 15, 1 @ 8678B9C voice_square_1 0, 2, 0, 0, 15, 0 @ 8678BA8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678BB4 @@ -1096,11 +1096,11 @@ voicegroup016:: @ 8678C74 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678E00 voice_noise_alt 0, 0, 2, 0, 2 @ 8678E0C voice_noise_alt 0, 0, 1, 0, 1 @ 8678E18 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_86C566C, 255, 0, 255, 242 @ 8678E24 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_kick, 255, 0, 255, 242 @ 8678E24 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678E30 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_86C5B0C, 255, 0, 255, 242 @ 8678E3C + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare1, 255, 0, 255, 242 @ 8678E3C voice_square_1 0, 2, 0, 0, 15, 0 @ 8678E48 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_86C6A90, 255, 0, 255, 242 @ 8678E54 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 8678E54 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678E60 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678E6C voice_square_1 0, 2, 0, 0, 15, 0 @ 8678E78 @@ -1114,7 +1114,7 @@ voicegroup016:: @ 8678C74 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678ED8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678EE4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678EF0 - voice_directsound_no_resample 32, 74, DirectSoundWaveData_86CA520, 255, 127, 77, 204 @ 8678EFC + voice_directsound_no_resample 32, 74, DirectSoundWaveData_unknown_tambourine, 255, 127, 77, 204 @ 8678EFC voice_square_1 0, 2, 0, 0, 15, 0 @ 8678F08 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678F14 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678F20 @@ -1122,9 +1122,9 @@ voicegroup016:: @ 8678C74 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678F38 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678F44 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678F50 - voice_directsound_no_resample 72, 66, DirectSoundWaveData_86CC5E4, 255, 0, 255, 0 @ 8678F5C + voice_directsound_no_resample 72, 66, DirectSoundWaveData_sc88_bongo, 255, 0, 255, 0 @ 8678F5C voice_square_1 0, 2, 0, 0, 15, 0 @ 8678F68 - voice_directsound_no_resample 72, 62, DirectSoundWaveData_86CCAFC, 255, 0, 255, 0 @ 8678F74 + voice_directsound_no_resample 72, 62, DirectSoundWaveData_sc88_bongo_low, 255, 0, 255, 0 @ 8678F74 .align 2 voicegroup017:: @ 8678F80 @@ -1173,8 +1173,8 @@ voicegroup017:: @ 8678F80 voice_square_1 0, 2, 0, 0, 15, 0 @ 8679178 voice_square_1 0, 2, 0, 0, 15, 0 @ 8679184 voice_square_1 0, 2, 0, 0, 15, 0 @ 8679190 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 216, 0, 165 @ 867919C - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 0, 204 @ 86791A8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 216, 0, 165 @ 867919C + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 0, 204 @ 86791A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86791B4 voice_keysplit voicegroup006, KeySplitTable2 @ 86791C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86791CC @@ -1201,7 +1201,7 @@ voicegroup017:: @ 8678F80 voice_square_1 0, 2, 0, 0, 15, 0 @ 86792C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86792D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86792E0 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 86792EC + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 86792EC voice_programmable_wave ProgrammableWaveData_86B4830, 0, 7, 15, 0 @ 86792F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8679304 voice_square_1 0, 2, 0, 0, 15, 0 @ 8679310 @@ -1267,7 +1267,7 @@ voicegroup018:: @ 86793C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86795BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86795C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86795D4 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 216, 0, 165 @ 86795E0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 216, 0, 165 @ 86795E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86795EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86795F8 voice_keysplit voicegroup006, KeySplitTable2 @ 8679604 @@ -1295,7 +1295,7 @@ voicegroup018:: @ 86793C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867970C voice_square_1 0, 2, 0, 0, 15, 0 @ 8679718 voice_square_1 0, 2, 0, 0, 15, 0 @ 8679724 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 8679730 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 8679730 voice_square_1 0, 2, 0, 0, 15, 0 @ 867973C voice_square_1 0, 2, 0, 0, 15, 0 @ 8679748 voice_square_1 0, 2, 0, 0, 15, 0 @ 8679754 @@ -1398,7 +1398,7 @@ voicegroup019:: @ 86799C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8679BBC voice_square_1 0, 2, 0, 0, 15, 0 @ 8679BC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8679BD4 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 216, 0, 165 @ 8679BE0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 216, 0, 165 @ 8679BE0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8679BEC voice_square_1 0, 2, 0, 0, 15, 0 @ 8679BF8 voice_keysplit voicegroup006, KeySplitTable2 @ 8679C04 @@ -1426,7 +1426,7 @@ voicegroup019:: @ 86799C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8679D0C voice_square_1 0, 2, 0, 0, 15, 0 @ 8679D18 voice_square_1 0, 2, 0, 0, 15, 0 @ 8679D24 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 8679D30 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 8679D30 voice_square_1 0, 2, 0, 0, 15, 0 @ 8679D3C voice_square_1 0, 2, 0, 0, 15, 0 @ 8679D48 voice_square_1 0, 2, 0, 0, 15, 0 @ 8679D54 @@ -1486,7 +1486,7 @@ voicegroup020:: @ 8679DC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8679FB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8679FC4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8679FD0 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 216, 0, 165 @ 8679FDC + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 216, 0, 165 @ 8679FDC voice_square_1 0, 2, 0, 0, 15, 0 @ 8679FE8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8679FF4 voice_keysplit voicegroup006, KeySplitTable2 @ 867A000 @@ -1578,7 +1578,7 @@ voicegroup021:: @ 867A1D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A3E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A3F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A3FC - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 867A408 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 867A408 voice_keysplit voicegroup006, KeySplitTable2 @ 867A414 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A420 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A42C @@ -1607,7 +1607,7 @@ voicegroup022:: @ 867A438 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A51C voice_square_1 0, 2, 0, 0, 15, 0 @ 867A528 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A534 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 867A540 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 867A540 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A54C voice_square_1 0, 2, 0, 0, 15, 0 @ 867A558 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A564 @@ -1621,11 +1621,11 @@ voicegroup022:: @ 867A438 voice_programmable_wave_alt ProgrammableWaveData_86B4870, 0, 7, 15, 0 @ 867A5C4 voice_programmable_wave_alt ProgrammableWaveData_86B4870, 0, 7, 15, 1 @ 867A5D0 voice_square_1_alt 0, 0, 0, 0, 7, 0 @ 867A5DC - voice_directsound_no_resample 60, 64, DirectSoundWaveData_86C566C, 255, 0, 255, 242 @ 867A5E8 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_kick, 255, 0, 255, 242 @ 867A5E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A5F4 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_86C5B0C, 255, 0, 255, 242 @ 867A600 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare1, 255, 0, 255, 242 @ 867A600 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A60C - voice_directsound_no_resample 60, 64, DirectSoundWaveData_86C6A90, 255, 0, 255, 242 @ 867A618 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 867A618 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A624 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A630 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A63C @@ -1639,7 +1639,7 @@ voicegroup022:: @ 867A438 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A69C voice_square_1 0, 2, 0, 0, 15, 0 @ 867A6A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A6B4 - voice_directsound_no_resample 32, 34, DirectSoundWaveData_86CA520, 255, 127, 77, 204 @ 867A6C0 + voice_directsound_no_resample 32, 34, DirectSoundWaveData_unknown_tambourine, 255, 127, 77, 204 @ 867A6C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A6CC voice_square_1 0, 2, 0, 0, 15, 0 @ 867A6D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A6E4 @@ -1647,9 +1647,9 @@ voicegroup022:: @ 867A438 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A6FC voice_square_1 0, 2, 0, 0, 15, 0 @ 867A708 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A714 - voice_directsound_no_resample 72, 67, DirectSoundWaveData_86CC5E4, 255, 0, 255, 0 @ 867A720 + voice_directsound_no_resample 72, 67, DirectSoundWaveData_sc88_bongo, 255, 0, 255, 0 @ 867A720 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A72C - voice_directsound_no_resample 72, 61, DirectSoundWaveData_86CCAFC, 255, 0, 255, 0 @ 867A738 + voice_directsound_no_resample 72, 61, DirectSoundWaveData_sc88_bongo_low, 255, 0, 255, 0 @ 867A738 .align 2 voicegroup023:: @ 867A744 @@ -1688,7 +1688,7 @@ voicegroup023:: @ 867A744 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A8C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A8D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A8DC - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 149 @ 867A8E8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 149 @ 867A8E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A8F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A900 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A90C @@ -1699,7 +1699,7 @@ voicegroup023:: @ 867A744 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A948 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A954 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A960 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 246, 0, 235 @ 867A96C + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 246, 0, 235 @ 867A96C voice_square_1 0, 2, 0, 0, 15, 0 @ 867A978 voice_keysplit voicegroup006, KeySplitTable2 @ 867A984 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A990 @@ -1790,9 +1790,9 @@ voicegroup024:: @ 867AB70 voice_square_1 0, 2, 0, 0, 15, 0 @ 867AD68 voice_square_1 0, 2, 0, 0, 15, 0 @ 867AD74 voice_square_1 0, 2, 0, 0, 15, 0 @ 867AD80 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 216, 0, 165 @ 867AD8C + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 216, 0, 165 @ 867AD8C voice_square_1 0, 2, 0, 0, 15, 0 @ 867AD98 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 867ADA4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 867ADA4 voice_keysplit voicegroup006, KeySplitTable2 @ 867ADB0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867ADBC voice_square_1 0, 2, 0, 0, 15, 0 @ 867ADC8 @@ -1818,7 +1818,7 @@ voicegroup024:: @ 867AB70 voice_square_1 0, 2, 0, 0, 15, 0 @ 867AEB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867AEC4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867AED0 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 867AEDC + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 867AEDC voice_square_1 0, 2, 0, 0, 15, 0 @ 867AEE8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867AEF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867AF00 @@ -1886,7 +1886,7 @@ voicegroup025:: @ 867AFB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B1C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B1D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B1DC - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 867B1E8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 867B1E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B1F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B200 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B20C @@ -1912,7 +1912,7 @@ voicegroup025:: @ 867AFB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B2FC voice_square_1 0, 2, 0, 0, 15, 0 @ 867B308 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B314 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 867B320 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 867B320 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B32C voice_square_1 0, 2, 0, 0, 15, 0 @ 867B338 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B344 @@ -1973,7 +1973,7 @@ voicegroup026:: @ 867B3A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B5B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B5C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B5CC - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 867B5D8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 867B5D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B5E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B5F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B5FC @@ -2027,7 +2027,7 @@ voicegroup027:: @ 867B7A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B818 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B824 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B830 - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 867B83C + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 867B83C voice_square_1 0, 2, 0, 0, 15, 0 @ 867B848 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B854 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B860 @@ -2052,7 +2052,7 @@ voicegroup027:: @ 867B7A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B944 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B950 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B95C - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 867B968 + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 867B968 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B974 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B980 voice_square_1 0, 2, 0, 0, 15, 0 @ 867B98C @@ -2162,7 +2162,7 @@ voicegroup028:: @ 867BDA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867BE48 voice_square_1 0, 2, 0, 0, 15, 0 @ 867BE54 voice_square_1 0, 2, 0, 0, 15, 0 @ 867BE60 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 127 @ 867BE6C + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 127 @ 867BE6C voice_square_1 0, 2, 0, 0, 15, 0 @ 867BE78 voice_square_1 0, 2, 0, 0, 15, 0 @ 867BE84 voice_square_1 0, 2, 0, 0, 15, 0 @ 867BE90 @@ -2181,7 +2181,7 @@ voicegroup028:: @ 867BDA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867BF2C voice_square_1 0, 2, 0, 0, 15, 0 @ 867BF38 voice_square_1 0, 2, 0, 0, 15, 0 @ 867BF44 - voice_directsound 60, 0, DirectSoundWaveData_86B776C, 255, 235, 128, 99 @ 867BF50 + voice_directsound 60, 0, DirectSoundWaveData_jv1080_slap_bass, 255, 235, 128, 99 @ 867BF50 voice_square_1 0, 2, 0, 0, 15, 0 @ 867BF5C voice_square_1 0, 2, 0, 0, 15, 0 @ 867BF68 voice_square_1 0, 2, 0, 0, 15, 0 @ 867BF74 @@ -2245,7 +2245,7 @@ voicegroup029:: @ 867C184 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C208 voice_square_2_alt 2, 0, 2, 0, 0 @ 867C214 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C220 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 216, 90, 242 @ 867C22C + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 216, 90, 242 @ 867C22C voice_square_1 0, 2, 0, 0, 15, 0 @ 867C238 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C244 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C250 @@ -2276,9 +2276,9 @@ voicegroup029:: @ 867C184 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C37C voice_square_1 0, 2, 0, 0, 15, 0 @ 867C388 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C394 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 216, 0, 165 @ 867C3A0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 216, 0, 165 @ 867C3A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C3AC - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 867C3B8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 867C3B8 voice_keysplit voicegroup006, KeySplitTable2 @ 867C3C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C3D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C3DC @@ -2304,7 +2304,7 @@ voicegroup029:: @ 867C184 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C4CC voice_square_1 0, 2, 0, 0, 15, 0 @ 867C4D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C4E4 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 867C4F0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 867C4F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C4FC voice_square_1 0, 2, 0, 0, 15, 0 @ 867C508 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C514 @@ -2336,10 +2336,10 @@ voicegroup030:: @ 867C5A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C628 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C634 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C640 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 216, 90, 242 @ 867C64C + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 216, 90, 242 @ 867C64C voice_square_1 0, 2, 0, 0, 15, 0 @ 867C658 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C664 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 37, 165, 180, 127 @ 867C670 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 37, 165, 180, 127 @ 867C670 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C67C voice_square_1 0, 2, 0, 0, 15, 0 @ 867C688 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C694 @@ -2368,8 +2368,8 @@ voicegroup030:: @ 867C5A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C7A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C7B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C7C0 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 246, 0, 235 @ 867C7CC - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 867C7D8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 246, 0, 235 @ 867C7CC + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 867C7D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C7E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C7F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C7FC @@ -2415,12 +2415,12 @@ voicegroup031:: @ 867C838 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C9B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C9C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C9D0 - voice_directsound 60, 0, DirectSoundWaveData_873A594, 255, 165, 154, 127 @ 867C9DC + voice_directsound 60, 0, DirectSoundWaveData_unknown_polysynth, 255, 165, 154, 127 @ 867C9DC voice_square_1 0, 2, 0, 0, 15, 0 @ 867C9E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C9F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CA00 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CA0C - voice_directsound_no_resample 60, 64, DirectSoundWaveData_86C6A90, 255, 0, 255, 242 @ 867CA18 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 867CA18 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CA24 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CA30 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CA3C @@ -2434,17 +2434,17 @@ voicegroup031:: @ 867C838 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CA9C voice_square_1 0, 2, 0, 0, 15, 0 @ 867CAA8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CAB4 - voice_directsound_no_resample 32, 49, DirectSoundWaveData_86CA520, 255, 127, 77, 204 @ 867CAC0 + voice_directsound_no_resample 32, 49, DirectSoundWaveData_unknown_tambourine, 255, 127, 77, 204 @ 867CAC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CACC voice_square_1 0, 2, 0, 0, 15, 0 @ 867CAD8 - voice_directsound_no_resample 30, 54, DirectSoundWaveData_86CB6B8, 8, 0, 255, 216 @ 867CAE4 + voice_directsound_no_resample 30, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 8, 0, 255, 216 @ 867CAE4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CAF0 - voice_directsound_no_resample 30, 54, DirectSoundWaveData_86CB6B8, 255, 246, 0, 216 @ 867CAFC + voice_directsound_no_resample 30, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 246, 0, 216 @ 867CAFC voice_square_1 0, 2, 0, 0, 15, 0 @ 867CB08 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CB14 - voice_directsound_no_resample 72, 79, DirectSoundWaveData_86CC5E4, 255, 0, 255, 0 @ 867CB20 + voice_directsound_no_resample 72, 79, DirectSoundWaveData_sc88_bongo, 255, 0, 255, 0 @ 867CB20 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CB2C - voice_directsound_no_resample 72, 74, DirectSoundWaveData_86CCAFC, 255, 0, 255, 0 @ 867CB38 + voice_directsound_no_resample 72, 74, DirectSoundWaveData_sc88_bongo_low, 255, 0, 255, 0 @ 867CB38 .align 2 voicegroup032:: @ 867CB44 @@ -2483,7 +2483,7 @@ voicegroup032:: @ 867CB44 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CCC4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CCD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CCDC - voice_directsound 60, 0, DirectSoundWaveData_86FFDC0, 255, 250, 0, 149 @ 867CCE8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pick_bass, 255, 250, 0, 149 @ 867CCE8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CCF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CD00 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CD0C @@ -2521,7 +2521,7 @@ voicegroup032:: @ 867CB44 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CE8C voice_square_1 0, 2, 0, 0, 15, 0 @ 867CE98 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CEA4 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 867CEB0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 867CEB0 voice_programmable_wave ProgrammableWaveData_86B4830, 0, 7, 15, 1 @ 867CEBC voice_square_1 0, 2, 0, 0, 15, 0 @ 867CEC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CED4 @@ -2614,7 +2614,7 @@ voicegroup033:: @ 867D144 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D2C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D2D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D2DC - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 149 @ 867D2E8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 149 @ 867D2E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D2F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D300 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D30C @@ -2625,7 +2625,7 @@ voicegroup033:: @ 867D144 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D348 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D354 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D360 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 246, 0, 235 @ 867D36C + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 246, 0, 235 @ 867D36C voice_square_1 0, 2, 0, 0, 15, 0 @ 867D378 voice_keysplit voicegroup006, KeySplitTable2 @ 867D384 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D390 @@ -2652,7 +2652,7 @@ voicegroup033:: @ 867D144 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D48C voice_square_1 0, 2, 0, 0, 15, 0 @ 867D498 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D4A4 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 867D4B0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 867D4B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D4BC voice_square_1 0, 2, 0, 0, 15, 0 @ 867D4C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D4D4 @@ -2700,7 +2700,7 @@ voicegroup034:: @ 867D528 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D6A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D6B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D6C0 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 867D6CC + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 867D6CC voice_square_1 0, 2, 0, 0, 15, 0 @ 867D6D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D6E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D6F0 @@ -2710,7 +2710,7 @@ voicegroup034:: @ 867D528 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D720 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D72C voice_square_1 0, 2, 0, 0, 15, 0 @ 867D738 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 226, 0, 38 @ 867D744 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 226, 0, 38 @ 867D744 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D750 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D75C voice_keysplit voicegroup006, KeySplitTable2 @ 867D768 @@ -2738,7 +2738,7 @@ voicegroup034:: @ 867D528 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D870 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D87C voice_square_1 0, 2, 0, 0, 15, 0 @ 867D888 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 867D894 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 867D894 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D8A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867D8AC voice_square_1 0, 2, 0, 0, 15, 0 @ 867D8B8 @@ -2799,7 +2799,7 @@ voicegroup035:: @ 867D918 voice_square_1 0, 2, 0, 0, 15, 0 @ 867DB28 voice_square_1 0, 2, 0, 0, 15, 0 @ 867DB34 voice_square_1 0, 2, 0, 0, 15, 0 @ 867DB40 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 867DB4C + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 867DB4C voice_keysplit voicegroup006, KeySplitTable2 @ 867DB58 voice_square_1 0, 2, 0, 0, 15, 0 @ 867DB64 voice_square_1 0, 2, 0, 0, 15, 0 @ 867DB70 @@ -2873,7 +2873,7 @@ voicegroup036:: @ 867DD14 voice_square_1 0, 2, 0, 0, 15, 0 @ 867DE7C voice_square_1 0, 2, 0, 0, 15, 0 @ 867DE88 voice_square_1 0, 2, 0, 0, 15, 0 @ 867DE94 - voice_directsound 60, 0, DirectSoundWaveData_86FFDC0, 255, 253, 0, 149 @ 867DEA0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pick_bass, 255, 253, 0, 149 @ 867DEA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867DEAC voice_square_1 0, 2, 0, 0, 15, 0 @ 867DEB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867DEC4 @@ -2885,8 +2885,8 @@ voicegroup036:: @ 867DD14 voice_square_1 0, 2, 0, 0, 15, 0 @ 867DF0C voice_square_1 0, 2, 0, 0, 15, 0 @ 867DF18 voice_square_1 0, 2, 0, 0, 15, 0 @ 867DF24 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 216, 0, 165 @ 867DF30 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 246, 0, 235 @ 867DF3C + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 216, 0, 165 @ 867DF30 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 246, 0, 235 @ 867DF3C voice_square_1 0, 2, 0, 0, 15, 0 @ 867DF48 voice_keysplit voicegroup006, KeySplitTable2 @ 867DF54 voice_square_1 0, 2, 0, 0, 15, 0 @ 867DF60 @@ -2985,7 +2985,7 @@ voicegroup037:: @ 867E314 voice_square_1 0, 2, 0, 0, 15, 0 @ 867E398 voice_square_1 0, 2, 0, 0, 15, 0 @ 867E3A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867E3B0 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 216, 90, 242 @ 867E3BC + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 216, 90, 242 @ 867E3BC voice_square_1 0, 2, 0, 0, 15, 0 @ 867E3C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867E3D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867E3E0 @@ -3017,8 +3017,8 @@ voicegroup037:: @ 867E314 voice_square_1 0, 2, 0, 0, 15, 0 @ 867E518 voice_square_1 0, 2, 0, 0, 15, 0 @ 867E524 voice_square_1 0, 2, 0, 0, 15, 0 @ 867E530 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 246, 0, 235 @ 867E53C - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 867E548 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 246, 0, 235 @ 867E53C + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 867E548 voice_keysplit voicegroup006, KeySplitTable2 @ 867E554 voice_square_1 0, 2, 0, 0, 15, 0 @ 867E560 voice_square_1 0, 2, 0, 0, 15, 0 @ 867E56C @@ -3080,7 +3080,7 @@ voicegroup038:: @ 867E740 voice_square_1 0, 2, 0, 0, 15, 0 @ 867E7E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867E7F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867E800 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 127 @ 867E80C + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 127 @ 867E80C voice_square_1 0, 2, 0, 0, 15, 0 @ 867E818 voice_square_1 0, 2, 0, 0, 15, 0 @ 867E824 voice_square_1 0, 2, 0, 0, 15, 0 @ 867E830 @@ -3101,7 +3101,7 @@ voicegroup038:: @ 867E740 voice_square_1 0, 2, 0, 0, 15, 0 @ 867E8E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867E8F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867E8FC - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 867E908 + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 867E908 voice_square_1 0, 2, 0, 0, 15, 0 @ 867E914 voice_square_1 0, 2, 0, 0, 15, 0 @ 867E920 voice_square_1 0, 2, 0, 0, 15, 0 @ 867E92C @@ -3165,14 +3165,14 @@ voicegroup039:: @ 867EB18 voice_square_1 0, 2, 0, 0, 15, 0 @ 867EBC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867EBCC voice_square_1 0, 2, 0, 0, 15, 0 @ 867EBD8 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 165 @ 867EBE4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 165 @ 867EBE4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867EBF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867EBFC voice_square_1 0, 2, 0, 0, 15, 0 @ 867EC08 voice_square_1 0, 2, 0, 0, 15, 0 @ 867EC14 voice_square_1 0, 2, 0, 0, 15, 0 @ 867EC20 voice_square_1 0, 2, 0, 0, 15, 0 @ 867EC2C - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 867EC38 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 867EC38 voice_square_1 0, 2, 0, 0, 15, 0 @ 867EC44 voice_square_1 0, 2, 0, 0, 15, 0 @ 867EC50 voice_square_1 0, 2, 0, 0, 15, 0 @ 867EC5C @@ -3184,7 +3184,7 @@ voicegroup039:: @ 867EB18 voice_square_1 0, 2, 0, 0, 15, 0 @ 867ECA4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867ECB0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867ECBC - voice_directsound 60, 0, DirectSoundWaveData_86B776C, 255, 235, 128, 99 @ 867ECC8 + voice_directsound 60, 0, DirectSoundWaveData_jv1080_slap_bass, 255, 235, 128, 99 @ 867ECC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867ECD4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867ECE0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867ECEC @@ -3221,7 +3221,7 @@ voicegroup039:: @ 867EB18 voice_square_1 0, 2, 0, 0, 15, 0 @ 867EE60 voice_square_1 0, 2, 0, 0, 15, 0 @ 867EE6C voice_square_1 0, 2, 0, 0, 15, 0 @ 867EE78 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 867EE84 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 867EE84 voice_square_1 0, 2, 0, 0, 15, 0 @ 867EE90 voice_square_1 0, 2, 0, 0, 15, 0 @ 867EE9C voice_square_1 0, 2, 0, 0, 15, 0 @ 867EEA8 @@ -3296,14 +3296,14 @@ voicegroup040:: @ 867F118 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F1C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F1CC voice_square_1 0, 2, 0, 0, 15, 0 @ 867F1D8 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 165 @ 867F1E4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 165 @ 867F1E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F1F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F1FC voice_square_1 0, 2, 0, 0, 15, 0 @ 867F208 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F214 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F220 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F22C - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 867F238 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 867F238 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F244 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F250 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F25C @@ -3315,7 +3315,7 @@ voicegroup040:: @ 867F118 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F2A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F2B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F2BC - voice_directsound 60, 0, DirectSoundWaveData_86B776C, 255, 235, 128, 99 @ 867F2C8 + voice_directsound 60, 0, DirectSoundWaveData_jv1080_slap_bass, 255, 235, 128, 99 @ 867F2C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F2D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F2E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F2EC @@ -3352,7 +3352,7 @@ voicegroup040:: @ 867F118 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F460 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F46C voice_square_1 0, 2, 0, 0, 15, 0 @ 867F478 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 867F484 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 867F484 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F490 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F49C voice_square_1 0, 2, 0, 0, 15, 0 @ 867F4A8 @@ -3427,14 +3427,14 @@ voicegroup041:: @ 867F718 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F7C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F7CC voice_square_1 0, 2, 0, 0, 15, 0 @ 867F7D8 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 165 @ 867F7E4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 165 @ 867F7E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F7F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F7FC voice_square_1 0, 2, 0, 0, 15, 0 @ 867F808 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F814 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F820 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F82C - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 867F838 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 867F838 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F844 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F850 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F85C @@ -3446,7 +3446,7 @@ voicegroup041:: @ 867F718 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F8A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F8B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F8BC - voice_directsound 60, 0, DirectSoundWaveData_86B776C, 255, 235, 128, 99 @ 867F8C8 + voice_directsound 60, 0, DirectSoundWaveData_jv1080_slap_bass, 255, 235, 128, 99 @ 867F8C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F8D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F8E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867F8EC @@ -3483,7 +3483,7 @@ voicegroup041:: @ 867F718 voice_square_1 0, 2, 0, 0, 15, 0 @ 867FA60 voice_square_1 0, 2, 0, 0, 15, 0 @ 867FA6C voice_square_1 0, 2, 0, 0, 15, 0 @ 867FA78 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 867FA84 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 867FA84 voice_square_1 0, 2, 0, 0, 15, 0 @ 867FA90 voice_square_1 0, 2, 0, 0, 15, 0 @ 867FA9C voice_square_1 0, 2, 0, 0, 15, 0 @ 867FAA8 @@ -3558,14 +3558,14 @@ voicegroup042:: @ 867FD18 voice_square_1 0, 2, 0, 0, 15, 0 @ 867FDC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867FDCC voice_square_1 0, 2, 0, 0, 15, 0 @ 867FDD8 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 165 @ 867FDE4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 165 @ 867FDE4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867FDF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867FDFC voice_square_1 0, 2, 0, 0, 15, 0 @ 867FE08 voice_square_1 0, 2, 0, 0, 15, 0 @ 867FE14 voice_square_1 0, 2, 0, 0, 15, 0 @ 867FE20 voice_square_1 0, 2, 0, 0, 15, 0 @ 867FE2C - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 867FE38 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 867FE38 voice_square_1 0, 2, 0, 0, 15, 0 @ 867FE44 voice_square_1 0, 2, 0, 0, 15, 0 @ 867FE50 voice_square_1 0, 2, 0, 0, 15, 0 @ 867FE5C @@ -3577,7 +3577,7 @@ voicegroup042:: @ 867FD18 voice_square_1 0, 2, 0, 0, 15, 0 @ 867FEA4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867FEB0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867FEBC - voice_directsound 60, 0, DirectSoundWaveData_86B776C, 255, 235, 128, 99 @ 867FEC8 + voice_directsound 60, 0, DirectSoundWaveData_jv1080_slap_bass, 255, 235, 128, 99 @ 867FEC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867FED4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867FEE0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867FEEC @@ -3614,7 +3614,7 @@ voicegroup042:: @ 867FD18 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680060 voice_square_1 0, 2, 0, 0, 15, 0 @ 868006C voice_square_1 0, 2, 0, 0, 15, 0 @ 8680078 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 8680084 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 8680084 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680090 voice_square_1 0, 2, 0, 0, 15, 0 @ 868009C voice_square_1 0, 2, 0, 0, 15, 0 @ 86800A8 @@ -3704,7 +3704,7 @@ voicegroup043:: @ 8680318 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680474 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680480 voice_square_1 0, 2, 0, 0, 15, 0 @ 868048C - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 149 @ 8680498 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 149 @ 8680498 voice_square_1 0, 2, 0, 0, 15, 0 @ 86804A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86804B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86804BC @@ -3745,7 +3745,7 @@ voicegroup043:: @ 8680318 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680660 voice_square_1 0, 2, 0, 0, 15, 0 @ 868066C voice_square_1 0, 2, 0, 0, 15, 0 @ 8680678 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 8680684 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 8680684 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680690 voice_square_1 0, 2, 0, 0, 15, 0 @ 868069C voice_square_1 0, 2, 0, 0, 15, 0 @ 86806A8 @@ -3791,7 +3791,7 @@ voicegroup044:: @ 86806E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680864 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680870 voice_square_1 0, 2, 0, 0, 15, 0 @ 868087C - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 224 @ 8680888 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 224 @ 8680888 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680894 voice_square_1 0, 2, 0, 0, 15, 0 @ 86808A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86808AC @@ -3801,7 +3801,7 @@ voicegroup044:: @ 86806E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86808DC voice_square_1 0, 2, 0, 0, 15, 0 @ 86808E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86808F4 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 226, 0, 38 @ 8680900 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 226, 0, 38 @ 8680900 voice_square_1 0, 2, 0, 0, 15, 0 @ 868090C voice_square_1 0, 2, 0, 0, 15, 0 @ 8680918 voice_keysplit voicegroup006, KeySplitTable2 @ 8680924 @@ -3829,7 +3829,7 @@ voicegroup044:: @ 86806E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680A2C voice_square_1 0, 2, 0, 0, 15, 0 @ 8680A38 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680A44 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 8680A50 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 8680A50 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680A5C voice_square_1 0, 2, 0, 0, 15, 0 @ 8680A68 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680A74 @@ -3857,7 +3857,7 @@ voicegroup045:: @ 8680AB0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680B58 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680B64 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680B70 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 210 @ 8680B7C + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 210 @ 8680B7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8680B88 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680B94 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680BA0 @@ -3878,7 +3878,7 @@ voicegroup045:: @ 8680AB0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680C54 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680C60 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680C6C - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 216 @ 8680C78 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 216 @ 8680C78 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680C84 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680C90 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680C9C @@ -3913,7 +3913,7 @@ voicegroup045:: @ 8680AB0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680DF8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680E04 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680E10 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 8680E1C + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 8680E1C voice_square_1 0, 2, 0, 0, 15, 0 @ 8680E28 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680E34 voice_square_1 0, 2, 0, 0, 15, 0 @ 8680E40 @@ -3976,7 +3976,7 @@ voicegroup046:: @ 86810B0 voice_square_1_alt 0, 0, 1, 1, 9, 0 @ 86810C8 voice_square_2_alt 2, 0, 2, 6, 3 @ 86810D4 voice_programmable_wave_alt ProgrammableWaveData_86B4850, 0, 7, 15, 1 @ 86810E0 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 216 @ 86810EC + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 216 @ 86810EC voice_square_2_alt 1, 0, 2, 6, 3 @ 86810F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8681104 voice_square_1 0, 2, 0, 0, 15, 0 @ 8681110 @@ -4016,7 +4016,7 @@ voicegroup046:: @ 86810B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86812A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86812B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86812C0 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 226, 0, 165 @ 86812CC + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 226, 0, 165 @ 86812CC voice_square_1 0, 2, 0, 0, 15, 0 @ 86812D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86812E4 voice_keysplit voicegroup006, KeySplitTable2 @ 86812F0 @@ -4044,7 +4044,7 @@ voicegroup046:: @ 86810B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86813F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8681404 voice_square_1 0, 2, 0, 0, 15, 0 @ 8681410 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 868141C + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 868141C voice_square_1 0, 2, 0, 0, 15, 0 @ 8681428 voice_square_1 0, 2, 0, 0, 15, 0 @ 8681434 voice_square_1 0, 2, 0, 0, 15, 0 @ 8681440 @@ -4140,7 +4140,7 @@ voicegroup047:: @ 86816B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8681854 voice_square_1 0, 2, 0, 0, 15, 0 @ 8681860 voice_square_1 0, 2, 0, 0, 15, 0 @ 868186C - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 8681878 + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 8681878 voice_square_1 0, 2, 0, 0, 15, 0 @ 8681884 voice_square_1 0, 2, 0, 0, 15, 0 @ 8681890 voice_square_1 0, 2, 0, 0, 15, 0 @ 868189C @@ -4148,8 +4148,8 @@ voicegroup047:: @ 86816B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86818B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86818C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86818CC - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 0, 204 @ 86818D8 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 204, 193, 239 @ 86818E4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 0, 204 @ 86818D8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 204, 193, 239 @ 86818E4 voice_keysplit voicegroup006, KeySplitTable2 @ 86818F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86818FC voice_square_1 0, 2, 0, 0, 15, 0 @ 8681908 @@ -4242,7 +4242,7 @@ voicegroup048:: @ 8681CB0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8681CF8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8681D04 voice_square_1 0, 2, 0, 0, 15, 0 @ 8681D10 - voice_directsound 60, 0, DirectSoundWaveData_86B5D04, 255, 204, 51, 242 @ 8681D1C + voice_directsound 60, 0, DirectSoundWaveData_sc88_glockenspiel, 255, 204, 51, 242 @ 8681D1C voice_square_1 0, 2, 0, 0, 15, 0 @ 8681D28 voice_square_1 0, 2, 0, 0, 15, 0 @ 8681D34 voice_square_1 0, 2, 0, 0, 15, 0 @ 8681D40 @@ -4279,8 +4279,8 @@ voicegroup048:: @ 8681CB0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8681EB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8681EC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8681ECC - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 0, 242 @ 8681ED8 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 193, 239 @ 8681EE4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 0, 242 @ 8681ED8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 193, 239 @ 8681EE4 voice_keysplit voicegroup006, KeySplitTable2 @ 8681EF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8681EFC voice_square_1 0, 2, 0, 0, 15, 0 @ 8681F08 @@ -4333,7 +4333,7 @@ voicegroup049:: @ 86820D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682118 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682124 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682130 - voice_directsound 60, 0, DirectSoundWaveData_86B5D04, 255, 165, 51, 242 @ 868213C + voice_directsound 60, 0, DirectSoundWaveData_sc88_glockenspiel, 255, 165, 51, 242 @ 868213C voice_square_1 0, 2, 0, 0, 15, 0 @ 8682148 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682154 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682160 @@ -4359,7 +4359,7 @@ voicegroup049:: @ 86820D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682250 voice_square_1 0, 2, 0, 0, 15, 0 @ 868225C voice_square_1 0, 2, 0, 0, 15, 0 @ 8682268 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 8682274 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 8682274 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682280 voice_square_1 0, 2, 0, 0, 15, 0 @ 868228C voice_square_1 0, 2, 0, 0, 15, 0 @ 8682298 @@ -4369,9 +4369,9 @@ voicegroup049:: @ 86820D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86822C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86822D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86822E0 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 226, 0, 38 @ 86822EC - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 0, 242 @ 86822F8 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 193, 226 @ 8682304 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 226, 0, 38 @ 86822EC + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 0, 242 @ 86822F8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 193, 226 @ 8682304 voice_keysplit voicegroup006, KeySplitTable2 @ 8682310 voice_square_1 0, 2, 0, 0, 15, 0 @ 868231C voice_square_1 0, 2, 0, 0, 15, 0 @ 8682328 @@ -4397,7 +4397,7 @@ voicegroup049:: @ 86820D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682418 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682424 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682430 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 868243C + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 868243C voice_square_1 0, 2, 0, 0, 15, 0 @ 8682448 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682454 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682460 @@ -4472,7 +4472,7 @@ voicegroup050:: @ 86826D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682778 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682784 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682790 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 210 @ 868279C + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 210 @ 868279C voice_square_1 0, 2, 0, 0, 15, 0 @ 86827A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86827B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86827C0 @@ -4490,7 +4490,7 @@ voicegroup050:: @ 86826D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682850 voice_square_1 0, 2, 0, 0, 15, 0 @ 868285C voice_square_1 0, 2, 0, 0, 15, 0 @ 8682868 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 8682874 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 8682874 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682880 voice_square_1 0, 2, 0, 0, 15, 0 @ 868288C voice_square_1 0, 2, 0, 0, 15, 0 @ 8682898 @@ -4501,7 +4501,7 @@ voicegroup050:: @ 86826D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86828D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86828E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86828EC - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 0, 242 @ 86828F8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 0, 242 @ 86828F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682904 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682910 voice_square_1 0, 2, 0, 0, 15, 0 @ 868291C @@ -4621,7 +4621,7 @@ voicegroup051:: @ 8682CD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682E50 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682E5C voice_square_1 0, 2, 0, 0, 15, 0 @ 8682E68 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 8682E74 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 8682E74 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682E80 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682E8C voice_square_1 0, 2, 0, 0, 15, 0 @ 8682E98 @@ -4631,7 +4631,7 @@ voicegroup051:: @ 8682CD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682EC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682ED4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682EE0 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 226, 0, 99 @ 8682EEC + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 226, 0, 99 @ 8682EEC voice_square_1 0, 2, 0, 0, 15, 0 @ 8682EF8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8682F04 voice_keysplit voicegroup006, KeySplitTable2 @ 8682F10 @@ -4659,7 +4659,7 @@ voicegroup051:: @ 8682CD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8683018 voice_square_1 0, 2, 0, 0, 15, 0 @ 8683024 voice_square_1 0, 2, 0, 0, 15, 0 @ 8683030 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 868303C + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 868303C .align 2 voicegroup052:: @ 8683048 @@ -4710,7 +4710,7 @@ voicegroup052:: @ 8683048 voice_square_1 0, 2, 0, 0, 15, 0 @ 8683258 voice_square_1 0, 2, 0, 0, 15, 0 @ 8683264 voice_square_1 0, 2, 0, 0, 15, 0 @ 8683270 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 193, 226 @ 868327C + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 193, 226 @ 868327C voice_keysplit voicegroup006, KeySplitTable2 @ 8683288 voice_square_1 0, 2, 0, 0, 15, 0 @ 8683294 voice_square_1 0, 2, 0, 0, 15, 0 @ 86832A0 @@ -4829,7 +4829,7 @@ voicegroup053:: @ 8683648 voice_square_1 0, 2, 0, 0, 15, 0 @ 86837C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86837D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86837E0 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 86837EC + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 86837EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86837F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8683804 voice_square_1 0, 2, 0, 0, 15, 0 @ 8683810 @@ -4839,7 +4839,7 @@ voicegroup053:: @ 8683648 voice_square_1 0, 2, 0, 0, 15, 0 @ 8683840 voice_square_1 0, 2, 0, 0, 15, 0 @ 868384C voice_square_1 0, 2, 0, 0, 15, 0 @ 8683858 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 226, 0, 38 @ 8683864 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 226, 0, 38 @ 8683864 voice_square_1 0, 2, 0, 0, 15, 0 @ 8683870 voice_square_1 0, 2, 0, 0, 15, 0 @ 868387C voice_keysplit voicegroup006, KeySplitTable2 @ 8683888 @@ -4867,7 +4867,7 @@ voicegroup053:: @ 8683648 voice_square_1 0, 2, 0, 0, 15, 0 @ 8683990 voice_square_1 0, 2, 0, 0, 15, 0 @ 868399C voice_square_1 0, 2, 0, 0, 15, 0 @ 86839A8 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 86839B4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 86839B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86839C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86839CC voice_square_1 0, 2, 0, 0, 15, 0 @ 86839D8 @@ -4970,8 +4970,8 @@ voicegroup054:: @ 8683C48 voice_square_1 0, 2, 0, 0, 15, 0 @ 8683E40 voice_square_1 0, 2, 0, 0, 15, 0 @ 8683E4C voice_square_1 0, 2, 0, 0, 15, 0 @ 8683E58 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 226, 0, 38 @ 8683E64 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 0, 242 @ 8683E70 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 226, 0, 38 @ 8683E64 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 0, 242 @ 8683E70 voice_square_1 0, 2, 0, 0, 15, 0 @ 8683E7C voice_keysplit voicegroup006, KeySplitTable2 @ 8683E88 voice_square_1 0, 2, 0, 0, 15, 0 @ 8683E94 @@ -4998,7 +4998,7 @@ voicegroup054:: @ 8683C48 voice_square_1 0, 2, 0, 0, 15, 0 @ 8683F90 voice_square_1 0, 2, 0, 0, 15, 0 @ 8683F9C voice_square_1 0, 2, 0, 0, 15, 0 @ 8683FA8 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 8683FB4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 8683FB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8683FC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8683FCC voice_square_1 0, 2, 0, 0, 15, 0 @ 8683FD8 @@ -5094,7 +5094,7 @@ voicegroup055:: @ 8684248 voice_square_1 0, 2, 0, 0, 15, 0 @ 86843EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86843F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684404 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 8684410 + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 8684410 voice_square_1 0, 2, 0, 0, 15, 0 @ 868441C voice_square_1 0, 2, 0, 0, 15, 0 @ 8684428 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684434 @@ -5102,8 +5102,8 @@ voicegroup055:: @ 8684248 voice_square_1 0, 2, 0, 0, 15, 0 @ 868444C voice_square_1 0, 2, 0, 0, 15, 0 @ 8684458 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684464 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 0, 204 @ 8684470 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 204, 193, 239 @ 868447C + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 0, 204 @ 8684470 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 204, 193, 239 @ 868447C voice_keysplit voicegroup006, KeySplitTable2 @ 8684488 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684494 voice_square_1 0, 2, 0, 0, 15, 0 @ 86844A0 @@ -5225,7 +5225,7 @@ voicegroup056:: @ 8684848 voice_square_1 0, 2, 0, 0, 15, 0 @ 86849EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86849F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684A04 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 8684A10 + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 8684A10 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684A1C voice_square_1 0, 2, 0, 0, 15, 0 @ 8684A28 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684A34 @@ -5260,7 +5260,7 @@ voicegroup056:: @ 8684848 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684B90 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684B9C voice_square_1 0, 2, 0, 0, 15, 0 @ 8684BA8 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 8684BB4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 8684BB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684BC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684BCC voice_square_1 0, 2, 0, 0, 15, 0 @ 8684BD8 @@ -5327,12 +5327,12 @@ voicegroup057:: @ 8684E48 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684E90 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684E9C voice_square_1 0, 2, 0, 0, 15, 0 @ 8684EA8 - voice_directsound 60, 0, DirectSoundWaveData_86B5D04, 255, 188, 51, 242 @ 8684EB4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_glockenspiel, 255, 188, 51, 242 @ 8684EB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684EC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684ECC voice_square_1 0, 2, 0, 0, 15, 0 @ 8684ED8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684EE4 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 128, 165, 90, 216 @ 8684EF0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 128, 165, 90, 216 @ 8684EF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684EFC voice_square_1 0, 2, 0, 0, 15, 0 @ 8684F08 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684F14 @@ -5341,7 +5341,7 @@ voicegroup057:: @ 8684E48 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684F38 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684F44 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684F50 - voice_directsound 60, 0, DirectSoundWaveData_872DE98, 255, 0, 255, 127 @ 8684F5C + voice_directsound 60, 0, DirectSoundWaveData_sc88_bubbles, 255, 0, 255, 127 @ 8684F5C voice_square_1 0, 2, 0, 0, 15, 0 @ 8684F68 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684F74 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684F80 @@ -5353,7 +5353,7 @@ voicegroup057:: @ 8684E48 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684FC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684FD4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8684FE0 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 8684FEC + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 8684FEC voice_square_1 0, 2, 0, 0, 15, 0 @ 8684FF8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685004 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685010 @@ -5363,9 +5363,9 @@ voicegroup057:: @ 8684E48 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685040 voice_square_1 0, 2, 0, 0, 15, 0 @ 868504C voice_square_1 0, 2, 0, 0, 15, 0 @ 8685058 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 226, 0, 38 @ 8685064 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 0, 242 @ 8685070 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 193, 226 @ 868507C + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 226, 0, 38 @ 8685064 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 0, 242 @ 8685070 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 193, 226 @ 868507C voice_keysplit voicegroup006, KeySplitTable2 @ 8685088 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685094 voice_square_1 0, 2, 0, 0, 15, 0 @ 86850A0 @@ -5391,7 +5391,7 @@ voicegroup057:: @ 8684E48 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685190 voice_square_1 0, 2, 0, 0, 15, 0 @ 868519C voice_square_1 0, 2, 0, 0, 15, 0 @ 86851A8 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 86851B4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 86851B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86851C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86851CC voice_square_1 0, 2, 0, 0, 15, 0 @ 86851D8 @@ -5466,7 +5466,7 @@ voicegroup058:: @ 8685448 voice_square_1 0, 2, 0, 0, 15, 0 @ 86854F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86854FC voice_square_1 0, 2, 0, 0, 15, 0 @ 8685508 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 210 @ 8685514 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 210 @ 8685514 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685520 voice_square_1 0, 2, 0, 0, 15, 0 @ 868552C voice_square_1 0, 2, 0, 0, 15, 0 @ 8685538 @@ -5484,7 +5484,7 @@ voicegroup058:: @ 8685448 voice_square_1 0, 2, 0, 0, 15, 0 @ 86855C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86855D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86855E0 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 86855EC + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 86855EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86855F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685604 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685610 @@ -5589,12 +5589,12 @@ voicegroup059:: @ 8685A48 voice_programmable_wave_alt ProgrammableWaveData_86B4870, 0, 7, 15, 0 @ 8685A90 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685A9C voice_square_1 0, 2, 0, 0, 15, 0 @ 8685AA8 - voice_directsound 60, 0, DirectSoundWaveData_86B5D04, 255, 165, 51, 242 @ 8685AB4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_glockenspiel, 255, 165, 51, 242 @ 8685AB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685AC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685ACC voice_square_1 0, 2, 0, 0, 15, 0 @ 8685AD8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685AE4 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 8685AF0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 8685AF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685AFC voice_square_1 0, 2, 0, 0, 15, 0 @ 8685B08 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685B14 @@ -5626,8 +5626,8 @@ voicegroup059:: @ 8685A48 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685C4C voice_square_1 0, 2, 0, 0, 15, 0 @ 8685C58 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685C64 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 8685C70 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 239 @ 8685C7C + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 8685C70 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 239 @ 8685C7C voice_keysplit voicegroup006, KeySplitTable2 @ 8685C88 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685C94 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685CA0 @@ -5653,7 +5653,7 @@ voicegroup059:: @ 8685A48 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685D90 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685D9C voice_square_1 0, 2, 0, 0, 15, 0 @ 8685DA8 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 8685DB4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 8685DB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685DC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685DCC voice_square_1 0, 2, 0, 0, 15, 0 @ 8685DD8 @@ -5685,7 +5685,7 @@ voicegroup060:: @ 8685E74 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685EEC voice_square_1 0, 2, 0, 0, 15, 0 @ 8685EF8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685F04 - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 8685F10 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 8685F10 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685F1C voice_square_1 0, 2, 0, 0, 15, 0 @ 8685F28 voice_square_1 0, 2, 0, 0, 15, 0 @ 8685F34 @@ -5717,9 +5717,9 @@ voicegroup060:: @ 8685E74 voice_square_1 0, 2, 0, 0, 15, 0 @ 868606C voice_square_1 0, 2, 0, 0, 15, 0 @ 8686078 voice_square_1 0, 2, 0, 0, 15, 0 @ 8686084 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 128, 226, 0, 38 @ 8686090 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 868609C - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 246 @ 86860A8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 128, 226, 0, 38 @ 8686090 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 868609C + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 246 @ 86860A8 voice_keysplit voicegroup006, KeySplitTable2 @ 86860B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86860C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86860CC @@ -5745,7 +5745,7 @@ voicegroup060:: @ 8685E74 voice_square_1 0, 2, 0, 0, 15, 0 @ 86861BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86861C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86861D4 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 86861E0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 86861E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86861EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86861F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8686204 @@ -5820,7 +5820,7 @@ voicegroup061:: @ 8686474 voice_square_1 0, 2, 0, 0, 15, 0 @ 868651C voice_square_1 0, 2, 0, 0, 15, 0 @ 8686528 voice_square_1 0, 2, 0, 0, 15, 0 @ 8686534 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 210 @ 8686540 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 210 @ 8686540 voice_square_1 0, 2, 0, 0, 15, 0 @ 868654C voice_square_1 0, 2, 0, 0, 15, 0 @ 8686558 voice_square_1 0, 2, 0, 0, 15, 0 @ 8686564 @@ -5839,7 +5839,7 @@ voicegroup061:: @ 8686474 voice_square_1 0, 2, 0, 0, 15, 0 @ 8686600 voice_square_1 0, 2, 0, 0, 15, 0 @ 868660C voice_square_1 0, 2, 0, 0, 15, 0 @ 8686618 - voice_directsound 60, 0, DirectSoundWaveData_86B776C, 255, 235, 128, 115 @ 8686624 + voice_directsound 60, 0, DirectSoundWaveData_jv1080_slap_bass, 255, 235, 128, 115 @ 8686624 voice_square_1 0, 2, 0, 0, 15, 0 @ 8686630 voice_square_1 0, 2, 0, 0, 15, 0 @ 868663C voice_square_1 0, 2, 0, 0, 15, 0 @ 8686648 @@ -5876,7 +5876,7 @@ voicegroup061:: @ 8686474 voice_square_1 0, 2, 0, 0, 15, 0 @ 86867BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86867C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86867D4 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 86867E0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 86867E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86867EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86867F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8686804 @@ -5972,7 +5972,7 @@ voicegroup062:: @ 8686A74 voice_square_1 0, 2, 0, 0, 15, 0 @ 8686C18 voice_square_1 0, 2, 0, 0, 15, 0 @ 8686C24 voice_square_1 0, 2, 0, 0, 15, 0 @ 8686C30 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 8686C3C + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 8686C3C voice_square_1 0, 2, 0, 0, 15, 0 @ 8686C48 voice_square_1 0, 2, 0, 0, 15, 0 @ 8686C54 voice_square_1 0, 2, 0, 0, 15, 0 @ 8686C60 @@ -6082,7 +6082,7 @@ voicegroup063:: @ 8687074 voice_square_1 0, 2, 0, 0, 15, 0 @ 868711C voice_square_1 0, 2, 0, 0, 15, 0 @ 8687128 voice_square_1 0, 2, 0, 0, 15, 0 @ 8687134 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 165 @ 8687140 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 165 @ 8687140 voice_square_1 0, 2, 0, 0, 15, 0 @ 868714C voice_square_1 0, 2, 0, 0, 15, 0 @ 8687158 voice_square_1 0, 2, 0, 0, 15, 0 @ 8687164 @@ -6101,7 +6101,7 @@ voicegroup063:: @ 8687074 voice_square_1 0, 2, 0, 0, 15, 0 @ 8687200 voice_square_1 0, 2, 0, 0, 15, 0 @ 868720C voice_square_1 0, 2, 0, 0, 15, 0 @ 8687218 - voice_directsound 60, 0, DirectSoundWaveData_86B776C, 255, 235, 128, 99 @ 8687224 + voice_directsound 60, 0, DirectSoundWaveData_jv1080_slap_bass, 255, 235, 128, 99 @ 8687224 voice_square_1 0, 2, 0, 0, 15, 0 @ 8687230 voice_square_1 0, 2, 0, 0, 15, 0 @ 868723C voice_square_1 0, 2, 0, 0, 15, 0 @ 8687248 @@ -6220,7 +6220,7 @@ voicegroup064:: @ 8687674 voice_square_1 0, 2, 0, 0, 15, 0 @ 8687770 voice_square_1 0, 2, 0, 0, 15, 0 @ 868777C voice_square_1 0, 2, 0, 0, 15, 0 @ 8687788 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 8687794 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 8687794 voice_square_1 0, 2, 0, 0, 15, 0 @ 86877A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86877AC voice_square_1 0, 2, 0, 0, 15, 0 @ 86877B8 @@ -6242,8 +6242,8 @@ voicegroup064:: @ 8687674 voice_square_1 0, 2, 0, 0, 15, 0 @ 8687878 voice_square_1 0, 2, 0, 0, 15, 0 @ 8687884 voice_square_1 0, 2, 0, 0, 15, 0 @ 8687890 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 868789C - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 246 @ 86878A8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 868789C + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 246 @ 86878A8 voice_keysplit voicegroup006, KeySplitTable2 @ 86878B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86878C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86878CC @@ -6269,7 +6269,7 @@ voicegroup064:: @ 8687674 voice_square_1 0, 2, 0, 0, 15, 0 @ 86879BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86879C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86879D4 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 86879E0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 86879E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86879EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86879F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8687A04 @@ -6344,7 +6344,7 @@ voicegroup065:: @ 8687C74 voice_square_1 0, 2, 0, 0, 15, 0 @ 8687D1C voice_square_1 0, 2, 0, 0, 15, 0 @ 8687D28 voice_square_1 0, 2, 0, 0, 15, 0 @ 8687D34 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 165 @ 8687D40 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 165 @ 8687D40 voice_square_1 0, 2, 0, 0, 15, 0 @ 8687D4C voice_square_1 0, 2, 0, 0, 15, 0 @ 8687D58 voice_square_1 0, 2, 0, 0, 15, 0 @ 8687D64 @@ -6363,7 +6363,7 @@ voicegroup065:: @ 8687C74 voice_square_1 0, 2, 0, 0, 15, 0 @ 8687E00 voice_square_1 0, 2, 0, 0, 15, 0 @ 8687E0C voice_square_1 0, 2, 0, 0, 15, 0 @ 8687E18 - voice_directsound 60, 0, DirectSoundWaveData_86B776C, 255, 235, 128, 99 @ 8687E24 + voice_directsound 60, 0, DirectSoundWaveData_jv1080_slap_bass, 255, 235, 128, 99 @ 8687E24 voice_square_1 0, 2, 0, 0, 15, 0 @ 8687E30 voice_square_1 0, 2, 0, 0, 15, 0 @ 8687E3C voice_square_1 0, 2, 0, 0, 15, 0 @ 8687E48 @@ -6482,7 +6482,7 @@ voicegroup066:: @ 8688274 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688370 voice_square_1 0, 2, 0, 0, 15, 0 @ 868837C voice_square_1 0, 2, 0, 0, 15, 0 @ 8688388 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 8688394 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 8688394 voice_square_1 0, 2, 0, 0, 15, 0 @ 86883A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86883AC voice_square_1 0, 2, 0, 0, 15, 0 @ 86883B8 @@ -6493,17 +6493,17 @@ voicegroup066:: @ 8688274 voice_square_1 0, 2, 0, 0, 15, 0 @ 86883F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688400 voice_square_1 0, 2, 0, 0, 15, 0 @ 868840C - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 8688418 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 8688418 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688424 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688430 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 868843C + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 868843C voice_square_1 0, 2, 0, 0, 15, 0 @ 8688448 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688454 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688460 voice_square_1 0, 2, 0, 0, 15, 0 @ 868846C voice_square_1 0, 2, 0, 0, 15, 0 @ 8688478 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688484 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 226, 0, 38 @ 8688490 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 226, 0, 38 @ 8688490 voice_square_1 0, 2, 0, 0, 15, 0 @ 868849C voice_square_1 0, 2, 0, 0, 15, 0 @ 86884A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86884B4 @@ -6531,7 +6531,7 @@ voicegroup066:: @ 8688274 voice_square_1 0, 2, 0, 0, 15, 0 @ 86885BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86885C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86885D4 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 86885E0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 86885E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86885EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86885F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688604 @@ -6606,14 +6606,14 @@ voicegroup067:: @ 8688874 voice_square_1 0, 2, 0, 0, 15, 0 @ 868891C voice_square_1 0, 2, 0, 0, 15, 0 @ 8688928 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688934 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 210 @ 8688940 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 210 @ 8688940 voice_square_1 0, 2, 0, 0, 15, 0 @ 868894C voice_square_1 0, 2, 0, 0, 15, 0 @ 8688958 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688964 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688970 voice_square_1 0, 2, 0, 0, 15, 0 @ 868897C voice_square_1 0, 2, 0, 0, 15, 0 @ 8688988 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 8688994 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 8688994 voice_square_1 0, 2, 0, 0, 15, 0 @ 86889A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86889AC voice_square_1 0, 2, 0, 0, 15, 0 @ 86889B8 @@ -6627,7 +6627,7 @@ voicegroup067:: @ 8688874 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688A18 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688A24 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688A30 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 8688A3C + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 8688A3C voice_square_1 0, 2, 0, 0, 15, 0 @ 8688A48 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688A54 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688A60 @@ -6662,7 +6662,7 @@ voicegroup067:: @ 8688874 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688BBC voice_square_1 0, 2, 0, 0, 15, 0 @ 8688BC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688BD4 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 8688BE0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 8688BE0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688BEC voice_square_1 0, 2, 0, 0, 15, 0 @ 8688BF8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688C04 @@ -6734,17 +6734,17 @@ voicegroup068:: @ 8688E74 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688EF8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688F04 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688F10 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 8688F1C + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 8688F1C voice_square_1 0, 2, 0, 0, 15, 0 @ 8688F28 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688F34 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 210 @ 8688F40 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 210 @ 8688F40 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688F4C voice_square_1 0, 2, 0, 0, 15, 0 @ 8688F58 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688F64 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688F70 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688F7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8688F88 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 8688F94 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 8688F94 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688FA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688FAC voice_square_1 0, 2, 0, 0, 15, 0 @ 8688FB8 @@ -6755,10 +6755,10 @@ voicegroup068:: @ 8688E74 voice_square_1 0, 2, 0, 0, 15, 0 @ 8688FF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689000 voice_square_1 0, 2, 0, 0, 15, 0 @ 868900C - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 8689018 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 8689018 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689024 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689030 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 868903C + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 868903C voice_square_1 0, 2, 0, 0, 15, 0 @ 8689048 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689054 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689060 @@ -6793,7 +6793,7 @@ voicegroup068:: @ 8688E74 voice_square_1 0, 2, 0, 0, 15, 0 @ 86891BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86891C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86891D4 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 86891E0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 86891E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86891EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86891F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689204 @@ -6868,14 +6868,14 @@ voicegroup069:: @ 8689474 voice_square_1 0, 2, 0, 0, 15, 0 @ 868951C voice_square_1 0, 2, 0, 0, 15, 0 @ 8689528 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689534 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 210 @ 8689540 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 210 @ 8689540 voice_square_1 0, 2, 0, 0, 15, 0 @ 868954C voice_square_1 0, 2, 0, 0, 15, 0 @ 8689558 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689564 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689570 voice_square_1 0, 2, 0, 0, 15, 0 @ 868957C voice_square_1 0, 2, 0, 0, 15, 0 @ 8689588 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 8689594 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 8689594 voice_square_1 0, 2, 0, 0, 15, 0 @ 86895A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86895AC voice_square_1 0, 2, 0, 0, 15, 0 @ 86895B8 @@ -6886,17 +6886,17 @@ voicegroup069:: @ 8689474 voice_square_1 0, 2, 0, 0, 15, 0 @ 86895F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689600 voice_square_1 0, 2, 0, 0, 15, 0 @ 868960C - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 8689618 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 8689618 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689624 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689630 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 868963C + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 868963C voice_square_1 0, 2, 0, 0, 15, 0 @ 8689648 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689654 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689660 voice_square_1 0, 2, 0, 0, 15, 0 @ 868966C voice_square_1 0, 2, 0, 0, 15, 0 @ 8689678 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689684 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 226, 0, 38 @ 8689690 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 226, 0, 38 @ 8689690 voice_square_1 0, 2, 0, 0, 15, 0 @ 868969C voice_square_1 0, 2, 0, 0, 15, 0 @ 86896A8 voice_keysplit voicegroup006, KeySplitTable2 @ 86896B4 @@ -6924,7 +6924,7 @@ voicegroup069:: @ 8689474 voice_square_1 0, 2, 0, 0, 15, 0 @ 86897BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86897C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86897D4 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 86897E0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 86897E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86897EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86897F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689804 @@ -7006,7 +7006,7 @@ voicegroup070:: @ 8689A74 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689B70 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689B7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8689B88 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 8689B94 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 8689B94 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689BA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689BAC voice_square_1 0, 2, 0, 0, 15, 0 @ 8689BB8 @@ -7017,7 +7017,7 @@ voicegroup070:: @ 8689A74 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689BF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689C00 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689C0C - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 8689C18 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 8689C18 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689C24 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689C30 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689C3C @@ -7028,8 +7028,8 @@ voicegroup070:: @ 8689A74 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689C78 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689C84 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689C90 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 8689C9C - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 246 @ 8689CA8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 8689C9C + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 246 @ 8689CA8 voice_keysplit voicegroup006, KeySplitTable2 @ 8689CB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689CC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8689CCC @@ -7257,18 +7257,18 @@ voicegroup072:: @ 868A674 voice_square_1 0, 2, 0, 0, 15, 0 @ 868A6EC voice_square_1 0, 2, 0, 0, 15, 0 @ 868A6F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868A704 - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 868A710 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 868A710 voice_square_1 0, 2, 0, 0, 15, 0 @ 868A71C voice_square_1 0, 2, 0, 0, 15, 0 @ 868A728 voice_square_1 0, 2, 0, 0, 15, 0 @ 868A734 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 210 @ 868A740 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 210 @ 868A740 voice_square_1 0, 2, 0, 0, 15, 0 @ 868A74C voice_square_1 0, 2, 0, 0, 15, 0 @ 868A758 voice_square_1 0, 2, 0, 0, 15, 0 @ 868A764 voice_square_1 0, 2, 0, 0, 15, 0 @ 868A770 voice_square_1 0, 2, 0, 0, 15, 0 @ 868A77C voice_square_1 0, 2, 0, 0, 15, 0 @ 868A788 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 868A794 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 868A794 voice_square_1 0, 2, 0, 0, 15, 0 @ 868A7A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868A7AC voice_square_1 0, 2, 0, 0, 15, 0 @ 868A7B8 @@ -7279,7 +7279,7 @@ voicegroup072:: @ 868A674 voice_square_1 0, 2, 0, 0, 15, 0 @ 868A7F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868A800 voice_square_1 0, 2, 0, 0, 15, 0 @ 868A80C - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 868A818 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 868A818 voice_square_1 0, 2, 0, 0, 15, 0 @ 868A824 voice_square_1 0, 2, 0, 0, 15, 0 @ 868A830 voice_square_1 0, 2, 0, 0, 15, 0 @ 868A83C @@ -7290,7 +7290,7 @@ voicegroup072:: @ 868A674 voice_square_1 0, 2, 0, 0, 15, 0 @ 868A878 voice_square_1 0, 2, 0, 0, 15, 0 @ 868A884 voice_square_1 0, 2, 0, 0, 15, 0 @ 868A890 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 868A89C + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 868A89C voice_square_1 0, 2, 0, 0, 15, 0 @ 868A8A8 voice_keysplit voicegroup006, KeySplitTable2 @ 868A8B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868A8C0 @@ -7388,18 +7388,18 @@ voicegroup073:: @ 868AC74 voice_square_1 0, 2, 0, 0, 15, 0 @ 868ACEC voice_square_1 0, 2, 0, 0, 15, 0 @ 868ACF8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868AD04 - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 868AD10 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 868AD10 voice_square_1 0, 2, 0, 0, 15, 0 @ 868AD1C voice_square_1 0, 2, 0, 0, 15, 0 @ 868AD28 voice_square_1 0, 2, 0, 0, 15, 0 @ 868AD34 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 210 @ 868AD40 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 210 @ 868AD40 voice_square_1 0, 2, 0, 0, 15, 0 @ 868AD4C voice_square_1 0, 2, 0, 0, 15, 0 @ 868AD58 voice_square_1 0, 2, 0, 0, 15, 0 @ 868AD64 voice_square_1 0, 2, 0, 0, 15, 0 @ 868AD70 voice_square_1 0, 2, 0, 0, 15, 0 @ 868AD7C voice_square_1 0, 2, 0, 0, 15, 0 @ 868AD88 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 868AD94 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 868AD94 voice_square_1 0, 2, 0, 0, 15, 0 @ 868ADA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868ADAC voice_square_1 0, 2, 0, 0, 15, 0 @ 868ADB8 @@ -7410,10 +7410,10 @@ voicegroup073:: @ 868AC74 voice_square_1 0, 2, 0, 0, 15, 0 @ 868ADF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868AE00 voice_square_1 0, 2, 0, 0, 15, 0 @ 868AE0C - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 868AE18 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 868AE18 voice_square_1 0, 2, 0, 0, 15, 0 @ 868AE24 voice_square_1 0, 2, 0, 0, 15, 0 @ 868AE30 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 868AE3C + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 868AE3C voice_square_1 0, 2, 0, 0, 15, 0 @ 868AE48 voice_square_1 0, 2, 0, 0, 15, 0 @ 868AE54 voice_square_1 0, 2, 0, 0, 15, 0 @ 868AE60 @@ -7421,7 +7421,7 @@ voicegroup073:: @ 868AC74 voice_square_1 0, 2, 0, 0, 15, 0 @ 868AE78 voice_square_1 0, 2, 0, 0, 15, 0 @ 868AE84 voice_square_1 0, 2, 0, 0, 15, 0 @ 868AE90 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 868AE9C + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 868AE9C voice_square_1 0, 2, 0, 0, 15, 0 @ 868AEA8 voice_keysplit voicegroup006, KeySplitTable2 @ 868AEB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868AEC0 @@ -7448,7 +7448,7 @@ voicegroup073:: @ 868AC74 voice_square_1 0, 2, 0, 0, 15, 0 @ 868AFBC voice_square_1 0, 2, 0, 0, 15, 0 @ 868AFC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868AFD4 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 868AFE0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 868AFE0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868AFEC voice_square_1 0, 2, 0, 0, 15, 0 @ 868AFF8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B004 @@ -7519,7 +7519,7 @@ voicegroup074:: @ 868B274 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B2EC voice_square_1 0, 2, 0, 0, 15, 0 @ 868B2F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B304 - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 868B310 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 868B310 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B31C voice_square_1 0, 2, 0, 0, 15, 0 @ 868B328 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B334 @@ -7541,7 +7541,7 @@ voicegroup074:: @ 868B274 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B3F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B400 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B40C - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 868B418 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 868B418 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B424 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B430 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B43C @@ -7553,7 +7553,7 @@ voicegroup074:: @ 868B274 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B484 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B490 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B49C - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 216 @ 868B4A8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 216 @ 868B4A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B4B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B4C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B4CC @@ -7651,7 +7651,7 @@ voicegroup075:: @ 868B874 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B8F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B904 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B910 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 868B91C + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 868B91C voice_square_1 0, 2, 0, 0, 15, 0 @ 868B928 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B934 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B940 @@ -7672,8 +7672,8 @@ voicegroup075:: @ 868B874 voice_square_1 0, 2, 0, 0, 15, 0 @ 868B9F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868BA00 voice_square_1 0, 2, 0, 0, 15, 0 @ 868BA0C - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 868BA18 - voice_directsound 60, 0, DirectSoundWaveData_86B776C, 255, 235, 128, 99 @ 868BA24 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 868BA18 + voice_directsound 60, 0, DirectSoundWaveData_jv1080_slap_bass, 255, 235, 128, 99 @ 868BA24 voice_square_1 0, 2, 0, 0, 15, 0 @ 868BA30 voice_square_1 0, 2, 0, 0, 15, 0 @ 868BA3C voice_square_1 0, 2, 0, 0, 15, 0 @ 868BA48 @@ -7684,7 +7684,7 @@ voicegroup075:: @ 868B874 voice_square_1 0, 2, 0, 0, 15, 0 @ 868BA84 voice_square_1 0, 2, 0, 0, 15, 0 @ 868BA90 voice_square_1 0, 2, 0, 0, 15, 0 @ 868BA9C - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 246 @ 868BAA8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 246 @ 868BAA8 voice_keysplit voicegroup006, KeySplitTable2 @ 868BAB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868BAC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868BACC @@ -7710,7 +7710,7 @@ voicegroup075:: @ 868B874 voice_square_1 0, 2, 0, 0, 15, 0 @ 868BBBC voice_square_1 0, 2, 0, 0, 15, 0 @ 868BBC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868BBD4 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 868BBE0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 868BBE0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868BBEC voice_square_1 0, 2, 0, 0, 15, 0 @ 868BBF8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868BC04 @@ -7785,7 +7785,7 @@ voicegroup076:: @ 868BE74 voice_square_1 0, 2, 0, 0, 15, 0 @ 868BF1C voice_square_1 0, 2, 0, 0, 15, 0 @ 868BF28 voice_square_1 0, 2, 0, 0, 15, 0 @ 868BF34 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 165 @ 868BF40 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 165 @ 868BF40 voice_square_1 0, 2, 0, 0, 15, 0 @ 868BF4C voice_square_1 0, 2, 0, 0, 15, 0 @ 868BF58 voice_square_1 0, 2, 0, 0, 15, 0 @ 868BF64 @@ -7803,8 +7803,8 @@ voicegroup076:: @ 868BE74 voice_square_1 0, 2, 0, 0, 15, 0 @ 868BFF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C000 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C00C - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 868C018 - voice_directsound 60, 0, DirectSoundWaveData_86B776C, 255, 235, 128, 99 @ 868C024 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 868C018 + voice_directsound 60, 0, DirectSoundWaveData_jv1080_slap_bass, 255, 235, 128, 99 @ 868C024 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C030 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C03C voice_square_1 0, 2, 0, 0, 15, 0 @ 868C048 @@ -7912,18 +7912,18 @@ voicegroup077:: @ 868C474 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C4EC voice_square_1 0, 2, 0, 0, 15, 0 @ 868C4F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C504 - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 868C510 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 868C510 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C51C voice_square_1 0, 2, 0, 0, 15, 0 @ 868C528 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C534 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 210 @ 868C540 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 210 @ 868C540 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C54C voice_square_1 0, 2, 0, 0, 15, 0 @ 868C558 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C564 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C570 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C57C voice_square_1 0, 2, 0, 0, 15, 0 @ 868C588 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 868C594 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 868C594 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C5A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C5AC voice_square_1 0, 2, 0, 0, 15, 0 @ 868C5B8 @@ -7934,7 +7934,7 @@ voicegroup077:: @ 868C474 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C5F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C600 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C60C - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 196 @ 868C618 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 196 @ 868C618 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C624 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C630 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C63C @@ -7945,7 +7945,7 @@ voicegroup077:: @ 868C474 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C678 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C684 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C690 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 868C69C + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 868C69C voice_square_1 0, 2, 0, 0, 15, 0 @ 868C6A8 voice_keysplit voicegroup006, KeySplitTable2 @ 868C6B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C6C0 @@ -7972,7 +7972,7 @@ voicegroup077:: @ 868C474 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C7BC voice_square_1 0, 2, 0, 0, 15, 0 @ 868C7C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C7D4 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 868C7E0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 868C7E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C7EC voice_square_1 0, 2, 0, 0, 15, 0 @ 868C7F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868C804 @@ -8044,7 +8044,7 @@ voicegroup078:: @ 868CA74 voice_square_1 0, 2, 0, 0, 15, 0 @ 868CAF8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868CB04 voice_square_1 0, 2, 0, 0, 15, 0 @ 868CB10 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 868CB1C + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 868CB1C voice_square_1 0, 2, 0, 0, 15, 0 @ 868CB28 voice_square_1 0, 2, 0, 0, 15, 0 @ 868CB34 voice_square_1 0, 2, 0, 0, 15, 0 @ 868CB40 @@ -8054,7 +8054,7 @@ voicegroup078:: @ 868CA74 voice_square_1 0, 2, 0, 0, 15, 0 @ 868CB70 voice_square_1 0, 2, 0, 0, 15, 0 @ 868CB7C voice_square_1 0, 2, 0, 0, 15, 0 @ 868CB88 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 868CB94 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 868CB94 voice_square_1 0, 2, 0, 0, 15, 0 @ 868CBA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868CBAC voice_square_1 0, 2, 0, 0, 15, 0 @ 868CBB8 @@ -8065,7 +8065,7 @@ voicegroup078:: @ 868CA74 voice_square_1 0, 2, 0, 0, 15, 0 @ 868CBF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868CC00 voice_square_1 0, 2, 0, 0, 15, 0 @ 868CC0C - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 196 @ 868CC18 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 196 @ 868CC18 voice_square_1 0, 2, 0, 0, 15, 0 @ 868CC24 voice_square_1 0, 2, 0, 0, 15, 0 @ 868CC30 voice_square_1 0, 2, 0, 0, 15, 0 @ 868CC3C @@ -8075,9 +8075,9 @@ voicegroup078:: @ 868CA74 voice_square_1 0, 2, 0, 0, 15, 0 @ 868CC6C voice_square_1 0, 2, 0, 0, 15, 0 @ 868CC78 voice_square_1 0, 2, 0, 0, 15, 0 @ 868CC84 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 226, 0, 38 @ 868CC90 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 226, 0, 38 @ 868CC90 voice_square_1 0, 2, 0, 0, 15, 0 @ 868CC9C - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 246 @ 868CCA8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 246 @ 868CCA8 voice_keysplit voicegroup006, KeySplitTable2 @ 868CCB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868CCC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868CCCC @@ -8175,17 +8175,17 @@ voicegroup079:: @ 868D074 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D0F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D104 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D110 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 868D11C + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 868D11C voice_square_1 0, 2, 0, 0, 15, 0 @ 868D128 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D134 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 210 @ 868D140 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 210 @ 868D140 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D14C voice_square_1 0, 2, 0, 0, 15, 0 @ 868D158 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D164 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D170 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D17C voice_square_1 0, 2, 0, 0, 15, 0 @ 868D188 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 868D194 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 868D194 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D1A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D1AC voice_square_1 0, 2, 0, 0, 15, 0 @ 868D1B8 @@ -8206,8 +8206,8 @@ voicegroup079:: @ 868D074 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D26C voice_square_1 0, 2, 0, 0, 15, 0 @ 868D278 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D284 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 226, 0, 38 @ 868D290 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 868D29C + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 226, 0, 38 @ 868D290 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 868D29C voice_square_1 0, 2, 0, 0, 15, 0 @ 868D2A8 voice_keysplit voicegroup006, KeySplitTable2 @ 868D2B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D2C0 @@ -8234,7 +8234,7 @@ voicegroup079:: @ 868D074 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D3BC voice_square_1 0, 2, 0, 0, 15, 0 @ 868D3C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D3D4 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 868D3E0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 868D3E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D3EC voice_square_1 0, 2, 0, 0, 15, 0 @ 868D3F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D404 @@ -8316,7 +8316,7 @@ voicegroup080:: @ 868D674 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D770 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D77C voice_square_1 0, 2, 0, 0, 15, 0 @ 868D788 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 868D794 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 868D794 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D7A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D7AC voice_square_1 0, 2, 0, 0, 15, 0 @ 868D7B8 @@ -8330,16 +8330,16 @@ voicegroup080:: @ 868D674 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D818 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D824 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D830 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 868D83C + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 868D83C voice_square_1 0, 2, 0, 0, 15, 0 @ 868D848 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D854 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D860 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D86C voice_square_1 0, 2, 0, 0, 15, 0 @ 868D878 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D884 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 226, 0, 38 @ 868D890 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 868D89C - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 246 @ 868D8A8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 226, 0, 38 @ 868D890 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 868D89C + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 246 @ 868D8A8 voice_keysplit voicegroup006, KeySplitTable2 @ 868D8B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D8C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D8CC @@ -8365,7 +8365,7 @@ voicegroup080:: @ 868D674 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D9BC voice_square_1 0, 2, 0, 0, 15, 0 @ 868D9C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D9D4 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 868D9E0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 868D9E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868D9EC voice_square_1 0, 2, 0, 0, 15, 0 @ 868D9F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868DA04 @@ -8442,7 +8442,7 @@ voicegroup082:: @ 868DC8C voice_square_1 0, 2, 0, 0, 15, 0 @ 868DD10 voice_square_1 0, 2, 0, 0, 15, 0 @ 868DD1C voice_square_1 0, 2, 0, 0, 15, 0 @ 868DD28 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 868DD34 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 868DD34 voice_square_1 0, 2, 0, 0, 15, 0 @ 868DD40 voice_square_1 0, 2, 0, 0, 15, 0 @ 868DD4C voice_square_1 0, 2, 0, 0, 15, 0 @ 868DD58 @@ -8452,7 +8452,7 @@ voicegroup082:: @ 868DC8C voice_square_1 0, 2, 0, 0, 15, 0 @ 868DD88 voice_square_1 0, 2, 0, 0, 15, 0 @ 868DD94 voice_square_1 0, 2, 0, 0, 15, 0 @ 868DDA0 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 868DDAC + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 868DDAC voice_square_1 0, 2, 0, 0, 15, 0 @ 868DDB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868DDC4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868DDD0 @@ -8475,7 +8475,7 @@ voicegroup082:: @ 868DC8C voice_square_1 0, 2, 0, 0, 15, 0 @ 868DE9C voice_square_1 0, 2, 0, 0, 15, 0 @ 868DEA8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868DEB4 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 246 @ 868DEC0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 246 @ 868DEC0 voice_keysplit voicegroup006, KeySplitTable2 @ 868DECC voice_square_1 0, 2, 0, 0, 15, 0 @ 868DED8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868DEE4 @@ -8568,7 +8568,7 @@ voicegroup083:: @ 868E28C voice_square_1 0, 2, 0, 0, 15, 0 @ 868E2D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E2E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E2EC - voice_directsound 60, 0, DirectSoundWaveData_86B5D04, 255, 165, 72, 249 @ 868E2F8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_glockenspiel, 255, 165, 72, 249 @ 868E2F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E304 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E310 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E31C @@ -8583,7 +8583,7 @@ voicegroup083:: @ 868E28C voice_square_1 0, 2, 0, 0, 15, 0 @ 868E388 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E394 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E3A0 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 128, 249, 25, 76 @ 868E3AC + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 128, 249, 25, 76 @ 868E3AC voice_square_1 0, 2, 0, 0, 15, 0 @ 868E3B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E3C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E3D0 @@ -8594,7 +8594,7 @@ voicegroup083:: @ 868E28C voice_square_1 0, 2, 0, 0, 15, 0 @ 868E40C voice_square_1 0, 2, 0, 0, 15, 0 @ 868E418 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E424 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 868E430 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 868E430 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E43C voice_square_1 0, 2, 0, 0, 15, 0 @ 868E448 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E454 @@ -8604,8 +8604,8 @@ voicegroup083:: @ 868E28C voice_square_1 0, 2, 0, 0, 15, 0 @ 868E484 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E490 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E49C - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 226, 0, 38 @ 868E4A8 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 0, 242 @ 868E4B4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 226, 0, 38 @ 868E4A8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 0, 242 @ 868E4B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E4C0 voice_keysplit voicegroup006, KeySplitTable2 @ 868E4CC voice_square_1 0, 2, 0, 0, 15, 0 @ 868E4D8 @@ -8632,7 +8632,7 @@ voicegroup083:: @ 868E28C voice_square_1 0, 2, 0, 0, 15, 0 @ 868E5D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E5E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E5EC - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 868E5F8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 868E5F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E604 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E610 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E61C @@ -8660,7 +8660,7 @@ voicegroup084:: @ 868E67C voice_square_1 0, 2, 0, 0, 15, 0 @ 868E700 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E70C voice_square_1 0, 2, 0, 0, 15, 0 @ 868E718 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 868E724 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 868E724 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E730 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E73C voice_square_1 0, 2, 0, 0, 15, 0 @ 868E748 @@ -8670,7 +8670,7 @@ voicegroup084:: @ 868E67C voice_square_1 0, 2, 0, 0, 15, 0 @ 868E778 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E784 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E790 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 868E79C + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 868E79C voice_square_1 0, 2, 0, 0, 15, 0 @ 868E7A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E7B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E7C0 @@ -8692,8 +8692,8 @@ voicegroup084:: @ 868E67C voice_square_1 0, 2, 0, 0, 15, 0 @ 868E880 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E88C voice_square_1 0, 2, 0, 0, 15, 0 @ 868E898 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 868E8A4 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 246 @ 868E8B0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 868E8A4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 246 @ 868E8B0 voice_keysplit voicegroup006, KeySplitTable2 @ 868E8BC voice_square_1 0, 2, 0, 0, 15, 0 @ 868E8C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E8D4 @@ -8719,7 +8719,7 @@ voicegroup084:: @ 868E67C voice_square_1 0, 2, 0, 0, 15, 0 @ 868E9C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E9D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E9DC - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 868E9E8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 868E9E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868E9F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868EA00 voice_square_1 0, 2, 0, 0, 15, 0 @ 868EA0C @@ -8801,7 +8801,7 @@ voicegroup085:: @ 868EC7C voice_square_1 0, 2, 0, 0, 15, 0 @ 868ED78 voice_square_1 0, 2, 0, 0, 15, 0 @ 868ED84 voice_square_1 0, 2, 0, 0, 15, 0 @ 868ED90 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 868ED9C + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 868ED9C voice_square_1 0, 2, 0, 0, 15, 0 @ 868EDA8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868EDB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868EDC0 @@ -8823,8 +8823,8 @@ voicegroup085:: @ 868EC7C voice_square_1 0, 2, 0, 0, 15, 0 @ 868EE80 voice_square_1 0, 2, 0, 0, 15, 0 @ 868EE8C voice_square_1 0, 2, 0, 0, 15, 0 @ 868EE98 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 868EEA4 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 246 @ 868EEB0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 868EEA4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 246 @ 868EEB0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868EEBC voice_square_1 0, 2, 0, 0, 15, 0 @ 868EEC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868EED4 @@ -8850,7 +8850,7 @@ voicegroup085:: @ 868EC7C voice_square_1 0, 2, 0, 0, 15, 0 @ 868EFC4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868EFD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868EFDC - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 868EFE8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 868EFE8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868EFF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F000 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F00C @@ -8922,17 +8922,17 @@ voicegroup086:: @ 868F27C voice_square_1 0, 2, 0, 0, 15, 0 @ 868F300 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F30C voice_square_1 0, 2, 0, 0, 15, 0 @ 868F318 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 868F324 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 868F324 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F330 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F33C - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 165 @ 868F348 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 165 @ 868F348 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F354 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F360 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F36C voice_square_1 0, 2, 0, 0, 15, 0 @ 868F378 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F384 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F390 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 868F39C + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 868F39C voice_square_1 0, 2, 0, 0, 15, 0 @ 868F3A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F3B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F3C0 @@ -8943,8 +8943,8 @@ voicegroup086:: @ 868F27C voice_square_1 0, 2, 0, 0, 15, 0 @ 868F3FC voice_square_1 0, 2, 0, 0, 15, 0 @ 868F408 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F414 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 868F420 - voice_directsound 60, 0, DirectSoundWaveData_86B776C, 255, 235, 128, 99 @ 868F42C + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 868F420 + voice_directsound 60, 0, DirectSoundWaveData_jv1080_slap_bass, 255, 235, 128, 99 @ 868F42C voice_square_1 0, 2, 0, 0, 15, 0 @ 868F438 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F444 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F450 @@ -8954,7 +8954,7 @@ voicegroup086:: @ 868F27C voice_square_1 0, 2, 0, 0, 15, 0 @ 868F480 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F48C voice_square_1 0, 2, 0, 0, 15, 0 @ 868F498 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 868F4A4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 868F4A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F4B0 voice_keysplit voicegroup006, KeySplitTable2 @ 868F4BC voice_square_1 0, 2, 0, 0, 15, 0 @ 868F4C8 @@ -8981,7 +8981,7 @@ voicegroup086:: @ 868F27C voice_square_1 0, 2, 0, 0, 15, 0 @ 868F5C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F5D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F5DC - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 868F5E8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 868F5E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F5F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F600 voice_square_1 0, 2, 0, 0, 15, 0 @ 868F60C @@ -9075,9 +9075,9 @@ voicegroup087:: @ 868F87C voice_square_1 0, 2, 0, 0, 15, 0 @ 868FA08 voice_square_1 0, 2, 0, 0, 15, 0 @ 868FA14 voice_square_1 0, 2, 0, 0, 15, 0 @ 868FA20 - voice_directsound 60, 0, DirectSoundWaveData_86B776C, 255, 235, 128, 99 @ 868FA2C + voice_directsound 60, 0, DirectSoundWaveData_jv1080_slap_bass, 255, 235, 128, 99 @ 868FA2C voice_square_1 0, 2, 0, 0, 15, 0 @ 868FA38 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 868FA44 + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 868FA44 voice_square_1 0, 2, 0, 0, 15, 0 @ 868FA50 voice_square_1 0, 2, 0, 0, 15, 0 @ 868FA5C voice_square_1 0, 2, 0, 0, 15, 0 @ 868FA68 @@ -9086,7 +9086,7 @@ voicegroup087:: @ 868F87C voice_square_1 0, 2, 0, 0, 15, 0 @ 868FA8C voice_square_1 0, 2, 0, 0, 15, 0 @ 868FA98 voice_square_1 0, 2, 0, 0, 15, 0 @ 868FAA4 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 246 @ 868FAB0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 246 @ 868FAB0 voice_square_1 0, 2, 0, 0, 15, 0 @ 868FABC voice_square_1 0, 2, 0, 0, 15, 0 @ 868FAC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 868FAD4 @@ -9184,7 +9184,7 @@ voicegroup088:: @ 868FE7C voice_square_1 0, 2, 0, 0, 15, 0 @ 868FF00 voice_square_1 0, 2, 0, 0, 15, 0 @ 868FF0C voice_square_1 0, 2, 0, 0, 15, 0 @ 868FF18 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 868FF24 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 868FF24 voice_square_1 0, 2, 0, 0, 15, 0 @ 868FF30 voice_square_1 0, 2, 0, 0, 15, 0 @ 868FF3C voice_square_1 0, 2, 0, 0, 15, 0 @ 868FF48 @@ -9216,8 +9216,8 @@ voicegroup088:: @ 868FE7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8690080 voice_square_1 0, 2, 0, 0, 15, 0 @ 869008C voice_square_1 0, 2, 0, 0, 15, 0 @ 8690098 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 86900A4 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 239 @ 86900B0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 86900A4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 239 @ 86900B0 voice_keysplit voicegroup006, KeySplitTable2 @ 86900BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86900C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86900D4 @@ -9243,7 +9243,7 @@ voicegroup088:: @ 868FE7C voice_square_1 0, 2, 0, 0, 15, 0 @ 86901C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86901D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86901DC - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 86901E8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 86901E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86901F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8690200 voice_square_1 0, 2, 0, 0, 15, 0 @ 869020C @@ -9315,7 +9315,7 @@ voicegroup089:: @ 869047C voice_square_1 0, 2, 0, 0, 15, 0 @ 8690500 voice_square_1 0, 2, 0, 0, 15, 0 @ 869050C voice_square_1 0, 2, 0, 0, 15, 0 @ 8690518 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 8690524 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 8690524 voice_square_1 0, 2, 0, 0, 15, 0 @ 8690530 voice_square_1 0, 2, 0, 0, 15, 0 @ 869053C voice_square_1 0, 2, 0, 0, 15, 0 @ 8690548 @@ -9374,7 +9374,7 @@ voicegroup089:: @ 869047C voice_square_1 0, 2, 0, 0, 15, 0 @ 86907C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86907D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86907DC - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 86907E8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 86907E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86907F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8690800 voice_square_1 0, 2, 0, 0, 15, 0 @ 869080C @@ -9572,22 +9572,22 @@ voicegroup091:: @ 869107C voice_square_1 0, 2, 0, 0, 15, 0 @ 86910C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86910D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86910DC - voice_directsound 60, 0, DirectSoundWaveData_86B5D04, 255, 165, 72, 249 @ 86910E8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_glockenspiel, 255, 165, 72, 249 @ 86910E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86910F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691100 voice_square_1 0, 2, 0, 0, 15, 0 @ 869110C - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 8691118 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 8691118 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691124 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691130 voice_square_1 0, 2, 0, 0, 15, 0 @ 869113C - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 165 @ 8691148 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 165 @ 8691148 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691154 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691160 voice_square_1 0, 2, 0, 0, 15, 0 @ 869116C voice_square_1 0, 2, 0, 0, 15, 0 @ 8691178 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691184 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691190 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 128, 249, 25, 76 @ 869119C + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 128, 249, 25, 76 @ 869119C voice_square_1 0, 2, 0, 0, 15, 0 @ 86911A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86911B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86911C0 @@ -9598,7 +9598,7 @@ voicegroup091:: @ 869107C voice_square_1 0, 2, 0, 0, 15, 0 @ 86911FC voice_square_1 0, 2, 0, 0, 15, 0 @ 8691208 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691214 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 8691220 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 8691220 voice_square_1 0, 2, 0, 0, 15, 0 @ 869122C voice_square_1 0, 2, 0, 0, 15, 0 @ 8691238 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691244 @@ -9608,8 +9608,8 @@ voicegroup091:: @ 869107C voice_square_1 0, 2, 0, 0, 15, 0 @ 8691274 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691280 voice_square_1 0, 2, 0, 0, 15, 0 @ 869128C - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 226, 0, 38 @ 8691298 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 0, 242 @ 86912A4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 226, 0, 38 @ 8691298 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 0, 242 @ 86912A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86912B0 voice_keysplit voicegroup006, KeySplitTable2 @ 86912BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86912C8 @@ -9636,7 +9636,7 @@ voicegroup091:: @ 869107C voice_square_1 0, 2, 0, 0, 15, 0 @ 86913C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86913D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86913DC - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 86913E8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 86913E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86913F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691400 voice_square_1 0, 2, 0, 0, 15, 0 @ 869140C @@ -9707,7 +9707,7 @@ voicegroup092:: @ 869167C voice_square_1 0, 2, 0, 0, 15, 0 @ 86916F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691700 voice_square_1 0, 2, 0, 0, 15, 0 @ 869170C - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 8691718 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 8691718 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691724 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691730 voice_square_1 0, 2, 0, 0, 15, 0 @ 869173C @@ -9718,7 +9718,7 @@ voicegroup092:: @ 869167C voice_square_1 0, 2, 0, 0, 15, 0 @ 8691778 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691784 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691790 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 128, 249, 25, 76 @ 869179C + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 128, 249, 25, 76 @ 869179C voice_square_1 0, 2, 0, 0, 15, 0 @ 86917A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86917B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86917C0 @@ -9732,7 +9732,7 @@ voicegroup092:: @ 869167C voice_square_1 0, 2, 0, 0, 15, 0 @ 8691820 voice_square_1 0, 2, 0, 0, 15, 0 @ 869182C voice_square_1 0, 2, 0, 0, 15, 0 @ 8691838 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 8691844 + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 8691844 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691850 voice_square_1 0, 2, 0, 0, 15, 0 @ 869185C voice_square_1 0, 2, 0, 0, 15, 0 @ 8691868 @@ -9740,7 +9740,7 @@ voicegroup092:: @ 869167C voice_square_1 0, 2, 0, 0, 15, 0 @ 8691880 voice_square_1 0, 2, 0, 0, 15, 0 @ 869188C voice_square_1 0, 2, 0, 0, 15, 0 @ 8691898 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 0, 242 @ 86918A4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 0, 242 @ 86918A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86918B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86918BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86918C8 @@ -9838,7 +9838,7 @@ voicegroup093:: @ 8691C7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8691CF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691D00 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691D0C - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 8691D18 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 8691D18 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691D24 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691D30 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691D3C @@ -9849,7 +9849,7 @@ voicegroup093:: @ 8691C7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8691D78 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691D84 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691D90 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 128, 249, 25, 76 @ 8691D9C + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 128, 249, 25, 76 @ 8691D9C voice_square_1 0, 2, 0, 0, 15, 0 @ 8691DA8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691DB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691DC0 @@ -9861,9 +9861,9 @@ voicegroup093:: @ 8691C7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8691E08 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691E14 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691E20 - voice_directsound 60, 0, DirectSoundWaveData_86B776C, 255, 235, 128, 99 @ 8691E2C + voice_directsound 60, 0, DirectSoundWaveData_jv1080_slap_bass, 255, 235, 128, 99 @ 8691E2C voice_square_1 0, 2, 0, 0, 15, 0 @ 8691E38 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 8691E44 + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 8691E44 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691E50 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691E5C voice_square_1 0, 2, 0, 0, 15, 0 @ 8691E68 @@ -9871,7 +9871,7 @@ voicegroup093:: @ 8691C7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8691E80 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691E8C voice_square_1 0, 2, 0, 0, 15, 0 @ 8691E98 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 0, 242 @ 8691EA4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 0, 242 @ 8691EA4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691EB0 voice_keysplit voicegroup006, KeySplitTable2 @ 8691EBC voice_square_1 0, 2, 0, 0, 15, 0 @ 8691EC8 @@ -9898,7 +9898,7 @@ voicegroup093:: @ 8691C7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8691FC4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691FD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691FDC - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 8691FE8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 8691FE8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8691FF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692000 voice_square_1 0, 2, 0, 0, 15, 0 @ 869200C @@ -9965,22 +9965,22 @@ voicegroup094:: @ 869227C voice_square_1 0, 2, 0, 0, 15, 0 @ 86922C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86922D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86922DC - voice_directsound 60, 0, DirectSoundWaveData_86B5D04, 255, 165, 72, 249 @ 86922E8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_glockenspiel, 255, 165, 72, 249 @ 86922E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86922F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692300 voice_square_1 0, 2, 0, 0, 15, 0 @ 869230C - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 8692318 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 8692324 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 8692318 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 8692324 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692330 voice_square_1 0, 2, 0, 0, 15, 0 @ 869233C - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 210 @ 8692348 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 210 @ 8692348 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692354 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692360 voice_square_1 0, 2, 0, 0, 15, 0 @ 869236C - voice_directsound 60, 0, DirectSoundWaveData_87410E0, 255, 0, 255, 165 @ 8692378 + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 255, 0, 255, 165 @ 8692378 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692384 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692390 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 128, 249, 25, 76 @ 869239C + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 128, 249, 25, 76 @ 869239C voice_square_1 0, 2, 0, 0, 15, 0 @ 86923A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86923B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86923C0 @@ -10003,7 +10003,7 @@ voicegroup094:: @ 869227C voice_square_1 0, 2, 0, 0, 15, 0 @ 869248C voice_square_1 0, 2, 0, 0, 15, 0 @ 8692498 voice_square_1 0, 2, 0, 0, 15, 0 @ 86924A4 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 246 @ 86924B0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 246 @ 86924B0 voice_keysplit voicegroup006, KeySplitTable2 @ 86924BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86924C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86924D4 @@ -10029,7 +10029,7 @@ voicegroup094:: @ 869227C voice_square_1 0, 2, 0, 0, 15, 0 @ 86925C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86925D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86925DC - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 86925E8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 86925E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86925F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692600 voice_square_1 0, 2, 0, 0, 15, 0 @ 869260C @@ -10104,14 +10104,14 @@ voicegroup095:: @ 869287C voice_square_1 0, 2, 0, 0, 15, 0 @ 8692924 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692930 voice_square_1 0, 2, 0, 0, 15, 0 @ 869293C - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 210 @ 8692948 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 210 @ 8692948 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692954 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692960 voice_square_1 0, 2, 0, 0, 15, 0 @ 869296C voice_square_1 0, 2, 0, 0, 15, 0 @ 8692978 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692984 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692990 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 869299C + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 869299C voice_square_1 0, 2, 0, 0, 15, 0 @ 86929A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86929B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86929C0 @@ -10125,7 +10125,7 @@ voicegroup095:: @ 869287C voice_square_1 0, 2, 0, 0, 15, 0 @ 8692A20 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692A2C voice_square_1 0, 2, 0, 0, 15, 0 @ 8692A38 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 8692A44 + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 8692A44 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692A50 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692A5C voice_square_1 0, 2, 0, 0, 15, 0 @ 8692A68 @@ -10160,7 +10160,7 @@ voicegroup095:: @ 869287C voice_square_1 0, 2, 0, 0, 15, 0 @ 8692BC4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692BD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692BDC - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 8692BE8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 8692BE8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692BF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692C00 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692C0C @@ -10231,18 +10231,18 @@ voicegroup096:: @ 8692E7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8692EF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692F00 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692F0C - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 8692F18 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 8692F18 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692F24 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692F30 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692F3C - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 210 @ 8692F48 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 210 @ 8692F48 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692F54 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692F60 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692F6C voice_square_1 0, 2, 0, 0, 15, 0 @ 8692F78 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692F84 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692F90 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 8692F9C + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 8692F9C voice_square_1 0, 2, 0, 0, 15, 0 @ 8692FA8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692FB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8692FC0 @@ -10254,9 +10254,9 @@ voicegroup096:: @ 8692E7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8693008 voice_square_1 0, 2, 0, 0, 15, 0 @ 8693014 voice_square_1 0, 2, 0, 0, 15, 0 @ 8693020 - voice_directsound 60, 0, DirectSoundWaveData_86B776C, 255, 235, 128, 99 @ 869302C + voice_directsound 60, 0, DirectSoundWaveData_jv1080_slap_bass, 255, 235, 128, 99 @ 869302C voice_square_1 0, 2, 0, 0, 15, 0 @ 8693038 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 8693044 + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 8693044 voice_square_1 0, 2, 0, 0, 15, 0 @ 8693050 voice_square_1 0, 2, 0, 0, 15, 0 @ 869305C voice_square_1 0, 2, 0, 0, 15, 0 @ 8693068 @@ -10265,7 +10265,7 @@ voicegroup096:: @ 8692E7C voice_square_1 0, 2, 0, 0, 15, 0 @ 869308C voice_square_1 0, 2, 0, 0, 15, 0 @ 8693098 voice_square_1 0, 2, 0, 0, 15, 0 @ 86930A4 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 246 @ 86930B0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 246 @ 86930B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86930BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86930C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86930D4 @@ -10363,7 +10363,7 @@ voicegroup097:: @ 869347C voice_square_1 0, 2, 0, 0, 15, 0 @ 8693500 voice_square_1 0, 2, 0, 0, 15, 0 @ 869350C voice_square_1 0, 2, 0, 0, 15, 0 @ 8693518 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 8693524 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 8693524 voice_square_1 0, 2, 0, 0, 15, 0 @ 8693530 voice_square_1 0, 2, 0, 0, 15, 0 @ 869353C voice_square_1 0, 2, 0, 0, 15, 0 @ 8693548 @@ -10396,7 +10396,7 @@ voicegroup097:: @ 869347C voice_square_1 0, 2, 0, 0, 15, 0 @ 869368C voice_square_1 0, 2, 0, 0, 15, 0 @ 8693698 voice_square_1 0, 2, 0, 0, 15, 0 @ 86936A4 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 249 @ 86936B0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 249 @ 86936B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86936BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86936C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86936D4 @@ -10553,7 +10553,7 @@ voicegroup098:: @ 8693A7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8693DC4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8693DD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8693DDC - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 8693DE8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 8693DE8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8693DF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8693E00 voice_square_1 0, 2, 0, 0, 15, 0 @ 8693E0C @@ -10606,7 +10606,7 @@ voicegroup098:: @ 8693A7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8694040 voice_square_1 0, 2, 0, 0, 15, 0 @ 869404C voice_directsound 60, 0, DirectSoundWaveData_873ECD8, 255, 255, 255, 127 @ 8694058 - voice_directsound 60, 0, DirectSoundWaveData_86C6200, 255, 255, 255, 127 @ 8694064 + voice_directsound 60, 0, DirectSoundWaveData_sc88_standard_hand_clap, 255, 255, 255, 127 @ 8694064 voice_noise_alt 0, 0, 1, 0, 0 @ 8694070 .align 2 @@ -10624,7 +10624,7 @@ voicegroup099:: @ 869407C voice_square_1 0, 2, 0, 0, 15, 0 @ 86940F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694100 voice_square_1 0, 2, 0, 0, 15, 0 @ 869410C - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 8694118 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 8694118 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694124 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694130 voice_square_1 0, 2, 0, 0, 15, 0 @ 869413C @@ -10647,9 +10647,9 @@ voicegroup099:: @ 869407C voice_square_1 0, 2, 0, 0, 15, 0 @ 8694208 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694214 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694220 - voice_directsound 60, 0, DirectSoundWaveData_86B776C, 255, 235, 128, 99 @ 869422C + voice_directsound 60, 0, DirectSoundWaveData_jv1080_slap_bass, 255, 235, 128, 99 @ 869422C voice_square_1 0, 2, 0, 0, 15, 0 @ 8694238 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 8694244 + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 8694244 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694250 voice_square_1 0, 2, 0, 0, 15, 0 @ 869425C voice_square_1 0, 2, 0, 0, 15, 0 @ 8694268 @@ -10755,18 +10755,18 @@ voicegroup100:: @ 869467C voice_square_1 0, 2, 0, 0, 15, 0 @ 86946F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694700 voice_square_1 0, 2, 0, 0, 15, 0 @ 869470C - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 8694718 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 8694718 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694724 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694730 voice_square_1 0, 2, 0, 0, 15, 0 @ 869473C - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 210 @ 8694748 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 210 @ 8694748 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694754 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694760 voice_square_1 0, 2, 0, 0, 15, 0 @ 869476C voice_square_1 0, 2, 0, 0, 15, 0 @ 8694778 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694784 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694790 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 869479C + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 869479C voice_square_1 0, 2, 0, 0, 15, 0 @ 86947A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86947B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86947C0 @@ -10778,9 +10778,9 @@ voicegroup100:: @ 869467C voice_square_1 0, 2, 0, 0, 15, 0 @ 8694808 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694814 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694820 - voice_directsound 60, 0, DirectSoundWaveData_86B776C, 255, 235, 128, 99 @ 869482C + voice_directsound 60, 0, DirectSoundWaveData_jv1080_slap_bass, 255, 235, 128, 99 @ 869482C voice_square_1 0, 2, 0, 0, 15, 0 @ 8694838 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 8694844 + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 8694844 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694850 voice_square_1 0, 2, 0, 0, 15, 0 @ 869485C voice_square_1 0, 2, 0, 0, 15, 0 @ 8694868 @@ -10789,7 +10789,7 @@ voicegroup100:: @ 869467C voice_square_1 0, 2, 0, 0, 15, 0 @ 869488C voice_square_1 0, 2, 0, 0, 15, 0 @ 8694898 voice_square_1 0, 2, 0, 0, 15, 0 @ 86948A4 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 246 @ 86948B0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 246 @ 86948B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86948BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86948C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86948D4 @@ -10815,7 +10815,7 @@ voicegroup100:: @ 869467C voice_square_1 0, 2, 0, 0, 15, 0 @ 86949C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86949D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86949DC - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 86949E8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 86949E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86949F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694A00 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694A0C @@ -10887,7 +10887,7 @@ voicegroup101:: @ 8694C7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8694D00 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694D0C voice_square_1 0, 2, 0, 0, 15, 0 @ 8694D18 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 8694D24 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 8694D24 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694D30 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694D3C voice_square_1 0, 2, 0, 0, 15, 0 @ 8694D48 @@ -10919,8 +10919,8 @@ voicegroup101:: @ 8694C7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8694E80 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694E8C voice_square_1 0, 2, 0, 0, 15, 0 @ 8694E98 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 8694EA4 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 239 @ 8694EB0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 8694EA4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 239 @ 8694EB0 voice_keysplit voicegroup006, KeySplitTable2 @ 8694EBC voice_square_1 0, 2, 0, 0, 15, 0 @ 8694EC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694ED4 @@ -10946,7 +10946,7 @@ voicegroup101:: @ 8694C7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8694FC4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694FD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8694FDC - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 8694FE8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 8694FE8 voice_programmable_wave_alt ProgrammableWaveData_86B4880, 0, 7, 15, 0 @ 8694FF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8695000 voice_square_1 0, 2, 0, 0, 15, 0 @ 869500C @@ -11010,7 +11010,7 @@ voicegroup102:: @ 86951A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86952A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86952AC voice_square_1 0, 2, 0, 0, 15, 0 @ 86952B8 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 248 @ 86952C4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 248 @ 86952C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86952D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86952DC voice_square_1 0, 2, 0, 0, 15, 0 @ 86952E8 @@ -11032,7 +11032,7 @@ voicegroup102:: @ 86951A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86953A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86953B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86953C0 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 165 @ 86953CC + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 165 @ 86953CC voice_square_1 0, 2, 0, 0, 15, 0 @ 86953D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86953E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86953F0 @@ -11085,7 +11085,7 @@ voicegroup103:: @ 869557C voice_square_1 0, 2, 0, 0, 15, 0 @ 8695600 voice_square_1 0, 2, 0, 0, 15, 0 @ 869560C voice_square_1 0, 2, 0, 0, 15, 0 @ 8695618 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 8695624 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 8695624 voice_square_1 0, 2, 0, 0, 15, 0 @ 8695630 voice_square_1 0, 2, 0, 0, 15, 0 @ 869563C voice_square_1 0, 2, 0, 0, 15, 0 @ 8695648 @@ -11095,7 +11095,7 @@ voicegroup103:: @ 869557C voice_square_1 0, 2, 0, 0, 15, 0 @ 8695678 voice_square_1 0, 2, 0, 0, 15, 0 @ 8695684 voice_square_1 0, 2, 0, 0, 15, 0 @ 8695690 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 869569C + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 869569C voice_square_1 0, 2, 0, 0, 15, 0 @ 86956A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86956B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86956C0 @@ -11117,8 +11117,8 @@ voicegroup103:: @ 869557C voice_square_1 0, 2, 0, 0, 15, 0 @ 8695780 voice_square_1 0, 2, 0, 0, 15, 0 @ 869578C voice_square_1 0, 2, 0, 0, 15, 0 @ 8695798 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 86957A4 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 239 @ 86957B0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 86957A4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 239 @ 86957B0 voice_keysplit voicegroup006, KeySplitTable2 @ 86957BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86957C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86957D4 @@ -11205,7 +11205,7 @@ voicegroup104:: @ 8695B7C voice_keysplit_all voicegroup003 @ 8695B7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8695B88 voice_square_1 0, 2, 0, 0, 15, 0 @ 8695B94 - voice_directsound 60, 0, DirectSoundWaveData_8701A10, 255, 0, 206, 242 @ 8695BA0 + voice_directsound 60, 0, DirectSoundWaveData_unknown_koto_high, 255, 0, 206, 242 @ 8695BA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8695BAC voice_square_1 0, 2, 0, 0, 15, 0 @ 8695BB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8695BC4 @@ -11248,7 +11248,7 @@ voicegroup104:: @ 8695B7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8695D80 voice_square_1 0, 2, 0, 0, 15, 0 @ 8695D8C voice_square_1 0, 2, 0, 0, 15, 0 @ 8695D98 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 8695DA4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 8695DA4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8695DB0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8695DBC voice_square_1 0, 2, 0, 0, 15, 0 @ 8695DC8 @@ -11279,7 +11279,7 @@ voicegroup104:: @ 8695B7C voice_square_1 0, 2, 0, 0, 15, 0 @ 8695EF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8695F00 voice_square_1 0, 2, 0, 0, 15, 0 @ 8695F0C - voice_directsound 60, 0, DirectSoundWaveData_8703214, 255, 0, 255, 204 @ 8695F18 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_shakuhachi, 255, 0, 255, 204 @ 8695F18 voice_square_1 0, 2, 0, 0, 15, 0 @ 8695F24 voice_square_1 0, 2, 0, 0, 15, 0 @ 8695F30 voice_square_1_alt 0, 1, 2, 0, 12, 5 @ 8695F3C @@ -11309,7 +11309,7 @@ voicegroup104:: @ 8695B7C voice_square_1 0, 2, 0, 0, 15, 0 @ 869605C voice_square_1 0, 2, 0, 0, 15, 0 @ 8696068 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696074 - voice_directsound 60, 0, DirectSoundWaveData_8706DCC, 255, 0, 206, 242 @ 8696080 + voice_directsound 60, 0, DirectSoundWaveData_unknown_koto_low, 255, 0, 206, 242 @ 8696080 .align 2 voicegroup105:: @ 869608C @@ -11326,7 +11326,7 @@ voicegroup105:: @ 869608C voice_square_1 0, 2, 0, 0, 15, 0 @ 8696104 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696110 voice_square_1 0, 2, 0, 0, 15, 0 @ 869611C - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 216 @ 8696128 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 216 @ 8696128 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696134 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696140 voice_square_1 0, 2, 0, 0, 15, 0 @ 869614C @@ -11413,23 +11413,23 @@ voicegroup106:: @ 8696470 voice_square_1 0, 2, 0, 0, 15, 0 @ 86964F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696500 voice_square_1 0, 2, 0, 0, 15, 0 @ 869650C - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 8696518 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 8696518 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696524 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696530 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 64, 38, 128, 226 @ 869653C + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 64, 38, 128, 226 @ 869653C voice_square_1 0, 2, 0, 0, 15, 0 @ 8696548 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696554 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696560 voice_square_1 0, 2, 0, 0, 15, 0 @ 869656C voice_square_1 0, 2, 0, 0, 15, 0 @ 8696578 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696584 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 128, 249, 25, 76 @ 8696590 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 128, 249, 25, 76 @ 8696590 voice_square_1 0, 2, 0, 0, 15, 0 @ 869659C voice_square_1 0, 2, 0, 0, 15, 0 @ 86965A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86965B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86965C0 - voice_directsound 60, 0, DirectSoundWaveData_8709004, 255, 0, 255, 127 @ 86965CC - voice_directsound 60, 0, DirectSoundWaveData_870AE74, 255, 0, 255, 127 @ 86965D8 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 @ 86965CC + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 @ 86965D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86965E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86965F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86965FC @@ -11437,7 +11437,7 @@ voicegroup106:: @ 8696470 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696614 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696620 voice_square_1 0, 2, 0, 0, 15, 0 @ 869662C - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 8696638 + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 8696638 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696644 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696650 voice_square_1 0, 2, 0, 0, 15, 0 @ 869665C @@ -11445,8 +11445,8 @@ voicegroup106:: @ 8696470 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696674 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696680 voice_square_1 0, 2, 0, 0, 15, 0 @ 869668C - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 8696698 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 246 @ 86966A4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 8696698 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 246 @ 86966A4 voice_keysplit voicegroup006, KeySplitTable2 @ 86966B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86966BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86966C8 @@ -11461,7 +11461,7 @@ voicegroup106:: @ 8696470 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696734 voice_keysplit voicegroup009, KeySplitTable5 @ 8696740 voice_square_1 0, 2, 0, 0, 15, 0 @ 869674C - voice_directsound 60, 0, DirectSoundWaveData_870DE64, 255, 0, 255, 127 @ 8696758 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 127 @ 8696758 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696764 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696770 voice_square_1 0, 2, 0, 0, 15, 0 @ 869677C @@ -11472,7 +11472,7 @@ voicegroup106:: @ 8696470 voice_square_1 0, 2, 0, 0, 15, 0 @ 86967B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86967C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86967D0 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 86967DC + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 86967DC voice_programmable_wave_alt ProgrammableWaveData_86B4880, 0, 7, 15, 0 @ 86967E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86967F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696800 @@ -11544,7 +11544,7 @@ voicegroup107:: @ 8696A70 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696AF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696B00 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696B0C - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 8696B18 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 8696B18 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696B24 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696B30 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696B3C @@ -11554,7 +11554,7 @@ voicegroup107:: @ 8696A70 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696B6C voice_square_1 0, 2, 0, 0, 15, 0 @ 8696B78 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696B84 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 128, 249, 25, 76 @ 8696B90 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 128, 249, 25, 76 @ 8696B90 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696B9C voice_square_1 0, 2, 0, 0, 15, 0 @ 8696BA8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696BB4 @@ -11576,14 +11576,14 @@ voicegroup107:: @ 8696A70 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696C74 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696C80 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696C8C - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 8696C98 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 8696C98 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696CA4 voice_keysplit voicegroup006, KeySplitTable2 @ 8696CB0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696CBC voice_square_1 0, 2, 0, 0, 15, 0 @ 8696CC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696CD4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696CE0 - voice_directsound 60, 0, DirectSoundWaveData_86BA7E8, 255, 0, 255, 0 @ 8696CEC + voice_directsound 60, 0, DirectSoundWaveData_advanced_orchestra_voice_ahhs, 255, 0, 255, 0 @ 8696CEC voice_square_1 0, 2, 0, 0, 15, 0 @ 8696CF8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696D04 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696D10 @@ -11671,7 +11671,7 @@ voicegroup108:: @ 8697070 voice_square_1 0, 2, 0, 0, 15, 0 @ 86970C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86970D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86970DC - voice_directsound 60, 0, DirectSoundWaveData_8710AB8, 255, 188, 139, 239 @ 86970E8 + voice_directsound 60, 0, DirectSoundWaveData_heart_of_asia_gamelan, 255, 188, 139, 239 @ 86970E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86970F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8697100 voice_square_1 0, 2, 0, 0, 15, 0 @ 869710C @@ -11685,7 +11685,7 @@ voicegroup108:: @ 8697070 voice_square_1 0, 2, 0, 0, 15, 0 @ 869716C voice_square_1 0, 2, 0, 0, 15, 0 @ 8697178 voice_square_1 0, 2, 0, 0, 15, 0 @ 8697184 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 128, 249, 25, 76 @ 8697190 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 128, 249, 25, 76 @ 8697190 voice_square_1 0, 2, 0, 0, 15, 0 @ 869719C voice_square_1 0, 2, 0, 0, 15, 0 @ 86971A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86971B4 @@ -11696,7 +11696,7 @@ voicegroup108:: @ 8697070 voice_square_1 0, 2, 0, 0, 15, 0 @ 86971F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86971FC voice_square_1 0, 2, 0, 0, 15, 0 @ 8697208 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 8697214 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 8697214 voice_square_1 0, 2, 0, 0, 15, 0 @ 8697220 voice_square_1 0, 2, 0, 0, 15, 0 @ 869722C voice_square_1 0, 2, 0, 0, 15, 0 @ 8697238 @@ -11707,7 +11707,7 @@ voicegroup108:: @ 8697070 voice_square_1 0, 2, 0, 0, 15, 0 @ 8697274 voice_square_1 0, 2, 0, 0, 15, 0 @ 8697280 voice_square_1 0, 2, 0, 0, 15, 0 @ 869728C - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 8697298 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 8697298 voice_square_1 0, 2, 0, 0, 15, 0 @ 86972A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86972B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86972BC @@ -11811,8 +11811,8 @@ voicegroup109:: @ 8697670 voice_square_1 0, 2, 0, 0, 15, 0 @ 8697730 voice_square_1 0, 2, 0, 0, 15, 0 @ 869773C voice_square_1 0, 2, 0, 0, 15, 0 @ 8697748 - voice_directsound 60, 0, DirectSoundWaveData_8715038, 255, 76, 154, 188 @ 8697754 - voice_directsound 60, 0, DirectSoundWaveData_8717980, 255, 76, 154, 188 @ 8697760 + voice_directsound 60, 0, DirectSoundWaveData_unknown_church_organ, 255, 76, 154, 188 @ 8697754 + voice_directsound 60, 0, DirectSoundWaveData_emu_ii_pipe_organ, 255, 76, 154, 188 @ 8697760 voice_square_1 0, 2, 0, 0, 15, 0 @ 869776C voice_square_1 0, 2, 0, 0, 15, 0 @ 8697778 voice_square_1 0, 2, 0, 0, 15, 0 @ 8697784 @@ -11827,7 +11827,7 @@ voicegroup109:: @ 8697670 voice_square_1 0, 2, 0, 0, 15, 0 @ 86977F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86977FC voice_square_1 0, 2, 0, 0, 15, 0 @ 8697808 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 8697814 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 8697814 voice_square_1 0, 2, 0, 0, 15, 0 @ 8697820 voice_square_1 0, 2, 0, 0, 15, 0 @ 869782C voice_square_1 0, 2, 0, 0, 15, 0 @ 8697838 @@ -11892,7 +11892,7 @@ voicegroup110:: @ 8697A54 voice_square_1 0, 2, 0, 0, 15, 0 @ 8697AD8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8697AE4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8697AF0 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 8697AFC + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 8697AFC voice_square_1 0, 2, 0, 0, 15, 0 @ 8697B08 voice_square_1 0, 2, 0, 0, 15, 0 @ 8697B14 voice_square_1 0, 2, 0, 0, 15, 0 @ 8697B20 @@ -11924,8 +11924,8 @@ voicegroup110:: @ 8697A54 voice_square_1 0, 2, 0, 0, 15, 0 @ 8697C58 voice_square_1 0, 2, 0, 0, 15, 0 @ 8697C64 voice_square_1 0, 2, 0, 0, 15, 0 @ 8697C70 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 8697C7C - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 239 @ 8697C88 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 8697C7C + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 239 @ 8697C88 voice_keysplit voicegroup006, KeySplitTable2 @ 8697C94 voice_square_1 0, 2, 0, 0, 15, 0 @ 8697CA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8697CAC @@ -12026,7 +12026,7 @@ voicegroup111:: @ 8698054 voice_square_1 0, 2, 0, 0, 15, 0 @ 86980FC voice_square_1 0, 2, 0, 0, 15, 0 @ 8698108 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698114 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 127 @ 8698120 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 127 @ 8698120 voice_square_1 0, 2, 0, 0, 15, 0 @ 869812C voice_square_1 0, 2, 0, 0, 15, 0 @ 8698138 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698144 @@ -12038,9 +12038,9 @@ voicegroup111:: @ 8698054 voice_square_1 0, 2, 0, 0, 15, 0 @ 869818C voice_square_1 0, 2, 0, 0, 15, 0 @ 8698198 voice_square_1 0, 2, 0, 0, 15, 0 @ 86981A4 - voice_directsound 60, 0, DirectSoundWaveData_8709004, 255, 0, 255, 226 @ 86981B0 - voice_directsound 60, 0, DirectSoundWaveData_870AE74, 255, 0, 255, 195 @ 86981BC - voice_directsound 60, 0, DirectSoundWaveData_88DA388, 255, 0, 255, 195 @ 86981C8 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 226 @ 86981B0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 195 @ 86981BC + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 195 @ 86981C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86981D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86981E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86981EC @@ -12071,7 +12071,7 @@ voicegroup111:: @ 8698054 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698318 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698324 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698330 - voice_directsound 60, 0, DirectSoundWaveData_870DE64, 255, 0, 255, 195 @ 869833C + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 195 @ 869833C voice_square_1 0, 2, 0, 0, 15, 0 @ 8698348 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698354 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698360 @@ -12154,17 +12154,17 @@ voicegroup112:: @ 8698654 voice_square_1 0, 2, 0, 0, 15, 0 @ 86986D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86986E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86986F0 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 86986FC + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 86986FC voice_square_1 0, 2, 0, 0, 15, 0 @ 8698708 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698714 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 210 @ 8698720 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 210 @ 8698720 voice_square_1 0, 2, 0, 0, 15, 0 @ 869872C voice_square_1 0, 2, 0, 0, 15, 0 @ 8698738 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698744 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698750 voice_square_1 0, 2, 0, 0, 15, 0 @ 869875C voice_square_1 0, 2, 0, 0, 15, 0 @ 8698768 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 76 @ 8698774 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 76 @ 8698774 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698780 voice_square_1 0, 2, 0, 0, 15, 0 @ 869878C voice_square_1 0, 2, 0, 0, 15, 0 @ 8698798 @@ -12175,10 +12175,10 @@ voicegroup112:: @ 8698654 voice_square_1 0, 2, 0, 0, 15, 0 @ 86987D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86987E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86987EC - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 86987F8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 86987F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698804 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698810 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 128, 252, 0, 115 @ 869881C + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 128, 252, 0, 115 @ 869881C voice_square_1 0, 2, 0, 0, 15, 0 @ 8698828 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698834 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698840 @@ -12186,15 +12186,15 @@ voicegroup112:: @ 8698654 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698858 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698864 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698870 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 869887C + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 869887C voice_square_1 0, 2, 0, 0, 15, 0 @ 8698888 voice_keysplit voicegroup006, KeySplitTable2 @ 8698894 voice_square_1 0, 2, 0, 0, 15, 0 @ 86988A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86988AC voice_square_1 0, 2, 0, 0, 15, 0 @ 86988B8 - voice_directsound 60, 0, DirectSoundWaveData_86BA7E8, 128, 165, 128, 188 @ 86988C4 - voice_directsound 60, 0, DirectSoundWaveData_87190E0, 128, 165, 128, 204 @ 86988D0 - voice_directsound 60, 0, DirectSoundWaveData_871A724, 128, 165, 128, 188 @ 86988DC + voice_directsound 60, 0, DirectSoundWaveData_advanced_orchestra_voice_ahhs, 128, 165, 128, 188 @ 86988C4 + voice_directsound 60, 0, DirectSoundWaveData_unused_unknown_female_voice, 128, 165, 128, 204 @ 86988D0 + voice_directsound 60, 0, DirectSoundWaveData_unused_unknown_male_voice, 128, 165, 128, 188 @ 86988DC voice_square_1 0, 2, 0, 0, 15, 0 @ 86988E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86988F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698900 @@ -12283,9 +12283,9 @@ voicegroup113:: @ 8698C54 voice_programmable_wave_alt ProgrammableWaveData_86B48E0, 0, 7, 15, 1 @ 8698CC0 voice_programmable_wave_alt ProgrammableWaveData_86B48F0, 0, 7, 15, 1 @ 8698CCC voice_square_1 0, 2, 0, 0, 15, 0 @ 8698CD8 - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 8698CE4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 8698CE4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698CF0 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 8698CFC + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 8698CFC voice_square_1 0, 2, 0, 0, 15, 0 @ 8698D08 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698D14 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698D20 @@ -12300,16 +12300,16 @@ voicegroup113:: @ 8698C54 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698D8C voice_square_1 0, 2, 0, 0, 15, 0 @ 8698D98 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698DA4 - voice_directsound 60, 0, DirectSoundWaveData_8709004, 255, 0, 255, 195 @ 8698DB0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 195 @ 8698DB0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698DBC voice_square_1 0, 2, 0, 0, 15, 0 @ 8698DC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698DD4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698DE0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698DEC - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 8698DF8 - voice_directsound 60, 0, DirectSoundWaveData_86B776C, 255, 235, 128, 99 @ 8698E04 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 8698DF8 + voice_directsound 60, 0, DirectSoundWaveData_jv1080_slap_bass, 255, 235, 128, 99 @ 8698E04 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698E10 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 8698E1C + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 8698E1C voice_programmable_wave_alt ProgrammableWaveData_86B4920, 0, 7, 15, 1 @ 8698E28 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698E34 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698E40 @@ -12318,7 +12318,7 @@ voicegroup113:: @ 8698C54 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698E64 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698E70 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698E7C - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 180, 246 @ 8698E88 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 180, 246 @ 8698E88 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698E94 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698EA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698EAC @@ -12344,7 +12344,7 @@ voicegroup113:: @ 8698C54 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698F9C voice_square_1 0, 2, 0, 0, 15, 0 @ 8698FA8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698FB4 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 127 @ 8698FC0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 127 @ 8698FC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698FCC voice_square_1 0, 2, 0, 0, 15, 0 @ 8698FD8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8698FE4 @@ -12416,7 +12416,7 @@ voicegroup114:: @ 8699254 voice_square_1 0, 2, 0, 0, 15, 0 @ 86992D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86992E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86992F0 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 216, 90, 242 @ 86992FC + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 216, 90, 242 @ 86992FC voice_square_1 0, 2, 0, 0, 15, 0 @ 8699308 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699314 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699320 @@ -12435,7 +12435,7 @@ voicegroup114:: @ 8699254 voice_square_1 0, 2, 0, 0, 15, 0 @ 86993BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86993C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86993D4 - voice_directsound 60, 0, DirectSoundWaveData_86FFDC0, 255, 253, 0, 149 @ 86993E0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pick_bass, 255, 253, 0, 149 @ 86993E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86993EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86993F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699404 @@ -12449,7 +12449,7 @@ voicegroup114:: @ 8699254 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699464 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699470 voice_square_1 0, 2, 0, 0, 15, 0 @ 869947C - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 8699488 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 8699488 voice_keysplit voicegroup006, KeySplitTable2 @ 8699494 voice_square_1 0, 2, 0, 0, 15, 0 @ 86994A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86994AC @@ -12475,7 +12475,7 @@ voicegroup114:: @ 8699254 voice_square_1 0, 2, 0, 0, 15, 0 @ 869959C voice_square_1 0, 2, 0, 0, 15, 0 @ 86995A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86995B4 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 86995C0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 86995C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86995CC voice_square_1 0, 2, 0, 0, 15, 0 @ 86995D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86995E4 @@ -12529,7 +12529,7 @@ voicegroup114:: @ 8699254 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699824 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699830 voice_square_1 0, 2, 0, 0, 15, 0 @ 869983C - voice_directsound 60, 0, DirectSoundWaveData_86CB6B8, 255, 246, 0, 216 @ 8699848 + voice_directsound 60, 0, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 246, 0, 216 @ 8699848 .align 2 voicegroup115:: @ 8699854 @@ -12537,8 +12537,8 @@ voicegroup115:: @ 8699854 voice_keysplit voicegroup005, KeySplitTable1 @ 8699860 voice_square_1 0, 2, 0, 0, 15, 0 @ 869986C voice_square_1 0, 2, 0, 0, 15, 0 @ 8699878 - voice_directsound 60, 0, DirectSoundWaveData_871CBCC, 128, 249, 0, 188 @ 8699884 - voice_directsound 60, 0, DirectSoundWaveData_871F234, 255, 188, 103, 165 @ 8699890 + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 128, 249, 0, 188 @ 8699884 + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_high, 255, 188, 103, 165 @ 8699890 voice_square_1 0, 2, 0, 0, 15, 0 @ 869989C voice_square_1 0, 2, 0, 0, 15, 0 @ 86998A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86998B4 @@ -12547,40 +12547,40 @@ voicegroup115:: @ 8699854 voice_square_1 0, 2, 0, 0, 15, 0 @ 86998D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86998E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86998F0 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 86998FC + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 86998FC voice_square_1 0, 2, 0, 0, 15, 0 @ 8699908 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699914 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 127 @ 8699920 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 127 @ 8699920 voice_square_1 0, 2, 0, 0, 15, 0 @ 869992C voice_square_1 0, 2, 0, 0, 15, 0 @ 8699938 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699944 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699950 voice_square_1 0, 2, 0, 0, 15, 0 @ 869995C voice_square_1 0, 2, 0, 0, 15, 0 @ 8699968 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 128, 249, 25, 204 @ 8699974 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 165, 128, 204 @ 8699980 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 128, 249, 25, 204 @ 8699974 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 165, 128, 204 @ 8699980 voice_square_1 0, 2, 0, 0, 15, 0 @ 869998C voice_square_1 0, 2, 0, 0, 15, 0 @ 8699998 voice_square_1 0, 2, 0, 0, 15, 0 @ 86999A4 - voice_directsound 60, 0, DirectSoundWaveData_8709004, 255, 0, 255, 127 @ 86999B0 - voice_directsound 60, 0, DirectSoundWaveData_870AE74, 255, 165, 154, 165 @ 86999BC + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 @ 86999B0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 165, 154, 165 @ 86999BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86999C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86999D4 - voice_directsound 60, 0, DirectSoundWaveData_86FFDC0, 255, 253, 0, 149 @ 86999E0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pick_bass, 255, 253, 0, 149 @ 86999E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86999EC - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 198 @ 86999F8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 198 @ 86999F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699A04 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699A10 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 146 @ 8699A1C + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 146 @ 8699A1C voice_square_1 0, 2, 0, 0, 15, 0 @ 8699A28 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699A34 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699A40 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699A4C voice_square_1 0, 2, 0, 0, 15, 0 @ 8699A58 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699A64 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 216, 0, 165 @ 8699A70 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 8699A7C - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 8699A88 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 216, 0, 165 @ 8699A70 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 8699A7C + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 8699A88 voice_keysplit voicegroup006, KeySplitTable2 @ 8699A94 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699AA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699AAC @@ -12595,7 +12595,7 @@ voicegroup115:: @ 8699854 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699B18 voice_keysplit voicegroup009, KeySplitTable5 @ 8699B24 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699B30 - voice_directsound 60, 0, DirectSoundWaveData_870DE64, 255, 165, 180, 165 @ 8699B3C + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 165, 180, 165 @ 8699B3C voice_square_1 0, 2, 0, 0, 15, 0 @ 8699B48 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699B54 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699B60 @@ -12653,7 +12653,7 @@ voicegroup115:: @ 8699854 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699DD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699DDC voice_square_1 0, 2, 0, 0, 15, 0 @ 8699DE8 - voice_directsound 60, 0, DirectSoundWaveData_88DA388, 255, 0, 255, 165 @ 8699DF4 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 165 @ 8699DF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699E00 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699E0C voice_square_1 0, 2, 0, 0, 15, 0 @ 8699E18 @@ -12681,28 +12681,28 @@ voicegroup116:: @ 8699E54 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699EFC voice_square_1 0, 2, 0, 0, 15, 0 @ 8699F08 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699F14 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 128, 146, 190, 115 @ 8699F20 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 128, 146, 190, 115 @ 8699F20 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699F2C voice_square_1 0, 2, 0, 0, 15, 0 @ 8699F38 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699F44 - voice_directsound 60, 0, DirectSoundWaveData_87410E0, 255, 0, 255, 165 @ 8699F50 + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 255, 0, 255, 165 @ 8699F50 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699F5C voice_square_1 0, 2, 0, 0, 15, 0 @ 8699F68 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 165, 128, 216 @ 8699F74 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 165, 128, 216 @ 8699F74 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699F80 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699F8C voice_square_1 0, 2, 0, 0, 15, 0 @ 8699F98 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699FA4 - voice_directsound 60, 0, DirectSoundWaveData_8709004, 255, 0, 255, 127 @ 8699FB0 - voice_directsound 60, 0, DirectSoundWaveData_870AE74, 255, 0, 255, 127 @ 8699FBC + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 @ 8699FB0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 @ 8699FBC voice_square_1 0, 2, 0, 0, 15, 0 @ 8699FC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699FD4 - voice_directsound 60, 0, DirectSoundWaveData_86FFDC0, 255, 253, 0, 149 @ 8699FE0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pick_bass, 255, 253, 0, 149 @ 8699FE0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699FEC voice_square_1 0, 2, 0, 0, 15, 0 @ 8699FF8 - voice_directsound 60, 0, DirectSoundWaveData_86BEF94, 255, 165, 180, 216 @ 869A004 + voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_unison_slap, 255, 165, 180, 216 @ 869A004 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A010 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 869A01C + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 869A01C voice_square_1 0, 2, 0, 0, 15, 0 @ 869A028 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A034 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A040 @@ -12726,7 +12726,7 @@ voicegroup116:: @ 8699E54 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A118 voice_keysplit voicegroup009, KeySplitTable5 @ 869A124 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A130 - voice_directsound 60, 0, DirectSoundWaveData_870DE64, 255, 0, 255, 127 @ 869A13C + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 127 @ 869A13C voice_square_1 0, 2, 0, 0, 15, 0 @ 869A148 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A154 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A160 @@ -12828,7 +12828,7 @@ voicegroup117:: @ 869A454 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A5BC voice_square_1 0, 2, 0, 0, 15, 0 @ 869A5C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A5D4 - voice_directsound 60, 0, DirectSoundWaveData_86FFDC0, 255, 253, 0, 149 @ 869A5E0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pick_bass, 255, 253, 0, 149 @ 869A5E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A5EC voice_square_1 0, 2, 0, 0, 15, 0 @ 869A5F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A604 @@ -12841,8 +12841,8 @@ voicegroup117:: @ 869A454 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A658 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A664 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A670 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 246, 0, 235 @ 869A67C - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 869A688 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 246, 0, 235 @ 869A67C + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 869A688 voice_keysplit voicegroup006, KeySplitTable2 @ 869A694 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A6A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A6AC @@ -12894,14 +12894,14 @@ voicegroup118:: @ 869A82C voice_square_1 0, 2, 0, 0, 15, 0 @ 869A8B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A8BC voice_square_1 0, 2, 0, 0, 15, 0 @ 869A8C8 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 250, 0, 242 @ 869A8D4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 250, 0, 242 @ 869A8D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A8E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A8EC - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 127 @ 869A8F8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 127 @ 869A8F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A904 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A910 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A91C - voice_directsound 60, 0, DirectSoundWaveData_87410E0, 255, 0, 255, 165 @ 869A928 + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 255, 0, 255, 165 @ 869A928 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A934 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A940 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A94C @@ -12913,12 +12913,12 @@ voicegroup118:: @ 869A82C voice_square_1 0, 2, 0, 0, 15, 0 @ 869A994 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A9A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A9AC - voice_directsound 60, 0, DirectSoundWaveData_86FFDC0, 255, 253, 0, 149 @ 869A9B8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pick_bass, 255, 253, 0, 149 @ 869A9B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A9C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A9D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869A9DC voice_square_1 0, 2, 0, 0, 15, 0 @ 869A9E8 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 869A9F4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 869A9F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 869AA00 voice_square_1 0, 2, 0, 0, 15, 0 @ 869AA0C voice_square_1 0, 2, 0, 0, 15, 0 @ 869AA18 @@ -12926,8 +12926,8 @@ voicegroup118:: @ 869A82C voice_square_1 0, 2, 0, 0, 15, 0 @ 869AA30 voice_square_1 0, 2, 0, 0, 15, 0 @ 869AA3C voice_square_1 0, 2, 0, 0, 15, 0 @ 869AA48 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 246, 0, 235 @ 869AA54 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 869AA60 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 246, 0, 235 @ 869AA54 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 869AA60 voice_keysplit voicegroup006, KeySplitTable2 @ 869AA6C voice_square_1 0, 2, 0, 0, 15, 0 @ 869AA78 voice_square_1 0, 2, 0, 0, 15, 0 @ 869AA84 @@ -12970,7 +12970,7 @@ voicegroup118:: @ 869A82C voice_square_1 0, 2, 0, 0, 15, 0 @ 869AC40 voice_square_1 0, 2, 0, 0, 15, 0 @ 869AC4C voice_square_1 0, 2, 0, 0, 15, 0 @ 869AC58 - voice_directsound 60, 0, DirectSoundWaveData_873A594, 255, 0, 255, 127 @ 869AC64 + voice_directsound 60, 0, DirectSoundWaveData_unknown_polysynth, 255, 0, 255, 127 @ 869AC64 .align 2 voicegroup119:: @ 869AC70 @@ -12991,7 +12991,7 @@ voicegroup119:: @ 869AC70 voice_square_1 0, 2, 0, 0, 15, 0 @ 869AD18 voice_square_1 0, 2, 0, 0, 15, 0 @ 869AD24 voice_square_1 0, 2, 0, 0, 15, 0 @ 869AD30 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 127 @ 869AD3C + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 127 @ 869AD3C voice_square_1 0, 2, 0, 0, 15, 0 @ 869AD48 voice_square_1 0, 2, 0, 0, 15, 0 @ 869AD54 voice_square_1 0, 2, 0, 0, 15, 0 @ 869AD60 @@ -13007,7 +13007,7 @@ voicegroup119:: @ 869AC70 voice_square_1 0, 2, 0, 0, 15, 0 @ 869ADD8 voice_square_1 0, 2, 0, 0, 15, 0 @ 869ADE4 voice_square_1 0, 2, 0, 0, 15, 0 @ 869ADF0 - voice_directsound 60, 0, DirectSoundWaveData_86FFDC0, 255, 253, 0, 149 @ 869ADFC + voice_directsound 60, 0, DirectSoundWaveData_sc88_pick_bass, 255, 253, 0, 149 @ 869ADFC voice_square_1 0, 2, 0, 0, 15, 0 @ 869AE08 voice_square_1 0, 2, 0, 0, 15, 0 @ 869AE14 voice_square_1 0, 2, 0, 0, 15, 0 @ 869AE20 @@ -13020,8 +13020,8 @@ voicegroup119:: @ 869AC70 voice_square_1 0, 2, 0, 0, 15, 0 @ 869AE74 voice_square_1 0, 2, 0, 0, 15, 0 @ 869AE80 voice_square_1 0, 2, 0, 0, 15, 0 @ 869AE8C - voice_directsound_no_resample 60, 0, DirectSoundWaveData_87205DC, 255, 246, 0, 226 @ 869AE98 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 869AEA4 + voice_directsound_no_resample 60, 0, DirectSoundWaveData_sc88_timpani_with_snare, 255, 246, 0, 226 @ 869AE98 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 869AEA4 voice_keysplit voicegroup006, KeySplitTable2 @ 869AEB0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869AEBC voice_square_1 0, 2, 0, 0, 15, 0 @ 869AEC8 @@ -13101,7 +13101,7 @@ voicegroup120:: @ 869B0B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B21C voice_square_1 0, 2, 0, 0, 15, 0 @ 869B228 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B234 - voice_directsound 60, 0, DirectSoundWaveData_86FFDC0, 255, 253, 0, 149 @ 869B240 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pick_bass, 255, 253, 0, 149 @ 869B240 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B24C voice_square_1 0, 2, 0, 0, 15, 0 @ 869B258 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B264 @@ -13113,9 +13113,9 @@ voicegroup120:: @ 869B0B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B2AC voice_square_1 0, 2, 0, 0, 15, 0 @ 869B2B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B2C4 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 216, 0, 165 @ 869B2D0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 216, 0, 165 @ 869B2D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B2DC - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 869B2E8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 869B2E8 voice_keysplit voicegroup006, KeySplitTable2 @ 869B2F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B300 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B30C @@ -13195,7 +13195,7 @@ voicegroup121:: @ 869B4F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B660 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B66C voice_square_1 0, 2, 0, 0, 15, 0 @ 869B678 - voice_directsound 60, 0, DirectSoundWaveData_86FFDC0, 255, 253, 0, 149 @ 869B684 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pick_bass, 255, 253, 0, 149 @ 869B684 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B690 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B69C voice_square_1 0, 2, 0, 0, 15, 0 @ 869B6A8 @@ -13207,9 +13207,9 @@ voicegroup121:: @ 869B4F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B6F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B6FC voice_square_1 0, 2, 0, 0, 15, 0 @ 869B708 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 216, 0, 165 @ 869B714 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 216, 0, 165 @ 869B714 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B720 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 869B72C + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 869B72C voice_keysplit voicegroup006, KeySplitTable2 @ 869B738 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B744 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B750 @@ -13235,7 +13235,7 @@ voicegroup121:: @ 869B4F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B840 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B84C voice_square_1 0, 2, 0, 0, 15, 0 @ 869B858 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 869B864 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 869B864 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B870 voice_square_1 0, 2, 0, 0, 15, 0 @ 869B87C voice_square_1 0, 2, 0, 0, 15, 0 @ 869B888 @@ -13287,7 +13287,7 @@ voicegroup122:: @ 869B900 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BA8C voice_square_1 0, 2, 0, 0, 15, 0 @ 869BA98 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BAA4 - voice_directsound 60, 0, DirectSoundWaveData_86B776C, 255, 235, 128, 99 @ 869BAB0 + voice_directsound 60, 0, DirectSoundWaveData_jv1080_slap_bass, 255, 235, 128, 99 @ 869BAB0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BABC voice_square_1 0, 2, 0, 0, 15, 0 @ 869BAC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BAD4 @@ -13296,9 +13296,9 @@ voicegroup122:: @ 869B900 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BAF8 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BB04 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BB10 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 216, 0, 165 @ 869BB1C + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 216, 0, 165 @ 869BB1C voice_square_1 0, 2, 0, 0, 15, 0 @ 869BB28 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 869BB34 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 869BB34 voice_keysplit voicegroup006, KeySplitTable2 @ 869BB40 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BB4C voice_square_1 0, 2, 0, 0, 15, 0 @ 869BB58 @@ -13307,7 +13307,7 @@ voicegroup122:: @ 869B900 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BB7C voice_square_1 0, 2, 0, 0, 15, 0 @ 869BB88 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BB94 - voice_directsound 60, 0, DirectSoundWaveData_873A594, 255, 165, 154, 127 @ 869BBA0 + voice_directsound 60, 0, DirectSoundWaveData_unknown_polysynth, 255, 165, 154, 127 @ 869BBA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BBAC voice_square_1 0, 2, 0, 0, 15, 0 @ 869BBB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BBC4 @@ -13352,7 +13352,7 @@ voicegroup123:: @ 869BCF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BD74 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BD80 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BD8C - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 216, 90, 242 @ 869BD98 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 216, 90, 242 @ 869BD98 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BDA4 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BDB0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BDBC @@ -13371,7 +13371,7 @@ voicegroup123:: @ 869BCF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BE58 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BE64 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BE70 - voice_directsound 60, 0, DirectSoundWaveData_86FFDC0, 255, 253, 0, 149 @ 869BE7C + voice_directsound 60, 0, DirectSoundWaveData_sc88_pick_bass, 255, 253, 0, 149 @ 869BE7C voice_square_1 0, 2, 0, 0, 15, 0 @ 869BE88 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BE94 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BEA0 @@ -13385,7 +13385,7 @@ voicegroup123:: @ 869BCF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BF00 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BF0C voice_square_1 0, 2, 0, 0, 15, 0 @ 869BF18 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 869BF24 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 869BF24 voice_keysplit voicegroup006, KeySplitTable2 @ 869BF30 voice_square_1 0, 2, 0, 0, 15, 0 @ 869BF3C voice_square_1 0, 2, 0, 0, 15, 0 @ 869BF48 @@ -13411,7 +13411,7 @@ voicegroup123:: @ 869BCF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C038 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C044 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C050 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 869C05C + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 869C05C voice_square_1 0, 2, 0, 0, 15, 0 @ 869C068 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C074 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C080 @@ -13465,7 +13465,7 @@ voicegroup123:: @ 869BCF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C2C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C2CC voice_square_1 0, 2, 0, 0, 15, 0 @ 869C2D8 - voice_directsound 60, 0, DirectSoundWaveData_86CB6B8, 255, 246, 0, 216 @ 869C2E4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 246, 0, 216 @ 869C2E4 .align 2 voicegroup124:: @ 869C2F0 @@ -13502,7 +13502,7 @@ voicegroup124:: @ 869C2F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C458 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C464 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C470 - voice_directsound 60, 0, DirectSoundWaveData_86FFDC0, 255, 253, 0, 149 @ 869C47C + voice_directsound 60, 0, DirectSoundWaveData_sc88_pick_bass, 255, 253, 0, 149 @ 869C47C voice_square_1 0, 2, 0, 0, 15, 0 @ 869C488 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C494 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C4A0 @@ -13515,8 +13515,8 @@ voicegroup124:: @ 869C2F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C4F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C500 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C50C - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 246, 0, 235 @ 869C518 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 869C524 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 246, 0, 235 @ 869C518 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 869C524 voice_keysplit voicegroup006, KeySplitTable2 @ 869C530 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C53C voice_square_1 0, 2, 0, 0, 15, 0 @ 869C548 @@ -13597,7 +13597,7 @@ voicegroup125:: @ 869C704 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C8A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C8B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C8C0 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 869C8CC + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 869C8CC voice_square_1 0, 2, 0, 0, 15, 0 @ 869C8D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C8E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C8F0 @@ -13606,7 +13606,7 @@ voicegroup125:: @ 869C704 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C914 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C920 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C92C - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 869C938 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 869C938 voice_keysplit voicegroup006, KeySplitTable2 @ 869C944 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C950 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C95C @@ -13679,7 +13679,7 @@ voicegroup126:: @ 869CAF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 869CC5C voice_square_1 0, 2, 0, 0, 15, 0 @ 869CC68 voice_square_1 0, 2, 0, 0, 15, 0 @ 869CC74 - voice_directsound 60, 0, DirectSoundWaveData_86B776C, 255, 235, 128, 99 @ 869CC80 + voice_directsound 60, 0, DirectSoundWaveData_jv1080_slap_bass, 255, 235, 128, 99 @ 869CC80 voice_square_1 0, 2, 0, 0, 15, 0 @ 869CC8C voice_square_1 0, 2, 0, 0, 15, 0 @ 869CC98 voice_square_1 0, 2, 0, 0, 15, 0 @ 869CCA4 @@ -13693,7 +13693,7 @@ voicegroup126:: @ 869CAF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 869CD04 voice_square_1 0, 2, 0, 0, 15, 0 @ 869CD10 voice_square_1 0, 2, 0, 0, 15, 0 @ 869CD1C - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 869CD28 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 869CD28 voice_keysplit voicegroup006, KeySplitTable2 @ 869CD34 voice_square_1 0, 2, 0, 0, 15, 0 @ 869CD40 voice_square_1 0, 2, 0, 0, 15, 0 @ 869CD4C @@ -13772,12 +13772,12 @@ voicegroup126:: @ 869CAF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 869D0B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 869D0C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 869D0D0 - voice_directsound 60, 0, DirectSoundWaveData_86CB6B8, 255, 235, 0, 216 @ 869D0DC - voice_directsound 60, 0, DirectSoundWaveData_86CB6B8, 255, 246, 0, 216 @ 869D0E8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 216 @ 869D0DC + voice_directsound 60, 0, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 246, 0, 216 @ 869D0E8 .align 2 voicegroup127:: @ 869D0F4 - voice_directsound 60, 0, DirectSoundWaveData_8721AAC, 255, 249, 103, 165 @ 869D0F4 + voice_directsound 60, 0, DirectSoundWaveData_unknown_synth_snare, 255, 249, 103, 165 @ 869D0F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 869D100 voice_square_1 0, 2, 0, 0, 15, 0 @ 869D10C voice_square_1 0, 2, 0, 0, 15, 0 @ 869D118 @@ -13790,8 +13790,8 @@ voicegroup127:: @ 869D0F4 voice_square_1_alt 0, 2, 2, 0, 15, 0 @ 869D16C voice_square_1_alt 0, 1, 2, 0, 15, 0 @ 869D178 voice_square_1_alt 23, 1, 0, 1, 9, 0 @ 869D184 - voice_directsound 60, 0, DirectSoundWaveData_87224B8, 255, 0, 255, 165 @ 869D190 - voice_directsound 60, 0, DirectSoundWaveData_87224B8, 255, 226, 0, 165 @ 869D19C + voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 0, 255, 165 @ 869D190 + voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 226, 0, 165 @ 869D19C voice_square_1_alt 0, 2, 0, 6, 0, 1 @ 869D1A8 voice_square_1_alt 36, 0, 0, 2, 0, 0 @ 869D1B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 869D1C0 @@ -13824,7 +13824,7 @@ voicegroup127:: @ 869D0F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 869D304 voice_square_1 0, 2, 0, 0, 15, 0 @ 869D310 voice_square_1 0, 2, 0, 0, 15, 0 @ 869D31C - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 869D328 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 869D328 voice_keysplit voicegroup006, KeySplitTable2 @ 869D334 voice_square_1 0, 2, 0, 0, 15, 0 @ 869D340 voice_square_1 0, 2, 0, 0, 15, 0 @ 869D34C @@ -13908,80 +13908,80 @@ voicegroup127:: @ 869D0F4 .align 2 voicegroup128:: @ 869D6F4 - voice_directsound_no_resample 60, 0, DirectSoundWaveData_87240CC, 255, 249, 0, 165 @ 869D6F4 - voice_directsound_alt 60, 0, DirectSoundWaveData_87240CC, 255, 0, 255, 165 @ 869D700 - voice_directsound 60, 0, DirectSoundWaveData_8721AAC, 255, 0, 255, 165 @ 869D70C - voice_directsound 60, 0, DirectSoundWaveData_86B5D04, 255, 242, 0, 127 @ 869D718 + voice_directsound_no_resample 60, 0, DirectSoundWaveData_bicycle_bell, 255, 249, 0, 165 @ 869D6F4 + voice_directsound_alt 60, 0, DirectSoundWaveData_bicycle_bell, 255, 0, 255, 165 @ 869D700 + voice_directsound 60, 0, DirectSoundWaveData_unknown_synth_snare, 255, 0, 255, 165 @ 869D70C + voice_directsound 60, 0, DirectSoundWaveData_sc88_glockenspiel, 255, 242, 0, 127 @ 869D718 voice_noise_alt 0, 0, 1, 0, 1 @ 869D724 voice_noise_alt 1, 0, 1, 0, 1 @ 869D730 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 255, 165 @ 869D73C + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 255, 165 @ 869D73C voice_square_1_alt 0, 2, 0, 2, 0, 1 @ 869D748 voice_directsound 60, 0, DirectSoundWaveData_8725A2C, 255, 0, 255, 165 @ 869D754 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 0, 255, 127 @ 869D760 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 0, 255, 127 @ 869D760 voice_directsound 60, 0, DirectSoundWaveData_872762C, 255, 0, 255, 127 @ 869D76C voice_noise_alt 1, 0, 2, 0, 0 @ 869D778 voice_square_1 103, 3, 2, 7, 0, 0 @ 869D784 voice_square_2 3, 2, 7, 0, 0 @ 869D790 - voice_directsound 60, 0, DirectSoundWaveData_87224B8, 255, 226, 0, 127 @ 869D79C + voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 226, 0, 127 @ 869D79C voice_directsound 60, 0, DirectSoundWaveData_872921C, 255, 0, 255, 0 @ 869D7A8 - voice_directsound 60, 0, DirectSoundWaveData_87224B8, 255, 204, 0, 127 @ 869D7B4 + voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 204, 0, 127 @ 869D7B4 voice_square_1_alt 0, 2, 0, 2, 0, 1 @ 869D7C0 voice_directsound 60, 0, DirectSoundWaveData_872A5D0, 255, 0, 255, 127 @ 869D7CC - voice_directsound 60, 0, DirectSoundWaveData_87224B8, 255, 0, 255, 127 @ 869D7D8 + voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 0, 255, 127 @ 869D7D8 voice_square_1 103, 0, 0, 7, 0, 0 @ 869D7E4 - voice_directsound 60, 0, DirectSoundWaveData_86C6A90, 255, 0, 255, 127 @ 869D7F0 - voice_directsound 60, 0, DirectSoundWaveData_872CC54, 255, 0, 255, 127 @ 869D7FC - voice_directsound 60, 0, DirectSoundWaveData_872DE98, 255, 0, 255, 127 @ 869D808 - voice_directsound 60, 0, DirectSoundWaveData_86C5B0C, 255, 0, 255, 127 @ 869D814 + voice_directsound 60, 0, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 127 @ 869D7F0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_wind, 255, 0, 255, 127 @ 869D7FC + voice_directsound 60, 0, DirectSoundWaveData_sc88_bubbles, 255, 0, 255, 127 @ 869D808 + voice_directsound 60, 0, DirectSoundWaveData_sc88_standard_snare1, 255, 0, 255, 127 @ 869D814 voice_noise_alt 0, 0, 7, 15, 1 @ 869D820 voice_directsound 60, 0, DirectSoundWaveData_872EEA8, 255, 0, 255, 127 @ 869D82C voice_noise_alt 1, 0, 7, 15, 1 @ 869D838 - voice_directsound 60, 0, DirectSoundWaveData_86B5D04, 255, 246, 0, 127 @ 869D844 + voice_directsound 60, 0, DirectSoundWaveData_sc88_glockenspiel, 255, 246, 0, 127 @ 869D844 voice_directsound 60, 0, DirectSoundWaveData_87301B0, 255, 0, 255, 127 @ 869D850 voice_square_1_alt 19, 2, 0, 2, 0, 0 @ 869D85C - voice_directsound 60, 0, DirectSoundWaveData_87322BC, 255, 0, 255, 127 @ 869D868 + voice_directsound 60, 0, DirectSoundWaveData_unused_acid_bass, 255, 0, 255, 127 @ 869D868 voice_square_1 103, 0, 0, 0, 15, 0 @ 869D874 voice_directsound_alt 60, 0, DirectSoundWaveData_87301B0, 255, 0, 255, 127 @ 869D880 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 255, 255, 127 @ 869D88C - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 0, 255, 127 @ 869D898 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 255, 255, 127 @ 869D88C + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 0, 255, 127 @ 869D898 voice_directsound 60, 0, DirectSoundWaveData_8734298, 255, 0, 255, 127 @ 869D8A4 - voice_directsound 60, 0, DirectSoundWaveData_87322BC, 255, 242, 0, 0 @ 869D8B0 + voice_directsound 60, 0, DirectSoundWaveData_unused_acid_bass, 255, 242, 0, 0 @ 869D8B0 voice_directsound 60, 0, DirectSoundWaveData_87364A8, 255, 0, 255, 0 @ 869D8BC - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 869D8C8 - voice_directsound 60, 0, DirectSoundWaveData_86C8348, 255, 127, 0, 188 @ 869D8D4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 869D8C8 + voice_directsound 60, 0, DirectSoundWaveData_unknown_close_hihat, 255, 127, 0, 188 @ 869D8D4 voice_directsound 60, 0, DirectSoundWaveData_87385E4, 255, 249, 0, 165 @ 869D8E0 voice_square_1 0, 0, 4, 6, 0, 0 @ 869D8EC - voice_directsound 60, 0, DirectSoundWaveData_86B5D04, 13, 0, 255, 127 @ 869D8F8 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 13, 0, 255, 127 @ 869D904 - voice_directsound 60, 0, DirectSoundWaveData_873A594, 255, 0, 255, 127 @ 869D910 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 252, 0, 204 @ 869D91C + voice_directsound 60, 0, DirectSoundWaveData_sc88_glockenspiel, 13, 0, 255, 127 @ 869D8F8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 13, 0, 255, 127 @ 869D904 + voice_directsound 60, 0, DirectSoundWaveData_unknown_polysynth, 255, 0, 255, 127 @ 869D910 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 252, 0, 204 @ 869D91C voice_square_1 0, 2, 0, 0, 15, 0 @ 869D928 - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 869D934 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 869D934 voice_square_1 0, 0, 4, 0, 15, 0 @ 869D940 - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 188, 0, 0 @ 869D94C - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 226, 0, 127 @ 869D958 - voice_directsound 60, 0, DirectSoundWaveData_86CB6B8, 26, 0, 255, 127 @ 869D964 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 188, 0, 0 @ 869D94C + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 226, 0, 127 @ 869D958 + voice_directsound 60, 0, DirectSoundWaveData_sc88_standard_cymbal_crash, 26, 0, 255, 127 @ 869D964 voice_square_1_alt 0, 2, 0, 1, 0, 0 @ 869D970 - voice_directsound 60, 0, DirectSoundWaveData_86B5D04, 255, 252, 0, 127 @ 869D97C + voice_directsound 60, 0, DirectSoundWaveData_sc88_glockenspiel, 255, 252, 0, 127 @ 869D97C voice_square_1_alt 0, 1, 0, 2, 0, 0 @ 869D988 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 127, 0, 127 @ 869D994 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 127, 0, 127 @ 869D994 voice_noise_alt 0, 1, 6, 0, 0 @ 869D9A0 - voice_directsound 60, 0, DirectSoundWaveData_86B776C, 255, 255, 255, 127 @ 869D9AC - voice_directsound 60, 0, DirectSoundWaveData_86C6200, 255, 255, 255, 127 @ 869D9B8 + voice_directsound 60, 0, DirectSoundWaveData_jv1080_slap_bass, 255, 255, 255, 127 @ 869D9AC + voice_directsound 60, 0, DirectSoundWaveData_sc88_standard_hand_clap, 255, 255, 255, 127 @ 869D9B8 voice_directsound 60, 0, DirectSoundWaveData_873ECD8, 255, 255, 255, 127 @ 869D9C4 - voice_directsound 60, 0, DirectSoundWaveData_86FB0D8, 11, 242, 0, 127 @ 869D9D0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_french_horn_72, 11, 242, 0, 127 @ 869D9D0 voice_square_1_alt 0, 2, 4, 6, 0, 0 @ 869D9DC voice_directsound 60, 0, DirectSoundWaveData_8740818, 255, 255, 255, 127 @ 869D9E8 - voice_directsound 60, 0, DirectSoundWaveData_87410E0, 255, 0, 255, 165 @ 869D9F4 - voice_directsound 60, 0, DirectSoundWaveData_86C7308, 255, 0, 255, 165 @ 869DA00 + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 255, 0, 255, 165 @ 869D9F4 + voice_directsound 60, 0, DirectSoundWaveData_unknown_tom, 255, 0, 255, 165 @ 869DA00 voice_noise_alt 0, 5, 7, 15, 1 @ 869DA0C - voice_directsound 60, 0, DirectSoundWaveData_87224B8, 128, 242, 0, 165 @ 869DA18 - voice_directsound 60, 0, DirectSoundWaveData_86E89E4, 255, 0, 255, 165 @ 869DA24 + voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 128, 242, 0, 165 @ 869DA18 + voice_directsound 60, 0, DirectSoundWaveData_sc88_string_ensemble_72, 255, 0, 255, 165 @ 869DA24 voice_square_1 0, 0, 1, 5, 0, 0 @ 869DA30 voice_noise_alt 0, 6, 6, 0, 1 @ 869DA3C voice_noise_alt 0, 3, 6, 0, 1 @ 869DA48 voice_square_1 0, 2, 0, 0, 15, 0 @ 869DA54 - voice_directsound 60, 0, DirectSoundWaveData_87322BC, 15, 127, 231, 127 @ 869DA60 + voice_directsound 60, 0, DirectSoundWaveData_unused_acid_bass, 15, 127, 231, 127 @ 869DA60 voice_square_1 0, 2, 0, 0, 15, 0 @ 869DA6C voice_square_1 0, 2, 0, 0, 15, 0 @ 869DA78 voice_square_1 0, 2, 0, 0, 15, 0 @ 869DA84 @@ -14822,19 +14822,19 @@ gCryTable2:: @ 869EF24 .align 2 voicegroup129:: @ 86A0154 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0154 - voice_directsound 60, 0, DirectSoundWaveData_86CC5E4, 255, 0, 255, 0 @ 86A0160 - voice_directsound 60, 0, DirectSoundWaveData_86CCAFC, 255, 0, 255, 0 @ 86A016C - voice_directsound 60, 0, DirectSoundWaveData_86C6200, 255, 226, 25, 0 @ 86A0178 + voice_directsound 60, 0, DirectSoundWaveData_sc88_bongo, 255, 0, 255, 0 @ 86A0160 + voice_directsound 60, 0, DirectSoundWaveData_sc88_bongo_low, 255, 0, 255, 0 @ 86A016C + voice_directsound 60, 0, DirectSoundWaveData_sc88_standard_hand_clap, 255, 226, 25, 0 @ 86A0178 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0184 voice_directsound 60, 0, DirectSoundWaveData_8725A2C, 255, 0, 255, 165 @ 86A0190 - voice_directsound 60, 0, DirectSoundWaveData_86D1A2C, 255, 165, 103, 231 @ 86A019C - voice_directsound 60, 0, DirectSoundWaveData_86DAA94, 255, 204, 128, 249 @ 86A01A8 - voice_directsound 60, 0, DirectSoundWaveData_88D4A18, 255, 0, 255, 76 @ 86A01B4 + voice_directsound 60, 0, DirectSoundWaveData_dance_drums_ride_bell, 255, 165, 103, 231 @ 86A019C + voice_directsound 60, 0, DirectSoundWaveData_unknown_anvil_high, 255, 204, 128, 249 @ 86A01A8 + voice_directsound 60, 0, DirectSoundWaveData_register_noise, 255, 0, 255, 76 @ 86A01B4 voice_directsound 60, 0, DirectSoundWaveData_88D6978, 255, 0, 206, 204 @ 86A01C0 - voice_directsound 60, 0, DirectSoundWaveData_86C2A68, 255, 0, 206, 38 @ 86A01CC - voice_directsound 60, 0, DirectSoundWaveData_86C4344, 255, 0, 206, 0 @ 86A01D8 + voice_directsound 60, 0, DirectSoundWaveData_unknown_wood_block_low, 255, 0, 206, 38 @ 86A01CC + voice_directsound 60, 0, DirectSoundWaveData_unknown_wood_block_high, 255, 0, 206, 0 @ 86A01D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A01E4 - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 216 @ 86A01F0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 216 @ 86A01F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A01FC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0208 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0214 @@ -14845,21 +14845,21 @@ voicegroup129:: @ 86A0154 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0250 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A025C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0268 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 165, 128, 204 @ 86A0274 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 165, 128, 204 @ 86A0274 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0280 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A028C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0298 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A02A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A02B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A02BC - voice_directsound 60, 0, DirectSoundWaveData_88DA388, 255, 0, 255, 165 @ 86A02C8 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 165 @ 86A02C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A02D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A02E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A02EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A02F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0304 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0310 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 86A031C + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 86A031C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0328 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0334 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0340 @@ -14867,9 +14867,9 @@ voicegroup129:: @ 86A0154 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0358 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0364 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0370 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 252, 0, 204 @ 86A037C - voice_directsound 60, 0, DirectSoundWaveData_87410E0, 255, 0, 255, 165 @ 86A0388 - voice_directsound 60, 0, DirectSoundWaveData_87224B8, 255, 204, 0, 127 @ 86A0394 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 252, 0, 204 @ 86A037C + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 255, 0, 255, 165 @ 86A0388 + voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 204, 0, 127 @ 86A0394 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A03A0 voice_square_1_alt 0, 2, 0, 0, 15, 0 @ 86A03AC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A03B8 @@ -14937,8 +14937,8 @@ voicegroup129:: @ 86A0154 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A06A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A06AC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A06B8 - voice_directsound 60, 0, DirectSoundWaveData_86DE6C0, 255, 0, 255, 0 @ 86A06C4 - voice_directsound 60, 0, DirectSoundWaveData_86CF950, 255, 0, 255, 226 @ 86A06D0 + voice_directsound 60, 0, DirectSoundWaveData_unknown_ethnic_drum, 255, 0, 255, 0 @ 86A06C4 + voice_directsound 60, 0, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 86A06D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A06DC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A06E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A06F4 @@ -15024,7 +15024,7 @@ voicegroup130:: @ 86A0754 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0A90 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0A9C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0AA8 - voice_directsound 60, 0, DirectSoundWaveData_88F6F48, 255, 249, 25, 248 @ 86A0AB4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion_duplicate, 255, 249, 25, 248 @ 86A0AB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0AC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0ACC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0AD8 @@ -15136,7 +15136,7 @@ voicegroup130:: @ 86A0754 voicegroup131:: @ 86A0FB8 voice_keysplit_all voicegroup002 @ 86A0FB8 voice_keysplit voicegroup005, KeySplitTable1 @ 86A0FC4 - voice_directsound 60, 0, DirectSoundWaveData_88F8318, 128, 204, 51, 242 @ 86A0FD0 + voice_directsound 60, 0, DirectSoundWaveData_steinway_b_piano, 128, 204, 51, 242 @ 86A0FD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0FDC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0FE8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0FF4 @@ -15158,7 +15158,7 @@ voicegroup131:: @ 86A0FB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A10B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A10C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A10CC - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 128, 204, 103, 226 @ 86A10D8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 128, 204, 103, 226 @ 86A10D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A10E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A10F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A10FC @@ -15279,17 +15279,17 @@ voicegroup132:: @ 86A15B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A163C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1648 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1654 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 97, 236 @ 86A1660 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 97, 236 @ 86A1660 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A166C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1678 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 128, 146, 118, 137 @ 86A1684 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 128, 146, 118, 137 @ 86A1684 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1690 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A169C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A16A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A16B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A16C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A16CC - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 51, 204, 92, 226 @ 86A16D8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 51, 204, 92, 226 @ 86A16D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A16E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A16F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A16FC @@ -15312,7 +15312,7 @@ voicegroup132:: @ 86A15B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A17C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A17D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A17E0 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 165, 154, 235 @ 86A17EC + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 165, 154, 235 @ 86A17EC voice_keysplit voicegroup006, KeySplitTable2 @ 86A17F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1804 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1810 @@ -15338,7 +15338,7 @@ voicegroup132:: @ 86A15B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1900 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A190C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1918 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 86A1924 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 86A1924 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1930 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A193C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1948 @@ -15406,27 +15406,27 @@ voicegroup133:: @ 86A1BB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1C0C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1C18 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1C24 - voice_directsound 60, 0, DirectSoundWaveData_86DD11C, 255, 0, 255, 0 @ 86A1C30 + voice_directsound 60, 0, DirectSoundWaveData_unknown_anvil_low, 255, 0, 255, 0 @ 86A1C30 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1C3C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1C48 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1C54 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 86A1C60 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 86A1C60 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1C6C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1C78 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 128, 146, 108, 137 @ 86A1C84 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 128, 146, 108, 137 @ 86A1C84 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1C90 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1C9C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1CA8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1CB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1CC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1CCC - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 128, 204, 103, 226 @ 86A1CD8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 128, 204, 103, 226 @ 86A1CD8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1CE4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1CF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1CFC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1D08 - voice_directsound 60, 0, DirectSoundWaveData_8709004, 255, 0, 255, 127 @ 86A1D14 - voice_directsound 60, 0, DirectSoundWaveData_870AE74, 255, 0, 255, 127 @ 86A1D20 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 @ 86A1D14 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 @ 86A1D20 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1D2C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1D38 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1D44 @@ -15434,8 +15434,8 @@ voicegroup133:: @ 86A1BB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1D5C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1D68 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1D74 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 86A1D80 - voice_directsound 60, 0, DirectSoundWaveData_87224B8, 255, 0, 255, 127 @ 86A1D8C + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 86A1D80 + voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 0, 255, 127 @ 86A1D8C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1D98 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1DA4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1DB0 @@ -15443,7 +15443,7 @@ voicegroup133:: @ 86A1BB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1DC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1DD4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1DE0 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 193, 153 @ 86A1DEC + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 193, 153 @ 86A1DEC voice_keysplit voicegroup006, KeySplitTable2 @ 86A1DF8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1E04 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1E10 @@ -15458,7 +15458,7 @@ voicegroup133:: @ 86A1BB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1E7C voice_keysplit voicegroup009, KeySplitTable5 @ 86A1E88 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1E94 - voice_directsound 60, 0, DirectSoundWaveData_870DE64, 255, 0, 255, 127 @ 86A1EA0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 127 @ 86A1EA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1EAC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1EB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1EC4 @@ -15474,7 +15474,7 @@ voicegroup133:: @ 86A1BB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1F3C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1F48 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1F54 - voice_directsound 60, 0, DirectSoundWaveData_88F94DC, 255, 0, 255, 127 @ 86A1F60 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 255, 0, 255, 127 @ 86A1F60 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1F6C voice_square_1_alt 0, 1, 0, 1, 9, 0 @ 86A1F78 voice_square_2_alt 3, 0, 2, 9, 1 @ 86A1F84 @@ -15516,7 +15516,7 @@ voicegroup133:: @ 86A1BB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2134 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2140 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A214C - voice_directsound 60, 0, DirectSoundWaveData_88DA388, 255, 0, 255, 165 @ 86A2158 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 165 @ 86A2158 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2164 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2170 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A217C @@ -15574,7 +15574,7 @@ voicegroup134:: @ 86A21B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A23C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A23D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A23E0 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 86A23EC + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 86A23EC voice_keysplit voicegroup006, KeySplitTable2 @ 86A23F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2404 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2410 @@ -15641,7 +15641,7 @@ voicegroup135:: @ 86A25F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A26C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A26D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A26E0 - voice_directsound 60, 0, DirectSoundWaveData_87410E0, 85, 137, 180, 204 @ 86A26EC + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 85, 137, 180, 204 @ 86A26EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A26F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2704 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2710 @@ -15735,8 +15735,8 @@ voicegroup136:: @ 86A29D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2B0C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2B18 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2B24 - voice_directsound 60, 0, DirectSoundWaveData_8709004, 255, 0, 255, 127 @ 86A2B30 - voice_directsound 60, 0, DirectSoundWaveData_870AE74, 255, 0, 255, 127 @ 86A2B3C + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 @ 86A2B30 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 @ 86A2B3C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2B48 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2B54 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2B60 @@ -15744,7 +15744,7 @@ voicegroup136:: @ 86A29D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2B78 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2B84 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2B90 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 86A2B9C + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 86A2B9C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2BA8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2BB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2BC0 @@ -15768,7 +15768,7 @@ voicegroup136:: @ 86A29D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2C98 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2CA4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2CB0 - voice_directsound 60, 0, DirectSoundWaveData_870DE64, 255, 0, 255, 127 @ 86A2CBC + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 127 @ 86A2CBC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2CC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2CD4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2CE0 @@ -15841,17 +15841,17 @@ voicegroup137:: @ 86A2FD4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2FE0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2FEC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2FF8 - voice_directsound 60, 0, DirectSoundWaveData_871CBCC, 255, 165, 180, 165 @ 86A3004 - voice_directsound 60, 0, DirectSoundWaveData_871F234, 255, 137, 154, 165 @ 86A3010 + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 165, 180, 165 @ 86A3004 + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_high, 255, 137, 154, 165 @ 86A3010 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A301C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3028 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3034 - voice_directsound 60, 0, DirectSoundWaveData_86B5D04, 255, 204, 51, 242 @ 86A3040 + voice_directsound 60, 0, DirectSoundWaveData_sc88_glockenspiel, 255, 204, 51, 242 @ 86A3040 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A304C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3058 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3064 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3070 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 86A307C + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 86A307C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3088 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3094 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A30A0 @@ -15883,8 +15883,8 @@ voicegroup137:: @ 86A2FD4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A31D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A31E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A31F0 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 0, 242 @ 86A31FC - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 193, 153 @ 86A3208 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 0, 242 @ 86A31FC + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 193, 153 @ 86A3208 voice_keysplit voicegroup006, KeySplitTable2 @ 86A3214 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3220 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A322C @@ -15972,8 +15972,8 @@ voicegroup138:: @ 86A35D4 voice_keysplit voicegroup005, KeySplitTable1 @ 86A35E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A35EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A35F8 - voice_directsound 60, 0, DirectSoundWaveData_871CBCC, 255, 188, 128, 226 @ 86A3604 - voice_directsound 60, 65, DirectSoundWaveData_871F234, 255, 204, 77, 246 @ 86A3610 + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 188, 128, 226 @ 86A3604 + voice_directsound 60, 65, DirectSoundWaveData_unknown_e_piano_high, 255, 204, 77, 246 @ 86A3610 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A361C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3628 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3634 @@ -15985,14 +15985,14 @@ voicegroup138:: @ 86A35D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A367C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3688 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3694 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 76, 133, 137 @ 86A36A0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 76, 133, 137 @ 86A36A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A36AC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A36B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A36C4 - voice_directsound 60, 0, DirectSoundWaveData_87410E0, 64, 188, 108, 165 @ 86A36D0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 64, 188, 108, 165 @ 86A36D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A36DC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A36E8 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 127 @ 86A36F4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 127 @ 86A36F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3700 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A370C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3718 @@ -16014,7 +16014,7 @@ voicegroup138:: @ 86A35D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A37D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A37E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A37F0 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 246, 0, 235 @ 86A37FC + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 246, 0, 235 @ 86A37FC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3808 voice_keysplit voicegroup006, KeySplitTable2 @ 86A3814 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3820 @@ -16041,7 +16041,7 @@ voicegroup138:: @ 86A35D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A391C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3928 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3934 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 86A3940 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 86A3940 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A394C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3958 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3964 @@ -16108,22 +16108,22 @@ voicegroup139:: @ 86A3BD4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3C1C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3C28 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3C34 - voice_directsound 60, 0, DirectSoundWaveData_86B5D04, 255, 165, 51, 242 @ 86A3C40 - voice_directsound 60, 0, DirectSoundWaveData_86DD11C, 255, 0, 255, 0 @ 86A3C4C + voice_directsound 60, 0, DirectSoundWaveData_sc88_glockenspiel, 255, 165, 51, 242 @ 86A3C40 + voice_directsound 60, 0, DirectSoundWaveData_unknown_anvil_low, 255, 0, 255, 0 @ 86A3C4C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3C58 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3C64 - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 86A3C70 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 86A3C7C + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 86A3C70 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 86A3C7C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3C88 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3C94 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 128, 127, 103, 201 @ 86A3CA0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 128, 127, 103, 201 @ 86A3CA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3CAC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3CB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3CC4 - voice_directsound 60, 0, DirectSoundWaveData_87410E0, 37, 127, 77, 165 @ 86A3CD0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 37, 127, 77, 165 @ 86A3CD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3CDC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3CE8 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 51, 204, 92, 226 @ 86A3CF4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 51, 204, 92, 226 @ 86A3CF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3D00 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3D0C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3D18 @@ -16145,7 +16145,7 @@ voicegroup139:: @ 86A3BD4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3DD8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3DE4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3DF0 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 226 @ 86A3DFC + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 226 @ 86A3DFC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3E08 voice_keysplit voicegroup006, KeySplitTable2 @ 86A3E14 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3E20 @@ -16172,12 +16172,12 @@ voicegroup139:: @ 86A3BD4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3F1C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3F28 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3F34 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 86A3F40 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 86A3F40 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3F4C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3F58 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3F64 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3F70 - voice_directsound 60, 0, DirectSoundWaveData_88F94DC, 255, 0, 255, 127 @ 86A3F7C + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 255, 0, 255, 127 @ 86A3F7C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3F88 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3F94 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3FA0 @@ -16250,18 +16250,18 @@ voicegroup141:: @ 86A4204 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A427C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4288 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4294 - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 86A42A0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 86A42A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A42AC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A42B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A42C4 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 76, 133, 137 @ 86A42D0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 76, 133, 137 @ 86A42D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A42DC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A42E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A42F4 - voice_directsound 60, 0, DirectSoundWaveData_87410E0, 64, 188, 108, 165 @ 86A4300 + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 64, 188, 108, 165 @ 86A4300 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A430C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4318 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 85, 249, 25, 127 @ 86A4324 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 85, 249, 25, 127 @ 86A4324 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4330 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A433C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4348 @@ -16310,7 +16310,7 @@ voicegroup141:: @ 86A4204 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A454C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4558 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4564 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 86A4570 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 86A4570 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A457C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4588 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4594 @@ -16385,20 +16385,20 @@ voicegroup142:: @ 86A4804 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A48AC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A48B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A48C4 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 64, 188, 128, 201 @ 86A48D0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 64, 188, 128, 201 @ 86A48D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A48DC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A48E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A48F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4900 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A490C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4918 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 64, 195, 103, 220 @ 86A4924 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 64, 195, 103, 220 @ 86A4924 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4930 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A493C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4948 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4954 - voice_directsound 60, 0, DirectSoundWaveData_8709004, 128, 195, 72, 127 @ 86A4960 - voice_directsound 60, 0, DirectSoundWaveData_870AE74, 85, 188, 103, 160 @ 86A496C + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 128, 195, 72, 127 @ 86A4960 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 85, 188, 103, 160 @ 86A496C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4978 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4984 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4990 @@ -16406,7 +16406,7 @@ voicegroup142:: @ 86A4804 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A49A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A49B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A49C0 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 128, 188, 77, 115 @ 86A49CC + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 128, 188, 77, 115 @ 86A49CC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A49D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A49E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A49F0 @@ -16430,7 +16430,7 @@ voicegroup142:: @ 86A4804 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4AC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4AD4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4AE0 - voice_directsound 60, 0, DirectSoundWaveData_870DE64, 255, 175, 154, 127 @ 86A4AEC + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 175, 154, 127 @ 86A4AEC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4AF8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4B04 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4B10 @@ -16472,14 +16472,14 @@ voicegroup143:: @ 86A4BF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4C9C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4CA8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4CB4 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 128, 160, 123, 165 @ 86A4CC0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 128, 160, 123, 165 @ 86A4CC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4CCC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4CD8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4CE4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4CF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4CFC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4D08 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 0 @ 86A4D14 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 0 @ 86A4D14 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4D20 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4D2C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A4D38 @@ -16603,14 +16603,14 @@ voicegroup144:: @ 86A51F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A529C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A52A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A52B4 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 85, 188, 92, 165 @ 86A52C0 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 85, 127, 180, 165 @ 86A52CC + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 85, 188, 92, 165 @ 86A52C0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 85, 127, 180, 165 @ 86A52CC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A52D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A52E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A52F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A52FC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5308 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 51, 204, 92, 226 @ 86A5314 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 51, 204, 92, 226 @ 86A5314 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5320 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A532C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5338 @@ -16621,10 +16621,10 @@ voicegroup144:: @ 86A51F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5374 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5380 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A538C - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 216 @ 86A5398 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 216 @ 86A5398 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A53A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A53B0 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 86A53BC + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 86A53BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A53C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A53D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A53E0 @@ -16721,8 +16721,8 @@ voicegroup145:: @ 86A57F4 voice_keysplit voicegroup005, KeySplitTable1 @ 86A5800 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A580C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5818 - voice_directsound 60, 0, DirectSoundWaveData_871CBCC, 255, 188, 128, 226 @ 86A5824 - voice_directsound 60, 65, DirectSoundWaveData_871F234, 255, 204, 77, 246 @ 86A5830 + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 188, 128, 226 @ 86A5824 + voice_directsound 60, 65, DirectSoundWaveData_unknown_e_piano_high, 255, 204, 77, 246 @ 86A5830 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A583C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5848 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5854 @@ -16734,14 +16734,14 @@ voicegroup145:: @ 86A57F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A589C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A58A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A58B4 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 76, 133, 137 @ 86A58C0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 76, 133, 137 @ 86A58C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A58CC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A58D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A58E4 - voice_directsound 60, 0, DirectSoundWaveData_87410E0, 64, 188, 108, 165 @ 86A58F0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 64, 188, 108, 165 @ 86A58F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A58FC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5908 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 127 @ 86A5914 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 127 @ 86A5914 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5920 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A592C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5938 @@ -16763,7 +16763,7 @@ voicegroup145:: @ 86A57F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A59F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5A04 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5A10 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 246, 0, 235 @ 86A5A1C + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 246, 0, 235 @ 86A5A1C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5A28 voice_keysplit voicegroup006, KeySplitTable2 @ 86A5A34 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5A40 @@ -16790,7 +16790,7 @@ voicegroup145:: @ 86A57F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5B3C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5B48 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5B54 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 86A5B60 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 86A5B60 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5B6C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5B78 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5B84 @@ -16849,7 +16849,7 @@ voicegroup145:: @ 86A57F4 .align 2 voicegroup146:: @ 86A5DF4 voice_keysplit_all voicegroup002 @ 86A5DF4 - voice_directsound 60, 0, DirectSoundWaveData_88F8318, 255, 165, 103, 235 @ 86A5E00 + voice_directsound 60, 0, DirectSoundWaveData_steinway_b_piano, 255, 165, 103, 235 @ 86A5E00 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5E0C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5E18 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5E24 @@ -16861,7 +16861,7 @@ voicegroup146:: @ 86A5DF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5E6C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5E78 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5E84 - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 86A5E90 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 86A5E90 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5E9C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5EA8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5EB4 @@ -16872,7 +16872,7 @@ voicegroup146:: @ 86A5DF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5EF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5EFC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5F08 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 85, 249, 25, 226 @ 86A5F14 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 85, 249, 25, 226 @ 86A5F14 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5F20 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5F2C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5F38 @@ -16926,7 +16926,7 @@ voicegroup146:: @ 86A5DF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6178 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6184 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6190 - voice_directsound 60, 0, DirectSoundWaveData_88F94DC, 43, 76, 103, 216 @ 86A619C + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 43, 76, 103, 216 @ 86A619C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A61A8 voice_square_2_alt 2, 0, 2, 4, 4 @ 86A61B4 voice_square_1_alt 0, 2, 0, 0, 15, 0 @ 86A61C0 @@ -17003,7 +17003,7 @@ voicegroup147:: @ 86A63F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A64F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A64FC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6508 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 64, 249, 25, 226 @ 86A6514 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 64, 249, 25, 226 @ 86A6514 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6520 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A652C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6538 @@ -17079,8 +17079,8 @@ voicegroup148:: @ 86A67E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A685C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6868 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6874 - voice_directsound 60, 0, DirectSoundWaveData_87224B8, 255, 226, 0, 127 @ 86A6880 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 86A688C + voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 226, 0, 127 @ 86A6880 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 86A688C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6898 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A68A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A68B0 @@ -17105,7 +17105,7 @@ voicegroup148:: @ 86A67E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6994 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A69A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A69AC - voice_directsound 60, 0, DirectSoundWaveData_87224B8, 255, 0, 255, 127 @ 86A69B8 + voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 0, 255, 127 @ 86A69B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A69C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A69D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A69DC @@ -17206,12 +17206,12 @@ voicegroup149:: @ 86A6DE4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6E2C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6E38 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6E44 - voice_directsound 60, 0, DirectSoundWaveData_86B5D04, 255, 165, 51, 242 @ 86A6E50 + voice_directsound 60, 0, DirectSoundWaveData_sc88_glockenspiel, 255, 165, 51, 242 @ 86A6E50 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6E5C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6E68 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6E74 - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 86A6E80 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 86A6E8C + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 86A6E80 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 86A6E8C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6E98 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6EA4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6EB0 @@ -17243,8 +17243,8 @@ voicegroup149:: @ 86A6DE4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6FE8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6FF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7000 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 246, 0, 235 @ 86A700C - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 165, 154, 153 @ 86A7018 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 246, 0, 235 @ 86A700C + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 165, 154, 153 @ 86A7018 voice_keysplit voicegroup006, KeySplitTable2 @ 86A7024 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7030 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A703C @@ -17265,12 +17265,12 @@ voicegroup149:: @ 86A6DE4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A70F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A70FC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7108 - voice_directsound 60, 0, DirectSoundWaveData_86BBE98, 43, 188, 103, 165 @ 86A7114 - voice_directsound 60, 0, DirectSoundWaveData_86BD1DC, 43, 165, 103, 165 @ 86A7120 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_oboe, 43, 188, 103, 165 @ 86A7114 + voice_directsound 60, 0, DirectSoundWaveData_unused_sd90_oboe, 43, 165, 103, 165 @ 86A7120 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A712C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7138 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7144 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 86A7150 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 86A7150 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A715C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7168 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7174 @@ -17294,7 +17294,7 @@ voicegroup149:: @ 86A6DE4 .align 2 voicegroup150:: @ 86A7240 voice_keysplit_all voicegroup002 @ 86A7240 - voice_directsound 60, 0, DirectSoundWaveData_88F8318, 255, 165, 103, 235 @ 86A724C + voice_directsound 60, 0, DirectSoundWaveData_steinway_b_piano, 255, 165, 103, 235 @ 86A724C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7258 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7264 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7270 @@ -17371,7 +17371,7 @@ voicegroup150:: @ 86A7240 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A75C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A75D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A75DC - voice_directsound 60, 0, DirectSoundWaveData_88F94DC, 85, 204, 77, 127 @ 86A75E8 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 85, 204, 77, 127 @ 86A75E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A75F4 voice_square_2_alt 1, 0, 1, 4, 6 @ 86A7600 voice_square_1_alt 0, 1, 0, 2, 4, 5 @ 86A760C @@ -17438,7 +17438,7 @@ voicegroup151:: @ 86A7840 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A78C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A78D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A78DC - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 86A78E8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 86A78E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A78F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7900 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A790C @@ -17471,7 +17471,7 @@ voicegroup151:: @ 86A7840 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7A50 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7A5C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7A68 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 193, 127 @ 86A7A74 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 193, 127 @ 86A7A74 voice_keysplit voicegroup006, KeySplitTable2 @ 86A7A80 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7A8C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7A98 @@ -17529,17 +17529,17 @@ voicegroup152:: @ 86A7C60 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7CE4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7CF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7CFC - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 97, 236 @ 86A7D08 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 97, 236 @ 86A7D08 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7D14 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7D20 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 128, 160, 175, 165 @ 86A7D2C + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 128, 160, 175, 165 @ 86A7D2C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7D38 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7D44 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7D50 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7D5C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7D68 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7D74 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 165, 128, 204 @ 86A7D80 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 165, 128, 204 @ 86A7D80 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7D8C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7D98 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7DA4 @@ -17562,7 +17562,7 @@ voicegroup152:: @ 86A7C60 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7E70 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7E7C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7E88 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 127, 154, 235 @ 86A7E94 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 127, 154, 235 @ 86A7E94 voice_keysplit voicegroup006, KeySplitTable2 @ 86A7EA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7EAC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A7EB8 @@ -17660,7 +17660,7 @@ voicegroup153:: @ 86A8260 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A82E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A82F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A82FC - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 97, 236 @ 86A8308 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 97, 236 @ 86A8308 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8314 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8320 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A832C @@ -17692,8 +17692,8 @@ voicegroup153:: @ 86A8260 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8464 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8470 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A847C - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 246, 0, 235 @ 86A8488 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 127, 154, 235 @ 86A8494 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 246, 0, 235 @ 86A8488 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 127, 154, 235 @ 86A8494 voice_keysplit voicegroup006, KeySplitTable2 @ 86A84A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A84AC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A84B8 @@ -17719,7 +17719,7 @@ voicegroup153:: @ 86A8260 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A85A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A85B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A85C0 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 86A85CC + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 86A85CC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A85D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A85E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A85F0 @@ -17781,7 +17781,7 @@ voicegroup154:: @ 86A8860 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A886C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8878 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8884 - voice_directsound 60, 0, DirectSoundWaveData_871CBCC, 255, 249, 0, 165 @ 86A8890 + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 249, 0, 165 @ 86A8890 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A889C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A88A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A88B4 @@ -17791,7 +17791,7 @@ voicegroup154:: @ 86A8860 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A88E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A88F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A88FC - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 97, 236 @ 86A8908 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 97, 236 @ 86A8908 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8914 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8920 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A892C @@ -17824,7 +17824,7 @@ voicegroup154:: @ 86A8860 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8A70 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8A7C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8A88 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 127, 154, 235 @ 86A8A94 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 127, 154, 235 @ 86A8A94 voice_keysplit voicegroup006, KeySplitTable2 @ 86A8AA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8AAC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8AB8 @@ -17877,8 +17877,8 @@ voicegroup155:: @ 86A8CBC voice_keysplit voicegroup005, KeySplitTable1 @ 86A8CC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8CD4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8CE0 - voice_directsound 60, 0, DirectSoundWaveData_871CBCC, 255, 249, 0, 165 @ 86A8CEC - voice_directsound 60, 0, DirectSoundWaveData_871F234, 255, 188, 103, 165 @ 86A8CF8 + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 249, 0, 165 @ 86A8CEC + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_high, 255, 188, 103, 165 @ 86A8CF8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8D04 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8D10 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8D1C @@ -17887,23 +17887,23 @@ voicegroup155:: @ 86A8CBC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8D40 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8D4C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8D58 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 86A8D64 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 86A8D64 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8D70 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8D7C - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 127 @ 86A8D88 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 127 @ 86A8D88 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8D94 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8DA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8DAC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8DB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8DC4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8DD0 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 128, 249, 25, 127 @ 86A8DDC - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 165, 128, 204 @ 86A8DE8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 128, 249, 25, 127 @ 86A8DDC + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 165, 128, 204 @ 86A8DE8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8DF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8E00 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8E0C - voice_directsound 60, 0, DirectSoundWaveData_8709004, 255, 0, 255, 127 @ 86A8E18 - voice_directsound 60, 0, DirectSoundWaveData_870AE74, 255, 165, 154, 165 @ 86A8E24 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 @ 86A8E18 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 165, 154, 165 @ 86A8E24 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8E30 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8E3C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8E48 @@ -17920,7 +17920,7 @@ voicegroup155:: @ 86A8CBC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8ECC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8ED8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8EE4 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 86A8EF0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 86A8EF0 voice_keysplit voicegroup006, KeySplitTable2 @ 86A8EFC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8F08 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8F14 @@ -17935,7 +17935,7 @@ voicegroup155:: @ 86A8CBC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8F80 voice_keysplit voicegroup009, KeySplitTable5 @ 86A8F8C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8F98 - voice_directsound 60, 0, DirectSoundWaveData_870DE64, 255, 165, 180, 165 @ 86A8FA4 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 165, 180, 165 @ 86A8FA4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8FB0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8FBC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8FC8 @@ -17993,7 +17993,7 @@ voicegroup155:: @ 86A8CBC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9238 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9244 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9250 - voice_directsound 60, 0, DirectSoundWaveData_88DA388, 255, 0, 255, 165 @ 86A925C + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 165 @ 86A925C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9268 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9274 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9280 @@ -18009,7 +18009,7 @@ voicegroup156:: @ 86A92BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A92D4 voice_programmable_wave_alt ProgrammableWaveData_86B4870, 0, 7, 15, 0 @ 86A92E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A92EC - voice_directsound 60, 0, DirectSoundWaveData_871CBCC, 255, 249, 0, 165 @ 86A92F8 + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 249, 0, 165 @ 86A92F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9304 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9310 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A931C @@ -18021,26 +18021,26 @@ voicegroup156:: @ 86A92BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9364 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9370 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A937C - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 127 @ 86A9388 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 127 @ 86A9388 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9394 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A93A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A93AC - voice_directsound 60, 0, DirectSoundWaveData_87410E0, 255, 0, 255, 165 @ 86A93B8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 255, 0, 255, 165 @ 86A93B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A93C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A93D0 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 165, 128, 204 @ 86A93DC + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 165, 128, 204 @ 86A93DC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A93E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A93F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9400 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A940C - voice_directsound 60, 0, DirectSoundWaveData_8709004, 255, 0, 255, 127 @ 86A9418 - voice_directsound 60, 0, DirectSoundWaveData_870AE74, 255, 0, 255, 127 @ 86A9424 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 @ 86A9418 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 @ 86A9424 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9430 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A943C voice_square_2_alt 3, 0, 4, 4, 4 @ 86A9448 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9454 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9460 - voice_directsound 60, 0, DirectSoundWaveData_86BEF94, 255, 165, 180, 216 @ 86A946C + voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_unison_slap, 255, 165, 180, 216 @ 86A946C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9478 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9484 voice_square_2_alt 1, 0, 1, 7, 5 @ 86A9490 @@ -18066,7 +18066,7 @@ voicegroup156:: @ 86A92BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9580 voice_keysplit voicegroup009, KeySplitTable5 @ 86A958C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9598 - voice_directsound 60, 0, DirectSoundWaveData_870DE64, 255, 0, 255, 127 @ 86A95A4 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 127 @ 86A95A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A95B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A95BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A95C8 @@ -18124,7 +18124,7 @@ voicegroup156:: @ 86A92BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9838 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9844 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9850 - voice_directsound 60, 0, DirectSoundWaveData_88DA388, 255, 0, 255, 165 @ 86A985C + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 165 @ 86A985C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9868 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9874 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9880 @@ -18152,28 +18152,28 @@ voicegroup157:: @ 86A98BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9964 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9970 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A997C - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 128, 146, 190, 115 @ 86A9988 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 128, 146, 190, 115 @ 86A9988 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9994 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A99A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A99AC - voice_directsound 60, 0, DirectSoundWaveData_87410E0, 255, 0, 255, 165 @ 86A99B8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 255, 0, 255, 165 @ 86A99B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A99C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A99D0 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 165, 128, 204 @ 86A99DC + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 165, 128, 204 @ 86A99DC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A99E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A99F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9A00 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9A0C - voice_directsound 60, 0, DirectSoundWaveData_8709004, 255, 0, 255, 127 @ 86A9A18 - voice_directsound 60, 0, DirectSoundWaveData_870AE74, 255, 0, 255, 127 @ 86A9A24 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 @ 86A9A18 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 @ 86A9A24 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9A30 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9A3C - voice_directsound 60, 0, DirectSoundWaveData_86FFDC0, 255, 253, 0, 149 @ 86A9A48 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pick_bass, 255, 253, 0, 149 @ 86A9A48 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9A54 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9A60 - voice_directsound 60, 0, DirectSoundWaveData_86BEF94, 255, 165, 180, 216 @ 86A9A6C + voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_unison_slap, 255, 165, 180, 216 @ 86A9A6C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9A78 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 86A9A84 + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 86A9A84 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9A90 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9A9C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9AA8 @@ -18197,7 +18197,7 @@ voicegroup157:: @ 86A98BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9B80 voice_keysplit voicegroup009, KeySplitTable5 @ 86A9B8C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9B98 - voice_directsound 60, 0, DirectSoundWaveData_870DE64, 255, 0, 255, 127 @ 86A9BA4 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 127 @ 86A9BA4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9BB0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9BBC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9BC8 @@ -18270,42 +18270,42 @@ voicegroup158:: @ 86A9EBC voice_keysplit voicegroup005, KeySplitTable1 @ 86A9EC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9ED4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9EE0 - voice_directsound 60, 0, DirectSoundWaveData_871CBCC, 255, 249, 0, 165 @ 86A9EEC + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 249, 0, 165 @ 86A9EEC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9EF8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9F04 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9F10 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9F1C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9F28 - voice_directsound 60, 0, DirectSoundWaveData_86DD11C, 255, 0, 255, 0 @ 86A9F34 + voice_directsound 60, 0, DirectSoundWaveData_unknown_anvil_low, 255, 0, 255, 0 @ 86A9F34 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9F40 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9F4C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9F58 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 86A9F64 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 86A9F64 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9F70 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9F7C - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 128, 146, 108, 137 @ 86A9F88 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 128, 146, 108, 137 @ 86A9F88 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9F94 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9FA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9FAC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9FB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9FC4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9FD0 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 128, 204, 103, 226 @ 86A9FDC + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 128, 204, 103, 226 @ 86A9FDC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9FE8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9FF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA000 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA00C - voice_directsound 60, 0, DirectSoundWaveData_8709004, 255, 0, 255, 127 @ 86AA018 - voice_directsound 60, 0, DirectSoundWaveData_870AE74, 255, 0, 255, 127 @ 86AA024 - voice_directsound 60, 0, DirectSoundWaveData_88DA388, 255, 0, 255, 165 @ 86AA030 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 @ 86AA018 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 @ 86AA024 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 165 @ 86AA030 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA03C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA048 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA054 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 86AA060 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 86AA060 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA06C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA078 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 86AA084 - voice_directsound 60, 0, DirectSoundWaveData_87224B8, 255, 0, 255, 127 @ 86AA090 + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 86AA084 + voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 0, 255, 127 @ 86AA090 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA09C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA0A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA0B4 @@ -18313,13 +18313,13 @@ voicegroup158:: @ 86A9EBC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA0CC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA0D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA0E4 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 193, 153 @ 86AA0F0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 193, 153 @ 86AA0F0 voice_keysplit voicegroup006, KeySplitTable2 @ 86AA0FC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA108 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA114 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA120 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA12C - voice_directsound 60, 0, DirectSoundWaveData_86BA7E8, 255, 0, 255, 0 @ 86AA138 + voice_directsound 60, 0, DirectSoundWaveData_advanced_orchestra_voice_ahhs, 255, 0, 255, 0 @ 86AA138 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA144 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA150 voice_keysplit voicegroup007, KeySplitTable3 @ 86AA15C @@ -18328,7 +18328,7 @@ voicegroup158:: @ 86A9EBC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA180 voice_keysplit voicegroup009, KeySplitTable5 @ 86AA18C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA198 - voice_directsound 60, 0, DirectSoundWaveData_870DE64, 255, 0, 236, 188 @ 86AA1A4 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 236, 188 @ 86AA1A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA1B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA1BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA1C8 @@ -18344,7 +18344,7 @@ voicegroup158:: @ 86A9EBC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA240 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA24C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA258 - voice_directsound 60, 0, DirectSoundWaveData_88F94DC, 255, 0, 255, 127 @ 86AA264 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 255, 0, 255, 127 @ 86AA264 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA270 voice_square_1_alt 0, 1, 0, 1, 9, 0 @ 86AA27C voice_square_2_alt 3, 0, 1, 10, 1 @ 86AA288 @@ -18401,8 +18401,8 @@ voicegroup159:: @ 86AA4BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA4C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA4D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA4E0 - voice_directsound 60, 0, DirectSoundWaveData_871CBCC, 64, 249, 0, 188 @ 86AA4EC - voice_directsound 60, 0, DirectSoundWaveData_871F234, 51, 249, 0, 165 @ 86AA4F8 + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 64, 249, 0, 188 @ 86AA4EC + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_high, 51, 249, 0, 165 @ 86AA4F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA504 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA510 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA51C @@ -18421,7 +18421,7 @@ voicegroup159:: @ 86AA4BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA5B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA5C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA5D0 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 85, 249, 25, 127 @ 86AA5DC + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 85, 249, 25, 127 @ 86AA5DC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA5E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA5F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA600 @@ -18542,7 +18542,7 @@ voicegroup160:: @ 86AAABC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAB40 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAB4C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAB58 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 86AAB64 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 86AAB64 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAB70 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAB7C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAB88 @@ -18552,7 +18552,7 @@ voicegroup160:: @ 86AAABC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AABB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AABC4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AABD0 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 128, 249, 25, 127 @ 86AABDC + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 128, 249, 25, 127 @ 86AABDC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AABE8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AABF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAC00 @@ -18563,7 +18563,7 @@ voicegroup160:: @ 86AAABC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAC3C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAC48 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAC54 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 86AAC60 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 86AAC60 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAC6C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAC78 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAC84 @@ -18633,14 +18633,14 @@ voicegroup161:: @ 86AAEDC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAF60 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAF6C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAF78 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 86AAF84 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 86AAF84 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAF90 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAF9C - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 127 @ 86AAFA8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 127 @ 86AAFA8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAFB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAFC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAFCC - voice_directsound 60, 0, DirectSoundWaveData_87410E0, 255, 0, 255, 165 @ 86AAFD8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 255, 0, 255, 165 @ 86AAFD8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAFE4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAFF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AAFFC @@ -18692,7 +18692,7 @@ voicegroup161:: @ 86AAEDC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB224 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB230 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB23C - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 86AB248 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 86AB248 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB254 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB260 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB26C @@ -18754,7 +18754,7 @@ voicegroup162:: @ 86AB4DC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB4E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB4F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB500 - voice_directsound 60, 0, DirectSoundWaveData_871F234, 64, 188, 108, 244 @ 86AB50C + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_high, 64, 188, 108, 244 @ 86AB50C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB518 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB524 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB530 @@ -18764,17 +18764,17 @@ voicegroup162:: @ 86AB4DC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB560 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB56C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB578 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 86AB584 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 86AB584 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB590 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB59C - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 64, 195, 92, 235 @ 86AB5A8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 64, 195, 92, 235 @ 86AB5A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB5B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB5C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB5CC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB5D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB5E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB5F0 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 128, 249, 25, 127 @ 86AB5FC + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 128, 249, 25, 127 @ 86AB5FC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB608 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB614 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB620 @@ -18783,7 +18783,7 @@ voicegroup162:: @ 86AB4DC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB644 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB650 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB65C - voice_directsound 60, 0, DirectSoundWaveData_86FFDC0, 64, 204, 113, 235 @ 86AB668 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pick_bass, 64, 204, 113, 235 @ 86AB668 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB674 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB680 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB68C @@ -18850,8 +18850,8 @@ voicegroup163:: @ 86AB938 voice_keysplit voicegroup005, KeySplitTable1 @ 86AB944 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB950 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB95C - voice_directsound 60, 0, DirectSoundWaveData_871CBCC, 255, 188, 128, 226 @ 86AB968 - voice_directsound 60, 65, DirectSoundWaveData_871F234, 255, 204, 77, 246 @ 86AB974 + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 188, 128, 226 @ 86AB968 + voice_directsound 60, 65, DirectSoundWaveData_unknown_e_piano_high, 255, 204, 77, 246 @ 86AB974 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB980 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB98C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB998 @@ -18863,14 +18863,14 @@ voicegroup163:: @ 86AB938 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB9E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB9EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB9F8 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 76, 133, 137 @ 86ABA04 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 76, 133, 137 @ 86ABA04 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABA10 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABA1C voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABA28 - voice_directsound 60, 0, DirectSoundWaveData_87410E0, 64, 188, 108, 165 @ 86ABA34 + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 64, 188, 108, 165 @ 86ABA34 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABA40 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABA4C - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 127 @ 86ABA58 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 127 @ 86ABA58 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABA64 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABA70 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABA7C @@ -18892,7 +18892,7 @@ voicegroup163:: @ 86AB938 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABB3C voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABB48 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABB54 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 246, 0, 235 @ 86ABB60 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 246, 0, 235 @ 86ABB60 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABB6C voice_keysplit voicegroup006, KeySplitTable2 @ 86ABB78 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABB84 @@ -18919,7 +18919,7 @@ voicegroup163:: @ 86AB938 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABC80 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABC8C voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABC98 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 86ABCA4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 86ABCA4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABCB0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABCBC voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABCC8 @@ -18981,8 +18981,8 @@ voicegroup164:: @ 86ABF38 voice_keysplit voicegroup005, KeySplitTable1 @ 86ABF44 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABF50 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABF5C - voice_directsound 60, 0, DirectSoundWaveData_871CBCC, 128, 180, 108, 209 @ 86ABF68 - voice_directsound 60, 65, DirectSoundWaveData_871F234, 85, 204, 77, 246 @ 86ABF74 + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 128, 180, 108, 209 @ 86ABF68 + voice_directsound 60, 65, DirectSoundWaveData_unknown_e_piano_high, 85, 204, 77, 246 @ 86ABF74 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABF80 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABF8C voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABF98 @@ -18994,14 +18994,14 @@ voicegroup164:: @ 86ABF38 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABFE0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABFEC voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABFF8 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 76, 133, 137 @ 86AC004 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 76, 133, 137 @ 86AC004 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC010 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC01C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC028 - voice_directsound 60, 0, DirectSoundWaveData_87410E0, 64, 188, 108, 165 @ 86AC034 + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 64, 188, 108, 165 @ 86AC034 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC040 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC04C - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 127 @ 86AC058 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 127 @ 86AC058 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC064 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC070 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC07C @@ -19023,7 +19023,7 @@ voicegroup164:: @ 86ABF38 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC13C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC148 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC154 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 246, 0, 235 @ 86AC160 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 246, 0, 235 @ 86AC160 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC16C voice_keysplit voicegroup006, KeySplitTable2 @ 86AC178 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC184 @@ -19050,7 +19050,7 @@ voicegroup164:: @ 86ABF38 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC280 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC28C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC298 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 86AC2A4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 86AC2A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC2B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC2BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC2C8 @@ -19117,22 +19117,22 @@ voicegroup165:: @ 86AC538 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC580 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC58C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC598 - voice_directsound 60, 0, DirectSoundWaveData_86B5D04, 255, 165, 51, 242 @ 86AC5A4 - voice_directsound 60, 0, DirectSoundWaveData_86DD11C, 255, 0, 255, 0 @ 86AC5B0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_glockenspiel, 255, 165, 51, 242 @ 86AC5A4 + voice_directsound 60, 0, DirectSoundWaveData_unknown_anvil_low, 255, 0, 255, 0 @ 86AC5B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC5BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC5C8 - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 86AC5D4 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 86AC5E0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 86AC5D4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 86AC5E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC5EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC5F8 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 37, 165, 103, 127 @ 86AC604 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 37, 165, 103, 127 @ 86AC604 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC610 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC61C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC628 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC634 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC640 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC64C - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 204, 92, 226 @ 86AC658 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 204, 92, 226 @ 86AC658 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC664 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC670 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC67C @@ -19154,7 +19154,7 @@ voicegroup165:: @ 86AC538 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC73C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC748 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC754 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 226 @ 86AC760 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 226 @ 86AC760 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC76C voice_keysplit voicegroup006, KeySplitTable2 @ 86AC778 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC784 @@ -19181,12 +19181,12 @@ voicegroup165:: @ 86AC538 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC880 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC88C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC898 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 0, 255, 165 @ 86AC8A4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 0, 255, 165 @ 86AC8A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC8B0 - voice_directsound 60, 0, DirectSoundWaveData_88F9F3C, 255, 191, 97, 165 @ 86AC8BC + voice_directsound 60, 0, DirectSoundWaveData_sd90_enhanced_delay_shaku, 255, 191, 97, 165 @ 86AC8BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC8C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC8D4 - voice_directsound 60, 0, DirectSoundWaveData_88F94DC, 255, 0, 255, 127 @ 86AC8E0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 255, 0, 255, 127 @ 86AC8E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC8EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC8F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AC904 @@ -19249,36 +19249,36 @@ voicegroup166:: @ 86ACB38 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACB8C voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACB98 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACBA4 - voice_directsound 60, 0, DirectSoundWaveData_86DD11C, 255, 0, 255, 0 @ 86ACBB0 + voice_directsound 60, 0, DirectSoundWaveData_unknown_anvil_low, 255, 0, 255, 0 @ 86ACBB0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACBBC voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACBC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACBD4 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 86ACBE0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 86ACBE0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACBEC voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACBF8 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 128, 146, 108, 137 @ 86ACC04 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 128, 146, 108, 137 @ 86ACC04 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACC10 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACC1C voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACC28 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACC34 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACC40 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACC4C - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 128, 204, 103, 226 @ 86ACC58 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 128, 204, 103, 226 @ 86ACC58 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACC64 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACC70 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACC7C voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACC88 - voice_directsound 60, 0, DirectSoundWaveData_8709004, 255, 0, 255, 127 @ 86ACC94 - voice_directsound 60, 0, DirectSoundWaveData_870AE74, 255, 0, 255, 127 @ 86ACCA0 - voice_directsound 60, 0, DirectSoundWaveData_88DA388, 255, 0, 255, 165 @ 86ACCAC + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 @ 86ACC94 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 @ 86ACCA0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 165 @ 86ACCAC voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACCB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACCC4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACCD0 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 86ACCDC + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 86ACCDC voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACCE8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACCF4 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 86ACD00 - voice_directsound 60, 0, DirectSoundWaveData_87224B8, 255, 0, 255, 127 @ 86ACD0C + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 86ACD00 + voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 0, 255, 127 @ 86ACD0C voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACD18 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACD24 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACD30 @@ -19286,7 +19286,7 @@ voicegroup166:: @ 86ACB38 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACD48 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACD54 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACD60 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 193, 153 @ 86ACD6C + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 193, 153 @ 86ACD6C voice_keysplit voicegroup006, KeySplitTable2 @ 86ACD78 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACD84 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACD90 @@ -19301,7 +19301,7 @@ voicegroup166:: @ 86ACB38 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACDFC voice_keysplit voicegroup009, KeySplitTable5 @ 86ACE08 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACE14 - voice_directsound 60, 0, DirectSoundWaveData_870DE64, 255, 0, 236, 188 @ 86ACE20 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 236, 188 @ 86ACE20 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACE2C voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACE38 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACE44 @@ -19317,7 +19317,7 @@ voicegroup166:: @ 86ACB38 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACEBC voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACEC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACED4 - voice_directsound 60, 0, DirectSoundWaveData_88F94DC, 255, 0, 255, 127 @ 86ACEE0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 255, 0, 255, 127 @ 86ACEE0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACEEC voice_square_1_alt 0, 3, 0, 1, 9, 0 @ 86ACEF8 voice_square_2_alt 3, 0, 2, 9, 1 @ 86ACF04 @@ -19387,14 +19387,14 @@ voicegroup167:: @ 86AD138 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD1E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD1EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD1F8 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 76, 133, 137 @ 86AD204 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 76, 133, 137 @ 86AD204 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD210 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD21C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD228 - voice_directsound 60, 0, DirectSoundWaveData_87410E0, 64, 188, 108, 165 @ 86AD234 + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 64, 188, 108, 165 @ 86AD234 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD240 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD24C - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 128, 249, 25, 127 @ 86AD258 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 128, 249, 25, 127 @ 86AD258 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD264 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD270 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD27C @@ -19505,8 +19505,8 @@ voicegroup168:: @ 86AD738 voice_keysplit voicegroup005, KeySplitTable1 @ 86AD744 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD750 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD75C - voice_directsound 60, 0, DirectSoundWaveData_871CBCC, 255, 188, 128, 226 @ 86AD768 - voice_directsound 60, 65, DirectSoundWaveData_871F234, 255, 204, 77, 246 @ 86AD774 + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 188, 128, 226 @ 86AD768 + voice_directsound 60, 65, DirectSoundWaveData_unknown_e_piano_high, 255, 204, 77, 246 @ 86AD774 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD780 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD78C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD798 @@ -19518,14 +19518,14 @@ voicegroup168:: @ 86AD738 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD7E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD7EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD7F8 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 76, 133, 137 @ 86AD804 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 76, 133, 137 @ 86AD804 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD810 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD81C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD828 - voice_directsound 60, 0, DirectSoundWaveData_87410E0, 64, 188, 108, 165 @ 86AD834 + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 64, 188, 108, 165 @ 86AD834 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD840 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD84C - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 127 @ 86AD858 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 127 @ 86AD858 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD864 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD870 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD87C @@ -19546,8 +19546,8 @@ voicegroup168:: @ 86AD738 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD930 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD93C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD948 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 216, 0, 165 @ 86AD954 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 246, 0, 235 @ 86AD960 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 216, 0, 165 @ 86AD954 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 246, 0, 235 @ 86AD960 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD96C voice_keysplit voicegroup006, KeySplitTable2 @ 86AD978 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD984 @@ -19574,7 +19574,7 @@ voicegroup168:: @ 86AD738 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ADA80 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ADA8C voice_square_1 0, 2, 0, 0, 15, 0 @ 86ADA98 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 86ADAA4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 86ADAA4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ADAB0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ADABC voice_square_1 0, 2, 0, 0, 15, 0 @ 86ADAC8 @@ -19649,7 +19649,7 @@ voicegroup169:: @ 86ADD38 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ADDE0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ADDEC voice_square_1 0, 2, 0, 0, 15, 0 @ 86ADDF8 - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 210 @ 86ADE04 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 210 @ 86ADE04 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ADE10 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ADE1C voice_square_1 0, 2, 0, 0, 15, 0 @ 86ADE28 @@ -19667,7 +19667,7 @@ voicegroup169:: @ 86ADD38 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ADEB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ADEC4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ADED0 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 86ADEDC + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 86ADEDC voice_square_1 0, 2, 0, 0, 15, 0 @ 86ADEE8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ADEF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ADF00 @@ -19810,7 +19810,7 @@ voicegroup170:: @ 86AE338 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AE548 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AE554 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AE560 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 86AE56C + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 86AE56C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AE578 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AE584 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AE590 @@ -19836,7 +19836,7 @@ voicegroup170:: @ 86AE338 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AE680 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AE68C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AE698 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 86AE6A4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 86AE6A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AE6B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AE6BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AE6C8 @@ -19895,9 +19895,9 @@ voicegroup171:: @ 86AE728 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AE920 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AE92C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AE938 - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 216, 0, 165 @ 86AE944 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 216, 0, 165 @ 86AE944 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AE950 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 86AE95C + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 86AE95C voice_keysplit voicegroup006, KeySplitTable2 @ 86AE968 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AE974 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AE980 @@ -19923,7 +19923,7 @@ voicegroup171:: @ 86AE728 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEA70 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEA7C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEA88 - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 86AEA94 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 86AEA94 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEAA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEAAC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEAB8 @@ -19948,8 +19948,8 @@ voicegroup172:: @ 86AEB6C voice_keysplit voicegroup005, KeySplitTable1 @ 86AEB78 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEB84 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEB90 - voice_directsound 60, 0, DirectSoundWaveData_871CBCC, 255, 188, 128, 226 @ 86AEB9C - voice_directsound 60, 65, DirectSoundWaveData_871F234, 255, 204, 77, 246 @ 86AEBA8 + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 188, 128, 226 @ 86AEB9C + voice_directsound 60, 65, DirectSoundWaveData_unknown_e_piano_high, 255, 204, 77, 246 @ 86AEBA8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEBB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEBC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEBCC @@ -19961,14 +19961,14 @@ voicegroup172:: @ 86AEB6C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEC14 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEC20 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEC2C - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 76, 133, 137 @ 86AEC38 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 76, 133, 137 @ 86AEC38 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEC44 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEC50 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEC5C - voice_directsound 60, 0, DirectSoundWaveData_87410E0, 64, 188, 108, 165 @ 86AEC68 + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 64, 188, 108, 165 @ 86AEC68 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEC74 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEC80 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 127 @ 86AEC8C + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 127 @ 86AEC8C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEC98 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AECA4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AECB0 @@ -19990,7 +19990,7 @@ voicegroup172:: @ 86AEB6C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AED70 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AED7C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AED88 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 246, 0, 235 @ 86AED94 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 246, 0, 235 @ 86AED94 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEDA0 voice_keysplit voicegroup006, KeySplitTable2 @ 86AEDAC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEDB8 @@ -20017,7 +20017,7 @@ voicegroup172:: @ 86AEB6C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEEB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEEC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEECC - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 86AEED8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 86AEED8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEEE4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEEF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEEFC @@ -20079,8 +20079,8 @@ voicegroup173:: @ 86AF16C voice_keysplit voicegroup005, KeySplitTable1 @ 86AF178 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF184 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF190 - voice_directsound 60, 0, DirectSoundWaveData_871CBCC, 255, 188, 128, 226 @ 86AF19C - voice_directsound 60, 65, DirectSoundWaveData_871F234, 128, 204, 77, 246 @ 86AF1A8 + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 188, 128, 226 @ 86AF19C + voice_directsound 60, 65, DirectSoundWaveData_unknown_e_piano_high, 128, 204, 77, 246 @ 86AF1A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF1B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF1C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF1CC @@ -20089,18 +20089,18 @@ voicegroup173:: @ 86AF16C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF1F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF1FC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF208 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 86AF214 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 86AF214 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF220 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF22C - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 51, 0, 203, 127 @ 86AF238 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 51, 0, 203, 127 @ 86AF238 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF244 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF250 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF25C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF268 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF274 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF280 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 128, 249, 25, 127 @ 86AF28C - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 64, 216, 51, 224 @ 86AF298 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 128, 249, 25, 127 @ 86AF28C + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 64, 216, 51, 224 @ 86AF298 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF2A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF2B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF2BC @@ -20110,7 +20110,7 @@ voicegroup173:: @ 86AF16C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF2EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF2F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF304 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 86AF310 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 86AF310 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF31C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF328 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF334 @@ -20148,7 +20148,7 @@ voicegroup173:: @ 86AF16C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF4B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF4C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF4CC - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 86AF4D8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 86AF4D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF4E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF4F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF4FC @@ -20211,7 +20211,7 @@ voicegroup174:: @ 86AF76C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF784 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF790 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF79C - voice_directsound 60, 0, DirectSoundWaveData_871CBCC, 255, 249, 0, 165 @ 86AF7A8 + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 249, 0, 165 @ 86AF7A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF7B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF7C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF7CC @@ -20223,11 +20223,11 @@ voicegroup174:: @ 86AF76C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF814 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF820 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF82C - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 0, 255, 127 @ 86AF838 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 0, 255, 127 @ 86AF838 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF844 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF850 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF85C - voice_directsound 60, 0, DirectSoundWaveData_87410E0, 255, 0, 255, 165 @ 86AF868 + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 255, 0, 255, 165 @ 86AF868 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF874 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF880 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF88C @@ -20235,8 +20235,8 @@ voicegroup174:: @ 86AF76C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF8A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF8B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF8BC - voice_directsound 60, 0, DirectSoundWaveData_8709004, 128, 0, 255, 214 @ 86AF8C8 - voice_directsound 60, 0, DirectSoundWaveData_870AE74, 128, 0, 255, 206 @ 86AF8D4 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 128, 0, 255, 214 @ 86AF8C8 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 128, 0, 255, 206 @ 86AF8D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF8E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF8EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF8F8 @@ -20244,7 +20244,7 @@ voicegroup174:: @ 86AF76C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF910 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF91C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF928 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 165 @ 86AF934 + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 165 @ 86AF934 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF940 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF94C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF958 @@ -20268,7 +20268,7 @@ voicegroup174:: @ 86AF76C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFA30 voice_keysplit voicegroup009, KeySplitTable5 @ 86AFA3C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFA48 - voice_directsound 60, 0, DirectSoundWaveData_870DE64, 255, 0, 255, 209 @ 86AFA54 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 209 @ 86AFA54 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFA60 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFA6C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFA78 @@ -20326,7 +20326,7 @@ voicegroup174:: @ 86AF76C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFCE8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFCF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFD00 - voice_directsound 60, 0, DirectSoundWaveData_88DA388, 255, 0, 255, 165 @ 86AFD0C + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 165 @ 86AFD0C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFD18 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFD24 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFD30 @@ -20358,7 +20358,7 @@ voicegroup174:: @ 86AF76C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFE68 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFE74 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFE80 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 165, 154, 127 @ 86AFE8C + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 165, 154, 127 @ 86AFE8C voice_keysplit_all voicegroup002 @ 86AFE98 voice_square_1_alt 0, 2, 0, 2, 3, 1 @ 86AFEA4 voice_square_2_alt 2, 0, 2, 3, 1 @ 86AFEB0 @@ -20379,7 +20379,7 @@ voicegroup175:: @ 86AFEC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFF40 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFF4C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFF58 - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 86AFF64 + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 86AFF64 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFF70 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFF7C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFF88 @@ -20390,7 +20390,7 @@ voicegroup175:: @ 86AFEC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFFC4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFFD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFFDC - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 85, 165, 154, 127 @ 86AFFE8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 85, 165, 154, 127 @ 86AFFE8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFFF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0000 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B000C @@ -20507,36 +20507,36 @@ voicegroup177:: @ 86B0378 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B04F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0504 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0510 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86DB908, 255, 0, 255, 0 @ 86B051C - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86CD0C4, 255, 0, 255, 0 @ 86B0528 - voice_directsound_no_resample 67, 71, DirectSoundWaveData_86CDFDC, 255, 180, 175, 228 @ 86B0534 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86CDFDC, 255, 0, 255, 242 @ 86B0540 - voice_directsound_no_resample 65, 0, DirectSoundWaveData_86C6200, 255, 255, 255, 127 @ 86B054C - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86C6A90, 255, 0, 255, 242 @ 86B0558 - voice_directsound 64, 24, DirectSoundWaveData_86CF950, 255, 0, 255, 226 @ 86B0564 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_standard_bells, 255, 0, 255, 0 @ 86B051C + voice_directsound_no_resample 64, 64, DirectSoundWaveData_drum_and_percussion_kick, 255, 0, 255, 0 @ 86B0528 + voice_directsound_no_resample 67, 71, DirectSoundWaveData_sd90_solo_snare, 255, 180, 175, 228 @ 86B0534 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 0, 255, 242 @ 86B0540 + voice_directsound_no_resample 65, 0, DirectSoundWaveData_sc88_standard_hand_clap, 255, 255, 255, 127 @ 86B054C + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 86B0558 + voice_directsound 64, 24, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 86B0564 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0570 - voice_directsound 68, 29, DirectSoundWaveData_86CF950, 255, 0, 255, 226 @ 86B057C - voice_directsound_no_resample 60, 64, DirectSoundWaveData_86C5B0C, 255, 0, 255, 242 @ 86B0588 - voice_directsound 72, 64, DirectSoundWaveData_86CF950, 255, 0, 255, 226 @ 86B0594 + voice_directsound 68, 29, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 86B057C + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare1, 255, 0, 255, 242 @ 86B0588 + voice_directsound 72, 64, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 86B0594 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B05A0 - voice_directsound 76, 39, DirectSoundWaveData_86CF950, 255, 0, 255, 226 @ 86B05AC - voice_directsound 80, 89, DirectSoundWaveData_86CF950, 255, 0, 255, 226 @ 86B05B8 - voice_directsound_no_resample 33, 10, DirectSoundWaveData_86CB6B8, 255, 235, 0, 231 @ 86B05C4 - voice_directsound 84, 104, DirectSoundWaveData_86CF950, 255, 0, 255, 235 @ 86B05D0 + voice_directsound 76, 39, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 86B05AC + voice_directsound 80, 89, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 86B05B8 + voice_directsound_no_resample 33, 10, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86B05C4 + voice_directsound 84, 104, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 235 @ 86B05D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B05DC - voice_directsound 63, 64, DirectSoundWaveData_86CB6B8, 255, 235, 0, 231 @ 86B05E8 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86D1A2C, 255, 165, 103, 231 @ 86B05F4 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86CA520, 255, 127, 77, 204 @ 86B0600 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86CADD4, 255, 231, 0, 188 @ 86B060C - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86D925C, 255, 0, 255, 242 @ 86B0618 - voice_directsound_no_resample 64, 118, DirectSoundWaveData_86CB6B8, 255, 235, 0, 231 @ 86B0624 + voice_directsound 63, 64, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86B05E8 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_dance_drums_ride_bell, 255, 165, 103, 231 @ 86B05F4 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_unknown_tambourine, 255, 127, 77, 204 @ 86B0600 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_unknown_cymbal_crash, 255, 231, 0, 188 @ 86B060C + voice_directsound_no_resample 64, 64, DirectSoundWaveData_unknown_cowbell, 255, 0, 255, 242 @ 86B0618 + voice_directsound_no_resample 64, 118, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86B0624 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0630 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86CB6B8, 255, 235, 0, 231 @ 86B063C - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86CB6B8, 8, 0, 255, 216 @ 86B0648 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86D9C14, 255, 0, 255, 0 @ 86B0654 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86CC5E4, 255, 0, 255, 0 @ 86B0660 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86CCAFC, 255, 0, 255, 0 @ 86B066C - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86CCAFC, 255, 0, 255, 0 @ 86B0678 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86B063C + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_standard_cymbal_crash, 8, 0, 255, 216 @ 86B0648 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_unknown_djembe, 255, 0, 255, 0 @ 86B0654 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_bongo, 255, 0, 255, 0 @ 86B0660 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_bongo_low, 255, 0, 255, 0 @ 86B066C + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_bongo_low, 255, 0, 255, 0 @ 86B0678 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0684 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0690 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B069C @@ -20552,16 +20552,16 @@ voicegroup177:: @ 86B0378 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0714 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0720 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B072C - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86DAA94, 255, 242, 103, 188 @ 86B0738 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86DAA94, 255, 242, 103, 188 @ 86B0744 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86DAA94, 255, 165, 103, 188 @ 86B0750 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86DB908, 255, 0, 255, 0 @ 86B075C + voice_directsound_no_resample 64, 64, DirectSoundWaveData_unknown_anvil_high, 255, 242, 103, 188 @ 86B0738 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_unknown_anvil_high, 255, 242, 103, 188 @ 86B0744 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_unknown_anvil_high, 255, 165, 103, 188 @ 86B0750 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_standard_bells, 255, 0, 255, 0 @ 86B075C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0768 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0774 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86DD11C, 255, 0, 255, 0 @ 86B0780 - voice_directsound 63, 64, DirectSoundWaveData_86DE6C0, 255, 0, 255, 0 @ 86B078C - voice_directsound 50, 64, DirectSoundWaveData_86DFCA4, 255, 0, 255, 0 @ 86B0798 - voice_directsound 64, 64, DirectSoundWaveData_86DFCA4, 255, 0, 255, 0 @ 86B07A4 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_unknown_anvil_low, 255, 0, 255, 0 @ 86B0780 + voice_directsound 63, 64, DirectSoundWaveData_unknown_ethnic_drum, 255, 0, 255, 0 @ 86B078C + voice_directsound 50, 64, DirectSoundWaveData_unknown_tsuzumi, 255, 0, 255, 0 @ 86B0798 + voice_directsound 64, 64, DirectSoundWaveData_unknown_tsuzumi, 255, 0, 255, 0 @ 86B07A4 .align 2 voicegroup178:: @ 86B07B0 @@ -20578,7 +20578,7 @@ voicegroup178:: @ 86B07B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0828 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0834 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0840 - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 204, 103, 165 @ 86B084C + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 204, 103, 165 @ 86B084C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0858 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0864 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0870 @@ -20589,7 +20589,7 @@ voicegroup178:: @ 86B07B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B08AC voice_square_1 0, 2, 0, 0, 15, 0 @ 86B08B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B08C4 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 165, 154, 165 @ 86B08D0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 165, 154, 165 @ 86B08D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B08DC voice_square_1 0, 2, 0, 0, 15, 0 @ 86B08E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B08F4 @@ -20669,7 +20669,7 @@ voicegroup179:: @ 86B0BD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0C48 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0C54 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0C60 - voice_directsound 60, 0, DirectSoundWaveData_873E2A4, 255, 235, 0, 204 @ 86B0C6C + voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 235, 0, 204 @ 86B0C6C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0C78 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0C84 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0C90 @@ -20680,7 +20680,7 @@ voicegroup179:: @ 86B0BD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0CCC voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0CD8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0CE4 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 85, 165, 154, 127 @ 86B0CF0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 85, 165, 154, 127 @ 86B0CF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0CFC voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0D08 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0D14 @@ -20689,7 +20689,7 @@ voicegroup179:: @ 86B0BD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0D38 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0D44 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0D50 - voice_directsound 60, 0, DirectSoundWaveData_86FFDC0, 255, 253, 0, 149 @ 86B0D5C + voice_directsound 60, 0, DirectSoundWaveData_sc88_pick_bass, 255, 253, 0, 149 @ 86B0D5C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0D68 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0D74 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0D80 @@ -20751,8 +20751,8 @@ voicegroup180:: @ 86B0FF0 voice_keysplit voicegroup005, KeySplitTable1 @ 86B0FFC voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1008 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1014 - voice_directsound 60, 0, DirectSoundWaveData_871CBCC, 64, 249, 0, 188 @ 86B1020 - voice_directsound 60, 0, DirectSoundWaveData_871CBCC, 255, 249, 0, 165 @ 86B102C + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 64, 249, 0, 188 @ 86B1020 + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 249, 0, 165 @ 86B102C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1038 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1044 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1050 @@ -20873,7 +20873,7 @@ voicegroup180:: @ 86B0FF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B15B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B15C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B15CC - voice_directsound_no_resample 60, 0, DirectSoundWaveData_86C6200, 255, 255, 255, 127 @ 86B15D8 + voice_directsound_no_resample 60, 0, DirectSoundWaveData_sc88_standard_hand_clap, 255, 255, 255, 127 @ 86B15D8 voice_noise_alt 0, 0, 1, 0, 0 @ 86B15E4 .align 2 @@ -20924,7 +20924,7 @@ voicegroup181:: @ 86B15F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B17F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1800 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B180C - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 242, 51, 242 @ 86B1818 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 242, 51, 242 @ 86B1818 .align 2 voicegroup182:: @ 86B1824 @@ -20975,7 +20975,7 @@ voicegroup182:: @ 86B1824 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1A34 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1A40 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1A4C - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 0, 193, 76 @ 86B1A58 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 0, 193, 76 @ 86B1A58 voice_keysplit voicegroup006, KeySplitTable2 @ 86B1A64 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1A70 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1A7C @@ -21043,7 +21043,7 @@ voicegroup183:: @ 86B1C44 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1D40 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1D4C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1D58 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 128, 249, 25, 127 @ 86B1D64 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 128, 249, 25, 127 @ 86B1D64 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1D70 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1D7C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1D88 @@ -21054,7 +21054,7 @@ voicegroup183:: @ 86B1C44 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1DC4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1DD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1DDC - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 86B1DE8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 86B1DE8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1DF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1E00 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1E0C @@ -21164,7 +21164,7 @@ voicegroup184:: @ 86B2244 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B22C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B22D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B22E0 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 86B22EC + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 86B22EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86B22F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2304 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2310 @@ -21181,14 +21181,14 @@ voicegroup184:: @ 86B2244 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2394 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B23A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B23AC - voice_directsound 60, 0, DirectSoundWaveData_88DA388, 255, 0, 255, 165 @ 86B23B8 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 165 @ 86B23B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B23C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B23D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B23DC voice_square_1 0, 2, 0, 0, 15, 0 @ 86B23E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B23F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2400 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 86B240C + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 86B240C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2418 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2424 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2430 @@ -21235,7 +21235,7 @@ voicegroup184:: @ 86B2244 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B261C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2628 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2634 - voice_directsound 60, 0, DirectSoundWaveData_86BA7E8, 255, 0, 255, 0 @ 86B2640 + voice_directsound 60, 0, DirectSoundWaveData_advanced_orchestra_voice_ahhs, 255, 0, 255, 0 @ 86B2640 .align 2 voicegroup185:: @ 86B264C @@ -21253,7 +21253,7 @@ voicegroup185:: @ 86B264C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B26D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B26DC voice_square_1 0, 2, 0, 0, 15, 0 @ 86B26E8 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 86B26F4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 86B26F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2700 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B270C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2718 @@ -21268,31 +21268,31 @@ voicegroup185:: @ 86B264C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2784 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2790 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B279C - voice_directsound 60, 0, DirectSoundWaveData_8709004, 128, 0, 255, 214 @ 86B27A8 - voice_directsound 60, 0, DirectSoundWaveData_870AE74, 128, 0, 255, 206 @ 86B27B4 - voice_directsound 60, 0, DirectSoundWaveData_88DA388, 255, 0, 255, 165 @ 86B27C0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 128, 0, 255, 214 @ 86B27A8 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 128, 0, 255, 206 @ 86B27B4 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 165 @ 86B27C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B27CC - voice_directsound 60, 0, DirectSoundWaveData_86FFDC0, 255, 253, 0, 149 @ 86B27D8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pick_bass, 255, 253, 0, 149 @ 86B27D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B27E4 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 86B27F0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 86B27F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B27FC voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2808 - voice_directsound 60, 0, DirectSoundWaveData_86B86A4, 255, 252, 0, 115 @ 86B2814 + voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 86B2814 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2820 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B282C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2838 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2844 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2850 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B285C - voice_directsound 60, 0, DirectSoundWaveData_8726EF0, 255, 216, 0, 165 @ 86B2868 + voice_directsound 60, 0, DirectSoundWaveData_sc88_pizzicato_strings, 255, 216, 0, 165 @ 86B2868 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2874 - voice_directsound 60, 0, DirectSoundWaveData_86B9318, 255, 246, 0, 226 @ 86B2880 + voice_directsound 60, 0, DirectSoundWaveData_sc88_timpani, 255, 246, 0, 226 @ 86B2880 voice_keysplit voicegroup006, KeySplitTable2 @ 86B288C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2898 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B28A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B28B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B28BC - voice_directsound 60, 0, DirectSoundWaveData_86BA7E8, 85, 0, 154, 165 @ 86B28C8 + voice_directsound 60, 0, DirectSoundWaveData_advanced_orchestra_voice_ahhs, 85, 0, 154, 165 @ 86B28C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B28D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B28E0 voice_keysplit voicegroup007, KeySplitTable3 @ 86B28EC @@ -21301,7 +21301,7 @@ voicegroup185:: @ 86B264C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2910 voice_keysplit voicegroup009, KeySplitTable5 @ 86B291C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2928 - voice_directsound 60, 0, DirectSoundWaveData_870DE64, 255, 0, 255, 209 @ 86B2934 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 209 @ 86B2934 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2940 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B294C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2958 @@ -21317,7 +21317,7 @@ voicegroup185:: @ 86B264C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B29D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B29DC voice_square_1 0, 2, 0, 0, 15, 0 @ 86B29E8 - voice_directsound 60, 0, DirectSoundWaveData_88F94DC, 255, 0, 255, 127 @ 86B29F4 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 255, 0, 255, 127 @ 86B29F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2A00 voice_square_2_alt 2, 0, 0, 15, 0 @ 86B2A0C voice_square_1_alt 0, 2, 0, 0, 15, 0 @ 86B2A18 @@ -21518,14 +21518,14 @@ voicegroup187:: @ 86B324C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B32F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3300 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B330C - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 255, 76, 133, 137 @ 86B3318 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 255, 76, 133, 137 @ 86B3318 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3324 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3330 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B333C - voice_directsound 60, 0, DirectSoundWaveData_87410E0, 64, 188, 108, 165 @ 86B3348 + voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 64, 188, 108, 165 @ 86B3348 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3354 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3360 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 255, 249, 25, 127 @ 86B336C + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 255, 249, 25, 127 @ 86B336C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3378 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3384 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3390 @@ -21547,7 +21547,7 @@ voicegroup187:: @ 86B324C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3450 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B345C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3468 - voice_directsound 60, 0, DirectSoundWaveData_873D874, 255, 246, 0, 235 @ 86B3474 + voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 246, 0, 235 @ 86B3474 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3480 voice_keysplit voicegroup006, KeySplitTable2 @ 86B348C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3498 @@ -21574,7 +21574,7 @@ voicegroup187:: @ 86B324C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3594 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B35A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B35AC - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 86B35B8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 86B35B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B35C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B35D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B35DC @@ -21636,8 +21636,8 @@ voicegroup188:: @ 86B384C voice_keysplit voicegroup005, KeySplitTable1 @ 86B3858 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3864 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3870 - voice_directsound 60, 0, DirectSoundWaveData_871CBCC, 255, 188, 128, 226 @ 86B387C - voice_directsound 60, 65, DirectSoundWaveData_871F234, 128, 204, 77, 246 @ 86B3888 + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 188, 128, 226 @ 86B387C + voice_directsound 60, 65, DirectSoundWaveData_unknown_e_piano_high, 128, 204, 77, 246 @ 86B3888 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3894 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B38A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B38AC @@ -21646,18 +21646,18 @@ voicegroup188:: @ 86B384C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B38D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B38DC voice_square_1 0, 2, 0, 0, 15, 0 @ 86B38E8 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 86B38F4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 86B38F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3900 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B390C - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 51, 0, 203, 127 @ 86B3918 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 51, 0, 203, 127 @ 86B3918 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3924 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3930 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B393C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3948 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3954 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3960 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 128, 249, 25, 127 @ 86B396C - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 64, 216, 51, 224 @ 86B3978 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 128, 249, 25, 127 @ 86B396C + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 64, 216, 51, 224 @ 86B3978 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3984 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3990 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B399C @@ -21667,7 +21667,7 @@ voicegroup188:: @ 86B384C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B39CC voice_square_1 0, 2, 0, 0, 15, 0 @ 86B39D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B39E4 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 86B39F0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 86B39F0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B39FC voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3A08 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3A14 @@ -21705,7 +21705,7 @@ voicegroup188:: @ 86B384C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3B94 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3BA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3BAC - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 86B3BB8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 86B3BB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3BC4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3BD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3BDC @@ -21767,8 +21767,8 @@ voicegroup189:: @ 86B3E4C voice_keysplit voicegroup005, KeySplitTable1 @ 86B3E58 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3E64 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3E70 - voice_directsound 60, 0, DirectSoundWaveData_871CBCC, 255, 188, 128, 226 @ 86B3E7C - voice_directsound 60, 65, DirectSoundWaveData_871F234, 128, 204, 77, 246 @ 86B3E88 + voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 188, 128, 226 @ 86B3E7C + voice_directsound 60, 65, DirectSoundWaveData_unknown_e_piano_high, 128, 204, 77, 246 @ 86B3E88 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3E94 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3EA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3EAC @@ -21777,18 +21777,18 @@ voicegroup189:: @ 86B3E4C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3ED0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3EDC voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3EE8 - voice_directsound 60, 0, DirectSoundWaveData_8736C74, 255, 165, 90, 216 @ 86B3EF4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 86B3EF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3F00 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3F0C - voice_directsound 60, 0, DirectSoundWaveData_86B63A8, 51, 0, 203, 127 @ 86B3F18 + voice_directsound 60, 0, DirectSoundWaveData_sc88_organ2, 51, 0, 203, 127 @ 86B3F18 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3F24 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3F30 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3F3C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3F48 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3F54 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3F60 - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 128, 249, 25, 127 @ 86B3F6C - voice_directsound 60, 0, DirectSoundWaveData_88D8418, 64, 216, 51, 224 @ 86B3F78 + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 128, 249, 25, 127 @ 86B3F6C + voice_directsound 60, 0, DirectSoundWaveData_sc88_nylon_str_guitar, 64, 216, 51, 224 @ 86B3F78 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3F84 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3F90 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3F9C @@ -21798,7 +21798,7 @@ voicegroup189:: @ 86B3E4C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3FCC voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3FD8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3FE4 - voice_directsound 60, 0, DirectSoundWaveData_86B6BA0, 255, 253, 0, 188 @ 86B3FF0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_fretless_bass, 255, 253, 0, 188 @ 86B3FF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3FFC voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4008 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4014 @@ -21836,7 +21836,7 @@ voicegroup189:: @ 86B3E4C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4194 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B41A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B41AC - voice_directsound 60, 0, DirectSoundWaveData_86FF65C, 255, 127, 231, 127 @ 86B41B8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_flute, 255, 127, 231, 127 @ 86B41B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B41C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B41D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B41DC @@ -21894,35 +21894,35 @@ voicegroup190:: @ 86B429C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4428 voice_noise_alt 0, 0, 2, 7, 0 @ 86B4434 voice_noise_alt 0, 0, 1, 9, 1 @ 86B4440 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86CD0C4, 255, 0, 255, 0 @ 86B444C + voice_directsound_no_resample 64, 64, DirectSoundWaveData_drum_and_percussion_kick, 255, 0, 255, 0 @ 86B444C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4458 - voice_directsound_no_resample 64, 52, DirectSoundWaveData_86C6A90, 255, 0, 255, 242 @ 86B4464 + voice_directsound_no_resample 64, 52, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 86B4464 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4470 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B447C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4488 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4494 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B44A0 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_86C5B0C, 255, 0, 255, 242 @ 86B44AC + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare1, 255, 0, 255, 242 @ 86B44AC voice_square_1 0, 2, 0, 0, 15, 0 @ 86B44B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B44C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B44D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B44DC - voice_directsound_no_resample 33, 104, DirectSoundWaveData_86CB6B8, 255, 235, 0, 231 @ 86B44E8 + voice_directsound_no_resample 33, 104, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86B44E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B44F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4500 - voice_directsound 63, 64, DirectSoundWaveData_86CB6B8, 255, 235, 0, 231 @ 86B450C + voice_directsound 63, 64, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86B450C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4518 - voice_directsound_no_resample 64, 34, DirectSoundWaveData_86CA520, 255, 127, 77, 204 @ 86B4524 - voice_directsound_no_resample 64, 14, DirectSoundWaveData_86CADD4, 255, 231, 0, 188 @ 86B4530 - voice_directsound_no_resample 64, 89, DirectSoundWaveData_86D925C, 255, 0, 255, 242 @ 86B453C - voice_directsound_no_resample 64, 24, DirectSoundWaveData_86CB6B8, 255, 235, 0, 231 @ 86B4548 + voice_directsound_no_resample 64, 34, DirectSoundWaveData_unknown_tambourine, 255, 127, 77, 204 @ 86B4524 + voice_directsound_no_resample 64, 14, DirectSoundWaveData_unknown_cymbal_crash, 255, 231, 0, 188 @ 86B4530 + voice_directsound_no_resample 64, 89, DirectSoundWaveData_unknown_cowbell, 255, 0, 255, 242 @ 86B453C + voice_directsound_no_resample 64, 24, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86B4548 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4554 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_86CB6B8, 255, 235, 0, 231 @ 86B4560 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_86CB6B8, 8, 0, 255, 216 @ 86B456C - voice_directsound_no_resample 64, 94, DirectSoundWaveData_86D9C14, 255, 0, 255, 0 @ 86B4578 - voice_directsound_no_resample 64, 34, DirectSoundWaveData_86CC5E4, 255, 0, 255, 0 @ 86B4584 - voice_directsound_no_resample 64, 34, DirectSoundWaveData_86CCAFC, 255, 0, 255, 0 @ 86B4590 - voice_directsound_no_resample 64, 90, DirectSoundWaveData_86CCAFC, 255, 0, 255, 0 @ 86B459C + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86B4560 + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 8, 0, 255, 216 @ 86B456C + voice_directsound_no_resample 64, 94, DirectSoundWaveData_unknown_djembe, 255, 0, 255, 0 @ 86B4578 + voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88_bongo, 255, 0, 255, 0 @ 86B4584 + voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88_bongo_low, 255, 0, 255, 0 @ 86B4590 + voice_directsound_no_resample 64, 90, DirectSoundWaveData_sc88_bongo_low, 255, 0, 255, 0 @ 86B459C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B45A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B45B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B45C0 @@ -21938,11 +21938,11 @@ voicegroup190:: @ 86B429C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4638 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4644 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4650 - voice_directsound_no_resample 64, 39, DirectSoundWaveData_86DAA94, 255, 242, 103, 188 @ 86B465C - voice_directsound_no_resample 64, 79, DirectSoundWaveData_86DAA94, 255, 242, 103, 188 @ 86B4668 - voice_directsound_no_resample 64, 39, DirectSoundWaveData_86DAA94, 255, 165, 103, 188 @ 86B4674 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_86DB908, 255, 0, 255, 0 @ 86B4680 + voice_directsound_no_resample 64, 39, DirectSoundWaveData_unknown_anvil_high, 255, 242, 103, 188 @ 86B465C + voice_directsound_no_resample 64, 79, DirectSoundWaveData_unknown_anvil_high, 255, 242, 103, 188 @ 86B4668 + voice_directsound_no_resample 64, 39, DirectSoundWaveData_unknown_anvil_high, 255, 165, 103, 188 @ 86B4674 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_standard_bells, 255, 0, 255, 0 @ 86B4680 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B468C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4698 - voice_directsound_no_resample 64, 104, DirectSoundWaveData_86DD11C, 255, 0, 255, 0 @ 86B46A4 - voice_directsound 63, 64, DirectSoundWaveData_86DE6C0, 255, 0, 255, 0 @ 86B46B0 + voice_directsound_no_resample 64, 104, DirectSoundWaveData_unknown_anvil_low, 255, 0, 255, 0 @ 86B46A4 + voice_directsound 63, 64, DirectSoundWaveData_unknown_ethnic_drum, 255, 0, 255, 0 @ 86B46B0 diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c index 5e832aba0..3c07cc227 100644 --- a/src/battle_ai_script_commands.c +++ b/src/battle_ai_script_commands.c @@ -1364,24 +1364,24 @@ static void BattleAICmd_get_ability(void) return; } - if (gBaseStats[gBattleMons[battlerId].species].ability1 != ABILITY_NONE) + if (gBaseStats[gBattleMons[battlerId].species].abilities[0] != ABILITY_NONE) { - if (gBaseStats[gBattleMons[battlerId].species].ability2 != ABILITY_NONE) + if (gBaseStats[gBattleMons[battlerId].species].abilities[1] != ABILITY_NONE) { // AI has no knowledge of opponent, so it guesses which ability. if (Random() & 1) - AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].ability1; + AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[0]; else - AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].ability2; + AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[1]; } else { - AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].ability1; // It's definitely ability 1. + AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[0]; // It's definitely ability 1. } } else { - AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].ability2; // AI can't actually reach this part since no pokemon has ability 2 and no ability 1. + AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[1]; // AI can't actually reach this part since no pokemon has ability 2 and no ability 1. } } else @@ -1412,15 +1412,15 @@ static void BattleAICmd_check_ability(void) { ability = gBattleMons[battlerId].ability; } - else if (gBaseStats[gBattleMons[battlerId].species].ability1 != ABILITY_NONE) + else if (gBaseStats[gBattleMons[battlerId].species].abilities[0] != ABILITY_NONE) { - if (gBaseStats[gBattleMons[battlerId].species].ability2 != ABILITY_NONE) + if (gBaseStats[gBattleMons[battlerId].species].abilities[1] != ABILITY_NONE) { u8 abilityDummyVariable = ability; // Needed to match. - if (gBaseStats[gBattleMons[battlerId].species].ability1 != abilityDummyVariable - && gBaseStats[gBattleMons[battlerId].species].ability2 != abilityDummyVariable) + if (gBaseStats[gBattleMons[battlerId].species].abilities[0] != abilityDummyVariable + && gBaseStats[gBattleMons[battlerId].species].abilities[1] != abilityDummyVariable) { - ability = gBaseStats[gBattleMons[battlerId].species].ability1; + ability = gBaseStats[gBattleMons[battlerId].species].abilities[0]; } else { @@ -1429,12 +1429,12 @@ static void BattleAICmd_check_ability(void) } else { - ability = gBaseStats[gBattleMons[battlerId].species].ability1; + ability = gBaseStats[gBattleMons[battlerId].species].abilities[0]; } } else { - ability = gBaseStats[gBattleMons[battlerId].species].ability2; // AI can't actually reach this part since no pokemon has ability 2 and no ability 1. + ability = gBaseStats[gBattleMons[battlerId].species].abilities[1]; // AI can't actually reach this part since no pokemon has ability 2 and no ability 1. } } else diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index de798eee3..cd31293f8 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -93,7 +93,7 @@ static bool8 ShouldSwitchIfWonderGuard(void) continue; GetMonData(&party[i], MON_DATA_SPECIES); // Unused return value. - GetMonData(&party[i], MON_DATA_ALT_ABILITY); // Unused return value. + GetMonData(&party[i], MON_DATA_ABILITY_NUM); // Unused return value. for (opposingBattler = GetBattlerAtPosition(opposingPosition), j = 0; j < MAX_MON_MOVES; j++) { @@ -197,10 +197,10 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void) continue; species = GetMonData(&party[i], MON_DATA_SPECIES); - if (GetMonData(&party[i], MON_DATA_ALT_ABILITY) != 0) - monAbility = gBaseStats[species].ability2; + if (GetMonData(&party[i], MON_DATA_ABILITY_NUM) != 0) + monAbility = gBaseStats[species].abilities[1]; else - monAbility = gBaseStats[species].ability1; + monAbility = gBaseStats[species].abilities[0]; if (absorbingTypeAbility == monAbility && Random() & 1) { @@ -392,10 +392,10 @@ static bool8 FindMonWithFlagsAndSuperEffective(u8 flags, u8 moduloPercent) continue; species = GetMonData(&party[i], MON_DATA_SPECIES); - if (GetMonData(&party[i], MON_DATA_ALT_ABILITY) != 0) - monAbility = gBaseStats[species].ability2; + if (GetMonData(&party[i], MON_DATA_ABILITY_NUM) != 0) + monAbility = gBaseStats[species].abilities[1]; else - monAbility = gBaseStats[species].ability1; + monAbility = gBaseStats[species].abilities[0]; moveFlags = AI_TypeCalc(gLastLandedMoves[gActiveBattler], species, monAbility); if (moveFlags & flags) diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c index 49bb0216b..b3a67a509 100644 --- a/src/battle_anim_effects_1.c +++ b/src/battle_anim_effects_1.c @@ -5315,21 +5315,19 @@ static void sub_8102D8C(s16 a, s16 b, s16* c, s16* d, s8 e) static void sub_8102DE4(struct Sprite* sprite) { - int b; - s16 a; - int c; + s16 y, yDelta; u8 index; + sprite->data[0]++; - b = sprite->data[0] * 5 - ((sprite->data[0] * 5 / 256) << 8); + yDelta = sprite->data[0] * 5 - ((sprite->data[0] * 5 / 256) << 8); sprite->data[4] += sprite->data[6]; sprite->data[5] += sprite->data[7]; sprite->pos1.x = sprite->data[4] >> 4; sprite->pos1.y = sprite->data[5] >> 4; - sprite->pos2.y = Sin(b, 15); - a = (u16)sprite->pos1.y; - c = (u16)sprite->pos1.x; + sprite->pos2.y = Sin(yDelta, 15); - if ((u32)((c + 16) << 16) > (0x110) << 16 || a < -16 || a > 0x80) + y = sprite->pos1.y; + if (sprite->pos1.x < -16 || sprite->pos1.x > 256 || y < -16 || y > 128) { DestroySpriteAndMatrix(sprite); } @@ -5350,12 +5348,8 @@ static void sub_8102DE4(struct Sprite* sprite) void sub_8102EB0(struct Sprite* sprite) { - int a; if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT) - { - a = gBattleAnimArgs[1]; - (u16)gBattleAnimArgs[1] = -a; - } + gBattleAnimArgs[1] *= -1; sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2) + gBattleAnimArgs[1]; sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + gBattleAnimArgs[2]; @@ -5541,8 +5535,8 @@ static void sub_8103300(struct Sprite* sprite) static void sub_8103320(struct Sprite* sprite) { - s16 temp; - s16 temp2; + s16 x1, x2; + sprite->data[1] += 4; if (sprite->data[1] > 254) { @@ -5564,20 +5558,21 @@ static void sub_8103320(struct Sprite* sprite) if (sprite->data[1] > 0x9F) sprite->subpriority = sprite->data[2]; - temp = gSineTable[sprite->data[1]]; - sprite->pos2.x = (temp2 = temp >> 3) + (temp2 >> 1); + x1 = gSineTable[sprite->data[1]]; + x2 = x1 >> 3; + sprite->pos2.x = (x1 >> 3) + (x2 >> 1); } void sub_8103390(struct Sprite* sprite) { - u8 bank; + u8 battler; if (gBattleAnimArgs[0] == 0) - bank = gBattleAnimAttacker; + battler = gBattleAnimAttacker; else - bank = gBattleAnimTarget; + battler = gBattleAnimTarget; - sub_810310C(bank, sprite); - if (GetBattlerSide(bank) == B_SIDE_PLAYER) + sub_810310C(battler, sprite); + if (GetBattlerSide(battler) == B_SIDE_PLAYER) { StartSpriteAnim(sprite, 0); sprite->data[0] = 2; diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index ab765b8c1..5d79a9e6b 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -2504,13 +2504,10 @@ void sub_815BE04(struct Sprite *sprite) static void sub_815BF44(struct Sprite *sprite) { - int var0; - s8 var1; - - var0 = (u16)sprite->data[2] + (u16)sprite->data[3]; - var1 = var0 >> 8; - sprite->pos2.y -= var1; - sprite->data[3] = var0 & 0xFF; + s16 delta = sprite->data[3] + sprite->data[2]; + sprite->pos2.y -= delta >> 8; + sprite->data[3] += sprite->data[2]; + sprite->data[3] &= 0xFF; if (sprite->data[4] == 0 && sprite->pos2.y < -8) { gSprites[sprite->data[6]].invisible = 0; @@ -2543,19 +2540,12 @@ static void sub_815BFF4(struct Sprite *sprite) static void sub_815C050(struct Sprite *sprite) { - u16 d2; - register u16 d3 asm("r1"); - int var0; - s8 var1; - if (!sprite->invisible) { - d2 = sprite->data[2]; - d3 = sprite->data[3]; - var0 = d2 + d3; - var1 = var0 >> 8; - sprite->pos2.y -= var1; - sprite->data[3] = var0 & 0xFF; + s16 delta = sprite->data[3] + sprite->data[2]; + sprite->pos2.y -= delta >> 8; + sprite->data[3] += sprite->data[2]; + sprite->data[3] &= 0xFF; if (--sprite->data[1] == -1) { sprite->invisible = 1; @@ -4322,7 +4312,7 @@ static void AnimSmellingSaltExclamationStep(struct Sprite *sprite) // Claps a hand several times. // arg 0: which hand -// arg 1: +// arg 1: void AnimHelpingHandClap(struct Sprite *sprite) { if (gBattleAnimArgs[0] == 0) diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index c6058204d..a667daecf 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -2037,7 +2037,7 @@ u8 sub_80A8394(u16 species, bool8 isBackpic, u8 a3, s16 x, s16 y, u8 subpriority gMonSpritesGfxPtr->field_17C = AllocZeroed(0x2000); if (!isBackpic) { - LoadCompressedPalette(GetFrontSpritePalFromSpeciesAndPersonality(species, trainerId, personality), (palette * 0x10) + 0x100, 0x20); + LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, trainerId, personality), (palette * 0x10) + 0x100, 0x20); if (a10 == 1 || sub_80688F8(5, battlerId) == 1 || gBattleSpritesDataPtr->battlerData[battlerId].transformSpecies != 0) LoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species], gMonSpritesGfxPtr->field_17C, @@ -2053,7 +2053,7 @@ u8 sub_80A8394(u16 species, bool8 isBackpic, u8 a3, s16 x, s16 y, u8 subpriority } else { - LoadCompressedPalette(GetFrontSpritePalFromSpeciesAndPersonality(species, trainerId, personality), (palette * 0x10) + 0x100, 0x20); + LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, trainerId, personality), (palette * 0x10) + 0x100, 0x20); if (a10 == 1 || sub_80688F8(5, battlerId) == 1 || gBattleSpritesDataPtr->battlerData[battlerId].transformSpecies != 0) LoadSpecialPokePic_DontHandleDeoxys(&gMonBackPicTable[species], gMonSpritesGfxPtr->field_17C, diff --git a/src/battle_anim_special.c b/src/battle_anim_special.c index 740340d14..6780f0a32 100755 --- a/src/battle_anim_special.c +++ b/src/battle_anim_special.c @@ -2029,7 +2029,7 @@ void sub_8172EF0(u8 battler, struct Pokemon *mon) if (IsBattlerSpriteVisible(battler)) { shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality); - if (shinyValue < 8) + if (shinyValue < SHINY_ODDS) isShiny = TRUE; if (isShiny) diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index 3fb5da9dc..d3842e416 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -602,7 +602,7 @@ static u32 CopyLinkOpponentMonData(u8 monId, u8 *dst) battleMon.spAttack = GetMonData(&gEnemyParty[monId], MON_DATA_SPATK); battleMon.spDefense = GetMonData(&gEnemyParty[monId], MON_DATA_SPDEF); battleMon.isEgg = GetMonData(&gEnemyParty[monId], MON_DATA_IS_EGG); - battleMon.altAbility = GetMonData(&gEnemyParty[monId], MON_DATA_ALT_ABILITY); + battleMon.abilityNum = GetMonData(&gEnemyParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gEnemyParty[monId], MON_DATA_OT_ID); GetMonData(&gEnemyParty[monId], MON_DATA_NICKNAME, nickname); StringCopy10(battleMon.nickname, nickname); diff --git a/src/battle_controller_link_partner.c b/src/battle_controller_link_partner.c index 6fc73a604..1c92aaaad 100644 --- a/src/battle_controller_link_partner.c +++ b/src/battle_controller_link_partner.c @@ -487,7 +487,7 @@ static u32 CopyLinkPartnerMonData(u8 monId, u8 *dst) battleMon.spAttack = GetMonData(&gPlayerParty[monId], MON_DATA_SPATK); battleMon.spDefense = GetMonData(&gPlayerParty[monId], MON_DATA_SPDEF); battleMon.isEgg = GetMonData(&gPlayerParty[monId], MON_DATA_IS_EGG); - battleMon.altAbility = GetMonData(&gPlayerParty[monId], MON_DATA_ALT_ABILITY); + battleMon.abilityNum = GetMonData(&gPlayerParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID); GetMonData(&gPlayerParty[monId], MON_DATA_NICKNAME, nickname); StringCopy10(battleMon.nickname, nickname); diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index 392811327..e096536c9 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -585,7 +585,7 @@ static u32 GetOpponentMonData(u8 monId, u8 *dst) battleMon.spAttack = GetMonData(&gEnemyParty[monId], MON_DATA_SPATK); battleMon.spDefense = GetMonData(&gEnemyParty[monId], MON_DATA_SPDEF); battleMon.isEgg = GetMonData(&gEnemyParty[monId], MON_DATA_IS_EGG); - battleMon.altAbility = GetMonData(&gEnemyParty[monId], MON_DATA_ALT_ABILITY); + battleMon.abilityNum = GetMonData(&gEnemyParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gEnemyParty[monId], MON_DATA_OT_ID); GetMonData(&gEnemyParty[monId], MON_DATA_NICKNAME, nickname); StringCopy10(battleMon.nickname, nickname); diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index e4b5b5c18..b73bfc36f 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -1628,7 +1628,7 @@ static u32 CopyPlayerMonData(u8 monId, u8 *dst) battleMon.spAttack = GetMonData(&gPlayerParty[monId], MON_DATA_SPATK); battleMon.spDefense = GetMonData(&gPlayerParty[monId], MON_DATA_SPDEF); battleMon.isEgg = GetMonData(&gPlayerParty[monId], MON_DATA_IS_EGG); - battleMon.altAbility = GetMonData(&gPlayerParty[monId], MON_DATA_ALT_ABILITY); + battleMon.abilityNum = GetMonData(&gPlayerParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID); GetMonData(&gPlayerParty[monId], MON_DATA_NICKNAME, nickname); StringCopy10(battleMon.nickname, nickname); diff --git a/src/battle_controller_player_partner.c b/src/battle_controller_player_partner.c index 0ec21fd22..e625f24de 100644 --- a/src/battle_controller_player_partner.c +++ b/src/battle_controller_player_partner.c @@ -672,7 +672,7 @@ static u32 CopyPlayerPartnerMonData(u8 monId, u8 *dst) battleMon.spAttack = GetMonData(&gPlayerParty[monId], MON_DATA_SPATK); battleMon.spDefense = GetMonData(&gPlayerParty[monId], MON_DATA_SPDEF); battleMon.isEgg = GetMonData(&gPlayerParty[monId], MON_DATA_IS_EGG); - battleMon.altAbility = GetMonData(&gPlayerParty[monId], MON_DATA_ALT_ABILITY); + battleMon.abilityNum = GetMonData(&gPlayerParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID); GetMonData(&gPlayerParty[monId], MON_DATA_NICKNAME, nickname); StringCopy10(battleMon.nickname, nickname); diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index 69d840020..b21d8288c 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -584,7 +584,7 @@ static u32 CopyRecordedOpponentMonData(u8 monId, u8 *dst) battleMon.spAttack = GetMonData(&gEnemyParty[monId], MON_DATA_SPATK); battleMon.spDefense = GetMonData(&gEnemyParty[monId], MON_DATA_SPDEF); battleMon.isEgg = GetMonData(&gEnemyParty[monId], MON_DATA_IS_EGG); - battleMon.altAbility = GetMonData(&gEnemyParty[monId], MON_DATA_ALT_ABILITY); + battleMon.abilityNum = GetMonData(&gEnemyParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gEnemyParty[monId], MON_DATA_OT_ID); GetMonData(&gEnemyParty[monId], MON_DATA_NICKNAME, nickname); StringCopy10(battleMon.nickname, nickname); diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c index 95683225e..b59a4f25d 100644 --- a/src/battle_controller_recorded_player.c +++ b/src/battle_controller_recorded_player.c @@ -567,7 +567,7 @@ static u32 CopyRecordedPlayerMonData(u8 monId, u8 *dst) battleMon.spAttack = GetMonData(&gPlayerParty[monId], MON_DATA_SPATK); battleMon.spDefense = GetMonData(&gPlayerParty[monId], MON_DATA_SPDEF); battleMon.isEgg = GetMonData(&gPlayerParty[monId], MON_DATA_IS_EGG); - battleMon.altAbility = GetMonData(&gPlayerParty[monId], MON_DATA_ALT_ABILITY); + battleMon.abilityNum = GetMonData(&gPlayerParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID); GetMonData(&gPlayerParty[monId], MON_DATA_NICKNAME, nickname); StringCopy10(battleMon.nickname, nickname); diff --git a/src/battle_controller_wally.c b/src/battle_controller_wally.c index 6a5b23e59..f7035540b 100644 --- a/src/battle_controller_wally.c +++ b/src/battle_controller_wally.c @@ -485,7 +485,7 @@ static u32 CopyWallyMonData(u8 monId, u8 *dst) battleMon.spAttack = GetMonData(&gPlayerParty[monId], MON_DATA_SPATK); battleMon.spDefense = GetMonData(&gPlayerParty[monId], MON_DATA_SPDEF); battleMon.isEgg = GetMonData(&gPlayerParty[monId], MON_DATA_IS_EGG); - battleMon.altAbility = GetMonData(&gPlayerParty[monId], MON_DATA_ALT_ABILITY); + battleMon.abilityNum = GetMonData(&gPlayerParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID); GetMonData(&gPlayerParty[monId], MON_DATA_NICKNAME, nickname); StringCopy10(battleMon.nickname, nickname); diff --git a/src/battle_dome.c b/src/battle_dome.c index 95fce49a3..1c116467d 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -1024,13 +1024,13 @@ static const union AnimCmd gUnknown_0860D020[] = static const union AnimCmd gUnknown_0860D028[] = { - ANIMCMD_FRAME(18, 129, .vFlip = TRUE), + ANIMCMD_FRAME(18, 1, .vFlip = TRUE), ANIMCMD_END, }; static const union AnimCmd gUnknown_0860D030[] = { - ANIMCMD_FRAME(16, 65, .hFlip = TRUE), + ANIMCMD_FRAME(16, 1, .hFlip = TRUE), ANIMCMD_END, }; @@ -2903,7 +2903,7 @@ static int GetTypeEffectivenessPoints(int move, int targetSpecies, int arg2) defType1 = gBaseStats[targetSpecies].type1; defType2 = gBaseStats[targetSpecies].type2; - defAbility = gBaseStats[targetSpecies].ability1; + defAbility = gBaseStats[targetSpecies].abilities[0]; moveType = gBattleMoves[move].type; if (defAbility == ABILITY_LEVITATE && moveType == TYPE_GROUND) @@ -5447,9 +5447,9 @@ static u16 GetWinningMove(int winnerTournamentId, int loserTournamentId, u8 roun targetSpecies = gFacilityTrainerMons[gSaveBlock2Ptr->frontier.domeMonIds[loserTournamentId][k]].species; if (var & 1) - targetAbility = gBaseStats[targetSpecies].ability2; + targetAbility = gBaseStats[targetSpecies].abilities[1]; else - targetAbility = gBaseStats[targetSpecies].ability1; + targetAbility = gBaseStats[targetSpecies].abilities[0]; var = AI_TypeCalc(moveIds[i * 4 + j], targetSpecies, targetAbility); if (var & MOVE_RESULT_NOT_VERY_EFFECTIVE && var & MOVE_RESULT_SUPER_EFFECTIVE) diff --git a/src/battle_factory.c b/src/battle_factory.c index d08ffe6e6..6c249bccc 100644 --- a/src/battle_factory.c +++ b/src/battle_factory.c @@ -16,7 +16,7 @@ #include "constants/moves.h" // IWRAM bss -static IWRAM_DATA bool8 sPerformedRentalSwap; +static bool8 sPerformedRentalSwap; // This file's functions. static void InitFactoryChallenge(void); @@ -373,7 +373,7 @@ static void SetRentalsToOpponentParty(void) gSaveBlock2Ptr->frontier.rentalMons[i + 3].monId = gUnknown_03006298[i]; gSaveBlock2Ptr->frontier.rentalMons[i + 3].ivs = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ATK_IV, NULL); gSaveBlock2Ptr->frontier.rentalMons[i + 3].personality = GetMonData(&gEnemyParty[i], MON_DATA_PERSONALITY, NULL); - gSaveBlock2Ptr->frontier.rentalMons[i + 3].abilityBit = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ALT_ABILITY, NULL); + gSaveBlock2Ptr->frontier.rentalMons[i + 3].abilityNum = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ABILITY_NUM, NULL); SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[gUnknown_03006298[i]].itemTableId]); } } @@ -439,7 +439,7 @@ static void SetPlayerAndOpponentParties(void) SetMonMoveAvoidReturn(&gPlayerParty[i], gFacilityTrainerMons[monSetId].moves[k], k); SetMonData(&gPlayerParty[i], MON_DATA_FRIENDSHIP, &friendship); SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[monSetId].itemTableId]); - SetMonData(&gPlayerParty[i], MON_DATA_ALT_ABILITY, &gSaveBlock2Ptr->frontier.rentalMons[i].abilityBit); + SetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM, &gSaveBlock2Ptr->frontier.rentalMons[i].abilityNum); } } @@ -478,7 +478,7 @@ static void SetPlayerAndOpponentParties(void) for (k = 0; k < MAX_MON_MOVES; k++) SetMonMoveAvoidReturn(&gEnemyParty[i], gFacilityTrainerMons[monSetId].moves[k], k); SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[monSetId].itemTableId]); - SetMonData(&gEnemyParty[i], MON_DATA_ALT_ABILITY, &gSaveBlock2Ptr->frontier.rentalMons[i + 3].abilityBit); + SetMonData(&gEnemyParty[i], MON_DATA_ABILITY_NUM, &gSaveBlock2Ptr->frontier.rentalMons[i + 3].abilityNum); } break; } diff --git a/src/battle_factory_screen.c b/src/battle_factory_screen.c index 02804ba0b..f56442432 100644 --- a/src/battle_factory_screen.c +++ b/src/battle_factory_screen.c @@ -227,9 +227,9 @@ static EWRAM_DATA u8 *sSwapMenuTilemapBuffer = NULL; static EWRAM_DATA u8 *sSwapMonCardBgTilemapBuffer = NULL; // IWRAM bss -static IWRAM_DATA struct FactorySelectMonsStruct *sFactorySelectScreen; -static IWRAM_DATA void (*sSwap_CurrentTableFunc)(u8 taskId); -static IWRAM_DATA struct FactorySwapMonsStruct *sFactorySwapScreen; +static struct FactorySelectMonsStruct *sFactorySelectScreen; +static void (*sSwap_CurrentTableFunc)(u8 taskId); +static struct FactorySwapMonsStruct *sFactorySwapScreen; // IWRAM common u8 (*gUnknown_030062E8)(void); @@ -1742,7 +1742,7 @@ static void Select_CopyMonsToPlayerParty(void) gPlayerParty[i] = sFactorySelectScreen->mons[j].monData; gSaveBlock2Ptr->frontier.rentalMons[i].monId = sFactorySelectScreen->mons[j].monSetId; gSaveBlock2Ptr->frontier.rentalMons[i].personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY, NULL); - gSaveBlock2Ptr->frontier.rentalMons[i].abilityBit = GetBoxMonData(&gPlayerParty[i].box, MON_DATA_ALT_ABILITY, NULL); + gSaveBlock2Ptr->frontier.rentalMons[i].abilityNum = GetBoxMonData(&gPlayerParty[i].box, MON_DATA_ABILITY_NUM, NULL); gSaveBlock2Ptr->frontier.rentalMons[i].ivs = GetBoxMonData(&gPlayerParty[i].box, MON_DATA_ATK_IV, NULL); break; } @@ -2266,7 +2266,7 @@ static void CopySwappedMonData(void) gSaveBlock2Ptr->frontier.rentalMons[sFactorySwapScreen->playerMonId].monId = gSaveBlock2Ptr->frontier.rentalMons[sFactorySwapScreen->enemyMonId + 3].monId; gSaveBlock2Ptr->frontier.rentalMons[sFactorySwapScreen->playerMonId].ivs = gSaveBlock2Ptr->frontier.rentalMons[sFactorySwapScreen->enemyMonId + 3].ivs; gSaveBlock2Ptr->frontier.rentalMons[sFactorySwapScreen->playerMonId].personality = GetMonData(&gEnemyParty[sFactorySwapScreen->enemyMonId], MON_DATA_PERSONALITY, NULL); - gSaveBlock2Ptr->frontier.rentalMons[sFactorySwapScreen->playerMonId].abilityBit = GetBoxMonData(&gEnemyParty[sFactorySwapScreen->enemyMonId].box, MON_DATA_ALT_ABILITY, NULL); + gSaveBlock2Ptr->frontier.rentalMons[sFactorySwapScreen->playerMonId].abilityNum = GetBoxMonData(&gEnemyParty[sFactorySwapScreen->enemyMonId].box, MON_DATA_ABILITY_NUM, NULL); } static void Task_FromSwapScreenToSummaryScreen(u8 taskId) diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index d6b1b6dee..c98713fc3 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -534,7 +534,7 @@ void BattleLoadOpponentMonSpriteGfx(struct Pokemon *mon, u8 battlerId) if (gBattleSpritesDataPtr->battlerData[battlerId].transformSpecies == SPECIES_NONE) lzPaletteData = GetMonFrontSpritePal(mon); else - lzPaletteData = GetFrontSpritePalFromSpeciesAndPersonality(species, otId, monsPersonality); + lzPaletteData = GetMonSpritePalFromSpeciesAndPersonality(species, otId, monsPersonality); LZDecompressWram(lzPaletteData, gDecompressionBuffer); LoadPalette(gDecompressionBuffer, paletteOffset, 0x20); @@ -597,7 +597,7 @@ void BattleLoadPlayerMonSpriteGfx(struct Pokemon *mon, u8 battlerId) if (gBattleSpritesDataPtr->battlerData[battlerId].transformSpecies == SPECIES_NONE) lzPaletteData = GetMonFrontSpritePal(mon); else - lzPaletteData = GetFrontSpritePalFromSpeciesAndPersonality(species, otId, monsPersonality); + lzPaletteData = GetMonSpritePalFromSpeciesAndPersonality(species, otId, monsPersonality); LZDecompressWram(lzPaletteData, gDecompressionBuffer); LoadPalette(gDecompressionBuffer, paletteOffset, 0x20); @@ -918,7 +918,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 notTransform dst = (void *)(VRAM + 0x10000 + gSprites[gBattlerSpriteIds[battlerAtk]].oam.tileNum * 32); DmaCopy32(3, src, dst, 0x800); paletteOffset = 0x100 + battlerAtk * 16; - lzPaletteData = GetFrontSpritePalFromSpeciesAndPersonality(targetSpecies, otId, personalityValue); + lzPaletteData = GetMonSpritePalFromSpeciesAndPersonality(targetSpecies, otId, personalityValue); LZDecompressWram(lzPaletteData, gDecompressionBuffer); LoadPalette(gDecompressionBuffer, paletteOffset, 32); diff --git a/src/battle_intro.c b/src/battle_intro.c index 043cf855a..6964428a3 100644 --- a/src/battle_intro.c +++ b/src/battle_intro.c @@ -205,7 +205,7 @@ static void BattleIntroSlide1(u8 taskId) if (gBattle_WIN0V & 0xFF00) gBattle_WIN0V -= 0x3FC; - + if (gTasks[taskId].data[2]) gTasks[taskId].data[2] -= 2; @@ -314,7 +314,7 @@ static void BattleIntroSlide2(u8 taskId) if (gBattle_WIN0V & 0xFF00) gBattle_WIN0V -= 0x3FC; - + if (gTasks[taskId].data[2]) gTasks[taskId].data[2] -= 2; @@ -402,7 +402,7 @@ static void BattleIntroSlide3(u8 taskId) if (gBattle_WIN0V & 0xFF00) gBattle_WIN0V -= 0x3FC; - + if (gTasks[taskId].data[2]) gTasks[taskId].data[2] -= 2; @@ -484,7 +484,7 @@ static void BattleIntroSlideLink(u8 taskId) case 3: if (gBattle_WIN0V & 0xFF00) gBattle_WIN0V -= 0x3FC; - + if (gTasks[taskId].data[2]) gTasks[taskId].data[2] -= 2; @@ -537,7 +537,7 @@ static void BattleIntroSlidePartner(u8 taskId) gBattle_WIN0V += 0x100; if ((gBattle_WIN0V & 0xFF00) != 0x100) gBattle_WIN0V--; - + if ((gBattle_WIN0V & 0xFF00) == 0x2000) { gTasks[taskId].data[0]++; @@ -600,129 +600,18 @@ void sub_8118FBC(int bgId, u8 arg1, u8 arg2, u8 battlerPosition, u8 arg4, u8 *ar LoadBgTilemap(bgId, arg6, BG_SCREEN_SIZE, 0); } -#ifdef NONMATCHING void unref_sub_8119094(u8 arg0, u8 arg1, u8 battlerPosition, u8 arg3, u8 arg4, u16 arg5, u8 arg6, u8 arg7) { - int i, j; - int offset; + int i, j, offset; + DmaCopy16(3, gMonSpritesGfxPtr->sprites[battlerPosition] + BG_SCREEN_SIZE * arg3, (void *)BG_SCREEN_ADDR(0) + arg5, BG_SCREEN_SIZE); offset = (arg5 >> 5) - (arg7 << 9); for (i = arg1; i < arg1 + 8; i++) { for (j = arg0; j < arg0 + 8; j++) { - ((u16 *)BG_VRAM)[i * 32 + j + (arg6 * 0x400) + arg0] = offset | (arg4 << 12); + *((u16 *)(BG_VRAM) + (i * 32) + (j + (arg6 << 10))) = offset | (arg4 << 12); offset++; } } } -#else -NAKED -void unref_sub_8119094(u8 arg0, u8 arg1, u8 battlerPosition, u8 arg3, u8 arg4, u16 arg5, u8 arg6, u8 arg7) -{ - asm_unified("\n\ - push {r4-r7,lr}\n\ - mov r7, r10\n\ - mov r6, r9\n\ - mov r5, r8\n\ - push {r5-r7}\n\ - sub sp, 0x4\n\ - ldr r4, [sp, 0x24]\n\ - ldr r5, [sp, 0x28]\n\ - mov r8, r5\n\ - ldr r5, [sp, 0x2C]\n\ - ldr r6, [sp, 0x30]\n\ - mov r9, r6\n\ - lsls r0, 24\n\ - lsrs r0, 24\n\ - mov r12, r0\n\ - lsls r1, 24\n\ - lsls r2, 24\n\ - lsls r3, 24\n\ - lsls r4, 24\n\ - lsrs r4, 24\n\ - mov r10, r4\n\ - mov r7, r8\n\ - lsls r7, 16\n\ - lsrs r6, r7, 16\n\ - lsls r5, 24\n\ - lsrs r5, 24\n\ - mov r0, r9\n\ - lsls r0, 24\n\ - mov r9, r0\n\ - ldr r4, =0x040000d4\n\ - ldr r0, =gMonSpritesGfxPtr\n\ - ldr r0, [r0]\n\ - lsrs r2, 22\n\ - adds r0, 0x4\n\ - adds r0, r2\n\ - lsrs r3, 13\n\ - ldr r0, [r0]\n\ - adds r0, r3\n\ - str r0, [r4]\n\ - movs r0, 0xC0\n\ - lsls r0, 19\n\ - adds r6, r0\n\ - str r6, [r4, 0x4]\n\ - ldr r0, =0x80000400\n\ - str r0, [r4, 0x8]\n\ - ldr r0, [r4, 0x8]\n\ - adds r2, r7, 0\n\ - lsrs r2, 21\n\ - mov r6, r9\n\ - lsrs r6, 15\n\ - subs r4, r2, r6\n\ - lsrs r0, r1, 24\n\ - adds r1, r0, 0\n\ - adds r1, 0x8\n\ - cmp r0, r1\n\ - bge _08119148\n\ - mov r9, r1\n\ - mov r7, r12\n\ - lsls r7, 1\n\ - mov r8, r7\n\ - lsls r5, 11\n\ - str r5, [sp]\n\ -_08119110:\n\ - mov r2, r12\n\ - adds r3, r2, 0\n\ - adds r3, 0x8\n\ - adds r5, r0, 0x1\n\ - cmp r2, r3\n\ - bge _08119142\n\ - mov r1, r10\n\ - lsls r6, r1, 12\n\ - lsls r0, 6\n\ - movs r7, 0xC0\n\ - lsls r7, 19\n\ - adds r0, r7\n\ - ldr r1, [sp]\n\ - adds r0, r1, r0\n\ - mov r7, r8\n\ - adds r1, r7, r0\n\ - subs r2, r3, r2\n\ -_08119132:\n\ - adds r0, r4, 0\n\ - orrs r0, r6\n\ - strh r0, [r1]\n\ - adds r4, 0x1\n\ - adds r1, 0x2\n\ - subs r2, 0x1\n\ - cmp r2, 0\n\ - bne _08119132\n\ -_08119142:\n\ - adds r0, r5, 0\n\ - cmp r0, r9\n\ - blt _08119110\n\ -_08119148:\n\ - add sp, 0x4\n\ - pop {r3-r5}\n\ - mov r8, r3\n\ - mov r9, r4\n\ - mov r10, r5\n\ - pop {r4-r7}\n\ - pop {r0}\n\ - bx r0\n\ - .pool"); -} -#endif diff --git a/src/battle_main.c b/src/battle_main.c index 76bd6d877..61b6a5a12 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -72,6 +72,9 @@ extern const u8 *const gBattlescriptsForUsingItem[]; extern const u8 *const gBattlescriptsForSafariActions[]; // this file's functions +#if !defined(NONMATCHING) && MODERN +#define static +#endif static void CB2_InitBattleInternal(void); static void CB2_PreInitMultiBattle(void); static void CB2_PreInitIngamePlayerPartnerBattle(void); @@ -3390,7 +3393,7 @@ static void BattleIntroDrawTrainersOrMonsSprites(void) gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1; gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2; - gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].altAbility); + gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].abilityNum); hpOnSwitchout = &gBattleStruct->hpOnSwitchout[GetBattlerSide(gActiveBattler)]; *hpOnSwitchout = gBattleMons[gActiveBattler].hp; for (i = 0; i < NUM_BATTLE_STATS; i++) diff --git a/src/battle_pike.c b/src/battle_pike.c index cc58b81bb..8846e2d1a 100644 --- a/src/battle_pike.c +++ b/src/battle_pike.c @@ -53,11 +53,11 @@ struct PikeWildMon }; // IWRAM bss -static IWRAM_DATA u8 sRoomType; -static IWRAM_DATA u8 sStatusMon; -static IWRAM_DATA bool8 sUnknown_0300128E; -static IWRAM_DATA u32 sStatusFlags; -static IWRAM_DATA u8 sNpcId; +static u8 sRoomType; +static u8 sStatusMon; +static bool8 sUnknown_0300128E; +static u32 sStatusFlags; +static u8 sNpcId; // This file's functions. static void SetRoomType(void); @@ -1122,7 +1122,7 @@ bool32 TryGenerateBattlePikeWildMon(bool8 checkKeenEyeIntimidate) u8 headerId = GetBattlePikeWildMonHeaderId(); u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode; const struct PikeWildMon *const *const wildMons = sWildMons[lvlMode]; - u32 abilityBit; + u32 abilityNum; s32 pikeMonId = GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, NULL); pikeMonId = SpeciesToPikeMonId(pikeMonId); @@ -1152,11 +1152,11 @@ bool32 TryGenerateBattlePikeWildMon(bool8 checkKeenEyeIntimidate) MON_DATA_EXP, &gExperienceTables[gBaseStats[wildMons[headerId][pikeMonId].species].growthRate][monLevel]); - if (gBaseStats[wildMons[headerId][pikeMonId].species].ability2) - abilityBit = Random() % 2; + if (gBaseStats[wildMons[headerId][pikeMonId].species].abilities[1]) + abilityNum = Random() % 2; else - abilityBit = 0; - SetMonData(&gEnemyParty[0], MON_DATA_ALT_ABILITY, &abilityBit); + abilityNum = 0; + SetMonData(&gEnemyParty[0], MON_DATA_ABILITY_NUM, &abilityNum); for (i = 0; i < MAX_MON_MOVES; i++) SetMonMoveSlot(&gEnemyParty[0], wildMons[headerId][pikeMonId].moves[i], i); diff --git a/src/battle_pyramid.c b/src/battle_pyramid.c index 34da3a25d..cc722da8d 100644 --- a/src/battle_pyramid.c +++ b/src/battle_pyramid.c @@ -76,7 +76,7 @@ struct PyramidWildMon { u16 species; u8 lvl; - u8 abilityBit; + u8 abilityNum; u16 moves[4]; }; @@ -129,6 +129,8 @@ static bool8 TrySetPyramidEventObjectPositionInSquare(u8 arg0, u8 *floorLayoutOf static bool8 TrySetPyramidEventObjectPositionAtCoords(bool8 objType, u8 x, u8 y, u8 *floorLayoutOffsets, u8 squareId, u8 eventObjectId); // Const rom data. +#define ABILITY_RANDOM 2 // For wild mons data. + #include "data/battle_frontier/battle_pyramid_level_50_wild_mons.h" #include "data/battle_frontier/battle_pyramid_open_level_wild_mons.h" @@ -1401,23 +1403,23 @@ void GenerateBattlePyramidWildMon(void) MON_DATA_EXP, &gExperienceTables[gBaseStats[wildMons[id].species].growthRate][lvl]); - switch (wildMons[id].abilityBit) + switch (wildMons[id].abilityNum) { case 0: case 1: - SetMonData(&gEnemyParty[0], MON_DATA_ALT_ABILITY, &wildMons[id].abilityBit); + SetMonData(&gEnemyParty[0], MON_DATA_ABILITY_NUM, &wildMons[id].abilityNum); break; - case 2: + case ABILITY_RANDOM: default: - if (gBaseStats[wildMons[id].species].ability2) + if (gBaseStats[wildMons[id].species].abilities[1]) { i = GetMonData(&gEnemyParty[0], MON_DATA_PERSONALITY, NULL) % 2; - SetMonData(&gEnemyParty[0], MON_DATA_ALT_ABILITY, &i); + SetMonData(&gEnemyParty[0], MON_DATA_ABILITY_NUM, &i); } else { i = 0; - SetMonData(&gEnemyParty[0], MON_DATA_ALT_ABILITY, &i); + SetMonData(&gEnemyParty[0], MON_DATA_ABILITY_NUM, &i); } break; } diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c index ee35ed45b..b4ec6cd62 100644 --- a/src/battle_pyramid_bag.c +++ b/src/battle_pyramid_bag.c @@ -324,7 +324,7 @@ static const union AffineAnimCmd * const gSpriteAffineAnimTable_861F3C4[] = gSpriteAffineAnim_861F39C, }; -static const struct CompressedSpriteSheet gUnknown_0861F3CC = {gBattleFrontierGfx_PyramidBag, 0x0800, 0x1024}; +static const struct CompressedSpriteSheet gPyramidBagSpriteSheet = {gBattleFrontierGfx_PyramidBag, 0x0800, 0x1024}; static const struct SpriteTemplate gUnknown_0861F3D4 = { @@ -538,7 +538,7 @@ static bool8 sub_81C5238(void) case 1: if (free_temp_tile_data_buffers_if_possible() != TRUE) { - LZDecompressWram(gUnknown_08D9AE04, gPyramidBagResources->tilemapBuffer); + LZDecompressWram(gBattleFrontierGfx_PyramidBagTileMap, gPyramidBagResources->tilemapBuffer); gPyramidBagResources->state++; } break; @@ -547,7 +547,7 @@ static bool8 sub_81C5238(void) gPyramidBagResources->state++; break; case 3: - LoadCompressedSpriteSheet(&gUnknown_0861F3CC); + LoadCompressedSpriteSheet(&gPyramidBagSpriteSheet); gPyramidBagResources->state++; break; case 4: @@ -1489,7 +1489,7 @@ static void sub_81C6E98(void) struct SpritePalette spritePalette; u16 *palPtr = Alloc(0x40); - LZDecompressWram(gUnknown_08D9ADD0, palPtr); + LZDecompressWram(gBattleFrontierGfx_PyramidBag_Pal, palPtr); spritePalette.data = palPtr + (gSaveBlock2Ptr->frontier.lvlMode * 16); spritePalette.tag = ITEM_IMAGE_TAG; LoadSpritePalette(&spritePalette); diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 7e783bef5..5016a3a58 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1276,8 +1276,8 @@ static void atk04_critcalc(void) + 2 * (holdEffect == HOLD_EFFECT_LUCKY_PUNCH && gBattleMons[gBattlerAttacker].species == SPECIES_CHANSEY) + 2 * (holdEffect == HOLD_EFFECT_STICK && gBattleMons[gBattlerAttacker].species == SPECIES_FARFETCHD); - if (critChance > 4) - critChance = 4; + if (critChance >= ARRAY_COUNT(sCriticalHitChance)) + critChance = ARRAY_COUNT(sCriticalHitChance) - 1; if ((gBattleMons[gBattlerTarget].ability != ABILITY_BATTLE_ARMOR && gBattleMons[gBattlerTarget].ability != ABILITY_SHELL_ARMOR) && !(gStatuses3[gBattlerAttacker] & STATUS3_CANT_SCORE_A_CRIT) @@ -4906,7 +4906,7 @@ static void atk4D_switchindataupdate(void) gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1; gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2; - gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].altAbility); + gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].abilityNum); // check knocked off item i = GetBattlerSide(gActiveBattler); @@ -8622,7 +8622,7 @@ static void atkAE_healpartystatus(void) for (i = 0; i < PARTY_SIZE; i++) { u16 species = GetMonData(&party[i], MON_DATA_SPECIES2); - u8 abilityBit = GetMonData(&party[i], MON_DATA_ALT_ABILITY); + u8 abilityNum = GetMonData(&party[i], MON_DATA_ABILITY_NUM); if (species != SPECIES_NONE && species != SPECIES_EGG) { @@ -8635,7 +8635,7 @@ static void atkAE_healpartystatus(void) && !(gAbsentBattlerFlags & gBitTable[gActiveBattler])) ability = gBattleMons[gActiveBattler].ability; else - ability = GetAbilityBySpecies(species, abilityBit); + ability = GetAbilityBySpecies(species, abilityNum); if (ability != ABILITY_SOUNDPROOF) toHeal |= (1 << i); @@ -9844,10 +9844,10 @@ static void atkE5_pickup(void) species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM); - if (GetMonData(&gPlayerParty[i], MON_DATA_ALT_ABILITY)) - ability = gBaseStats[species].ability2; + if (GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM)) + ability = gBaseStats[species].abilities[1]; else - ability = gBaseStats[species].ability1; + ability = gBaseStats[species].abilities[0]; if (ability == ABILITY_PICKUP && species != 0 @@ -9867,10 +9867,10 @@ static void atkE5_pickup(void) species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM); - if (GetMonData(&gPlayerParty[i], MON_DATA_ALT_ABILITY)) - ability = gBaseStats[species].ability2; + if (GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM)) + ability = gBaseStats[species].abilities[1]; else - ability = gBaseStats[species].ability1; + ability = gBaseStats[species].abilities[0]; if (ability == ABILITY_PICKUP && species != 0 diff --git a/src/battle_tent.c b/src/battle_tent.c index 85194417f..34e3e9628 100644 --- a/src/battle_tent.c +++ b/src/battle_tent.c @@ -44,7 +44,7 @@ static void sub_81BA040(void); static void sub_81B9EC0(void); // IWRAM bss -static IWRAM_DATA u16 sRandMonSetId; +static u16 sRandMonSetId; // const rom data void static (*const gUnknown_086160B4[])(void) = diff --git a/src/battle_transition.c b/src/battle_transition.c index 7edb1bd93..3e86fcf51 100644 --- a/src/battle_transition.c +++ b/src/battle_transition.c @@ -262,10 +262,10 @@ static bool8 sub_814842C(struct Sprite *sprite); static bool8 sub_8148458(struct Sprite *sprite); // iwram bss vars -IWRAM_DATA static s16 sUnusedRectangularSpiralVar; -IWRAM_DATA static u8 sTestingTransitionId; -IWRAM_DATA static u8 sTestingTransitionState; -IWRAM_DATA static struct StructRectangularSpiral sRectangularSpiralTransition[4]; +static s16 sUnusedRectangularSpiralVar; +static u8 sTestingTransitionId; +static u8 sTestingTransitionState; +static struct StructRectangularSpiral sRectangularSpiralTransition[4]; // ewram vars EWRAM_DATA static struct TransitionData *sTransitionStructPtr = NULL; diff --git a/src/berry_blender.c b/src/berry_blender.c index c1c664c1a..03764b2f8 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -194,10 +194,10 @@ EWRAM_DATA static s32 sUnknown_020322BC[5] = {0}; EWRAM_DATA static u32 sUnknown_020322D0 = 0; // IWRAM bss -IWRAM_DATA static s16 sUnknown_03000DE8[8]; -IWRAM_DATA static s16 sUnknown_03000DF8[6]; -IWRAM_DATA static s16 sUnknown_03000E04; -IWRAM_DATA static s16 sUnknown_03000E06; +static s16 sUnknown_03000DE8[8]; +static s16 sUnknown_03000DF8[6]; +static s16 sUnknown_03000E04; +static s16 sUnknown_03000E06; // IWRAM common u8 gInGameOpponentsNo; @@ -1078,7 +1078,7 @@ static void sub_807FD64(struct Sprite* sprite, s16 a2, s16 a3, s16 a4, s16 a5, s static void sub_807FD90(u16 a0, u8 a1) { - u8 spriteId = sub_80D511C(a0 + 123, 0, 80, a1 & 1); + u8 spriteId = LoadSpinningBerryPicGfx(a0 + 123, 0, 80, a1 & 1); sub_807FD64(&gSprites[spriteId], sUnknown_08339C78[a1][0], sUnknown_08339C78[a1][1], sUnknown_08339C78[a1][2], sUnknown_08339C78[a1][3], sUnknown_08339C78[a1][4]); } diff --git a/src/berry_crush.c b/src/berry_crush.c index a5d964cc9..6259e0a41 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -55,7 +55,10 @@ struct BerryCrushGame_138_C struct BerryCrushGame_138 { - u8 filler0[0xC]; + u8 filler0[0x4]; + u16 unk4; + u16 unk6; + u16 unk8; struct BerryCrushGame_138_C *unkC[5]; u8 filler1C[0x4]; struct Sprite *unk24[5]; @@ -105,7 +108,7 @@ struct BerryCrushGame u8 filler26[0x2]; u16 unk28; u16 unk2A; - u16 unk2C; + s16 unk2C; u8 filler2E[0x8]; u8 unk36[0xA]; struct BerryCrushGame_40 unk40; @@ -149,6 +152,8 @@ extern const struct SpriteTemplate gUnknown_082F436C; extern const u16 gUnknown_082F41E8[]; extern const s8 gUnknown_082F41CC[][2]; extern const s8 gUnknown_082F41D2[][2]; +extern const u32 gUnknown_082F334C[]; +extern const u8 gUnknown_082F32D8[][3]; struct BerryCrushGame *sub_8020C00(void) { @@ -700,76 +705,121 @@ void sub_80216A8(struct BerryCrushGame *arg0) } } -// void sub_80216E0(struct BerryCrushGame *arg0, struct BerryCrushGame_138 *arg1) -// { -// u8 sp4; -// struct BerryCrushGame_4E *var4E; -// u8 i; -// u16 var0; - -// sp4 = 0; -// var4E = &arg0->unk40.unkE; -// for (i = 0; i < arg0->unk9; i++) -// { -// var0 = var4E->unkA >> (i * 3); -// var0 &= 7; -// if (var0) -// { -// int offset; -// sp4++; -// if (var0 & 0x4) -// StartSpriteAnim(arg1->unk24[i], 1); -// else -// StartSpriteAnim(arg1->unk24[i], 0); - -// arg1->unk24[i]->invisible = 0; -// arg1->unk24[i]->animPaused = 0; -// offset = (var0 % 4) - 1; -// arg1->unk24[i]->pos2.x = gUnknown_082F41CC[offset][0]; -// arg1->unk24[i]->pos2.y = gUnknown_082F41CC[offset][1]; -// } -// } - -// if (sp4 == 0) -// { -// arg0->unk25_2 = 0; -// } -// else -// { -// u8 var3 = arg0->unk28 % 3; -// u16 var2 = var3; -// for (i = 0; i < var4E->unkC * 2 + 3; i++) -// { -// if (arg1->unk4C[i]->invisible) -// { -// arg1->unk4C[i]->callback = sub_8022B28; -// arg1->unk4C[i]->pos1.x = gUnknown_082F41D2[i][0] + 120; -// arg1->unk4C[i]->pos1.y = gUnknown_082F41D2[i][1] + (136 - var2 * 4); -// arg1->unk4C[i]->pos2.x = gUnknown_082F41D2[i][0] / (var3 * 4); -// arg1->unk4C[i]->pos2.y = gUnknown_082F41D2[i][1]; -// if (var4E->unk4 & 0x2) -// StartSpriteAnim(arg1->unk4C[i], 1); -// else -// StartSpriteAnim(arg1->unk4C[i], 0); - -// var2++; -// if (var2 > 3) -// var2 = 0; -// } -// } - -// if (arg0->unk25_2) -// { -// arg0->unk25_2 = 0; -// } -// else -// { -// if (sp4 == 1) -// PlaySE(SE_TOY_DANGO); -// else -// PlaySE(SE_TOY_KABE); - -// arg0->unk25_2 = 1; -// } -// } -// } +void sub_80216E0(struct BerryCrushGame *arg0, struct BerryCrushGame_138 *arg1) +{ + u8 sp4; + struct BerryCrushGame_4E *var4E; + u8 i; + u16 var, var2; + + sp4 = 0; + var4E = &arg0->unk40.unkE; + for (i = 0; i < arg0->unk9; i++) + { + var = var4E->unkA >> (i * 3); + var &= 7; + if (var) + { + sp4++; + if (var & 0x4) + StartSpriteAnim(arg1->unk24[i], 1); + else + StartSpriteAnim(arg1->unk24[i], 0); + + arg1->unk24[i]->invisible = 0; + arg1->unk24[i]->animPaused = 0; + arg1->unk24[i]->pos2.x = gUnknown_082F41CC[(var % 4) - 1][0]; + arg1->unk24[i]->pos2.y = gUnknown_082F41CC[(var % 4) - 1][1]; + } + } + + if (sp4 == 0) + { + arg0->unk25_2 = 0; + } + else + { + var = (u8)(arg0->unk28 % 3); + var2 = var; + for (i = 0; i < var4E->unkC * 2 + 3; i++) + { + if (arg1->unk4C[i]->invisible) + { + arg1->unk4C[i]->callback = sub_8022B28; + arg1->unk4C[i]->pos1.x = gUnknown_082F41D2[i][0] + 120; + arg1->unk4C[i]->pos1.y = gUnknown_082F41D2[i][1] + 136 - (var * 4); + arg1->unk4C[i]->pos2.x = gUnknown_082F41D2[i][0] + (gUnknown_082F41D2[i][0] / (var2 * 4)); + arg1->unk4C[i]->pos2.y = gUnknown_082F41D2[i][1]; + if (var4E->unk4 & 0x2) + StartSpriteAnim(arg1->unk4C[i], 1); + else + StartSpriteAnim(arg1->unk4C[i], 0); + + var++; + if (var > 3) + var = 0; + } + } + + if (arg0->unk25_2) + { + arg0->unk25_2 = 0; + } + else + { + if (sp4 == 1) + PlaySE(SE_TOY_DANGO); + else + PlaySE(SE_TOY_KABE); + + arg0->unk25_2 = 1; + } + } +} + +bool32 sub_80218D4(struct BerryCrushGame *arg0, struct BerryCrushGame_138 *arg1) +{ + u8 i; + + for (i = 0; i < arg0->unk9; i++) + { + if (!arg1->unk24[i]->invisible) + return FALSE; + } + + for (i = 0; i < 11; i++) + { + if (!arg1->unk4C[i]->invisible) + return FALSE; + } + + if (arg0->unk2C != 0) + arg0->unk2C = 0; + + return TRUE; +} + +void sub_8021944(struct BerryCrushGame_138 *arg0, u16 arg1) +{ + u8 i = 0; + u32 r7 = 0; + s16 r3 = 0; + + arg0->unk4 = arg1 / 3600; + arg0->unk6 = (arg1 % 3600) / 60; + r3 = sub_8151534((arg1 % 60) << 8, 4); + + for (i = 0; i < 8; i++) + { + if ((r3 >> (7 - i)) & 1) + r7 += gUnknown_082F334C[i]; + } + + arg0->unk8 = r7 / 1000000; +} + +void sub_80219C8(u8 windowId, u8 left, u8 colorId, const u8 *string) +{ + left = (left * 4) - (GetStringWidth(2, string, -1) / 2u); + AddTextPrinterParameterized3(windowId, 2, left, 0, gUnknown_082F32D8[colorId], 0, string); +} diff --git a/src/berry_tag_screen.c b/src/berry_tag_screen.c index d0f89ab8a..c3eac783d 100644 --- a/src/berry_tag_screen.c +++ b/src/berry_tag_screen.c @@ -318,18 +318,18 @@ static bool8 LoadBerryTagGfx(void) { case 0: reset_temp_tile_data_buffers(); - decompress_and_copy_tile_data_to_vram(2, gUnknown_08D9BB44, 0, 0, 0); + decompress_and_copy_tile_data_to_vram(2, gBerryCheck_Gfx, 0, 0, 0); sBerryTag->gfxState++; break; case 1: if (free_temp_tile_data_buffers_if_possible() != TRUE) { - LZDecompressWram(gUnknown_08D9BF98, sBerryTag->tilemapBuffers[0]); + LZDecompressWram(gBerryTag_Gfx, sBerryTag->tilemapBuffers[0]); sBerryTag->gfxState++; } break; case 2: - LZDecompressWram(gUnknown_08D9C13C, sBerryTag->tilemapBuffers[2]); + LZDecompressWram(gBerryTag_Pal, sBerryTag->tilemapBuffers[2]); sBerryTag->gfxState++; break; case 3: @@ -346,15 +346,15 @@ static bool8 LoadBerryTagGfx(void) sBerryTag->gfxState++; break; case 4: - LoadCompressedPalette(gUnknown_08D9BEF0, 0, 0xC0); + LoadCompressedPalette(gBerryCheck_Pal, 0, 0xC0); sBerryTag->gfxState++; break; case 5: - LoadCompressedSpriteSheet(&gUnknown_0857FDEC); + LoadCompressedSpriteSheet(&gBerryCheckCircleSpriteSheet); sBerryTag->gfxState++; break; default: - LoadCompressedSpritePalette(&gUnknown_0857FDF4); + LoadCompressedSpritePalette(&gBerryCheckCirclePaletteTable); return TRUE; // done } @@ -548,7 +548,7 @@ static void Task_HandleInput(u8 taskId) static void TryChangeDisplayedBerry(u8 taskId, s8 toMove) { s16 *data = gTasks[taskId].data; - s16 currPocketPosition = gUnknown_0203CE58.scrollPosition[3] + gUnknown_0203CE58.cursorPosition[3]; + s16 currPocketPosition = gBagPositionStruct.scrollPosition[3] + gBagPositionStruct.cursorPosition[3]; u32 newPocketPosition = currPocketPosition + toMove; if (newPocketPosition < 46 && BagGetItemIdByPocketPosition(POCKET_BERRIES, newPocketPosition) != 0) { @@ -566,8 +566,8 @@ static void TryChangeDisplayedBerry(u8 taskId, s8 toMove) static void HandleBagCursorPositionChange(s8 toMove) { - u16 *scrollPos = &gUnknown_0203CE58.scrollPosition[3]; - u16 *cursorPos = &gUnknown_0203CE58.cursorPosition[3]; + u16 *scrollPos = &gBagPositionStruct.scrollPosition[3]; + u16 *cursorPos = &gBagPositionStruct.cursorPosition[3]; if (toMove > 0) { if (*cursorPos < 4 || BagGetItemIdByPocketPosition(POCKET_BERRIES, *scrollPos + 8) == 0) @@ -37,9 +37,9 @@ struct BgConfig2 s32 bg_y; }; -static IWRAM_DATA struct BgControl sGpuBgConfigs; -static IWRAM_DATA struct BgConfig2 sGpuBgConfigs2[4]; -static IWRAM_DATA u32 sDmaBusyBitfield[4]; +static struct BgControl sGpuBgConfigs; +static struct BgConfig2 sGpuBgConfigs2[4]; +static u32 sDmaBusyBitfield[4]; u32 gUnneededFireRedVariable; @@ -220,7 +220,7 @@ static void ShowBgInternal(u8 bg) (sGpuBgConfigs.configs[bg].wraparound << 13) | (sGpuBgConfigs.configs[bg].screenSize << 14); - SetGpuReg((bg << 1) + 0x8, value); + SetGpuReg((bg << 1) + REG_OFFSET_BG0CNT, value); sGpuBgConfigs.bgVisibilityAndMode |= 1 << (bg + 8); sGpuBgConfigs.bgVisibilityAndMode &= DISPCNT_ALL_BG_AND_MODE_BITS; @@ -914,7 +914,6 @@ void CopyBgTilemapBufferToVram(u8 bg) void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 width, u8 height) { - const void *srcCopy; u16 destX16; u16 destY16; u16 mode; @@ -924,27 +923,31 @@ void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 wi switch (GetBgType(bg)) { case 0: - srcCopy = src; + { + const u16 * srcCopy = src; for (destY16 = destY; destY16 < (destY + height); destY16++) { for (destX16 = destX; destX16 < (destX + width); destX16++) { - ((u16*)sGpuBgConfigs2[bg].tilemap)[((destY16 * 0x20) + destX16)] = *((u16*)srcCopy)++; + ((u16*)sGpuBgConfigs2[bg].tilemap)[((destY16 * 0x20) + destX16)] = *srcCopy++; } } break; + } case 1: - srcCopy = src; + { + const u8 * srcCopy = src; mode = GetBgMetricAffineMode(bg, 0x1); for (destY16 = destY; destY16 < (destY + height); destY16++) { for (destX16 = destX; destX16 < (destX + width); destX16++) { - ((u8*)sGpuBgConfigs2[bg].tilemap)[((destY16 * mode) + destX16)] = *((u8*)srcCopy)++; + ((u8*)sGpuBgConfigs2[bg].tilemap)[((destY16 * mode) + destX16)] = *srcCopy++; } } break; } + } } } diff --git a/src/braille_puzzles.c b/src/braille_puzzles.c index 659f8682e..c00be82ad 100644 --- a/src/braille_puzzles.c +++ b/src/braille_puzzles.c @@ -10,6 +10,7 @@ #include "constants/maps.h" #include "constants/songs.h" #include "constants/species.h" +#include "constants/metatile_labels.h" #include "fieldmap.h" #include "party_menu.h" #include "fldeff.h" @@ -86,12 +87,12 @@ bool8 ShouldDoBrailleDigEffect(void) void DoBrailleDigEffect(void) { - MapGridSetMetatileIdAt(16, 8, 0x22A); - MapGridSetMetatileIdAt(17, 8, 0x22B); - MapGridSetMetatileIdAt(18, 8, 0x22C); - MapGridSetMetatileIdAt(16, 9, 0xE32); - MapGridSetMetatileIdAt(17, 9, 0x233); - MapGridSetMetatileIdAt(18, 9, 0xE34); + MapGridSetMetatileIdAt(16, 8, METATILE_ID(Cave, SealedChamberEntrance_TopLeft)); + MapGridSetMetatileIdAt(17, 8, METATILE_ID(Cave, SealedChamberEntrance_TopMid)); + MapGridSetMetatileIdAt(18, 8, METATILE_ID(Cave, SealedChamberEntrance_TopRight)); + MapGridSetMetatileIdAt(16, 9, METATILE_ID(Cave, SealedChamberEntrance_BottomLeft) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(17, 9, METATILE_ID(Cave, SealedChamberEntrance_BottomMid)); + MapGridSetMetatileIdAt(18, 9, METATILE_ID(Cave, SealedChamberEntrance_BottomRight) | METATILE_COLLISION_MASK); DrawWholeMapView(); PlaySE(SE_BAN); FlagSet(FLAG_SYS_BRAILLE_DIG); @@ -279,12 +280,12 @@ void UseRegirockHm_Callback(void) void DoBrailleRegirockEffect(void) { - MapGridSetMetatileIdAt(14, 26, 0x22A); - MapGridSetMetatileIdAt(15, 26, 0x22B); - MapGridSetMetatileIdAt(16, 26, 0x22C); - MapGridSetMetatileIdAt(14, 27, 0xE32); - MapGridSetMetatileIdAt(15, 27, 0x233); - MapGridSetMetatileIdAt(16, 27, 0xE34); + MapGridSetMetatileIdAt(14, 26, METATILE_ID(Cave, SealedChamberEntrance_TopLeft)); + MapGridSetMetatileIdAt(15, 26, METATILE_ID(Cave, SealedChamberEntrance_TopMid)); + MapGridSetMetatileIdAt(16, 26, METATILE_ID(Cave, SealedChamberEntrance_TopRight)); + MapGridSetMetatileIdAt(14, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomLeft) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(15, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomMid)); + MapGridSetMetatileIdAt(16, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomRight) | METATILE_COLLISION_MASK); DrawWholeMapView(); PlaySE(SE_BAN); FlagSet(FLAG_SYS_REGIROCK_PUZZLE_COMPLETED); @@ -318,12 +319,12 @@ void UseRegisteelHm_Callback(void) void DoBrailleRegisteelEffect(void) { - MapGridSetMetatileIdAt(14, 26, 0x22A); - MapGridSetMetatileIdAt(15, 26, 0x22B); - MapGridSetMetatileIdAt(16, 26, 0x22C); - MapGridSetMetatileIdAt(14, 27, 0xE32); - MapGridSetMetatileIdAt(15, 27, 0x233); - MapGridSetMetatileIdAt(16, 27, 0xE34); + MapGridSetMetatileIdAt(14, 26, METATILE_ID(Cave, SealedChamberEntrance_TopLeft)); + MapGridSetMetatileIdAt(15, 26, METATILE_ID(Cave, SealedChamberEntrance_TopMid)); + MapGridSetMetatileIdAt(16, 26, METATILE_ID(Cave, SealedChamberEntrance_TopRight)); + MapGridSetMetatileIdAt(14, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomLeft) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(15, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomMid)); + MapGridSetMetatileIdAt(16, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomRight) | METATILE_COLLISION_MASK); DrawWholeMapView(); PlaySE(SE_BAN); FlagSet(FLAG_SYS_REGISTEEL_PUZZLE_COMPLETED); diff --git a/src/cable_car.c b/src/cable_car.c index d44c9a241..adeee2647 100644 --- a/src/cable_car.c +++ b/src/cable_car.c @@ -245,7 +245,7 @@ static void CableCarMainCallback_Setup(void) { u16 imebak; u8 i = 0; - int sizeOut = 0; + u32 sizeOut = 0; switch (gMain.state) { diff --git a/src/contest.c b/src/contest.c index eb3252f72..662a27060 100644 --- a/src/contest.c +++ b/src/contest.c @@ -269,8 +269,6 @@ extern const u8 gText_Contest_Fear[]; extern const u8 gText_BDot[]; extern const u8 gText_CDot[]; extern const u8 *const gUnknown_08587E10[]; -extern const struct SpriteTemplate gSpriteTemplate_8587AD0; -extern const struct SpriteTemplate gSpriteTemplate_8587B18[]; extern void (*const gContestEffectFuncs[])(void); static const u8 gUnknown_08587A6C[] = @@ -1268,7 +1266,7 @@ static void sub_80D8108(u8 taskId) gTasks[taskId].data[0]++; break; case 1: - (s16)gBattle_BG1_Y += 7; + *(s16*)&gBattle_BG1_Y += 7; if ((s16)gBattle_BG1_Y <= 160) break; gTasks[taskId].data[0]++; @@ -2975,7 +2973,7 @@ static u8 sub_80DB174(u16 species, u32 otId, u32 personality, u32 index) else HandleLoadSpecialPokePic_DontHandleDeoxys(gMonBackPicTable + species, gMonSpritesGfxPtr->sprites[0], species, personality); - LoadCompressedPalette(GetFrontSpritePalFromSpeciesAndPersonality(species, otId, personality), 0x120, 0x20); + LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, otId, personality), 0x120, 0x20); SetMultiuseSpriteTemplateToPokemon(species, 0); spriteId = CreateSprite(&gMultiuseSpriteTemplate, 0x70, GetBattlerSpriteFinal_Y(2, species, FALSE), 30); diff --git a/src/contest_link_80F57C4.c b/src/contest_link_80F57C4.c index bae7859b5..a0a29f0ad 100644 --- a/src/contest_link_80F57C4.c +++ b/src/contest_link_80F57C4.c @@ -71,15 +71,10 @@ struct ContestLinkUnk14 u8 unk12; }; -struct ContestLinkUnk4 -{ - struct ContestLinkUnk14 unk0[4]; -}; - struct ContestLink80F57C4 { struct ContestLinkUnk0 *unk0; - struct ContestLinkUnk4 *unk4; + struct ContestLinkUnk14 (*unk4)[4]; u8 *unk8; u8 *unkC[4]; u8 *unk1C; @@ -205,9 +200,7 @@ void sub_80F57C4(void) void sub_80F591C(void) { int i, j; - s8 var0; - s8 var1; - int var2; + s8 var0, var1; u16 tile1, tile2; LZDecompressVram(gUnknown_08C19588, (void *)BG_CHAR_ADDR(0)); @@ -228,11 +221,7 @@ void sub_80F591C(void) if (j < var0) tile1 += 2; - var2 = var1; - if (var1 < 0) - var2 = -var2; - - if (j < var2) + if (j < abs(var1)) { tile2 = 0x60A4; if (var1 < 0) @@ -719,7 +708,7 @@ static void sub_80F6404(u8 taskId) if (top > 80) top = 80; - gBattle_WIN0V = (top << 8) | (160 - top);; + gBattle_WIN0V = (top << 8) | (160 - top); if (top == 80) gTasks[taskId].data[0]++; } @@ -737,8 +726,7 @@ static void sub_80F6404(u8 taskId) static void sub_80F66B4(u8 taskId) { - int i; - u16 nationalDexNum; + int i, nationalDexNum; if (gMain.newKeys & A_BUTTON) { @@ -859,13 +847,13 @@ static void sub_80F68F0(u8 taskId) void sub_80F69B8(u16 species, u8 monIndex, u8 srcOffset, u8 useDmaNow, u32 personality) { - u8 frameNum; const u8 *iconPtr; - u16 var0; - u16 var1; + u16 var0, var1, frameNum; - u8 *contestPlayerMonIndex = &gContestPlayerMonIndex; // fake match - frameNum = (monIndex == *contestPlayerMonIndex) ? 1 : 0; + if (monIndex == gContestPlayerMonIndex) + frameNum = 1; + else + frameNum = 0; iconPtr = GetMonIconPtr(species, personality, frameNum); iconPtr += srcOffset * 0x200 + 0x80; @@ -892,13 +880,12 @@ static void LoadAllContestMonIcons(u8 srcOffset, u8 useDmaNow) static void sub_80F6A9C(void) { - int i; - register u16 species asm("r0"); + int i, species; for (i = 0; i < 4; i++) { - species = GetIconSpecies(gContestMons[i].species, 0); - LoadPalette(gMonIconPalettes[gMonIconPaletteIndices[species]], i * 0x10 + 0xA0, 0x20); + species = gContestMons[i].species; + LoadPalette(gMonIconPalettes[gMonIconPaletteIndices[GetIconSpecies(species, 0)]], i * 0x10 + 0xA0, 0x20); } } @@ -1335,11 +1322,11 @@ static void sub_80F6F40(struct Sprite *sprite) static void sub_80F6F68(struct Sprite *sprite) { int i; - s16 var0; - var0 = (u16)sprite->data[7] + (u16)sprite->data[6]; - sprite->pos1.x -= var0 >> 8; - sprite->data[7] = (sprite->data[6] + sprite->data[7]) & 0xFF; + s16 delta = sprite->data[7] + sprite->data[6]; + sprite->pos1.x -= delta >> 8; + sprite->data[7] += sprite->data[6]; + sprite->data[7] &= 0xFF; if (sprite->pos1.x < sprite->data[4]) sprite->pos1.x = sprite->data[4]; @@ -1366,11 +1353,12 @@ static void sub_80F6FDC(struct Sprite *sprite) static void sub_80F7014(struct Sprite *sprite) { int i; - s16 var0; + s16 delta; - var0 = (u16)sprite->data[7] + (u16)sprite->data[6]; - sprite->pos1.x -= var0 >> 8; - sprite->data[7] = (sprite->data[6] + sprite->data[7]) & 0xFF; + delta = sprite->data[7] + sprite->data[6]; + sprite->pos1.x -= delta >> 8; + sprite->data[7] += sprite->data[6]; + sprite->data[7] &= 0xFF; for (i = 0; i < 3; i++) { struct Sprite *sprite2 = &gSprites[sprite->data[i]]; @@ -1487,14 +1475,11 @@ static void sub_80F71C8(void) CopyToBgTilemapBufferRect_ChangePalette(2, gUnknown_0203A034->unkC[2], 0, 0, 32, 4, palette); } -// fakematching? u8 sub_80F7310(u8 monIndex, u8 arg1) { - u32 var0; - u32 var1; + u32 var0 = gContestMonConditions[monIndex] << 16; + u32 var1 = var0 / 0x3F; - var0 = gContestMonConditions[monIndex] << 16; - var1 = var0 / 0x3F; if (var1 & 0xFFFF) var1 += 0x10000; @@ -1510,8 +1495,7 @@ u8 sub_80F7310(u8 monIndex, u8 arg1) s8 sub_80F7364(u8 arg0, u8 arg1) { - u32 r4; - u32 r2; + u32 r4, r2; s16 val; s8 ret; @@ -1607,9 +1591,10 @@ static void sub_80F75A8(struct Sprite *sprite) } else { - s16 delta = (u16)sprite->data[1] + 0x600; + s16 delta = sprite->data[1] + 0x600; sprite->pos1.x -= delta >> 8; - sprite->data[1] = (sprite->data[1] + 0x600) & 0xFF; + sprite->data[1] += 0x600; + sprite->data[1] &= 0xFF; if (sprite->pos1.x < 120) sprite->pos1.x = 120; @@ -1624,9 +1609,10 @@ static void sub_80F75A8(struct Sprite *sprite) static void sub_80F7620(struct Sprite *sprite) { - s16 delta = (u16)sprite->data[1] + 0x600; + s16 delta = sprite->data[1] + 0x600; sprite->pos1.x -= delta >> 8; - sprite->data[1] = (sprite->data[1] + 0x600) & 0xFF; + sprite->data[1] += + 0x600; + sprite->data[1] &= 0xFF; if (sprite->pos1.x < -32) { sprite->callback = SpriteCallbackDummy; @@ -1657,14 +1643,15 @@ static void sub_80F7670(u8 taskId) void sub_80F7768(struct Sprite *sprite) { - register s16 var0 asm("r1"); + s16 delta; sprite->data[3] += sprite->data[0]; sprite->pos2.x = Sin(sprite->data[3] >> 8, sprite->data[1]); - var0 = sprite->data[4] + sprite->data[2]; - sprite->pos1.x += var0 >> 8; - var0 = var0 & 0xFF; - sprite->data[4] = var0; + delta = sprite->data[4] + sprite->data[2]; + sprite->pos1.x += delta >> 8; + sprite->data[4] += sprite->data[2]; + sprite->data[4] &= 0xff; + sprite->pos1.y++; if (gUnknown_0203A034->unk0->unk9) sprite->invisible = 1; @@ -1695,705 +1682,145 @@ static void sub_80F7824(u8 taskId) } } -// static void sub_80F7880(void) -// { -// int i; -// int var0; -// int var1; -// int var2; -// int var3; -// u32 var4; -// int var5; -// int var6; -// s16 var7; -// s16 var8; -// s16 r2; - -// r2 = gUnknown_02039F08[0]; -// for (i = 1; i < 4; i++) -// { -// if (r2 < gUnknown_02039F08[i]) -// r2 = gUnknown_02039F08[i]; -// } - -// if (r2 < 0) -// { -// r2 = gUnknown_02039F08[0]; -// for (i = 1; i < 4; i++) -// { -// if (r2 > gUnknown_02039F08[i]) -// r2 = gUnknown_02039F08[i]; -// } -// } - -// // _080F78E4 -// for (i = 0; i < 4; i++) -// { -// var0 = gContestMonConditions[i] * 1000; -// var1 = r2; -// if (r2 < 0) -// var1 = -var1; - -// var2 = var0 / var1; -// if (var2 % 10 > 4) -// var2 += 10; - -// gUnknown_0203A034->unk4->unk0[i].unk0 = var2 / 10; -// var3 = gUnknown_02039F18[i]; -// if (var3 < 0) -// var3 = -var3; - -// var0 = var3 * 1000; -// var1 = r2; -// if (r2 < 0) -// var1 = -var1; - -// var2 = var0 / var1; -// if (var2 % 10 > 4) -// var2 += 10; - -// // _080F7966 -// gUnknown_0203A034->unk4->unk0[i].unk4 = var2 / 10; -// if (gUnknown_02039F18[i] < 0) -// gUnknown_0203A034->unk4->unk0[i].unk10 = 1; - -// var4 = gUnknown_0203A034->unk4->unk0[i].unk0 * 22528 / 100; -// if ((var4 & 0xFF) > 0x7F) -// var4 += 0x100; - -// gUnknown_0203A034->unk4->unk0[i].unk8 = var4 >> 8; -// var4 = gUnknown_0203A034->unk4->unk0[i].unk4 * 22528 / 100; -// if ((var4 & 0xFF) > 0x7F) -// var4 += 0x100; - -// gUnknown_0203A034->unk4->unk0[i].unkC = var4 >> 8; -// gUnknown_0203A034->unk4->unk0[i].unk11 = sub_80F7310(i, 1); -// var5 = sub_80F7364(i, 1); -// if (var5 < 0) -// var5 = -var5; - -// gUnknown_0203A034->unk4->unk0[i].unk12 = var5; -// if (gContestFinalStandings[i]) -// { -// var7 = gUnknown_0203A034->unk4->unk0[i].unk8; -// var8 = gUnknown_0203A034->unk4->unk0[i].unkC; -// if (gUnknown_0203A034->unk4->unk0[i].unk10) -// var8 = -var8; - -// if (var7 + var8 == 88) -// { -// if (var8 > 0) -// gUnknown_0203A034->unk4->unk0[i].unkC--; -// else if (var7 > 0) -// gUnknown_0203A034->unk4->unk0[i].unk8--; -// } -// } -// } -// } - -NAKED static void sub_80F7880(void) { - asm_unified("\n\ - push {r4-r7,lr}\n\ - mov r7, r10\n\ - mov r6, r9\n\ - mov r5, r8\n\ - push {r5-r7}\n\ - sub sp, 0x4\n\ - ldr r0, =gUnknown_02039F08\n\ - ldrh r2, [r0]\n\ - adds r4, r0, 0\n\ - adds r3, r4, 0x2\n\ - movs r0, 0x2\n\ - mov r8, r0\n\ -_080F7898:\n\ - lsls r0, r2, 16\n\ - asrs r0, 16\n\ - movs r5, 0\n\ - ldrsh r1, [r3, r5]\n\ - cmp r0, r1\n\ - bge _080F78A6\n\ - ldrh r2, [r3]\n\ -_080F78A6:\n\ - adds r3, 0x2\n\ - movs r0, 0x1\n\ - negs r0, r0\n\ - add r8, r0\n\ - mov r1, r8\n\ - cmp r1, 0\n\ - bge _080F7898\n\ - lsls r0, r2, 16\n\ - str r0, [sp]\n\ - cmp r0, 0\n\ - bge _080F78E4\n\ - ldrh r2, [r4]\n\ - adds r3, r4, 0x2\n\ - movs r4, 0x2\n\ - mov r8, r4\n\ -_080F78C4:\n\ - lsls r0, r2, 16\n\ - asrs r0, 16\n\ - movs r5, 0\n\ - ldrsh r1, [r3, r5]\n\ - cmp r0, r1\n\ - ble _080F78D2\n\ - ldrh r2, [r3]\n\ -_080F78D2:\n\ - adds r3, 0x2\n\ - movs r0, 0x1\n\ - negs r0, r0\n\ - add r8, r0\n\ - lsls r1, r2, 16\n\ - str r1, [sp]\n\ - mov r4, r8\n\ - cmp r4, 0\n\ - bge _080F78C4\n\ -_080F78E4:\n\ - movs r5, 0\n\ - mov r8, r5\n\ - mov r10, r5\n\ -_080F78EA:\n\ - ldr r0, =gContestMonConditions\n\ - mov r1, r8\n\ - lsls r7, r1, 1\n\ - adds r0, r7, r0\n\ - movs r2, 0\n\ - ldrsh r1, [r0, r2]\n\ - lsls r0, r1, 5\n\ - subs r0, r1\n\ - lsls r0, 2\n\ - adds r0, r1\n\ - lsls r0, 3\n\ - ldr r4, [sp]\n\ - asrs r5, r4, 16\n\ - adds r1, r5, 0\n\ - cmp r5, 0\n\ - bge _080F790C\n\ - negs r1, r5\n\ -_080F790C:\n\ - bl __divsi3\n\ - adds r4, r0, 0\n\ - movs r1, 0xA\n\ - bl __modsi3\n\ - cmp r0, 0x4\n\ - ble _080F791E\n\ - adds r4, 0xA\n\ -_080F791E:\n\ - ldr r0, =gUnknown_0203A034\n\ - mov r9, r0\n\ - ldr r0, [r0]\n\ - ldr r0, [r0, 0x4]\n\ - mov r1, r10\n\ - adds r6, r1, r0\n\ - adds r0, r4, 0\n\ - movs r1, 0xA\n\ - bl __divsi3\n\ - str r0, [r6]\n\ - ldr r0, =gUnknown_02039F18\n\ - adds r7, r0\n\ - movs r2, 0\n\ - ldrsh r1, [r7, r2]\n\ - cmp r1, 0\n\ - bge _080F7942\n\ - negs r1, r1\n\ -_080F7942:\n\ - lsls r0, r1, 5\n\ - subs r0, r1\n\ - lsls r0, 2\n\ - adds r0, r1\n\ - lsls r0, 3\n\ - adds r1, r5, 0\n\ - cmp r1, 0\n\ - bge _080F7954\n\ - negs r1, r1\n\ -_080F7954:\n\ - bl __divsi3\n\ - adds r4, r0, 0\n\ - movs r1, 0xA\n\ - bl __modsi3\n\ - cmp r0, 0x4\n\ - ble _080F7966\n\ - adds r4, 0xA\n\ -_080F7966:\n\ - adds r0, r4, 0\n\ - movs r1, 0xA\n\ - bl __divsi3\n\ - str r0, [r6, 0x4]\n\ - movs r4, 0\n\ - ldrsh r0, [r7, r4]\n\ - cmp r0, 0\n\ - bge _080F797C\n\ - movs r0, 0x1\n\ - strb r0, [r6, 0x10]\n\ -_080F797C:\n\ - mov r5, r9\n\ - ldr r0, [r5]\n\ - ldr r0, [r0, 0x4]\n\ - mov r1, r10\n\ - adds r4, r1, r0\n\ - ldr r1, [r4]\n\ - lsls r0, r1, 1\n\ - adds r0, r1\n\ - lsls r0, 2\n\ - subs r0, r1\n\ - lsls r0, 11\n\ - movs r1, 0x64\n\ - bl __divsi3\n\ - adds r1, r0, 0\n\ - movs r5, 0xFF\n\ - ands r0, r5\n\ - cmp r0, 0x7F\n\ - bls _080F79A8\n\ - movs r2, 0x80\n\ - lsls r2, 1\n\ - adds r1, r2\n\ -_080F79A8:\n\ - lsrs r0, r1, 8\n\ - str r0, [r4, 0x8]\n\ - ldr r1, [r4, 0x4]\n\ - lsls r0, r1, 1\n\ - adds r0, r1\n\ - lsls r0, 2\n\ - subs r0, r1\n\ - lsls r0, 11\n\ - movs r1, 0x64\n\ - bl __divsi3\n\ - adds r1, r0, 0\n\ - ands r0, r5\n\ - cmp r0, 0x7F\n\ - bls _080F79CC\n\ - movs r5, 0x80\n\ - lsls r5, 1\n\ - adds r1, r5\n\ -_080F79CC:\n\ - lsrs r0, r1, 8\n\ - str r0, [r4, 0xC]\n\ - mov r0, r8\n\ - lsls r4, r0, 24\n\ - lsrs r4, 24\n\ - adds r0, r4, 0\n\ - movs r1, 0x1\n\ - bl sub_80F7310\n\ - mov r2, r9\n\ - ldr r1, [r2]\n\ - ldr r1, [r1, 0x4]\n\ - add r1, r10\n\ - strb r0, [r1, 0x11]\n\ - adds r0, r4, 0\n\ - movs r1, 0x1\n\ - bl sub_80F7364\n\ - mov r4, r9\n\ - ldr r1, [r4]\n\ - ldr r1, [r1, 0x4]\n\ - add r1, r10\n\ - lsls r0, 24\n\ - asrs r0, 24\n\ - cmp r0, 0\n\ - bge _080F7A02\n\ - negs r0, r0\n\ -_080F7A02:\n\ - strb r0, [r1, 0x12]\n\ - ldr r0, =gContestFinalStandings\n\ - add r0, r8\n\ - ldrb r0, [r0]\n\ - cmp r0, 0\n\ - beq _080F7A60\n\ - mov r5, r9\n\ - ldr r0, [r5]\n\ - ldr r0, [r0, 0x4]\n\ - mov r2, r10\n\ - adds r1, r2, r0\n\ - ldr r5, [r1, 0x8]\n\ - ldrh r3, [r1, 0x8]\n\ - ldr r4, [r1, 0xC]\n\ - ldrh r2, [r1, 0xC]\n\ - ldrb r0, [r1, 0x10]\n\ - cmp r0, 0\n\ - beq _080F7A2C\n\ - lsls r0, r2, 16\n\ - negs r0, r0\n\ - lsrs r2, r0, 16\n\ -_080F7A2C:\n\ - lsls r0, r3, 16\n\ - asrs r3, r0, 16\n\ - lsls r0, r2, 16\n\ - asrs r2, r0, 16\n\ - adds r0, r3, r2\n\ - cmp r0, 0x58\n\ - bne _080F7A60\n\ - cmp r2, 0\n\ - ble _080F7A58\n\ - subs r0, r4, 0x1\n\ - str r0, [r1, 0xC]\n\ - b _080F7A60\n\ - .pool\n\ -_080F7A58:\n\ - cmp r3, 0\n\ - ble _080F7A60\n\ - subs r0, r5, 0x1\n\ - str r0, [r1, 0x8]\n\ -_080F7A60:\n\ - movs r4, 0x14\n\ - add r10, r4\n\ - movs r5, 0x1\n\ - add r8, r5\n\ - mov r0, r8\n\ - cmp r0, 0x3\n\ - bgt _080F7A70\n\ - b _080F78EA\n\ -_080F7A70:\n\ - add sp, 0x4\n\ - pop {r3-r5}\n\ - mov r8, r3\n\ - mov r9, r4\n\ - mov r10, r5\n\ - pop {r4-r7}\n\ - pop {r0}\n\ - bx r0"); -} - -// static void sub_80F7A80(u8 arg0, u8 arg1) -// { -// int i; -// u8 taskId; -// u8 sp8, spC; - -// sp8 = 0; -// spC = 0; -// if (!arg0) -// { -// u32 var0; -// for (i = 0; i < 4; i++) -// { -// int var1 = gUnknown_0203A034->unk4->unk0[i].unk11; -// if (arg1 < var1) -// { -// int x = var1 + 19; -// x -= arg1; -// x--; -// FillBgTilemapBufferRect_Palette0(1, 0x60B3, x, i * 3 + 5, 1, 1); -// taskId = CreateTask(sub_80F7CA8, 10); -// var0 = ((gUnknown_0203A034->unk4->unk0[i].unk8 << 16) / gUnknown_0203A034->unk4->unk0[i].unk11) * (arg1 + 1); -// var0 &= 0xFFFF; -// if (var0 > 0x7FFF) -// var0 += 0x10000; - -// gTasks[taskId].data[0] = i; -// gTasks[taskId].data[1] = var0 >> 16; -// gUnknown_0203A034->unk0->unk14++; -// sp8++; -// } -// } -// } -// else -// { -// u32 var0; -// for (i = 0; i < 4; i++) -// { -// int tile; -// s8 var1 = gUnknown_0203A034->unk4->unk0[i].unk12; -// tile = gUnknown_0203A034->unk4->unk0[i].unk10 ? 0x60A5 : 0x60A3; -// if (arg1 < var1) -// { -// int thing = ((s8)arg1 - 19); -// int x = var1 - thing; -// x--; -// FillBgTilemapBufferRect_Palette0(1, tile, x, i * 3 + 6, 1, 1); -// taskId = CreateTask(sub_80F7CA8, 10); -// var0 = ((gUnknown_0203A034->unk4->unk0[i].unkC << 16) / gUnknown_0203A034->unk4->unk0[i].unk12) * (arg1 + 1); -// var0 &= 0xFFFF; -// if (var0 > 0x7FFF) -// var0 += 0x10000; - -// gTasks[taskId].data[0] = i; -// if (gUnknown_0203A034->unk4->unk0[i].unk10) -// { -// gTasks[taskId].data[2] = 1; -// spC++; -// } -// else -// { -// sp8++; -// } - -// if (gUnknown_0203A034->unk4->unk0[i].unk10) -// gTasks[taskId].data[1] = gUnknown_0203A034->unk4->unk0[i].unk8 - (var0 >> 16); -// else -// gTasks[taskId].data[1] = gUnknown_0203A034->unk4->unk0[i].unk8 + (var0 >> 16); - -// gUnknown_0203A034->unk0->unk14++; -// } -// } -// } - -// if (spC) -// PlaySE(SE_PIN); - -// if (sp8) -// PlaySE(SE_BAN); -// } + int i, r4; + u32 r1; + s16 r2; + s8 var; + + r2 = gUnknown_02039F08[0]; + for (i = 1; i < 4; i++) + { + if (r2 < gUnknown_02039F08[i]) + r2 = gUnknown_02039F08[i]; + } + + if (r2 < 0) + { + r2 = gUnknown_02039F08[0]; + for (i = 1; i < 4; i++) + { + if (r2 > gUnknown_02039F08[i]) + r2 = gUnknown_02039F08[i]; + } + } + + for (i = 0; i < 4; i++) + { + r4 = (gContestMonConditions[i] * 1000) / abs(r2); + if (r4 % 10 > 4) + r4 += 10; + (*gUnknown_0203A034->unk4)[i].unk0 = r4 / 10; + + r4 = (abs(gUnknown_02039F18[i]) * 1000) / abs(r2); + if (r4 % 10 > 4) + r4 += 10; + (*gUnknown_0203A034->unk4)[i].unk4 = r4 / 10; + + if (gUnknown_02039F18[i] < 0) + (*gUnknown_0203A034->unk4)[i].unk10 = 1; + + r1 = ((*gUnknown_0203A034->unk4)[i].unk0 * 22528) / 100; + if ((r1 & 0xFF) > 0x7F) + r1 += 0x100; + (*gUnknown_0203A034->unk4)[i].unk8 = r1 >> 8; + + r1 = ((*gUnknown_0203A034->unk4)[i].unk4 * 22528) / 100; + if ((r1 & 0xFF) > 0x7F) + r1 += 0x100; + (*gUnknown_0203A034->unk4)[i].unkC = r1 >> 8; + + (*gUnknown_0203A034->unk4)[i].unk11 = sub_80F7310(i, 1); + var = sub_80F7364(i, 1); + (*gUnknown_0203A034->unk4)[i].unk12 = abs(var); + + if (gContestFinalStandings[i]) + { + s16 var1 = (*gUnknown_0203A034->unk4)[i].unk8; + s16 var2 = (*gUnknown_0203A034->unk4)[i].unkC; + + if ((*gUnknown_0203A034->unk4)[i].unk10) + var2 *= -1; + + if (var1 + var2 == 88) + { + if (var2 > 0) + (*gUnknown_0203A034->unk4)[i].unkC--; + else if (var1 > 0) + (*gUnknown_0203A034->unk4)[i].unk8--; + } + } + } +} -NAKED static void sub_80F7A80(u8 arg0, u8 arg1) { - asm_unified("\n\ - push {r4-r7,lr}\n\ - mov r7, r10\n\ - mov r6, r9\n\ - mov r5, r8\n\ - push {r5-r7}\n\ - sub sp, 0x14\n\ - lsls r0, 24\n\ - lsls r1, 24\n\ - lsrs r1, 24\n\ - mov r8, r1\n\ - movs r1, 0\n\ - str r1, [sp, 0x8]\n\ - movs r3, 0\n\ - str r3, [sp, 0xC]\n\ - cmp r0, 0\n\ - bne _080F7B5C\n\ - mov r9, r3\n\ - ldr r4, =gUnknown_0203A034\n\ - mov r10, r4\n\ - movs r7, 0xA0\n\ - lsls r7, 19\n\ - movs r6, 0\n\ -_080F7AAC:\n\ - mov r1, r10\n\ - ldr r0, [r1]\n\ - ldr r0, [r0, 0x4]\n\ - adds r0, r6, r0\n\ - ldrb r2, [r0, 0x11]\n\ - cmp r8, r2\n\ - bcs _080F7B2E\n\ - adds r2, 0x13\n\ - mov r3, r8\n\ - subs r2, r3\n\ - subs r2, 0x1\n\ - lsls r2, 24\n\ - lsrs r2, 24\n\ - lsrs r3, r7, 24\n\ - movs r0, 0x1\n\ - str r0, [sp]\n\ - str r0, [sp, 0x4]\n\ - ldr r1, =0x000060b3\n\ - bl FillBgTilemapBufferRect_Palette0\n\ - ldr r0, =sub_80F7CA8\n\ - movs r1, 0xA\n\ - bl CreateTask\n\ - lsls r0, 24\n\ - lsrs r5, r0, 24\n\ - mov r0, r10\n\ - ldr r4, [r0]\n\ - ldr r1, [r4, 0x4]\n\ - adds r1, r6, r1\n\ - ldr r0, [r1, 0x8]\n\ - lsls r0, 16\n\ - ldrb r1, [r1, 0x11]\n\ - bl __udivsi3\n\ - mov r1, r8\n\ - adds r1, 0x1\n\ - adds r3, r0, 0\n\ - muls r3, r1\n\ - ldr r0, =0x0000ffff\n\ - ands r0, r3\n\ - ldr r1, =0x00007fff\n\ - cmp r0, r1\n\ - bls _080F7B0A\n\ - movs r1, 0x80\n\ - lsls r1, 9\n\ - adds r3, r1\n\ -_080F7B0A:\n\ - ldr r1, =gTasks\n\ - lsls r0, r5, 2\n\ - adds r0, r5\n\ - lsls r0, 3\n\ - adds r0, r1\n\ - mov r1, r9\n\ - strh r1, [r0, 0x8]\n\ - lsrs r1, r3, 16\n\ - strh r1, [r0, 0xA]\n\ - ldr r1, [r4]\n\ - ldrb r0, [r1, 0x14]\n\ - adds r0, 0x1\n\ - strb r0, [r1, 0x14]\n\ - ldr r0, [sp, 0x8]\n\ - adds r0, 0x1\n\ - lsls r0, 24\n\ - lsrs r0, 24\n\ - str r0, [sp, 0x8]\n\ -_080F7B2E:\n\ - movs r3, 0xC0\n\ - lsls r3, 18\n\ - adds r7, r3\n\ - adds r6, 0x14\n\ - movs r4, 0x1\n\ - add r9, r4\n\ - mov r0, r9\n\ - cmp r0, 0x3\n\ - ble _080F7AAC\n\ - b _080F7C7E\n\ - .pool\n\ -_080F7B5C:\n\ - movs r1, 0\n\ - mov r9, r1\n\ - mov r10, r1\n\ - movs r3, 0xC0\n\ - lsls r3, 19\n\ - str r3, [sp, 0x10]\n\ -_080F7B68:\n\ - ldr r4, =gUnknown_0203A034\n\ - ldr r0, [r4]\n\ - ldr r0, [r0, 0x4]\n\ - add r0, r10\n\ - ldrb r2, [r0, 0x12]\n\ - ldrb r0, [r0, 0x10]\n\ - ldr r1, =0x000060a3\n\ - cmp r0, 0\n\ - beq _080F7B7C\n\ - adds r1, 0x2\n\ -_080F7B7C:\n\ - lsls r0, r2, 24\n\ - asrs r0, 24\n\ - cmp r8, r0\n\ - bge _080F7C64\n\ - mov r3, r8\n\ - lsls r2, r3, 24\n\ - asrs r2, 24\n\ - subs r2, 0x13\n\ - subs r2, r0, r2\n\ - subs r2, 0x1\n\ - lsls r2, 24\n\ - lsrs r2, 24\n\ - ldr r4, [sp, 0x10]\n\ - lsrs r3, r4, 24\n\ - movs r7, 0x1\n\ - str r7, [sp]\n\ - str r7, [sp, 0x4]\n\ - movs r0, 0x1\n\ - bl FillBgTilemapBufferRect_Palette0\n\ - ldr r0, =sub_80F7CA8\n\ - movs r1, 0xA\n\ - bl CreateTask\n\ - lsls r0, 24\n\ - lsrs r5, r0, 24\n\ - ldr r0, =gUnknown_0203A034\n\ - ldr r6, [r0]\n\ - ldr r1, [r6, 0x4]\n\ - add r1, r10\n\ - ldr r0, [r1, 0xC]\n\ - lsls r0, 16\n\ - ldrb r1, [r1, 0x12]\n\ - bl __udivsi3\n\ - mov r1, r8\n\ - adds r1, 0x1\n\ - adds r3, r0, 0\n\ - muls r3, r1\n\ - ldr r0, =0x0000ffff\n\ - ands r0, r3\n\ - ldr r1, =0x00007fff\n\ - cmp r0, r1\n\ - bls _080F7BDA\n\ - movs r1, 0x80\n\ - lsls r1, 9\n\ - adds r3, r1\n\ -_080F7BDA:\n\ - ldr r1, =gTasks\n\ - lsls r2, r5, 2\n\ - adds r0, r2, r5\n\ - lsls r0, 3\n\ - adds r4, r0, r1\n\ - mov r0, r9\n\ - strh r0, [r4, 0x8]\n\ - ldr r0, [r6, 0x4]\n\ - add r0, r10\n\ - ldrb r0, [r0, 0x10]\n\ - adds r6, r1, 0\n\ - cmp r0, 0\n\ - beq _080F7C1C\n\ - strh r7, [r4, 0xC]\n\ - ldr r0, [sp, 0xC]\n\ - adds r0, 0x1\n\ - lsls r0, 24\n\ - lsrs r0, 24\n\ - str r0, [sp, 0xC]\n\ - b _080F7C26\n\ - .pool\n\ -_080F7C1C:\n\ - ldr r0, [sp, 0x8]\n\ - adds r0, 0x1\n\ - lsls r0, 24\n\ - lsrs r0, 24\n\ - str r0, [sp, 0x8]\n\ -_080F7C26:\n\ - ldr r1, =gUnknown_0203A034\n\ - ldr r0, [r1]\n\ - ldr r0, [r0, 0x4]\n\ - mov r4, r10\n\ - adds r1, r4, r0\n\ - ldrb r0, [r1, 0x10]\n\ - ldr r4, =gUnknown_0203A034\n\ - cmp r0, 0\n\ - beq _080F7C4C\n\ - adds r0, r2, r5\n\ - lsls r0, 3\n\ - adds r0, r6\n\ - lsrs r2, r3, 16\n\ - ldr r1, [r1, 0x8]\n\ - subs r1, r2\n\ - b _080F7C58\n\ - .pool\n\ -_080F7C4C:\n\ - adds r0, r2, r5\n\ - lsls r0, 3\n\ - adds r0, r6\n\ - lsrs r2, r3, 16\n\ - ldr r1, [r1, 0x8]\n\ - adds r1, r2\n\ -_080F7C58:\n\ - strh r1, [r0, 0xA]\n\ - ldr r0, [r4]\n\ - ldr r1, [r0]\n\ - ldrb r0, [r1, 0x14]\n\ - adds r0, 0x1\n\ - strb r0, [r1, 0x14]\n\ -_080F7C64:\n\ - movs r0, 0x14\n\ - add r10, r0\n\ - ldr r1, [sp, 0x10]\n\ - movs r3, 0xC0\n\ - lsls r3, 18\n\ - adds r1, r3\n\ - str r1, [sp, 0x10]\n\ - movs r4, 0x1\n\ - add r9, r4\n\ - mov r0, r9\n\ - cmp r0, 0x3\n\ - bgt _080F7C7E\n\ - b _080F7B68\n\ -_080F7C7E:\n\ - ldr r1, [sp, 0xC]\n\ - cmp r1, 0\n\ - beq _080F7C8A\n\ - movs r0, 0x16\n\ - bl PlaySE\n\ -_080F7C8A:\n\ - ldr r3, [sp, 0x8]\n\ - cmp r3, 0\n\ - beq _080F7C96\n\ - movs r0, 0x15\n\ - bl PlaySE\n\ -_080F7C96:\n\ - add sp, 0x14\n\ - pop {r3-r5}\n\ - mov r8, r3\n\ - mov r9, r4\n\ - mov r10, r5\n\ - pop {r4-r7}\n\ - pop {r0}\n\ - bx r0"); + int i, taskId; + u32 var0; + u8 sp8 = 0, spC = 0; + + if (!arg0) + { + for (i = 0; i < 4; i++) + { + u8 unk = (*gUnknown_0203A034->unk4)[i].unk11; + if (arg1 < unk) + { + FillBgTilemapBufferRect_Palette0(1, 0x60B3, ((19 + unk) - arg1) - 1, i * 3 + 5, 1, 1); + taskId = CreateTask(sub_80F7CA8, 10); + + var0 = (((*gUnknown_0203A034->unk4)[i].unk8 << 16) / (*gUnknown_0203A034->unk4)[i].unk11) * (arg1 + 1); + if ((var0 & 0xFFFF) > 0x7FFF) + var0 += 0x10000; + + gTasks[taskId].data[0] = i; + gTasks[taskId].data[1] = var0 >> 16; + gUnknown_0203A034->unk0->unk14++; + sp8++; + } + } + } + else + { + for (i = 0; i < 4; i++) + { + s8 unk = (*gUnknown_0203A034->unk4)[i].unk12; + u32 tile = (*gUnknown_0203A034->unk4)[i].unk10 ? 0x60A5 : 0x60A3; + if (arg1 < unk) + { + FillBgTilemapBufferRect_Palette0(1, tile, ((19 + unk) - arg1) - 1, i * 3 + 6, 1, 1); + taskId = CreateTask(sub_80F7CA8, 10); + + var0 = (((*gUnknown_0203A034->unk4)[i].unkC << 16) / (*gUnknown_0203A034->unk4)[i].unk12) * (arg1 + 1); + if ((var0 & 0xFFFF) > 0x7FFF) + var0 += 0x10000; + + gTasks[taskId].data[0] = i; + if ((*gUnknown_0203A034->unk4)[i].unk10) + { + gTasks[taskId].data[2] = 1; + spC++; + } + else + { + sp8++; + } + + if ((*gUnknown_0203A034->unk4)[i].unk10) + gTasks[taskId].data[1] = -(var0 >> 16) + (*gUnknown_0203A034->unk4)[i].unk8 ; + else + gTasks[taskId].data[1] = (var0 >> 16) + (*gUnknown_0203A034->unk4)[i].unk8; + + gUnknown_0203A034->unk0->unk14++; + } + } + } + + if (spC) + PlaySE(SE_BOO); + if (sp8) + PlaySE(SE_PIN); } void sub_80F7CA8(u8 taskId) @@ -2624,8 +2051,7 @@ void sub_80F8290(void) void sub_80F82B4(void) { - u8 i; - u8 count; + u8 i, count; for (i = 0, count = 0; i < 4; i++) { diff --git a/src/contest_painting.c b/src/contest_painting.c index b43923c7b..66127cbbc 100644 --- a/src/contest_painting.c +++ b/src/contest_painting.c @@ -28,11 +28,11 @@ struct ContestWinner *gUnknown_030061C0; u16 *gContestPaintingMonPalette; // IWRAM bss -IWRAM_DATA u8 gContestPaintingState; -IWRAM_DATA u16 gContestPaintingMosaicVal; -IWRAM_DATA u16 gContestPaintingFadeCounter; -IWRAM_DATA bool8 gUnknown_030011F6; -IWRAM_DATA u8 gContestPaintingWindowId; +static u8 gContestPaintingState; +static u16 gContestPaintingMosaicVal; +static u16 gContestPaintingFadeCounter; +static bool8 gUnknown_030011F6; +static u8 gContestPaintingWindowId; static void ShowContestPainting(void); static void HoldContestPainting(void); @@ -250,8 +250,7 @@ static void HoldContestPainting(void) case 1: if ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON)) { - u8 two = 2; //needed to make the asm match - gContestPaintingState = two; + gContestPaintingState++; BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB(0, 0, 0)); } @@ -363,7 +362,7 @@ static void VBlankCB_ContestPainting(void) void sub_81302E8(u16 species, u8 arg1) { - const void *pal = GetFrontSpritePalFromSpeciesAndPersonality(species, gUnknown_030061C0->trainerId, gUnknown_030061C0->personality); + const void *pal = GetMonSpritePalFromSpeciesAndPersonality(species, gUnknown_030061C0->trainerId, gUnknown_030061C0->personality); LZDecompressVram(pal, gContestPaintingMonPalette); if (!arg1) { @@ -685,7 +684,7 @@ static void sub_8130760(u8 contestResult) gUnknown_030061A0.var_16 = 2; gUnknown_030061A0.var_0 = contestResult; - gUnknown_030061A0.var_10 = 0x6010000; + gUnknown_030061A0.var_10 = OBJ_VRAM0; sub_8124F2C(&gUnknown_030061A0); sub_81261A4(&gUnknown_030061A0); diff --git a/src/data/.gitignore b/src/data/.gitignore new file mode 100755 index 000000000..eaf9e1f6d --- /dev/null +++ b/src/data/.gitignore @@ -0,0 +1 @@ +wild_encounters.h diff --git a/src/data/battle_frontier/battle_pyramid_level_50_wild_mons.h b/src/data/battle_frontier/battle_pyramid_level_50_wild_mons.h index 108b3a3b0..d706aafee 100644 --- a/src/data/battle_frontier/battle_pyramid_level_50_wild_mons.h +++ b/src/data/battle_frontier/battle_pyramid_level_50_wild_mons.h @@ -3,49 +3,49 @@ static const struct PyramidWildMon sLevel50WildMons_Round1[] = { .species = SPECIES_PLUSLE, .lvl = 35, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDER_WAVE, MOVE_SPARK, MOVE_ENCORE, MOVE_NONE} }, { .species = SPECIES_MINUN, .lvl = 35, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDER_WAVE, MOVE_THUNDERBOLT, MOVE_QUICK_ATTACK, MOVE_NONE} }, { .species = SPECIES_PIKACHU, .lvl = 37, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDER_WAVE, MOVE_THUNDERBOLT, MOVE_SLAM, MOVE_NONE} }, { .species = SPECIES_ELECTABUZZ, .lvl = 37, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDER_PUNCH, MOVE_SWIFT, MOVE_SCREECH, MOVE_NONE} }, { .species = SPECIES_VILEPLUME, .lvl = 39, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_STUN_SPORE, MOVE_GIGA_DRAIN, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_MANECTRIC, .lvl = 39, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDER_WAVE, MOVE_THUNDER, MOVE_QUICK_ATTACK, MOVE_NONE} }, { .species = SPECIES_BRELOOM, .lvl = 40, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_STUN_SPORE, MOVE_FOCUS_PUNCH, MOVE_GIGA_DRAIN, MOVE_MACH_PUNCH} }, { .species = SPECIES_JOLTEON, .lvl = 40, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDER_WAVE, MOVE_THUNDER, MOVE_PIN_MISSILE, MOVE_QUICK_ATTACK} } }; @@ -55,49 +55,49 @@ static const struct PyramidWildMon sLevel50WildMons_Round2[] = { .species = SPECIES_GULPIN, .lvl = 36, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_TOXIC, MOVE_SLUDGE, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_ROSELIA, .lvl = 36, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_TOXIC, MOVE_GIGA_DRAIN, MOVE_MAGICAL_LEAF, MOVE_PETAL_DANCE} }, { .species = SPECIES_BUTTERFREE, .lvl = 38, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_POISON_POWDER, MOVE_GUST, MOVE_PSYBEAM, MOVE_NONE} }, { .species = SPECIES_SEVIPER, .lvl = 38, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_POISON_FANG, MOVE_SWAGGER, MOVE_CRUNCH, MOVE_POISON_TAIL} }, { .species = SPECIES_SKARMORY, .lvl = 40, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_TOXIC, MOVE_FLY, MOVE_STEEL_WING, MOVE_NONE} }, { .species = SPECIES_LUDICOLO, .lvl = 40, - .abilityBit = 1, + .abilityNum = 1, .moves = {MOVE_TOXIC, MOVE_PROTECT, MOVE_DIVE, MOVE_RAIN_DANCE} }, { .species = SPECIES_CROBAT, .lvl = 41, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_TOXIC, MOVE_CONFUSE_RAY, MOVE_MEAN_LOOK, MOVE_BITE} }, { .species = SPECIES_GENGAR, .lvl = 41, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_TOXIC, MOVE_SHADOW_PUNCH, MOVE_NIGHT_SHADE, MOVE_NONE} } }; @@ -107,49 +107,49 @@ static const struct PyramidWildMon sLevel50WildMons_Round3[] = { .species = SPECIES_GROWLITHE, .lvl = 37, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_FLAME_WHEEL, MOVE_TAKE_DOWN, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_VULPIX, .lvl = 37, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_WILL_O_WISP, MOVE_FLAMETHROWER, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_MAGCARGO, .lvl = 39, - .abilityBit = 1, + .abilityNum = 1, .moves = {MOVE_FLAMETHROWER, MOVE_ROCK_SLIDE, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_NINETALES, .lvl = 39, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_WILL_O_WISP, MOVE_QUICK_ATTACK, MOVE_FLAMETHROWER, MOVE_NONE} }, { .species = SPECIES_MEDICHAM, .lvl = 41, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_FIRE_PUNCH, MOVE_HI_JUMP_KICK, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_WEEZING, .lvl = 41, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_WILL_O_WISP, MOVE_FLAMETHROWER, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_DUSCLOPS, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_WILL_O_WISP, MOVE_CONFUSE_RAY, MOVE_MEAN_LOOK, MOVE_SHADOW_PUNCH} }, { .species = SPECIES_HOUNDOOM, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_FLAMETHROWER, MOVE_BITE, MOVE_SOLAR_BEAM, MOVE_OVERHEAT} } }; @@ -159,49 +159,49 @@ static const struct PyramidWildMon sLevel50WildMons_Round4[] = { .species = SPECIES_DUNSPARCE, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SPITE, MOVE_TOXIC, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_BANETTE, .lvl = 41, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_GRUDGE, MOVE_WILL_O_WISP, MOVE_NIGHT_SHADE, MOVE_NONE} }, { .species = SPECIES_MISDREAVUS, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_GRUDGE, MOVE_SPITE, MOVE_SHADOW_BALL, MOVE_NONE} }, { .species = SPECIES_NINETALES, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_GRUDGE, MOVE_WILL_O_WISP, MOVE_OVERHEAT, MOVE_NONE} }, { .species = SPECIES_ABSOL, .lvl = 44, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_BITE, MOVE_AERIAL_ACE, MOVE_SHADOW_BALL, MOVE_PROTECT} }, { .species = SPECIES_DUSCLOPS, .lvl = 44, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_WILL_O_WISP, MOVE_PROTECT, MOVE_TOXIC, MOVE_SHADOW_BALL} }, { .species = SPECIES_SHEDINJA, .lvl = 45, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_GRUDGE, MOVE_TOXIC, MOVE_SPITE, MOVE_NONE} }, { .species = SPECIES_GENGAR, .lvl = 45, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_GRUDGE, MOVE_SPITE, MOVE_NIGHT_SHADE, MOVE_NONE} } }; @@ -211,49 +211,49 @@ static const struct PyramidWildMon sLevel50WildMons_Round5[] = { .species = SPECIES_HAUNTER, .lvl = 41, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_NIGHT_SHADE, MOVE_THUNDERBOLT, MOVE_SLUDGE_BOMB, MOVE_NONE} }, { .species = SPECIES_CHIMECHO, .lvl = 41, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_DOUBLE_EDGE, MOVE_TOXIC, MOVE_PSYCHIC, MOVE_PROTECT} }, { .species = SPECIES_SOLROCK, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_ROCK_SLIDE, MOVE_FIRE_BLAST, MOVE_TOXIC} }, { .species = SPECIES_MISDREAVUS, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PSYCHIC, MOVE_SPITE, MOVE_SHADOW_BALL, MOVE_PAIN_SPLIT} }, { .species = SPECIES_CLAYDOL, .lvl = 44, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_ANCIENT_POWER, MOVE_SELF_DESTRUCT, MOVE_PSYCHIC} }, { .species = SPECIES_WEEZING, .lvl = 44, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SLUDGE_BOMB, MOVE_SELF_DESTRUCT, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_FLYGON, .lvl = 45, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_CRUNCH, MOVE_DRAGON_CLAW, MOVE_DRAGON_BREATH} }, { .species = SPECIES_GENGAR, .lvl = 45, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDERBOLT, MOVE_PSYCHIC, MOVE_GIGA_DRAIN, MOVE_NIGHT_SHADE} } }; @@ -263,49 +263,49 @@ static const struct PyramidWildMon sLevel50WildMons_Round6[] = { .species = SPECIES_DIGLETT, .lvl = 41, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ROCK_SLIDE, MOVE_SLASH, MOVE_DIG, MOVE_NONE} }, { .species = SPECIES_TRAPINCH, .lvl = 41, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ROCK_SLIDE, MOVE_EARTHQUAKE, MOVE_GIGA_DRAIN, MOVE_NONE} }, { .species = SPECIES_WYNAUT, .lvl = 42, - .abilityBit = 0, + .abilityNum = 0, .moves = {MOVE_DESTINY_BOND, MOVE_SPLASH, MOVE_COUNTER, MOVE_MIRROR_COAT} }, { .species = SPECIES_DIGLETT, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_ROCK_SLIDE, MOVE_MAGNITUDE, MOVE_TOXIC} }, { .species = SPECIES_TRAPINCH, .lvl = 44, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ROCK_SLIDE, MOVE_EARTHQUAKE, MOVE_GIGA_DRAIN, MOVE_PROTECT} }, { .species = SPECIES_WYNAUT, .lvl = 44, - .abilityBit = 0, + .abilityNum = 0, .moves = {MOVE_COUNTER, MOVE_MIRROR_COAT, MOVE_DESTINY_BOND, MOVE_NONE} }, { .species = SPECIES_WOBBUFFET, .lvl = 45, - .abilityBit = 0, + .abilityNum = 0, .moves = {MOVE_COUNTER, MOVE_MIRROR_COAT, MOVE_DESTINY_BOND, MOVE_NONE} }, { .species = SPECIES_DUGTRIO, .lvl = 45, - .abilityBit = 1, + .abilityNum = 1, .moves = {MOVE_ROCK_SLIDE, MOVE_SLUDGE_BOMB, MOVE_EARTHQUAKE, MOVE_PROTECT} } }; @@ -315,49 +315,49 @@ static const struct PyramidWildMon sLevel50WildMons_Round7[] = { .species = SPECIES_GLALIE, .lvl = 41, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ICE_BEAM, MOVE_CRUNCH, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_SNEASEL, .lvl = 41, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ICE_BEAM, MOVE_CRUSH_CLAW, MOVE_SPITE, MOVE_NONE} }, { .species = SPECIES_DEWGONG, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_BLIZZARD, MOVE_DOUBLE_EDGE, MOVE_SURF, MOVE_NONE} }, { .species = SPECIES_PILOSWINE, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ICE_BEAM, MOVE_EARTHQUAKE, MOVE_TOXIC, MOVE_NONE} }, { .species = SPECIES_JYNX, .lvl = 44, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_BLIZZARD, MOVE_LOVELY_KISS, MOVE_PSYCHIC, MOVE_NONE} }, { .species = SPECIES_CLOYSTER, .lvl = 44, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ICE_BEAM, MOVE_SURF, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_WALREIN, .lvl = 45, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_BLIZZARD, MOVE_BODY_SLAM, MOVE_SURF, MOVE_NONE} }, { .species = SPECIES_LAPRAS, .lvl = 45, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SING, MOVE_BODY_SLAM, MOVE_ICE_BEAM, MOVE_PSYCHIC} } }; @@ -367,49 +367,49 @@ static const struct PyramidWildMon sLevel50WildMons_Round8[] = { .species = SPECIES_WEEZING, .lvl = 41, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SELF_DESTRUCT, MOVE_SLUDGE_BOMB, MOVE_FIRE_BLAST, MOVE_NONE} }, { .species = SPECIES_ELECTRODE, .lvl = 41, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SELF_DESTRUCT, MOVE_THUNDERBOLT, MOVE_ROLLOUT, MOVE_NONE} }, { .species = SPECIES_GENGAR, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_DESTINY_BOND, MOVE_LICK, MOVE_SHADOW_BALL, MOVE_NONE} }, { .species = SPECIES_GOLEM, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SELF_DESTRUCT, MOVE_PROTECT, MOVE_EARTHQUAKE, MOVE_NONE} }, { .species = SPECIES_PINECO, .lvl = 44, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EXPLOSION, MOVE_DOUBLE_EDGE, MOVE_GIGA_DRAIN, MOVE_NONE} }, { .species = SPECIES_SOLROCK, .lvl = 44, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EXPLOSION, MOVE_FIRE_SPIN, MOVE_PSYWAVE, MOVE_NONE} }, { .species = SPECIES_FORRETRESS, .lvl = 45, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EXPLOSION, MOVE_TOXIC, MOVE_ROCK_SLIDE, MOVE_NONE} }, { .species = SPECIES_SHIFTRY, .lvl = 45, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EXPLOSION, MOVE_GIGA_DRAIN, MOVE_SOLAR_BEAM, MOVE_PROTECT} } }; @@ -419,49 +419,49 @@ static const struct PyramidWildMon sLevel50WildMons_Round9[] = { .species = SPECIES_WOBBUFFET, .lvl = 41, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_COUNTER, MOVE_MIRROR_COAT, MOVE_SAFEGUARD, MOVE_DESTINY_BOND} }, { .species = SPECIES_METANG, .lvl = 41, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_TOXIC, MOVE_SLUDGE_BOMB, MOVE_PSYCHIC} }, { .species = SPECIES_EXEGGUTOR, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EGG_BOMB, MOVE_PSYCHIC, MOVE_HYPNOSIS, MOVE_NONE} }, { .species = SPECIES_SLOWKING, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SHADOW_BALL, MOVE_SURF, MOVE_ICE_BEAM, MOVE_FLAMETHROWER} }, { .species = SPECIES_XATU, .lvl = 44, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_CONFUSE_RAY, MOVE_SHADOW_BALL, MOVE_PSYCHIC, MOVE_STEEL_WING} }, { .species = SPECIES_ALAKAZAM, .lvl = 44, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PSYCHIC, MOVE_FIRE_PUNCH, MOVE_ICE_PUNCH, MOVE_TOXIC} }, { .species = SPECIES_STARMIE, .lvl = 45, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PSYCHIC, MOVE_THUNDERBOLT, MOVE_SURF, MOVE_ICE_BEAM} }, { .species = SPECIES_ESPEON, .lvl = 45, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PSYCHIC, MOVE_DIG, MOVE_SHADOW_BALL, MOVE_NONE} } }; @@ -471,49 +471,49 @@ static const struct PyramidWildMon sLevel50WildMons_Round10[] = { .species = SPECIES_GOLEM, .lvl = 41, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SELF_DESTRUCT, MOVE_EARTHQUAKE, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_STEELIX, .lvl = 41, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_IRON_TAIL, MOVE_CRUNCH, MOVE_EARTHQUAKE, MOVE_NONE} }, { .species = SPECIES_OMASTAR, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SURF, MOVE_MUD_SHOT, MOVE_ANCIENT_POWER, MOVE_NONE} }, { .species = SPECIES_LUNATONE, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HYPNOSIS, MOVE_PSYWAVE, MOVE_EXPLOSION, MOVE_NONE} }, { .species = SPECIES_SHUCKLE, .lvl = 44, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_TOXIC, MOVE_PROTECT, MOVE_WRAP, MOVE_NONE} }, { .species = SPECIES_ARMALDO, .lvl = 44, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ANCIENT_POWER, MOVE_PROTECT, MOVE_AERIAL_ACE, MOVE_NONE} }, { .species = SPECIES_CRADILY, .lvl = 45, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SLUDGE_BOMB, MOVE_GIGA_DRAIN, MOVE_CONFUSE_RAY, MOVE_NONE} }, { .species = SPECIES_AERODACTYL, .lvl = 45, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HYPER_BEAM, MOVE_ROCK_SLIDE, MOVE_BITE, MOVE_NONE} } }; @@ -523,49 +523,49 @@ static const struct PyramidWildMon sLevel50WildMons_Round11[] = { .species = SPECIES_POLIWRATH, .lvl = 41, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SUBMISSION, MOVE_FOCUS_PUNCH, MOVE_SURF, MOVE_NONE} }, { .species = SPECIES_HARIYAMA, .lvl = 41, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_FAKE_OUT, MOVE_SURF, MOVE_FOCUS_PUNCH, MOVE_NONE} }, { .species = SPECIES_BRELOOM, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SPORE, MOVE_FOCUS_PUNCH, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_MEDICHAM, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDER_PUNCH, MOVE_FIRE_PUNCH, MOVE_ICE_PUNCH, MOVE_FOCUS_PUNCH} }, { .species = SPECIES_HITMONCHAN, .lvl = 44, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDER_PUNCH, MOVE_FIRE_PUNCH, MOVE_ICE_PUNCH, MOVE_FOCUS_PUNCH} }, { .species = SPECIES_HITMONLEE, .lvl = 44, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_MEGA_KICK, MOVE_FOCUS_PUNCH, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_HERACROSS, .lvl = 45, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_MEGAHORN, MOVE_EARTHQUAKE, MOVE_FOCUS_PUNCH, MOVE_ROCK_SLIDE} }, { .species = SPECIES_MACHAMP, .lvl = 50, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ROCK_SLIDE, MOVE_EARTHQUAKE, MOVE_FOCUS_PUNCH, MOVE_SEISMIC_TOSS} } }; @@ -575,49 +575,49 @@ static const struct PyramidWildMon sLevel50WildMons_Round12[] = { .species = SPECIES_QUAGSIRE, .lvl = 41, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_RAIN_DANCE, MOVE_SURF, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_TROPIUS, .lvl = 41, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SUNNY_DAY, MOVE_SOLAR_BEAM, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_PUPITAR, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SANDSTORM, MOVE_EARTHQUAKE, MOVE_ROCK_SLIDE, MOVE_NONE} }, { .species = SPECIES_LAPRAS, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HAIL, MOVE_ICE_BEAM, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_CACTURNE, .lvl = 44, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SANDSTORM, MOVE_GIGA_DRAIN, MOVE_SOLAR_BEAM, MOVE_NONE} }, { .species = SPECIES_FLAREON, .lvl = 44, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SUNNY_DAY, MOVE_FLAMETHROWER, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_WALREIN, .lvl = 45, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HAIL, MOVE_ICE_BEAM, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_GYARADOS, .lvl = 50, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_RAIN_DANCE, MOVE_THUNDER, MOVE_HYDRO_PUMP, MOVE_NONE} } }; @@ -627,49 +627,49 @@ static const struct PyramidWildMon sLevel50WildMons_Round13[] = { .species = SPECIES_PINECO, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EXPLOSION, MOVE_TAKE_DOWN, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_SHUCKLE, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_TOXIC, MOVE_EARTHQUAKE, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_VENOMOTH, .lvl = 46, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SILVER_WIND, MOVE_POISON_POWDER, MOVE_SLEEP_POWDER, MOVE_PSYCHIC} }, { .species = SPECIES_SCIZOR, .lvl = 46, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_QUICK_ATTACK, MOVE_METAL_CLAW, MOVE_FURY_CUTTER, MOVE_PURSUIT} }, { .species = SPECIES_HERACROSS, .lvl = 48, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_MEGAHORN, MOVE_BRICK_BREAK, MOVE_EARTHQUAKE, MOVE_ROCK_SLIDE} }, { .species = SPECIES_FORRETRESS, .lvl = 48, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EXPLOSION, MOVE_EARTHQUAKE, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_ARMALDO, .lvl = 50, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_WATER_PULSE, MOVE_PROTECT, MOVE_ROCK_SLIDE, MOVE_NONE} }, { .species = SPECIES_SHEDINJA, .lvl = 50, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SHADOW_BALL, MOVE_TOXIC, MOVE_SPITE, MOVE_GRUDGE} } }; @@ -679,49 +679,49 @@ static const struct PyramidWildMon sLevel50WildMons_Round14[] = { .species = SPECIES_SABLEYE, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_NIGHT_SHADE, MOVE_PSYCHIC, MOVE_AERIAL_ACE, MOVE_NONE} }, { .species = SPECIES_SNEASEL, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ICE_BEAM, MOVE_TAUNT, MOVE_FAINT_ATTACK, MOVE_QUICK_ATTACK} }, { .species = SPECIES_CRAWDAUNT, .lvl = 46, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_CRABHAMMER, MOVE_ICE_BEAM, MOVE_SURF, MOVE_NONE} }, { .species = SPECIES_SHIFTRY, .lvl = 46, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EXPLOSION, MOVE_SHADOW_BALL, MOVE_AERIAL_ACE, MOVE_GIGA_DRAIN} }, { .species = SPECIES_CACTURNE, .lvl = 48, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_TOXIC, MOVE_GIGA_DRAIN, MOVE_NEEDLE_ARM, MOVE_NONE} }, { .species = SPECIES_ABSOL, .lvl = 48, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_BITE, MOVE_PROTECT, MOVE_SLASH, MOVE_NONE} }, { .species = SPECIES_HOUNDOOM, .lvl = 50, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_OVERHEAT, MOVE_CRUNCH, MOVE_SHADOW_BALL, MOVE_PROTECT} }, { .species = SPECIES_UMBREON, .lvl = 50, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PSYCHIC, MOVE_SHADOW_BALL, MOVE_IRON_TAIL, MOVE_QUICK_ATTACK} } }; @@ -731,49 +731,49 @@ static const struct PyramidWildMon sLevel50WildMons_Round15[] = { .species = SPECIES_OCTILLERY, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_OCTAZOOKA, MOVE_ICE_BEAM, MOVE_FIRE_BLAST, MOVE_NONE} }, { .species = SPECIES_DEWGONG, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_WATER_PULSE, MOVE_ICE_BEAM, MOVE_HEADBUTT, MOVE_NONE} }, { .species = SPECIES_PELIPPER, .lvl = 46, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PROTECT, MOVE_SUPERSONIC, MOVE_SURF, MOVE_NONE} }, { .species = SPECIES_QUAGSIRE, .lvl = 46, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_ROCK_TOMB, MOVE_SURF, MOVE_NONE} }, { .species = SPECIES_LUDICOLO, .lvl = 48, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PROTECT, MOVE_SOLAR_BEAM, MOVE_TOXIC, MOVE_ICE_BEAM} }, { .species = SPECIES_SLOWKING, .lvl = 48, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PSYCHIC, MOVE_HEADBUTT, MOVE_SWAGGER, MOVE_NONE} }, { .species = SPECIES_STARMIE, .lvl = 50, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_WATER_PULSE, MOVE_THUNDERBOLT, MOVE_CONFUSE_RAY, MOVE_BLIZZARD} }, { .species = SPECIES_BLASTOISE, .lvl = 50, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HYDRO_PUMP, MOVE_BITE, MOVE_ICE_BEAM, MOVE_NONE} } }; @@ -783,49 +783,49 @@ static const struct PyramidWildMon sLevel50WildMons_Round16[] = { .species = SPECIES_DUSKULL, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_NIGHT_SHADE, MOVE_WILL_O_WISP, MOVE_SHADOW_BALL, MOVE_PROTECT} }, { .species = SPECIES_HAUNTER, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_TOXIC, MOVE_SPITE, MOVE_HYPNOSIS, MOVE_SHADOW_BALL} }, { .species = SPECIES_BANETTE, .lvl = 46, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SHADOW_BALL, MOVE_SPITE, MOVE_WILL_O_WISP, MOVE_NONE} }, { .species = SPECIES_MISDREAVUS, .lvl = 46, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PERISH_SONG, MOVE_SPITE, MOVE_MEAN_LOOK, MOVE_NONE} }, { .species = SPECIES_SABLEYE, .lvl = 48, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SHADOW_BALL, MOVE_MEAN_LOOK, MOVE_DIG, MOVE_NIGHT_SHADE} }, { .species = SPECIES_DUSCLOPS, .lvl = 48, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_WILL_O_WISP, MOVE_TOXIC, MOVE_SHADOW_BALL, MOVE_NONE} }, { .species = SPECIES_SHEDINJA, .lvl = 50, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SHADOW_BALL, MOVE_SPITE, MOVE_GRUDGE, MOVE_PROTECT} }, { .species = SPECIES_GENGAR, .lvl = 50, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PSYCHIC, MOVE_DESTINY_BOND, MOVE_SPITE, MOVE_NIGHT_SHADE} } }; @@ -835,49 +835,49 @@ static const struct PyramidWildMon sLevel50WildMons_Round17[] = { .species = SPECIES_MAWILE, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_CRUNCH, MOVE_TOXIC, MOVE_ICE_BEAM, MOVE_NONE} }, { .species = SPECIES_MAGNETON, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDERBOLT, MOVE_THUNDER_WAVE, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_STEELIX, .lvl = 46, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ROCK_THROW, MOVE_DOUBLE_EDGE, MOVE_EARTHQUAKE, MOVE_NONE} }, { .species = SPECIES_SCIZOR, .lvl = 46, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_METAL_CLAW, MOVE_SLASH, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_FORRETRESS, .lvl = 48, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EXPLOSION, MOVE_TOXIC, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_SKARMORY, .lvl = 48, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_STEEL_WING, MOVE_TOXIC, MOVE_FLY, MOVE_PROTECT} }, { .species = SPECIES_AGGRON, .lvl = 50, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_TAKE_DOWN, MOVE_SURF, MOVE_ICE_BEAM} }, { .species = SPECIES_METAGROSS, .lvl = 50, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_PSYCHIC, MOVE_SHADOW_BALL, MOVE_BRICK_BREAK} } }; @@ -887,49 +887,49 @@ static const struct PyramidWildMon sLevel50WildMons_Round18[] = { .species = SPECIES_DRAGONAIR, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDER_WAVE, MOVE_TOXIC, MOVE_ICE_BEAM, MOVE_NONE} }, { .species = SPECIES_VIBRAVA, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_DRAGON_BREATH, MOVE_CRUNCH, MOVE_STEEL_WING} }, { .species = SPECIES_ALTARIA, .lvl = 46, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_DRAGON_CLAW, MOVE_SING, MOVE_PROTECT} }, { .species = SPECIES_FLYGON, .lvl = 46, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_DRAGON_CLAW, MOVE_FIRE_BLAST, MOVE_NONE} }, { .species = SPECIES_AERODACTYL, .lvl = 48, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_ROCK_SLIDE, MOVE_DRAGON_CLAW, MOVE_NONE} }, { .species = SPECIES_GYARADOS, .lvl = 48, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_SURF, MOVE_THRASH, MOVE_BITE} }, { .species = SPECIES_KINGDRA, .lvl = 50, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HYDRO_PUMP, MOVE_ICE_BEAM, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_CHARIZARD, .lvl = 50, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_FLAMETHROWER, MOVE_FOCUS_PUNCH, MOVE_FIRE_BLAST, MOVE_IRON_TAIL} } }; @@ -939,49 +939,49 @@ static const struct PyramidWildMon sLevel50WildMons_Round19[] = { .species = SPECIES_ARCANINE, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_FIRE_BLAST, MOVE_TAKE_DOWN, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_POLIWRATH, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HYDRO_PUMP, MOVE_ICE_BEAM, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_RAICHU, .lvl = 46, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDER, MOVE_THUNDER_WAVE, MOVE_SLAM, MOVE_NONE} }, { .species = SPECIES_VAPOREON, .lvl = 46, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SURF, MOVE_ICE_BEAM, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_JOLTEON, .lvl = 48, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDERBOLT, MOVE_PIN_MISSILE, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_FLAREON, .lvl = 48, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_FLAMETHROWER, MOVE_BITE, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_NINETALES, .lvl = 50, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_FLAMETHROWER, MOVE_WILL_O_WISP, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_STARMIE, .lvl = 50, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ICE_BEAM, MOVE_SURF, MOVE_THUNDERBOLT, MOVE_PSYCHIC} } }; @@ -991,49 +991,49 @@ static const struct PyramidWildMon sLevel50WildMons_Round20[] = { .species = SPECIES_KANGASKHAN, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HYPER_BEAM, MOVE_FLAMETHROWER, MOVE_SURF, MOVE_DIZZY_PUNCH} }, { .species = SPECIES_SWELLOW, .lvl = 42, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_AERIAL_ACE, MOVE_HYPER_BEAM, MOVE_TOXIC, MOVE_NONE} }, { .species = SPECIES_URSARING, .lvl = 46, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HYPER_BEAM, MOVE_EARTHQUAKE, MOVE_FOCUS_PUNCH, MOVE_PROTECT} }, { .species = SPECIES_PORYGON2, .lvl = 46, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PSYBEAM, MOVE_HYPER_BEAM, MOVE_SHADOW_BALL, MOVE_ICE_BEAM} }, { .species = SPECIES_TAUROS, .lvl = 48, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_HYPER_BEAM, MOVE_SURF, MOVE_THUNDERBOLT} }, { .species = SPECIES_FEAROW, .lvl = 48, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HYPER_BEAM, MOVE_FLY, MOVE_MIRROR_MOVE, MOVE_PROTECT} }, { .species = SPECIES_SNORLAX, .lvl = 50, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HYPER_BEAM, MOVE_BODY_SLAM, MOVE_SHADOW_BALL, MOVE_EARTHQUAKE} }, { .species = SPECIES_SLAKING, .lvl = 50, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HYPER_BEAM, MOVE_EARTHQUAKE, MOVE_SHADOW_BALL, MOVE_ICE_BEAM} } }; diff --git a/src/data/battle_frontier/battle_pyramid_open_level_wild_mons.h b/src/data/battle_frontier/battle_pyramid_open_level_wild_mons.h index 10435d767..8738b0de6 100644 --- a/src/data/battle_frontier/battle_pyramid_open_level_wild_mons.h +++ b/src/data/battle_frontier/battle_pyramid_open_level_wild_mons.h @@ -3,49 +3,49 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round1[] = { .species = SPECIES_PLUSLE, .lvl = 15, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDER_WAVE, MOVE_SPARK, MOVE_ENCORE, MOVE_NONE} }, { .species = SPECIES_MINUN, .lvl = 15, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDER_WAVE, MOVE_THUNDERBOLT, MOVE_QUICK_ATTACK, MOVE_NONE} }, { .species = SPECIES_PIKACHU, .lvl = 13, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDER_WAVE, MOVE_THUNDERBOLT, MOVE_SLAM, MOVE_NONE} }, { .species = SPECIES_ELECTABUZZ, .lvl = 13, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDER_PUNCH, MOVE_SWIFT, MOVE_SCREECH, MOVE_NONE} }, { .species = SPECIES_VILEPLUME, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_STUN_SPORE, MOVE_GIGA_DRAIN, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_MANECTRIC, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDER_WAVE, MOVE_THUNDER, MOVE_QUICK_ATTACK, MOVE_NONE} }, { .species = SPECIES_BRELOOM, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_STUN_SPORE, MOVE_FOCUS_PUNCH, MOVE_GIGA_DRAIN, MOVE_MACH_PUNCH} }, { .species = SPECIES_JOLTEON, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDER_WAVE, MOVE_THUNDER, MOVE_PIN_MISSILE, MOVE_QUICK_ATTACK} } }; @@ -55,49 +55,49 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round2[] = { .species = SPECIES_GULPIN, .lvl = 14, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_TOXIC, MOVE_SLUDGE, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_ROSELIA, .lvl = 14, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_TOXIC, MOVE_GIGA_DRAIN, MOVE_MAGICAL_LEAF, MOVE_PETAL_DANCE} }, { .species = SPECIES_BUTTERFREE, .lvl = 12, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_POISON_POWDER, MOVE_GUST, MOVE_PSYBEAM, MOVE_NONE} }, { .species = SPECIES_SEVIPER, .lvl = 12, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_POISON_FANG, MOVE_SWAGGER, MOVE_CRUNCH, MOVE_POISON_TAIL} }, { .species = SPECIES_SKARMORY, .lvl = 7, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_TOXIC, MOVE_FLY, MOVE_STEEL_WING, MOVE_NONE} }, { .species = SPECIES_LUDICOLO, .lvl = 7, - .abilityBit = 1, + .abilityNum = 1, .moves = {MOVE_TOXIC, MOVE_PROTECT, MOVE_DIVE, MOVE_RAIN_DANCE} }, { .species = SPECIES_CROBAT, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_TOXIC, MOVE_CONFUSE_RAY, MOVE_MEAN_LOOK, MOVE_BITE} }, { .species = SPECIES_GENGAR, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_TOXIC, MOVE_SHADOW_PUNCH, MOVE_NIGHT_SHADE, MOVE_NONE} } }; @@ -107,49 +107,49 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round3[] = { .species = SPECIES_GROWLITHE, .lvl = 13, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_FLAME_WHEEL, MOVE_TAKE_DOWN, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_VULPIX, .lvl = 13, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_WILL_O_WISP, MOVE_FLAMETHROWER, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_MAGCARGO, .lvl = 11, - .abilityBit = 1, + .abilityNum = 1, .moves = {MOVE_FLAMETHROWER, MOVE_ROCK_SLIDE, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_NINETALES, .lvl = 11, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_WILL_O_WISP, MOVE_QUICK_ATTACK, MOVE_FLAMETHROWER, MOVE_NONE} }, { .species = SPECIES_MEDICHAM, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_FIRE_PUNCH, MOVE_HI_JUMP_KICK, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_WEEZING, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_WILL_O_WISP, MOVE_FLAMETHROWER, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_DUSCLOPS, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_WILL_O_WISP, MOVE_CONFUSE_RAY, MOVE_MEAN_LOOK, MOVE_SHADOW_PUNCH} }, { .species = SPECIES_HOUNDOOM, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_FLAMETHROWER, MOVE_BITE, MOVE_SOLAR_BEAM, MOVE_OVERHEAT} } }; @@ -159,49 +159,49 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round4[] = { .species = SPECIES_DUNSPARCE, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SPITE, MOVE_TOXIC, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_BANETTE, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_GRUDGE, MOVE_WILL_O_WISP, MOVE_NIGHT_SHADE, MOVE_NONE} }, { .species = SPECIES_MISDREAVUS, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_GRUDGE, MOVE_SPITE, MOVE_SHADOW_BALL, MOVE_NONE} }, { .species = SPECIES_NINETALES, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_GRUDGE, MOVE_WILL_O_WISP, MOVE_OVERHEAT, MOVE_NONE} }, { .species = SPECIES_ABSOL, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_BITE, MOVE_AERIAL_ACE, MOVE_SHADOW_BALL, MOVE_PROTECT} }, { .species = SPECIES_DUSCLOPS, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_WILL_O_WISP, MOVE_PROTECT, MOVE_TOXIC, MOVE_SHADOW_BALL} }, { .species = SPECIES_SHEDINJA, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_GRUDGE, MOVE_TOXIC, MOVE_SPITE, MOVE_NONE} }, { .species = SPECIES_GENGAR, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_GRUDGE, MOVE_SPITE, MOVE_NIGHT_SHADE, MOVE_NONE} } }; @@ -211,49 +211,49 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round5[] = { .species = SPECIES_HAUNTER, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_NIGHT_SHADE, MOVE_THUNDERBOLT, MOVE_SLUDGE_BOMB, MOVE_NONE} }, { .species = SPECIES_CHIMECHO, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_DOUBLE_EDGE, MOVE_TOXIC, MOVE_PSYCHIC, MOVE_PROTECT} }, { .species = SPECIES_SOLROCK, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_ROCK_SLIDE, MOVE_FIRE_BLAST, MOVE_TOXIC} }, { .species = SPECIES_MISDREAVUS, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PSYCHIC, MOVE_SPITE, MOVE_SHADOW_BALL, MOVE_PAIN_SPLIT} }, { .species = SPECIES_CLAYDOL, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_ANCIENT_POWER, MOVE_SELF_DESTRUCT, MOVE_PSYCHIC} }, { .species = SPECIES_WEEZING, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SLUDGE_BOMB, MOVE_SELF_DESTRUCT, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_FLYGON, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_CRUNCH, MOVE_DRAGON_CLAW, MOVE_DRAGON_BREATH} }, { .species = SPECIES_GENGAR, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDERBOLT, MOVE_PSYCHIC, MOVE_GIGA_DRAIN, MOVE_NIGHT_SHADE} } }; @@ -263,49 +263,49 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round6[] = { .species = SPECIES_DIGLETT, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ROCK_SLIDE, MOVE_SLASH, MOVE_DIG, MOVE_NONE} }, { .species = SPECIES_TRAPINCH, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ROCK_SLIDE, MOVE_EARTHQUAKE, MOVE_GIGA_DRAIN, MOVE_NONE} }, { .species = SPECIES_WYNAUT, .lvl = 8, - .abilityBit = 0, + .abilityNum = 0, .moves = {MOVE_DESTINY_BOND, MOVE_SPLASH, MOVE_COUNTER, MOVE_MIRROR_COAT} }, { .species = SPECIES_DIGLETT, .lvl = 8, - .abilityBit = 1, + .abilityNum = 1, .moves = {MOVE_EARTHQUAKE, MOVE_ROCK_SLIDE, MOVE_MAGNITUDE, MOVE_TOXIC} }, { .species = SPECIES_TRAPINCH, .lvl = 6, - .abilityBit = 1, + .abilityNum = 1, .moves = {MOVE_ROCK_SLIDE, MOVE_EARTHQUAKE, MOVE_GIGA_DRAIN, MOVE_PROTECT} }, { .species = SPECIES_WYNAUT, .lvl = 6, - .abilityBit = 0, + .abilityNum = 0, .moves = {MOVE_COUNTER, MOVE_MIRROR_COAT, MOVE_DESTINY_BOND, MOVE_NONE} }, { .species = SPECIES_WOBBUFFET, .lvl = 5, - .abilityBit = 0, + .abilityNum = 0, .moves = {MOVE_COUNTER, MOVE_MIRROR_COAT, MOVE_DESTINY_BOND, MOVE_NONE} }, { .species = SPECIES_DUGTRIO, .lvl = 5, - .abilityBit = 1, + .abilityNum = 1, .moves = {MOVE_ROCK_SLIDE, MOVE_SLUDGE_BOMB, MOVE_EARTHQUAKE, MOVE_PROTECT} } }; @@ -315,49 +315,49 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round7[] = { .species = SPECIES_GLALIE, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ICE_BEAM, MOVE_CRUNCH, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_SNEASEL, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ICE_BEAM, MOVE_CRUSH_CLAW, MOVE_SPITE, MOVE_NONE} }, { .species = SPECIES_DEWGONG, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_BLIZZARD, MOVE_DOUBLE_EDGE, MOVE_SURF, MOVE_NONE} }, { .species = SPECIES_PILOSWINE, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ICE_BEAM, MOVE_EARTHQUAKE, MOVE_TOXIC, MOVE_NONE} }, { .species = SPECIES_JYNX, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_BLIZZARD, MOVE_LOVELY_KISS, MOVE_PSYCHIC, MOVE_NONE} }, { .species = SPECIES_CLOYSTER, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ICE_BEAM, MOVE_SURF, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_WALREIN, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_BLIZZARD, MOVE_BODY_SLAM, MOVE_SURF, MOVE_NONE} }, { .species = SPECIES_LAPRAS, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SING, MOVE_BODY_SLAM, MOVE_ICE_BEAM, MOVE_PSYCHIC} } }; @@ -367,49 +367,49 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round8[] = { .species = SPECIES_WEEZING, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SELF_DESTRUCT, MOVE_SLUDGE_BOMB, MOVE_FIRE_BLAST, MOVE_NONE} }, { .species = SPECIES_ELECTRODE, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SELF_DESTRUCT, MOVE_THUNDERBOLT, MOVE_ROLLOUT, MOVE_NONE} }, { .species = SPECIES_GENGAR, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_DESTINY_BOND, MOVE_LICK, MOVE_SHADOW_BALL, MOVE_NONE} }, { .species = SPECIES_GOLEM, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SELF_DESTRUCT, MOVE_PROTECT, MOVE_EARTHQUAKE, MOVE_NONE} }, { .species = SPECIES_PINECO, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EXPLOSION, MOVE_DOUBLE_EDGE, MOVE_GIGA_DRAIN, MOVE_NONE} }, { .species = SPECIES_SOLROCK, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EXPLOSION, MOVE_FIRE_SPIN, MOVE_PSYWAVE, MOVE_NONE} }, { .species = SPECIES_FORRETRESS, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EXPLOSION, MOVE_TOXIC, MOVE_ROCK_SLIDE, MOVE_NONE} }, { .species = SPECIES_SHIFTRY, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EXPLOSION, MOVE_GIGA_DRAIN, MOVE_SOLAR_BEAM, MOVE_PROTECT} } }; @@ -419,49 +419,49 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round9[] = { .species = SPECIES_WOBBUFFET, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_COUNTER, MOVE_MIRROR_COAT, MOVE_SAFEGUARD, MOVE_DESTINY_BOND} }, { .species = SPECIES_METANG, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_TOXIC, MOVE_SLUDGE_BOMB, MOVE_PSYCHIC} }, { .species = SPECIES_EXEGGUTOR, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EGG_BOMB, MOVE_PSYCHIC, MOVE_HYPNOSIS, MOVE_NONE} }, { .species = SPECIES_SLOWKING, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SHADOW_BALL, MOVE_SURF, MOVE_ICE_BEAM, MOVE_FLAMETHROWER} }, { .species = SPECIES_XATU, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_CONFUSE_RAY, MOVE_SHADOW_BALL, MOVE_PSYCHIC, MOVE_STEEL_WING} }, { .species = SPECIES_ALAKAZAM, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PSYCHIC, MOVE_FIRE_PUNCH, MOVE_ICE_PUNCH, MOVE_TOXIC} }, { .species = SPECIES_STARMIE, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PSYCHIC, MOVE_THUNDERBOLT, MOVE_SURF, MOVE_ICE_BEAM} }, { .species = SPECIES_ESPEON, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PSYCHIC, MOVE_DIG, MOVE_SHADOW_BALL, MOVE_NONE} } }; @@ -471,49 +471,49 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round10[] = { .species = SPECIES_GOLEM, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SELF_DESTRUCT, MOVE_EARTHQUAKE, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_STEELIX, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_IRON_TAIL, MOVE_CRUNCH, MOVE_EARTHQUAKE, MOVE_NONE} }, { .species = SPECIES_OMASTAR, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SURF, MOVE_MUD_SHOT, MOVE_ANCIENT_POWER, MOVE_NONE} }, { .species = SPECIES_LUNATONE, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HYPNOSIS, MOVE_PSYWAVE, MOVE_EXPLOSION, MOVE_NONE} }, { .species = SPECIES_SHUCKLE, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_TOXIC, MOVE_PROTECT, MOVE_WRAP, MOVE_NONE} }, { .species = SPECIES_ARMALDO, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ANCIENT_POWER, MOVE_PROTECT, MOVE_AERIAL_ACE, MOVE_NONE} }, { .species = SPECIES_CRADILY, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SLUDGE_BOMB, MOVE_GIGA_DRAIN, MOVE_CONFUSE_RAY, MOVE_NONE} }, { .species = SPECIES_AERODACTYL, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HYPER_BEAM, MOVE_ROCK_SLIDE, MOVE_BITE, MOVE_NONE} } }; @@ -523,49 +523,49 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round11[] = { .species = SPECIES_POLIWRATH, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SUBMISSION, MOVE_FOCUS_PUNCH, MOVE_SURF, MOVE_NONE} }, { .species = SPECIES_HARIYAMA, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_FAKE_OUT, MOVE_SURF, MOVE_FOCUS_PUNCH, MOVE_NONE} }, { .species = SPECIES_BRELOOM, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SPORE, MOVE_FOCUS_PUNCH, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_MEDICHAM, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDER_PUNCH, MOVE_FIRE_PUNCH, MOVE_ICE_PUNCH, MOVE_FOCUS_PUNCH} }, { .species = SPECIES_HITMONCHAN, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDER_PUNCH, MOVE_FIRE_PUNCH, MOVE_ICE_PUNCH, MOVE_FOCUS_PUNCH} }, { .species = SPECIES_HITMONLEE, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_MEGA_KICK, MOVE_FOCUS_PUNCH, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_HERACROSS, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_MEGAHORN, MOVE_EARTHQUAKE, MOVE_FOCUS_PUNCH, MOVE_ROCK_SLIDE} }, { .species = SPECIES_MACHAMP, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ROCK_SLIDE, MOVE_EARTHQUAKE, MOVE_FOCUS_PUNCH, MOVE_SEISMIC_TOSS} } }; @@ -575,49 +575,49 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round12[] = { .species = SPECIES_QUAGSIRE, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_RAIN_DANCE, MOVE_SURF, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_TROPIUS, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SUNNY_DAY, MOVE_SOLAR_BEAM, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_PUPITAR, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SANDSTORM, MOVE_EARTHQUAKE, MOVE_ROCK_SLIDE, MOVE_NONE} }, { .species = SPECIES_LAPRAS, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HAIL, MOVE_ICE_BEAM, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_CACTURNE, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SANDSTORM, MOVE_GIGA_DRAIN, MOVE_SOLAR_BEAM, MOVE_NONE} }, { .species = SPECIES_FLAREON, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SUNNY_DAY, MOVE_FLAMETHROWER, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_WALREIN, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HAIL, MOVE_ICE_BEAM, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_GYARADOS, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_RAIN_DANCE, MOVE_THUNDER, MOVE_HYDRO_PUMP, MOVE_NONE} } }; @@ -627,49 +627,49 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round13[] = { .species = SPECIES_PINECO, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EXPLOSION, MOVE_TAKE_DOWN, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_SHUCKLE, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_TOXIC, MOVE_EARTHQUAKE, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_VENOMOTH, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SILVER_WIND, MOVE_POISON_POWDER, MOVE_SLEEP_POWDER, MOVE_PSYCHIC} }, { .species = SPECIES_SCIZOR, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_QUICK_ATTACK, MOVE_METAL_CLAW, MOVE_FURY_CUTTER, MOVE_PURSUIT} }, { .species = SPECIES_HERACROSS, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_MEGAHORN, MOVE_BRICK_BREAK, MOVE_EARTHQUAKE, MOVE_ROCK_SLIDE} }, { .species = SPECIES_FORRETRESS, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EXPLOSION, MOVE_EARTHQUAKE, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_ARMALDO, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_WATER_PULSE, MOVE_PROTECT, MOVE_ROCK_SLIDE, MOVE_NONE} }, { .species = SPECIES_SHEDINJA, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SHADOW_BALL, MOVE_TOXIC, MOVE_SPITE, MOVE_GRUDGE} } }; @@ -679,49 +679,49 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round14[] = { .species = SPECIES_SABLEYE, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_NIGHT_SHADE, MOVE_PSYCHIC, MOVE_AERIAL_ACE, MOVE_NONE} }, { .species = SPECIES_SNEASEL, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ICE_BEAM, MOVE_TAUNT, MOVE_FAINT_ATTACK, MOVE_QUICK_ATTACK} }, { .species = SPECIES_CRAWDAUNT, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_CRABHAMMER, MOVE_ICE_BEAM, MOVE_SURF, MOVE_NONE} }, { .species = SPECIES_SHIFTRY, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EXPLOSION, MOVE_SHADOW_BALL, MOVE_AERIAL_ACE, MOVE_GIGA_DRAIN} }, { .species = SPECIES_CACTURNE, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_TOXIC, MOVE_GIGA_DRAIN, MOVE_NEEDLE_ARM, MOVE_NONE} }, { .species = SPECIES_ABSOL, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_BITE, MOVE_PROTECT, MOVE_SLASH, MOVE_NONE} }, { .species = SPECIES_HOUNDOOM, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_OVERHEAT, MOVE_CRUNCH, MOVE_SHADOW_BALL, MOVE_PROTECT} }, { .species = SPECIES_UMBREON, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PSYCHIC, MOVE_SHADOW_BALL, MOVE_IRON_TAIL, MOVE_QUICK_ATTACK} } }; @@ -731,49 +731,49 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round15[] = { .species = SPECIES_OCTILLERY, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_OCTAZOOKA, MOVE_ICE_BEAM, MOVE_FIRE_BLAST, MOVE_NONE} }, { .species = SPECIES_DEWGONG, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_WATER_PULSE, MOVE_ICE_BEAM, MOVE_HEADBUTT, MOVE_NONE} }, { .species = SPECIES_PELIPPER, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PROTECT, MOVE_SUPERSONIC, MOVE_SURF, MOVE_NONE} }, { .species = SPECIES_QUAGSIRE, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_ROCK_TOMB, MOVE_SURF, MOVE_NONE} }, { .species = SPECIES_LUDICOLO, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PROTECT, MOVE_SOLAR_BEAM, MOVE_TOXIC, MOVE_ICE_BEAM} }, { .species = SPECIES_SLOWKING, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PSYCHIC, MOVE_HEADBUTT, MOVE_SWAGGER, MOVE_NONE} }, { .species = SPECIES_STARMIE, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_WATER_PULSE, MOVE_THUNDERBOLT, MOVE_CONFUSE_RAY, MOVE_BLIZZARD} }, { .species = SPECIES_BLASTOISE, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HYDRO_PUMP, MOVE_BITE, MOVE_ICE_BEAM, MOVE_NONE} } }; @@ -783,49 +783,49 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round16[] = { .species = SPECIES_DUSKULL, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_NIGHT_SHADE, MOVE_WILL_O_WISP, MOVE_SHADOW_BALL, MOVE_PROTECT} }, { .species = SPECIES_HAUNTER, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_TOXIC, MOVE_SPITE, MOVE_HYPNOSIS, MOVE_SHADOW_BALL} }, { .species = SPECIES_BANETTE, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SHADOW_BALL, MOVE_SPITE, MOVE_WILL_O_WISP, MOVE_NONE} }, { .species = SPECIES_MISDREAVUS, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PERISH_SONG, MOVE_SPITE, MOVE_MEAN_LOOK, MOVE_NONE} }, { .species = SPECIES_SABLEYE, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SHADOW_BALL, MOVE_MEAN_LOOK, MOVE_DIG, MOVE_NIGHT_SHADE} }, { .species = SPECIES_DUSCLOPS, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_WILL_O_WISP, MOVE_TOXIC, MOVE_SHADOW_BALL, MOVE_NONE} }, { .species = SPECIES_SHEDINJA, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SHADOW_BALL, MOVE_SPITE, MOVE_GRUDGE, MOVE_PROTECT} }, { .species = SPECIES_GENGAR, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PSYCHIC, MOVE_DESTINY_BOND, MOVE_SPITE, MOVE_NIGHT_SHADE} } }; @@ -835,49 +835,49 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round17[] = { .species = SPECIES_MAWILE, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_CRUNCH, MOVE_TOXIC, MOVE_ICE_BEAM, MOVE_NONE} }, { .species = SPECIES_MAGNETON, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDERBOLT, MOVE_THUNDER_WAVE, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_STEELIX, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ROCK_THROW, MOVE_DOUBLE_EDGE, MOVE_EARTHQUAKE, MOVE_NONE} }, { .species = SPECIES_SCIZOR, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_METAL_CLAW, MOVE_SLASH, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_FORRETRESS, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EXPLOSION, MOVE_TOXIC, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_SKARMORY, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_STEEL_WING, MOVE_TOXIC, MOVE_FLY, MOVE_PROTECT} }, { .species = SPECIES_AGGRON, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_TAKE_DOWN, MOVE_SURF, MOVE_ICE_BEAM} }, { .species = SPECIES_METAGROSS, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_PSYCHIC, MOVE_SHADOW_BALL, MOVE_BRICK_BREAK} } }; @@ -887,49 +887,49 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round18[] = { .species = SPECIES_DRAGONAIR, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDER_WAVE, MOVE_TOXIC, MOVE_ICE_BEAM, MOVE_NONE} }, { .species = SPECIES_VIBRAVA, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_DRAGON_BREATH, MOVE_CRUNCH, MOVE_STEEL_WING} }, { .species = SPECIES_ALTARIA, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_DRAGON_CLAW, MOVE_SING, MOVE_PROTECT} }, { .species = SPECIES_FLYGON, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_DRAGON_CLAW, MOVE_FIRE_BLAST, MOVE_NONE} }, { .species = SPECIES_AERODACTYL, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_ROCK_SLIDE, MOVE_DRAGON_CLAW, MOVE_NONE} }, { .species = SPECIES_GYARADOS, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_SURF, MOVE_THRASH, MOVE_BITE} }, { .species = SPECIES_KINGDRA, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HYDRO_PUMP, MOVE_ICE_BEAM, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_CHARIZARD, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_FLAMETHROWER, MOVE_FOCUS_PUNCH, MOVE_FIRE_BLAST, MOVE_IRON_TAIL} } }; @@ -939,49 +939,49 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round19[] = { .species = SPECIES_ARCANINE, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_FIRE_BLAST, MOVE_TAKE_DOWN, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_POLIWRATH, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HYDRO_PUMP, MOVE_ICE_BEAM, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_RAICHU, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDER, MOVE_THUNDER_WAVE, MOVE_SLAM, MOVE_NONE} }, { .species = SPECIES_VAPOREON, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_SURF, MOVE_ICE_BEAM, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_JOLTEON, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_THUNDERBOLT, MOVE_PIN_MISSILE, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_FLAREON, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_FLAMETHROWER, MOVE_BITE, MOVE_NONE, MOVE_NONE} }, { .species = SPECIES_NINETALES, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_FLAMETHROWER, MOVE_WILL_O_WISP, MOVE_PROTECT, MOVE_NONE} }, { .species = SPECIES_STARMIE, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_ICE_BEAM, MOVE_SURF, MOVE_THUNDERBOLT, MOVE_PSYCHIC} } }; @@ -991,49 +991,49 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round20[] = { .species = SPECIES_KANGASKHAN, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HYPER_BEAM, MOVE_FLAMETHROWER, MOVE_SURF, MOVE_DIZZY_PUNCH} }, { .species = SPECIES_SWELLOW, .lvl = 10, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_AERIAL_ACE, MOVE_HYPER_BEAM, MOVE_TOXIC, MOVE_NONE} }, { .species = SPECIES_URSARING, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HYPER_BEAM, MOVE_EARTHQUAKE, MOVE_FOCUS_PUNCH, MOVE_PROTECT} }, { .species = SPECIES_PORYGON2, .lvl = 8, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_PSYBEAM, MOVE_HYPER_BEAM, MOVE_SHADOW_BALL, MOVE_ICE_BEAM} }, { .species = SPECIES_TAUROS, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_EARTHQUAKE, MOVE_HYPER_BEAM, MOVE_SURF, MOVE_THUNDERBOLT} }, { .species = SPECIES_FEAROW, .lvl = 6, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HYPER_BEAM, MOVE_FLY, MOVE_MIRROR_MOVE, MOVE_PROTECT} }, { .species = SPECIES_SNORLAX, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HYPER_BEAM, MOVE_BODY_SLAM, MOVE_SHADOW_BALL, MOVE_EARTHQUAKE} }, { .species = SPECIES_SLAKING, .lvl = 5, - .abilityBit = 2, + .abilityNum = ABILITY_RANDOM, .moves = {MOVE_HYPER_BEAM, MOVE_EARTHQUAKE, MOVE_SHADOW_BALL, MOVE_ICE_BEAM} } }; diff --git a/src/data/battle_frontier/trainer_hill.h b/src/data/battle_frontier/trainer_hill.h index ca0d623e9..64d216e4b 100644 --- a/src/data/battle_frontier/trainer_hill.h +++ b/src/data/battle_frontier/trainer_hill.h @@ -45,7 +45,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 24, .spAttackIV = 24, .spDefenseIV = 24, - .altAbility = 0, + .abilityNum = 0, .personality = 0x0, .nickname = _("MISDREAVUS"), .friendship = 255, @@ -68,7 +68,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 24, .spAttackIV = 24, .spDefenseIV = 24, - .altAbility = 0, + .abilityNum = 0, .personality = 0xF, .nickname = _("SOLROCK"), .friendship = 255, @@ -90,7 +90,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 24, .spAttackIV = 24, .spDefenseIV = 24, - .altAbility = 0, + .abilityNum = 0, .personality = 0xC, .nickname = _("CLAYDOL"), .friendship = 255, @@ -112,7 +112,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 24, .spAttackIV = 24, .spDefenseIV = 24, - .altAbility = 0, + .abilityNum = 0, .personality = 0x80, .nickname = _("WEEZING"), .friendship = 0, @@ -135,7 +135,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 24, .spAttackIV = 24, .spDefenseIV = 24, - .altAbility = 0, + .abilityNum = 0, .personality = 0xF, .nickname = _("LUNATONE"), .friendship = 255, @@ -157,7 +157,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 24, .spAttackIV = 24, .spDefenseIV = 24, - .altAbility = 0, + .abilityNum = 0, .personality = 0x83, .nickname = _("FLYGON"), .friendship = 255, @@ -191,7 +191,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xF, .nickname = _("SEALEO"), .friendship = 255, @@ -212,7 +212,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xF, .nickname = _("AMPHAROS"), .friendship = 255, @@ -233,7 +233,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x4E, .nickname = _("MACHOKE"), .friendship = 255, @@ -254,7 +254,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x28, .nickname = _("FLAREON"), .friendship = 255, @@ -275,7 +275,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x0, .nickname = _("MAGNETON"), .friendship = 255, @@ -297,7 +297,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x85, .nickname = _("PINSIR"), .friendship = 255, @@ -345,7 +345,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 20, .spAttackIV = 20, .spDefenseIV = 20, - .altAbility = 0, + .abilityNum = 0, .personality = 0x80, .nickname = _("MEDITITE"), .friendship = 255, @@ -367,7 +367,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 20, .spAttackIV = 20, .spDefenseIV = 20, - .altAbility = 1, + .abilityNum = 1, .personality = 0x80, .nickname = _("HERACROSS"), .friendship = 255, @@ -389,7 +389,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 20, .spAttackIV = 20, .spDefenseIV = 20, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("HITMONTOP"), .friendship = 255, @@ -411,7 +411,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 20, .spAttackIV = 20, .spDefenseIV = 20, - .altAbility = 0, + .abilityNum = 0, .personality = 0x4E, .nickname = _("MACHOP"), .friendship = 255, @@ -433,7 +433,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 20, .spAttackIV = 20, .spDefenseIV = 20, - .altAbility = 0, + .abilityNum = 0, .personality = 0x80, .nickname = _("PINSIR"), .friendship = 255, @@ -455,7 +455,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 20, .spAttackIV = 20, .spDefenseIV = 20, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("HITMONCHAN"), .friendship = 255, @@ -490,7 +490,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xF, .nickname = _("VULPIX"), .friendship = 255, @@ -512,7 +512,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x8C, .nickname = _("MINUN"), .friendship = 255, @@ -534,7 +534,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 1, + .abilityNum = 1, .personality = 0xF, .nickname = _("ROSELIA"), .friendship = 255, @@ -556,7 +556,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x82, .nickname = _("MR. MIME"), .friendship = 255, @@ -578,7 +578,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x5, .nickname = _("PLUSLE"), .friendship = 255, @@ -600,7 +600,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 1, + .abilityNum = 1, .personality = 0x37, .nickname = _("TOGEPI"), .friendship = 255, @@ -648,7 +648,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x37, .nickname = _("VAPOREON"), .friendship = 0, @@ -670,7 +670,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 1, + .abilityNum = 1, .personality = 0x8A, .nickname = _("DODRIO"), .friendship = 0, @@ -692,7 +692,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x14, .nickname = _("OMASTAR"), .friendship = 255, @@ -714,7 +714,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x8, .nickname = _("LICKITUNG"), .friendship = 255, @@ -736,7 +736,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 1, + .abilityNum = 1, .personality = 0x94, .nickname = _("SLOWBRO"), .friendship = 0, @@ -758,7 +758,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x8, .nickname = _("LINOONE"), .friendship = 255, @@ -792,7 +792,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0xCB, .nickname = _("SKITTY"), .friendship = 255, @@ -814,7 +814,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xD, .nickname = _("MEDICHAM"), .friendship = 0, @@ -836,7 +836,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("STANTLER"), .friendship = 0, @@ -858,7 +858,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("NIDOQUEEN"), .friendship = 0, @@ -880,7 +880,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xD7, .nickname = _("NINETALES"), .friendship = 255, @@ -902,7 +902,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x28, .nickname = _("CHARIZARD"), .friendship = 255, @@ -949,7 +949,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0x41, .nickname = _("ALAKAZAM"), .friendship = 255, @@ -971,7 +971,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 1, + .abilityNum = 1, .personality = 0xF, .nickname = _("BLISSEY"), .friendship = 255, @@ -993,7 +993,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0x8C, .nickname = _("GRUMPIG"), .friendship = 255, @@ -1014,7 +1014,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 1, + .abilityNum = 1, .personality = 0xF, .nickname = _("GARDEVOIR"), .friendship = 255, @@ -1035,7 +1035,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0x80, .nickname = _("VENOMOTH"), .friendship = 255, @@ -1056,7 +1056,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0xF, .nickname = _("ESPEON"), .friendship = 255, @@ -1090,7 +1090,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("WEEZING"), .friendship = 255, @@ -1111,7 +1111,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x8C, .nickname = _("GLOOM"), .friendship = 255, @@ -1132,7 +1132,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("MUK"), .friendship = 255, @@ -1154,7 +1154,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x83, .nickname = _("TROPIUS"), .friendship = 255, @@ -1175,7 +1175,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x6, .nickname = _("BELLOSSOM"), .friendship = 255, @@ -1197,7 +1197,7 @@ static const struct TrHillTag sDataTagNormal = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x1F, .nickname = _("MEGANIUM"), .friendship = 255, @@ -1257,7 +1257,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 1, + .abilityNum = 1, .personality = 0x8A, .nickname = _("DELIBIRD"), .friendship = 255, @@ -1278,7 +1278,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xD, .nickname = _("CLEFAIRY"), .friendship = 255, @@ -1299,7 +1299,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xD, .nickname = _("PIKACHU"), .friendship = 255, @@ -1320,7 +1320,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 1, + .abilityNum = 1, .personality = 0x8A, .nickname = _("MARILL"), .friendship = 255, @@ -1341,7 +1341,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xD, .nickname = _("JIGGLYPUFF"), .friendship = 255, @@ -1362,7 +1362,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 1, + .abilityNum = 1, .personality = 0x26, .nickname = _("TOGETIC"), .friendship = 255, @@ -1396,7 +1396,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0xC1, .nickname = _("WIGGLYTUFF"), .friendship = 255, @@ -1417,7 +1417,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0x87, .nickname = _("SABLEYE"), .friendship = 255, @@ -1438,7 +1438,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0xA, .nickname = _("GRUMPIG"), .friendship = 255, @@ -1459,7 +1459,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0x12, .nickname = _("CORSOLA"), .friendship = 255, @@ -1480,7 +1480,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0xA, .nickname = _("CLAMPERL"), .friendship = 255, @@ -1501,7 +1501,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0xA, .nickname = _("STARMIE"), .friendship = 255, @@ -1552,7 +1552,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0x0, .nickname = _("JIGGLYPUFF"), .friendship = 255, @@ -1577,7 +1577,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0x0, .nickname = _("JYNX"), .friendship = 255, @@ -1602,7 +1602,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0x96, .nickname = _("EXPLOUD"), .friendship = 255, @@ -1627,7 +1627,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0x96, .nickname = _("ABSOL"), .friendship = 255, @@ -1652,7 +1652,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0x96, .nickname = _("PIDGEOTTO"), .friendship = 255, @@ -1677,7 +1677,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0x0, .nickname = _("ALTARIA"), .friendship = 255, @@ -1712,7 +1712,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0xD, .nickname = _("CHIMECHO"), .friendship = 255, @@ -1734,7 +1734,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0xD, .nickname = _("WHISMUR"), .friendship = 255, @@ -1756,7 +1756,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0x8A, .nickname = _("YANMA"), .friendship = 255, @@ -1778,7 +1778,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0xA, .nickname = _("ILLUMISE"), .friendship = 255, @@ -1800,7 +1800,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0xA, .nickname = _("SPHEAL"), .friendship = 255, @@ -1822,7 +1822,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0x87, .nickname = _("VIGOROTH"), .friendship = 255, @@ -1870,7 +1870,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x8C, .nickname = _("WOOPER"), .friendship = 255, @@ -1892,7 +1892,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 1, + .abilityNum = 1, .personality = 0x3, .nickname = _("POLIWAG"), .friendship = 255, @@ -1914,7 +1914,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("PSYDUCK"), .friendship = 255, @@ -1936,7 +1936,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x96, .nickname = _("RHYDON"), .friendship = 0, @@ -1958,7 +1958,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("RHYHORN"), .friendship = 0, @@ -1980,7 +1980,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 1, + .abilityNum = 1, .personality = 0x80, .nickname = _("CUBONE"), .friendship = 0, @@ -2015,7 +2015,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x8C, .nickname = _("MAGNEMITE"), .friendship = 255, @@ -2037,7 +2037,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x41, .nickname = _("ELECTABUZZ"), .friendship = 255, @@ -2058,7 +2058,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x0, .nickname = _("FLAAFFY"), .friendship = 255, @@ -2080,7 +2080,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("BALTOY"), .friendship = 0, @@ -2102,7 +2102,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("PINECO"), .friendship = 0, @@ -2124,7 +2124,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x80, .nickname = _("VOLTORB"), .friendship = 0, @@ -2171,7 +2171,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 31, .spAttackIV = 30, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x202, .nickname = _("UNOWN"), .friendship = 255, @@ -2192,7 +2192,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 30, .spAttackIV = 30, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x10001, .nickname = _("UNOWN"), .friendship = 255, @@ -2213,7 +2213,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 30, .spAttackIV = 30, .spDefenseIV = 30, - .altAbility = 0, + .abilityNum = 0, .personality = 0x102, .nickname = _("UNOWN"), .friendship = 255, @@ -2235,7 +2235,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x88FE980F, .nickname = _("SPINDA"), .friendship = 255, @@ -2256,7 +2256,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xF, .nickname = _("PLUSLE"), .friendship = 255, @@ -2277,7 +2277,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 1, + .abilityNum = 1, .personality = 0xF, .nickname = _("VOLBEAT"), .friendship = 255, @@ -2312,7 +2312,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xE2880098, .nickname = _("SPINDA"), .friendship = 255, @@ -2333,7 +2333,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x8C, .nickname = _("MINUN"), .friendship = 255, @@ -2354,7 +2354,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xF, .nickname = _("ILLUMISE"), .friendship = 255, @@ -2375,7 +2375,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 30, .spAttackIV = 30, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x302, .nickname = _("UNOWN"), .friendship = 255, @@ -2396,7 +2396,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 31, .spAttackIV = 30, .spDefenseIV = 30, - .altAbility = 0, + .abilityNum = 0, .personality = 0x203, .nickname = _("UNOWN"), .friendship = 255, @@ -2417,7 +2417,7 @@ static const struct TrHillTag sDataTagVariety = .speedIV = 30, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x301, .nickname = _("UNOWN"), .friendship = 255, @@ -2478,7 +2478,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x0, .nickname = _("SUNFLORA"), .friendship = 255, @@ -2499,7 +2499,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x91, .nickname = _("TANGELA"), .friendship = 255, @@ -2523,7 +2523,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x1F, .nickname = _("VENUSAUR"), .friendship = 255, @@ -2544,7 +2544,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xF, .nickname = _("LANTURN"), .friendship = 255, @@ -2565,7 +2565,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 1, + .abilityNum = 1, .personality = 0xF, .nickname = _("MANECTRIC"), .friendship = 255, @@ -2586,7 +2586,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xF, .nickname = _("RAIKOU"), .friendship = 255, @@ -2621,7 +2621,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x2F, .nickname = _("RELICANTH"), .friendship = 255, @@ -2642,7 +2642,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xF, .nickname = _("GOLDUCK"), .friendship = 255, @@ -2663,7 +2663,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x28, .nickname = _("BLASTOISE"), .friendship = 255, @@ -2684,7 +2684,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 1, + .abilityNum = 1, .personality = 0x93, .nickname = _("MAGCARGO"), .friendship = 255, @@ -2705,7 +2705,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 1, + .abilityNum = 1, .personality = 0xF, .nickname = _("RAPIDASH"), .friendship = 255, @@ -2726,7 +2726,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xF, .nickname = _("MOLTRES"), .friendship = 255, @@ -2774,7 +2774,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x8A, .nickname = _("SMEARGLE"), .friendship = 255, @@ -2796,7 +2796,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x87, .nickname = _("SMEARGLE"), .friendship = 255, @@ -2818,7 +2818,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xD, .nickname = _("SMEARGLE"), .friendship = 255, @@ -2840,7 +2840,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xA, .nickname = _("SMEARGLE"), .friendship = 255, @@ -2862,7 +2862,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xA, .nickname = _("SMEARGLE"), .friendship = 255, @@ -2884,7 +2884,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x8A, .nickname = _("SMEARGLE"), .friendship = 255, @@ -2919,7 +2919,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 1, + .abilityNum = 1, .personality = 0xA, .nickname = _("STARYU"), .friendship = 255, @@ -2941,7 +2941,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0xD, .nickname = _("MEOWTH"), .friendship = 255, @@ -2963,7 +2963,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0x28, .nickname = _("BLAZIKEN"), .friendship = 255, @@ -2985,7 +2985,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 1, + .abilityNum = 1, .personality = 0x16, .nickname = _("CUBONE"), .friendship = 255, @@ -3006,7 +3006,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 0, + .abilityNum = 0, .personality = 0x8A, .nickname = _("BEEDRILL"), .friendship = 255, @@ -3028,7 +3028,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 5, .spAttackIV = 5, .spDefenseIV = 5, - .altAbility = 1, + .abilityNum = 1, .personality = 0xD, .nickname = _("RATICATE"), .friendship = 255, @@ -3076,7 +3076,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 25, .spAttackIV = 25, .spDefenseIV = 25, - .altAbility = 0, + .abilityNum = 0, .personality = 0x32, .nickname = _("CHARMELEON"), .friendship = 100, @@ -3097,7 +3097,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 25, .spAttackIV = 25, .spDefenseIV = 25, - .altAbility = 0, + .abilityNum = 0, .personality = 0x0, .nickname = _("WARTORTLE"), .friendship = 100, @@ -3119,7 +3119,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 25, .spAttackIV = 25, .spDefenseIV = 25, - .altAbility = 0, + .abilityNum = 0, .personality = 0x0, .nickname = _("IVYSAUR"), .friendship = 100, @@ -3141,7 +3141,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 25, .spAttackIV = 25, .spDefenseIV = 25, - .altAbility = 0, + .abilityNum = 0, .personality = 0x32, .nickname = _("BAYLEEF"), .friendship = 100, @@ -3163,7 +3163,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 25, .spAttackIV = 25, .spDefenseIV = 25, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("CROCONAW"), .friendship = 100, @@ -3185,7 +3185,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x28, .nickname = _("QUILAVA"), .friendship = 100, @@ -3220,7 +3220,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x32, .nickname = _("SMOOCHUM"), .friendship = 50, @@ -3242,7 +3242,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0xC8, .nickname = _("AZURILL"), .friendship = 50, @@ -3264,7 +3264,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x0, .nickname = _("ELEKID"), .friendship = 50, @@ -3286,7 +3286,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x0, .nickname = _("CLEFFA"), .friendship = 50, @@ -3308,7 +3308,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x84, .nickname = _("WYNAUT"), .friendship = 50, @@ -3330,7 +3330,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0xF, .nickname = _("MAGBY"), .friendship = 50, @@ -3378,7 +3378,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x80, .nickname = _("SUDOWOODO"), .friendship = 255, @@ -3399,7 +3399,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 1, + .abilityNum = 1, .personality = 0x8C, .nickname = _("SLOWKING"), .friendship = 255, @@ -3420,7 +3420,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xF, .nickname = _("ENTEI"), .friendship = 255, @@ -3441,7 +3441,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("HITMONCHAN"), .friendship = 255, @@ -3462,7 +3462,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 1, + .abilityNum = 1, .personality = 0x6, .nickname = _("MANTINE"), .friendship = 255, @@ -3483,7 +3483,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x18, .nickname = _("ZAPDOS"), .friendship = 255, @@ -3517,7 +3517,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("HITMONLEE"), .friendship = 255, @@ -3538,7 +3538,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xF, .nickname = _("PORYGON2"), .friendship = 255, @@ -3559,7 +3559,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xF, .nickname = _("SUICUNE"), .friendship = 255, @@ -3580,7 +3580,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 1, + .abilityNum = 1, .personality = 0xF, .nickname = _("HOUNDOOM"), .friendship = 255, @@ -3601,7 +3601,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("STANTLER"), .friendship = 255, @@ -3622,7 +3622,7 @@ static const struct TrHillTag sDataTagUnique = .speedIV = 15, .spAttackIV = 15, .spDefenseIV = 15, - .altAbility = 0, + .abilityNum = 0, .personality = 0xF, .nickname = _("ARTICUNO"), .friendship = 255, @@ -3683,7 +3683,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x35, .nickname = _("SNORLAX"), .friendship = 255, @@ -3705,7 +3705,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("MILTANK"), .friendship = 255, @@ -3727,7 +3727,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x7F, .nickname = _("URSARING"), .friendship = 255, @@ -3749,7 +3749,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x80, .nickname = _("SLAKING"), .friendship = 255, @@ -3771,7 +3771,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("KANGASKHAN"), .friendship = 255, @@ -3793,7 +3793,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x80, .nickname = _("ZANGOOSE"), .friendship = 255, @@ -3828,7 +3828,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 1, + .abilityNum = 1, .personality = 0xF, .nickname = _("SLOWKING"), .friendship = 255, @@ -3850,7 +3850,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x28, .nickname = _("ESPEON"), .friendship = 255, @@ -3872,7 +3872,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 1, + .abilityNum = 1, .personality = 0xF, .nickname = _("STARMIE"), .friendship = 255, @@ -3894,7 +3894,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0xF, .nickname = _("GENGAR"), .friendship = 255, @@ -3916,7 +3916,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0xF, .nickname = _("GARDEVOIR"), .friendship = 255, @@ -3938,7 +3938,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0xF, .nickname = _("ALAKAZAM"), .friendship = 255, @@ -3986,7 +3986,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("SWELLOW"), .friendship = 255, @@ -4008,7 +4008,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("MACHAMP"), .friendship = 255, @@ -4030,7 +4030,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("URSARING"), .friendship = 255, @@ -4052,7 +4052,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x80, .nickname = _("KINGLER"), .friendship = 255, @@ -4074,7 +4074,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x80, .nickname = _("TYRANITAR"), .friendship = 255, @@ -4096,7 +4096,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x80, .nickname = _("DRAGONITE"), .friendship = 255, @@ -4131,7 +4131,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0xA, .nickname = _("JOLTEON"), .friendship = 255, @@ -4153,7 +4153,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0xA, .nickname = _("ALAKAZAM"), .friendship = 255, @@ -4175,7 +4175,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 1, + .abilityNum = 1, .personality = 0xA, .nickname = _("STARMIE"), .friendship = 255, @@ -4197,7 +4197,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x82, .nickname = _("DUSCLOPS"), .friendship = 255, @@ -4219,7 +4219,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0xD2, .nickname = _("NINETALES"), .friendship = 255, @@ -4241,7 +4241,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x85, .nickname = _("BANETTE"), .friendship = 255, @@ -4289,7 +4289,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x94, .nickname = _("WOBBUFFET"), .friendship = 255, @@ -4311,7 +4311,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x85, .nickname = _("EXPLOUD"), .friendship = 0, @@ -4333,7 +4333,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x0, .nickname = _("CROBAT"), .friendship = 255, @@ -4355,7 +4355,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 1, + .abilityNum = 1, .personality = 0xD, .nickname = _("DUGTRIO"), .friendship = 255, @@ -4377,7 +4377,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x5, .nickname = _("ELECTRODE"), .friendship = 0, @@ -4399,7 +4399,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x14, .nickname = _("GENGAR"), .friendship = 255, @@ -4434,7 +4434,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x82, .nickname = _("LAPRAS"), .friendship = 0, @@ -4456,7 +4456,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x8A, .nickname = _("ABSOL"), .friendship = 0, @@ -4478,7 +4478,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x0, .nickname = _("ALTARIA"), .friendship = 0, @@ -4500,7 +4500,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x14, .nickname = _("DEWGONG"), .friendship = 0, @@ -4522,7 +4522,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 1, + .abilityNum = 1, .personality = 0x14, .nickname = _("POLITOED"), .friendship = 0, @@ -4544,7 +4544,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 1, + .abilityNum = 1, .personality = 0x17, .nickname = _("MAROWAK"), .friendship = 0, @@ -4592,7 +4592,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("FORRETRESS"), .friendship = 255, @@ -4613,7 +4613,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 1, + .abilityNum = 1, .personality = 0xC, .nickname = _("ELECTRODE"), .friendship = 255, @@ -4634,7 +4634,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x7F, .nickname = _("EXEGGUTOR"), .friendship = 255, @@ -4656,7 +4656,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x93, .nickname = _("DUSCLOPS"), .friendship = 255, @@ -4677,7 +4677,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0xF, .nickname = _("NINETALES"), .friendship = 255, @@ -4698,7 +4698,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x96, .nickname = _("BANETTE"), .friendship = 255, @@ -4732,7 +4732,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x95, .nickname = _("SALAMENCE"), .friendship = 255, @@ -4753,7 +4753,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x8C, .nickname = _("GENGAR"), .friendship = 255, @@ -4774,7 +4774,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("GYARADOS"), .friendship = 255, @@ -4795,7 +4795,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x3, .nickname = _("GENGAR"), .friendship = 255, @@ -4817,7 +4817,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x14, .nickname = _("DUSCLOPS"), .friendship = 255, @@ -4839,7 +4839,7 @@ static const struct TrHillTag sDataTagExpert = .speedIV = 31, .spAttackIV = 31, .spDefenseIV = 31, - .altAbility = 0, + .abilityNum = 0, .personality = 0x85, .nickname = _("MISDREAVUS"), .friendship = 255, diff --git a/src/data/graphics/berries.h b/src/data/graphics/berries.h index 326bd1c5b..eb3f9f4dc 100644 --- a/src/data/graphics/berries.h +++ b/src/data/graphics/berries.h @@ -1,8 +1,8 @@ -const u32 gUnknown_08D9BB44[] = INCBIN_U32("graphics/interface/check_berry.4bpp.lz"); -const u32 gUnknown_08D9BEF0[] = INCBIN_U32("graphics/interface/check_berry.gbapal.lz"); +const u32 gBerryCheck_Gfx[] = INCBIN_U32("graphics/interface/check_berry.4bpp.lz"); +const u32 gBerryCheck_Pal[] = INCBIN_U32("graphics/interface/check_berry.gbapal.lz"); -const u32 gUnknown_08D9BF98[] = INCBIN_U32("graphics/interface/berry_tag.bin.lz"); -const u32 gUnknown_08D9C13C[] = INCBIN_U32("graphics/interface/berry_tag_title.bin.lz"); +const u32 gBerryTag_Gfx[] = INCBIN_U32("graphics/interface/berry_tag.bin.lz"); +const u32 gBerryTag_Pal[] = INCBIN_U32("graphics/interface/berry_tag_title.bin.lz"); const u32 gBerryCheckCircle_Gfx[] = INCBIN_U32("graphics/interface/check_berry_circle.4bpp.lz"); diff --git a/src/data/pokemon/base_stats.h b/src/data/pokemon/base_stats.h index 86ebb620b..17e677967 100644 --- a/src/data/pokemon/base_stats.h +++ b/src/data/pokemon/base_stats.h @@ -28,8 +28,7 @@ .growthRate = GROWTH_MEDIUM_FAST, \ .eggGroup1 = EGG_GROUP_UNDISCOVERED,\ .eggGroup2 = EGG_GROUP_UNDISCOVERED,\ - .ability1 = ABILITY_NONE, \ - .ability2 = ABILITY_NONE, \ + .abilities = {0, 0}, \ .safariZoneFleeRate = 0, \ .bodyColor = BODY_COLOR_BLACK, \ .noFlip = FALSE, \ @@ -65,8 +64,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_OVERGROW, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -98,8 +96,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_OVERGROW, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -131,8 +128,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_OVERGROW, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -164,8 +160,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_BLAZE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -197,8 +192,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_BLAZE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -230,8 +224,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_BLAZE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -263,8 +256,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_WATER_1, - .ability1 = ABILITY_TORRENT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -296,8 +288,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_WATER_1, - .ability1 = ABILITY_TORRENT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -329,8 +320,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_WATER_1, - .ability1 = ABILITY_TORRENT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -362,8 +352,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_SHIELD_DUST, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -395,8 +384,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_SHED_SKIN, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -428,8 +416,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_COMPOUND_EYES, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_COMPOUND_EYES, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -461,8 +448,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_SHIELD_DUST, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -494,8 +480,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_SHED_SKIN, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -527,8 +512,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_SWARM, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SWARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -560,8 +544,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_FLYING, - .ability1 = ABILITY_KEEN_EYE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -593,8 +576,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_FLYING, - .ability1 = ABILITY_KEEN_EYE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -626,8 +608,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_FLYING, - .ability1 = ABILITY_KEEN_EYE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -659,8 +640,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_RUN_AWAY, - .ability2 = ABILITY_GUTS, + .abilities = {ABILITY_RUN_AWAY, ABILITY_GUTS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -692,8 +672,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_RUN_AWAY, - .ability2 = ABILITY_GUTS, + .abilities = {ABILITY_RUN_AWAY, ABILITY_GUTS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -725,8 +704,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_FLYING, - .ability1 = ABILITY_KEEN_EYE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -758,8 +736,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_FLYING, - .ability1 = ABILITY_KEEN_EYE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -791,8 +768,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_INTIMIDATE, - .ability2 = ABILITY_SHED_SKIN, + .abilities = {ABILITY_INTIMIDATE, ABILITY_SHED_SKIN}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -824,8 +800,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_INTIMIDATE, - .ability2 = ABILITY_SHED_SKIN, + .abilities = {ABILITY_INTIMIDATE, ABILITY_SHED_SKIN}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -857,8 +832,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FAIRY, - .ability1 = ABILITY_STATIC, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 6, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -890,8 +864,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FAIRY, - .ability1 = ABILITY_STATIC, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -923,8 +896,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_SAND_VEIL, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SAND_VEIL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -956,8 +928,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_SAND_VEIL, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SAND_VEIL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -989,8 +960,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_POISON_POINT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_POISON_POINT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -1022,8 +992,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_POISON_POINT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_POISON_POINT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -1055,8 +1024,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_POISON_POINT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_POISON_POINT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -1088,8 +1056,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_POISON_POINT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_POISON_POINT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -1121,8 +1088,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_POISON_POINT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_POISON_POINT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -1154,8 +1120,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_POISON_POINT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_POISON_POINT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -1187,8 +1152,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_FAIRY, .eggGroup2 = EGG_GROUP_FAIRY, - .ability1 = ABILITY_CUTE_CHARM, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -1220,8 +1184,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_FAIRY, .eggGroup2 = EGG_GROUP_FAIRY, - .ability1 = ABILITY_CUTE_CHARM, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -1253,8 +1216,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_FLASH_FIRE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_FLASH_FIRE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1286,8 +1248,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_FLASH_FIRE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_FLASH_FIRE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -1319,8 +1280,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_FAIRY, .eggGroup2 = EGG_GROUP_FAIRY, - .ability1 = ABILITY_CUTE_CHARM, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -1352,8 +1312,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_FAIRY, .eggGroup2 = EGG_GROUP_FAIRY, - .ability1 = ABILITY_CUTE_CHARM, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -1385,8 +1344,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_FLYING, - .ability1 = ABILITY_INNER_FOCUS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -1418,8 +1376,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_FLYING, - .ability1 = ABILITY_INNER_FOCUS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -1451,8 +1408,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_GRASS, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_CHLOROPHYLL, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 4, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -1484,8 +1440,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_GRASS, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_CHLOROPHYLL, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 6, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -1517,8 +1472,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_GRASS, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_CHLOROPHYLL, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -1550,8 +1504,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_EFFECT_SPORE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_EFFECT_SPORE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -1583,8 +1536,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_EFFECT_SPORE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_EFFECT_SPORE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -1616,8 +1568,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_COMPOUND_EYES, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_COMPOUND_EYES, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -1649,8 +1600,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_SHIELD_DUST, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -1682,8 +1632,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_SAND_VEIL, - .ability2 = ABILITY_ARENA_TRAP, + .abilities = {ABILITY_SAND_VEIL, ABILITY_ARENA_TRAP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1715,8 +1664,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_SAND_VEIL, - .ability2 = ABILITY_ARENA_TRAP, + .abilities = {ABILITY_SAND_VEIL, ABILITY_ARENA_TRAP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1748,8 +1696,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_PICKUP, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_PICKUP, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -1781,8 +1728,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_LIMBER, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_LIMBER, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -1814,8 +1760,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_DAMP, - .ability2 = ABILITY_CLOUD_NINE, + .abilities = {ABILITY_DAMP, ABILITY_CLOUD_NINE}, .safariZoneFleeRate = 6, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -1847,8 +1792,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_DAMP, - .ability2 = ABILITY_CLOUD_NINE, + .abilities = {ABILITY_DAMP, ABILITY_CLOUD_NINE}, .safariZoneFleeRate = 8, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -1880,8 +1824,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_VITAL_SPIRIT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_VITAL_SPIRIT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1913,8 +1856,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_VITAL_SPIRIT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_VITAL_SPIRIT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1946,8 +1888,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_INTIMIDATE, - .ability2 = ABILITY_FLASH_FIRE, + .abilities = {ABILITY_INTIMIDATE, ABILITY_FLASH_FIRE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1979,8 +1920,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_INTIMIDATE, - .ability2 = ABILITY_FLASH_FIRE, + .abilities = {ABILITY_INTIMIDATE, ABILITY_FLASH_FIRE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2012,8 +1952,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_WATER_1, - .ability1 = ABILITY_WATER_ABSORB, - .ability2 = ABILITY_DAMP, + .abilities = {ABILITY_WATER_ABSORB, ABILITY_DAMP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = TRUE, @@ -2045,8 +1984,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_WATER_1, - .ability1 = ABILITY_WATER_ABSORB, - .ability2 = ABILITY_DAMP, + .abilities = {ABILITY_WATER_ABSORB, ABILITY_DAMP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = TRUE, @@ -2078,8 +2016,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_WATER_1, - .ability1 = ABILITY_WATER_ABSORB, - .ability2 = ABILITY_DAMP, + .abilities = {ABILITY_WATER_ABSORB, ABILITY_DAMP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = TRUE, @@ -2111,8 +2048,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_HUMAN_LIKE, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_SYNCHRONIZE, - .ability2 = ABILITY_INNER_FOCUS, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_INNER_FOCUS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2144,8 +2080,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_HUMAN_LIKE, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_SYNCHRONIZE, - .ability2 = ABILITY_INNER_FOCUS, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_INNER_FOCUS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2177,8 +2112,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_HUMAN_LIKE, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_SYNCHRONIZE, - .ability2 = ABILITY_INNER_FOCUS, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_INNER_FOCUS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2210,8 +2144,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_HUMAN_LIKE, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_GUTS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -2243,8 +2176,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_HUMAN_LIKE, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_GUTS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -2276,8 +2208,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_HUMAN_LIKE, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_GUTS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -2309,8 +2240,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_GRASS, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_CHLOROPHYLL, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -2342,8 +2272,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_GRASS, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_CHLOROPHYLL, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -2375,8 +2304,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_GRASS, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_CHLOROPHYLL, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -2408,8 +2336,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_WATER_3, .eggGroup2 = EGG_GROUP_WATER_3, - .ability1 = ABILITY_CLEAR_BODY, - .ability2 = ABILITY_LIQUID_OOZE, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_LIQUID_OOZE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -2441,8 +2368,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_WATER_3, .eggGroup2 = EGG_GROUP_WATER_3, - .ability1 = ABILITY_CLEAR_BODY, - .ability2 = ABILITY_LIQUID_OOZE, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_LIQUID_OOZE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -2474,8 +2400,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MINERAL, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_ROCK_HEAD, - .ability2 = ABILITY_STURDY, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_STURDY}, .safariZoneFleeRate = 4, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2507,8 +2432,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MINERAL, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_ROCK_HEAD, - .ability2 = ABILITY_STURDY, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2540,8 +2464,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MINERAL, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_ROCK_HEAD, - .ability2 = ABILITY_STURDY, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2573,8 +2496,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_RUN_AWAY, - .ability2 = ABILITY_FLASH_FIRE, + .abilities = {ABILITY_RUN_AWAY, ABILITY_FLASH_FIRE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -2606,8 +2528,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_RUN_AWAY, - .ability2 = ABILITY_FLASH_FIRE, + .abilities = {ABILITY_RUN_AWAY, ABILITY_FLASH_FIRE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -2639,8 +2560,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_WATER_1, - .ability1 = ABILITY_OBLIVIOUS, - .ability2 = ABILITY_OWN_TEMPO, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_OWN_TEMPO}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -2672,8 +2592,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_WATER_1, - .ability1 = ABILITY_OBLIVIOUS, - .ability2 = ABILITY_OWN_TEMPO, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_OWN_TEMPO}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -2705,8 +2624,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_MINERAL, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_MAGNET_PULL, - .ability2 = ABILITY_STURDY, + .abilities = {ABILITY_MAGNET_PULL, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -2738,8 +2656,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_MINERAL, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_MAGNET_PULL, - .ability2 = ABILITY_STURDY, + .abilities = {ABILITY_MAGNET_PULL, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -2771,8 +2688,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_KEEN_EYE, - .ability2 = ABILITY_INNER_FOCUS, + .abilities = {ABILITY_KEEN_EYE, ABILITY_INNER_FOCUS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2804,8 +2720,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_FLYING, - .ability1 = ABILITY_RUN_AWAY, - .ability2 = ABILITY_EARLY_BIRD, + .abilities = {ABILITY_RUN_AWAY, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 8, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2837,8 +2752,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_FLYING, - .ability1 = ABILITY_RUN_AWAY, - .ability2 = ABILITY_EARLY_BIRD, + .abilities = {ABILITY_RUN_AWAY, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 10, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2870,8 +2784,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_THICK_FAT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_THICK_FAT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -2903,8 +2816,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_THICK_FAT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_THICK_FAT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -2936,8 +2848,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_AMORPHOUS, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_STENCH, - .ability2 = ABILITY_STICKY_HOLD, + .abilities = {ABILITY_STENCH, ABILITY_STICKY_HOLD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -2969,8 +2880,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_AMORPHOUS, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_STENCH, - .ability2 = ABILITY_STICKY_HOLD, + .abilities = {ABILITY_STENCH, ABILITY_STICKY_HOLD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -3002,8 +2912,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_WATER_3, .eggGroup2 = EGG_GROUP_WATER_3, - .ability1 = ABILITY_SHELL_ARMOR, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SHELL_ARMOR, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -3035,8 +2944,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_WATER_3, .eggGroup2 = EGG_GROUP_WATER_3, - .ability1 = ABILITY_SHELL_ARMOR, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SHELL_ARMOR, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -3068,8 +2976,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_AMORPHOUS, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_LEVITATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -3101,8 +3008,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_AMORPHOUS, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_LEVITATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -3134,8 +3040,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_AMORPHOUS, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_LEVITATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -3167,8 +3072,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_MINERAL, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_ROCK_HEAD, - .ability2 = ABILITY_STURDY, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -3200,8 +3104,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_HUMAN_LIKE, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_INSOMNIA, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_INSOMNIA, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -3233,8 +3136,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_HUMAN_LIKE, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_INSOMNIA, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_INSOMNIA, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -3266,8 +3168,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_3, .eggGroup2 = EGG_GROUP_WATER_3, - .ability1 = ABILITY_HYPER_CUTTER, - .ability2 = ABILITY_SHELL_ARMOR, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -3299,8 +3200,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_3, .eggGroup2 = EGG_GROUP_WATER_3, - .ability1 = ABILITY_HYPER_CUTTER, - .ability2 = ABILITY_SHELL_ARMOR, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = TRUE, @@ -3332,8 +3232,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_MINERAL, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_SOUNDPROOF, - .ability2 = ABILITY_STATIC, + .abilities = {ABILITY_SOUNDPROOF, ABILITY_STATIC}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -3365,8 +3264,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_MINERAL, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_SOUNDPROOF, - .ability2 = ABILITY_STATIC, + .abilities = {ABILITY_SOUNDPROOF, ABILITY_STATIC}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -3398,8 +3296,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_GRASS, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_CHLOROPHYLL, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -3431,8 +3328,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_GRASS, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_CHLOROPHYLL, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -3464,8 +3360,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_MONSTER, - .ability1 = ABILITY_ROCK_HEAD, - .ability2 = ABILITY_LIGHTNING_ROD, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_LIGHTNING_ROD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -3497,8 +3392,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_MONSTER, - .ability1 = ABILITY_ROCK_HEAD, - .ability2 = ABILITY_LIGHTNING_ROD, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_LIGHTNING_ROD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -3530,8 +3424,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_HUMAN_LIKE, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_LIMBER, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_LIMBER, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -3563,8 +3456,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_HUMAN_LIKE, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_KEEN_EYE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -3596,8 +3488,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_MONSTER, - .ability1 = ABILITY_OWN_TEMPO, - .ability2 = ABILITY_OBLIVIOUS, + .abilities = {ABILITY_OWN_TEMPO, ABILITY_OBLIVIOUS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -3629,8 +3520,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_AMORPHOUS, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_LEVITATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -3662,8 +3552,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_AMORPHOUS, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_LEVITATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -3695,8 +3584,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_LIGHTNING_ROD, - .ability2 = ABILITY_ROCK_HEAD, + .abilities = {ABILITY_LIGHTNING_ROD, ABILITY_ROCK_HEAD}, .safariZoneFleeRate = 4, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -3728,8 +3616,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_LIGHTNING_ROD, - .ability2 = ABILITY_ROCK_HEAD, + .abilities = {ABILITY_LIGHTNING_ROD, ABILITY_ROCK_HEAD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -3761,8 +3648,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_FAIRY, .eggGroup2 = EGG_GROUP_FAIRY, - .ability1 = ABILITY_NATURAL_CURE, - .ability2 = ABILITY_SERENE_GRACE, + .abilities = {ABILITY_NATURAL_CURE, ABILITY_SERENE_GRACE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -3794,8 +3680,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_GRASS, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_CHLOROPHYLL, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -3827,8 +3712,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_MONSTER, - .ability1 = ABILITY_EARLY_BIRD, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_EARLY_BIRD, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -3860,8 +3744,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_SWIFT_SWIM, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -3893,8 +3776,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_POISON_POINT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_POISON_POINT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -3926,8 +3808,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_2, .eggGroup2 = EGG_GROUP_WATER_2, - .ability1 = ABILITY_SWIFT_SWIM, - .ability2 = ABILITY_WATER_VEIL, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_WATER_VEIL}, .safariZoneFleeRate = 4, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -3959,8 +3840,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_2, .eggGroup2 = EGG_GROUP_WATER_2, - .ability1 = ABILITY_SWIFT_SWIM, - .ability2 = ABILITY_WATER_VEIL, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_WATER_VEIL}, .safariZoneFleeRate = 6, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -3992,8 +3872,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_WATER_3, .eggGroup2 = EGG_GROUP_WATER_3, - .ability1 = ABILITY_ILLUMINATE, - .ability2 = ABILITY_NATURAL_CURE, + .abilities = {ABILITY_ILLUMINATE, ABILITY_NATURAL_CURE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -4025,8 +3904,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_WATER_3, .eggGroup2 = EGG_GROUP_WATER_3, - .ability1 = ABILITY_ILLUMINATE, - .ability2 = ABILITY_NATURAL_CURE, + .abilities = {ABILITY_ILLUMINATE, ABILITY_NATURAL_CURE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -4058,8 +3936,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_HUMAN_LIKE, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_SOUNDPROOF, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SOUNDPROOF, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -4091,8 +3968,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_SWARM, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SWARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -4124,8 +4000,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_HUMAN_LIKE, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_OBLIVIOUS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -4157,8 +4032,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_HUMAN_LIKE, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_STATIC, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = TRUE, @@ -4190,8 +4064,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_HUMAN_LIKE, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_FLAME_BODY, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_FLAME_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -4223,8 +4096,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_HYPER_CUTTER, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_NONE}, .safariZoneFleeRate = 8, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -4256,8 +4128,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_INTIMIDATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -4289,8 +4160,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_WATER_2, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_SWIFT_SWIM, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 4, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -4322,8 +4192,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_WATER_2, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_INTIMIDATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4355,8 +4224,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_WATER_1, - .ability1 = ABILITY_WATER_ABSORB, - .ability2 = ABILITY_SHELL_ARMOR, + .abilities = {ABILITY_WATER_ABSORB, ABILITY_SHELL_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4388,8 +4256,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_DITTO, .eggGroup2 = EGG_GROUP_DITTO, - .ability1 = ABILITY_LIMBER, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_LIMBER, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -4421,8 +4288,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_RUN_AWAY, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_RUN_AWAY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -4454,8 +4320,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_WATER_ABSORB, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_WATER_ABSORB, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4487,8 +4352,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_VOLT_ABSORB, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_VOLT_ABSORB, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -4520,8 +4384,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_FLASH_FIRE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_FLASH_FIRE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -4553,8 +4416,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_MINERAL, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_TRACE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_TRACE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -4586,8 +4448,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_WATER_3, - .ability1 = ABILITY_SWIFT_SWIM, - .ability2 = ABILITY_SHELL_ARMOR, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_SHELL_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4619,8 +4480,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_WATER_3, - .ability1 = ABILITY_SWIFT_SWIM, - .ability2 = ABILITY_SHELL_ARMOR, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_SHELL_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4652,8 +4512,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_WATER_3, - .ability1 = ABILITY_SWIFT_SWIM, - .ability2 = ABILITY_BATTLE_ARMOR, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_BATTLE_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -4685,8 +4544,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_WATER_3, - .ability1 = ABILITY_SWIFT_SWIM, - .ability2 = ABILITY_BATTLE_ARMOR, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_BATTLE_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -4718,8 +4576,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_FLYING, - .ability1 = ABILITY_ROCK_HEAD, - .ability2 = ABILITY_PRESSURE, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_PRESSURE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -4751,8 +4608,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_MONSTER, - .ability1 = ABILITY_IMMUNITY, - .ability2 = ABILITY_THICK_FAT, + .abilities = {ABILITY_IMMUNITY, ABILITY_THICK_FAT}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -4784,8 +4640,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_PRESSURE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4817,8 +4672,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_PRESSURE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -4850,8 +4704,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_PRESSURE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -4883,8 +4736,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_SHED_SKIN, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4916,8 +4768,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_SHED_SKIN, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4949,8 +4800,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_INNER_FOCUS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -4982,8 +4832,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_PRESSURE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -5015,8 +4864,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_SYNCHRONIZE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -5048,8 +4896,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_OVERGROW, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -5081,8 +4928,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_OVERGROW, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -5114,8 +4960,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_OVERGROW, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -5147,8 +4992,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_BLAZE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -5180,8 +5024,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_BLAZE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -5213,8 +5056,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_BLAZE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -5246,8 +5088,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_WATER_1, - .ability1 = ABILITY_TORRENT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -5279,8 +5120,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_WATER_1, - .ability1 = ABILITY_TORRENT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = TRUE, @@ -5312,8 +5152,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_WATER_1, - .ability1 = ABILITY_TORRENT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -5345,8 +5184,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_RUN_AWAY, - .ability2 = ABILITY_KEEN_EYE, + .abilities = {ABILITY_RUN_AWAY, ABILITY_KEEN_EYE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -5378,8 +5216,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_RUN_AWAY, - .ability2 = ABILITY_KEEN_EYE, + .abilities = {ABILITY_RUN_AWAY, ABILITY_KEEN_EYE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -5411,8 +5248,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_FLYING, - .ability1 = ABILITY_INSOMNIA, - .ability2 = ABILITY_KEEN_EYE, + .abilities = {ABILITY_INSOMNIA, ABILITY_KEEN_EYE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -5444,8 +5280,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_FLYING, - .ability1 = ABILITY_INSOMNIA, - .ability2 = ABILITY_KEEN_EYE, + .abilities = {ABILITY_INSOMNIA, ABILITY_KEEN_EYE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -5477,8 +5312,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_SWARM, - .ability2 = ABILITY_EARLY_BIRD, + .abilities = {ABILITY_SWARM, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -5510,8 +5344,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_SWARM, - .ability2 = ABILITY_EARLY_BIRD, + .abilities = {ABILITY_SWARM, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -5543,8 +5376,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_SWARM, - .ability2 = ABILITY_INSOMNIA, + .abilities = {ABILITY_SWARM, ABILITY_INSOMNIA}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -5576,8 +5408,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_SWARM, - .ability2 = ABILITY_INSOMNIA, + .abilities = {ABILITY_SWARM, ABILITY_INSOMNIA}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -5609,8 +5440,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_FLYING, - .ability1 = ABILITY_INNER_FOCUS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -5642,8 +5472,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_WATER_2, .eggGroup2 = EGG_GROUP_WATER_2, - .ability1 = ABILITY_VOLT_ABSORB, - .ability2 = ABILITY_ILLUMINATE, + .abilities = {ABILITY_VOLT_ABSORB, ABILITY_ILLUMINATE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -5675,8 +5504,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_WATER_2, .eggGroup2 = EGG_GROUP_WATER_2, - .ability1 = ABILITY_VOLT_ABSORB, - .ability2 = ABILITY_ILLUMINATE, + .abilities = {ABILITY_VOLT_ABSORB, ABILITY_ILLUMINATE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -5708,8 +5536,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_STATIC, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -5741,8 +5568,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_CUTE_CHARM, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -5774,8 +5600,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_CUTE_CHARM, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = TRUE, @@ -5807,8 +5632,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_HUSTLE, - .ability2 = ABILITY_SERENE_GRACE, + .abilities = {ABILITY_HUSTLE, ABILITY_SERENE_GRACE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -5840,8 +5664,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_FAIRY, - .ability1 = ABILITY_HUSTLE, - .ability2 = ABILITY_SERENE_GRACE, + .abilities = {ABILITY_HUSTLE, ABILITY_SERENE_GRACE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -5873,8 +5696,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_FLYING, - .ability1 = ABILITY_SYNCHRONIZE, - .ability2 = ABILITY_EARLY_BIRD, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 6, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -5906,8 +5728,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_FLYING, - .ability1 = ABILITY_SYNCHRONIZE, - .ability2 = ABILITY_EARLY_BIRD, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 8, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -5939,8 +5760,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_STATIC, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -5972,8 +5792,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_STATIC, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -6005,8 +5824,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_STATIC, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -6038,8 +5856,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_GRASS, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_CHLOROPHYLL, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -6071,8 +5888,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_FAIRY, - .ability1 = ABILITY_THICK_FAT, - .ability2 = ABILITY_HUGE_POWER, + .abilities = {ABILITY_THICK_FAT, ABILITY_HUGE_POWER}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -6104,8 +5920,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_FAIRY, - .ability1 = ABILITY_THICK_FAT, - .ability2 = ABILITY_HUGE_POWER, + .abilities = {ABILITY_THICK_FAT, ABILITY_HUGE_POWER}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -6137,8 +5952,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_MINERAL, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_STURDY, - .ability2 = ABILITY_ROCK_HEAD, + .abilities = {ABILITY_STURDY, ABILITY_ROCK_HEAD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -6170,8 +5984,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_WATER_1, - .ability1 = ABILITY_WATER_ABSORB, - .ability2 = ABILITY_DAMP, + .abilities = {ABILITY_WATER_ABSORB, ABILITY_DAMP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = TRUE, @@ -6203,8 +6016,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FAIRY, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_CHLOROPHYLL, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -6236,8 +6048,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FAIRY, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_CHLOROPHYLL, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -6269,8 +6080,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FAIRY, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_CHLOROPHYLL, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -6302,8 +6112,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_RUN_AWAY, - .ability2 = ABILITY_PICKUP, + .abilities = {ABILITY_RUN_AWAY, ABILITY_PICKUP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -6335,8 +6144,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_GRASS, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_CHLOROPHYLL, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -6368,8 +6176,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_GRASS, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_CHLOROPHYLL, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -6401,8 +6208,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_SPEED_BOOST, - .ability2 = ABILITY_COMPOUND_EYES, + .abilities = {ABILITY_SPEED_BOOST, ABILITY_COMPOUND_EYES}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -6434,8 +6240,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_DAMP, - .ability2 = ABILITY_WATER_ABSORB, + .abilities = {ABILITY_DAMP, ABILITY_WATER_ABSORB}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -6467,8 +6272,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_DAMP, - .ability2 = ABILITY_WATER_ABSORB, + .abilities = {ABILITY_DAMP, ABILITY_WATER_ABSORB}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -6500,8 +6304,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_SYNCHRONIZE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -6533,8 +6336,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_SYNCHRONIZE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -6566,8 +6368,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_FLYING, - .ability1 = ABILITY_INSOMNIA, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_INSOMNIA, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -6599,8 +6400,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_WATER_1, - .ability1 = ABILITY_OBLIVIOUS, - .ability2 = ABILITY_OWN_TEMPO, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_OWN_TEMPO}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -6632,8 +6432,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_AMORPHOUS, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_LEVITATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -6665,8 +6464,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_LEVITATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = TRUE, @@ -6698,8 +6496,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_AMORPHOUS, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_SHADOW_TAG, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SHADOW_TAG, ABILITY_NONE}, .safariZoneFleeRate = 4, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -6731,8 +6528,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_INNER_FOCUS, - .ability2 = ABILITY_EARLY_BIRD, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 4, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -6764,8 +6560,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_STURDY, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_STURDY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -6797,8 +6592,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_STURDY, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_STURDY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -6830,8 +6624,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_SERENE_GRACE, - .ability2 = ABILITY_RUN_AWAY, + .abilities = {ABILITY_SERENE_GRACE, ABILITY_RUN_AWAY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -6863,8 +6656,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_HYPER_CUTTER, - .ability2 = ABILITY_SAND_VEIL, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SAND_VEIL}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -6896,8 +6688,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_MINERAL, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_ROCK_HEAD, - .ability2 = ABILITY_STURDY, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -6929,8 +6720,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FAIRY, - .ability1 = ABILITY_INTIMIDATE, - .ability2 = ABILITY_RUN_AWAY, + .abilities = {ABILITY_INTIMIDATE, ABILITY_RUN_AWAY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -6962,8 +6752,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FAIRY, - .ability1 = ABILITY_INTIMIDATE, - .ability2 = ABILITY_INTIMIDATE, + .abilities = {ABILITY_INTIMIDATE, ABILITY_INTIMIDATE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -6995,8 +6784,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_2, .eggGroup2 = EGG_GROUP_WATER_2, - .ability1 = ABILITY_POISON_POINT, - .ability2 = ABILITY_SWIFT_SWIM, + .abilities = {ABILITY_POISON_POINT, ABILITY_SWIFT_SWIM}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -7028,8 +6816,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_SWARM, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SWARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -7061,8 +6848,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_STURDY, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_STURDY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -7094,8 +6880,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_SWARM, - .ability2 = ABILITY_GUTS, + .abilities = {ABILITY_SWARM, ABILITY_GUTS}, .safariZoneFleeRate = 8, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -7127,8 +6912,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_INNER_FOCUS, - .ability2 = ABILITY_KEEN_EYE, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_KEEN_EYE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = TRUE, @@ -7160,8 +6944,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_PICKUP, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_PICKUP, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = TRUE, @@ -7193,8 +6976,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_GUTS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -7226,8 +7008,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_AMORPHOUS, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_MAGMA_ARMOR, - .ability2 = ABILITY_FLAME_BODY, + .abilities = {ABILITY_MAGMA_ARMOR, ABILITY_FLAME_BODY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -7259,8 +7040,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_AMORPHOUS, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_MAGMA_ARMOR, - .ability2 = ABILITY_FLAME_BODY, + .abilities = {ABILITY_MAGMA_ARMOR, ABILITY_FLAME_BODY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -7292,8 +7072,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_OBLIVIOUS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -7325,8 +7104,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_OBLIVIOUS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -7358,8 +7136,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_WATER_3, - .ability1 = ABILITY_HUSTLE, - .ability2 = ABILITY_NATURAL_CURE, + .abilities = {ABILITY_HUSTLE, ABILITY_NATURAL_CURE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -7391,8 +7168,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_WATER_2, - .ability1 = ABILITY_HUSTLE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_HUSTLE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -7424,8 +7200,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_WATER_2, - .ability1 = ABILITY_SUCTION_CUPS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SUCTION_CUPS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -7457,8 +7232,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_VITAL_SPIRIT, - .ability2 = ABILITY_HUSTLE, + .abilities = {ABILITY_VITAL_SPIRIT, ABILITY_HUSTLE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -7490,8 +7264,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_WATER_1, - .ability1 = ABILITY_SWIFT_SWIM, - .ability2 = ABILITY_WATER_ABSORB, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_WATER_ABSORB}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -7523,8 +7296,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_FLYING, - .ability1 = ABILITY_KEEN_EYE, - .ability2 = ABILITY_STURDY, + .abilities = {ABILITY_KEEN_EYE, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -7556,8 +7328,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_EARLY_BIRD, - .ability2 = ABILITY_FLASH_FIRE, + .abilities = {ABILITY_EARLY_BIRD, ABILITY_FLASH_FIRE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -7589,8 +7360,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_EARLY_BIRD, - .ability2 = ABILITY_FLASH_FIRE, + .abilities = {ABILITY_EARLY_BIRD, ABILITY_FLASH_FIRE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -7622,8 +7392,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_SWIFT_SWIM, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -7655,8 +7424,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_PICKUP, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_PICKUP, ABILITY_NONE}, .safariZoneFleeRate = 10, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -7688,8 +7456,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_STURDY, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_STURDY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -7721,8 +7488,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_MINERAL, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_TRACE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_TRACE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -7754,8 +7520,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_INTIMIDATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -7787,8 +7552,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_OWN_TEMPO, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_OWN_TEMPO, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -7820,8 +7584,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_GUTS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -7853,8 +7616,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_HUMAN_LIKE, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_INTIMIDATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -7886,8 +7648,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_OBLIVIOUS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -7919,8 +7680,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_STATIC, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = TRUE, @@ -7952,8 +7712,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_FLAME_BODY, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_FLAME_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -7985,8 +7744,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_THICK_FAT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_THICK_FAT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -8018,8 +7776,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_FAIRY, .eggGroup2 = EGG_GROUP_FAIRY, - .ability1 = ABILITY_NATURAL_CURE, - .ability2 = ABILITY_SERENE_GRACE, + .abilities = {ABILITY_NATURAL_CURE, ABILITY_SERENE_GRACE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -8051,8 +7808,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_PRESSURE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -8084,8 +7840,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_PRESSURE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -8117,8 +7872,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_PRESSURE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -8150,8 +7904,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_MONSTER, - .ability1 = ABILITY_GUTS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -8183,8 +7936,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_MONSTER, - .ability1 = ABILITY_SHED_SKIN, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -8216,8 +7968,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_MONSTER, - .ability1 = ABILITY_SAND_STREAM, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SAND_STREAM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -8249,8 +8000,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_PRESSURE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -8282,8 +8032,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_PRESSURE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -8315,8 +8064,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_NATURAL_CURE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_NATURAL_CURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -8398,8 +8146,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_OVERGROW, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -8431,8 +8178,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_OVERGROW, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -8464,8 +8210,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_OVERGROW, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -8497,8 +8242,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_BLAZE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -8530,8 +8274,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_BLAZE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -8563,8 +8306,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_BLAZE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -8596,8 +8338,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_WATER_1, - .ability1 = ABILITY_TORRENT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -8629,8 +8370,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_WATER_1, - .ability1 = ABILITY_TORRENT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -8662,8 +8402,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_WATER_1, - .ability1 = ABILITY_TORRENT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -8695,8 +8434,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_RUN_AWAY, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_RUN_AWAY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -8728,8 +8466,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_INTIMIDATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -8761,8 +8498,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_PICKUP, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_PICKUP, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -8794,8 +8530,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_PICKUP, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_PICKUP, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -8827,8 +8562,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_SHIELD_DUST, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -8860,8 +8594,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_SHED_SKIN, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -8893,8 +8626,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_SWARM, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SWARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -8926,8 +8658,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_SHED_SKIN, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -8959,8 +8690,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_SHIELD_DUST, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -8992,8 +8722,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_SWIFT_SWIM, - .ability2 = ABILITY_RAIN_DISH, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_RAIN_DISH}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -9025,8 +8754,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_SWIFT_SWIM, - .ability2 = ABILITY_RAIN_DISH, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_RAIN_DISH}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -9058,8 +8786,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_SWIFT_SWIM, - .ability2 = ABILITY_RAIN_DISH, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_RAIN_DISH}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -9091,8 +8818,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_CHLOROPHYLL, - .ability2 = ABILITY_EARLY_BIRD, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -9124,8 +8850,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_CHLOROPHYLL, - .ability2 = ABILITY_EARLY_BIRD, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -9157,8 +8882,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_CHLOROPHYLL, - .ability2 = ABILITY_EARLY_BIRD, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -9190,8 +8914,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_ERRATIC, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_COMPOUND_EYES, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_COMPOUND_EYES, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -9223,8 +8946,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_ERRATIC, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_SPEED_BOOST, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SPEED_BOOST, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -9256,8 +8978,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_ERRATIC, .eggGroup1 = EGG_GROUP_MINERAL, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_WONDER_GUARD, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_WONDER_GUARD, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -9289,8 +9010,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_FLYING, - .ability1 = ABILITY_GUTS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -9322,8 +9042,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_FLYING, - .ability1 = ABILITY_GUTS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -9355,8 +9074,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FLUCTUATING, .eggGroup1 = EGG_GROUP_FAIRY, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_EFFECT_SPORE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_EFFECT_SPORE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -9388,8 +9106,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FLUCTUATING, .eggGroup1 = EGG_GROUP_FAIRY, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_EFFECT_SPORE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_EFFECT_SPORE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -9421,8 +9138,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_OWN_TEMPO, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_OWN_TEMPO, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = TRUE, @@ -9454,8 +9170,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_FLYING, - .ability1 = ABILITY_KEEN_EYE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -9487,8 +9202,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_FLYING, - .ability1 = ABILITY_KEEN_EYE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -9520,8 +9234,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_SWIFT_SWIM, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -9553,8 +9266,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_INTIMIDATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -9586,8 +9298,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FLUCTUATING, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_WATER_2, - .ability1 = ABILITY_WATER_VEIL, - .ability2 = ABILITY_OBLIVIOUS, + .abilities = {ABILITY_WATER_VEIL, ABILITY_OBLIVIOUS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -9619,8 +9330,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FLUCTUATING, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_WATER_2, - .ability1 = ABILITY_WATER_VEIL, - .ability2 = ABILITY_OBLIVIOUS, + .abilities = {ABILITY_WATER_VEIL, ABILITY_OBLIVIOUS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -9652,8 +9362,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FAIRY, - .ability1 = ABILITY_CUTE_CHARM, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -9685,8 +9394,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FAIRY, - .ability1 = ABILITY_CUTE_CHARM, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -9718,8 +9426,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_COLOR_CHANGE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_COLOR_CHANGE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -9751,8 +9458,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_MINERAL, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_LEVITATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -9784,8 +9490,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_MINERAL, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_LEVITATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -9817,8 +9522,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_MINERAL, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_STURDY, - .ability2 = ABILITY_MAGNET_PULL, + .abilities = {ABILITY_STURDY, ABILITY_MAGNET_PULL}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -9850,8 +9554,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_WHITE_SMOKE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_WHITE_SMOKE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -9883,8 +9586,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_HUMAN_LIKE, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_KEEN_EYE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -9916,8 +9618,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_2, .eggGroup2 = EGG_GROUP_WATER_2, - .ability1 = ABILITY_OBLIVIOUS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -9949,8 +9650,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_WATER_2, .eggGroup2 = EGG_GROUP_WATER_2, - .ability1 = ABILITY_OBLIVIOUS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -9982,8 +9682,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_WATER_2, .eggGroup2 = EGG_GROUP_WATER_2, - .ability1 = ABILITY_SWIFT_SWIM, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -10015,8 +9714,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FLUCTUATING, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_WATER_3, - .ability1 = ABILITY_HYPER_CUTTER, - .ability2 = ABILITY_SHELL_ARMOR, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -10048,8 +9746,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FLUCTUATING, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_WATER_3, - .ability1 = ABILITY_HYPER_CUTTER, - .ability2 = ABILITY_SHELL_ARMOR, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -10081,8 +9778,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_ERRATIC, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_SWIFT_SWIM, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -10114,8 +9810,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_ERRATIC, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_MARVEL_SCALE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_MARVEL_SCALE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -10147,8 +9842,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_WATER_2, .eggGroup2 = EGG_GROUP_WATER_2, - .ability1 = ABILITY_ROUGH_SKIN, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_ROUGH_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -10180,8 +9874,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_WATER_2, .eggGroup2 = EGG_GROUP_WATER_2, - .ability1 = ABILITY_ROUGH_SKIN, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_ROUGH_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10213,8 +9906,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_HYPER_CUTTER, - .ability2 = ABILITY_ARENA_TRAP, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_ARENA_TRAP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -10246,8 +9938,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_LEVITATE, - .ability2 = ABILITY_LEVITATE, + .abilities = {ABILITY_LEVITATE, ABILITY_LEVITATE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -10279,8 +9970,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_BUG, - .ability1 = ABILITY_LEVITATE, - .ability2 = ABILITY_LEVITATE, + .abilities = {ABILITY_LEVITATE, ABILITY_LEVITATE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -10312,8 +10002,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FLUCTUATING, .eggGroup1 = EGG_GROUP_HUMAN_LIKE, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_THICK_FAT, - .ability2 = ABILITY_GUTS, + .abilities = {ABILITY_THICK_FAT, ABILITY_GUTS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -10345,8 +10034,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FLUCTUATING, .eggGroup1 = EGG_GROUP_HUMAN_LIKE, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_THICK_FAT, - .ability2 = ABILITY_GUTS, + .abilities = {ABILITY_THICK_FAT, ABILITY_GUTS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -10378,8 +10066,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_STATIC, - .ability2 = ABILITY_LIGHTNING_ROD, + .abilities = {ABILITY_STATIC, ABILITY_LIGHTNING_ROD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -10411,8 +10098,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_STATIC, - .ability2 = ABILITY_LIGHTNING_ROD, + .abilities = {ABILITY_STATIC, ABILITY_LIGHTNING_ROD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -10444,8 +10130,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_OBLIVIOUS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -10477,8 +10162,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_MAGMA_ARMOR, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_MAGMA_ARMOR, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -10510,8 +10194,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_THICK_FAT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_THICK_FAT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10543,8 +10226,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_THICK_FAT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_THICK_FAT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10576,8 +10258,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_THICK_FAT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_THICK_FAT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10609,8 +10290,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_GRASS, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_SAND_VEIL, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SAND_VEIL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -10642,8 +10322,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_GRASS, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_SAND_VEIL, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SAND_VEIL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -10675,8 +10354,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FAIRY, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_INNER_FOCUS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -10708,8 +10386,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FAIRY, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_INNER_FOCUS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -10741,8 +10418,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_MINERAL, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_LEVITATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -10774,8 +10450,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_MINERAL, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_LEVITATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -10807,8 +10482,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_THICK_FAT, - .ability2 = ABILITY_HUGE_POWER, + .abilities = {ABILITY_THICK_FAT, ABILITY_HUGE_POWER}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10840,8 +10514,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_THICK_FAT, - .ability2 = ABILITY_OWN_TEMPO, + .abilities = {ABILITY_THICK_FAT, ABILITY_OWN_TEMPO}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -10873,8 +10546,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_THICK_FAT, - .ability2 = ABILITY_OWN_TEMPO, + .abilities = {ABILITY_THICK_FAT, ABILITY_OWN_TEMPO}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -10906,8 +10578,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FAIRY, .eggGroup2 = EGG_GROUP_FAIRY, - .ability1 = ABILITY_PLUS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_PLUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -10939,8 +10610,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FAIRY, .eggGroup2 = EGG_GROUP_FAIRY, - .ability1 = ABILITY_MINUS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_MINUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -10972,8 +10642,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FAIRY, - .ability1 = ABILITY_HYPER_CUTTER, - .ability2 = ABILITY_INTIMIDATE, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_INTIMIDATE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -11005,8 +10674,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_HUMAN_LIKE, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_PURE_POWER, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_PURE_POWER, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11038,8 +10706,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_HUMAN_LIKE, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_PURE_POWER, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_PURE_POWER, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -11071,8 +10738,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_ERRATIC, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_NATURAL_CURE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_NATURAL_CURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11104,8 +10770,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_ERRATIC, .eggGroup1 = EGG_GROUP_FLYING, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_NATURAL_CURE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_NATURAL_CURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11137,8 +10802,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_SHADOW_TAG, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SHADOW_TAG, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11170,8 +10834,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_AMORPHOUS, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_LEVITATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -11203,8 +10866,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_AMORPHOUS, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_PRESSURE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -11236,8 +10898,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FAIRY, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_NATURAL_CURE, - .ability2 = ABILITY_POISON_POINT, + .abilities = {ABILITY_NATURAL_CURE, ABILITY_POISON_POINT}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = TRUE, @@ -11269,8 +10930,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_TRUANT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_TRUANT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -11302,8 +10962,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_VITAL_SPIRIT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_VITAL_SPIRIT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -11335,8 +10994,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_TRUANT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_TRUANT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -11368,8 +11026,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FLUCTUATING, .eggGroup1 = EGG_GROUP_AMORPHOUS, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_LIQUID_OOZE, - .ability2 = ABILITY_STICKY_HOLD, + .abilities = {ABILITY_LIQUID_OOZE, ABILITY_STICKY_HOLD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -11401,8 +11058,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FLUCTUATING, .eggGroup1 = EGG_GROUP_AMORPHOUS, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_LIQUID_OOZE, - .ability2 = ABILITY_STICKY_HOLD, + .abilities = {ABILITY_LIQUID_OOZE, ABILITY_STICKY_HOLD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -11434,8 +11090,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_GRASS, - .ability1 = ABILITY_CHLOROPHYLL, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -11467,8 +11122,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_SOUNDPROOF, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SOUNDPROOF, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -11500,8 +11154,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_SOUNDPROOF, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SOUNDPROOF, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11533,8 +11186,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_SOUNDPROOF, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SOUNDPROOF, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11566,8 +11218,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_ERRATIC, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_WATER_1, - .ability1 = ABILITY_SHELL_ARMOR, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SHELL_ARMOR, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11599,8 +11250,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_ERRATIC, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_WATER_1, - .ability1 = ABILITY_SWIFT_SWIM, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11632,8 +11282,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_ERRATIC, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_WATER_1, - .ability1 = ABILITY_SWIFT_SWIM, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -11665,8 +11314,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_SLOW, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_PRESSURE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = TRUE, @@ -11698,8 +11346,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_AMORPHOUS, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_INSOMNIA, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_INSOMNIA, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -11731,8 +11378,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_AMORPHOUS, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_INSOMNIA, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_INSOMNIA, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -11764,8 +11410,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FLUCTUATING, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_SHED_SKIN, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = TRUE, @@ -11797,8 +11442,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_ERRATIC, .eggGroup1 = EGG_GROUP_FIELD, .eggGroup2 = EGG_GROUP_FIELD, - .ability1 = ABILITY_IMMUNITY, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_IMMUNITY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = TRUE, @@ -11830,8 +11474,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_WATER_1, .eggGroup2 = EGG_GROUP_WATER_2, - .ability1 = ABILITY_SWIFT_SWIM, - .ability2 = ABILITY_ROCK_HEAD, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_ROCK_HEAD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -11863,8 +11506,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_MONSTER, - .ability1 = ABILITY_STURDY, - .ability2 = ABILITY_ROCK_HEAD, + .abilities = {ABILITY_STURDY, ABILITY_ROCK_HEAD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -11896,8 +11538,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_MONSTER, - .ability1 = ABILITY_STURDY, - .ability2 = ABILITY_ROCK_HEAD, + .abilities = {ABILITY_STURDY, ABILITY_ROCK_HEAD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -11929,8 +11570,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_MONSTER, .eggGroup2 = EGG_GROUP_MONSTER, - .ability1 = ABILITY_STURDY, - .ability2 = ABILITY_ROCK_HEAD, + .abilities = {ABILITY_STURDY, ABILITY_ROCK_HEAD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -11962,8 +11602,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_MEDIUM_FAST, .eggGroup1 = EGG_GROUP_FAIRY, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_FORECAST, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_FORECAST, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -11995,8 +11634,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_ERRATIC, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_ILLUMINATE, - .ability2 = ABILITY_SWARM, + .abilities = {ABILITY_ILLUMINATE, ABILITY_SWARM}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -12028,8 +11666,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FLUCTUATING, .eggGroup1 = EGG_GROUP_BUG, .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .ability1 = ABILITY_OBLIVIOUS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -12061,8 +11698,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_ERRATIC, .eggGroup1 = EGG_GROUP_WATER_3, .eggGroup2 = EGG_GROUP_WATER_3, - .ability1 = ABILITY_SUCTION_CUPS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SUCTION_CUPS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -12094,8 +11730,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_ERRATIC, .eggGroup1 = EGG_GROUP_WATER_3, .eggGroup2 = EGG_GROUP_WATER_3, - .ability1 = ABILITY_SUCTION_CUPS, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SUCTION_CUPS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -12127,8 +11762,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_ERRATIC, .eggGroup1 = EGG_GROUP_WATER_3, .eggGroup2 = EGG_GROUP_WATER_3, - .ability1 = ABILITY_BATTLE_ARMOR, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_BATTLE_ARMOR, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -12160,8 +11794,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_ERRATIC, .eggGroup1 = EGG_GROUP_WATER_3, .eggGroup2 = EGG_GROUP_WATER_3, - .ability1 = ABILITY_BATTLE_ARMOR, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_BATTLE_ARMOR, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -12193,8 +11826,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_AMORPHOUS, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_SYNCHRONIZE, - .ability2 = ABILITY_TRACE, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_TRACE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -12226,8 +11858,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_AMORPHOUS, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_SYNCHRONIZE, - .ability2 = ABILITY_TRACE, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_TRACE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -12259,8 +11890,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_AMORPHOUS, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_SYNCHRONIZE, - .ability2 = ABILITY_TRACE, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_TRACE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -12292,8 +11922,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_DRAGON, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_ROCK_HEAD, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -12325,8 +11954,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_DRAGON, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_ROCK_HEAD, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -12358,8 +11986,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_DRAGON, .eggGroup2 = EGG_GROUP_DRAGON, - .ability1 = ABILITY_INTIMIDATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -12391,8 +12018,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_MINERAL, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_CLEAR_BODY, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -12424,8 +12050,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_MINERAL, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_CLEAR_BODY, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -12457,8 +12082,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_MINERAL, .eggGroup2 = EGG_GROUP_MINERAL, - .ability1 = ABILITY_CLEAR_BODY, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -12490,8 +12114,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_CLEAR_BODY, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -12523,8 +12146,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_CLEAR_BODY, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -12556,8 +12178,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_CLEAR_BODY, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -12589,8 +12210,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_DRIZZLE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_DRIZZLE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -12622,8 +12242,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_DROUGHT, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_DROUGHT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -12655,8 +12274,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_AIR_LOCK, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_AIR_LOCK, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -12688,8 +12306,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_LEVITATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -12721,8 +12338,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_LEVITATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -12754,8 +12370,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_SERENE_GRACE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_SERENE_GRACE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -12787,8 +12402,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_SLOW, .eggGroup1 = EGG_GROUP_UNDISCOVERED, .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .ability1 = ABILITY_PRESSURE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = TRUE, @@ -12820,8 +12434,7 @@ const struct BaseStats gBaseStats[] = .growthRate = GROWTH_FAST, .eggGroup1 = EGG_GROUP_AMORPHOUS, .eggGroup2 = EGG_GROUP_AMORPHOUS, - .ability1 = ABILITY_LEVITATE, - .ability2 = ABILITY_NONE, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, diff --git a/src/data/pokemon/trainer_class_lookups.h b/src/data/pokemon/trainer_class_lookups.h index 04c7ab3c4..0f2b53a18 100644 --- a/src/data/pokemon/trainer_class_lookups.h +++ b/src/data/pokemon/trainer_class_lookups.h @@ -166,7 +166,6 @@ const u8 gFacilityClassToTrainerClass[] = [FACILITY_CLASS_DOME_ACE_TUCKER] = TRAINER_CLASS_DOME_ACE, [FACILITY_CLASS_RED] = TRAINER_CLASS_PKMN_TRAINER_3, [FACILITY_CLASS_LEAF] = TRAINER_CLASS_PKMN_TRAINER_3, - [FACILITY_CLASS_RS_BRENDAN] = TRAINER_CLASS_PKMN_TRAINER_4, - [FACILITY_CLASS_RS_MAY] = TRAINER_CLASS_PKMN_TRAINER_4, + [FACILITY_CLASS_RS_BRENDAN] = TRAINER_CLASS_RS_PROTAG, + [FACILITY_CLASS_RS_MAY] = TRAINER_CLASS_RS_PROTAG, }; - diff --git a/src/data/region_map/city_map_entries.h b/src/data/region_map/city_map_entries.h new file mode 100644 index 000000000..7b8361a7c --- /dev/null +++ b/src/data/region_map/city_map_entries.h @@ -0,0 +1,113 @@ +const struct CityMapEntry gPokenavCityMaps[] = +{ + { + .mapSecId = 0, + .index = 0, + .tilemap = gPokenavCityMap_Littleroot_0, + }, + { + .mapSecId = 1, + .index = 0, + .tilemap = gPokenavCityMap_Oldale_0, + }, + { + .mapSecId = 2, + .index = 0, + .tilemap = gPokenavCityMap_Dewford_0, + }, + { + .mapSecId = 3, + .index = 0, + .tilemap = gPokenavCityMap_Lavarige_0, + }, + { + .mapSecId = 4, + .index = 0, + .tilemap = gPokenavCityMap_Fallarbor_0, + }, + { + .mapSecId = 5, + .index = 0, + .tilemap = gPokenavCityMap_Verdanturf_0, + }, + { + .mapSecId = 6, + .index = 0, + .tilemap = gPokenavCityMap_Pacifidlog_0, + }, + { + .mapSecId = 7, + .index = 0, + .tilemap = gPokenavCityMap_Petalburg_0, + }, + { + .mapSecId = 8, + .index = 0, + .tilemap = gPokenavCityMap_Slateport_0, + }, + { + .mapSecId = 8, + .index = 1, + .tilemap = gPokenavCityMap_Slateport_1, + }, + { + .mapSecId = 9, + .index = 0, + .tilemap = gPokenavCityMap_Mauville_0, + }, + { + .mapSecId = 9, + .index = 1, + .tilemap = gPokenavCityMap_Mauville_1, + }, + { + .mapSecId = 10, + .index = 0, + .tilemap = gPokenavCityMap_Rustboro_0, + }, + { + .mapSecId = 10, + .index = 1, + .tilemap = gPokenavCityMap_Rustboro_1, + }, + { + .mapSecId = 11, + .index = 0, + .tilemap = gPokenavCityMap_Fortree_0, + }, + { + .mapSecId = 12, + .index = 0, + .tilemap = gPokenavCityMap_Lilycove_0, + }, + { + .mapSecId = 12, + .index = 1, + .tilemap = gPokenavCityMap_Lilycove_1, + }, + { + .mapSecId = 13, + .index = 0, + .tilemap = gPokenavCityMap_Mossdeep_0, + }, + { + .mapSecId = 13, + .index = 1, + .tilemap = gPokenavCityMap_Mossdeep_1, + }, + { + .mapSecId = 14, + .index = 0, + .tilemap = gPokenavCityMap_Sootopolis_0, + }, + { + .mapSecId = 15, + .index = 0, + .tilemap = gPokenavCityMap_EverGrande_0, + }, + { + .mapSecId = 15, + .index = 1, + .tilemap = gPokenavCityMap_EverGrande_1, + }, +}; diff --git a/src/data/region_map/city_map_tilemaps.h b/src/data/region_map/city_map_tilemaps.h new file mode 100644 index 000000000..8a8a931f9 --- /dev/null +++ b/src/data/region_map/city_map_tilemaps.h @@ -0,0 +1,22 @@ +const u32 gPokenavCityMap_Lavarige_0[] = INCBIN_U32("graphics/pokenav/city_maps/lavaridge_0.bin.lz"); +const u32 gPokenavCityMap_Fallarbor_0[] = INCBIN_U32("graphics/pokenav/city_maps/fallarbor_0.bin.lz"); +const u32 gPokenavCityMap_Fortree_0[] = INCBIN_U32("graphics/pokenav/city_maps/fortree_0.bin.lz"); +const u32 gPokenavCityMap_Slateport_0[] = INCBIN_U32("graphics/pokenav/city_maps/slateport_0.bin.lz"); +const u32 gPokenavCityMap_Slateport_1[] = INCBIN_U32("graphics/pokenav/city_maps/slateport_1.bin.lz"); +const u32 gPokenavCityMap_Rustboro_0[] = INCBIN_U32("graphics/pokenav/city_maps/rustboro_0.bin.lz"); +const u32 gPokenavCityMap_Rustboro_1[] = INCBIN_U32("graphics/pokenav/city_maps/rustboro_1.bin.lz"); +const u32 gPokenavCityMap_Pacifidlog_0[] = INCBIN_U32("graphics/pokenav/city_maps/pacifidlog_0.bin.lz"); +const u32 gPokenavCityMap_Mauville_1[] = INCBIN_U32("graphics/pokenav/city_maps/mauville_1.bin.lz"); +const u32 gPokenavCityMap_Mauville_0[] = INCBIN_U32("graphics/pokenav/city_maps/mauville_0.bin.lz"); +const u32 gPokenavCityMap_Oldale_0[] = INCBIN_U32("graphics/pokenav/city_maps/oldale_0.bin.lz"); +const u32 gPokenavCityMap_Lilycove_1[] = INCBIN_U32("graphics/pokenav/city_maps/lilycove_1.bin.lz"); +const u32 gPokenavCityMap_Lilycove_0[] = INCBIN_U32("graphics/pokenav/city_maps/lilycove_0.bin.lz"); +const u32 gPokenavCityMap_Littleroot_0[] = INCBIN_U32("graphics/pokenav/city_maps/littleroot_0.bin.lz"); +const u32 gPokenavCityMap_Dewford_0[] = INCBIN_U32("graphics/pokenav/city_maps/dewford_0.bin.lz"); +const u32 gPokenavCityMap_Sootopolis_0[] = INCBIN_U32("graphics/pokenav/city_maps/sootopolis_0.bin.lz"); +const u32 gPokenavCityMap_EverGrande_0[] = INCBIN_U32("graphics/pokenav/city_maps/ever_grande_0.bin.lz"); +const u32 gPokenavCityMap_EverGrande_1[] = INCBIN_U32("graphics/pokenav/city_maps/ever_grande_1.bin.lz"); +const u32 gPokenavCityMap_Verdanturf_0[] = INCBIN_U32("graphics/pokenav/city_maps/verdanturf_0.bin.lz"); +const u32 gPokenavCityMap_Mossdeep_1[] = INCBIN_U32("graphics/pokenav/city_maps/mossdeep_1.bin.lz"); +const u32 gPokenavCityMap_Mossdeep_0[] = INCBIN_U32("graphics/pokenav/city_maps/mossdeep_0.bin.lz"); +const u32 gPokenavCityMap_Petalburg_0[] = INCBIN_U32("graphics/pokenav/city_maps/petalburg_0.bin.lz"); diff --git a/src/data/text/gift_ribbon_descriptions.h b/src/data/text/gift_ribbon_descriptions.h new file mode 100644 index 000000000..ea108be18 --- /dev/null +++ b/src/data/text/gift_ribbon_descriptions.h @@ -0,0 +1,115 @@ +const u8 gGiftRibbonDescriptionPart1_2003RegionalTourney[] = _("2003 REGIONAL TOURNEY"); +const u8 gGiftRibbonDescriptionPart2_Champion[] = _("CHAMPION RIBBON"); +const u8 gGiftRibbonDescriptionPart1_2003NationalTourney[] = _("2003 NATIONAL TOURNEY"); +const u8 gGiftRibbonDescriptionPart1_2003GlobalCup[] = _("2003 GLOBAL CUP"); +const u8 gGiftRibbonDescriptionPart2_RunnerUp[] = _("Runner-up RIBBON"); +const u8 gGiftRibbonDescriptionPart2_Semifinalist[] = _("Semifinalist RIBBON"); +const u8 gGiftRibbonDescriptionPart1_2004RegionalTourney[] = _("2004 REGIONAL TOURNEY"); +const u8 gGiftRibbonDescriptionPart1_2004NationalTourney[] = _("2004 NATIONAL TOURNEY"); +const u8 gGiftRibbonDescriptionPart1_2004GlobalCup[] = _("2004 GLOBAL CUP"); +const u8 gGiftRibbonDescriptionPart1_2005RegionalTourney[] = _("2005 REGIONAL TOURNEY"); +const u8 gGiftRibbonDescriptionPart1_2005NationalTourney[] = _("2005 NATIONAL TOURNEY"); +const u8 gGiftRibbonDescriptionPart1_2005GlobalCup[] = _("2005 GLOBAL CUP"); +const u8 gGiftRibbonDescriptionPart1_PokemonBattleCup[] = _("POKéMON BATTLE CUP"); +const u8 gGiftRibbonDescriptionPart2_Participation[] = _("Participation RIBBON"); +const u8 gGiftRibbonDescriptionPart1_PokemonLeague[] = _("POKéMON LEAGUE"); +const u8 gGiftRibbonDescriptionPart1_AdvanceCup[] = _("ADVANCE CUP"); +const u8 gGiftRibbonDescriptionPart1_PokemonTournament[] = _("POKéMON Tournament"); +const u8 gGiftRibbonDescriptionPart2_Participation2[] = _("Participation RIBBON"); +const u8 gGiftRibbonDescriptionPart1_PokemonEvent[] = _("POKéMON Event"); +const u8 gGiftRibbonDescriptionPart1_PokemonFestival[] = _("POKéMON Festival"); +const u8 gGiftRibbonDescriptionPart1_DifficultyClearing[] = _("Difficulty-clearing"); +const u8 gGiftRibbonDescriptionPart2_Commemorative[] = _("Commemorative RIBBON"); +const u8 gGiftRibbonDescriptionPart1_ClearingAllChallenges[] = _("RIBBON awarded for"); +const u8 gGiftRibbonDescriptionPart2_ClearingAllChallenges[] = _("clearing all challenges."); +const u8 gGiftRibbonDescriptionPart1_100StraightWin[] = _("100-straight Win"); +const u8 gGiftRibbonDescriptionPart1_DarknessTower[] = _("DARKNESS TOWER Clear"); +const u8 gGiftRibbonDescriptionPart1_RedTower[] = _("RED TOWER Clear"); +const u8 gGiftRibbonDescriptionPart1_BlackironTower[] = _("BLACKIRON TOWER Clear"); +const u8 gGiftRibbonDescriptionPart1_FinalTower[] = _("FINAL TOWER Clear"); +const u8 gGiftRibbonDescriptionPart1_LegendMaking[] = _("Legend-making"); +const u8 gGiftRibbonDescriptionPart1_PokemonCenterTokyo[] = _("POKéMON CENTER TOKYO"); +const u8 gGiftRibbonDescriptionPart1_PokemonCenterOsaka[] = _("POKéMON CENTER OSAKA"); +const u8 gGiftRibbonDescriptionPart1_PokemonCenterNagoya[] = _("POKéMON CENTER NAGOYA"); +const u8 gGiftRibbonDescriptionPart1_PokemonCenterNY[] = _("POKéMON CENTER NY"); +const u8 gGiftRibbonDescriptionPart1_SummerHolidays[] = _("Summer Holidays RIBBON"); +const u8 gGiftRibbonDescriptionPart2_EmptyString[] = _(""); +const u8 gGiftRibbonDescriptionPart1_WinterHolidays[] = _("Winter Holidays RIBBON"); +const u8 gGiftRibbonDescriptionPart1_SpringHolidays[] = _("Spring Holidays RIBBON"); +const u8 gGiftRibbonDescriptionPart1_Evergreen[] = _("Evergreen RIBBON"); +const u8 gGiftRibbonDescriptionPart1_SpecialHoliday[] = _("Special Holiday RIBBON"); +const u8 gGiftRibbonDescriptionPart1_HardWorker[] = _("Hard Worker RIBBON"); +const u8 gGiftRibbonDescriptionPart1_LotsOfFriends[] = _("Lots of Friends RIBBON"); +const u8 gGiftRibbonDescriptionPart1_FullOfEnergy[] = _("Full of Energy RIBBON"); +const u8 gGiftRibbonDescriptionPart1_LovedPokemon[] = _("A commemorative RIBBON"); +const u8 gGiftRibbonDescriptionPart2_LovedPokemon[] = _("for a loved POKéMON."); +const u8 gGiftRibbonDescriptionPart1_LoveForPokemon[] = _("RIBBON that shows"); +const u8 gGiftRibbonDescriptionPart2_LoveForPokemon[] = _("love for POKéMON."); + +const u8 *const gGiftRibbonDescriptionPointers[][2] = +{ + {gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Participation}, + {gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Participation}, + {gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Participation}, + {gGiftRibbonDescriptionPart1_PokemonTournament, gGiftRibbonDescriptionPart2_Participation2}, + {gGiftRibbonDescriptionPart1_PokemonEvent, gGiftRibbonDescriptionPart2_Participation2}, + {gGiftRibbonDescriptionPart1_PokemonFestival, gGiftRibbonDescriptionPart2_Participation2}, + {gGiftRibbonDescriptionPart1_DifficultyClearing, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_ClearingAllChallenges, gGiftRibbonDescriptionPart2_ClearingAllChallenges}, + {gGiftRibbonDescriptionPart1_100StraightWin, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_DarknessTower, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_RedTower, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_BlackironTower, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_FinalTower, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_LegendMaking, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_PokemonCenterTokyo, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_PokemonCenterOsaka, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_PokemonCenterNagoya, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_PokemonCenterNY, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_SummerHolidays, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_WinterHolidays, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_SpringHolidays, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_Evergreen, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_SpecialHoliday, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_HardWorker, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_LotsOfFriends, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_FullOfEnergy, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_LovedPokemon, gGiftRibbonDescriptionPart2_LovedPokemon}, + {gGiftRibbonDescriptionPart1_LoveForPokemon, gGiftRibbonDescriptionPart2_LoveForPokemon} +}; diff --git a/src/data/text/match_call_messages.h b/src/data/text/match_call_messages.h new file mode 100644 index 000000000..c3015b5a7 --- /dev/null +++ b/src/data/text/match_call_messages.h @@ -0,0 +1,476 @@ +#define MCFLAVOR(name) {gMatchCallFlavorText_##name##_Strategy, \ + gMatchCallFlavorText_##name##_Pokemon, \ + gMatchCallFlavorText_##name##_Intro1, \ + gMatchCallFlavorText_##name##_Intro2} + +const u8 gMatchCallFlavorText_AromaLady_Rose_Strategy[] = _("Becalm fighting emotions."); +const u8 gMatchCallFlavorText_AromaLady_Rose_Pokemon[] = _("Fragrant GRASS POKéMON."); +const u8 gMatchCallFlavorText_AromaLady_Rose_Intro1[] = _("Soothing aromas make the"); +const u8 gMatchCallFlavorText_AromaLady_Rose_Intro2[] = _("body and mind healthy."); + +const u8 gMatchCallFlavorText_RuinManiac_Andres_Strategy[] = _("I'm not very good at this."); +const u8 gMatchCallFlavorText_RuinManiac_Andres_Pokemon[] = _("Ruin-exploration partners."); +const u8 gMatchCallFlavorText_RuinManiac_Andres_Intro1[] = _("I am searching for undersea"); +const u8 gMatchCallFlavorText_RuinManiac_Andres_Intro2[] = _("ruins and relics."); + +const u8 gMatchCallFlavorText_RuinManiac_Dusty_Strategy[] = _("Overwhelm with power!"); +const u8 gMatchCallFlavorText_RuinManiac_Dusty_Pokemon[] = _("Craggy ROCK POKéMON."); +const u8 gMatchCallFlavorText_RuinManiac_Dusty_Intro1[] = _("In search of ancient lore,"); +const u8 gMatchCallFlavorText_RuinManiac_Dusty_Intro2[] = _("I travel the world."); + +const u8 gMatchCallFlavorText_Tuber_Lola_Strategy[] = _("I'm going to try hard!"); +const u8 gMatchCallFlavorText_Tuber_Lola_Pokemon[] = _("Good swimmer POKéMON."); +const u8 gMatchCallFlavorText_Tuber_Lola_Intro1[] = _("I wish I could swim without"); +const u8 gMatchCallFlavorText_Tuber_Lola_Intro2[] = _("using an inner tube."); + +const u8 gMatchCallFlavorText_Tuber_Ricky_Strategy[] = _("I don't know. I'll try hard."); +const u8 gMatchCallFlavorText_Tuber_Ricky_Pokemon[] = _("WATER POKéMON are buddies."); +const u8 gMatchCallFlavorText_Tuber_Ricky_Intro1[] = _("It's not like I can't swim."); +const u8 gMatchCallFlavorText_Tuber_Ricky_Intro2[] = _("I just like my inner tube."); + +const u8 gMatchCallFlavorText_SisAndBro_LilaAndRoy_Strategy[] = _("We split our duties."); +const u8 gMatchCallFlavorText_SisAndBro_LilaAndRoy_Pokemon[] = _("We like friendly POKéMON."); +const u8 gMatchCallFlavorText_SisAndBro_LilaAndRoy_Intro1[] = _("We enjoy POKéMON together"); +const u8 gMatchCallFlavorText_SisAndBro_LilaAndRoy_Intro2[] = _("as sister and brother."); + +const u8 gMatchCallFlavorText_Cooltrainer_Cristin_Strategy[] = _("I finish with power moves!"); +const u8 gMatchCallFlavorText_Cooltrainer_Cristin_Pokemon[] = _("A mix of different types."); +const u8 gMatchCallFlavorText_Cooltrainer_Cristin_Intro1[] = _("I aim to become the ultimate"); +const u8 gMatchCallFlavorText_Cooltrainer_Cristin_Intro2[] = _("TRAINER!"); + +const u8 gMatchCallFlavorText_Cooltrainer_Brooke_Strategy[] = _("Exploit the foe's weakness."); +const u8 gMatchCallFlavorText_Cooltrainer_Brooke_Pokemon[] = _("Balance is crucial."); +const u8 gMatchCallFlavorText_Cooltrainer_Brooke_Intro1[] = _("My goal is to become the"); +const u8 gMatchCallFlavorText_Cooltrainer_Brooke_Intro2[] = _("POKéMON CHAMPION."); + +const u8 gMatchCallFlavorText_Cooltrainer_Wilton_Strategy[] = _("Upset the opponent."); +const u8 gMatchCallFlavorText_Cooltrainer_Wilton_Pokemon[] = _("Type doesn't matter."); +const u8 gMatchCallFlavorText_Cooltrainer_Wilton_Intro1[] = _("I'm a top student at the"); +const u8 gMatchCallFlavorText_Cooltrainer_Wilton_Intro2[] = _("TRAINER'S SCHOOL."); + +const u8 gMatchCallFlavorText_HexManiac_Valerie_Strategy[] = _("Slow, steady suffering."); +const u8 gMatchCallFlavorText_HexManiac_Valerie_Pokemon[] = _("Scary to meet at night."); +const u8 gMatchCallFlavorText_HexManiac_Valerie_Intro1[] = _("I see things that others"); +const u8 gMatchCallFlavorText_HexManiac_Valerie_Intro2[] = _("can't see..."); + +const u8 gMatchCallFlavorText_Lady_Cindy_Strategy[] = _("Anything to win."); +const u8 gMatchCallFlavorText_Lady_Cindy_Pokemon[] = _("Gorgeous type!"); +const u8 gMatchCallFlavorText_Lady_Cindy_Intro1[] = _("I have a pool specially for"); +const u8 gMatchCallFlavorText_Lady_Cindy_Intro2[] = _("my POKéMON at home."); + +const u8 gMatchCallFlavorText_Beauty_Thalia_Strategy[] = _("You'll fall under my spell!"); +const u8 gMatchCallFlavorText_Beauty_Thalia_Pokemon[] = _("Mature WATER type."); +const u8 gMatchCallFlavorText_Beauty_Thalia_Intro1[] = _("I dream of cruising around"); +const u8 gMatchCallFlavorText_Beauty_Thalia_Intro2[] = _("the world on a luxury liner."); + +const u8 gMatchCallFlavorText_Beauty_Jessica_Strategy[] = _("I'll lead you astray."); +const u8 gMatchCallFlavorText_Beauty_Jessica_Pokemon[] = _("Cute, of course."); +const u8 gMatchCallFlavorText_Beauty_Jessica_Intro1[] = _("I love the SAFARI ZONE."); +const u8 gMatchCallFlavorText_Beauty_Jessica_Intro2[] = _("I seem to end up there."); + +const u8 gMatchCallFlavorText_RichBoy_Winston_Strategy[] = _("Strategy? Who needs it?"); +const u8 gMatchCallFlavorText_RichBoy_Winston_Pokemon[] = _("I spent big money on it!"); +const u8 gMatchCallFlavorText_RichBoy_Winston_Intro1[] = _("I, being rich, sleep in a"); +const u8 gMatchCallFlavorText_RichBoy_Winston_Intro2[] = _("custom POKéMON bed."); + +const u8 gMatchCallFlavorText_PokeManiac_Steve_Strategy[] = _("Wrestle down with power."); +const u8 gMatchCallFlavorText_PokeManiac_Steve_Pokemon[] = _("Took all night to catch."); +const u8 gMatchCallFlavorText_PokeManiac_Steve_Intro1[] = _("Big, burly, and buff"); +const u8 gMatchCallFlavorText_PokeManiac_Steve_Intro2[] = _("POKéMON are the best..."); + +const u8 gMatchCallFlavorText_Swimmer_Tony_Strategy[] = _("Ram at full speed!"); +const u8 gMatchCallFlavorText_Swimmer_Tony_Pokemon[] = _("Funky WATER type!"); +const u8 gMatchCallFlavorText_Swimmer_Tony_Intro1[] = _("If I can't be out swimming,"); +const u8 gMatchCallFlavorText_Swimmer_Tony_Intro2[] = _("I'll be pumping weights."); + +const u8 gMatchCallFlavorText_BlackBelt_Nob_Strategy[] = _("Grand slam pummeling!"); +const u8 gMatchCallFlavorText_BlackBelt_Nob_Pokemon[] = _("FIGHTING type."); +const u8 gMatchCallFlavorText_BlackBelt_Nob_Intro1[] = _("Not to brag, but I can bust"); +const u8 gMatchCallFlavorText_BlackBelt_Nob_Intro2[] = _("ten roof tiles!"); + +const u8 gMatchCallFlavorText_BlackBelt_Koji_Strategy[] = _("Witness karate power!"); +const u8 gMatchCallFlavorText_BlackBelt_Koji_Pokemon[] = _("My partners in training!"); +const u8 gMatchCallFlavorText_BlackBelt_Koji_Intro1[] = _("Let us discuss matters of"); +const u8 gMatchCallFlavorText_BlackBelt_Koji_Intro2[] = _("the world with bare fists!"); + +const u8 gMatchCallFlavorText_Guitarist_Fernando_Strategy[] = _("Rock to stunning sounds!"); +const u8 gMatchCallFlavorText_Guitarist_Fernando_Pokemon[] = _("Electric-and-sound combo!"); +const u8 gMatchCallFlavorText_Guitarist_Fernando_Intro1[] = _("My compositions will shock"); +const u8 gMatchCallFlavorText_Guitarist_Fernando_Intro2[] = _("you and stun you!"); + +const u8 gMatchCallFlavorText_Guitarist_Dalton_Strategy[] = _("I'll electrify you!"); +const u8 gMatchCallFlavorText_Guitarist_Dalton_Pokemon[] = _("They're ELECTRIC!"); +const u8 gMatchCallFlavorText_Guitarist_Dalton_Intro1[] = _("I want to make people cry"); +const u8 gMatchCallFlavorText_Guitarist_Dalton_Intro2[] = _("with songs from my heart."); + +const u8 gMatchCallFlavorText_Kindler_Bernie_Strategy[] = _("Burn it all down!"); +const u8 gMatchCallFlavorText_Kindler_Bernie_Pokemon[] = _("Burn-inducing POKéMON."); +const u8 gMatchCallFlavorText_Kindler_Bernie_Intro1[] = _("When you light a campfire,"); +const u8 gMatchCallFlavorText_Kindler_Bernie_Intro2[] = _("be sure there's some water."); + +const u8 gMatchCallFlavorText_Camper_Ethan_Strategy[] = _("Hang in and be tenacious!"); +const u8 gMatchCallFlavorText_Camper_Ethan_Pokemon[] = _("I'll raise any POKéMON."); +const u8 gMatchCallFlavorText_Camper_Ethan_Intro1[] = _("POKéMON raised in the wild"); +const u8 gMatchCallFlavorText_Camper_Ethan_Intro2[] = _("grow strong!"); + +const u8 gMatchCallFlavorText_OldCouple_JohnAndJay_Strategy[] = _("Our love lets us prevail."); +const u8 gMatchCallFlavorText_OldCouple_JohnAndJay_Pokemon[] = _("We've had them for years."); +const u8 gMatchCallFlavorText_OldCouple_JohnAndJay_Intro1[] = _("Married 50 years, we've"); +const u8 gMatchCallFlavorText_OldCouple_JohnAndJay_Intro2[] = _("devotedly raised POKéMON."); + +const u8 gMatchCallFlavorText_BugManiac_Jeffrey_Strategy[] = _("Attack in waves!"); +const u8 gMatchCallFlavorText_BugManiac_Jeffrey_Pokemon[] = _("BUG POKéMON are cool."); +const u8 gMatchCallFlavorText_BugManiac_Jeffrey_Intro1[] = _("I go into the forest every"); +const u8 gMatchCallFlavorText_BugManiac_Jeffrey_Intro2[] = _("day to catch BUG POKéMON."); + +const u8 gMatchCallFlavorText_Psychic_Cameron_Strategy[] = _("Daze and confuse!"); +const u8 gMatchCallFlavorText_Psychic_Cameron_Pokemon[] = _("Ones with weird powers."); +const u8 gMatchCallFlavorText_Psychic_Cameron_Intro1[] = _("I can see through exactly"); +const u8 gMatchCallFlavorText_Psychic_Cameron_Intro2[] = _("what you're thinking!"); + +const u8 gMatchCallFlavorText_Psychic_Jacki_Strategy[] = _("Battle at full power."); +const u8 gMatchCallFlavorText_Psychic_Jacki_Pokemon[] = _("POKéMON of many mysteries."); +const u8 gMatchCallFlavorText_Psychic_Jacki_Intro1[] = _("When we spoke, I was really"); +const u8 gMatchCallFlavorText_Psychic_Jacki_Intro2[] = _("using telepathy."); + +const u8 gMatchCallFlavorText_Gentleman_Walter_Strategy[] = _("Calm and collected."); +const u8 gMatchCallFlavorText_Gentleman_Walter_Pokemon[] = _("POKéMON of distinction."); +const u8 gMatchCallFlavorText_Gentleman_Walter_Intro1[] = _("We enjoy a spot of tea"); +const u8 gMatchCallFlavorText_Gentleman_Walter_Intro2[] = _("every day. It's imported."); + +const u8 gMatchCallFlavorText_SchoolKid_Karen_Strategy[] = _("I use my head to battle."); +const u8 gMatchCallFlavorText_SchoolKid_Karen_Pokemon[] = _("I love any kind of POKéMON!"); +const u8 gMatchCallFlavorText_SchoolKid_Karen_Intro1[] = _("My daddy gives me spending"); +const u8 gMatchCallFlavorText_SchoolKid_Karen_Intro2[] = _("money if I ace a test."); + +const u8 gMatchCallFlavorText_SchoolKid_Jerry_Strategy[] = _("My knowledge rules!"); +const u8 gMatchCallFlavorText_SchoolKid_Jerry_Pokemon[] = _("Any smart POKéMON!"); +const u8 gMatchCallFlavorText_SchoolKid_Jerry_Intro1[] = _("I want to be a POKéMON"); +const u8 gMatchCallFlavorText_SchoolKid_Jerry_Intro2[] = _("researcher in the future."); + +const u8 gMatchCallFlavorText_SrAndJr_AnnaAndMeg_Strategy[] = _("We talk it over first."); +const u8 gMatchCallFlavorText_SrAndJr_AnnaAndMeg_Pokemon[] = _("POKéMON that we both like."); +const u8 gMatchCallFlavorText_SrAndJr_AnnaAndMeg_Intro1[] = _("We're senior and junior"); +const u8 gMatchCallFlavorText_SrAndJr_AnnaAndMeg_Intro2[] = _("students into POKéMON!"); + +const u8 gMatchCallFlavorText_Pokefan_Isabel_Strategy[] = _("Go for it, my dears!"); +const u8 gMatchCallFlavorText_Pokefan_Isabel_Pokemon[] = _("I have no likes or dislikes."); +const u8 gMatchCallFlavorText_Pokefan_Isabel_Intro1[] = _("While out shopping for"); +const u8 gMatchCallFlavorText_Pokefan_Isabel_Intro2[] = _("supper, I battle too."); + +const u8 gMatchCallFlavorText_Pokefan_Miguel_Strategy[] = _("I battle with love!"); +const u8 gMatchCallFlavorText_Pokefan_Miguel_Pokemon[] = _("A POKéMON raised with love!"); +const u8 gMatchCallFlavorText_Pokefan_Miguel_Intro1[] = _("It's important to build"); +const u8 gMatchCallFlavorText_Pokefan_Miguel_Intro2[] = _("trust with your POKéMON."); + +const u8 gMatchCallFlavorText_Expert_Timothy_Strategy[] = _("I see through your moves!"); +const u8 gMatchCallFlavorText_Expert_Timothy_Pokemon[] = _("The essence of FIGHTING."); +const u8 gMatchCallFlavorText_Expert_Timothy_Intro1[] = _("I'm not ready to give way"); +const u8 gMatchCallFlavorText_Expert_Timothy_Intro2[] = _("to the young yet!"); + +const u8 gMatchCallFlavorText_Expert_Shelby_Strategy[] = _("Attack while defending."); +const u8 gMatchCallFlavorText_Expert_Shelby_Pokemon[] = _("The FIGHTING type."); +const u8 gMatchCallFlavorText_Expert_Shelby_Intro1[] = _("Being old, I have my own"); +const u8 gMatchCallFlavorText_Expert_Shelby_Intro2[] = _("style of battling."); + +const u8 gMatchCallFlavorText_Youngster_Calvin_Strategy[] = _("I do what I can."); +const u8 gMatchCallFlavorText_Youngster_Calvin_Pokemon[] = _("I use different types."); +const u8 gMatchCallFlavorText_Youngster_Calvin_Intro1[] = _("I'm going to keep working"); +const u8 gMatchCallFlavorText_Youngster_Calvin_Intro2[] = _("until I beat a GYM LEADER."); + +const u8 gMatchCallFlavorText_Fisherman_Elliot_Strategy[] = _("I battle patiently."); +const u8 gMatchCallFlavorText_Fisherman_Elliot_Pokemon[] = _("WATER POKéMON to battle!"); +const u8 gMatchCallFlavorText_Fisherman_Elliot_Intro1[] = _("I'm the world's only guy to"); +const u8 gMatchCallFlavorText_Fisherman_Elliot_Intro2[] = _("catch a huge POKéMON!"); + +const u8 gMatchCallFlavorText_Triathlete_Isaiah_Strategy[] = _("Exploit the environment!"); +const u8 gMatchCallFlavorText_Triathlete_Isaiah_Pokemon[] = _("All hail the WATER type!"); +const u8 gMatchCallFlavorText_Triathlete_Isaiah_Intro1[] = _("I won't be beaten by some"); +const u8 gMatchCallFlavorText_Triathlete_Isaiah_Intro2[] = _("beach bum SWIMMER!"); + +const u8 gMatchCallFlavorText_Triathlete_Maria_Strategy[] = _("Speed above all!"); +const u8 gMatchCallFlavorText_Triathlete_Maria_Pokemon[] = _("I use a speedy POKéMON."); +const u8 gMatchCallFlavorText_Triathlete_Maria_Intro1[] = _("A marathon is a challenge"); +const u8 gMatchCallFlavorText_Triathlete_Maria_Intro2[] = _("against your own self."); + +const u8 gMatchCallFlavorText_Triathlete_Abigail_Strategy[] = _("Defense is crucial."); +const u8 gMatchCallFlavorText_Triathlete_Abigail_Pokemon[] = _("My POKéMON is solid."); +const u8 gMatchCallFlavorText_Triathlete_Abigail_Intro1[] = _("I started this for dieting,"); +const u8 gMatchCallFlavorText_Triathlete_Abigail_Intro2[] = _("but I got right into it."); + +const u8 gMatchCallFlavorText_Triathlete_Dylan_Strategy[] = _("Strike before stricken!"); +const u8 gMatchCallFlavorText_Triathlete_Dylan_Pokemon[] = _("A fast-running POKéMON!"); +const u8 gMatchCallFlavorText_Triathlete_Dylan_Intro1[] = _("If you ran and ran, you'd"); +const u8 gMatchCallFlavorText_Triathlete_Dylan_Intro2[] = _("become one with the wind."); + +const u8 gMatchCallFlavorText_Triathlete_Katelyn_Strategy[] = _("All-out offensive!"); +const u8 gMatchCallFlavorText_Triathlete_Katelyn_Pokemon[] = _("WATER POKéMON rule!"); +const u8 gMatchCallFlavorText_Triathlete_Katelyn_Intro1[] = _("I must swim over 6 miles"); +const u8 gMatchCallFlavorText_Triathlete_Katelyn_Intro2[] = _("every day."); + +const u8 gMatchCallFlavorText_Triathlete_Benjamin_Strategy[] = _("Push and push again!"); +const u8 gMatchCallFlavorText_Triathlete_Benjamin_Pokemon[] = _("The strength of STEEL."); +const u8 gMatchCallFlavorText_Triathlete_Benjamin_Intro1[] = _("If you're sweating, get"); +const u8 gMatchCallFlavorText_Triathlete_Benjamin_Intro2[] = _("fluids into you regularly."); + +const u8 gMatchCallFlavorText_Triathlete_Pablo_Strategy[] = _("Draw the power of WATER."); +const u8 gMatchCallFlavorText_Triathlete_Pablo_Pokemon[] = _("Toughened WATER POKéMON."); +const u8 gMatchCallFlavorText_Triathlete_Pablo_Intro1[] = _("Training POKéMON is good,"); +const u8 gMatchCallFlavorText_Triathlete_Pablo_Intro2[] = _("but don't neglect yourself."); + +const u8 gMatchCallFlavorText_DragonTamer_Nicolas_Strategy[] = _("It's about POKéMON power!"); +const u8 gMatchCallFlavorText_DragonTamer_Nicolas_Pokemon[] = _("See the power of DRAGONS!"); +const u8 gMatchCallFlavorText_DragonTamer_Nicolas_Intro1[] = _("I'll become legendary as the"); +const u8 gMatchCallFlavorText_DragonTamer_Nicolas_Intro2[] = _("strongest one day!"); + +const u8 gMatchCallFlavorText_BirdKeeper_Robert_Strategy[] = _("I'll show you my technique!"); +const u8 gMatchCallFlavorText_BirdKeeper_Robert_Pokemon[] = _("Elegantly wheeling BIRDS."); +const u8 gMatchCallFlavorText_BirdKeeper_Robert_Intro1[] = _("My BIRD POKéMON, deliver my"); +const u8 gMatchCallFlavorText_BirdKeeper_Robert_Intro2[] = _("love to that girl!"); + +const u8 gMatchCallFlavorText_NinjaBoy_Lao_Strategy[] = _("You'll suffer from poison!"); +const u8 gMatchCallFlavorText_NinjaBoy_Lao_Pokemon[] = _("Poisonous POKéMON."); +const u8 gMatchCallFlavorText_NinjaBoy_Lao_Intro1[] = _("I undertake training so"); +const u8 gMatchCallFlavorText_NinjaBoy_Lao_Intro2[] = _("that I may become a ninja."); + +const u8 gMatchCallFlavorText_BattleGirl_Cyndy_Strategy[] = _("The first strike wins!"); +const u8 gMatchCallFlavorText_BattleGirl_Cyndy_Pokemon[] = _("Speedy FIGHTING type."); +const u8 gMatchCallFlavorText_BattleGirl_Cyndy_Intro1[] = _("If my POKéMON lose,"); +const u8 gMatchCallFlavorText_BattleGirl_Cyndy_Intro2[] = _("I'll carry on the fight!"); + +const u8 gMatchCallFlavorText_ParasolLady_Madeline_Strategy[] = _("Go, go, my POKéMON!"); +const u8 gMatchCallFlavorText_ParasolLady_Madeline_Pokemon[] = _("I'll raise anything."); +const u8 gMatchCallFlavorText_ParasolLady_Madeline_Intro1[] = _("UV rays are your skin's"); +const u8 gMatchCallFlavorText_ParasolLady_Madeline_Intro2[] = _("enemy. Get protected."); + +const u8 gMatchCallFlavorText_Swimmer_Jenny_Strategy[] = _("No mercy!"); +const u8 gMatchCallFlavorText_Swimmer_Jenny_Pokemon[] = _("Cute WATER POKéMON."); +const u8 gMatchCallFlavorText_Swimmer_Jenny_Intro1[] = _("I have too many fans."); +const u8 gMatchCallFlavorText_Swimmer_Jenny_Intro2[] = _("I was interviewed on TV."); + +const u8 gMatchCallFlavorText_Picnicker_Diana_Strategy[] = _("I think about this & that."); +const u8 gMatchCallFlavorText_Picnicker_Diana_Pokemon[] = _("I like all POKéMON."); +const u8 gMatchCallFlavorText_Picnicker_Diana_Intro1[] = _("What lies beyond that"); +const u8 gMatchCallFlavorText_Picnicker_Diana_Intro2[] = _("yonder hill?"); + +const u8 gMatchCallFlavorText_Twins_AmyAndLiv_Strategy[] = _("We battle together!"); +const u8 gMatchCallFlavorText_Twins_AmyAndLiv_Pokemon[] = _("We train together!"); +const u8 gMatchCallFlavorText_Twins_AmyAndLiv_Intro1[] = _("We like the same POKéMON,"); +const u8 gMatchCallFlavorText_Twins_AmyAndLiv_Intro2[] = _("but different desserts."); + +const u8 gMatchCallFlavorText_Sailor_Ernest_Strategy[] = _("I force things with power!"); +const u8 gMatchCallFlavorText_Sailor_Ernest_Pokemon[] = _("WATER and FIGHTING types."); +const u8 gMatchCallFlavorText_Sailor_Ernest_Intro1[] = _("Seamen are rough spirits!"); +const u8 gMatchCallFlavorText_Sailor_Ernest_Intro2[] = _("Any complaints?"); + +const u8 gMatchCallFlavorText_Sailor_Cory_Strategy[] = _("Up for a fight anytime!"); +const u8 gMatchCallFlavorText_Sailor_Cory_Pokemon[] = _("WATER POKéMON are my faves!"); +const u8 gMatchCallFlavorText_Sailor_Cory_Intro1[] = _("If you want to shout loud,"); +const u8 gMatchCallFlavorText_Sailor_Cory_Intro2[] = _("suck in air with your belly!"); + +const u8 gMatchCallFlavorText_Collector_Edwin_Strategy[] = _("Protect POKéMON from harm."); +const u8 gMatchCallFlavorText_Collector_Edwin_Pokemon[] = _("I love rare POKéMON."); +const u8 gMatchCallFlavorText_Collector_Edwin_Intro1[] = _("I want to collect all the"); +const u8 gMatchCallFlavorText_Collector_Edwin_Intro2[] = _("world's rare POKéMON."); + +const u8 gMatchCallFlavorText_PkmnBreeder_Lydia_Strategy[] = _("I count on power."); +const u8 gMatchCallFlavorText_PkmnBreeder_Lydia_Pokemon[] = _("POKéMON are my children."); +const u8 gMatchCallFlavorText_PkmnBreeder_Lydia_Intro1[] = _("It takes knowledge and"); +const u8 gMatchCallFlavorText_PkmnBreeder_Lydia_Intro2[] = _("love to raise POKéMON."); + +const u8 gMatchCallFlavorText_PkmnBreeder_Isaac_Strategy[] = _("Full-on attack!"); +const u8 gMatchCallFlavorText_PkmnBreeder_Isaac_Pokemon[] = _("Anything. I'll raise it."); +const u8 gMatchCallFlavorText_PkmnBreeder_Isaac_Intro1[] = _("I give them {POKEBLOCK}S for"); +const u8 gMatchCallFlavorText_PkmnBreeder_Isaac_Intro2[] = _("going after CONTEST titles."); + +const u8 gMatchCallFlavorText_PkmnBreeder_Gabrielle_Strategy[] = _("I raise POKéMON with care."); +const u8 gMatchCallFlavorText_PkmnBreeder_Gabrielle_Pokemon[] = _("Fun-to-raise POKéMON."); +const u8 gMatchCallFlavorText_PkmnBreeder_Gabrielle_Intro1[] = _("Treat every POKéMON you"); +const u8 gMatchCallFlavorText_PkmnBreeder_Gabrielle_Intro2[] = _("meet with respect."); + +const u8 gMatchCallFlavorText_PkmnRanger_Catherine_Strategy[] = _("I believe in my POKéMON."); +const u8 gMatchCallFlavorText_PkmnRanger_Catherine_Pokemon[] = _("I like strong POKéMON."); +const u8 gMatchCallFlavorText_PkmnRanger_Catherine_Intro1[] = _("I'm training for rescue"); +const u8 gMatchCallFlavorText_PkmnRanger_Catherine_Intro2[] = _("work with my POKéMON."); + +const u8 gMatchCallFlavorText_PkmnRanger_Jackson_Strategy[] = _("Attack in waves!"); +const u8 gMatchCallFlavorText_PkmnRanger_Jackson_Pokemon[] = _("I use different types."); +const u8 gMatchCallFlavorText_PkmnRanger_Jackson_Intro1[] = _("Those who destroy nature"); +const u8 gMatchCallFlavorText_PkmnRanger_Jackson_Intro2[] = _("must never be forgiven!"); + +const u8 gMatchCallFlavorText_Lass_Haley_Strategy[] = _("I'll show you some guts!"); +const u8 gMatchCallFlavorText_Lass_Haley_Pokemon[] = _("Cute POKéMON are my faves!"); +const u8 gMatchCallFlavorText_Lass_Haley_Intro1[] = _("After a battle, I always"); +const u8 gMatchCallFlavorText_Lass_Haley_Intro2[] = _("bathe with my POKéMON."); + +const u8 gMatchCallFlavorText_BugCatcher_James_Strategy[] = _("Lightning-fast attack!"); +const u8 gMatchCallFlavorText_BugCatcher_James_Pokemon[] = _("BUG POKéMON are number 1!"); +const u8 gMatchCallFlavorText_BugCatcher_James_Intro1[] = _("If you want to catch BUG"); +const u8 gMatchCallFlavorText_BugCatcher_James_Intro2[] = _("POKéMON, wake up early."); + +const u8 gMatchCallFlavorText_Hiker_Trent_Strategy[] = _("I battle with power."); +const u8 gMatchCallFlavorText_Hiker_Trent_Pokemon[] = _("Hard-bodied POKéMON."); +const u8 gMatchCallFlavorText_Hiker_Trent_Intro1[] = _("I've been planning a month"); +const u8 gMatchCallFlavorText_Hiker_Trent_Intro2[] = _("for today's hike."); + +const u8 gMatchCallFlavorText_Hiker_Sawyer_Strategy[] = _("I like it hot!"); +const u8 gMatchCallFlavorText_Hiker_Sawyer_Pokemon[] = _("Hot POKéMON!"); +const u8 gMatchCallFlavorText_Hiker_Sawyer_Intro1[] = _("As much as I love POKéMON,"); +const u8 gMatchCallFlavorText_Hiker_Sawyer_Intro2[] = _("I surely like hiking!"); + +const u8 gMatchCallFlavorText_YoungCouple_LoisAndHal_Strategy[] = _("Lovey-dovey strategy!"); +const u8 gMatchCallFlavorText_YoungCouple_LoisAndHal_Pokemon[] = _("Lovey-dovey POKéMON!"); +const u8 gMatchCallFlavorText_YoungCouple_LoisAndHal_Intro1[] = _("We're lovey-dovey!"); +const u8 gMatchCallFlavorText_YoungCouple_LoisAndHal_Intro2[] = _("Forever lovey-dovey!"); + +const u8 gMatchCallFlavorText_PkmnTrainer_Wally_Strategy[] = _("We let it all hang out."); +const u8 gMatchCallFlavorText_PkmnTrainer_Wally_Pokemon[] = _("The 1st POKéMON I caught."); +const u8 gMatchCallFlavorText_PkmnTrainer_Wally_Intro1[] = _("POKéMON and I have grown"); +const u8 gMatchCallFlavorText_PkmnTrainer_Wally_Intro2[] = _("stronger together."); + +const u8 gMatchCallFlavorText_RockinWhiz_Roxanne_Strategy[] = _("ROCK-type power attack."); +const u8 gMatchCallFlavorText_RockinWhiz_Roxanne_Pokemon[] = _("I prefer rock-hard POKéMON."); +const u8 gMatchCallFlavorText_RockinWhiz_Roxanne_Intro1[] = _("A LEADER of a big GYM bears"); +const u8 gMatchCallFlavorText_RockinWhiz_Roxanne_Intro2[] = _("a lot of responsibility."); + +const u8 gMatchCallFlavorText_TheBigHit_Brawly_Strategy[] = _("Direct physical action!"); +const u8 gMatchCallFlavorText_TheBigHit_Brawly_Pokemon[] = _("FIGHTING POKéMON rule!"); +const u8 gMatchCallFlavorText_TheBigHit_Brawly_Intro1[] = _("The world awaits me as the"); +const u8 gMatchCallFlavorText_TheBigHit_Brawly_Intro2[] = _("next big wave!"); + +const u8 gMatchCallFlavorText_SwellShock_Wattson_Strategy[] = _("I choose to electrify."); +const u8 gMatchCallFlavorText_SwellShock_Wattson_Pokemon[] = _("Get shocked by electricity!"); +const u8 gMatchCallFlavorText_SwellShock_Wattson_Intro1[] = _("One must never throw a"); +const u8 gMatchCallFlavorText_SwellShock_Wattson_Intro2[] = _("match. Even I must not."); + +const u8 gMatchCallFlavorText_PassionBurn_Flannery_Strategy[] = _("Battle aggressively."); +const u8 gMatchCallFlavorText_PassionBurn_Flannery_Pokemon[] = _("Burn with passion!"); +const u8 gMatchCallFlavorText_PassionBurn_Flannery_Intro1[] = _("Completely wash away daily"); +const u8 gMatchCallFlavorText_PassionBurn_Flannery_Intro2[] = _("fatigue in hot springs!"); + +const u8 gMatchCallFlavorText_ReliableOne_Dad_Strategy[] = _("I flexibly adapt my style."); +const u8 gMatchCallFlavorText_ReliableOne_Dad_Pokemon[] = _("Grown in a balanced manner."); +const u8 gMatchCallFlavorText_ReliableOne_Dad_Intro1[] = _("I walk the 30 minutes from"); +const u8 gMatchCallFlavorText_ReliableOne_Dad_Intro2[] = _("home to here every day."); + +const u8 gMatchCallFlavorText_SkyTamer_Winona_Strategy[] = _("I take advantage of speed."); +const u8 gMatchCallFlavorText_SkyTamer_Winona_Pokemon[] = _("Graceful sky dancers."); +const u8 gMatchCallFlavorText_SkyTamer_Winona_Intro1[] = _("The ultimate would be to"); +const u8 gMatchCallFlavorText_SkyTamer_Winona_Intro2[] = _("live as one with nature."); + +const u8 gMatchCallFlavorText_MysticDuo_TateAndLiza_Strategy[] = _("We battle in cooperation."); +const u8 gMatchCallFlavorText_MysticDuo_TateAndLiza_Pokemon[] = _("Always friendly POKéMON."); +const u8 gMatchCallFlavorText_MysticDuo_TateAndLiza_Intro1[] = _("Papa has trouble telling"); +const u8 gMatchCallFlavorText_MysticDuo_TateAndLiza_Intro2[] = _("the two of us apart!"); + +const u8 gMatchCallFlavorText_DandyCharm_Juan_Strategy[] = _("I use splendid waterpower."); +const u8 gMatchCallFlavorText_DandyCharm_Juan_Pokemon[] = _("POKéMON of elegance!"); +const u8 gMatchCallFlavorText_DandyCharm_Juan_Intro1[] = _("The adulation of beautiful"); +const u8 gMatchCallFlavorText_DandyCharm_Juan_Intro2[] = _("ladies fills me with energy!"); + +const u8 gMatchCallFlavorText_EliteFour_Sidney_Strategy[] = _("Offense over defense!"); +const u8 gMatchCallFlavorText_EliteFour_Sidney_Pokemon[] = _("The DARK side's beauties."); +const u8 gMatchCallFlavorText_EliteFour_Sidney_Intro1[] = _("They said I was a punk, but"); +const u8 gMatchCallFlavorText_EliteFour_Sidney_Intro2[] = _("I'm one of the ELITE FOUR!"); + +const u8 gMatchCallFlavorText_EliteFour_Phoebe_Strategy[] = _("Confuse and confound."); +const u8 gMatchCallFlavorText_EliteFour_Phoebe_Pokemon[] = _("There's nothing definite."); +const u8 gMatchCallFlavorText_EliteFour_Phoebe_Intro1[] = _("I wonder how my grandma at"); +const u8 gMatchCallFlavorText_EliteFour_Phoebe_Intro2[] = _("MT. PYRE is doing?"); + +const u8 gMatchCallFlavorText_EliteFour_Glacia_Strategy[] = _("I use items for help."); +const u8 gMatchCallFlavorText_EliteFour_Glacia_Pokemon[] = _("Flaming passion in icy cold!"); +const u8 gMatchCallFlavorText_EliteFour_Glacia_Intro1[] = _("The ICE type can be better"); +const u8 gMatchCallFlavorText_EliteFour_Glacia_Intro2[] = _("trained in this hot land."); + +const u8 gMatchCallFlavorText_EliteFour_Drake_Strategy[] = _("Harness strong abilities."); +const u8 gMatchCallFlavorText_EliteFour_Drake_Pokemon[] = _("The raw power of DRAGONS!"); +const u8 gMatchCallFlavorText_EliteFour_Drake_Intro1[] = _("I dedicate myself to the"); +const u8 gMatchCallFlavorText_EliteFour_Drake_Intro2[] = _("POKéMON that saved me."); + +const u8 gMatchCallFlavorText_Champion_Wallace_Strategy[] = _("Dignity and respect."); +const u8 gMatchCallFlavorText_Champion_Wallace_Pokemon[] = _("I prefer POKéMON of grace."); +const u8 gMatchCallFlavorText_Champion_Wallace_Intro1[] = _("I represent beauty as"); +const u8 gMatchCallFlavorText_Champion_Wallace_Intro2[] = _("well as intelligence."); + +const u8 *const gMatchCallMessages[][4] = +{ + [REMATCH_ROSE] = MCFLAVOR(AromaLady_Rose), + [REMATCH_ANDRES] = MCFLAVOR(RuinManiac_Andres), + [REMATCH_DUSTY] = MCFLAVOR(RuinManiac_Dusty), + [REMATCH_LOLA] = MCFLAVOR(Tuber_Lola), + [REMATCH_RICKY] = MCFLAVOR(Tuber_Ricky), + [REMATCH_LILA_AND_ROY] = MCFLAVOR(SisAndBro_LilaAndRoy), + [REMATCH_CRISTIN] = MCFLAVOR(Cooltrainer_Cristin), + [REMATCH_BROOKE] = MCFLAVOR(Cooltrainer_Brooke), + [REMATCH_WILTON] = MCFLAVOR(Cooltrainer_Wilton), + [REMATCH_VALERIE] = MCFLAVOR(HexManiac_Valerie), + [REMATCH_CINDY] = MCFLAVOR(Lady_Cindy), + [REMATCH_THALIA] = MCFLAVOR(Beauty_Thalia), + [REMATCH_JESSICA] = MCFLAVOR(Beauty_Jessica), + [REMATCH_WINSTON] = MCFLAVOR(RichBoy_Winston), + [REMATCH_STEVE] = MCFLAVOR(PokeManiac_Steve), + [REMATCH_TONY] = MCFLAVOR(Swimmer_Tony), + [REMATCH_NOB] = MCFLAVOR(BlackBelt_Nob), + [REMATCH_KOJI] = MCFLAVOR(BlackBelt_Koji), + [REMATCH_FERNANDO] = MCFLAVOR(Guitarist_Fernando), + [REMATCH_DALTON] = MCFLAVOR(Guitarist_Dalton), + [REMATCH_BERNIE] = MCFLAVOR(Kindler_Bernie), + [REMATCH_ETHAN] = MCFLAVOR(Camper_Ethan), + [REMATCH_JOHN_AND_JAY] = MCFLAVOR(OldCouple_JohnAndJay), + [REMATCH_JEFFREY] = MCFLAVOR(BugManiac_Jeffrey), + [REMATCH_CAMERON] = MCFLAVOR(Psychic_Cameron), + [REMATCH_JACKI] = MCFLAVOR(Psychic_Jacki), + [REMATCH_WALTER] = MCFLAVOR(Gentleman_Walter), + [REMATCH_KAREN] = MCFLAVOR(SchoolKid_Karen), + [REMATCH_JERRY] = MCFLAVOR(SchoolKid_Jerry), + [REMATCH_ANNA_AND_MEG] = MCFLAVOR(SrAndJr_AnnaAndMeg), + [REMATCH_ISABEL] = MCFLAVOR(Pokefan_Isabel), + [REMATCH_MIGUEL] = MCFLAVOR(Pokefan_Miguel), + [REMATCH_TIMOTHY] = MCFLAVOR(Expert_Timothy), + [REMATCH_SHELBY] = MCFLAVOR(Expert_Shelby), + [REMATCH_CALVIN] = MCFLAVOR(Youngster_Calvin), + [REMATCH_ELLIOT] = MCFLAVOR(Fisherman_Elliot), + [REMATCH_ISAIAH] = MCFLAVOR(Triathlete_Isaiah), + [REMATCH_MARIA] = MCFLAVOR(Triathlete_Maria), + [REMATCH_ABIGAIL] = MCFLAVOR(Triathlete_Abigail), + [REMATCH_DYLAN] = MCFLAVOR(Triathlete_Dylan), + [REMATCH_KATELYN] = MCFLAVOR(Triathlete_Katelyn), + [REMATCH_BENJAMIN] = MCFLAVOR(Triathlete_Benjamin), + [REMATCH_PABLO] = MCFLAVOR(Triathlete_Pablo), + [REMATCH_NICOLAS] = MCFLAVOR(DragonTamer_Nicolas), + [REMATCH_ROBERT] = MCFLAVOR(BirdKeeper_Robert), + [REMATCH_LAO] = MCFLAVOR(NinjaBoy_Lao), + [REMATCH_CYNDY] = MCFLAVOR(BattleGirl_Cyndy), + [REMATCH_MADELINE] = MCFLAVOR(ParasolLady_Madeline), + [REMATCH_JENNY] = MCFLAVOR(Swimmer_Jenny), + [REMATCH_DIANA] = MCFLAVOR(Picnicker_Diana), + [REMATCH_AMY_AND_LIV] = MCFLAVOR(Twins_AmyAndLiv), + [REMATCH_ERNEST] = MCFLAVOR(Sailor_Ernest), + [REMATCH_CORY] = MCFLAVOR(Sailor_Cory), + [REMATCH_EDWIN] = MCFLAVOR(Collector_Edwin), + [REMATCH_LYDIA] = MCFLAVOR(PkmnBreeder_Lydia), + [REMATCH_ISAAC] = MCFLAVOR(PkmnBreeder_Isaac), + [REMATCH_GABRIELLE] = MCFLAVOR(PkmnBreeder_Gabrielle), + [REMATCH_CATHERINE] = MCFLAVOR(PkmnRanger_Catherine), + [REMATCH_JACKSON] = MCFLAVOR(PkmnRanger_Jackson), + [REMATCH_HALEY] = MCFLAVOR(Lass_Haley), + [REMATCH_JAMES] = MCFLAVOR(BugCatcher_James), + [REMATCH_TRENT] = MCFLAVOR(Hiker_Trent), + [REMATCH_SAWYER] = MCFLAVOR(Hiker_Sawyer), + [REMATCH_KIRA_AND_DAN] = MCFLAVOR(YoungCouple_LoisAndHal), + [REMATCH_WALLY_3] = MCFLAVOR(PkmnTrainer_Wally), + [REMATCH_ROXANNE] = MCFLAVOR(RockinWhiz_Roxanne), + [REMATCH_BRAWLY] = MCFLAVOR(TheBigHit_Brawly), + [REMATCH_WATTSON] = MCFLAVOR(SwellShock_Wattson), + [REMATCH_FLANNERY] = MCFLAVOR(PassionBurn_Flannery), + [REMATCH_NORMAN] = MCFLAVOR(ReliableOne_Dad), + [REMATCH_WINONA] = MCFLAVOR(SkyTamer_Winona), + [REMATCH_TATE_AND_LIZA] = MCFLAVOR(MysticDuo_TateAndLiza), + [REMATCH_JUAN] = MCFLAVOR(DandyCharm_Juan), + [REMATCH_SIDNEY] = MCFLAVOR(EliteFour_Sidney), + [REMATCH_PHOEBE] = MCFLAVOR(EliteFour_Phoebe), + [REMATCH_GLACIA] = MCFLAVOR(EliteFour_Glacia), + [REMATCH_DRAKE] = MCFLAVOR(EliteFour_Drake), + [REMATCH_WALLACE] = MCFLAVOR(Champion_Wallace), +}; diff --git a/src/data/text/ribbon_descriptions.h b/src/data/text/ribbon_descriptions.h new file mode 100644 index 000000000..f455a7771 --- /dev/null +++ b/src/data/text/ribbon_descriptions.h @@ -0,0 +1,48 @@ +const u8 gRibbonDescriptionPart1_Champion[] = _("CHAMPION-beating, HALL"); +const u8 gRibbonDescriptionPart2_Champion[] = _("OF FAME Member RIBBON"); +const u8 gRibbonDescriptionPart1_CoolContest[] = _("COOL CONTEST"); +const u8 gRibbonDescriptionPart1_BeautyContest[] = _("BEAUTY CONTEST"); +const u8 gRibbonDescriptionPart1_CuteContest[] = _("CUTE CONTEST"); +const u8 gRibbonDescriptionPart1_SmartContest[] = _("SMART CONTEST"); +const u8 gRibbonDescriptionPart1_ToughContest[] = _("TOUGH CONTEST"); +const u8 gRibbonDescriptionPart2_NormalRank[] = _("Normal Rank winner!"); +const u8 gRibbonDescriptionPart2_SuperRank[] = _("Super Rank winner!"); +const u8 gRibbonDescriptionPart2_HyperRank[] = _("Hyper Rank winner!"); +const u8 gRibbonDescriptionPart2_MasterRank[] = _("Master Rank winner!"); +const u8 gRibbonDescriptionPart1_Winning[] = _("For clearing LV50"); +const u8 gRibbonDescriptionPart2_Winning[] = _("at the BATTLE TOWER."); +const u8 gRibbonDescriptionPart1_Victory[] = _("For clearing Open Level"); +const u8 gRibbonDescriptionPart2_Victory[] = _("at the BATTLE TOWER."); +const u8 gRibbonDescriptionPart1_Artist[] = _("RIBBON for being chosen"); +const u8 gRibbonDescriptionPart2_Artist[] = _("as a super sketch model."); +const u8 gRibbonDescriptionPart1_Effort[] = _("RIBBON awarded for"); +const u8 gRibbonDescriptionPart2_Effort[] = _("being a hard worker."); + +const u8 *const gRibbonDescriptionPointers[][2] = +{ + {gRibbonDescriptionPart1_Champion, gRibbonDescriptionPart2_Champion}, + {gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_NormalRank}, + {gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_SuperRank}, + {gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_HyperRank}, + {gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_MasterRank}, + {gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_NormalRank}, + {gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_SuperRank}, + {gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_HyperRank}, + {gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_MasterRank}, + {gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_NormalRank}, + {gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_SuperRank}, + {gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_HyperRank}, + {gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_MasterRank}, + {gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_NormalRank}, + {gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_SuperRank}, + {gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_HyperRank}, + {gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_MasterRank}, + {gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_NormalRank}, + {gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_SuperRank}, + {gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_HyperRank}, + {gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_MasterRank}, + {gRibbonDescriptionPart1_Winning, gRibbonDescriptionPart2_Winning}, + {gRibbonDescriptionPart1_Victory, gRibbonDescriptionPart2_Victory}, + {gRibbonDescriptionPart1_Artist, gRibbonDescriptionPart2_Artist}, + {gRibbonDescriptionPart1_Effort, gRibbonDescriptionPart2_Effort}, +}; diff --git a/src/data/text/trainer_class_names.h b/src/data/text/trainer_class_names.h index dd750b354..f012e877b 100644 --- a/src/data/text/trainer_class_names.h +++ b/src/data/text/trainer_class_names.h @@ -47,7 +47,7 @@ const u8 gTrainerClassNames[][13] = { [TRAINER_CLASS_SWIMMER_F] = _("SWIMMER♀"), [TRAINER_CLASS_TWINS] = _("TWINS"), [TRAINER_CLASS_SAILOR] = _("SAILOR"), - [TRAINER_CLASS_COOLTRAINER_UNUSED] = _("COOLTRAINER"), + [TRAINER_CLASS_COOLTRAINER_2] = _("COOLTRAINER"), [TRAINER_CLASS_MAGMA_ADMIN] = _("MAGMA ADMIN"), [TRAINER_CLASS_PKMN_TRAINER_3] = _("{PKMN} TRAINER"), [TRAINER_CLASS_BUG_CATCHER] = _("BUG CATCHER"), @@ -64,5 +64,5 @@ const u8 gTrainerClassNames[][13] = { [TRAINER_CLASS_FACTORY_HEAD] = _("FACTORY HEAD"), [TRAINER_CLASS_PIKE_QUEEN] = _("PIKE QUEEN"), [TRAINER_CLASS_PYRAMID_KING] = _("PYRAMID KING"), - [TRAINER_CLASS_PKMN_TRAINER_4] = _("{PKMN} TRAINER"), + [TRAINER_CLASS_RS_PROTAG] = _("{PKMN} TRAINER"), }; diff --git a/src/data/trainers.h b/src/data/trainers.h index 5a92926cc..c30d21afd 100644 --- a/src/data/trainers.h +++ b/src/data/trainers.h @@ -10,7 +10,7 @@ const struct Trainer gTrainers[] = { .doubleBattle = FALSE, .aiFlags = 0, .partySize = 0, - .party = {.NoItemDefaultMoves = NULL } + .party = {.NoItemDefaultMoves = NULL}, }, [TRAINER_SAWYER_1] = @@ -23,8 +23,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Sawyer1 } + .partySize = ARRAY_COUNT(sParty_Sawyer1), + .party = {.NoItemDefaultMoves = sParty_Sawyer1}, }, [TRAINER_GRUNT_1] = @@ -37,8 +37,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt1 } + .partySize = ARRAY_COUNT(sParty_Grunt1), + .party = {.NoItemDefaultMoves = sParty_Grunt1}, }, [TRAINER_GRUNT_2] = @@ -51,8 +51,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Grunt2 } + .partySize = ARRAY_COUNT(sParty_Grunt2), + .party = {.NoItemDefaultMoves = sParty_Grunt2}, }, [TRAINER_GRUNT_3] = @@ -65,8 +65,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt3 } + .partySize = ARRAY_COUNT(sParty_Grunt3), + .party = {.NoItemDefaultMoves = sParty_Grunt3}, }, [TRAINER_GRUNT_4] = @@ -79,8 +79,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt4 } + .partySize = ARRAY_COUNT(sParty_Grunt4), + .party = {.NoItemDefaultMoves = sParty_Grunt4}, }, [TRAINER_GRUNT_5] = @@ -93,8 +93,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt5 } + .partySize = ARRAY_COUNT(sParty_Grunt5), + .party = {.NoItemDefaultMoves = sParty_Grunt5}, }, [TRAINER_GRUNT_6] = @@ -107,8 +107,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt6 } + .partySize = ARRAY_COUNT(sParty_Grunt6), + .party = {.NoItemDefaultMoves = sParty_Grunt6}, }, [TRAINER_GRUNT_7] = @@ -121,8 +121,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt7 } + .partySize = ARRAY_COUNT(sParty_Grunt7), + .party = {.NoItemDefaultMoves = sParty_Grunt7}, }, [TRAINER_GABRIELLE_1] = @@ -135,8 +135,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 6, - .party = {.NoItemDefaultMoves = sParty_Gabrielle1 } + .partySize = ARRAY_COUNT(sParty_Gabrielle1), + .party = {.NoItemDefaultMoves = sParty_Gabrielle1}, }, [TRAINER_GRUNT_8] = @@ -149,8 +149,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt8 } + .partySize = ARRAY_COUNT(sParty_Grunt8), + .party = {.NoItemDefaultMoves = sParty_Grunt8}, }, [TRAINER_MARCEL] = @@ -163,8 +163,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Marcel } + .partySize = ARRAY_COUNT(sParty_Marcel), + .party = {.NoItemDefaultMoves = sParty_Marcel}, }, [TRAINER_ALBERTO] = @@ -177,8 +177,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Alberto } + .partySize = ARRAY_COUNT(sParty_Alberto), + .party = {.NoItemDefaultMoves = sParty_Alberto}, }, [TRAINER_ED] = @@ -191,8 +191,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Ed } + .partySize = ARRAY_COUNT(sParty_Ed), + .party = {.NoItemDefaultMoves = sParty_Ed}, }, [TRAINER_GRUNT_9] = @@ -205,8 +205,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt9 } + .partySize = ARRAY_COUNT(sParty_Grunt9), + .party = {.NoItemDefaultMoves = sParty_Grunt9}, }, [TRAINER_DECLAN] = @@ -219,8 +219,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Declan } + .partySize = ARRAY_COUNT(sParty_Declan), + .party = {.NoItemDefaultMoves = sParty_Declan}, }, [TRAINER_GRUNT_10] = @@ -233,8 +233,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt10 } + .partySize = ARRAY_COUNT(sParty_Grunt10), + .party = {.NoItemDefaultMoves = sParty_Grunt10}, }, [TRAINER_GRUNT_11] = @@ -247,8 +247,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Grunt11 } + .partySize = ARRAY_COUNT(sParty_Grunt11), + .party = {.NoItemDefaultMoves = sParty_Grunt11}, }, [TRAINER_GRUNT_12] = @@ -261,8 +261,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Grunt12 } + .partySize = ARRAY_COUNT(sParty_Grunt12), + .party = {.NoItemDefaultMoves = sParty_Grunt12}, }, [TRAINER_GRUNT_13] = @@ -275,8 +275,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Grunt13 } + .partySize = ARRAY_COUNT(sParty_Grunt13), + .party = {.NoItemDefaultMoves = sParty_Grunt13}, }, [TRAINER_GRUNT_14] = @@ -289,8 +289,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt14 } + .partySize = ARRAY_COUNT(sParty_Grunt14), + .party = {.NoItemDefaultMoves = sParty_Grunt14}, }, [TRAINER_GRUNT_15] = @@ -303,8 +303,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Grunt15 } + .partySize = ARRAY_COUNT(sParty_Grunt15), + .party = {.NoItemDefaultMoves = sParty_Grunt15}, }, [TRAINER_GRUNT_16] = @@ -317,8 +317,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt16 } + .partySize = ARRAY_COUNT(sParty_Grunt16), + .party = {.NoItemDefaultMoves = sParty_Grunt16}, }, [TRAINER_GRUNT_17] = @@ -331,8 +331,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt17 } + .partySize = ARRAY_COUNT(sParty_Grunt17), + .party = {.NoItemDefaultMoves = sParty_Grunt17}, }, [TRAINER_GRUNT_18] = @@ -345,8 +345,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt18 } + .partySize = ARRAY_COUNT(sParty_Grunt18), + .party = {.NoItemDefaultMoves = sParty_Grunt18}, }, [TRAINER_GRUNT_19] = @@ -359,8 +359,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Grunt19 } + .partySize = ARRAY_COUNT(sParty_Grunt19), + .party = {.NoItemDefaultMoves = sParty_Grunt19}, }, [TRAINER_GRUNT_20] = @@ -373,8 +373,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt20 } + .partySize = ARRAY_COUNT(sParty_Grunt20), + .party = {.NoItemDefaultMoves = sParty_Grunt20}, }, [TRAINER_GRUNT_21] = @@ -387,8 +387,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt21 } + .partySize = ARRAY_COUNT(sParty_Grunt21), + .party = {.NoItemDefaultMoves = sParty_Grunt21}, }, [TRAINER_GRUNT_22] = @@ -401,8 +401,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt22 } + .partySize = ARRAY_COUNT(sParty_Grunt22), + .party = {.NoItemDefaultMoves = sParty_Grunt22}, }, [TRAINER_FREDRICK] = @@ -415,8 +415,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Fredrick } + .partySize = ARRAY_COUNT(sParty_Fredrick), + .party = {.NoItemDefaultMoves = sParty_Fredrick}, }, [TRAINER_MATT] = @@ -429,8 +429,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_SUPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Matt } + .partySize = ARRAY_COUNT(sParty_Matt), + .party = {.NoItemDefaultMoves = sParty_Matt}, }, [TRAINER_ZANDER] = @@ -443,8 +443,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Zander } + .partySize = ARRAY_COUNT(sParty_Zander), + .party = {.NoItemDefaultMoves = sParty_Zander}, }, [TRAINER_SHELLY_1] = @@ -457,8 +457,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Shelly1 } + .partySize = ARRAY_COUNT(sParty_Shelly1), + .party = {.NoItemDefaultMoves = sParty_Shelly1}, }, [TRAINER_SHELLY_2] = @@ -471,8 +471,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Shelly2 } + .partySize = ARRAY_COUNT(sParty_Shelly2), + .party = {.NoItemDefaultMoves = sParty_Shelly2}, }, [TRAINER_ARCHIE] = @@ -485,8 +485,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_SUPER_POTION, ITEM_SUPER_POTION, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Archie } + .partySize = ARRAY_COUNT(sParty_Archie), + .party = {.NoItemDefaultMoves = sParty_Archie}, }, [TRAINER_LEAH] = @@ -499,8 +499,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Leah } + .partySize = ARRAY_COUNT(sParty_Leah), + .party = {.NoItemDefaultMoves = sParty_Leah}, }, [TRAINER_DAISY] = @@ -513,8 +513,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Daisy } + .partySize = ARRAY_COUNT(sParty_Daisy), + .party = {.NoItemDefaultMoves = sParty_Daisy}, }, [TRAINER_ROSE_1] = @@ -527,8 +527,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Rose1 } + .partySize = ARRAY_COUNT(sParty_Rose1), + .party = {.NoItemDefaultMoves = sParty_Rose1}, }, [TRAINER_FELIX] = @@ -541,8 +541,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Felix } + .partySize = ARRAY_COUNT(sParty_Felix), + .party = {.NoItemCustomMoves = sParty_Felix}, }, [TRAINER_VIOLET] = @@ -555,8 +555,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Violet } + .partySize = ARRAY_COUNT(sParty_Violet), + .party = {.NoItemDefaultMoves = sParty_Violet}, }, [TRAINER_ROSE_2] = @@ -569,8 +569,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Rose2 } + .partySize = ARRAY_COUNT(sParty_Rose2), + .party = {.NoItemDefaultMoves = sParty_Rose2}, }, [TRAINER_ROSE_3] = @@ -583,8 +583,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Rose3 } + .partySize = ARRAY_COUNT(sParty_Rose3), + .party = {.NoItemDefaultMoves = sParty_Rose3}, }, [TRAINER_ROSE_4] = @@ -597,8 +597,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Rose4 } + .partySize = ARRAY_COUNT(sParty_Rose4), + .party = {.NoItemDefaultMoves = sParty_Rose4}, }, [TRAINER_ROSE_5] = @@ -611,8 +611,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Rose5 } + .partySize = ARRAY_COUNT(sParty_Rose5), + .party = {.NoItemDefaultMoves = sParty_Rose5}, }, [TRAINER_DUSTY_1] = @@ -625,8 +625,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Dusty1 } + .partySize = ARRAY_COUNT(sParty_Dusty1), + .party = {.NoItemCustomMoves = sParty_Dusty1}, }, [TRAINER_CHIP] = @@ -639,8 +639,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemCustomMoves = sParty_Chip } + .partySize = ARRAY_COUNT(sParty_Chip), + .party = {.NoItemCustomMoves = sParty_Chip}, }, [TRAINER_FOSTER] = @@ -653,8 +653,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Foster } + .partySize = ARRAY_COUNT(sParty_Foster), + .party = {.NoItemCustomMoves = sParty_Foster}, }, [TRAINER_DUSTY_2] = @@ -667,8 +667,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Dusty2 } + .partySize = ARRAY_COUNT(sParty_Dusty2), + .party = {.NoItemCustomMoves = sParty_Dusty2}, }, [TRAINER_DUSTY_3] = @@ -681,8 +681,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Dusty3 } + .partySize = ARRAY_COUNT(sParty_Dusty3), + .party = {.NoItemCustomMoves = sParty_Dusty3}, }, [TRAINER_DUSTY_4] = @@ -695,8 +695,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Dusty4 } + .partySize = ARRAY_COUNT(sParty_Dusty4), + .party = {.NoItemCustomMoves = sParty_Dusty4}, }, [TRAINER_DUSTY_5] = @@ -709,8 +709,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Dusty5 } + .partySize = ARRAY_COUNT(sParty_Dusty5), + .party = {.NoItemCustomMoves = sParty_Dusty5}, }, [TRAINER_GABBY_AND_TY_1] = @@ -723,8 +723,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_GabbyAndTy1 } + .partySize = ARRAY_COUNT(sParty_GabbyAndTy1), + .party = {.NoItemDefaultMoves = sParty_GabbyAndTy1}, }, [TRAINER_GABBY_AND_TY_2] = @@ -737,8 +737,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_GabbyAndTy2 } + .partySize = ARRAY_COUNT(sParty_GabbyAndTy2), + .party = {.NoItemDefaultMoves = sParty_GabbyAndTy2}, }, [TRAINER_GABBY_AND_TY_3] = @@ -751,8 +751,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_GabbyAndTy3 } + .partySize = ARRAY_COUNT(sParty_GabbyAndTy3), + .party = {.NoItemDefaultMoves = sParty_GabbyAndTy3}, }, [TRAINER_GABBY_AND_TY_4] = @@ -765,8 +765,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_GabbyAndTy4 } + .partySize = ARRAY_COUNT(sParty_GabbyAndTy4), + .party = {.NoItemDefaultMoves = sParty_GabbyAndTy4}, }, [TRAINER_GABBY_AND_TY_5] = @@ -779,8 +779,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_GabbyAndTy5 } + .partySize = ARRAY_COUNT(sParty_GabbyAndTy5), + .party = {.NoItemDefaultMoves = sParty_GabbyAndTy5}, }, [TRAINER_GABBY_AND_TY_6] = @@ -793,8 +793,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_GabbyAndTy6 } + .partySize = ARRAY_COUNT(sParty_GabbyAndTy6), + .party = {.NoItemCustomMoves = sParty_GabbyAndTy6}, }, [TRAINER_LOLA_1] = @@ -807,8 +807,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Lola1 } + .partySize = ARRAY_COUNT(sParty_Lola1), + .party = {.NoItemDefaultMoves = sParty_Lola1}, }, [TRAINER_AUSTINA] = @@ -821,8 +821,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Austina } + .partySize = ARRAY_COUNT(sParty_Austina), + .party = {.NoItemDefaultMoves = sParty_Austina}, }, [TRAINER_GWEN] = @@ -835,8 +835,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Gwen } + .partySize = ARRAY_COUNT(sParty_Gwen), + .party = {.NoItemDefaultMoves = sParty_Gwen}, }, [TRAINER_LOLA_2] = @@ -849,8 +849,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Lola2 } + .partySize = ARRAY_COUNT(sParty_Lola2), + .party = {.NoItemDefaultMoves = sParty_Lola2}, }, [TRAINER_LOLA_3] = @@ -863,8 +863,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Lola3 } + .partySize = ARRAY_COUNT(sParty_Lola3), + .party = {.NoItemDefaultMoves = sParty_Lola3}, }, [TRAINER_LOLA_4] = @@ -877,8 +877,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Lola4 } + .partySize = ARRAY_COUNT(sParty_Lola4), + .party = {.NoItemDefaultMoves = sParty_Lola4}, }, [TRAINER_LOLA_5] = @@ -891,8 +891,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Lola5 } + .partySize = ARRAY_COUNT(sParty_Lola5), + .party = {.NoItemDefaultMoves = sParty_Lola5}, }, [TRAINER_RICKY_1] = @@ -905,8 +905,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Ricky1 } + .partySize = ARRAY_COUNT(sParty_Ricky1), + .party = {.NoItemCustomMoves = sParty_Ricky1}, }, [TRAINER_SIMON] = @@ -919,8 +919,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Simon } + .partySize = ARRAY_COUNT(sParty_Simon), + .party = {.NoItemDefaultMoves = sParty_Simon}, }, [TRAINER_CHARLIE] = @@ -933,8 +933,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Charlie } + .partySize = ARRAY_COUNT(sParty_Charlie), + .party = {.NoItemDefaultMoves = sParty_Charlie}, }, [TRAINER_RICKY_2] = @@ -947,8 +947,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Ricky2 } + .partySize = ARRAY_COUNT(sParty_Ricky2), + .party = {.NoItemCustomMoves = sParty_Ricky2}, }, [TRAINER_RICKY_3] = @@ -961,8 +961,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Ricky3 } + .partySize = ARRAY_COUNT(sParty_Ricky3), + .party = {.NoItemCustomMoves = sParty_Ricky3}, }, [TRAINER_RICKY_4] = @@ -975,8 +975,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Ricky4 } + .partySize = ARRAY_COUNT(sParty_Ricky4), + .party = {.NoItemCustomMoves = sParty_Ricky4}, }, [TRAINER_RICKY_5] = @@ -989,8 +989,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Ricky5 } + .partySize = ARRAY_COUNT(sParty_Ricky5), + .party = {.NoItemCustomMoves = sParty_Ricky5}, }, [TRAINER_RANDALL] = @@ -1003,8 +1003,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.ItemCustomMoves = sParty_Randall } + .partySize = ARRAY_COUNT(sParty_Randall), + .party = {.ItemCustomMoves = sParty_Randall}, }, [TRAINER_PARKER] = @@ -1017,8 +1017,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.ItemCustomMoves = sParty_Parker } + .partySize = ARRAY_COUNT(sParty_Parker), + .party = {.ItemCustomMoves = sParty_Parker}, }, [TRAINER_GEORGE] = @@ -1031,8 +1031,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.ItemCustomMoves = sParty_George } + .partySize = ARRAY_COUNT(sParty_George), + .party = {.ItemCustomMoves = sParty_George}, }, [TRAINER_BERKE] = @@ -1045,8 +1045,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.ItemCustomMoves = sParty_Berke } + .partySize = ARRAY_COUNT(sParty_Berke), + .party = {.ItemCustomMoves = sParty_Berke}, }, [TRAINER_BRAXTON] = @@ -1059,8 +1059,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 5, - .party = {.NoItemCustomMoves = sParty_Braxton } + .partySize = ARRAY_COUNT(sParty_Braxton), + .party = {.NoItemCustomMoves = sParty_Braxton}, }, [TRAINER_VINCENT] = @@ -1073,8 +1073,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Vincent } + .partySize = ARRAY_COUNT(sParty_Vincent), + .party = {.NoItemDefaultMoves = sParty_Vincent}, }, [TRAINER_LEROY] = @@ -1087,8 +1087,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Leroy } + .partySize = ARRAY_COUNT(sParty_Leroy), + .party = {.NoItemDefaultMoves = sParty_Leroy}, }, [TRAINER_WILTON_1] = @@ -1101,8 +1101,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_SUPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Wilton1 } + .partySize = ARRAY_COUNT(sParty_Wilton1), + .party = {.NoItemDefaultMoves = sParty_Wilton1}, }, [TRAINER_EDGAR] = @@ -1115,8 +1115,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Edgar } + .partySize = ARRAY_COUNT(sParty_Edgar), + .party = {.NoItemDefaultMoves = sParty_Edgar}, }, [TRAINER_ALBERT] = @@ -1129,8 +1129,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Albert } + .partySize = ARRAY_COUNT(sParty_Albert), + .party = {.NoItemDefaultMoves = sParty_Albert}, }, [TRAINER_SAMUEL] = @@ -1143,8 +1143,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Samuel } + .partySize = ARRAY_COUNT(sParty_Samuel), + .party = {.NoItemDefaultMoves = sParty_Samuel}, }, [TRAINER_VITO] = @@ -1157,8 +1157,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 4, - .party = {.NoItemDefaultMoves = sParty_Vito } + .partySize = ARRAY_COUNT(sParty_Vito), + .party = {.NoItemDefaultMoves = sParty_Vito}, }, [TRAINER_OWEN] = @@ -1171,8 +1171,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Owen } + .partySize = ARRAY_COUNT(sParty_Owen), + .party = {.NoItemDefaultMoves = sParty_Owen}, }, [TRAINER_WILTON_2] = @@ -1185,8 +1185,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Wilton2 } + .partySize = ARRAY_COUNT(sParty_Wilton2), + .party = {.NoItemDefaultMoves = sParty_Wilton2}, }, [TRAINER_WILTON_3] = @@ -1199,8 +1199,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Wilton3 } + .partySize = ARRAY_COUNT(sParty_Wilton3), + .party = {.NoItemDefaultMoves = sParty_Wilton3}, }, [TRAINER_WILTON_4] = @@ -1213,8 +1213,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Wilton4 } + .partySize = ARRAY_COUNT(sParty_Wilton4), + .party = {.NoItemDefaultMoves = sParty_Wilton4}, }, [TRAINER_WILTON_5] = @@ -1227,8 +1227,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Wilton5 } + .partySize = ARRAY_COUNT(sParty_Wilton5), + .party = {.NoItemDefaultMoves = sParty_Wilton5}, }, [TRAINER_WARREN] = @@ -1241,8 +1241,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Warren } + .partySize = ARRAY_COUNT(sParty_Warren), + .party = {.NoItemDefaultMoves = sParty_Warren}, }, [TRAINER_MARY] = @@ -1255,8 +1255,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.ItemCustomMoves = sParty_Mary } + .partySize = ARRAY_COUNT(sParty_Mary), + .party = {.ItemCustomMoves = sParty_Mary}, }, [TRAINER_ALEXIA] = @@ -1269,8 +1269,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.ItemCustomMoves = sParty_Alexia } + .partySize = ARRAY_COUNT(sParty_Alexia), + .party = {.ItemCustomMoves = sParty_Alexia}, }, [TRAINER_JODY] = @@ -1283,8 +1283,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_SETUP_FIRST_TURN, - .partySize = 1, - .party = {.ItemCustomMoves = sParty_Jody } + .partySize = ARRAY_COUNT(sParty_Jody), + .party = {.ItemCustomMoves = sParty_Jody}, }, [TRAINER_WENDY] = @@ -1297,8 +1297,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_SETUP_FIRST_TURN, - .partySize = 3, - .party = {.NoItemCustomMoves = sParty_Wendy } + .partySize = ARRAY_COUNT(sParty_Wendy), + .party = {.NoItemCustomMoves = sParty_Wendy}, }, [TRAINER_KEIRA] = @@ -1311,8 +1311,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_SETUP_FIRST_TURN, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Keira } + .partySize = ARRAY_COUNT(sParty_Keira), + .party = {.NoItemDefaultMoves = sParty_Keira}, }, [TRAINER_BROOKE_1] = @@ -1325,8 +1325,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_SUPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Brooke1 } + .partySize = ARRAY_COUNT(sParty_Brooke1), + .party = {.NoItemDefaultMoves = sParty_Brooke1}, }, [TRAINER_JENNIFER] = @@ -1339,8 +1339,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Jennifer } + .partySize = ARRAY_COUNT(sParty_Jennifer), + .party = {.NoItemDefaultMoves = sParty_Jennifer}, }, [TRAINER_HOPE] = @@ -1353,8 +1353,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Hope } + .partySize = ARRAY_COUNT(sParty_Hope), + .party = {.NoItemDefaultMoves = sParty_Hope}, }, [TRAINER_SHANNON] = @@ -1367,8 +1367,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Shannon } + .partySize = ARRAY_COUNT(sParty_Shannon), + .party = {.NoItemDefaultMoves = sParty_Shannon}, }, [TRAINER_MICHELLE] = @@ -1381,8 +1381,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Michelle } + .partySize = ARRAY_COUNT(sParty_Michelle), + .party = {.NoItemDefaultMoves = sParty_Michelle}, }, [TRAINER_CAROLINE] = @@ -1395,8 +1395,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Caroline } + .partySize = ARRAY_COUNT(sParty_Caroline), + .party = {.NoItemDefaultMoves = sParty_Caroline}, }, [TRAINER_JULIE] = @@ -1409,8 +1409,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Julie } + .partySize = ARRAY_COUNT(sParty_Julie), + .party = {.NoItemDefaultMoves = sParty_Julie}, }, [TRAINER_BROOKE_2] = @@ -1423,8 +1423,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Brooke2 } + .partySize = ARRAY_COUNT(sParty_Brooke2), + .party = {.NoItemDefaultMoves = sParty_Brooke2}, }, [TRAINER_BROOKE_3] = @@ -1437,8 +1437,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Brooke3 } + .partySize = ARRAY_COUNT(sParty_Brooke3), + .party = {.NoItemDefaultMoves = sParty_Brooke3}, }, [TRAINER_BROOKE_4] = @@ -1451,8 +1451,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Brooke4 } + .partySize = ARRAY_COUNT(sParty_Brooke4), + .party = {.NoItemDefaultMoves = sParty_Brooke4}, }, [TRAINER_BROOKE_5] = @@ -1465,8 +1465,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Brooke5 } + .partySize = ARRAY_COUNT(sParty_Brooke5), + .party = {.NoItemDefaultMoves = sParty_Brooke5}, }, [TRAINER_PATRICIA] = @@ -1479,8 +1479,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Patricia } + .partySize = ARRAY_COUNT(sParty_Patricia), + .party = {.NoItemDefaultMoves = sParty_Patricia}, }, [TRAINER_KINDRA] = @@ -1493,8 +1493,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Kindra } + .partySize = ARRAY_COUNT(sParty_Kindra), + .party = {.NoItemDefaultMoves = sParty_Kindra}, }, [TRAINER_TAMMY] = @@ -1507,8 +1507,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Tammy } + .partySize = ARRAY_COUNT(sParty_Tammy), + .party = {.NoItemDefaultMoves = sParty_Tammy}, }, [TRAINER_VALERIE_1] = @@ -1521,8 +1521,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Valerie1 } + .partySize = ARRAY_COUNT(sParty_Valerie1), + .party = {.NoItemDefaultMoves = sParty_Valerie1}, }, [TRAINER_TASHA] = @@ -1535,8 +1535,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Tasha } + .partySize = ARRAY_COUNT(sParty_Tasha), + .party = {.NoItemDefaultMoves = sParty_Tasha}, }, [TRAINER_VALERIE_2] = @@ -1549,8 +1549,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Valerie2 } + .partySize = ARRAY_COUNT(sParty_Valerie2), + .party = {.NoItemDefaultMoves = sParty_Valerie2}, }, [TRAINER_VALERIE_3] = @@ -1563,8 +1563,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Valerie3 } + .partySize = ARRAY_COUNT(sParty_Valerie3), + .party = {.NoItemDefaultMoves = sParty_Valerie3}, }, [TRAINER_VALERIE_4] = @@ -1577,8 +1577,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Valerie4 } + .partySize = ARRAY_COUNT(sParty_Valerie4), + .party = {.NoItemDefaultMoves = sParty_Valerie4}, }, [TRAINER_VALERIE_5] = @@ -1591,8 +1591,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Valerie5 } + .partySize = ARRAY_COUNT(sParty_Valerie5), + .party = {.NoItemDefaultMoves = sParty_Valerie5}, }, [TRAINER_CINDY_1] = @@ -1605,8 +1605,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.ItemDefaultMoves = sParty_Cindy1 } + .partySize = ARRAY_COUNT(sParty_Cindy1), + .party = {.ItemDefaultMoves = sParty_Cindy1}, }, [TRAINER_DAPHNE] = @@ -1619,8 +1619,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.ItemCustomMoves = sParty_Daphne } + .partySize = ARRAY_COUNT(sParty_Daphne), + .party = {.ItemCustomMoves = sParty_Daphne}, }, [TRAINER_GRUNT_23] = @@ -1633,8 +1633,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Grunt23 } + .partySize = ARRAY_COUNT(sParty_Grunt23), + .party = {.NoItemDefaultMoves = sParty_Grunt23}, }, [TRAINER_CINDY_2] = @@ -1647,8 +1647,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.ItemCustomMoves = sParty_Cindy2 } + .partySize = ARRAY_COUNT(sParty_Cindy2), + .party = {.ItemCustomMoves = sParty_Cindy2}, }, [TRAINER_BRIANNA] = @@ -1661,8 +1661,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.ItemDefaultMoves = sParty_Brianna } + .partySize = ARRAY_COUNT(sParty_Brianna), + .party = {.ItemDefaultMoves = sParty_Brianna}, }, [TRAINER_NAOMI] = @@ -1675,8 +1675,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.ItemDefaultMoves = sParty_Naomi } + .partySize = ARRAY_COUNT(sParty_Naomi), + .party = {.ItemDefaultMoves = sParty_Naomi}, }, [TRAINER_CINDY_3] = @@ -1689,8 +1689,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.ItemDefaultMoves = sParty_Cindy3 } + .partySize = ARRAY_COUNT(sParty_Cindy3), + .party = {.ItemDefaultMoves = sParty_Cindy3}, }, [TRAINER_CINDY_4] = @@ -1703,8 +1703,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.ItemDefaultMoves = sParty_Cindy4 } + .partySize = ARRAY_COUNT(sParty_Cindy4), + .party = {.ItemDefaultMoves = sParty_Cindy4}, }, [TRAINER_CINDY_5] = @@ -1717,8 +1717,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.ItemDefaultMoves = sParty_Cindy5 } + .partySize = ARRAY_COUNT(sParty_Cindy5), + .party = {.ItemDefaultMoves = sParty_Cindy5}, }, [TRAINER_CINDY_6] = @@ -1731,8 +1731,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.ItemCustomMoves = sParty_Cindy6 } + .partySize = ARRAY_COUNT(sParty_Cindy6), + .party = {.ItemCustomMoves = sParty_Cindy6}, }, [TRAINER_MELISSA] = @@ -1745,8 +1745,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Melissa } + .partySize = ARRAY_COUNT(sParty_Melissa), + .party = {.NoItemDefaultMoves = sParty_Melissa}, }, [TRAINER_SHEILA] = @@ -1759,8 +1759,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Sheila } + .partySize = ARRAY_COUNT(sParty_Sheila), + .party = {.NoItemDefaultMoves = sParty_Sheila}, }, [TRAINER_SHIRLEY] = @@ -1773,8 +1773,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Shirley } + .partySize = ARRAY_COUNT(sParty_Shirley), + .party = {.NoItemDefaultMoves = sParty_Shirley}, }, [TRAINER_JESSICA_1] = @@ -1787,8 +1787,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Jessica1 } + .partySize = ARRAY_COUNT(sParty_Jessica1), + .party = {.NoItemCustomMoves = sParty_Jessica1}, }, [TRAINER_CONNIE] = @@ -1801,8 +1801,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Connie } + .partySize = ARRAY_COUNT(sParty_Connie), + .party = {.NoItemDefaultMoves = sParty_Connie}, }, [TRAINER_BRIDGET] = @@ -1815,8 +1815,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Bridget } + .partySize = ARRAY_COUNT(sParty_Bridget), + .party = {.NoItemDefaultMoves = sParty_Bridget}, }, [TRAINER_OLIVIA] = @@ -1829,8 +1829,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemCustomMoves = sParty_Olivia } + .partySize = ARRAY_COUNT(sParty_Olivia), + .party = {.NoItemCustomMoves = sParty_Olivia}, }, [TRAINER_TIFFANY] = @@ -1843,8 +1843,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Tiffany } + .partySize = ARRAY_COUNT(sParty_Tiffany), + .party = {.NoItemDefaultMoves = sParty_Tiffany}, }, [TRAINER_JESSICA_2] = @@ -1857,8 +1857,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Jessica2 } + .partySize = ARRAY_COUNT(sParty_Jessica2), + .party = {.NoItemCustomMoves = sParty_Jessica2}, }, [TRAINER_JESSICA_3] = @@ -1871,8 +1871,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Jessica3 } + .partySize = ARRAY_COUNT(sParty_Jessica3), + .party = {.NoItemCustomMoves = sParty_Jessica3}, }, [TRAINER_JESSICA_4] = @@ -1885,8 +1885,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Jessica4 } + .partySize = ARRAY_COUNT(sParty_Jessica4), + .party = {.NoItemCustomMoves = sParty_Jessica4}, }, [TRAINER_JESSICA_5] = @@ -1899,8 +1899,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Jessica5 } + .partySize = ARRAY_COUNT(sParty_Jessica5), + .party = {.NoItemCustomMoves = sParty_Jessica5}, }, [TRAINER_WINSTON_1] = @@ -1913,8 +1913,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.ItemDefaultMoves = sParty_Winston1 } + .partySize = ARRAY_COUNT(sParty_Winston1), + .party = {.ItemDefaultMoves = sParty_Winston1}, }, [TRAINER_MOLLIE] = @@ -1927,8 +1927,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Mollie } + .partySize = ARRAY_COUNT(sParty_Mollie), + .party = {.NoItemDefaultMoves = sParty_Mollie}, }, [TRAINER_GARRET] = @@ -1941,8 +1941,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.ItemDefaultMoves = sParty_Garret } + .partySize = ARRAY_COUNT(sParty_Garret), + .party = {.ItemDefaultMoves = sParty_Garret}, }, [TRAINER_WINSTON_2] = @@ -1955,8 +1955,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.ItemDefaultMoves = sParty_Winston2 } + .partySize = ARRAY_COUNT(sParty_Winston2), + .party = {.ItemDefaultMoves = sParty_Winston2}, }, [TRAINER_WINSTON_3] = @@ -1969,8 +1969,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.ItemDefaultMoves = sParty_Winston3 } + .partySize = ARRAY_COUNT(sParty_Winston3), + .party = {.ItemDefaultMoves = sParty_Winston3}, }, [TRAINER_WINSTON_4] = @@ -1983,8 +1983,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.ItemDefaultMoves = sParty_Winston4 } + .partySize = ARRAY_COUNT(sParty_Winston4), + .party = {.ItemDefaultMoves = sParty_Winston4}, }, [TRAINER_WINSTON_5] = @@ -1997,8 +1997,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.ItemCustomMoves = sParty_Winston5 } + .partySize = ARRAY_COUNT(sParty_Winston5), + .party = {.ItemCustomMoves = sParty_Winston5}, }, [TRAINER_STEVE_1] = @@ -2011,8 +2011,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Steve1 } + .partySize = ARRAY_COUNT(sParty_Steve1), + .party = {.NoItemDefaultMoves = sParty_Steve1}, }, [TRAINER_THALIA_1] = @@ -2025,8 +2025,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Thalia1 } + .partySize = ARRAY_COUNT(sParty_Thalia1), + .party = {.NoItemDefaultMoves = sParty_Thalia1}, }, [TRAINER_MARK] = @@ -2039,8 +2039,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Mark } + .partySize = ARRAY_COUNT(sParty_Mark), + .party = {.NoItemDefaultMoves = sParty_Mark}, }, [TRAINER_GRUNT_24] = @@ -2053,8 +2053,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt24 } + .partySize = ARRAY_COUNT(sParty_Grunt24), + .party = {.NoItemDefaultMoves = sParty_Grunt24}, }, [TRAINER_STEVE_2] = @@ -2067,8 +2067,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Steve2 } + .partySize = ARRAY_COUNT(sParty_Steve2), + .party = {.NoItemDefaultMoves = sParty_Steve2}, }, [TRAINER_STEVE_3] = @@ -2081,8 +2081,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Steve3 } + .partySize = ARRAY_COUNT(sParty_Steve3), + .party = {.NoItemDefaultMoves = sParty_Steve3}, }, [TRAINER_STEVE_4] = @@ -2095,8 +2095,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Steve4 } + .partySize = ARRAY_COUNT(sParty_Steve4), + .party = {.NoItemDefaultMoves = sParty_Steve4}, }, [TRAINER_STEVE_5] = @@ -2109,8 +2109,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Steve5 } + .partySize = ARRAY_COUNT(sParty_Steve5), + .party = {.NoItemDefaultMoves = sParty_Steve5}, }, [TRAINER_LUIS] = @@ -2123,8 +2123,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Luis } + .partySize = ARRAY_COUNT(sParty_Luis), + .party = {.NoItemDefaultMoves = sParty_Luis}, }, [TRAINER_DOMINIK] = @@ -2137,8 +2137,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Dominik } + .partySize = ARRAY_COUNT(sParty_Dominik), + .party = {.NoItemDefaultMoves = sParty_Dominik}, }, [TRAINER_DOUGLAS] = @@ -2151,8 +2151,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Douglas } + .partySize = ARRAY_COUNT(sParty_Douglas), + .party = {.NoItemDefaultMoves = sParty_Douglas}, }, [TRAINER_DARRIN] = @@ -2165,8 +2165,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Darrin } + .partySize = ARRAY_COUNT(sParty_Darrin), + .party = {.NoItemDefaultMoves = sParty_Darrin}, }, [TRAINER_TONY_1] = @@ -2179,8 +2179,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Tony1 } + .partySize = ARRAY_COUNT(sParty_Tony1), + .party = {.NoItemDefaultMoves = sParty_Tony1}, }, [TRAINER_JEROME] = @@ -2193,8 +2193,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Jerome } + .partySize = ARRAY_COUNT(sParty_Jerome), + .party = {.NoItemDefaultMoves = sParty_Jerome}, }, [TRAINER_MATTHEW] = @@ -2207,8 +2207,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Matthew } + .partySize = ARRAY_COUNT(sParty_Matthew), + .party = {.NoItemDefaultMoves = sParty_Matthew}, }, [TRAINER_DAVID] = @@ -2221,8 +2221,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_David } + .partySize = ARRAY_COUNT(sParty_David), + .party = {.NoItemDefaultMoves = sParty_David}, }, [TRAINER_SPENCER] = @@ -2235,8 +2235,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Spencer } + .partySize = ARRAY_COUNT(sParty_Spencer), + .party = {.NoItemDefaultMoves = sParty_Spencer}, }, [TRAINER_ROLAND] = @@ -2249,8 +2249,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Roland } + .partySize = ARRAY_COUNT(sParty_Roland), + .party = {.NoItemDefaultMoves = sParty_Roland}, }, [TRAINER_NOLEN] = @@ -2263,8 +2263,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Nolen } + .partySize = ARRAY_COUNT(sParty_Nolen), + .party = {.NoItemDefaultMoves = sParty_Nolen}, }, [TRAINER_STAN] = @@ -2277,8 +2277,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Stan } + .partySize = ARRAY_COUNT(sParty_Stan), + .party = {.NoItemDefaultMoves = sParty_Stan}, }, [TRAINER_BARRY] = @@ -2291,8 +2291,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Barry } + .partySize = ARRAY_COUNT(sParty_Barry), + .party = {.NoItemDefaultMoves = sParty_Barry}, }, [TRAINER_DEAN] = @@ -2305,8 +2305,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Dean } + .partySize = ARRAY_COUNT(sParty_Dean), + .party = {.NoItemDefaultMoves = sParty_Dean}, }, [TRAINER_RODNEY] = @@ -2319,8 +2319,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Rodney } + .partySize = ARRAY_COUNT(sParty_Rodney), + .party = {.NoItemDefaultMoves = sParty_Rodney}, }, [TRAINER_RICHARD] = @@ -2333,8 +2333,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Richard } + .partySize = ARRAY_COUNT(sParty_Richard), + .party = {.NoItemDefaultMoves = sParty_Richard}, }, [TRAINER_HERMAN] = @@ -2347,8 +2347,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Herman } + .partySize = ARRAY_COUNT(sParty_Herman), + .party = {.NoItemDefaultMoves = sParty_Herman}, }, [TRAINER_SANTIAGO] = @@ -2361,8 +2361,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Santiago } + .partySize = ARRAY_COUNT(sParty_Santiago), + .party = {.NoItemDefaultMoves = sParty_Santiago}, }, [TRAINER_GILBERT] = @@ -2375,8 +2375,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Gilbert } + .partySize = ARRAY_COUNT(sParty_Gilbert), + .party = {.NoItemDefaultMoves = sParty_Gilbert}, }, [TRAINER_FRANKLIN] = @@ -2389,8 +2389,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Franklin } + .partySize = ARRAY_COUNT(sParty_Franklin), + .party = {.NoItemDefaultMoves = sParty_Franklin}, }, [TRAINER_KEVIN] = @@ -2403,8 +2403,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Kevin } + .partySize = ARRAY_COUNT(sParty_Kevin), + .party = {.NoItemDefaultMoves = sParty_Kevin}, }, [TRAINER_JACK] = @@ -2417,8 +2417,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Jack } + .partySize = ARRAY_COUNT(sParty_Jack), + .party = {.NoItemDefaultMoves = sParty_Jack}, }, [TRAINER_DUDLEY] = @@ -2431,8 +2431,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Dudley } + .partySize = ARRAY_COUNT(sParty_Dudley), + .party = {.NoItemDefaultMoves = sParty_Dudley}, }, [TRAINER_CHAD] = @@ -2445,8 +2445,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Chad } + .partySize = ARRAY_COUNT(sParty_Chad), + .party = {.NoItemDefaultMoves = sParty_Chad}, }, [TRAINER_TONY_2] = @@ -2459,8 +2459,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Tony2 } + .partySize = ARRAY_COUNT(sParty_Tony2), + .party = {.NoItemDefaultMoves = sParty_Tony2}, }, [TRAINER_TONY_3] = @@ -2473,8 +2473,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Tony3 } + .partySize = ARRAY_COUNT(sParty_Tony3), + .party = {.NoItemDefaultMoves = sParty_Tony3}, }, [TRAINER_TONY_4] = @@ -2487,8 +2487,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Tony4 } + .partySize = ARRAY_COUNT(sParty_Tony4), + .party = {.NoItemDefaultMoves = sParty_Tony4}, }, [TRAINER_TONY_5] = @@ -2501,8 +2501,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Tony5 } + .partySize = ARRAY_COUNT(sParty_Tony5), + .party = {.NoItemDefaultMoves = sParty_Tony5}, }, [TRAINER_TAKAO] = @@ -2515,8 +2515,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Takao } + .partySize = ARRAY_COUNT(sParty_Takao), + .party = {.NoItemDefaultMoves = sParty_Takao}, }, [TRAINER_HITOSHI] = @@ -2529,8 +2529,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Hitoshi } + .partySize = ARRAY_COUNT(sParty_Hitoshi), + .party = {.NoItemDefaultMoves = sParty_Hitoshi}, }, [TRAINER_KIYO] = @@ -2543,8 +2543,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Kiyo } + .partySize = ARRAY_COUNT(sParty_Kiyo), + .party = {.NoItemDefaultMoves = sParty_Kiyo}, }, [TRAINER_KOICHI] = @@ -2557,8 +2557,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Koichi } + .partySize = ARRAY_COUNT(sParty_Koichi), + .party = {.NoItemDefaultMoves = sParty_Koichi}, }, [TRAINER_NOB_1] = @@ -2571,8 +2571,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Nob1 } + .partySize = ARRAY_COUNT(sParty_Nob1), + .party = {.NoItemDefaultMoves = sParty_Nob1}, }, [TRAINER_NOB_2] = @@ -2585,8 +2585,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Nob2 } + .partySize = ARRAY_COUNT(sParty_Nob2), + .party = {.NoItemDefaultMoves = sParty_Nob2}, }, [TRAINER_NOB_3] = @@ -2599,8 +2599,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Nob3 } + .partySize = ARRAY_COUNT(sParty_Nob3), + .party = {.NoItemDefaultMoves = sParty_Nob3}, }, [TRAINER_NOB_4] = @@ -2613,8 +2613,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Nob4 } + .partySize = ARRAY_COUNT(sParty_Nob4), + .party = {.NoItemDefaultMoves = sParty_Nob4}, }, [TRAINER_NOB_5] = @@ -2627,8 +2627,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 4, - .party = {.ItemDefaultMoves = sParty_Nob5 } + .partySize = ARRAY_COUNT(sParty_Nob5), + .party = {.ItemDefaultMoves = sParty_Nob5}, }, [TRAINER_YUJI] = @@ -2641,8 +2641,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Yuji } + .partySize = ARRAY_COUNT(sParty_Yuji), + .party = {.NoItemDefaultMoves = sParty_Yuji}, }, [TRAINER_DAISUKE] = @@ -2655,8 +2655,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Daisuke } + .partySize = ARRAY_COUNT(sParty_Daisuke), + .party = {.NoItemDefaultMoves = sParty_Daisuke}, }, [TRAINER_ATSUSHI] = @@ -2669,8 +2669,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Atsushi } + .partySize = ARRAY_COUNT(sParty_Atsushi), + .party = {.NoItemDefaultMoves = sParty_Atsushi}, }, [TRAINER_KIRK] = @@ -2683,8 +2683,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Kirk } + .partySize = ARRAY_COUNT(sParty_Kirk), + .party = {.NoItemCustomMoves = sParty_Kirk}, }, [TRAINER_GRUNT_25] = @@ -2697,8 +2697,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Grunt25 } + .partySize = ARRAY_COUNT(sParty_Grunt25), + .party = {.NoItemDefaultMoves = sParty_Grunt25}, }, [TRAINER_GRUNT_26] = @@ -2711,8 +2711,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt26 } + .partySize = ARRAY_COUNT(sParty_Grunt26), + .party = {.NoItemDefaultMoves = sParty_Grunt26}, }, [TRAINER_SHAWN] = @@ -2725,8 +2725,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Shawn } + .partySize = ARRAY_COUNT(sParty_Shawn), + .party = {.NoItemDefaultMoves = sParty_Shawn}, }, [TRAINER_FERNANDO_1] = @@ -2739,8 +2739,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Fernando1 } + .partySize = ARRAY_COUNT(sParty_Fernando1), + .party = {.NoItemDefaultMoves = sParty_Fernando1}, }, [TRAINER_DALTON_1] = @@ -2753,8 +2753,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Dalton1 } + .partySize = ARRAY_COUNT(sParty_Dalton1), + .party = {.NoItemDefaultMoves = sParty_Dalton1}, }, [TRAINER_DALTON_2] = @@ -2767,8 +2767,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Dalton2 } + .partySize = ARRAY_COUNT(sParty_Dalton2), + .party = {.NoItemDefaultMoves = sParty_Dalton2}, }, [TRAINER_DALTON_3] = @@ -2781,8 +2781,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Dalton3 } + .partySize = ARRAY_COUNT(sParty_Dalton3), + .party = {.NoItemDefaultMoves = sParty_Dalton3}, }, [TRAINER_DALTON_4] = @@ -2795,8 +2795,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Dalton4 } + .partySize = ARRAY_COUNT(sParty_Dalton4), + .party = {.NoItemDefaultMoves = sParty_Dalton4}, }, [TRAINER_DALTON_5] = @@ -2809,8 +2809,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Dalton5 } + .partySize = ARRAY_COUNT(sParty_Dalton5), + .party = {.NoItemDefaultMoves = sParty_Dalton5}, }, [TRAINER_COLE] = @@ -2823,8 +2823,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Cole } + .partySize = ARRAY_COUNT(sParty_Cole), + .party = {.NoItemDefaultMoves = sParty_Cole}, }, [TRAINER_JEFF] = @@ -2837,8 +2837,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Jeff } + .partySize = ARRAY_COUNT(sParty_Jeff), + .party = {.NoItemDefaultMoves = sParty_Jeff}, }, [TRAINER_AXLE] = @@ -2851,8 +2851,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Axle } + .partySize = ARRAY_COUNT(sParty_Axle), + .party = {.NoItemDefaultMoves = sParty_Axle}, }, [TRAINER_JACE] = @@ -2865,8 +2865,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Jace } + .partySize = ARRAY_COUNT(sParty_Jace), + .party = {.NoItemDefaultMoves = sParty_Jace}, }, [TRAINER_KEEGAN] = @@ -2879,8 +2879,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Keegan } + .partySize = ARRAY_COUNT(sParty_Keegan), + .party = {.NoItemDefaultMoves = sParty_Keegan}, }, [TRAINER_BERNIE_1] = @@ -2893,8 +2893,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Bernie1 } + .partySize = ARRAY_COUNT(sParty_Bernie1), + .party = {.NoItemDefaultMoves = sParty_Bernie1}, }, [TRAINER_BERNIE_2] = @@ -2907,8 +2907,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Bernie2 } + .partySize = ARRAY_COUNT(sParty_Bernie2), + .party = {.NoItemDefaultMoves = sParty_Bernie2}, }, [TRAINER_BERNIE_3] = @@ -2921,8 +2921,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Bernie3 } + .partySize = ARRAY_COUNT(sParty_Bernie3), + .party = {.NoItemDefaultMoves = sParty_Bernie3}, }, [TRAINER_BERNIE_4] = @@ -2935,8 +2935,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Bernie4 } + .partySize = ARRAY_COUNT(sParty_Bernie4), + .party = {.NoItemDefaultMoves = sParty_Bernie4}, }, [TRAINER_BERNIE_5] = @@ -2949,8 +2949,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Bernie5 } + .partySize = ARRAY_COUNT(sParty_Bernie5), + .party = {.NoItemDefaultMoves = sParty_Bernie5}, }, [TRAINER_DREW] = @@ -2963,8 +2963,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Drew } + .partySize = ARRAY_COUNT(sParty_Drew), + .party = {.NoItemCustomMoves = sParty_Drew}, }, [TRAINER_BEAU] = @@ -2977,8 +2977,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemCustomMoves = sParty_Beau } + .partySize = ARRAY_COUNT(sParty_Beau), + .party = {.NoItemCustomMoves = sParty_Beau}, }, [TRAINER_LARRY] = @@ -2991,8 +2991,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Larry } + .partySize = ARRAY_COUNT(sParty_Larry), + .party = {.NoItemDefaultMoves = sParty_Larry}, }, [TRAINER_SHANE] = @@ -3005,8 +3005,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Shane } + .partySize = ARRAY_COUNT(sParty_Shane), + .party = {.NoItemDefaultMoves = sParty_Shane}, }, [TRAINER_JUSTIN] = @@ -3019,8 +3019,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Justin } + .partySize = ARRAY_COUNT(sParty_Justin), + .party = {.NoItemDefaultMoves = sParty_Justin}, }, [TRAINER_ETHAN_1] = @@ -3033,8 +3033,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Ethan1 } + .partySize = ARRAY_COUNT(sParty_Ethan1), + .party = {.NoItemDefaultMoves = sParty_Ethan1}, }, [TRAINER_AUTUMN] = @@ -3047,8 +3047,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Autumn } + .partySize = ARRAY_COUNT(sParty_Autumn), + .party = {.NoItemDefaultMoves = sParty_Autumn}, }, [TRAINER_TRAVIS] = @@ -3061,8 +3061,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Travis } + .partySize = ARRAY_COUNT(sParty_Travis), + .party = {.NoItemDefaultMoves = sParty_Travis}, }, [TRAINER_ETHAN_2] = @@ -3075,8 +3075,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Ethan2 } + .partySize = ARRAY_COUNT(sParty_Ethan2), + .party = {.NoItemDefaultMoves = sParty_Ethan2}, }, [TRAINER_ETHAN_3] = @@ -3089,8 +3089,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Ethan3 } + .partySize = ARRAY_COUNT(sParty_Ethan3), + .party = {.NoItemDefaultMoves = sParty_Ethan3}, }, [TRAINER_ETHAN_4] = @@ -3103,8 +3103,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Ethan4 } + .partySize = ARRAY_COUNT(sParty_Ethan4), + .party = {.NoItemDefaultMoves = sParty_Ethan4}, }, [TRAINER_ETHAN_5] = @@ -3117,8 +3117,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Ethan5 } + .partySize = ARRAY_COUNT(sParty_Ethan5), + .party = {.NoItemDefaultMoves = sParty_Ethan5}, }, [TRAINER_BRENT] = @@ -3131,8 +3131,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Brent } + .partySize = ARRAY_COUNT(sParty_Brent), + .party = {.NoItemDefaultMoves = sParty_Brent}, }, [TRAINER_DONALD] = @@ -3145,8 +3145,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Donald } + .partySize = ARRAY_COUNT(sParty_Donald), + .party = {.NoItemDefaultMoves = sParty_Donald}, }, [TRAINER_TAYLOR] = @@ -3159,8 +3159,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Taylor } + .partySize = ARRAY_COUNT(sParty_Taylor), + .party = {.NoItemDefaultMoves = sParty_Taylor}, }, [TRAINER_JEFFREY_1] = @@ -3173,8 +3173,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Jeffrey1 } + .partySize = ARRAY_COUNT(sParty_Jeffrey1), + .party = {.NoItemDefaultMoves = sParty_Jeffrey1}, }, [TRAINER_DEREK] = @@ -3187,8 +3187,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Derek } + .partySize = ARRAY_COUNT(sParty_Derek), + .party = {.NoItemDefaultMoves = sParty_Derek}, }, [TRAINER_JEFFREY_2] = @@ -3201,8 +3201,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Jeffrey2 } + .partySize = ARRAY_COUNT(sParty_Jeffrey2), + .party = {.NoItemDefaultMoves = sParty_Jeffrey2}, }, [TRAINER_JEFFREY_3] = @@ -3215,8 +3215,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Jeffrey3 } + .partySize = ARRAY_COUNT(sParty_Jeffrey3), + .party = {.NoItemDefaultMoves = sParty_Jeffrey3}, }, [TRAINER_JEFFREY_4] = @@ -3229,8 +3229,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 4, - .party = {.NoItemDefaultMoves = sParty_Jeffrey4 } + .partySize = ARRAY_COUNT(sParty_Jeffrey4), + .party = {.NoItemDefaultMoves = sParty_Jeffrey4}, }, [TRAINER_JEFFREY_5] = @@ -3243,8 +3243,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 5, - .party = {.ItemDefaultMoves = sParty_Jeffrey5 } + .partySize = ARRAY_COUNT(sParty_Jeffrey5), + .party = {.ItemDefaultMoves = sParty_Jeffrey5}, }, [TRAINER_EDWARD] = @@ -3257,8 +3257,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Edward } + .partySize = ARRAY_COUNT(sParty_Edward), + .party = {.NoItemCustomMoves = sParty_Edward}, }, [TRAINER_PRESTON] = @@ -3271,8 +3271,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Preston } + .partySize = ARRAY_COUNT(sParty_Preston), + .party = {.NoItemDefaultMoves = sParty_Preston}, }, [TRAINER_VIRGIL] = @@ -3285,8 +3285,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Virgil } + .partySize = ARRAY_COUNT(sParty_Virgil), + .party = {.NoItemDefaultMoves = sParty_Virgil}, }, [TRAINER_BLAKE] = @@ -3299,8 +3299,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Blake } + .partySize = ARRAY_COUNT(sParty_Blake), + .party = {.NoItemDefaultMoves = sParty_Blake}, }, [TRAINER_WILLIAM] = @@ -3313,8 +3313,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_William } + .partySize = ARRAY_COUNT(sParty_William), + .party = {.NoItemDefaultMoves = sParty_William}, }, [TRAINER_JOSHUA] = @@ -3327,8 +3327,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Joshua } + .partySize = ARRAY_COUNT(sParty_Joshua), + .party = {.NoItemDefaultMoves = sParty_Joshua}, }, [TRAINER_CAMERON_1] = @@ -3341,8 +3341,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Cameron1 } + .partySize = ARRAY_COUNT(sParty_Cameron1), + .party = {.NoItemDefaultMoves = sParty_Cameron1}, }, [TRAINER_CAMERON_2] = @@ -3355,8 +3355,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Cameron2 } + .partySize = ARRAY_COUNT(sParty_Cameron2), + .party = {.NoItemDefaultMoves = sParty_Cameron2}, }, [TRAINER_CAMERON_3] = @@ -3369,8 +3369,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Cameron3 } + .partySize = ARRAY_COUNT(sParty_Cameron3), + .party = {.NoItemDefaultMoves = sParty_Cameron3}, }, [TRAINER_CAMERON_4] = @@ -3383,8 +3383,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Cameron4 } + .partySize = ARRAY_COUNT(sParty_Cameron4), + .party = {.NoItemDefaultMoves = sParty_Cameron4}, }, [TRAINER_CAMERON_5] = @@ -3397,8 +3397,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Cameron5 } + .partySize = ARRAY_COUNT(sParty_Cameron5), + .party = {.NoItemDefaultMoves = sParty_Cameron5}, }, [TRAINER_JACLYN] = @@ -3411,8 +3411,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Jaclyn } + .partySize = ARRAY_COUNT(sParty_Jaclyn), + .party = {.NoItemCustomMoves = sParty_Jaclyn}, }, [TRAINER_HANNAH] = @@ -3425,8 +3425,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Hannah } + .partySize = ARRAY_COUNT(sParty_Hannah), + .party = {.NoItemDefaultMoves = sParty_Hannah}, }, [TRAINER_SAMANTHA] = @@ -3439,8 +3439,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Samantha } + .partySize = ARRAY_COUNT(sParty_Samantha), + .party = {.NoItemDefaultMoves = sParty_Samantha}, }, [TRAINER_MAURA] = @@ -3453,8 +3453,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Maura } + .partySize = ARRAY_COUNT(sParty_Maura), + .party = {.NoItemDefaultMoves = sParty_Maura}, }, [TRAINER_KAYLA] = @@ -3467,8 +3467,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Kayla } + .partySize = ARRAY_COUNT(sParty_Kayla), + .party = {.NoItemDefaultMoves = sParty_Kayla}, }, [TRAINER_ALEXIS] = @@ -3481,8 +3481,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Alexis } + .partySize = ARRAY_COUNT(sParty_Alexis), + .party = {.NoItemDefaultMoves = sParty_Alexis}, }, [TRAINER_JACKI_1] = @@ -3495,8 +3495,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Jacki1 } + .partySize = ARRAY_COUNT(sParty_Jacki1), + .party = {.NoItemDefaultMoves = sParty_Jacki1}, }, [TRAINER_JACKI_2] = @@ -3509,8 +3509,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Jacki2 } + .partySize = ARRAY_COUNT(sParty_Jacki2), + .party = {.NoItemDefaultMoves = sParty_Jacki2}, }, [TRAINER_JACKI_3] = @@ -3523,8 +3523,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Jacki3 } + .partySize = ARRAY_COUNT(sParty_Jacki3), + .party = {.NoItemDefaultMoves = sParty_Jacki3}, }, [TRAINER_JACKI_4] = @@ -3537,8 +3537,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Jacki4 } + .partySize = ARRAY_COUNT(sParty_Jacki4), + .party = {.NoItemDefaultMoves = sParty_Jacki4}, }, [TRAINER_JACKI_5] = @@ -3551,8 +3551,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Jacki5 } + .partySize = ARRAY_COUNT(sParty_Jacki5), + .party = {.NoItemDefaultMoves = sParty_Jacki5}, }, [TRAINER_WALTER_1] = @@ -3565,8 +3565,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Walter1 } + .partySize = ARRAY_COUNT(sParty_Walter1), + .party = {.NoItemDefaultMoves = sParty_Walter1}, }, [TRAINER_MICAH] = @@ -3579,8 +3579,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Micah } + .partySize = ARRAY_COUNT(sParty_Micah), + .party = {.NoItemDefaultMoves = sParty_Micah}, }, [TRAINER_THOMAS] = @@ -3593,8 +3593,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Thomas } + .partySize = ARRAY_COUNT(sParty_Thomas), + .party = {.NoItemDefaultMoves = sParty_Thomas}, }, [TRAINER_WALTER_2] = @@ -3607,8 +3607,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Walter2 } + .partySize = ARRAY_COUNT(sParty_Walter2), + .party = {.NoItemDefaultMoves = sParty_Walter2}, }, [TRAINER_WALTER_3] = @@ -3621,8 +3621,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Walter3 } + .partySize = ARRAY_COUNT(sParty_Walter3), + .party = {.NoItemCustomMoves = sParty_Walter3}, }, [TRAINER_WALTER_4] = @@ -3635,8 +3635,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Walter4 } + .partySize = ARRAY_COUNT(sParty_Walter4), + .party = {.NoItemCustomMoves = sParty_Walter4}, }, [TRAINER_WALTER_5] = @@ -3649,8 +3649,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemCustomMoves = sParty_Walter5 } + .partySize = ARRAY_COUNT(sParty_Walter5), + .party = {.NoItemCustomMoves = sParty_Walter5}, }, [TRAINER_SIDNEY] = @@ -3663,8 +3663,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY | AI_SCRIPT_SETUP_FIRST_TURN, - .partySize = 5, - .party = {.ItemCustomMoves = sParty_Sidney } + .partySize = ARRAY_COUNT(sParty_Sidney), + .party = {.ItemCustomMoves = sParty_Sidney}, }, [TRAINER_PHOEBE] = @@ -3677,8 +3677,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 5, - .party = {.ItemCustomMoves = sParty_Phoebe } + .partySize = ARRAY_COUNT(sParty_Phoebe), + .party = {.ItemCustomMoves = sParty_Phoebe}, }, [TRAINER_GLACIA] = @@ -3691,8 +3691,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 5, - .party = {.ItemCustomMoves = sParty_Glacia } + .partySize = ARRAY_COUNT(sParty_Glacia), + .party = {.ItemCustomMoves = sParty_Glacia}, }, [TRAINER_DRAKE] = @@ -3705,8 +3705,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 5, - .party = {.ItemCustomMoves = sParty_Drake } + .partySize = ARRAY_COUNT(sParty_Drake), + .party = {.ItemCustomMoves = sParty_Drake}, }, [TRAINER_ROXANNE_1] = @@ -3719,8 +3719,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_POTION, ITEM_POTION, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.ItemCustomMoves = sParty_Roxanne1 } + .partySize = ARRAY_COUNT(sParty_Roxanne1), + .party = {.ItemCustomMoves = sParty_Roxanne1}, }, [TRAINER_BRAWLY_1] = @@ -3733,8 +3733,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_SUPER_POTION, ITEM_SUPER_POTION, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.ItemCustomMoves = sParty_Brawly1 } + .partySize = ARRAY_COUNT(sParty_Brawly1), + .party = {.ItemCustomMoves = sParty_Brawly1}, }, [TRAINER_WATTSON_1] = @@ -3747,8 +3747,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_SUPER_POTION, ITEM_SUPER_POTION, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 4, - .party = {.ItemCustomMoves = sParty_Wattson1 } + .partySize = ARRAY_COUNT(sParty_Wattson1), + .party = {.ItemCustomMoves = sParty_Wattson1}, }, [TRAINER_FLANNERY_1] = @@ -3761,8 +3761,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 4, - .party = {.ItemCustomMoves = sParty_Flannery1 } + .partySize = ARRAY_COUNT(sParty_Flannery1), + .party = {.ItemCustomMoves = sParty_Flannery1}, }, [TRAINER_NORMAN_1] = @@ -3775,8 +3775,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 4, - .party = {.ItemCustomMoves = sParty_Norman1 } + .partySize = ARRAY_COUNT(sParty_Norman1), + .party = {.ItemCustomMoves = sParty_Norman1}, }, [TRAINER_WINONA_1] = @@ -3789,8 +3789,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY | AI_SCRIPT_RISKY, - .partySize = 5, - .party = {.ItemCustomMoves = sParty_Winona1 } + .partySize = ARRAY_COUNT(sParty_Winona1), + .party = {.ItemCustomMoves = sParty_Winona1}, }, [TRAINER_TATE_AND_LIZA_1] = @@ -3803,8 +3803,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_HYPER_POTION, ITEM_HYPER_POTION, ITEM_HYPER_POTION}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 4, - .party = {.ItemCustomMoves = sParty_TateAndLiza1 } + .partySize = ARRAY_COUNT(sParty_TateAndLiza1), + .party = {.ItemCustomMoves = sParty_TateAndLiza1}, }, [TRAINER_JUAN_1] = @@ -3817,8 +3817,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 5, - .party = {.ItemCustomMoves = sParty_Juan1 } + .partySize = ARRAY_COUNT(sParty_Juan1), + .party = {.ItemCustomMoves = sParty_Juan1}, }, [TRAINER_JERRY_1] = @@ -3831,8 +3831,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Jerry1 } + .partySize = ARRAY_COUNT(sParty_Jerry1), + .party = {.NoItemDefaultMoves = sParty_Jerry1}, }, [TRAINER_TED] = @@ -3845,8 +3845,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Ted } + .partySize = ARRAY_COUNT(sParty_Ted), + .party = {.NoItemDefaultMoves = sParty_Ted}, }, [TRAINER_PAUL] = @@ -3859,8 +3859,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Paul } + .partySize = ARRAY_COUNT(sParty_Paul), + .party = {.NoItemDefaultMoves = sParty_Paul}, }, [TRAINER_JERRY_2] = @@ -3873,8 +3873,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Jerry2 } + .partySize = ARRAY_COUNT(sParty_Jerry2), + .party = {.NoItemDefaultMoves = sParty_Jerry2}, }, [TRAINER_JERRY_3] = @@ -3887,8 +3887,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Jerry3 } + .partySize = ARRAY_COUNT(sParty_Jerry3), + .party = {.NoItemDefaultMoves = sParty_Jerry3}, }, [TRAINER_JERRY_4] = @@ -3901,8 +3901,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Jerry4 } + .partySize = ARRAY_COUNT(sParty_Jerry4), + .party = {.NoItemDefaultMoves = sParty_Jerry4}, }, [TRAINER_JERRY_5] = @@ -3915,8 +3915,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Jerry5 } + .partySize = ARRAY_COUNT(sParty_Jerry5), + .party = {.NoItemDefaultMoves = sParty_Jerry5}, }, [TRAINER_KAREN_1] = @@ -3929,8 +3929,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Karen1 } + .partySize = ARRAY_COUNT(sParty_Karen1), + .party = {.NoItemDefaultMoves = sParty_Karen1}, }, [TRAINER_GEORGIA] = @@ -3943,8 +3943,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Georgia } + .partySize = ARRAY_COUNT(sParty_Georgia), + .party = {.NoItemDefaultMoves = sParty_Georgia}, }, [TRAINER_KAREN_2] = @@ -3957,8 +3957,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Karen2 } + .partySize = ARRAY_COUNT(sParty_Karen2), + .party = {.NoItemDefaultMoves = sParty_Karen2}, }, [TRAINER_KAREN_3] = @@ -3971,8 +3971,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Karen3 } + .partySize = ARRAY_COUNT(sParty_Karen3), + .party = {.NoItemDefaultMoves = sParty_Karen3}, }, [TRAINER_KAREN_4] = @@ -3985,8 +3985,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Karen4 } + .partySize = ARRAY_COUNT(sParty_Karen4), + .party = {.NoItemDefaultMoves = sParty_Karen4}, }, [TRAINER_KAREN_5] = @@ -3999,8 +3999,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Karen5 } + .partySize = ARRAY_COUNT(sParty_Karen5), + .party = {.NoItemDefaultMoves = sParty_Karen5}, }, [TRAINER_KATE_AND_JOY] = @@ -4013,8 +4013,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_KateAndJoy } + .partySize = ARRAY_COUNT(sParty_KateAndJoy), + .party = {.NoItemCustomMoves = sParty_KateAndJoy}, }, [TRAINER_ANNA_AND_MEG_1] = @@ -4027,8 +4027,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_AnnaAndMeg1 } + .partySize = ARRAY_COUNT(sParty_AnnaAndMeg1), + .party = {.NoItemCustomMoves = sParty_AnnaAndMeg1}, }, [TRAINER_ANNA_AND_MEG_2] = @@ -4041,8 +4041,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_AnnaAndMeg2 } + .partySize = ARRAY_COUNT(sParty_AnnaAndMeg2), + .party = {.NoItemCustomMoves = sParty_AnnaAndMeg2}, }, [TRAINER_ANNA_AND_MEG_3] = @@ -4055,8 +4055,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_AnnaAndMeg3 } + .partySize = ARRAY_COUNT(sParty_AnnaAndMeg3), + .party = {.NoItemCustomMoves = sParty_AnnaAndMeg3}, }, [TRAINER_ANNA_AND_MEG_4] = @@ -4069,8 +4069,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_AnnaAndMeg4 } + .partySize = ARRAY_COUNT(sParty_AnnaAndMeg4), + .party = {.NoItemCustomMoves = sParty_AnnaAndMeg4}, }, [TRAINER_ANNA_AND_MEG_5] = @@ -4083,8 +4083,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_AnnaAndMeg5 } + .partySize = ARRAY_COUNT(sParty_AnnaAndMeg5), + .party = {.NoItemCustomMoves = sParty_AnnaAndMeg5}, }, [TRAINER_VICTOR] = @@ -4097,8 +4097,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.ItemDefaultMoves = sParty_Victor } + .partySize = ARRAY_COUNT(sParty_Victor), + .party = {.ItemDefaultMoves = sParty_Victor}, }, [TRAINER_MIGUEL_1] = @@ -4111,8 +4111,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.ItemDefaultMoves = sParty_Miguel1 } + .partySize = ARRAY_COUNT(sParty_Miguel1), + .party = {.ItemDefaultMoves = sParty_Miguel1}, }, [TRAINER_COLTON] = @@ -4125,8 +4125,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 6, - .party = {.ItemCustomMoves = sParty_Colton } + .partySize = ARRAY_COUNT(sParty_Colton), + .party = {.ItemCustomMoves = sParty_Colton}, }, [TRAINER_MIGUEL_2] = @@ -4139,8 +4139,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.ItemDefaultMoves = sParty_Miguel2 } + .partySize = ARRAY_COUNT(sParty_Miguel2), + .party = {.ItemDefaultMoves = sParty_Miguel2}, }, [TRAINER_MIGUEL_3] = @@ -4153,8 +4153,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.ItemDefaultMoves = sParty_Miguel3 } + .partySize = ARRAY_COUNT(sParty_Miguel3), + .party = {.ItemDefaultMoves = sParty_Miguel3}, }, [TRAINER_MIGUEL_4] = @@ -4167,8 +4167,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.ItemDefaultMoves = sParty_Miguel4 } + .partySize = ARRAY_COUNT(sParty_Miguel4), + .party = {.ItemDefaultMoves = sParty_Miguel4}, }, [TRAINER_MIGUEL_5] = @@ -4181,8 +4181,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.ItemDefaultMoves = sParty_Miguel5 } + .partySize = ARRAY_COUNT(sParty_Miguel5), + .party = {.ItemDefaultMoves = sParty_Miguel5}, }, [TRAINER_VICTORIA] = @@ -4195,8 +4195,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT, - .partySize = 1, - .party = {.ItemDefaultMoves = sParty_Victoria } + .partySize = ARRAY_COUNT(sParty_Victoria), + .party = {.ItemDefaultMoves = sParty_Victoria}, }, [TRAINER_VANESSA] = @@ -4209,8 +4209,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.ItemDefaultMoves = sParty_Vanessa } + .partySize = ARRAY_COUNT(sParty_Vanessa), + .party = {.ItemDefaultMoves = sParty_Vanessa}, }, [TRAINER_BETHANY] = @@ -4223,8 +4223,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.ItemDefaultMoves = sParty_Bethany } + .partySize = ARRAY_COUNT(sParty_Bethany), + .party = {.ItemDefaultMoves = sParty_Bethany}, }, [TRAINER_ISABEL_1] = @@ -4237,8 +4237,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.ItemDefaultMoves = sParty_Isabel1 } + .partySize = ARRAY_COUNT(sParty_Isabel1), + .party = {.ItemDefaultMoves = sParty_Isabel1}, }, [TRAINER_ISABEL_2] = @@ -4251,8 +4251,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.ItemDefaultMoves = sParty_Isabel2 } + .partySize = ARRAY_COUNT(sParty_Isabel2), + .party = {.ItemDefaultMoves = sParty_Isabel2}, }, [TRAINER_ISABEL_3] = @@ -4265,8 +4265,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.ItemDefaultMoves = sParty_Isabel3 } + .partySize = ARRAY_COUNT(sParty_Isabel3), + .party = {.ItemDefaultMoves = sParty_Isabel3}, }, [TRAINER_ISABEL_4] = @@ -4279,8 +4279,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.ItemDefaultMoves = sParty_Isabel4 } + .partySize = ARRAY_COUNT(sParty_Isabel4), + .party = {.ItemDefaultMoves = sParty_Isabel4}, }, [TRAINER_ISABEL_5] = @@ -4293,8 +4293,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.ItemDefaultMoves = sParty_Isabel5 } + .partySize = ARRAY_COUNT(sParty_Isabel5), + .party = {.ItemDefaultMoves = sParty_Isabel5}, }, [TRAINER_TIMOTHY_1] = @@ -4307,8 +4307,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Timothy1 } + .partySize = ARRAY_COUNT(sParty_Timothy1), + .party = {.NoItemDefaultMoves = sParty_Timothy1}, }, [TRAINER_TIMOTHY_2] = @@ -4321,8 +4321,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Timothy2 } + .partySize = ARRAY_COUNT(sParty_Timothy2), + .party = {.NoItemCustomMoves = sParty_Timothy2}, }, [TRAINER_TIMOTHY_3] = @@ -4335,8 +4335,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Timothy3 } + .partySize = ARRAY_COUNT(sParty_Timothy3), + .party = {.NoItemCustomMoves = sParty_Timothy3}, }, [TRAINER_TIMOTHY_4] = @@ -4349,8 +4349,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Timothy4 } + .partySize = ARRAY_COUNT(sParty_Timothy4), + .party = {.NoItemCustomMoves = sParty_Timothy4}, }, [TRAINER_TIMOTHY_5] = @@ -4363,8 +4363,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Timothy5 } + .partySize = ARRAY_COUNT(sParty_Timothy5), + .party = {.NoItemCustomMoves = sParty_Timothy5}, }, [TRAINER_VICKY] = @@ -4377,8 +4377,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Vicky } + .partySize = ARRAY_COUNT(sParty_Vicky), + .party = {.NoItemCustomMoves = sParty_Vicky}, }, [TRAINER_SHELBY_1] = @@ -4391,8 +4391,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Shelby1 } + .partySize = ARRAY_COUNT(sParty_Shelby1), + .party = {.NoItemDefaultMoves = sParty_Shelby1}, }, [TRAINER_SHELBY_2] = @@ -4405,8 +4405,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Shelby2 } + .partySize = ARRAY_COUNT(sParty_Shelby2), + .party = {.NoItemDefaultMoves = sParty_Shelby2}, }, [TRAINER_SHELBY_3] = @@ -4419,8 +4419,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Shelby3 } + .partySize = ARRAY_COUNT(sParty_Shelby3), + .party = {.NoItemDefaultMoves = sParty_Shelby3}, }, [TRAINER_SHELBY_4] = @@ -4433,8 +4433,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Shelby4 } + .partySize = ARRAY_COUNT(sParty_Shelby4), + .party = {.NoItemDefaultMoves = sParty_Shelby4}, }, [TRAINER_SHELBY_5] = @@ -4447,8 +4447,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Shelby5 } + .partySize = ARRAY_COUNT(sParty_Shelby5), + .party = {.NoItemDefaultMoves = sParty_Shelby5}, }, [TRAINER_CALVIN_1] = @@ -4461,8 +4461,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Calvin1 } + .partySize = ARRAY_COUNT(sParty_Calvin1), + .party = {.NoItemDefaultMoves = sParty_Calvin1}, }, [TRAINER_BILLY] = @@ -4475,8 +4475,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Billy } + .partySize = ARRAY_COUNT(sParty_Billy), + .party = {.NoItemDefaultMoves = sParty_Billy}, }, [TRAINER_JOSH] = @@ -4489,8 +4489,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Josh } + .partySize = ARRAY_COUNT(sParty_Josh), + .party = {.NoItemCustomMoves = sParty_Josh}, }, [TRAINER_TOMMY] = @@ -4503,8 +4503,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Tommy } + .partySize = ARRAY_COUNT(sParty_Tommy), + .party = {.NoItemDefaultMoves = sParty_Tommy}, }, [TRAINER_JOEY] = @@ -4517,8 +4517,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Joey } + .partySize = ARRAY_COUNT(sParty_Joey), + .party = {.NoItemDefaultMoves = sParty_Joey}, }, [TRAINER_BEN] = @@ -4531,8 +4531,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Ben } + .partySize = ARRAY_COUNT(sParty_Ben), + .party = {.NoItemCustomMoves = sParty_Ben}, }, [TRAINER_QUINCY] = @@ -4545,8 +4545,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Quincy } + .partySize = ARRAY_COUNT(sParty_Quincy), + .party = {.NoItemCustomMoves = sParty_Quincy}, }, [TRAINER_KATELYNN] = @@ -4559,8 +4559,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Katelynn } + .partySize = ARRAY_COUNT(sParty_Katelynn), + .party = {.NoItemCustomMoves = sParty_Katelynn}, }, [TRAINER_JAYLEN] = @@ -4573,8 +4573,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Jaylen } + .partySize = ARRAY_COUNT(sParty_Jaylen), + .party = {.NoItemDefaultMoves = sParty_Jaylen}, }, [TRAINER_DILLON] = @@ -4587,8 +4587,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Dillon } + .partySize = ARRAY_COUNT(sParty_Dillon), + .party = {.NoItemDefaultMoves = sParty_Dillon}, }, [TRAINER_CALVIN_2] = @@ -4601,8 +4601,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Calvin2 } + .partySize = ARRAY_COUNT(sParty_Calvin2), + .party = {.NoItemDefaultMoves = sParty_Calvin2}, }, [TRAINER_CALVIN_3] = @@ -4615,8 +4615,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Calvin3 } + .partySize = ARRAY_COUNT(sParty_Calvin3), + .party = {.NoItemDefaultMoves = sParty_Calvin3}, }, [TRAINER_CALVIN_4] = @@ -4629,8 +4629,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Calvin4 } + .partySize = ARRAY_COUNT(sParty_Calvin4), + .party = {.NoItemDefaultMoves = sParty_Calvin4}, }, [TRAINER_CALVIN_5] = @@ -4643,8 +4643,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Calvin5 } + .partySize = ARRAY_COUNT(sParty_Calvin5), + .party = {.NoItemDefaultMoves = sParty_Calvin5}, }, [TRAINER_EDDIE] = @@ -4657,8 +4657,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Eddie } + .partySize = ARRAY_COUNT(sParty_Eddie), + .party = {.NoItemDefaultMoves = sParty_Eddie}, }, [TRAINER_ALLEN] = @@ -4671,8 +4671,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Allen } + .partySize = ARRAY_COUNT(sParty_Allen), + .party = {.NoItemDefaultMoves = sParty_Allen}, }, [TRAINER_TIMMY] = @@ -4685,8 +4685,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Timmy } + .partySize = ARRAY_COUNT(sParty_Timmy), + .party = {.NoItemDefaultMoves = sParty_Timmy}, }, [TRAINER_WALLACE] = @@ -4699,8 +4699,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 6, - .party = {.ItemCustomMoves = sParty_Wallace } + .partySize = ARRAY_COUNT(sParty_Wallace), + .party = {.ItemCustomMoves = sParty_Wallace}, }, [TRAINER_ANDREW] = @@ -4713,8 +4713,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Andrew } + .partySize = ARRAY_COUNT(sParty_Andrew), + .party = {.NoItemDefaultMoves = sParty_Andrew}, }, [TRAINER_IVAN] = @@ -4727,8 +4727,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Ivan } + .partySize = ARRAY_COUNT(sParty_Ivan), + .party = {.NoItemDefaultMoves = sParty_Ivan}, }, [TRAINER_CLAUDE] = @@ -4741,8 +4741,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Claude } + .partySize = ARRAY_COUNT(sParty_Claude), + .party = {.NoItemDefaultMoves = sParty_Claude}, }, [TRAINER_ELLIOT_1] = @@ -4755,8 +4755,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Elliot1 } + .partySize = ARRAY_COUNT(sParty_Elliot1), + .party = {.NoItemDefaultMoves = sParty_Elliot1}, }, [TRAINER_NED] = @@ -4769,8 +4769,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Ned } + .partySize = ARRAY_COUNT(sParty_Ned), + .party = {.NoItemDefaultMoves = sParty_Ned}, }, [TRAINER_DALE] = @@ -4783,8 +4783,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 4, - .party = {.NoItemDefaultMoves = sParty_Dale } + .partySize = ARRAY_COUNT(sParty_Dale), + .party = {.NoItemDefaultMoves = sParty_Dale}, }, [TRAINER_NOLAN] = @@ -4797,8 +4797,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Nolan } + .partySize = ARRAY_COUNT(sParty_Nolan), + .party = {.NoItemDefaultMoves = sParty_Nolan}, }, [TRAINER_BARNY] = @@ -4811,8 +4811,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Barny } + .partySize = ARRAY_COUNT(sParty_Barny), + .party = {.NoItemDefaultMoves = sParty_Barny}, }, [TRAINER_WADE] = @@ -4825,8 +4825,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Wade } + .partySize = ARRAY_COUNT(sParty_Wade), + .party = {.NoItemDefaultMoves = sParty_Wade}, }, [TRAINER_CARTER] = @@ -4839,8 +4839,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Carter } + .partySize = ARRAY_COUNT(sParty_Carter), + .party = {.NoItemDefaultMoves = sParty_Carter}, }, [TRAINER_ELLIOT_2] = @@ -4853,8 +4853,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Elliot2 } + .partySize = ARRAY_COUNT(sParty_Elliot2), + .party = {.NoItemDefaultMoves = sParty_Elliot2}, }, [TRAINER_ELLIOT_3] = @@ -4867,8 +4867,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 4, - .party = {.NoItemDefaultMoves = sParty_Elliot3 } + .partySize = ARRAY_COUNT(sParty_Elliot3), + .party = {.NoItemDefaultMoves = sParty_Elliot3}, }, [TRAINER_ELLIOT_4] = @@ -4881,8 +4881,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 4, - .party = {.NoItemDefaultMoves = sParty_Elliot4 } + .partySize = ARRAY_COUNT(sParty_Elliot4), + .party = {.NoItemDefaultMoves = sParty_Elliot4}, }, [TRAINER_ELLIOT_5] = @@ -4895,8 +4895,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT, - .partySize = 4, - .party = {.NoItemDefaultMoves = sParty_Elliot5 } + .partySize = ARRAY_COUNT(sParty_Elliot5), + .party = {.NoItemDefaultMoves = sParty_Elliot5}, }, [TRAINER_RONALD] = @@ -4909,8 +4909,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 6, - .party = {.NoItemDefaultMoves = sParty_Ronald } + .partySize = ARRAY_COUNT(sParty_Ronald), + .party = {.NoItemDefaultMoves = sParty_Ronald}, }, [TRAINER_JACOB] = @@ -4923,8 +4923,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Jacob } + .partySize = ARRAY_COUNT(sParty_Jacob), + .party = {.NoItemDefaultMoves = sParty_Jacob}, }, [TRAINER_ANTHONY] = @@ -4937,8 +4937,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Anthony } + .partySize = ARRAY_COUNT(sParty_Anthony), + .party = {.NoItemDefaultMoves = sParty_Anthony}, }, [TRAINER_BENJAMIN_1] = @@ -4951,8 +4951,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Benjamin1 } + .partySize = ARRAY_COUNT(sParty_Benjamin1), + .party = {.NoItemDefaultMoves = sParty_Benjamin1}, }, [TRAINER_BENJAMIN_2] = @@ -4965,8 +4965,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Benjamin2 } + .partySize = ARRAY_COUNT(sParty_Benjamin2), + .party = {.NoItemDefaultMoves = sParty_Benjamin2}, }, [TRAINER_BENJAMIN_3] = @@ -4979,8 +4979,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Benjamin3 } + .partySize = ARRAY_COUNT(sParty_Benjamin3), + .party = {.NoItemDefaultMoves = sParty_Benjamin3}, }, [TRAINER_BENJAMIN_4] = @@ -4993,8 +4993,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Benjamin4 } + .partySize = ARRAY_COUNT(sParty_Benjamin4), + .party = {.NoItemDefaultMoves = sParty_Benjamin4}, }, [TRAINER_BENJAMIN_5] = @@ -5007,8 +5007,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Benjamin5 } + .partySize = ARRAY_COUNT(sParty_Benjamin5), + .party = {.NoItemDefaultMoves = sParty_Benjamin5}, }, [TRAINER_ABIGAIL_1] = @@ -5021,8 +5021,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Abigail1 } + .partySize = ARRAY_COUNT(sParty_Abigail1), + .party = {.NoItemDefaultMoves = sParty_Abigail1}, }, [TRAINER_JASMINE] = @@ -5035,8 +5035,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Jasmine } + .partySize = ARRAY_COUNT(sParty_Jasmine), + .party = {.NoItemDefaultMoves = sParty_Jasmine}, }, [TRAINER_ABIGAIL_2] = @@ -5049,8 +5049,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Abigail2 } + .partySize = ARRAY_COUNT(sParty_Abigail2), + .party = {.NoItemDefaultMoves = sParty_Abigail2}, }, [TRAINER_ABIGAIL_3] = @@ -5063,8 +5063,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Abigail3 } + .partySize = ARRAY_COUNT(sParty_Abigail3), + .party = {.NoItemDefaultMoves = sParty_Abigail3}, }, [TRAINER_ABIGAIL_4] = @@ -5077,8 +5077,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Abigail4 } + .partySize = ARRAY_COUNT(sParty_Abigail4), + .party = {.NoItemDefaultMoves = sParty_Abigail4}, }, [TRAINER_ABIGAIL_5] = @@ -5091,8 +5091,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Abigail5 } + .partySize = ARRAY_COUNT(sParty_Abigail5), + .party = {.NoItemDefaultMoves = sParty_Abigail5}, }, [TRAINER_DYLAN_1] = @@ -5105,8 +5105,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Dylan1 } + .partySize = ARRAY_COUNT(sParty_Dylan1), + .party = {.NoItemDefaultMoves = sParty_Dylan1}, }, [TRAINER_DYLAN_2] = @@ -5119,8 +5119,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Dylan2 } + .partySize = ARRAY_COUNT(sParty_Dylan2), + .party = {.NoItemDefaultMoves = sParty_Dylan2}, }, [TRAINER_DYLAN_3] = @@ -5133,8 +5133,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Dylan3 } + .partySize = ARRAY_COUNT(sParty_Dylan3), + .party = {.NoItemDefaultMoves = sParty_Dylan3}, }, [TRAINER_DYLAN_4] = @@ -5147,8 +5147,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Dylan4 } + .partySize = ARRAY_COUNT(sParty_Dylan4), + .party = {.NoItemDefaultMoves = sParty_Dylan4}, }, [TRAINER_DYLAN_5] = @@ -5161,8 +5161,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Dylan5 } + .partySize = ARRAY_COUNT(sParty_Dylan5), + .party = {.NoItemDefaultMoves = sParty_Dylan5}, }, [TRAINER_MARIA_1] = @@ -5175,8 +5175,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Maria1 } + .partySize = ARRAY_COUNT(sParty_Maria1), + .party = {.NoItemDefaultMoves = sParty_Maria1}, }, [TRAINER_MARIA_2] = @@ -5189,8 +5189,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Maria2 } + .partySize = ARRAY_COUNT(sParty_Maria2), + .party = {.NoItemDefaultMoves = sParty_Maria2}, }, [TRAINER_MARIA_3] = @@ -5203,8 +5203,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Maria3 } + .partySize = ARRAY_COUNT(sParty_Maria3), + .party = {.NoItemDefaultMoves = sParty_Maria3}, }, [TRAINER_MARIA_4] = @@ -5217,8 +5217,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Maria4 } + .partySize = ARRAY_COUNT(sParty_Maria4), + .party = {.NoItemDefaultMoves = sParty_Maria4}, }, [TRAINER_MARIA_5] = @@ -5231,8 +5231,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Maria5 } + .partySize = ARRAY_COUNT(sParty_Maria5), + .party = {.NoItemDefaultMoves = sParty_Maria5}, }, [TRAINER_CAMDEN] = @@ -5245,8 +5245,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Camden } + .partySize = ARRAY_COUNT(sParty_Camden), + .party = {.NoItemDefaultMoves = sParty_Camden}, }, [TRAINER_DEMETRIUS] = @@ -5259,8 +5259,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Demetrius } + .partySize = ARRAY_COUNT(sParty_Demetrius), + .party = {.NoItemDefaultMoves = sParty_Demetrius}, }, [TRAINER_ISAIAH_1] = @@ -5273,8 +5273,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Isaiah1 } + .partySize = ARRAY_COUNT(sParty_Isaiah1), + .party = {.NoItemDefaultMoves = sParty_Isaiah1}, }, [TRAINER_PABLO_1] = @@ -5287,8 +5287,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Pablo1 } + .partySize = ARRAY_COUNT(sParty_Pablo1), + .party = {.NoItemDefaultMoves = sParty_Pablo1}, }, [TRAINER_CHASE] = @@ -5301,8 +5301,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Chase } + .partySize = ARRAY_COUNT(sParty_Chase), + .party = {.NoItemDefaultMoves = sParty_Chase}, }, [TRAINER_ISAIAH_2] = @@ -5315,8 +5315,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Isaiah2 } + .partySize = ARRAY_COUNT(sParty_Isaiah2), + .party = {.NoItemDefaultMoves = sParty_Isaiah2}, }, [TRAINER_ISAIAH_3] = @@ -5329,8 +5329,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Isaiah3 } + .partySize = ARRAY_COUNT(sParty_Isaiah3), + .party = {.NoItemDefaultMoves = sParty_Isaiah3}, }, [TRAINER_ISAIAH_4] = @@ -5343,8 +5343,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Isaiah4 } + .partySize = ARRAY_COUNT(sParty_Isaiah4), + .party = {.NoItemDefaultMoves = sParty_Isaiah4}, }, [TRAINER_ISAIAH_5] = @@ -5357,8 +5357,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Isaiah5 } + .partySize = ARRAY_COUNT(sParty_Isaiah5), + .party = {.NoItemDefaultMoves = sParty_Isaiah5}, }, [TRAINER_ISOBEL] = @@ -5371,8 +5371,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Isobel } + .partySize = ARRAY_COUNT(sParty_Isobel), + .party = {.NoItemDefaultMoves = sParty_Isobel}, }, [TRAINER_DONNY] = @@ -5385,8 +5385,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Donny } + .partySize = ARRAY_COUNT(sParty_Donny), + .party = {.NoItemDefaultMoves = sParty_Donny}, }, [TRAINER_TALIA] = @@ -5399,8 +5399,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Talia } + .partySize = ARRAY_COUNT(sParty_Talia), + .party = {.NoItemDefaultMoves = sParty_Talia}, }, [TRAINER_KATELYN_1] = @@ -5413,8 +5413,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Katelyn1 } + .partySize = ARRAY_COUNT(sParty_Katelyn1), + .party = {.NoItemDefaultMoves = sParty_Katelyn1}, }, [TRAINER_ALLISON] = @@ -5427,8 +5427,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Allison } + .partySize = ARRAY_COUNT(sParty_Allison), + .party = {.NoItemDefaultMoves = sParty_Allison}, }, [TRAINER_KATELYN_2] = @@ -5441,8 +5441,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Katelyn2 } + .partySize = ARRAY_COUNT(sParty_Katelyn2), + .party = {.NoItemDefaultMoves = sParty_Katelyn2}, }, [TRAINER_KATELYN_3] = @@ -5455,8 +5455,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Katelyn3 } + .partySize = ARRAY_COUNT(sParty_Katelyn3), + .party = {.NoItemDefaultMoves = sParty_Katelyn3}, }, [TRAINER_KATELYN_4] = @@ -5469,8 +5469,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Katelyn4 } + .partySize = ARRAY_COUNT(sParty_Katelyn4), + .party = {.NoItemDefaultMoves = sParty_Katelyn4}, }, [TRAINER_KATELYN_5] = @@ -5483,8 +5483,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Katelyn5 } + .partySize = ARRAY_COUNT(sParty_Katelyn5), + .party = {.NoItemDefaultMoves = sParty_Katelyn5}, }, [TRAINER_NICOLAS_1] = @@ -5497,8 +5497,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Nicolas1 } + .partySize = ARRAY_COUNT(sParty_Nicolas1), + .party = {.NoItemDefaultMoves = sParty_Nicolas1}, }, [TRAINER_NICOLAS_2] = @@ -5511,8 +5511,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Nicolas2 } + .partySize = ARRAY_COUNT(sParty_Nicolas2), + .party = {.NoItemDefaultMoves = sParty_Nicolas2}, }, [TRAINER_NICOLAS_3] = @@ -5525,8 +5525,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Nicolas3 } + .partySize = ARRAY_COUNT(sParty_Nicolas3), + .party = {.NoItemDefaultMoves = sParty_Nicolas3}, }, [TRAINER_NICOLAS_4] = @@ -5539,8 +5539,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Nicolas4 } + .partySize = ARRAY_COUNT(sParty_Nicolas4), + .party = {.NoItemDefaultMoves = sParty_Nicolas4}, }, [TRAINER_NICOLAS_5] = @@ -5553,8 +5553,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.ItemDefaultMoves = sParty_Nicolas5 } + .partySize = ARRAY_COUNT(sParty_Nicolas5), + .party = {.ItemDefaultMoves = sParty_Nicolas5}, }, [TRAINER_AARON] = @@ -5567,8 +5567,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Aaron } + .partySize = ARRAY_COUNT(sParty_Aaron), + .party = {.NoItemCustomMoves = sParty_Aaron}, }, [TRAINER_PERRY] = @@ -5581,8 +5581,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Perry } + .partySize = ARRAY_COUNT(sParty_Perry), + .party = {.NoItemDefaultMoves = sParty_Perry}, }, [TRAINER_HUGH] = @@ -5595,8 +5595,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Hugh } + .partySize = ARRAY_COUNT(sParty_Hugh), + .party = {.NoItemDefaultMoves = sParty_Hugh}, }, [TRAINER_PHIL] = @@ -5609,8 +5609,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Phil } + .partySize = ARRAY_COUNT(sParty_Phil), + .party = {.NoItemDefaultMoves = sParty_Phil}, }, [TRAINER_JARED] = @@ -5623,8 +5623,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Jared } + .partySize = ARRAY_COUNT(sParty_Jared), + .party = {.NoItemDefaultMoves = sParty_Jared}, }, [TRAINER_HUMBERTO] = @@ -5637,8 +5637,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Humberto } + .partySize = ARRAY_COUNT(sParty_Humberto), + .party = {.NoItemDefaultMoves = sParty_Humberto}, }, [TRAINER_PRESLEY] = @@ -5651,8 +5651,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Presley } + .partySize = ARRAY_COUNT(sParty_Presley), + .party = {.NoItemDefaultMoves = sParty_Presley}, }, [TRAINER_EDWARDO] = @@ -5665,8 +5665,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Edwardo } + .partySize = ARRAY_COUNT(sParty_Edwardo), + .party = {.NoItemDefaultMoves = sParty_Edwardo}, }, [TRAINER_COLIN] = @@ -5679,8 +5679,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Colin } + .partySize = ARRAY_COUNT(sParty_Colin), + .party = {.NoItemDefaultMoves = sParty_Colin}, }, [TRAINER_ROBERT_1] = @@ -5693,8 +5693,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Robert1 } + .partySize = ARRAY_COUNT(sParty_Robert1), + .party = {.NoItemDefaultMoves = sParty_Robert1}, }, [TRAINER_BENNY] = @@ -5707,8 +5707,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Benny } + .partySize = ARRAY_COUNT(sParty_Benny), + .party = {.NoItemDefaultMoves = sParty_Benny}, }, [TRAINER_CHESTER] = @@ -5721,8 +5721,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Chester } + .partySize = ARRAY_COUNT(sParty_Chester), + .party = {.NoItemDefaultMoves = sParty_Chester}, }, [TRAINER_ROBERT_2] = @@ -5735,8 +5735,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Robert2 } + .partySize = ARRAY_COUNT(sParty_Robert2), + .party = {.NoItemDefaultMoves = sParty_Robert2}, }, [TRAINER_ROBERT_3] = @@ -5749,8 +5749,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Robert3 } + .partySize = ARRAY_COUNT(sParty_Robert3), + .party = {.NoItemDefaultMoves = sParty_Robert3}, }, [TRAINER_ROBERT_4] = @@ -5763,8 +5763,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Robert4 } + .partySize = ARRAY_COUNT(sParty_Robert4), + .party = {.NoItemDefaultMoves = sParty_Robert4}, }, [TRAINER_ROBERT_5] = @@ -5777,8 +5777,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Robert5 } + .partySize = ARRAY_COUNT(sParty_Robert5), + .party = {.NoItemDefaultMoves = sParty_Robert5}, }, [TRAINER_ALEX] = @@ -5791,8 +5791,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Alex } + .partySize = ARRAY_COUNT(sParty_Alex), + .party = {.NoItemDefaultMoves = sParty_Alex}, }, [TRAINER_BECK] = @@ -5805,8 +5805,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Beck } + .partySize = ARRAY_COUNT(sParty_Beck), + .party = {.NoItemDefaultMoves = sParty_Beck}, }, [TRAINER_YASU] = @@ -5819,8 +5819,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Yasu } + .partySize = ARRAY_COUNT(sParty_Yasu), + .party = {.NoItemDefaultMoves = sParty_Yasu}, }, [TRAINER_TAKASHI] = @@ -5833,8 +5833,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Takashi } + .partySize = ARRAY_COUNT(sParty_Takashi), + .party = {.NoItemDefaultMoves = sParty_Takashi}, }, [TRAINER_DIANNE] = @@ -5847,8 +5847,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = 0, - .partySize = 2, - .party = {.ItemCustomMoves = sParty_Dianne } + .partySize = ARRAY_COUNT(sParty_Dianne), + .party = {.ItemCustomMoves = sParty_Dianne}, }, [TRAINER_JANI] = @@ -5861,8 +5861,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = 0, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Jani } + .partySize = ARRAY_COUNT(sParty_Jani), + .party = {.NoItemDefaultMoves = sParty_Jani}, }, [TRAINER_LAO_1] = @@ -5875,8 +5875,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = 0, - .partySize = 3, - .party = {.NoItemCustomMoves = sParty_Lao1 } + .partySize = ARRAY_COUNT(sParty_Lao1), + .party = {.NoItemCustomMoves = sParty_Lao1}, }, [TRAINER_LUNG] = @@ -5889,8 +5889,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = 0, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Lung } + .partySize = ARRAY_COUNT(sParty_Lung), + .party = {.NoItemDefaultMoves = sParty_Lung}, }, [TRAINER_LAO_2] = @@ -5903,8 +5903,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = 0, - .partySize = 4, - .party = {.NoItemCustomMoves = sParty_Lao2 } + .partySize = ARRAY_COUNT(sParty_Lao2), + .party = {.NoItemCustomMoves = sParty_Lao2}, }, [TRAINER_LAO_3] = @@ -5917,8 +5917,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = 0, - .partySize = 4, - .party = {.NoItemCustomMoves = sParty_Lao3 } + .partySize = ARRAY_COUNT(sParty_Lao3), + .party = {.NoItemCustomMoves = sParty_Lao3}, }, [TRAINER_LAO_4] = @@ -5931,8 +5931,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = 0, - .partySize = 4, - .party = {.NoItemCustomMoves = sParty_Lao4 } + .partySize = ARRAY_COUNT(sParty_Lao4), + .party = {.NoItemCustomMoves = sParty_Lao4}, }, [TRAINER_LAO_5] = @@ -5945,8 +5945,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = 0, - .partySize = 4, - .party = {.ItemCustomMoves = sParty_Lao5 } + .partySize = ARRAY_COUNT(sParty_Lao5), + .party = {.ItemCustomMoves = sParty_Lao5}, }, [TRAINER_JOCELYN] = @@ -5959,8 +5959,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Jocelyn } + .partySize = ARRAY_COUNT(sParty_Jocelyn), + .party = {.NoItemDefaultMoves = sParty_Jocelyn}, }, [TRAINER_LAURA] = @@ -5973,8 +5973,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Laura } + .partySize = ARRAY_COUNT(sParty_Laura), + .party = {.NoItemDefaultMoves = sParty_Laura}, }, [TRAINER_CYNDY_1] = @@ -5987,8 +5987,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Cyndy1 } + .partySize = ARRAY_COUNT(sParty_Cyndy1), + .party = {.NoItemDefaultMoves = sParty_Cyndy1}, }, [TRAINER_CORA] = @@ -6001,8 +6001,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Cora } + .partySize = ARRAY_COUNT(sParty_Cora), + .party = {.NoItemDefaultMoves = sParty_Cora}, }, [TRAINER_PAULA] = @@ -6015,8 +6015,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Paula } + .partySize = ARRAY_COUNT(sParty_Paula), + .party = {.NoItemDefaultMoves = sParty_Paula}, }, [TRAINER_CYNDY_2] = @@ -6029,8 +6029,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Cyndy2 } + .partySize = ARRAY_COUNT(sParty_Cyndy2), + .party = {.NoItemDefaultMoves = sParty_Cyndy2}, }, [TRAINER_CYNDY_3] = @@ -6043,8 +6043,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Cyndy3 } + .partySize = ARRAY_COUNT(sParty_Cyndy3), + .party = {.NoItemDefaultMoves = sParty_Cyndy3}, }, [TRAINER_CYNDY_4] = @@ -6057,8 +6057,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Cyndy4 } + .partySize = ARRAY_COUNT(sParty_Cyndy4), + .party = {.NoItemDefaultMoves = sParty_Cyndy4}, }, [TRAINER_CYNDY_5] = @@ -6071,8 +6071,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Cyndy5 } + .partySize = ARRAY_COUNT(sParty_Cyndy5), + .party = {.NoItemDefaultMoves = sParty_Cyndy5}, }, [TRAINER_MADELINE_1] = @@ -6085,8 +6085,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Madeline1 } + .partySize = ARRAY_COUNT(sParty_Madeline1), + .party = {.NoItemCustomMoves = sParty_Madeline1}, }, [TRAINER_CLARISSA] = @@ -6099,8 +6099,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Clarissa } + .partySize = ARRAY_COUNT(sParty_Clarissa), + .party = {.NoItemDefaultMoves = sParty_Clarissa}, }, [TRAINER_ANGELICA] = @@ -6113,8 +6113,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Angelica } + .partySize = ARRAY_COUNT(sParty_Angelica), + .party = {.NoItemCustomMoves = sParty_Angelica}, }, [TRAINER_MADELINE_2] = @@ -6127,8 +6127,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Madeline2 } + .partySize = ARRAY_COUNT(sParty_Madeline2), + .party = {.NoItemCustomMoves = sParty_Madeline2}, }, [TRAINER_MADELINE_3] = @@ -6141,8 +6141,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Madeline3 } + .partySize = ARRAY_COUNT(sParty_Madeline3), + .party = {.NoItemCustomMoves = sParty_Madeline3}, }, [TRAINER_MADELINE_4] = @@ -6155,8 +6155,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Madeline4 } + .partySize = ARRAY_COUNT(sParty_Madeline4), + .party = {.NoItemCustomMoves = sParty_Madeline4}, }, [TRAINER_MADELINE_5] = @@ -6169,8 +6169,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Madeline5 } + .partySize = ARRAY_COUNT(sParty_Madeline5), + .party = {.NoItemCustomMoves = sParty_Madeline5}, }, [TRAINER_BEVERLY] = @@ -6183,8 +6183,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Beverly } + .partySize = ARRAY_COUNT(sParty_Beverly), + .party = {.NoItemDefaultMoves = sParty_Beverly}, }, [TRAINER_IMANI] = @@ -6197,8 +6197,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Imani } + .partySize = ARRAY_COUNT(sParty_Imani), + .party = {.NoItemDefaultMoves = sParty_Imani}, }, [TRAINER_KYLA] = @@ -6211,8 +6211,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Kyla } + .partySize = ARRAY_COUNT(sParty_Kyla), + .party = {.NoItemDefaultMoves = sParty_Kyla}, }, [TRAINER_DENISE] = @@ -6225,8 +6225,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Denise } + .partySize = ARRAY_COUNT(sParty_Denise), + .party = {.NoItemDefaultMoves = sParty_Denise}, }, [TRAINER_BETH] = @@ -6239,8 +6239,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Beth } + .partySize = ARRAY_COUNT(sParty_Beth), + .party = {.NoItemDefaultMoves = sParty_Beth}, }, [TRAINER_TARA] = @@ -6253,8 +6253,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Tara } + .partySize = ARRAY_COUNT(sParty_Tara), + .party = {.NoItemDefaultMoves = sParty_Tara}, }, [TRAINER_MISSY] = @@ -6267,8 +6267,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Missy } + .partySize = ARRAY_COUNT(sParty_Missy), + .party = {.NoItemDefaultMoves = sParty_Missy}, }, [TRAINER_ALICE] = @@ -6281,8 +6281,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Alice } + .partySize = ARRAY_COUNT(sParty_Alice), + .party = {.NoItemDefaultMoves = sParty_Alice}, }, [TRAINER_JENNY_1] = @@ -6295,8 +6295,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Jenny1 } + .partySize = ARRAY_COUNT(sParty_Jenny1), + .party = {.NoItemDefaultMoves = sParty_Jenny1}, }, [TRAINER_GRACE] = @@ -6309,8 +6309,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grace } + .partySize = ARRAY_COUNT(sParty_Grace), + .party = {.NoItemDefaultMoves = sParty_Grace}, }, [TRAINER_TANYA] = @@ -6323,8 +6323,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Tanya } + .partySize = ARRAY_COUNT(sParty_Tanya), + .party = {.NoItemDefaultMoves = sParty_Tanya}, }, [TRAINER_SHARON] = @@ -6337,8 +6337,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Sharon } + .partySize = ARRAY_COUNT(sParty_Sharon), + .party = {.NoItemDefaultMoves = sParty_Sharon}, }, [TRAINER_NIKKI] = @@ -6351,8 +6351,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Nikki } + .partySize = ARRAY_COUNT(sParty_Nikki), + .party = {.NoItemDefaultMoves = sParty_Nikki}, }, [TRAINER_BRENDA] = @@ -6365,8 +6365,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Brenda } + .partySize = ARRAY_COUNT(sParty_Brenda), + .party = {.NoItemDefaultMoves = sParty_Brenda}, }, [TRAINER_KATIE] = @@ -6379,8 +6379,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Katie } + .partySize = ARRAY_COUNT(sParty_Katie), + .party = {.NoItemDefaultMoves = sParty_Katie}, }, [TRAINER_SUSIE] = @@ -6393,8 +6393,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Susie } + .partySize = ARRAY_COUNT(sParty_Susie), + .party = {.NoItemDefaultMoves = sParty_Susie}, }, [TRAINER_KARA] = @@ -6407,8 +6407,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Kara } + .partySize = ARRAY_COUNT(sParty_Kara), + .party = {.NoItemDefaultMoves = sParty_Kara}, }, [TRAINER_DANA] = @@ -6421,8 +6421,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Dana } + .partySize = ARRAY_COUNT(sParty_Dana), + .party = {.NoItemDefaultMoves = sParty_Dana}, }, [TRAINER_SIENNA] = @@ -6435,8 +6435,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Sienna } + .partySize = ARRAY_COUNT(sParty_Sienna), + .party = {.NoItemDefaultMoves = sParty_Sienna}, }, [TRAINER_DEBRA] = @@ -6449,8 +6449,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Debra } + .partySize = ARRAY_COUNT(sParty_Debra), + .party = {.NoItemDefaultMoves = sParty_Debra}, }, [TRAINER_LINDA] = @@ -6463,8 +6463,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Linda } + .partySize = ARRAY_COUNT(sParty_Linda), + .party = {.NoItemDefaultMoves = sParty_Linda}, }, [TRAINER_KAYLEE] = @@ -6477,8 +6477,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Kaylee } + .partySize = ARRAY_COUNT(sParty_Kaylee), + .party = {.NoItemDefaultMoves = sParty_Kaylee}, }, [TRAINER_LAUREL] = @@ -6491,8 +6491,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Laurel } + .partySize = ARRAY_COUNT(sParty_Laurel), + .party = {.NoItemDefaultMoves = sParty_Laurel}, }, [TRAINER_CARLEE] = @@ -6505,8 +6505,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Carlee } + .partySize = ARRAY_COUNT(sParty_Carlee), + .party = {.NoItemDefaultMoves = sParty_Carlee}, }, [TRAINER_JENNY_2] = @@ -6519,8 +6519,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Jenny2 } + .partySize = ARRAY_COUNT(sParty_Jenny2), + .party = {.NoItemDefaultMoves = sParty_Jenny2}, }, [TRAINER_JENNY_3] = @@ -6533,8 +6533,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Jenny3 } + .partySize = ARRAY_COUNT(sParty_Jenny3), + .party = {.NoItemDefaultMoves = sParty_Jenny3}, }, [TRAINER_JENNY_4] = @@ -6547,8 +6547,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Jenny4 } + .partySize = ARRAY_COUNT(sParty_Jenny4), + .party = {.NoItemDefaultMoves = sParty_Jenny4}, }, [TRAINER_JENNY_5] = @@ -6561,8 +6561,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Jenny5 } + .partySize = ARRAY_COUNT(sParty_Jenny5), + .party = {.NoItemDefaultMoves = sParty_Jenny5}, }, [TRAINER_HEIDI] = @@ -6575,8 +6575,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Heidi } + .partySize = ARRAY_COUNT(sParty_Heidi), + .party = {.NoItemCustomMoves = sParty_Heidi}, }, [TRAINER_BECKY] = @@ -6589,8 +6589,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Becky } + .partySize = ARRAY_COUNT(sParty_Becky), + .party = {.NoItemCustomMoves = sParty_Becky}, }, [TRAINER_CAROL] = @@ -6603,8 +6603,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Carol } + .partySize = ARRAY_COUNT(sParty_Carol), + .party = {.NoItemDefaultMoves = sParty_Carol}, }, [TRAINER_NANCY] = @@ -6617,8 +6617,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Nancy } + .partySize = ARRAY_COUNT(sParty_Nancy), + .party = {.NoItemDefaultMoves = sParty_Nancy}, }, [TRAINER_MARTHA] = @@ -6631,8 +6631,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Martha } + .partySize = ARRAY_COUNT(sParty_Martha), + .party = {.NoItemDefaultMoves = sParty_Martha}, }, [TRAINER_DIANA_1] = @@ -6645,8 +6645,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Diana1 } + .partySize = ARRAY_COUNT(sParty_Diana1), + .party = {.NoItemDefaultMoves = sParty_Diana1}, }, [TRAINER_CEDRIC] = @@ -6659,8 +6659,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Cedric } + .partySize = ARRAY_COUNT(sParty_Cedric), + .party = {.NoItemCustomMoves = sParty_Cedric}, }, [TRAINER_IRENE] = @@ -6673,8 +6673,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Irene } + .partySize = ARRAY_COUNT(sParty_Irene), + .party = {.NoItemDefaultMoves = sParty_Irene}, }, [TRAINER_DIANA_2] = @@ -6687,8 +6687,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Diana2 } + .partySize = ARRAY_COUNT(sParty_Diana2), + .party = {.NoItemDefaultMoves = sParty_Diana2}, }, [TRAINER_DIANA_3] = @@ -6701,8 +6701,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Diana3 } + .partySize = ARRAY_COUNT(sParty_Diana3), + .party = {.NoItemDefaultMoves = sParty_Diana3}, }, [TRAINER_DIANA_4] = @@ -6715,8 +6715,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Diana4 } + .partySize = ARRAY_COUNT(sParty_Diana4), + .party = {.NoItemDefaultMoves = sParty_Diana4}, }, [TRAINER_DIANA_5] = @@ -6729,8 +6729,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Diana5 } + .partySize = ARRAY_COUNT(sParty_Diana5), + .party = {.NoItemDefaultMoves = sParty_Diana5}, }, [TRAINER_AMY_AND_LIV_1] = @@ -6743,8 +6743,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_AmyAndLiv1 } + .partySize = ARRAY_COUNT(sParty_AmyAndLiv1), + .party = {.NoItemDefaultMoves = sParty_AmyAndLiv1}, }, [TRAINER_AMY_AND_LIV_2] = @@ -6757,8 +6757,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_AmyAndLiv2 } + .partySize = ARRAY_COUNT(sParty_AmyAndLiv2), + .party = {.NoItemDefaultMoves = sParty_AmyAndLiv2}, }, [TRAINER_GINA_AND_MIA_1] = @@ -6771,8 +6771,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_GinaAndMia1 } + .partySize = ARRAY_COUNT(sParty_GinaAndMia1), + .party = {.NoItemDefaultMoves = sParty_GinaAndMia1}, }, [TRAINER_MIU_AND_YUKI] = @@ -6785,8 +6785,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_MiuAndYuki } + .partySize = ARRAY_COUNT(sParty_MiuAndYuki), + .party = {.NoItemDefaultMoves = sParty_MiuAndYuki}, }, [TRAINER_AMY_AND_LIV_3] = @@ -6799,8 +6799,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_AmyAndLiv3 } + .partySize = ARRAY_COUNT(sParty_AmyAndLiv3), + .party = {.NoItemDefaultMoves = sParty_AmyAndLiv3}, }, [TRAINER_GINA_AND_MIA_2] = @@ -6813,8 +6813,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_GinaAndMia2 } + .partySize = ARRAY_COUNT(sParty_GinaAndMia2), + .party = {.NoItemCustomMoves = sParty_GinaAndMia2}, }, [TRAINER_AMY_AND_LIV_4] = @@ -6827,8 +6827,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_AmyAndLiv4 } + .partySize = ARRAY_COUNT(sParty_AmyAndLiv4), + .party = {.NoItemDefaultMoves = sParty_AmyAndLiv4}, }, [TRAINER_AMY_AND_LIV_5] = @@ -6841,8 +6841,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_AmyAndLiv5 } + .partySize = ARRAY_COUNT(sParty_AmyAndLiv5), + .party = {.NoItemCustomMoves = sParty_AmyAndLiv5}, }, [TRAINER_AMY_AND_LIV_6] = @@ -6855,8 +6855,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_AmyAndLiv6 } + .partySize = ARRAY_COUNT(sParty_AmyAndLiv6), + .party = {.NoItemCustomMoves = sParty_AmyAndLiv6}, }, [TRAINER_HUEY] = @@ -6869,8 +6869,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Huey } + .partySize = ARRAY_COUNT(sParty_Huey), + .party = {.NoItemDefaultMoves = sParty_Huey}, }, [TRAINER_EDMOND] = @@ -6883,8 +6883,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Edmond } + .partySize = ARRAY_COUNT(sParty_Edmond), + .party = {.NoItemDefaultMoves = sParty_Edmond}, }, [TRAINER_ERNEST_1] = @@ -6897,8 +6897,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Ernest1 } + .partySize = ARRAY_COUNT(sParty_Ernest1), + .party = {.NoItemDefaultMoves = sParty_Ernest1}, }, [TRAINER_DWAYNE] = @@ -6911,8 +6911,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Dwayne } + .partySize = ARRAY_COUNT(sParty_Dwayne), + .party = {.NoItemDefaultMoves = sParty_Dwayne}, }, [TRAINER_PHILLIP] = @@ -6925,8 +6925,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Phillip } + .partySize = ARRAY_COUNT(sParty_Phillip), + .party = {.NoItemDefaultMoves = sParty_Phillip}, }, [TRAINER_LEONARD] = @@ -6939,8 +6939,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Leonard } + .partySize = ARRAY_COUNT(sParty_Leonard), + .party = {.NoItemDefaultMoves = sParty_Leonard}, }, [TRAINER_DUNCAN] = @@ -6953,8 +6953,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Duncan } + .partySize = ARRAY_COUNT(sParty_Duncan), + .party = {.NoItemDefaultMoves = sParty_Duncan}, }, [TRAINER_ERNEST_2] = @@ -6967,8 +6967,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Ernest2 } + .partySize = ARRAY_COUNT(sParty_Ernest2), + .party = {.NoItemDefaultMoves = sParty_Ernest2}, }, [TRAINER_ERNEST_3] = @@ -6981,8 +6981,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Ernest3 } + .partySize = ARRAY_COUNT(sParty_Ernest3), + .party = {.NoItemDefaultMoves = sParty_Ernest3}, }, [TRAINER_ERNEST_4] = @@ -6995,8 +6995,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Ernest4 } + .partySize = ARRAY_COUNT(sParty_Ernest4), + .party = {.NoItemDefaultMoves = sParty_Ernest4}, }, [TRAINER_ERNEST_5] = @@ -7009,8 +7009,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Ernest5 } + .partySize = ARRAY_COUNT(sParty_Ernest5), + .party = {.NoItemDefaultMoves = sParty_Ernest5}, }, [TRAINER_ELI] = @@ -7023,8 +7023,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Eli } + .partySize = ARRAY_COUNT(sParty_Eli), + .party = {.NoItemDefaultMoves = sParty_Eli}, }, [TRAINER_ANNIKA] = @@ -7037,22 +7037,22 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.ItemCustomMoves = sParty_Annika } + .partySize = ARRAY_COUNT(sParty_Annika), + .party = {.ItemCustomMoves = sParty_Annika}, }, [TRAINER_JAZMYN] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_COOLTRAINER_UNUSED, + .trainerClass = TRAINER_CLASS_COOLTRAINER_2, .encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_COOL, .trainerPic = TRAINER_PIC_COOLTRAINER_F, .trainerName = _("JAZMYN"), .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Jazmyn } + .partySize = ARRAY_COUNT(sParty_Jazmyn), + .party = {.NoItemDefaultMoves = sParty_Jazmyn}, }, [TRAINER_JONAS] = @@ -7065,8 +7065,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Jonas } + .partySize = ARRAY_COUNT(sParty_Jonas), + .party = {.NoItemCustomMoves = sParty_Jonas}, }, [TRAINER_KAYLEY] = @@ -7079,8 +7079,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Kayley } + .partySize = ARRAY_COUNT(sParty_Kayley), + .party = {.NoItemCustomMoves = sParty_Kayley}, }, [TRAINER_AURON] = @@ -7093,8 +7093,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Auron } + .partySize = ARRAY_COUNT(sParty_Auron), + .party = {.NoItemDefaultMoves = sParty_Auron}, }, [TRAINER_KELVIN] = @@ -7107,8 +7107,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Kelvin } + .partySize = ARRAY_COUNT(sParty_Kelvin), + .party = {.NoItemDefaultMoves = sParty_Kelvin}, }, [TRAINER_MARLEY] = @@ -7121,8 +7121,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.ItemCustomMoves = sParty_Marley } + .partySize = ARRAY_COUNT(sParty_Marley), + .party = {.ItemCustomMoves = sParty_Marley}, }, [TRAINER_REYNA] = @@ -7135,8 +7135,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Reyna } + .partySize = ARRAY_COUNT(sParty_Reyna), + .party = {.NoItemDefaultMoves = sParty_Reyna}, }, [TRAINER_HUDSON] = @@ -7149,8 +7149,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Hudson } + .partySize = ARRAY_COUNT(sParty_Hudson), + .party = {.NoItemDefaultMoves = sParty_Hudson}, }, [TRAINER_CONOR] = @@ -7163,8 +7163,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Conor } + .partySize = ARRAY_COUNT(sParty_Conor), + .party = {.NoItemDefaultMoves = sParty_Conor}, }, [TRAINER_EDWIN_1] = @@ -7177,8 +7177,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Edwin1 } + .partySize = ARRAY_COUNT(sParty_Edwin1), + .party = {.NoItemDefaultMoves = sParty_Edwin1}, }, [TRAINER_HECTOR] = @@ -7191,8 +7191,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Hector } + .partySize = ARRAY_COUNT(sParty_Hector), + .party = {.NoItemDefaultMoves = sParty_Hector}, }, [TRAINER_TABITHA_1] = @@ -7205,8 +7205,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Tabitha1 } + .partySize = ARRAY_COUNT(sParty_Tabitha1), + .party = {.NoItemDefaultMoves = sParty_Tabitha1}, }, [TRAINER_EDWIN_2] = @@ -7219,8 +7219,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Edwin2 } + .partySize = ARRAY_COUNT(sParty_Edwin2), + .party = {.NoItemDefaultMoves = sParty_Edwin2}, }, [TRAINER_EDWIN_3] = @@ -7233,8 +7233,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Edwin3 } + .partySize = ARRAY_COUNT(sParty_Edwin3), + .party = {.NoItemDefaultMoves = sParty_Edwin3}, }, [TRAINER_EDWIN_4] = @@ -7247,8 +7247,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Edwin4 } + .partySize = ARRAY_COUNT(sParty_Edwin4), + .party = {.NoItemDefaultMoves = sParty_Edwin4}, }, [TRAINER_EDWIN_5] = @@ -7261,8 +7261,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Edwin5 } + .partySize = ARRAY_COUNT(sParty_Edwin5), + .party = {.NoItemDefaultMoves = sParty_Edwin5}, }, [TRAINER_WALLY_1] = @@ -7275,8 +7275,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 5, - .party = {.NoItemCustomMoves = sParty_Wally1 } + .partySize = ARRAY_COUNT(sParty_Wally1), + .party = {.NoItemCustomMoves = sParty_Wally1}, }, [TRAINER_BRENDAN_1] = @@ -7289,8 +7289,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Brendan1 } + .partySize = ARRAY_COUNT(sParty_Brendan1), + .party = {.NoItemDefaultMoves = sParty_Brendan1}, }, [TRAINER_BRENDAN_2] = @@ -7303,8 +7303,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Brendan2 } + .partySize = ARRAY_COUNT(sParty_Brendan2), + .party = {.NoItemDefaultMoves = sParty_Brendan2}, }, [TRAINER_BRENDAN_3] = @@ -7317,8 +7317,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Brendan3 } + .partySize = ARRAY_COUNT(sParty_Brendan3), + .party = {.NoItemDefaultMoves = sParty_Brendan3}, }, [TRAINER_BRENDAN_4] = @@ -7331,8 +7331,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_SETUP_FIRST_TURN, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Brendan4 } + .partySize = ARRAY_COUNT(sParty_Brendan4), + .party = {.NoItemDefaultMoves = sParty_Brendan4}, }, [TRAINER_BRENDAN_5] = @@ -7345,8 +7345,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Brendan5 } + .partySize = ARRAY_COUNT(sParty_Brendan5), + .party = {.NoItemDefaultMoves = sParty_Brendan5}, }, [TRAINER_BRENDAN_6] = @@ -7359,8 +7359,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Brendan6 } + .partySize = ARRAY_COUNT(sParty_Brendan6), + .party = {.NoItemDefaultMoves = sParty_Brendan6}, }, [TRAINER_BRENDAN_7] = @@ -7373,8 +7373,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Brendan7 } + .partySize = ARRAY_COUNT(sParty_Brendan7), + .party = {.NoItemDefaultMoves = sParty_Brendan7}, }, [TRAINER_BRENDAN_8] = @@ -7387,8 +7387,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Brendan8 } + .partySize = ARRAY_COUNT(sParty_Brendan8), + .party = {.NoItemDefaultMoves = sParty_Brendan8}, }, [TRAINER_BRENDAN_9] = @@ -7401,8 +7401,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Brendan9 } + .partySize = ARRAY_COUNT(sParty_Brendan9), + .party = {.NoItemDefaultMoves = sParty_Brendan9}, }, [TRAINER_MAY_1] = @@ -7415,8 +7415,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_May1 } + .partySize = ARRAY_COUNT(sParty_May1), + .party = {.NoItemDefaultMoves = sParty_May1}, }, [TRAINER_MAY_2] = @@ -7429,8 +7429,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_May2 } + .partySize = ARRAY_COUNT(sParty_May2), + .party = {.NoItemDefaultMoves = sParty_May2}, }, [TRAINER_MAY_3] = @@ -7443,8 +7443,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_May3 } + .partySize = ARRAY_COUNT(sParty_May3), + .party = {.NoItemDefaultMoves = sParty_May3}, }, [TRAINER_MAY_4] = @@ -7457,8 +7457,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_May4 } + .partySize = ARRAY_COUNT(sParty_May4), + .party = {.NoItemDefaultMoves = sParty_May4}, }, [TRAINER_MAY_5] = @@ -7471,8 +7471,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_May5 } + .partySize = ARRAY_COUNT(sParty_May5), + .party = {.NoItemDefaultMoves = sParty_May5}, }, [TRAINER_MAY_6] = @@ -7485,8 +7485,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_May6 } + .partySize = ARRAY_COUNT(sParty_May6), + .party = {.NoItemDefaultMoves = sParty_May6}, }, [TRAINER_MAY_7] = @@ -7499,8 +7499,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_May7 } + .partySize = ARRAY_COUNT(sParty_May7), + .party = {.NoItemDefaultMoves = sParty_May7}, }, [TRAINER_MAY_8] = @@ -7513,8 +7513,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_May8 } + .partySize = ARRAY_COUNT(sParty_May8), + .party = {.NoItemDefaultMoves = sParty_May8}, }, [TRAINER_MAY_9] = @@ -7527,8 +7527,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_May9 } + .partySize = ARRAY_COUNT(sParty_May9), + .party = {.NoItemDefaultMoves = sParty_May9}, }, [TRAINER_ISAAC_1] = @@ -7541,8 +7541,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 6, - .party = {.NoItemDefaultMoves = sParty_Isaac1 } + .partySize = ARRAY_COUNT(sParty_Isaac1), + .party = {.NoItemDefaultMoves = sParty_Isaac1}, }, [TRAINER_DAVIS] = @@ -7555,8 +7555,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Davis } + .partySize = ARRAY_COUNT(sParty_Davis), + .party = {.NoItemDefaultMoves = sParty_Davis}, }, [TRAINER_MITCHELL] = @@ -7569,8 +7569,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Mitchell } + .partySize = ARRAY_COUNT(sParty_Mitchell), + .party = {.NoItemCustomMoves = sParty_Mitchell}, }, [TRAINER_ISAAC_2] = @@ -7583,8 +7583,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 6, - .party = {.NoItemDefaultMoves = sParty_Isaac2 } + .partySize = ARRAY_COUNT(sParty_Isaac2), + .party = {.NoItemDefaultMoves = sParty_Isaac2}, }, [TRAINER_ISAAC_3] = @@ -7597,8 +7597,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 6, - .party = {.NoItemDefaultMoves = sParty_Isaac3 } + .partySize = ARRAY_COUNT(sParty_Isaac3), + .party = {.NoItemDefaultMoves = sParty_Isaac3}, }, [TRAINER_ISAAC_4] = @@ -7611,8 +7611,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 6, - .party = {.NoItemDefaultMoves = sParty_Isaac4 } + .partySize = ARRAY_COUNT(sParty_Isaac4), + .party = {.NoItemDefaultMoves = sParty_Isaac4}, }, [TRAINER_ISAAC_5] = @@ -7625,8 +7625,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 6, - .party = {.NoItemDefaultMoves = sParty_Isaac5 } + .partySize = ARRAY_COUNT(sParty_Isaac5), + .party = {.NoItemDefaultMoves = sParty_Isaac5}, }, [TRAINER_LYDIA_1] = @@ -7639,8 +7639,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 6, - .party = {.NoItemDefaultMoves = sParty_Lydia1 } + .partySize = ARRAY_COUNT(sParty_Lydia1), + .party = {.NoItemDefaultMoves = sParty_Lydia1}, }, [TRAINER_HALLE] = @@ -7653,8 +7653,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Halle } + .partySize = ARRAY_COUNT(sParty_Halle), + .party = {.NoItemDefaultMoves = sParty_Halle}, }, [TRAINER_GARRISON] = @@ -7667,8 +7667,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Garrison } + .partySize = ARRAY_COUNT(sParty_Garrison), + .party = {.NoItemDefaultMoves = sParty_Garrison}, }, [TRAINER_LYDIA_2] = @@ -7681,8 +7681,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 6, - .party = {.NoItemDefaultMoves = sParty_Lydia2 } + .partySize = ARRAY_COUNT(sParty_Lydia2), + .party = {.NoItemDefaultMoves = sParty_Lydia2}, }, [TRAINER_LYDIA_3] = @@ -7695,8 +7695,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 6, - .party = {.NoItemDefaultMoves = sParty_Lydia3 } + .partySize = ARRAY_COUNT(sParty_Lydia3), + .party = {.NoItemDefaultMoves = sParty_Lydia3}, }, [TRAINER_LYDIA_4] = @@ -7709,8 +7709,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 6, - .party = {.NoItemDefaultMoves = sParty_Lydia4 } + .partySize = ARRAY_COUNT(sParty_Lydia4), + .party = {.NoItemDefaultMoves = sParty_Lydia4}, }, [TRAINER_LYDIA_5] = @@ -7723,8 +7723,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 6, - .party = {.NoItemDefaultMoves = sParty_Lydia5 } + .partySize = ARRAY_COUNT(sParty_Lydia5), + .party = {.NoItemDefaultMoves = sParty_Lydia5}, }, [TRAINER_JACKSON_1] = @@ -7737,8 +7737,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Jackson1 } + .partySize = ARRAY_COUNT(sParty_Jackson1), + .party = {.NoItemDefaultMoves = sParty_Jackson1}, }, [TRAINER_LORENZO] = @@ -7751,8 +7751,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Lorenzo } + .partySize = ARRAY_COUNT(sParty_Lorenzo), + .party = {.NoItemDefaultMoves = sParty_Lorenzo}, }, [TRAINER_SEBASTIAN] = @@ -7765,8 +7765,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Sebastian } + .partySize = ARRAY_COUNT(sParty_Sebastian), + .party = {.NoItemDefaultMoves = sParty_Sebastian}, }, [TRAINER_JACKSON_2] = @@ -7779,8 +7779,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_SETUP_FIRST_TURN, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Jackson2 } + .partySize = ARRAY_COUNT(sParty_Jackson2), + .party = {.NoItemDefaultMoves = sParty_Jackson2}, }, [TRAINER_JACKSON_3] = @@ -7793,8 +7793,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Jackson3 } + .partySize = ARRAY_COUNT(sParty_Jackson3), + .party = {.NoItemDefaultMoves = sParty_Jackson3}, }, [TRAINER_JACKSON_4] = @@ -7807,8 +7807,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_SETUP_FIRST_TURN, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Jackson4 } + .partySize = ARRAY_COUNT(sParty_Jackson4), + .party = {.NoItemDefaultMoves = sParty_Jackson4}, }, [TRAINER_JACKSON_5] = @@ -7821,8 +7821,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Jackson5 } + .partySize = ARRAY_COUNT(sParty_Jackson5), + .party = {.NoItemDefaultMoves = sParty_Jackson5}, }, [TRAINER_CATHERINE_1] = @@ -7835,8 +7835,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_SETUP_FIRST_TURN, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Catherine1 } + .partySize = ARRAY_COUNT(sParty_Catherine1), + .party = {.NoItemDefaultMoves = sParty_Catherine1}, }, [TRAINER_JENNA] = @@ -7849,8 +7849,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_SETUP_FIRST_TURN, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Jenna } + .partySize = ARRAY_COUNT(sParty_Jenna), + .party = {.NoItemDefaultMoves = sParty_Jenna}, }, [TRAINER_SOPHIA] = @@ -7863,8 +7863,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Sophia } + .partySize = ARRAY_COUNT(sParty_Sophia), + .party = {.NoItemDefaultMoves = sParty_Sophia}, }, [TRAINER_CATHERINE_2] = @@ -7877,8 +7877,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_SETUP_FIRST_TURN, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Catherine2 } + .partySize = ARRAY_COUNT(sParty_Catherine2), + .party = {.NoItemDefaultMoves = sParty_Catherine2}, }, [TRAINER_CATHERINE_3] = @@ -7891,8 +7891,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Catherine3 } + .partySize = ARRAY_COUNT(sParty_Catherine3), + .party = {.NoItemDefaultMoves = sParty_Catherine3}, }, [TRAINER_CATHERINE_4] = @@ -7905,8 +7905,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_SETUP_FIRST_TURN, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Catherine4 } + .partySize = ARRAY_COUNT(sParty_Catherine4), + .party = {.NoItemDefaultMoves = sParty_Catherine4}, }, [TRAINER_CATHERINE_5] = @@ -7919,8 +7919,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Catherine5 } + .partySize = ARRAY_COUNT(sParty_Catherine5), + .party = {.NoItemDefaultMoves = sParty_Catherine5}, }, [TRAINER_JULIO] = @@ -7933,8 +7933,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Julio } + .partySize = ARRAY_COUNT(sParty_Julio), + .party = {.NoItemDefaultMoves = sParty_Julio}, }, [TRAINER_GRUNT_27] = @@ -7947,8 +7947,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Grunt27 } + .partySize = ARRAY_COUNT(sParty_Grunt27), + .party = {.NoItemDefaultMoves = sParty_Grunt27}, }, [TRAINER_GRUNT_28] = @@ -7961,8 +7961,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Grunt28 } + .partySize = ARRAY_COUNT(sParty_Grunt28), + .party = {.NoItemDefaultMoves = sParty_Grunt28}, }, [TRAINER_GRUNT_29] = @@ -7975,8 +7975,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Grunt29 } + .partySize = ARRAY_COUNT(sParty_Grunt29), + .party = {.NoItemDefaultMoves = sParty_Grunt29}, }, [TRAINER_GRUNT_30] = @@ -7989,8 +7989,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Grunt30 } + .partySize = ARRAY_COUNT(sParty_Grunt30), + .party = {.NoItemDefaultMoves = sParty_Grunt30}, }, [TRAINER_MARC] = @@ -8003,8 +8003,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Marc } + .partySize = ARRAY_COUNT(sParty_Marc), + .party = {.NoItemDefaultMoves = sParty_Marc}, }, [TRAINER_BRENDEN] = @@ -8017,8 +8017,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Brenden } + .partySize = ARRAY_COUNT(sParty_Brenden), + .party = {.NoItemDefaultMoves = sParty_Brenden}, }, [TRAINER_LILITH] = @@ -8031,8 +8031,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Lilith } + .partySize = ARRAY_COUNT(sParty_Lilith), + .party = {.NoItemDefaultMoves = sParty_Lilith}, }, [TRAINER_CRISTIAN] = @@ -8045,8 +8045,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Cristian } + .partySize = ARRAY_COUNT(sParty_Cristian), + .party = {.NoItemDefaultMoves = sParty_Cristian}, }, [TRAINER_SYLVIA] = @@ -8059,8 +8059,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Sylvia } + .partySize = ARRAY_COUNT(sParty_Sylvia), + .party = {.NoItemDefaultMoves = sParty_Sylvia}, }, [TRAINER_LEONARDO] = @@ -8073,8 +8073,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Leonardo } + .partySize = ARRAY_COUNT(sParty_Leonardo), + .party = {.NoItemDefaultMoves = sParty_Leonardo}, }, [TRAINER_ATHENA] = @@ -8087,8 +8087,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.ItemCustomMoves = sParty_Athena } + .partySize = ARRAY_COUNT(sParty_Athena), + .party = {.ItemCustomMoves = sParty_Athena}, }, [TRAINER_HARRISON] = @@ -8101,8 +8101,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Harrison } + .partySize = ARRAY_COUNT(sParty_Harrison), + .party = {.NoItemDefaultMoves = sParty_Harrison}, }, [TRAINER_GRUNT_31] = @@ -8115,8 +8115,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt31 } + .partySize = ARRAY_COUNT(sParty_Grunt31), + .party = {.NoItemDefaultMoves = sParty_Grunt31}, }, [TRAINER_CLARENCE] = @@ -8129,8 +8129,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Clarence } + .partySize = ARRAY_COUNT(sParty_Clarence), + .party = {.NoItemDefaultMoves = sParty_Clarence}, }, [TRAINER_TERRY] = @@ -8143,8 +8143,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Terry } + .partySize = ARRAY_COUNT(sParty_Terry), + .party = {.NoItemDefaultMoves = sParty_Terry}, }, [TRAINER_NATE] = @@ -8157,8 +8157,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Nate } + .partySize = ARRAY_COUNT(sParty_Nate), + .party = {.NoItemDefaultMoves = sParty_Nate}, }, [TRAINER_KATHLEEN] = @@ -8171,8 +8171,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Kathleen } + .partySize = ARRAY_COUNT(sParty_Kathleen), + .party = {.NoItemDefaultMoves = sParty_Kathleen}, }, [TRAINER_CLIFFORD] = @@ -8185,8 +8185,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Clifford } + .partySize = ARRAY_COUNT(sParty_Clifford), + .party = {.NoItemDefaultMoves = sParty_Clifford}, }, [TRAINER_NICHOLAS] = @@ -8199,8 +8199,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Nicholas } + .partySize = ARRAY_COUNT(sParty_Nicholas), + .party = {.NoItemDefaultMoves = sParty_Nicholas}, }, [TRAINER_GRUNT_32] = @@ -8213,8 +8213,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Grunt32 } + .partySize = ARRAY_COUNT(sParty_Grunt32), + .party = {.NoItemDefaultMoves = sParty_Grunt32}, }, [TRAINER_GRUNT_33] = @@ -8227,8 +8227,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt33 } + .partySize = ARRAY_COUNT(sParty_Grunt33), + .party = {.NoItemDefaultMoves = sParty_Grunt33}, }, [TRAINER_GRUNT_34] = @@ -8241,8 +8241,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt34 } + .partySize = ARRAY_COUNT(sParty_Grunt34), + .party = {.NoItemDefaultMoves = sParty_Grunt34}, }, [TRAINER_GRUNT_35] = @@ -8255,8 +8255,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt35 } + .partySize = ARRAY_COUNT(sParty_Grunt35), + .party = {.NoItemDefaultMoves = sParty_Grunt35}, }, [TRAINER_GRUNT_36] = @@ -8269,8 +8269,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt36 } + .partySize = ARRAY_COUNT(sParty_Grunt36), + .party = {.NoItemDefaultMoves = sParty_Grunt36}, }, [TRAINER_MACEY] = @@ -8283,8 +8283,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Macey } + .partySize = ARRAY_COUNT(sParty_Macey), + .party = {.NoItemDefaultMoves = sParty_Macey}, }, [TRAINER_BRENDAN_10] = @@ -8297,8 +8297,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Brendan10 } + .partySize = ARRAY_COUNT(sParty_Brendan10), + .party = {.NoItemDefaultMoves = sParty_Brendan10}, }, [TRAINER_BRENDAN_11] = @@ -8311,8 +8311,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Brendan11 } + .partySize = ARRAY_COUNT(sParty_Brendan11), + .party = {.NoItemDefaultMoves = sParty_Brendan11}, }, [TRAINER_PAXTON] = @@ -8325,8 +8325,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Paxton } + .partySize = ARRAY_COUNT(sParty_Paxton), + .party = {.NoItemDefaultMoves = sParty_Paxton}, }, [TRAINER_ISABELLA] = @@ -8339,8 +8339,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Isabella } + .partySize = ARRAY_COUNT(sParty_Isabella), + .party = {.NoItemDefaultMoves = sParty_Isabella}, }, [TRAINER_GRUNT_37] = @@ -8353,8 +8353,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Grunt37 } + .partySize = ARRAY_COUNT(sParty_Grunt37), + .party = {.NoItemDefaultMoves = sParty_Grunt37}, }, [TRAINER_TABITHA_2] = @@ -8367,8 +8367,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 4, - .party = {.NoItemDefaultMoves = sParty_Tabitha2 } + .partySize = ARRAY_COUNT(sParty_Tabitha2), + .party = {.NoItemDefaultMoves = sParty_Tabitha2}, }, [TRAINER_JONATHAN] = @@ -8381,8 +8381,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_SETUP_FIRST_TURN, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Jonathan } + .partySize = ARRAY_COUNT(sParty_Jonathan), + .party = {.NoItemDefaultMoves = sParty_Jonathan}, }, [TRAINER_BRENDAN_12] = @@ -8395,8 +8395,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Brendan12 } + .partySize = ARRAY_COUNT(sParty_Brendan12), + .party = {.NoItemDefaultMoves = sParty_Brendan12}, }, [TRAINER_MAY_10] = @@ -8409,8 +8409,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_SETUP_FIRST_TURN, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_May10 } + .partySize = ARRAY_COUNT(sParty_May10), + .party = {.NoItemDefaultMoves = sParty_May10}, }, [TRAINER_MAXIE_1] = @@ -8423,8 +8423,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_SUPER_POTION, ITEM_SUPER_POTION, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Maxie1 } + .partySize = ARRAY_COUNT(sParty_Maxie1), + .party = {.NoItemDefaultMoves = sParty_Maxie1}, }, [TRAINER_MAXIE_2] = @@ -8437,8 +8437,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_SUPER_POTION, ITEM_SUPER_POTION, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Maxie2 } + .partySize = ARRAY_COUNT(sParty_Maxie2), + .party = {.NoItemDefaultMoves = sParty_Maxie2}, }, [TRAINER_TIANA] = @@ -8451,8 +8451,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Tiana } + .partySize = ARRAY_COUNT(sParty_Tiana), + .party = {.NoItemDefaultMoves = sParty_Tiana}, }, [TRAINER_HALEY_1] = @@ -8465,8 +8465,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Haley1 } + .partySize = ARRAY_COUNT(sParty_Haley1), + .party = {.NoItemDefaultMoves = sParty_Haley1}, }, [TRAINER_JANICE] = @@ -8479,8 +8479,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Janice } + .partySize = ARRAY_COUNT(sParty_Janice), + .party = {.NoItemDefaultMoves = sParty_Janice}, }, [TRAINER_VIVI] = @@ -8493,8 +8493,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Vivi } + .partySize = ARRAY_COUNT(sParty_Vivi), + .party = {.NoItemDefaultMoves = sParty_Vivi}, }, [TRAINER_HALEY_2] = @@ -8507,8 +8507,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Haley2 } + .partySize = ARRAY_COUNT(sParty_Haley2), + .party = {.NoItemDefaultMoves = sParty_Haley2}, }, [TRAINER_HALEY_3] = @@ -8521,8 +8521,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Haley3 } + .partySize = ARRAY_COUNT(sParty_Haley3), + .party = {.NoItemDefaultMoves = sParty_Haley3}, }, [TRAINER_HALEY_4] = @@ -8535,8 +8535,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Haley4 } + .partySize = ARRAY_COUNT(sParty_Haley4), + .party = {.NoItemDefaultMoves = sParty_Haley4}, }, [TRAINER_HALEY_5] = @@ -8549,8 +8549,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Haley5 } + .partySize = ARRAY_COUNT(sParty_Haley5), + .party = {.NoItemDefaultMoves = sParty_Haley5}, }, [TRAINER_SALLY] = @@ -8563,8 +8563,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Sally } + .partySize = ARRAY_COUNT(sParty_Sally), + .party = {.NoItemDefaultMoves = sParty_Sally}, }, [TRAINER_ROBIN] = @@ -8577,8 +8577,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Robin } + .partySize = ARRAY_COUNT(sParty_Robin), + .party = {.NoItemDefaultMoves = sParty_Robin}, }, [TRAINER_ANDREA] = @@ -8591,8 +8591,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Andrea } + .partySize = ARRAY_COUNT(sParty_Andrea), + .party = {.NoItemDefaultMoves = sParty_Andrea}, }, [TRAINER_CRISSY] = @@ -8605,8 +8605,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Crissy } + .partySize = ARRAY_COUNT(sParty_Crissy), + .party = {.NoItemDefaultMoves = sParty_Crissy}, }, [TRAINER_RICK] = @@ -8619,8 +8619,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Rick } + .partySize = ARRAY_COUNT(sParty_Rick), + .party = {.NoItemDefaultMoves = sParty_Rick}, }, [TRAINER_LYLE] = @@ -8633,8 +8633,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 4, - .party = {.NoItemDefaultMoves = sParty_Lyle } + .partySize = ARRAY_COUNT(sParty_Lyle), + .party = {.NoItemDefaultMoves = sParty_Lyle}, }, [TRAINER_JOSE] = @@ -8647,8 +8647,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Jose } + .partySize = ARRAY_COUNT(sParty_Jose), + .party = {.NoItemDefaultMoves = sParty_Jose}, }, [TRAINER_DOUG] = @@ -8661,8 +8661,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Doug } + .partySize = ARRAY_COUNT(sParty_Doug), + .party = {.NoItemDefaultMoves = sParty_Doug}, }, [TRAINER_GREG] = @@ -8675,8 +8675,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Greg } + .partySize = ARRAY_COUNT(sParty_Greg), + .party = {.NoItemDefaultMoves = sParty_Greg}, }, [TRAINER_KENT] = @@ -8689,8 +8689,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Kent } + .partySize = ARRAY_COUNT(sParty_Kent), + .party = {.NoItemDefaultMoves = sParty_Kent}, }, [TRAINER_JAMES_1] = @@ -8703,8 +8703,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_James1 } + .partySize = ARRAY_COUNT(sParty_James1), + .party = {.NoItemDefaultMoves = sParty_James1}, }, [TRAINER_JAMES_2] = @@ -8717,8 +8717,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_James2 } + .partySize = ARRAY_COUNT(sParty_James2), + .party = {.NoItemDefaultMoves = sParty_James2}, }, [TRAINER_JAMES_3] = @@ -8731,8 +8731,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_James3 } + .partySize = ARRAY_COUNT(sParty_James3), + .party = {.NoItemDefaultMoves = sParty_James3}, }, [TRAINER_JAMES_4] = @@ -8745,8 +8745,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_James4 } + .partySize = ARRAY_COUNT(sParty_James4), + .party = {.NoItemDefaultMoves = sParty_James4}, }, [TRAINER_JAMES_5] = @@ -8759,8 +8759,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 4, - .party = {.NoItemDefaultMoves = sParty_James5 } + .partySize = ARRAY_COUNT(sParty_James5), + .party = {.NoItemDefaultMoves = sParty_James5}, }, [TRAINER_BRICE] = @@ -8773,8 +8773,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Brice } + .partySize = ARRAY_COUNT(sParty_Brice), + .party = {.NoItemDefaultMoves = sParty_Brice}, }, [TRAINER_TRENT_1] = @@ -8787,8 +8787,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Trent1 } + .partySize = ARRAY_COUNT(sParty_Trent1), + .party = {.NoItemDefaultMoves = sParty_Trent1}, }, [TRAINER_LENNY] = @@ -8801,8 +8801,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Lenny } + .partySize = ARRAY_COUNT(sParty_Lenny), + .party = {.NoItemDefaultMoves = sParty_Lenny}, }, [TRAINER_LUCAS_1] = @@ -8815,8 +8815,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Lucas1 } + .partySize = ARRAY_COUNT(sParty_Lucas1), + .party = {.NoItemDefaultMoves = sParty_Lucas1}, }, [TRAINER_ALAN] = @@ -8829,8 +8829,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Alan } + .partySize = ARRAY_COUNT(sParty_Alan), + .party = {.NoItemDefaultMoves = sParty_Alan}, }, [TRAINER_CLARK] = @@ -8843,8 +8843,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Clark } + .partySize = ARRAY_COUNT(sParty_Clark), + .party = {.NoItemDefaultMoves = sParty_Clark}, }, [TRAINER_ERIC] = @@ -8857,8 +8857,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Eric } + .partySize = ARRAY_COUNT(sParty_Eric), + .party = {.NoItemDefaultMoves = sParty_Eric}, }, [TRAINER_LUCAS_2] = @@ -8871,8 +8871,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Lucas2 } + .partySize = ARRAY_COUNT(sParty_Lucas2), + .party = {.NoItemCustomMoves = sParty_Lucas2}, }, [TRAINER_MIKE_1] = @@ -8885,8 +8885,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Mike1 } + .partySize = ARRAY_COUNT(sParty_Mike1), + .party = {.NoItemCustomMoves = sParty_Mike1}, }, [TRAINER_MIKE_2] = @@ -8899,8 +8899,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Mike2 } + .partySize = ARRAY_COUNT(sParty_Mike2), + .party = {.NoItemDefaultMoves = sParty_Mike2}, }, [TRAINER_TRENT_2] = @@ -8913,8 +8913,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 4, - .party = {.NoItemDefaultMoves = sParty_Trent2 } + .partySize = ARRAY_COUNT(sParty_Trent2), + .party = {.NoItemDefaultMoves = sParty_Trent2}, }, [TRAINER_TRENT_3] = @@ -8927,8 +8927,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 4, - .party = {.NoItemDefaultMoves = sParty_Trent3 } + .partySize = ARRAY_COUNT(sParty_Trent3), + .party = {.NoItemDefaultMoves = sParty_Trent3}, }, [TRAINER_TRENT_4] = @@ -8941,8 +8941,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 4, - .party = {.NoItemDefaultMoves = sParty_Trent4 } + .partySize = ARRAY_COUNT(sParty_Trent4), + .party = {.NoItemDefaultMoves = sParty_Trent4}, }, [TRAINER_TRENT_5] = @@ -8955,8 +8955,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 4, - .party = {.NoItemDefaultMoves = sParty_Trent5 } + .partySize = ARRAY_COUNT(sParty_Trent5), + .party = {.NoItemDefaultMoves = sParty_Trent5}, }, [TRAINER_DEZ_AND_LUKE] = @@ -8969,8 +8969,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_DezAndLuke } + .partySize = ARRAY_COUNT(sParty_DezAndLuke), + .party = {.NoItemDefaultMoves = sParty_DezAndLuke}, }, [TRAINER_LEA_AND_JED] = @@ -8983,8 +8983,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_LeaAndJed } + .partySize = ARRAY_COUNT(sParty_LeaAndJed), + .party = {.NoItemDefaultMoves = sParty_LeaAndJed}, }, [TRAINER_KIRA_AND_DAN_1] = @@ -8997,8 +8997,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_KiraAndDan1 } + .partySize = ARRAY_COUNT(sParty_KiraAndDan1), + .party = {.NoItemDefaultMoves = sParty_KiraAndDan1}, }, [TRAINER_KIRA_AND_DAN_2] = @@ -9011,8 +9011,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_KiraAndDan2 } + .partySize = ARRAY_COUNT(sParty_KiraAndDan2), + .party = {.NoItemDefaultMoves = sParty_KiraAndDan2}, }, [TRAINER_KIRA_AND_DAN_3] = @@ -9025,8 +9025,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_KiraAndDan3 } + .partySize = ARRAY_COUNT(sParty_KiraAndDan3), + .party = {.NoItemDefaultMoves = sParty_KiraAndDan3}, }, [TRAINER_KIRA_AND_DAN_4] = @@ -9039,8 +9039,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_KiraAndDan4 } + .partySize = ARRAY_COUNT(sParty_KiraAndDan4), + .party = {.NoItemDefaultMoves = sParty_KiraAndDan4}, }, [TRAINER_KIRA_AND_DAN_5] = @@ -9053,8 +9053,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_KiraAndDan5 } + .partySize = ARRAY_COUNT(sParty_KiraAndDan5), + .party = {.NoItemDefaultMoves = sParty_KiraAndDan5}, }, [TRAINER_JOHANNA] = @@ -9067,8 +9067,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Johanna } + .partySize = ARRAY_COUNT(sParty_Johanna), + .party = {.NoItemDefaultMoves = sParty_Johanna}, }, [TRAINER_GERALD] = @@ -9081,8 +9081,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Gerald } + .partySize = ARRAY_COUNT(sParty_Gerald), + .party = {.NoItemCustomMoves = sParty_Gerald}, }, [TRAINER_VIVIAN] = @@ -9095,8 +9095,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Vivian } + .partySize = ARRAY_COUNT(sParty_Vivian), + .party = {.NoItemCustomMoves = sParty_Vivian}, }, [TRAINER_DANIELLE] = @@ -9109,8 +9109,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Danielle } + .partySize = ARRAY_COUNT(sParty_Danielle), + .party = {.NoItemCustomMoves = sParty_Danielle}, }, [TRAINER_HIDEO] = @@ -9123,8 +9123,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Hideo } + .partySize = ARRAY_COUNT(sParty_Hideo), + .party = {.NoItemCustomMoves = sParty_Hideo}, }, [TRAINER_KEIGO] = @@ -9137,8 +9137,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Keigo } + .partySize = ARRAY_COUNT(sParty_Keigo), + .party = {.NoItemCustomMoves = sParty_Keigo}, }, [TRAINER_RILEY] = @@ -9151,8 +9151,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_Riley } + .partySize = ARRAY_COUNT(sParty_Riley), + .party = {.NoItemCustomMoves = sParty_Riley}, }, [TRAINER_FLINT] = @@ -9165,8 +9165,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Flint } + .partySize = ARRAY_COUNT(sParty_Flint), + .party = {.NoItemDefaultMoves = sParty_Flint}, }, [TRAINER_ASHLEY] = @@ -9179,8 +9179,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Ashley } + .partySize = ARRAY_COUNT(sParty_Ashley), + .party = {.NoItemDefaultMoves = sParty_Ashley}, }, [TRAINER_WALLY_2] = @@ -9193,8 +9193,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Wally2 } + .partySize = ARRAY_COUNT(sParty_Wally2), + .party = {.NoItemDefaultMoves = sParty_Wally2}, }, [TRAINER_WALLY_3] = @@ -9207,8 +9207,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 5, - .party = {.NoItemCustomMoves = sParty_Wally3 } + .partySize = ARRAY_COUNT(sParty_Wally3), + .party = {.NoItemCustomMoves = sParty_Wally3}, }, [TRAINER_WALLY_4] = @@ -9221,8 +9221,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 5, - .party = {.NoItemCustomMoves = sParty_Wally4 } + .partySize = ARRAY_COUNT(sParty_Wally4), + .party = {.NoItemCustomMoves = sParty_Wally4}, }, [TRAINER_WALLY_5] = @@ -9235,8 +9235,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 5, - .party = {.NoItemCustomMoves = sParty_Wally5 } + .partySize = ARRAY_COUNT(sParty_Wally5), + .party = {.NoItemCustomMoves = sParty_Wally5}, }, [TRAINER_WALLY_6] = @@ -9249,8 +9249,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 5, - .party = {.NoItemCustomMoves = sParty_Wally6 } + .partySize = ARRAY_COUNT(sParty_Wally6), + .party = {.NoItemCustomMoves = sParty_Wally6}, }, [TRAINER_BRENDAN_13] = @@ -9263,8 +9263,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 4, - .party = {.NoItemDefaultMoves = sParty_Brendan13 } + .partySize = ARRAY_COUNT(sParty_Brendan13), + .party = {.NoItemDefaultMoves = sParty_Brendan13}, }, [TRAINER_BRENDAN_14] = @@ -9277,8 +9277,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 4, - .party = {.NoItemDefaultMoves = sParty_Brendan14 } + .partySize = ARRAY_COUNT(sParty_Brendan14), + .party = {.NoItemDefaultMoves = sParty_Brendan14}, }, [TRAINER_BRENDAN_15] = @@ -9291,8 +9291,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 4, - .party = {.NoItemDefaultMoves = sParty_Brendan15 } + .partySize = ARRAY_COUNT(sParty_Brendan15), + .party = {.NoItemDefaultMoves = sParty_Brendan15}, }, [TRAINER_MAY_11] = @@ -9305,8 +9305,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 4, - .party = {.NoItemDefaultMoves = sParty_May11 } + .partySize = ARRAY_COUNT(sParty_May11), + .party = {.NoItemDefaultMoves = sParty_May11}, }, [TRAINER_MAY_12] = @@ -9319,8 +9319,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 4, - .party = {.NoItemDefaultMoves = sParty_May12 } + .partySize = ARRAY_COUNT(sParty_May12), + .party = {.NoItemDefaultMoves = sParty_May12}, }, [TRAINER_MAY_13] = @@ -9333,8 +9333,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 4, - .party = {.NoItemDefaultMoves = sParty_May13 } + .partySize = ARRAY_COUNT(sParty_May13), + .party = {.NoItemDefaultMoves = sParty_May13}, }, [TRAINER_JONAH] = @@ -9347,8 +9347,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Jonah } + .partySize = ARRAY_COUNT(sParty_Jonah), + .party = {.NoItemDefaultMoves = sParty_Jonah}, }, [TRAINER_HENRY] = @@ -9361,8 +9361,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Henry } + .partySize = ARRAY_COUNT(sParty_Henry), + .party = {.NoItemDefaultMoves = sParty_Henry}, }, [TRAINER_ROGER] = @@ -9375,8 +9375,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Roger } + .partySize = ARRAY_COUNT(sParty_Roger), + .party = {.NoItemDefaultMoves = sParty_Roger}, }, [TRAINER_ALEXA] = @@ -9389,8 +9389,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Alexa } + .partySize = ARRAY_COUNT(sParty_Alexa), + .party = {.NoItemDefaultMoves = sParty_Alexa}, }, [TRAINER_RUBEN] = @@ -9403,8 +9403,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Ruben } + .partySize = ARRAY_COUNT(sParty_Ruben), + .party = {.NoItemDefaultMoves = sParty_Ruben}, }, [TRAINER_KOJI_1] = @@ -9417,8 +9417,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Koji1 } + .partySize = ARRAY_COUNT(sParty_Koji1), + .party = {.NoItemDefaultMoves = sParty_Koji1}, }, [TRAINER_WAYNE] = @@ -9431,8 +9431,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Wayne } + .partySize = ARRAY_COUNT(sParty_Wayne), + .party = {.NoItemDefaultMoves = sParty_Wayne}, }, [TRAINER_AIDAN] = @@ -9445,8 +9445,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Aidan } + .partySize = ARRAY_COUNT(sParty_Aidan), + .party = {.NoItemDefaultMoves = sParty_Aidan}, }, [TRAINER_REED] = @@ -9459,8 +9459,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Reed } + .partySize = ARRAY_COUNT(sParty_Reed), + .party = {.NoItemDefaultMoves = sParty_Reed}, }, [TRAINER_TISHA] = @@ -9473,8 +9473,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Tisha } + .partySize = ARRAY_COUNT(sParty_Tisha), + .party = {.NoItemDefaultMoves = sParty_Tisha}, }, [TRAINER_TORI_AND_TIA] = @@ -9487,8 +9487,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_ToriAndTia } + .partySize = ARRAY_COUNT(sParty_ToriAndTia), + .party = {.NoItemDefaultMoves = sParty_ToriAndTia}, }, [TRAINER_KIM_AND_IRIS] = @@ -9501,8 +9501,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_KimAndIris } + .partySize = ARRAY_COUNT(sParty_KimAndIris), + .party = {.NoItemCustomMoves = sParty_KimAndIris}, }, [TRAINER_TYRA_AND_IVY] = @@ -9515,8 +9515,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_TyraAndIvy } + .partySize = ARRAY_COUNT(sParty_TyraAndIvy), + .party = {.NoItemCustomMoves = sParty_TyraAndIvy}, }, [TRAINER_MEL_AND_PAUL] = @@ -9529,8 +9529,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_MelAndPaul } + .partySize = ARRAY_COUNT(sParty_MelAndPaul), + .party = {.NoItemCustomMoves = sParty_MelAndPaul}, }, [TRAINER_JOHN_AND_JAY_1] = @@ -9543,8 +9543,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_JohnAndJay1 } + .partySize = ARRAY_COUNT(sParty_JohnAndJay1), + .party = {.NoItemCustomMoves = sParty_JohnAndJay1}, }, [TRAINER_JOHN_AND_JAY_2] = @@ -9557,8 +9557,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_JohnAndJay2 } + .partySize = ARRAY_COUNT(sParty_JohnAndJay2), + .party = {.NoItemCustomMoves = sParty_JohnAndJay2}, }, [TRAINER_JOHN_AND_JAY_3] = @@ -9571,8 +9571,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_JohnAndJay3 } + .partySize = ARRAY_COUNT(sParty_JohnAndJay3), + .party = {.NoItemCustomMoves = sParty_JohnAndJay3}, }, [TRAINER_JOHN_AND_JAY_4] = @@ -9585,8 +9585,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_SETUP_FIRST_TURN, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_JohnAndJay4 } + .partySize = ARRAY_COUNT(sParty_JohnAndJay4), + .party = {.NoItemCustomMoves = sParty_JohnAndJay4}, }, [TRAINER_JOHN_AND_JAY_5] = @@ -9599,8 +9599,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemCustomMoves = sParty_JohnAndJay5 } + .partySize = ARRAY_COUNT(sParty_JohnAndJay5), + .party = {.NoItemCustomMoves = sParty_JohnAndJay5}, }, [TRAINER_RELI_AND_IAN] = @@ -9613,8 +9613,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_ReliAndIan } + .partySize = ARRAY_COUNT(sParty_ReliAndIan), + .party = {.NoItemDefaultMoves = sParty_ReliAndIan}, }, [TRAINER_LILA_AND_ROY_1] = @@ -9627,8 +9627,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_LilaAndRoy1 } + .partySize = ARRAY_COUNT(sParty_LilaAndRoy1), + .party = {.NoItemDefaultMoves = sParty_LilaAndRoy1}, }, [TRAINER_LILA_AND_ROY_2] = @@ -9641,8 +9641,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_LilaAndRoy2 } + .partySize = ARRAY_COUNT(sParty_LilaAndRoy2), + .party = {.NoItemDefaultMoves = sParty_LilaAndRoy2}, }, [TRAINER_LILA_AND_ROY_3] = @@ -9655,8 +9655,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_LilaAndRoy3 } + .partySize = ARRAY_COUNT(sParty_LilaAndRoy3), + .party = {.NoItemDefaultMoves = sParty_LilaAndRoy3}, }, [TRAINER_LILA_AND_ROY_4] = @@ -9669,8 +9669,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_LilaAndRoy4 } + .partySize = ARRAY_COUNT(sParty_LilaAndRoy4), + .party = {.NoItemDefaultMoves = sParty_LilaAndRoy4}, }, [TRAINER_LILA_AND_ROY_5] = @@ -9683,8 +9683,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_LilaAndRoy5 } + .partySize = ARRAY_COUNT(sParty_LilaAndRoy5), + .party = {.NoItemDefaultMoves = sParty_LilaAndRoy5}, }, [TRAINER_LISA_AND_RAY] = @@ -9697,8 +9697,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_LisaAndRay } + .partySize = ARRAY_COUNT(sParty_LisaAndRay), + .party = {.NoItemDefaultMoves = sParty_LisaAndRay}, }, [TRAINER_CHRIS] = @@ -9711,8 +9711,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 4, - .party = {.NoItemDefaultMoves = sParty_Chris } + .partySize = ARRAY_COUNT(sParty_Chris), + .party = {.NoItemDefaultMoves = sParty_Chris}, }, [TRAINER_DAWSON] = @@ -9725,8 +9725,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.ItemDefaultMoves = sParty_Dawson } + .partySize = ARRAY_COUNT(sParty_Dawson), + .party = {.ItemDefaultMoves = sParty_Dawson}, }, [TRAINER_SARAH] = @@ -9739,8 +9739,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.ItemDefaultMoves = sParty_Sarah } + .partySize = ARRAY_COUNT(sParty_Sarah), + .party = {.ItemDefaultMoves = sParty_Sarah}, }, [TRAINER_DARIAN] = @@ -9753,8 +9753,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Darian } + .partySize = ARRAY_COUNT(sParty_Darian), + .party = {.NoItemDefaultMoves = sParty_Darian}, }, [TRAINER_HAILEY] = @@ -9767,8 +9767,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Hailey } + .partySize = ARRAY_COUNT(sParty_Hailey), + .party = {.NoItemDefaultMoves = sParty_Hailey}, }, [TRAINER_CHANDLER] = @@ -9781,8 +9781,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Chandler } + .partySize = ARRAY_COUNT(sParty_Chandler), + .party = {.NoItemDefaultMoves = sParty_Chandler}, }, [TRAINER_KALEB] = @@ -9795,8 +9795,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.ItemDefaultMoves = sParty_Kaleb } + .partySize = ARRAY_COUNT(sParty_Kaleb), + .party = {.ItemDefaultMoves = sParty_Kaleb}, }, [TRAINER_JOSEPH] = @@ -9809,8 +9809,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Joseph } + .partySize = ARRAY_COUNT(sParty_Joseph), + .party = {.NoItemDefaultMoves = sParty_Joseph}, }, [TRAINER_ALYSSA] = @@ -9823,8 +9823,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Alyssa } + .partySize = ARRAY_COUNT(sParty_Alyssa), + .party = {.NoItemDefaultMoves = sParty_Alyssa}, }, [TRAINER_MARCOS] = @@ -9837,8 +9837,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Marcos } + .partySize = ARRAY_COUNT(sParty_Marcos), + .party = {.NoItemDefaultMoves = sParty_Marcos}, }, [TRAINER_RHETT] = @@ -9851,8 +9851,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Rhett } + .partySize = ARRAY_COUNT(sParty_Rhett), + .party = {.NoItemDefaultMoves = sParty_Rhett}, }, [TRAINER_TYRON] = @@ -9865,8 +9865,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Tyron } + .partySize = ARRAY_COUNT(sParty_Tyron), + .party = {.NoItemDefaultMoves = sParty_Tyron}, }, [TRAINER_CELINA] = @@ -9879,8 +9879,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Celina } + .partySize = ARRAY_COUNT(sParty_Celina), + .party = {.NoItemDefaultMoves = sParty_Celina}, }, [TRAINER_BIANCA] = @@ -9893,8 +9893,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Bianca } + .partySize = ARRAY_COUNT(sParty_Bianca), + .party = {.NoItemDefaultMoves = sParty_Bianca}, }, [TRAINER_HAYDEN] = @@ -9907,8 +9907,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Hayden } + .partySize = ARRAY_COUNT(sParty_Hayden), + .party = {.NoItemDefaultMoves = sParty_Hayden}, }, [TRAINER_SOPHIE] = @@ -9921,8 +9921,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Sophie } + .partySize = ARRAY_COUNT(sParty_Sophie), + .party = {.NoItemDefaultMoves = sParty_Sophie}, }, [TRAINER_COBY] = @@ -9935,8 +9935,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Coby } + .partySize = ARRAY_COUNT(sParty_Coby), + .party = {.NoItemDefaultMoves = sParty_Coby}, }, [TRAINER_LAWRENCE] = @@ -9949,8 +9949,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Lawrence } + .partySize = ARRAY_COUNT(sParty_Lawrence), + .party = {.NoItemDefaultMoves = sParty_Lawrence}, }, [TRAINER_WYATT] = @@ -9963,8 +9963,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Wyatt } + .partySize = ARRAY_COUNT(sParty_Wyatt), + .party = {.NoItemDefaultMoves = sParty_Wyatt}, }, [TRAINER_ANGELINA] = @@ -9977,8 +9977,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Angelina } + .partySize = ARRAY_COUNT(sParty_Angelina), + .party = {.NoItemDefaultMoves = sParty_Angelina}, }, [TRAINER_KAI] = @@ -9991,8 +9991,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Kai } + .partySize = ARRAY_COUNT(sParty_Kai), + .party = {.NoItemDefaultMoves = sParty_Kai}, }, [TRAINER_CHARLOTTE] = @@ -10005,8 +10005,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Charlotte } + .partySize = ARRAY_COUNT(sParty_Charlotte), + .party = {.NoItemDefaultMoves = sParty_Charlotte}, }, [TRAINER_DEANDRE] = @@ -10019,8 +10019,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Deandre } + .partySize = ARRAY_COUNT(sParty_Deandre), + .party = {.NoItemDefaultMoves = sParty_Deandre}, }, [TRAINER_GRUNT_38] = @@ -10033,8 +10033,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt38 } + .partySize = ARRAY_COUNT(sParty_Grunt38), + .party = {.NoItemDefaultMoves = sParty_Grunt38}, }, [TRAINER_GRUNT_39] = @@ -10047,8 +10047,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt39 } + .partySize = ARRAY_COUNT(sParty_Grunt39), + .party = {.NoItemDefaultMoves = sParty_Grunt39}, }, [TRAINER_GRUNT_40] = @@ -10061,8 +10061,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt40 } + .partySize = ARRAY_COUNT(sParty_Grunt40), + .party = {.NoItemDefaultMoves = sParty_Grunt40}, }, [TRAINER_GRUNT_41] = @@ -10075,8 +10075,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Grunt41 } + .partySize = ARRAY_COUNT(sParty_Grunt41), + .party = {.NoItemDefaultMoves = sParty_Grunt41}, }, [TRAINER_GRUNT_42] = @@ -10089,8 +10089,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Grunt42 } + .partySize = ARRAY_COUNT(sParty_Grunt42), + .party = {.NoItemDefaultMoves = sParty_Grunt42}, }, [TRAINER_GRUNT_43] = @@ -10103,8 +10103,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt43 } + .partySize = ARRAY_COUNT(sParty_Grunt43), + .party = {.NoItemDefaultMoves = sParty_Grunt43}, }, [TRAINER_GRUNT_44] = @@ -10117,8 +10117,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt44 } + .partySize = ARRAY_COUNT(sParty_Grunt44), + .party = {.NoItemDefaultMoves = sParty_Grunt44}, }, [TRAINER_GRUNT_45] = @@ -10131,8 +10131,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt45 } + .partySize = ARRAY_COUNT(sParty_Grunt45), + .party = {.NoItemDefaultMoves = sParty_Grunt45}, }, [TRAINER_GRUNT_46] = @@ -10145,8 +10145,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt46 } + .partySize = ARRAY_COUNT(sParty_Grunt46), + .party = {.NoItemDefaultMoves = sParty_Grunt46}, }, [TRAINER_GRUNT_47] = @@ -10159,8 +10159,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt47 } + .partySize = ARRAY_COUNT(sParty_Grunt47), + .party = {.NoItemDefaultMoves = sParty_Grunt47}, }, [TRAINER_GRUNT_48] = @@ -10173,8 +10173,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt48 } + .partySize = ARRAY_COUNT(sParty_Grunt48), + .party = {.NoItemDefaultMoves = sParty_Grunt48}, }, [TRAINER_GRUNT_49] = @@ -10187,8 +10187,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt49 } + .partySize = ARRAY_COUNT(sParty_Grunt49), + .party = {.NoItemDefaultMoves = sParty_Grunt49}, }, [TRAINER_GRUNT_50] = @@ -10201,8 +10201,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt50 } + .partySize = ARRAY_COUNT(sParty_Grunt50), + .party = {.NoItemDefaultMoves = sParty_Grunt50}, }, [TRAINER_GRUNT_51] = @@ -10215,8 +10215,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt51 } + .partySize = ARRAY_COUNT(sParty_Grunt51), + .party = {.NoItemDefaultMoves = sParty_Grunt51}, }, [TRAINER_GRUNT_52] = @@ -10229,8 +10229,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt52 } + .partySize = ARRAY_COUNT(sParty_Grunt52), + .party = {.NoItemDefaultMoves = sParty_Grunt52}, }, [TRAINER_GRUNT_53] = @@ -10243,8 +10243,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Grunt53 } + .partySize = ARRAY_COUNT(sParty_Grunt53), + .party = {.NoItemDefaultMoves = sParty_Grunt53}, }, [TRAINER_TABITHA_3] = @@ -10257,8 +10257,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 4, - .party = {.NoItemDefaultMoves = sParty_Tabitha3 } + .partySize = ARRAY_COUNT(sParty_Tabitha3), + .party = {.NoItemDefaultMoves = sParty_Tabitha3}, }, [TRAINER_DARCY] = @@ -10271,8 +10271,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Darcy } + .partySize = ARRAY_COUNT(sParty_Darcy), + .party = {.NoItemDefaultMoves = sParty_Darcy}, }, [TRAINER_MAXIE_3] = @@ -10285,8 +10285,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Maxie3 } + .partySize = ARRAY_COUNT(sParty_Maxie3), + .party = {.NoItemDefaultMoves = sParty_Maxie3}, }, [TRAINER_PETE] = @@ -10299,8 +10299,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Pete } + .partySize = ARRAY_COUNT(sParty_Pete), + .party = {.NoItemDefaultMoves = sParty_Pete}, }, [TRAINER_ISABELLE] = @@ -10313,8 +10313,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Isabelle } + .partySize = ARRAY_COUNT(sParty_Isabelle), + .party = {.NoItemDefaultMoves = sParty_Isabelle}, }, [TRAINER_ANDRES_1] = @@ -10327,8 +10327,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Andres1 } + .partySize = ARRAY_COUNT(sParty_Andres1), + .party = {.NoItemDefaultMoves = sParty_Andres1}, }, [TRAINER_JOSUE] = @@ -10341,8 +10341,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Josue } + .partySize = ARRAY_COUNT(sParty_Josue), + .party = {.NoItemDefaultMoves = sParty_Josue}, }, [TRAINER_CAMRON] = @@ -10355,8 +10355,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Camron } + .partySize = ARRAY_COUNT(sParty_Camron), + .party = {.NoItemDefaultMoves = sParty_Camron}, }, [TRAINER_CORY_1] = @@ -10369,8 +10369,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Cory1 } + .partySize = ARRAY_COUNT(sParty_Cory1), + .party = {.NoItemDefaultMoves = sParty_Cory1}, }, [TRAINER_CAROLINA] = @@ -10383,8 +10383,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Carolina } + .partySize = ARRAY_COUNT(sParty_Carolina), + .party = {.NoItemDefaultMoves = sParty_Carolina}, }, [TRAINER_ELIJAH] = @@ -10397,8 +10397,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Elijah } + .partySize = ARRAY_COUNT(sParty_Elijah), + .party = {.NoItemDefaultMoves = sParty_Elijah}, }, [TRAINER_CELIA] = @@ -10411,8 +10411,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Celia } + .partySize = ARRAY_COUNT(sParty_Celia), + .party = {.NoItemDefaultMoves = sParty_Celia}, }, [TRAINER_BRYAN] = @@ -10425,8 +10425,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Bryan } + .partySize = ARRAY_COUNT(sParty_Bryan), + .party = {.NoItemDefaultMoves = sParty_Bryan}, }, [TRAINER_BRANDEN] = @@ -10439,8 +10439,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Branden } + .partySize = ARRAY_COUNT(sParty_Branden), + .party = {.NoItemDefaultMoves = sParty_Branden}, }, [TRAINER_BRYANT] = @@ -10453,8 +10453,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Bryant } + .partySize = ARRAY_COUNT(sParty_Bryant), + .party = {.NoItemDefaultMoves = sParty_Bryant}, }, [TRAINER_SHAYLA] = @@ -10467,8 +10467,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Shayla } + .partySize = ARRAY_COUNT(sParty_Shayla), + .party = {.NoItemDefaultMoves = sParty_Shayla}, }, [TRAINER_KYRA] = @@ -10481,8 +10481,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Kyra } + .partySize = ARRAY_COUNT(sParty_Kyra), + .party = {.NoItemDefaultMoves = sParty_Kyra}, }, [TRAINER_JAIDEN] = @@ -10495,8 +10495,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Jaiden } + .partySize = ARRAY_COUNT(sParty_Jaiden), + .party = {.NoItemDefaultMoves = sParty_Jaiden}, }, [TRAINER_ALIX] = @@ -10509,8 +10509,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Alix } + .partySize = ARRAY_COUNT(sParty_Alix), + .party = {.NoItemDefaultMoves = sParty_Alix}, }, [TRAINER_HELENE] = @@ -10523,8 +10523,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Helene } + .partySize = ARRAY_COUNT(sParty_Helene), + .party = {.NoItemDefaultMoves = sParty_Helene}, }, [TRAINER_MARLENE] = @@ -10537,8 +10537,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Marlene } + .partySize = ARRAY_COUNT(sParty_Marlene), + .party = {.NoItemDefaultMoves = sParty_Marlene}, }, [TRAINER_DEVAN] = @@ -10551,8 +10551,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Devan } + .partySize = ARRAY_COUNT(sParty_Devan), + .party = {.NoItemDefaultMoves = sParty_Devan}, }, [TRAINER_JOHNSON] = @@ -10565,8 +10565,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Johnson } + .partySize = ARRAY_COUNT(sParty_Johnson), + .party = {.NoItemDefaultMoves = sParty_Johnson}, }, [TRAINER_MELINA] = @@ -10579,8 +10579,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Melina } + .partySize = ARRAY_COUNT(sParty_Melina), + .party = {.NoItemDefaultMoves = sParty_Melina}, }, [TRAINER_BRANDI] = @@ -10593,8 +10593,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Brandi } + .partySize = ARRAY_COUNT(sParty_Brandi), + .party = {.NoItemDefaultMoves = sParty_Brandi}, }, [TRAINER_AISHA] = @@ -10607,8 +10607,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Aisha } + .partySize = ARRAY_COUNT(sParty_Aisha), + .party = {.NoItemDefaultMoves = sParty_Aisha}, }, [TRAINER_MAKAYLA] = @@ -10621,8 +10621,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Makayla } + .partySize = ARRAY_COUNT(sParty_Makayla), + .party = {.NoItemDefaultMoves = sParty_Makayla}, }, [TRAINER_FABIAN] = @@ -10635,8 +10635,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Fabian } + .partySize = ARRAY_COUNT(sParty_Fabian), + .party = {.NoItemDefaultMoves = sParty_Fabian}, }, [TRAINER_DAYTON] = @@ -10649,8 +10649,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Dayton } + .partySize = ARRAY_COUNT(sParty_Dayton), + .party = {.NoItemDefaultMoves = sParty_Dayton}, }, [TRAINER_RACHEL] = @@ -10663,8 +10663,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Rachel } + .partySize = ARRAY_COUNT(sParty_Rachel), + .party = {.NoItemDefaultMoves = sParty_Rachel}, }, [TRAINER_LEONEL] = @@ -10677,8 +10677,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemCustomMoves = sParty_Leonel } + .partySize = ARRAY_COUNT(sParty_Leonel), + .party = {.NoItemCustomMoves = sParty_Leonel}, }, [TRAINER_CALLIE] = @@ -10691,8 +10691,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Callie } + .partySize = ARRAY_COUNT(sParty_Callie), + .party = {.NoItemDefaultMoves = sParty_Callie}, }, [TRAINER_CALE] = @@ -10705,8 +10705,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Cale } + .partySize = ARRAY_COUNT(sParty_Cale), + .party = {.NoItemDefaultMoves = sParty_Cale}, }, [TRAINER_MYLES] = @@ -10719,8 +10719,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 6, - .party = {.NoItemDefaultMoves = sParty_Myles } + .partySize = ARRAY_COUNT(sParty_Myles), + .party = {.NoItemDefaultMoves = sParty_Myles}, }, [TRAINER_PAT] = @@ -10733,8 +10733,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 6, - .party = {.NoItemDefaultMoves = sParty_Pat } + .partySize = ARRAY_COUNT(sParty_Pat), + .party = {.NoItemDefaultMoves = sParty_Pat}, }, [TRAINER_CRISTIN_1] = @@ -10747,8 +10747,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Cristin1 } + .partySize = ARRAY_COUNT(sParty_Cristin1), + .party = {.NoItemDefaultMoves = sParty_Cristin1}, }, [TRAINER_MAY_14] = @@ -10761,8 +10761,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_May14 } + .partySize = ARRAY_COUNT(sParty_May14), + .party = {.NoItemDefaultMoves = sParty_May14}, }, [TRAINER_MAY_15] = @@ -10775,8 +10775,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_May15 } + .partySize = ARRAY_COUNT(sParty_May15), + .party = {.NoItemDefaultMoves = sParty_May15}, }, [TRAINER_ROXANNE_2] = @@ -10789,8 +10789,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 4, - .party = {.ItemCustomMoves = sParty_Roxanne2 } + .partySize = ARRAY_COUNT(sParty_Roxanne2), + .party = {.ItemCustomMoves = sParty_Roxanne2}, }, [TRAINER_ROXANNE_3] = @@ -10803,8 +10803,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 5, - .party = {.ItemCustomMoves = sParty_Roxanne3 } + .partySize = ARRAY_COUNT(sParty_Roxanne3), + .party = {.ItemCustomMoves = sParty_Roxanne3}, }, [TRAINER_ROXANNE_4] = @@ -10817,8 +10817,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 5, - .party = {.ItemCustomMoves = sParty_Roxanne4 } + .partySize = ARRAY_COUNT(sParty_Roxanne4), + .party = {.ItemCustomMoves = sParty_Roxanne4}, }, [TRAINER_ROXANNE_5] = @@ -10831,8 +10831,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 6, - .party = {.ItemCustomMoves = sParty_Roxanne5 } + .partySize = ARRAY_COUNT(sParty_Roxanne5), + .party = {.ItemCustomMoves = sParty_Roxanne5}, }, [TRAINER_BRAWLY_2] = @@ -10845,8 +10845,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 4, - .party = {.ItemCustomMoves = sParty_Brawly2 } + .partySize = ARRAY_COUNT(sParty_Brawly2), + .party = {.ItemCustomMoves = sParty_Brawly2}, }, [TRAINER_BRAWLY_3] = @@ -10859,8 +10859,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 4, - .party = {.ItemCustomMoves = sParty_Brawly3 } + .partySize = ARRAY_COUNT(sParty_Brawly3), + .party = {.ItemCustomMoves = sParty_Brawly3}, }, [TRAINER_BRAWLY_4] = @@ -10873,8 +10873,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 5, - .party = {.ItemCustomMoves = sParty_Brawly4 } + .partySize = ARRAY_COUNT(sParty_Brawly4), + .party = {.ItemCustomMoves = sParty_Brawly4}, }, [TRAINER_BRAWLY_5] = @@ -10887,8 +10887,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 6, - .party = {.ItemCustomMoves = sParty_Brawly5 } + .partySize = ARRAY_COUNT(sParty_Brawly5), + .party = {.ItemCustomMoves = sParty_Brawly5}, }, [TRAINER_WATTSON_2] = @@ -10901,8 +10901,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 4, - .party = {.ItemCustomMoves = sParty_Wattson2 } + .partySize = ARRAY_COUNT(sParty_Wattson2), + .party = {.ItemCustomMoves = sParty_Wattson2}, }, [TRAINER_WATTSON_3] = @@ -10915,8 +10915,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 5, - .party = {.ItemCustomMoves = sParty_Wattson3 } + .partySize = ARRAY_COUNT(sParty_Wattson3), + .party = {.ItemCustomMoves = sParty_Wattson3}, }, [TRAINER_WATTSON_4] = @@ -10929,8 +10929,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 5, - .party = {.ItemCustomMoves = sParty_Wattson4 } + .partySize = ARRAY_COUNT(sParty_Wattson4), + .party = {.ItemCustomMoves = sParty_Wattson4}, }, [TRAINER_WATTSON_5] = @@ -10943,8 +10943,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 6, - .party = {.ItemCustomMoves = sParty_Wattson5 } + .partySize = ARRAY_COUNT(sParty_Wattson5), + .party = {.ItemCustomMoves = sParty_Wattson5}, }, [TRAINER_FLANNERY_2] = @@ -10957,8 +10957,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 4, - .party = {.ItemCustomMoves = sParty_Flannery2 } + .partySize = ARRAY_COUNT(sParty_Flannery2), + .party = {.ItemCustomMoves = sParty_Flannery2}, }, [TRAINER_FLANNERY_3] = @@ -10971,8 +10971,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 5, - .party = {.ItemCustomMoves = sParty_Flannery3 } + .partySize = ARRAY_COUNT(sParty_Flannery3), + .party = {.ItemCustomMoves = sParty_Flannery3}, }, [TRAINER_FLANNERY_4] = @@ -10985,8 +10985,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 6, - .party = {.ItemCustomMoves = sParty_Flannery4 } + .partySize = ARRAY_COUNT(sParty_Flannery4), + .party = {.ItemCustomMoves = sParty_Flannery4}, }, [TRAINER_FLANNERY_5] = @@ -10999,8 +10999,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 6, - .party = {.ItemCustomMoves = sParty_Flannery5 } + .partySize = ARRAY_COUNT(sParty_Flannery5), + .party = {.ItemCustomMoves = sParty_Flannery5}, }, [TRAINER_NORMAN_2] = @@ -11013,8 +11013,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 4, - .party = {.ItemCustomMoves = sParty_Norman2 } + .partySize = ARRAY_COUNT(sParty_Norman2), + .party = {.ItemCustomMoves = sParty_Norman2}, }, [TRAINER_NORMAN_3] = @@ -11027,8 +11027,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 5, - .party = {.ItemCustomMoves = sParty_Norman3 } + .partySize = ARRAY_COUNT(sParty_Norman3), + .party = {.ItemCustomMoves = sParty_Norman3}, }, [TRAINER_NORMAN_4] = @@ -11041,8 +11041,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 5, - .party = {.ItemCustomMoves = sParty_Norman4 } + .partySize = ARRAY_COUNT(sParty_Norman4), + .party = {.ItemCustomMoves = sParty_Norman4}, }, [TRAINER_NORMAN_5] = @@ -11055,8 +11055,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 6, - .party = {.ItemCustomMoves = sParty_Norman5 } + .partySize = ARRAY_COUNT(sParty_Norman5), + .party = {.ItemCustomMoves = sParty_Norman5}, }, [TRAINER_WINONA_2] = @@ -11069,8 +11069,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY | AI_SCRIPT_RISKY, - .partySize = 5, - .party = {.ItemCustomMoves = sParty_Winona2 } + .partySize = ARRAY_COUNT(sParty_Winona2), + .party = {.ItemCustomMoves = sParty_Winona2}, }, [TRAINER_WINONA_3] = @@ -11083,8 +11083,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY | AI_SCRIPT_RISKY, - .partySize = 6, - .party = {.ItemCustomMoves = sParty_Winona3 } + .partySize = ARRAY_COUNT(sParty_Winona3), + .party = {.ItemCustomMoves = sParty_Winona3}, }, [TRAINER_WINONA_4] = @@ -11097,8 +11097,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY | AI_SCRIPT_RISKY, - .partySize = 6, - .party = {.ItemCustomMoves = sParty_Winona4 } + .partySize = ARRAY_COUNT(sParty_Winona4), + .party = {.ItemCustomMoves = sParty_Winona4}, }, [TRAINER_WINONA_5] = @@ -11111,8 +11111,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY | AI_SCRIPT_RISKY, - .partySize = 6, - .party = {.ItemCustomMoves = sParty_Winona5 } + .partySize = ARRAY_COUNT(sParty_Winona5), + .party = {.ItemCustomMoves = sParty_Winona5}, }, [TRAINER_TATE_AND_LIZA_2] = @@ -11125,8 +11125,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 5, - .party = {.ItemCustomMoves = sParty_TateAndLiza2 } + .partySize = ARRAY_COUNT(sParty_TateAndLiza2), + .party = {.ItemCustomMoves = sParty_TateAndLiza2}, }, [TRAINER_TATE_AND_LIZA_3] = @@ -11139,8 +11139,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 6, - .party = {.ItemCustomMoves = sParty_TateAndLiza3 } + .partySize = ARRAY_COUNT(sParty_TateAndLiza3), + .party = {.ItemCustomMoves = sParty_TateAndLiza3}, }, [TRAINER_TATE_AND_LIZA_4] = @@ -11153,8 +11153,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 6, - .party = {.ItemCustomMoves = sParty_TateAndLiza4 } + .partySize = ARRAY_COUNT(sParty_TateAndLiza4), + .party = {.ItemCustomMoves = sParty_TateAndLiza4}, }, [TRAINER_TATE_AND_LIZA_5] = @@ -11167,8 +11167,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 6, - .party = {.ItemCustomMoves = sParty_TateAndLiza5 } + .partySize = ARRAY_COUNT(sParty_TateAndLiza5), + .party = {.ItemCustomMoves = sParty_TateAndLiza5}, }, [TRAINER_JUAN_2] = @@ -11181,8 +11181,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 5, - .party = {.ItemCustomMoves = sParty_Juan2 } + .partySize = ARRAY_COUNT(sParty_Juan2), + .party = {.ItemCustomMoves = sParty_Juan2}, }, [TRAINER_JUAN_3] = @@ -11195,8 +11195,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 5, - .party = {.ItemCustomMoves = sParty_Juan3 } + .partySize = ARRAY_COUNT(sParty_Juan3), + .party = {.ItemCustomMoves = sParty_Juan3}, }, [TRAINER_JUAN_4] = @@ -11209,8 +11209,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 6, - .party = {.ItemCustomMoves = sParty_Juan4 } + .partySize = ARRAY_COUNT(sParty_Juan4), + .party = {.ItemCustomMoves = sParty_Juan4}, }, [TRAINER_JUAN_5] = @@ -11223,8 +11223,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE}, .doubleBattle = TRUE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 6, - .party = {.ItemCustomMoves = sParty_Juan5 } + .partySize = ARRAY_COUNT(sParty_Juan5), + .party = {.ItemCustomMoves = sParty_Juan5}, }, [TRAINER_ANGELO] = @@ -11237,8 +11237,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.ItemCustomMoves = sParty_Angelo } + .partySize = ARRAY_COUNT(sParty_Angelo), + .party = {.ItemCustomMoves = sParty_Angelo}, }, [TRAINER_DARIUS] = @@ -11251,8 +11251,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Darius } + .partySize = ARRAY_COUNT(sParty_Darius), + .party = {.NoItemDefaultMoves = sParty_Darius}, }, [TRAINER_STEVEN] = @@ -11265,8 +11265,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 6, - .party = {.ItemCustomMoves = sParty_Steven } + .partySize = ARRAY_COUNT(sParty_Steven), + .party = {.ItemCustomMoves = sParty_Steven}, }, [TRAINER_ANABEL] = @@ -11279,8 +11279,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Anabel } + .partySize = ARRAY_COUNT(sParty_Anabel), + .party = {.NoItemDefaultMoves = sParty_Anabel}, }, [TRAINER_TUCKER] = @@ -11293,8 +11293,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Tucker } + .partySize = ARRAY_COUNT(sParty_Tucker), + .party = {.NoItemDefaultMoves = sParty_Tucker}, }, [TRAINER_SPENSER] = @@ -11307,8 +11307,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Spenser } + .partySize = ARRAY_COUNT(sParty_Spenser), + .party = {.NoItemDefaultMoves = sParty_Spenser}, }, [TRAINER_GRETA] = @@ -11321,8 +11321,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Greta } + .partySize = ARRAY_COUNT(sParty_Greta), + .party = {.NoItemDefaultMoves = sParty_Greta}, }, [TRAINER_NOLAND] = @@ -11335,8 +11335,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Noland } + .partySize = ARRAY_COUNT(sParty_Noland), + .party = {.NoItemDefaultMoves = sParty_Noland}, }, [TRAINER_LUCY] = @@ -11349,8 +11349,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Lucy } + .partySize = ARRAY_COUNT(sParty_Lucy), + .party = {.NoItemDefaultMoves = sParty_Lucy}, }, [TRAINER_BRANDON] = @@ -11363,8 +11363,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Brandon } + .partySize = ARRAY_COUNT(sParty_Brandon), + .party = {.NoItemDefaultMoves = sParty_Brandon}, }, [TRAINER_ANDRES_2] = @@ -11377,8 +11377,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Andres2 } + .partySize = ARRAY_COUNT(sParty_Andres2), + .party = {.NoItemDefaultMoves = sParty_Andres2}, }, [TRAINER_ANDRES_3] = @@ -11391,8 +11391,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Andres3 } + .partySize = ARRAY_COUNT(sParty_Andres3), + .party = {.NoItemDefaultMoves = sParty_Andres3}, }, [TRAINER_ANDRES_4] = @@ -11405,8 +11405,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Andres4 } + .partySize = ARRAY_COUNT(sParty_Andres4), + .party = {.NoItemDefaultMoves = sParty_Andres4}, }, [TRAINER_ANDRES_5] = @@ -11419,8 +11419,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Andres5 } + .partySize = ARRAY_COUNT(sParty_Andres5), + .party = {.NoItemDefaultMoves = sParty_Andres5}, }, [TRAINER_CORY_2] = @@ -11433,8 +11433,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Cory2 } + .partySize = ARRAY_COUNT(sParty_Cory2), + .party = {.NoItemDefaultMoves = sParty_Cory2}, }, [TRAINER_CORY_3] = @@ -11447,8 +11447,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Cory3 } + .partySize = ARRAY_COUNT(sParty_Cory3), + .party = {.NoItemDefaultMoves = sParty_Cory3}, }, [TRAINER_CORY_4] = @@ -11461,8 +11461,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Cory4 } + .partySize = ARRAY_COUNT(sParty_Cory4), + .party = {.NoItemDefaultMoves = sParty_Cory4}, }, [TRAINER_CORY_5] = @@ -11475,8 +11475,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Cory5 } + .partySize = ARRAY_COUNT(sParty_Cory5), + .party = {.NoItemDefaultMoves = sParty_Cory5}, }, [TRAINER_PABLO_2] = @@ -11489,8 +11489,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Pablo2 } + .partySize = ARRAY_COUNT(sParty_Pablo2), + .party = {.NoItemDefaultMoves = sParty_Pablo2}, }, [TRAINER_PABLO_3] = @@ -11503,8 +11503,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Pablo3 } + .partySize = ARRAY_COUNT(sParty_Pablo3), + .party = {.NoItemDefaultMoves = sParty_Pablo3}, }, [TRAINER_PABLO_4] = @@ -11517,8 +11517,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Pablo4 } + .partySize = ARRAY_COUNT(sParty_Pablo4), + .party = {.NoItemDefaultMoves = sParty_Pablo4}, }, [TRAINER_PABLO_5] = @@ -11531,8 +11531,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Pablo5 } + .partySize = ARRAY_COUNT(sParty_Pablo5), + .party = {.NoItemDefaultMoves = sParty_Pablo5}, }, [TRAINER_KOJI_2] = @@ -11545,8 +11545,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Koji2 } + .partySize = ARRAY_COUNT(sParty_Koji2), + .party = {.NoItemDefaultMoves = sParty_Koji2}, }, [TRAINER_KOJI_3] = @@ -11559,8 +11559,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Koji3 } + .partySize = ARRAY_COUNT(sParty_Koji3), + .party = {.NoItemDefaultMoves = sParty_Koji3}, }, [TRAINER_KOJI_4] = @@ -11573,8 +11573,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Koji4 } + .partySize = ARRAY_COUNT(sParty_Koji4), + .party = {.NoItemDefaultMoves = sParty_Koji4}, }, [TRAINER_KOJI_5] = @@ -11587,8 +11587,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Koji5 } + .partySize = ARRAY_COUNT(sParty_Koji5), + .party = {.NoItemDefaultMoves = sParty_Koji5}, }, [TRAINER_CRISTIN_2] = @@ -11601,8 +11601,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Cristin2 } + .partySize = ARRAY_COUNT(sParty_Cristin2), + .party = {.NoItemDefaultMoves = sParty_Cristin2}, }, [TRAINER_CRISTIN_3] = @@ -11615,8 +11615,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Cristin3 } + .partySize = ARRAY_COUNT(sParty_Cristin3), + .party = {.NoItemDefaultMoves = sParty_Cristin3}, }, [TRAINER_CRISTIN_4] = @@ -11629,8 +11629,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Cristin4 } + .partySize = ARRAY_COUNT(sParty_Cristin4), + .party = {.NoItemDefaultMoves = sParty_Cristin4}, }, [TRAINER_CRISTIN_5] = @@ -11643,8 +11643,8 @@ const struct Trainer gTrainers[] = { .items = {ITEM_HYPER_POTION, ITEM_NONE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Cristin5 } + .partySize = ARRAY_COUNT(sParty_Cristin5), + .party = {.NoItemDefaultMoves = sParty_Cristin5}, }, [TRAINER_FERNANDO_2] = @@ -11657,8 +11657,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Fernando2 } + .partySize = ARRAY_COUNT(sParty_Fernando2), + .party = {.NoItemDefaultMoves = sParty_Fernando2}, }, [TRAINER_FERNANDO_3] = @@ -11671,8 +11671,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Fernando3 } + .partySize = ARRAY_COUNT(sParty_Fernando3), + .party = {.NoItemDefaultMoves = sParty_Fernando3}, }, [TRAINER_FERNANDO_4] = @@ -11685,8 +11685,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Fernando4 } + .partySize = ARRAY_COUNT(sParty_Fernando4), + .party = {.NoItemDefaultMoves = sParty_Fernando4}, }, [TRAINER_FERNANDO_5] = @@ -11699,8 +11699,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Fernando5 } + .partySize = ARRAY_COUNT(sParty_Fernando5), + .party = {.NoItemDefaultMoves = sParty_Fernando5}, }, [TRAINER_SAWYER_2] = @@ -11713,8 +11713,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Sawyer2 } + .partySize = ARRAY_COUNT(sParty_Sawyer2), + .party = {.NoItemDefaultMoves = sParty_Sawyer2}, }, [TRAINER_SAWYER_3] = @@ -11727,8 +11727,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Sawyer3 } + .partySize = ARRAY_COUNT(sParty_Sawyer3), + .party = {.NoItemDefaultMoves = sParty_Sawyer3}, }, [TRAINER_SAWYER_4] = @@ -11741,8 +11741,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Sawyer4 } + .partySize = ARRAY_COUNT(sParty_Sawyer4), + .party = {.NoItemDefaultMoves = sParty_Sawyer4}, }, [TRAINER_SAWYER_5] = @@ -11755,8 +11755,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_TRY_TO_FAINT | AI_SCRIPT_CHECK_VIABILITY, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Sawyer5 } + .partySize = ARRAY_COUNT(sParty_Sawyer5), + .party = {.NoItemDefaultMoves = sParty_Sawyer5}, }, [TRAINER_GABRIELLE_2] = @@ -11769,8 +11769,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 6, - .party = {.NoItemDefaultMoves = sParty_Gabrielle2 } + .partySize = ARRAY_COUNT(sParty_Gabrielle2), + .party = {.NoItemDefaultMoves = sParty_Gabrielle2}, }, [TRAINER_GABRIELLE_3] = @@ -11783,8 +11783,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 6, - .party = {.NoItemDefaultMoves = sParty_Gabrielle3 } + .partySize = ARRAY_COUNT(sParty_Gabrielle3), + .party = {.NoItemDefaultMoves = sParty_Gabrielle3}, }, [TRAINER_GABRIELLE_4] = @@ -11797,8 +11797,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 6, - .party = {.NoItemDefaultMoves = sParty_Gabrielle4 } + .partySize = ARRAY_COUNT(sParty_Gabrielle4), + .party = {.NoItemDefaultMoves = sParty_Gabrielle4}, }, [TRAINER_GABRIELLE_5] = @@ -11811,8 +11811,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 6, - .party = {.NoItemDefaultMoves = sParty_Gabrielle5 } + .partySize = ARRAY_COUNT(sParty_Gabrielle5), + .party = {.NoItemDefaultMoves = sParty_Gabrielle5}, }, [TRAINER_THALIA_2] = @@ -11825,8 +11825,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Thalia2 } + .partySize = ARRAY_COUNT(sParty_Thalia2), + .party = {.NoItemDefaultMoves = sParty_Thalia2}, }, [TRAINER_THALIA_3] = @@ -11839,8 +11839,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Thalia3 } + .partySize = ARRAY_COUNT(sParty_Thalia3), + .party = {.NoItemDefaultMoves = sParty_Thalia3}, }, [TRAINER_THALIA_4] = @@ -11853,8 +11853,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Thalia4 } + .partySize = ARRAY_COUNT(sParty_Thalia4), + .party = {.NoItemDefaultMoves = sParty_Thalia4}, }, [TRAINER_THALIA_5] = @@ -11867,8 +11867,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = AI_SCRIPT_CHECK_BAD_MOVE, - .partySize = 3, - .party = {.NoItemDefaultMoves = sParty_Thalia5 } + .partySize = ARRAY_COUNT(sParty_Thalia5), + .party = {.NoItemDefaultMoves = sParty_Thalia5}, }, [TRAINER_MARIELA] = @@ -11881,8 +11881,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = 0, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Mariela } + .partySize = ARRAY_COUNT(sParty_Mariela), + .party = {.NoItemDefaultMoves = sParty_Mariela}, }, [TRAINER_ALVARO] = @@ -11895,8 +11895,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = 0, - .partySize = 2, - .party = {.NoItemDefaultMoves = sParty_Alvaro } + .partySize = ARRAY_COUNT(sParty_Alvaro), + .party = {.NoItemDefaultMoves = sParty_Alvaro}, }, [TRAINER_EVERETT] = @@ -11909,8 +11909,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = 0, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Everett } + .partySize = ARRAY_COUNT(sParty_Everett), + .party = {.NoItemDefaultMoves = sParty_Everett}, }, [TRAINER_RED] = @@ -11923,8 +11923,8 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = 0, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Red } + .partySize = ARRAY_COUNT(sParty_Red), + .party = {.NoItemDefaultMoves = sParty_Red}, }, [TRAINER_LEAF] = @@ -11937,35 +11937,35 @@ const struct Trainer gTrainers[] = { .items = {}, .doubleBattle = FALSE, .aiFlags = 0, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Leaf } + .partySize = ARRAY_COUNT(sParty_Leaf), + .party = {.NoItemDefaultMoves = sParty_Leaf}, }, [TRAINER_BRENDAN_16] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_4, + .trainerClass = TRAINER_CLASS_RS_PROTAG, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_RS_BRENDAN, .trainerName = _("BRENDAN"), .items = {}, .doubleBattle = FALSE, .aiFlags = 0, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_Brendan16 } + .partySize = ARRAY_COUNT(sParty_Brendan16), + .party = {.NoItemDefaultMoves = sParty_Brendan16}, }, [TRAINER_MAY_16] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_4, + .trainerClass = TRAINER_CLASS_RS_PROTAG, .encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_RS_MAY, .trainerName = _("MAY"), .items = {}, .doubleBattle = FALSE, .aiFlags = 0, - .partySize = 1, - .party = {.NoItemDefaultMoves = sParty_May16 } + .partySize = ARRAY_COUNT(sParty_May16), + .party = {.NoItemDefaultMoves = sParty_May16}, }, }; diff --git a/src/data/wild_encounters.h b/src/data/wild_encounters.h deleted file mode 100644 index d1f2eb616..000000000 --- a/src/data/wild_encounters.h +++ /dev/null @@ -1,4573 +0,0 @@ -// const rom data - -/*This file consists of several parts. - *First, the actual tables that define the available Pokemon and their level ranges. - *Second, the headers for each area that links the tables to the actual maps. - *Third, Battle Pyramid-specific tables and headers. - *Fourth, Battle Pike-specific tables and headers. - *And then finally, Feebas-related data. - *You can search for // to jump between the sections. - */ - - //Start of regular Pokemon tables. - -const struct WildPokemon gRoute101_LandMons[] = -{ - {2, 2, SPECIES_WURMPLE}, - {2, 2, SPECIES_POOCHYENA}, - {2, 2, SPECIES_WURMPLE}, - {3, 3, SPECIES_WURMPLE}, - {3, 3, SPECIES_POOCHYENA}, - {3, 3, SPECIES_POOCHYENA}, - {3, 3, SPECIES_WURMPLE}, - {3, 3, SPECIES_POOCHYENA}, - {2, 2, SPECIES_ZIGZAGOON}, - {2, 2, SPECIES_ZIGZAGOON}, - {3, 3, SPECIES_ZIGZAGOON}, - {3, 3, SPECIES_ZIGZAGOON}, -}; - -const struct WildPokemonInfo gRoute101_LandMonsInfo = {20, gRoute101_LandMons}; - -const struct WildPokemon gRoute102_LandMons[] = -{ - {3, 3, SPECIES_POOCHYENA}, - {3, 3, SPECIES_WURMPLE}, - {4, 4, SPECIES_POOCHYENA}, - {4, 4, SPECIES_WURMPLE}, - {3, 3, SPECIES_LOTAD}, - {4, 4, SPECIES_LOTAD}, - {3, 3, SPECIES_ZIGZAGOON}, - {3, 3, SPECIES_ZIGZAGOON}, - {4, 4, SPECIES_ZIGZAGOON}, - {4, 4, SPECIES_RALTS}, - {4, 4, SPECIES_ZIGZAGOON}, - {3, 3, SPECIES_SEEDOT}, -}; - -const struct WildPokemonInfo gRoute102_LandMonsInfo = {20, gRoute102_LandMons}; - -const struct WildPokemon gRoute102_WaterMons[] = -{ - {20, 30, SPECIES_MARILL}, - {10, 20, SPECIES_MARILL}, - {30, 35, SPECIES_MARILL}, - {5, 10, SPECIES_MARILL}, - {20, 30, SPECIES_GOLDEEN}, -}; - -const struct WildPokemonInfo gRoute102_WaterMonsInfo = {4, gRoute102_WaterMons}; - -const struct WildPokemon gRoute102_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_GOLDEEN}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_GOLDEEN}, - {10, 30, SPECIES_CORPHISH}, - {25, 30, SPECIES_CORPHISH}, - {30, 35, SPECIES_CORPHISH}, - {20, 25, SPECIES_CORPHISH}, - {35, 40, SPECIES_CORPHISH}, - {40, 45, SPECIES_CORPHISH}, -}; - -const struct WildPokemonInfo gRoute102_FishingMonsInfo = {30, gRoute102_FishingMons}; - -const struct WildPokemon gRoute103_LandMons[] = -{ - {2, 2, SPECIES_POOCHYENA}, - {3, 3, SPECIES_POOCHYENA}, - {3, 3, SPECIES_POOCHYENA}, - {4, 4, SPECIES_POOCHYENA}, - {2, 2, SPECIES_WINGULL}, - {3, 3, SPECIES_ZIGZAGOON}, - {3, 3, SPECIES_ZIGZAGOON}, - {4, 4, SPECIES_ZIGZAGOON}, - {3, 3, SPECIES_WINGULL}, - {3, 3, SPECIES_WINGULL}, - {2, 2, SPECIES_WINGULL}, - {4, 4, SPECIES_WINGULL}, -}; - -const struct WildPokemonInfo gRoute103_LandMonsInfo = {20, gRoute103_LandMons}; - -const struct WildPokemon gRoute103_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute103_WaterMonsInfo = {4, gRoute103_WaterMons}; - -const struct WildPokemon gRoute103_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_SHARPEDO}, - {30, 35, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute103_FishingMonsInfo = {30, gRoute103_FishingMons}; - -const struct WildPokemon gRoute104_LandMons[] = -{ - {4, 4, SPECIES_POOCHYENA}, - {4, 4, SPECIES_WURMPLE}, - {5, 5, SPECIES_POOCHYENA}, - {5, 5, SPECIES_MARILL}, - {4, 4, SPECIES_MARILL}, - {5, 5, SPECIES_POOCHYENA}, - {4, 4, SPECIES_TAILLOW}, - {5, 5, SPECIES_TAILLOW}, - {4, 4, SPECIES_WINGULL}, - {4, 4, SPECIES_WINGULL}, - {3, 3, SPECIES_WINGULL}, - {5, 5, SPECIES_WINGULL}, -}; - -const struct WildPokemonInfo gRoute104_LandMonsInfo = {20, gRoute104_LandMons}; - -const struct WildPokemon gRoute104_WaterMons[] = -{ - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute104_WaterMonsInfo = {4, gRoute104_WaterMons}; - -const struct WildPokemon gRoute104_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_MAGIKARP}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_MAGIKARP}, - {25, 30, SPECIES_MAGIKARP}, - {30, 35, SPECIES_MAGIKARP}, - {20, 25, SPECIES_MAGIKARP}, - {35, 40, SPECIES_MAGIKARP}, - {40, 45, SPECIES_MAGIKARP}, -}; - -const struct WildPokemonInfo gRoute104_FishingMonsInfo = {30, gRoute104_FishingMons}; - -const struct WildPokemon gRoute105_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute105_WaterMonsInfo = {4, gRoute105_WaterMons}; - -const struct WildPokemon gRoute105_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_WAILMER}, - {20, 25, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute105_FishingMonsInfo = {30, gRoute105_FishingMons}; - -const struct WildPokemon gRoute110_LandMons[] = -{ - {12, 12, SPECIES_POOCHYENA}, - {12, 12, SPECIES_ELECTRIKE}, - {12, 12, SPECIES_GULPIN}, - {13, 13, SPECIES_ELECTRIKE}, - {13, 13, SPECIES_MINUN}, - {13, 13, SPECIES_ODDISH}, - {13, 13, SPECIES_MINUN}, - {13, 13, SPECIES_GULPIN}, - {12, 12, SPECIES_WINGULL}, - {12, 12, SPECIES_WINGULL}, - {12, 12, SPECIES_PLUSLE}, - {13, 13, SPECIES_PLUSLE}, -}; - -const struct WildPokemonInfo gRoute110_LandMonsInfo = {20, gRoute110_LandMons}; - -const struct WildPokemon gRoute110_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute110_WaterMonsInfo = {4, gRoute110_WaterMons}; - -const struct WildPokemon gRoute110_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_WAILMER}, - {20, 25, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute110_FishingMonsInfo = {30, gRoute110_FishingMons}; - -const struct WildPokemon gRoute111_LandMons[] = -{ - {20, 20, SPECIES_SANDSHREW}, - {20, 20, SPECIES_TRAPINCH}, - {21, 21, SPECIES_SANDSHREW}, - {21, 21, SPECIES_TRAPINCH}, - {19, 19, SPECIES_BALTOY}, - {21, 21, SPECIES_BALTOY}, - {19, 19, SPECIES_SANDSHREW}, - {19, 19, SPECIES_TRAPINCH}, - {20, 20, SPECIES_BALTOY}, - {20, 20, SPECIES_CACNEA}, - {22, 22, SPECIES_CACNEA}, - {22, 22, SPECIES_CACNEA}, -}; - -const struct WildPokemonInfo gRoute111_LandMonsInfo = {10, gRoute111_LandMons}; - -const struct WildPokemon gRoute111_WaterMons[] = -{ - {20, 30, SPECIES_MARILL}, - {10, 20, SPECIES_MARILL}, - {30, 35, SPECIES_MARILL}, - {5, 10, SPECIES_MARILL}, - {20, 30, SPECIES_GOLDEEN}, -}; - -const struct WildPokemonInfo gRoute111_WaterMonsInfo = {4, gRoute111_WaterMons}; - -const struct WildPokemon gRoute111_RockSmashMons[] = -{ - {10, 15, SPECIES_GEODUDE}, - {5, 10, SPECIES_GEODUDE}, - {15, 20, SPECIES_GEODUDE}, - {15, 20, SPECIES_GEODUDE}, - {15, 20, SPECIES_GEODUDE}, -}; - -const struct WildPokemonInfo gRoute111_RockSmashMonsInfo = {20, gRoute111_RockSmashMons}; - -const struct WildPokemon gRoute111_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_GOLDEEN}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_GOLDEEN}, - {10, 30, SPECIES_BARBOACH}, - {25, 30, SPECIES_BARBOACH}, - {30, 35, SPECIES_BARBOACH}, - {20, 25, SPECIES_BARBOACH}, - {35, 40, SPECIES_BARBOACH}, - {40, 45, SPECIES_BARBOACH}, -}; - -const struct WildPokemonInfo gRoute111_FishingMonsInfo = {30, gRoute111_FishingMons}; - -const struct WildPokemon gRoute112_LandMons[] = -{ - {15, 15, SPECIES_NUMEL}, - {15, 15, SPECIES_NUMEL}, - {15, 15, SPECIES_MARILL}, - {14, 14, SPECIES_NUMEL}, - {14, 14, SPECIES_NUMEL}, - {14, 14, SPECIES_MARILL}, - {16, 16, SPECIES_NUMEL}, - {16, 16, SPECIES_MARILL}, - {16, 16, SPECIES_NUMEL}, - {16, 16, SPECIES_NUMEL}, - {16, 16, SPECIES_NUMEL}, - {16, 16, SPECIES_NUMEL}, -}; - -const struct WildPokemonInfo gRoute112_LandMonsInfo = {20, gRoute112_LandMons}; - -const struct WildPokemon gRoute113_LandMons[] = -{ - {15, 15, SPECIES_SPINDA}, - {15, 15, SPECIES_SPINDA}, - {15, 15, SPECIES_SLUGMA}, - {14, 14, SPECIES_SPINDA}, - {14, 14, SPECIES_SPINDA}, - {14, 14, SPECIES_SLUGMA}, - {16, 16, SPECIES_SPINDA}, - {16, 16, SPECIES_SLUGMA}, - {16, 16, SPECIES_SPINDA}, - {16, 16, SPECIES_SKARMORY}, - {16, 16, SPECIES_SPINDA}, - {16, 16, SPECIES_SKARMORY}, -}; - -const struct WildPokemonInfo gRoute113_LandMonsInfo = {20, gRoute113_LandMons}; - -const struct WildPokemon gRoute114_LandMons[] = -{ - {16, 16, SPECIES_SWABLU}, - {16, 16, SPECIES_LOTAD}, - {17, 17, SPECIES_SWABLU}, - {15, 15, SPECIES_SWABLU}, - {15, 15, SPECIES_LOTAD}, - {16, 16, SPECIES_LOMBRE}, - {16, 16, SPECIES_LOMBRE}, - {18, 18, SPECIES_LOMBRE}, - {17, 17, SPECIES_SEVIPER}, - {15, 15, SPECIES_SEVIPER}, - {17, 17, SPECIES_SEVIPER}, - {15, 15, SPECIES_NUZLEAF}, -}; - -const struct WildPokemonInfo gRoute114_LandMonsInfo = {20, gRoute114_LandMons}; - -const struct WildPokemon gRoute114_WaterMons[] = -{ - {20, 30, SPECIES_MARILL}, - {10, 20, SPECIES_MARILL}, - {30, 35, SPECIES_MARILL}, - {5, 10, SPECIES_MARILL}, - {20, 30, SPECIES_GOLDEEN}, -}; - -const struct WildPokemonInfo gRoute114_WaterMonsInfo = {4, gRoute114_WaterMons}; - -const struct WildPokemon gRoute114_RockSmashMons[] = -{ - {10, 15, SPECIES_GEODUDE}, - {5, 10, SPECIES_GEODUDE}, - {15, 20, SPECIES_GEODUDE}, - {15, 20, SPECIES_GEODUDE}, - {15, 20, SPECIES_GEODUDE}, -}; - -const struct WildPokemonInfo gRoute114_RockSmashMonsInfo = {20, gRoute114_RockSmashMons}; - -const struct WildPokemon gRoute114_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_GOLDEEN}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_GOLDEEN}, - {10, 30, SPECIES_BARBOACH}, - {25, 30, SPECIES_BARBOACH}, - {30, 35, SPECIES_BARBOACH}, - {20, 25, SPECIES_BARBOACH}, - {35, 40, SPECIES_BARBOACH}, - {40, 45, SPECIES_BARBOACH}, -}; - -const struct WildPokemonInfo gRoute114_FishingMonsInfo = {30, gRoute114_FishingMons}; - -const struct WildPokemon gRoute116_LandMons[] = -{ - {6, 6, SPECIES_POOCHYENA}, - {6, 6, SPECIES_WHISMUR}, - {6, 6, SPECIES_NINCADA}, - {7, 7, SPECIES_ABRA}, - {7, 7, SPECIES_NINCADA}, - {6, 6, SPECIES_TAILLOW}, - {7, 7, SPECIES_TAILLOW}, - {8, 8, SPECIES_TAILLOW}, - {7, 7, SPECIES_POOCHYENA}, - {8, 8, SPECIES_POOCHYENA}, - {7, 7, SPECIES_SKITTY}, - {8, 8, SPECIES_SKITTY}, -}; - -const struct WildPokemonInfo gRoute116_LandMonsInfo = {20, gRoute116_LandMons}; - -const struct WildPokemon gRoute117_LandMons[] = -{ - {13, 13, SPECIES_POOCHYENA}, - {13, 13, SPECIES_ODDISH}, - {14, 14, SPECIES_POOCHYENA}, - {14, 14, SPECIES_ODDISH}, - {13, 13, SPECIES_MARILL}, - {13, 13, SPECIES_ODDISH}, - {13, 13, SPECIES_ILLUMISE}, - {13, 13, SPECIES_ILLUMISE}, - {14, 14, SPECIES_ILLUMISE}, - {14, 14, SPECIES_ILLUMISE}, - {13, 13, SPECIES_VOLBEAT}, - {13, 13, SPECIES_SEEDOT}, -}; - -const struct WildPokemonInfo gRoute117_LandMonsInfo = {20, gRoute117_LandMons}; - -const struct WildPokemon gRoute117_WaterMons[] = -{ - {20, 30, SPECIES_MARILL}, - {10, 20, SPECIES_MARILL}, - {30, 35, SPECIES_MARILL}, - {5, 10, SPECIES_MARILL}, - {20, 30, SPECIES_GOLDEEN}, -}; - -const struct WildPokemonInfo gRoute117_WaterMonsInfo = {4, gRoute117_WaterMons}; - -const struct WildPokemon gRoute117_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_GOLDEEN}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_GOLDEEN}, - {10, 30, SPECIES_CORPHISH}, - {25, 30, SPECIES_CORPHISH}, - {30, 35, SPECIES_CORPHISH}, - {20, 25, SPECIES_CORPHISH}, - {35, 40, SPECIES_CORPHISH}, - {40, 45, SPECIES_CORPHISH}, -}; - -const struct WildPokemonInfo gRoute117_FishingMonsInfo = {30, gRoute117_FishingMons}; - -const struct WildPokemon gRoute118_LandMons[] = -{ - {24, 24, SPECIES_ZIGZAGOON}, - {24, 24, SPECIES_ELECTRIKE}, - {26, 26, SPECIES_ZIGZAGOON}, - {26, 26, SPECIES_ELECTRIKE}, - {26, 26, SPECIES_LINOONE}, - {26, 26, SPECIES_MANECTRIC}, - {25, 25, SPECIES_WINGULL}, - {25, 25, SPECIES_WINGULL}, - {26, 26, SPECIES_WINGULL}, - {26, 26, SPECIES_WINGULL}, - {27, 27, SPECIES_WINGULL}, - {25, 25, SPECIES_KECLEON}, -}; - -const struct WildPokemonInfo gRoute118_LandMonsInfo = {20, gRoute118_LandMons}; - -const struct WildPokemon gRoute118_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute118_WaterMonsInfo = {4, gRoute118_WaterMons}; - -const struct WildPokemon gRoute118_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_CARVANHA}, - {30, 35, SPECIES_SHARPEDO}, - {30, 35, SPECIES_CARVANHA}, - {20, 25, SPECIES_CARVANHA}, - {35, 40, SPECIES_CARVANHA}, - {40, 45, SPECIES_CARVANHA}, -}; - -const struct WildPokemonInfo gRoute118_FishingMonsInfo = {30, gRoute118_FishingMons}; - -const struct WildPokemon gRoute124_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute124_WaterMonsInfo = {4, gRoute124_WaterMons}; - -const struct WildPokemon gRoute124_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_SHARPEDO}, - {30, 35, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute124_FishingMonsInfo = {30, gRoute124_FishingMons}; - -const struct WildPokemon gPetalburgWoods_LandMons[] = -{ - {5, 5, SPECIES_POOCHYENA}, - {5, 5, SPECIES_WURMPLE}, - {5, 5, SPECIES_SHROOMISH}, - {6, 6, SPECIES_POOCHYENA}, - {5, 5, SPECIES_SILCOON}, - {5, 5, SPECIES_CASCOON}, - {6, 6, SPECIES_WURMPLE}, - {6, 6, SPECIES_SHROOMISH}, - {5, 5, SPECIES_TAILLOW}, - {5, 5, SPECIES_SLAKOTH}, - {6, 6, SPECIES_TAILLOW}, - {6, 6, SPECIES_SLAKOTH}, -}; - -const struct WildPokemonInfo gPetalburgWoods_LandMonsInfo = {20, gPetalburgWoods_LandMons}; - -const struct WildPokemon gRusturfTunnel_LandMons[] = -{ - {6, 6, SPECIES_WHISMUR}, - {7, 7, SPECIES_WHISMUR}, - {6, 6, SPECIES_WHISMUR}, - {6, 6, SPECIES_WHISMUR}, - {7, 7, SPECIES_WHISMUR}, - {7, 7, SPECIES_WHISMUR}, - {5, 5, SPECIES_WHISMUR}, - {8, 8, SPECIES_WHISMUR}, - {5, 5, SPECIES_WHISMUR}, - {8, 8, SPECIES_WHISMUR}, - {5, 5, SPECIES_WHISMUR}, - {8, 8, SPECIES_WHISMUR}, -}; - -const struct WildPokemonInfo gRusturfTunnel_LandMonsInfo = {10, gRusturfTunnel_LandMons}; - -const struct WildPokemon gGraniteCave_1F_LandMons[] = -{ - {7, 7, SPECIES_ZUBAT}, - {8, 8, SPECIES_MAKUHITA}, - {7, 7, SPECIES_MAKUHITA}, - {8, 8, SPECIES_ZUBAT}, - {9, 9, SPECIES_MAKUHITA}, - {8, 8, SPECIES_ABRA}, - {10, 10, SPECIES_MAKUHITA}, - {6, 6, SPECIES_MAKUHITA}, - {7, 7, SPECIES_GEODUDE}, - {8, 8, SPECIES_GEODUDE}, - {6, 6, SPECIES_GEODUDE}, - {9, 9, SPECIES_GEODUDE}, -}; - -const struct WildPokemonInfo gGraniteCave_1F_LandMonsInfo = {10, gGraniteCave_1F_LandMons}; - -const struct WildPokemon gGraniteCave_B1F_LandMons[] = -{ - {9, 9, SPECIES_ZUBAT}, - {10, 10, SPECIES_ARON}, - {9, 9, SPECIES_ARON}, - {11, 11, SPECIES_ARON}, - {10, 10, SPECIES_ZUBAT}, - {9, 9, SPECIES_ABRA}, - {10, 10, SPECIES_MAKUHITA}, - {11, 11, SPECIES_MAKUHITA}, - {10, 10, SPECIES_SABLEYE}, - {10, 10, SPECIES_SABLEYE}, - {9, 9, SPECIES_SABLEYE}, - {11, 11, SPECIES_SABLEYE}, -}; - -const struct WildPokemonInfo gGraniteCave_B1F_LandMonsInfo = {10, gGraniteCave_B1F_LandMons}; - -const struct WildPokemon gMtPyre_1F_LandMons[] = -{ - {27, 27, SPECIES_SHUPPET}, - {28, 28, SPECIES_SHUPPET}, - {26, 26, SPECIES_SHUPPET}, - {25, 25, SPECIES_SHUPPET}, - {29, 29, SPECIES_SHUPPET}, - {24, 24, SPECIES_SHUPPET}, - {23, 23, SPECIES_SHUPPET}, - {22, 22, SPECIES_SHUPPET}, - {29, 29, SPECIES_SHUPPET}, - {24, 24, SPECIES_SHUPPET}, - {29, 29, SPECIES_SHUPPET}, - {24, 24, SPECIES_SHUPPET}, -}; - -const struct WildPokemonInfo gMtPyre_1F_LandMonsInfo = {10, gMtPyre_1F_LandMons}; - -const struct WildPokemon gVictoryRoad_1F_LandMons[] = -{ - {40, 40, SPECIES_GOLBAT}, - {40, 40, SPECIES_HARIYAMA}, - {40, 40, SPECIES_LAIRON}, - {40, 40, SPECIES_LOUDRED}, - {36, 36, SPECIES_ZUBAT}, - {36, 36, SPECIES_MAKUHITA}, - {38, 38, SPECIES_GOLBAT}, - {38, 38, SPECIES_HARIYAMA}, - {36, 36, SPECIES_ARON}, - {36, 36, SPECIES_WHISMUR}, - {36, 36, SPECIES_ARON}, - {36, 36, SPECIES_WHISMUR}, -}; - -const struct WildPokemonInfo gVictoryRoad_1F_LandMonsInfo = {10, gVictoryRoad_1F_LandMons}; - -const struct WildPokemon gSafariZone_South_LandMons[] = -{ - {25, 25, SPECIES_ODDISH}, - {27, 27, SPECIES_ODDISH}, - {25, 25, SPECIES_GIRAFARIG}, - {27, 27, SPECIES_GIRAFARIG}, - {25, 25, SPECIES_NATU}, - {25, 25, SPECIES_DODUO}, - {25, 25, SPECIES_GLOOM}, - {27, 27, SPECIES_WOBBUFFET}, - {25, 25, SPECIES_PIKACHU}, - {27, 27, SPECIES_WOBBUFFET}, - {27, 27, SPECIES_PIKACHU}, - {29, 29, SPECIES_WOBBUFFET}, -}; - -const struct WildPokemonInfo gSafariZone_South_LandMonsInfo = {25, gSafariZone_South_LandMons}; - -const struct WildPokemon gUnderwater2_WaterMons[] = -{ - {20, 30, SPECIES_CLAMPERL}, - {20, 30, SPECIES_CHINCHOU}, - {30, 35, SPECIES_CLAMPERL}, - {30, 35, SPECIES_RELICANTH}, - {30, 35, SPECIES_RELICANTH}, -}; - -const struct WildPokemonInfo gUnderwater2_WaterMonsInfo = {4, gUnderwater2_WaterMons}; - -const struct WildPokemon gAbandonedShip_Rooms_B1F_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {5, 35, SPECIES_TENTACOOL}, - {5, 35, SPECIES_TENTACOOL}, - {5, 35, SPECIES_TENTACOOL}, - {30, 35, SPECIES_TENTACRUEL}, -}; - -const struct WildPokemonInfo gAbandonedShip_Rooms_B1F_WaterMonsInfo = {4, gAbandonedShip_Rooms_B1F_WaterMons}; - -const struct WildPokemon gAbandonedShip_Rooms_B1F_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_TENTACOOL}, - {25, 30, SPECIES_TENTACOOL}, - {30, 35, SPECIES_TENTACOOL}, - {30, 35, SPECIES_TENTACRUEL}, - {25, 30, SPECIES_TENTACRUEL}, - {20, 25, SPECIES_TENTACRUEL}, -}; - -const struct WildPokemonInfo gAbandonedShip_Rooms_B1F_FishingMonsInfo = {20, gAbandonedShip_Rooms_B1F_FishingMons}; - -const struct WildPokemon gGraniteCave_B2F_LandMons[] = -{ - {10, 10, SPECIES_ZUBAT}, - {11, 11, SPECIES_ARON}, - {10, 10, SPECIES_ARON}, - {11, 11, SPECIES_ZUBAT}, - {12, 12, SPECIES_ARON}, - {10, 10, SPECIES_ABRA}, - {10, 10, SPECIES_SABLEYE}, - {11, 11, SPECIES_SABLEYE}, - {12, 12, SPECIES_SABLEYE}, - {10, 10, SPECIES_SABLEYE}, - {12, 12, SPECIES_SABLEYE}, - {10, 10, SPECIES_SABLEYE}, -}; - -const struct WildPokemonInfo gGraniteCave_B2F_LandMonsInfo = {10, gGraniteCave_B2F_LandMons}; - -const struct WildPokemon gGraniteCave_B2F_RockSmashMons[] = -{ - {10, 15, SPECIES_GEODUDE}, - {10, 20, SPECIES_NOSEPASS}, - {5, 10, SPECIES_GEODUDE}, - {15, 20, SPECIES_GEODUDE}, - {15, 20, SPECIES_GEODUDE}, -}; - -const struct WildPokemonInfo gGraniteCave_B2F_RockSmashMonsInfo = {20, gGraniteCave_B2F_RockSmashMons}; - -const struct WildPokemon gFieryPath_LandMons[] = -{ - {15, 15, SPECIES_NUMEL}, - {15, 15, SPECIES_KOFFING}, - {16, 16, SPECIES_NUMEL}, - {15, 15, SPECIES_MACHOP}, - {15, 15, SPECIES_TORKOAL}, - {15, 15, SPECIES_SLUGMA}, - {16, 16, SPECIES_KOFFING}, - {16, 16, SPECIES_MACHOP}, - {14, 14, SPECIES_TORKOAL}, - {16, 16, SPECIES_TORKOAL}, - {14, 14, SPECIES_GRIMER}, - {14, 14, SPECIES_GRIMER}, -}; - -const struct WildPokemonInfo gFieryPath_LandMonsInfo = {10, gFieryPath_LandMons}; - -const struct WildPokemon gMeteorFalls_B1F_2R_LandMons[] = -{ - {33, 33, SPECIES_GOLBAT}, - {35, 35, SPECIES_GOLBAT}, - {30, 30, SPECIES_BAGON}, - {35, 35, SPECIES_SOLROCK}, - {35, 35, SPECIES_BAGON}, - {37, 37, SPECIES_SOLROCK}, - {25, 25, SPECIES_BAGON}, - {39, 39, SPECIES_SOLROCK}, - {38, 38, SPECIES_GOLBAT}, - {40, 40, SPECIES_GOLBAT}, - {38, 38, SPECIES_GOLBAT}, - {40, 40, SPECIES_GOLBAT}, -}; - -const struct WildPokemonInfo gMeteorFalls_B1F_2R_LandMonsInfo = {10, gMeteorFalls_B1F_2R_LandMons}; - -const struct WildPokemon gMeteorFalls_B1F_2R_WaterMons[] = -{ - {30, 35, SPECIES_GOLBAT}, - {30, 35, SPECIES_GOLBAT}, - {25, 35, SPECIES_SOLROCK}, - {15, 25, SPECIES_SOLROCK}, - {5, 15, SPECIES_SOLROCK}, -}; - -const struct WildPokemonInfo gMeteorFalls_B1F_2R_WaterMonsInfo = {4, gMeteorFalls_B1F_2R_WaterMons}; - -const struct WildPokemon gMeteorFalls_B1F_2R_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_GOLDEEN}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_GOLDEEN}, - {10, 30, SPECIES_BARBOACH}, - {25, 30, SPECIES_BARBOACH}, - {30, 35, SPECIES_BARBOACH}, - {30, 35, SPECIES_WHISCASH}, - {35, 40, SPECIES_WHISCASH}, - {40, 45, SPECIES_WHISCASH}, -}; - -const struct WildPokemonInfo gMeteorFalls_B1F_2R_FishingMonsInfo = {30, gMeteorFalls_B1F_2R_FishingMons}; - -const struct WildPokemon gJaggedPass_LandMons[] = -{ - {21, 21, SPECIES_NUMEL}, - {21, 21, SPECIES_NUMEL}, - {21, 21, SPECIES_MACHOP}, - {20, 20, SPECIES_NUMEL}, - {20, 20, SPECIES_SPOINK}, - {20, 20, SPECIES_MACHOP}, - {21, 21, SPECIES_SPOINK}, - {22, 22, SPECIES_MACHOP}, - {22, 22, SPECIES_NUMEL}, - {22, 22, SPECIES_SPOINK}, - {22, 22, SPECIES_NUMEL}, - {22, 22, SPECIES_SPOINK}, -}; - -const struct WildPokemonInfo gJaggedPass_LandMonsInfo = {20, gJaggedPass_LandMons}; - -const struct WildPokemon gRoute106_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute106_WaterMonsInfo = {4, gRoute106_WaterMons}; - -const struct WildPokemon gRoute106_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_WAILMER}, - {20, 25, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute106_FishingMonsInfo = {30, gRoute106_FishingMons}; - -const struct WildPokemon gRoute107_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute107_WaterMonsInfo = {4, gRoute107_WaterMons}; - -const struct WildPokemon gRoute107_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_WAILMER}, - {20, 25, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute107_FishingMonsInfo = {30, gRoute107_FishingMons}; - -const struct WildPokemon gRoute108_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute108_WaterMonsInfo = {4, gRoute108_WaterMons}; - -const struct WildPokemon gRoute108_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_WAILMER}, - {20, 25, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute108_FishingMonsInfo = {30, gRoute108_FishingMons}; - -const struct WildPokemon gRoute109_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute109_WaterMonsInfo = {4, gRoute109_WaterMons}; - -const struct WildPokemon gRoute109_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_WAILMER}, - {20, 25, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute109_FishingMonsInfo = {30, gRoute109_FishingMons}; - -const struct WildPokemon gRoute115_LandMons[] = -{ - {23, 23, SPECIES_SWABLU}, - {23, 23, SPECIES_TAILLOW}, - {25, 25, SPECIES_SWABLU}, - {24, 24, SPECIES_TAILLOW}, - {25, 25, SPECIES_TAILLOW}, - {25, 25, SPECIES_SWELLOW}, - {24, 24, SPECIES_JIGGLYPUFF}, - {25, 25, SPECIES_JIGGLYPUFF}, - {24, 24, SPECIES_WINGULL}, - {24, 24, SPECIES_WINGULL}, - {26, 26, SPECIES_WINGULL}, - {25, 25, SPECIES_WINGULL}, -}; - -const struct WildPokemonInfo gRoute115_LandMonsInfo = {20, gRoute115_LandMons}; - -const struct WildPokemon gRoute115_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute115_WaterMonsInfo = {4, gRoute115_WaterMons}; - -const struct WildPokemon gRoute115_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_WAILMER}, - {20, 25, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute115_FishingMonsInfo = {30, gRoute115_FishingMons}; - -const struct WildPokemon gNewMauville_Inside_LandMons[] = -{ - {24, 24, SPECIES_VOLTORB}, - {24, 24, SPECIES_MAGNEMITE}, - {25, 25, SPECIES_VOLTORB}, - {25, 25, SPECIES_MAGNEMITE}, - {23, 23, SPECIES_VOLTORB}, - {23, 23, SPECIES_MAGNEMITE}, - {26, 26, SPECIES_VOLTORB}, - {26, 26, SPECIES_MAGNEMITE}, - {22, 22, SPECIES_VOLTORB}, - {22, 22, SPECIES_MAGNEMITE}, - {26, 26, SPECIES_ELECTRODE}, - {26, 26, SPECIES_MAGNETON}, -}; - -const struct WildPokemonInfo gNewMauville_Inside_LandMonsInfo = {10, gNewMauville_Inside_LandMons}; - -const struct WildPokemon gRoute119_LandMons[] = -{ - {25, 25, SPECIES_ZIGZAGOON}, - {25, 25, SPECIES_LINOONE}, - {27, 27, SPECIES_ZIGZAGOON}, - {25, 25, SPECIES_ODDISH}, - {27, 27, SPECIES_LINOONE}, - {26, 26, SPECIES_ODDISH}, - {27, 27, SPECIES_ODDISH}, - {24, 24, SPECIES_ODDISH}, - {25, 25, SPECIES_TROPIUS}, - {26, 26, SPECIES_TROPIUS}, - {27, 27, SPECIES_TROPIUS}, - {25, 25, SPECIES_KECLEON}, -}; - -const struct WildPokemonInfo gRoute119_LandMonsInfo = {15, gRoute119_LandMons}; - -const struct WildPokemon gRoute119_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute119_WaterMonsInfo = {4, gRoute119_WaterMons}; - -const struct WildPokemon gRoute119_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_CARVANHA}, - {25, 30, SPECIES_CARVANHA}, - {30, 35, SPECIES_CARVANHA}, - {20, 25, SPECIES_CARVANHA}, - {35, 40, SPECIES_CARVANHA}, - {40, 45, SPECIES_CARVANHA}, -}; - -const struct WildPokemonInfo gRoute119_FishingMonsInfo = {30, gRoute119_FishingMons}; - -const struct WildPokemon gRoute120_LandMons[] = -{ - {25, 25, SPECIES_POOCHYENA}, - {25, 25, SPECIES_MIGHTYENA}, - {27, 27, SPECIES_MIGHTYENA}, - {25, 25, SPECIES_ODDISH}, - {25, 25, SPECIES_MARILL}, - {26, 26, SPECIES_ODDISH}, - {27, 27, SPECIES_ODDISH}, - {27, 27, SPECIES_MARILL}, - {25, 25, SPECIES_ABSOL}, - {27, 27, SPECIES_ABSOL}, - {25, 25, SPECIES_KECLEON}, - {25, 25, SPECIES_SEEDOT}, -}; - -const struct WildPokemonInfo gRoute120_LandMonsInfo = {20, gRoute120_LandMons}; - -const struct WildPokemon gRoute120_WaterMons[] = -{ - {20, 30, SPECIES_MARILL}, - {10, 20, SPECIES_MARILL}, - {30, 35, SPECIES_MARILL}, - {5, 10, SPECIES_MARILL}, - {20, 30, SPECIES_GOLDEEN}, -}; - -const struct WildPokemonInfo gRoute120_WaterMonsInfo = {4, gRoute120_WaterMons}; - -const struct WildPokemon gRoute120_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_GOLDEEN}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_GOLDEEN}, - {10, 30, SPECIES_BARBOACH}, - {25, 30, SPECIES_BARBOACH}, - {30, 35, SPECIES_BARBOACH}, - {20, 25, SPECIES_BARBOACH}, - {35, 40, SPECIES_BARBOACH}, - {40, 45, SPECIES_BARBOACH}, -}; - -const struct WildPokemonInfo gRoute120_FishingMonsInfo = {30, gRoute120_FishingMons}; - -const struct WildPokemon gRoute121_LandMons[] = -{ - {26, 26, SPECIES_POOCHYENA}, - {26, 26, SPECIES_SHUPPET}, - {26, 26, SPECIES_MIGHTYENA}, - {28, 28, SPECIES_SHUPPET}, - {28, 28, SPECIES_MIGHTYENA}, - {26, 26, SPECIES_ODDISH}, - {28, 28, SPECIES_ODDISH}, - {28, 28, SPECIES_GLOOM}, - {26, 26, SPECIES_WINGULL}, - {27, 27, SPECIES_WINGULL}, - {28, 28, SPECIES_WINGULL}, - {25, 25, SPECIES_KECLEON}, -}; - -const struct WildPokemonInfo gRoute121_LandMonsInfo = {20, gRoute121_LandMons}; - -const struct WildPokemon gRoute121_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute121_WaterMonsInfo = {4, gRoute121_WaterMons}; - -const struct WildPokemon gRoute121_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_WAILMER}, - {20, 25, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute121_FishingMonsInfo = {30, gRoute121_FishingMons}; - -const struct WildPokemon gRoute122_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute122_WaterMonsInfo = {4, gRoute122_WaterMons}; - -const struct WildPokemon gRoute122_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_SHARPEDO}, - {30, 35, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute122_FishingMonsInfo = {30, gRoute122_FishingMons}; - -const struct WildPokemon gRoute123_LandMons[] = -{ - {26, 26, SPECIES_POOCHYENA}, - {26, 26, SPECIES_SHUPPET}, - {26, 26, SPECIES_MIGHTYENA}, - {28, 28, SPECIES_SHUPPET}, - {28, 28, SPECIES_MIGHTYENA}, - {26, 26, SPECIES_ODDISH}, - {28, 28, SPECIES_ODDISH}, - {28, 28, SPECIES_GLOOM}, - {26, 26, SPECIES_WINGULL}, - {27, 27, SPECIES_WINGULL}, - {28, 28, SPECIES_WINGULL}, - {25, 25, SPECIES_KECLEON}, -}; - -const struct WildPokemonInfo gRoute123_LandMonsInfo = {20, gRoute123_LandMons}; - -const struct WildPokemon gRoute123_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute123_WaterMonsInfo = {4, gRoute123_WaterMons}; - -const struct WildPokemon gRoute123_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_WAILMER}, - {20, 25, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute123_FishingMonsInfo = {30, gRoute123_FishingMons}; - -const struct WildPokemon gMtPyre_2F_LandMons[] = -{ - {27, 27, SPECIES_SHUPPET}, - {28, 28, SPECIES_SHUPPET}, - {26, 26, SPECIES_SHUPPET}, - {25, 25, SPECIES_SHUPPET}, - {29, 29, SPECIES_SHUPPET}, - {24, 24, SPECIES_SHUPPET}, - {23, 23, SPECIES_SHUPPET}, - {22, 22, SPECIES_SHUPPET}, - {29, 29, SPECIES_SHUPPET}, - {24, 24, SPECIES_SHUPPET}, - {29, 29, SPECIES_SHUPPET}, - {24, 24, SPECIES_SHUPPET}, -}; - -const struct WildPokemonInfo gMtPyre_2F_LandMonsInfo = {10, gMtPyre_2F_LandMons}; - -const struct WildPokemon gMtPyre_3F_LandMons[] = -{ - {27, 27, SPECIES_SHUPPET}, - {28, 28, SPECIES_SHUPPET}, - {26, 26, SPECIES_SHUPPET}, - {25, 25, SPECIES_SHUPPET}, - {29, 29, SPECIES_SHUPPET}, - {24, 24, SPECIES_SHUPPET}, - {23, 23, SPECIES_SHUPPET}, - {22, 22, SPECIES_SHUPPET}, - {29, 29, SPECIES_SHUPPET}, - {24, 24, SPECIES_SHUPPET}, - {29, 29, SPECIES_SHUPPET}, - {24, 24, SPECIES_SHUPPET}, -}; - -const struct WildPokemonInfo gMtPyre_3F_LandMonsInfo = {10, gMtPyre_3F_LandMons}; - -const struct WildPokemon gMtPyre_4F_LandMons[] = -{ - {27, 27, SPECIES_SHUPPET}, - {28, 28, SPECIES_SHUPPET}, - {26, 26, SPECIES_SHUPPET}, - {25, 25, SPECIES_SHUPPET}, - {29, 29, SPECIES_SHUPPET}, - {24, 24, SPECIES_SHUPPET}, - {23, 23, SPECIES_SHUPPET}, - {22, 22, SPECIES_SHUPPET}, - {27, 27, SPECIES_DUSKULL}, - {27, 27, SPECIES_DUSKULL}, - {25, 25, SPECIES_DUSKULL}, - {29, 29, SPECIES_DUSKULL}, -}; - -const struct WildPokemonInfo gMtPyre_4F_LandMonsInfo = {10, gMtPyre_4F_LandMons}; - -const struct WildPokemon gMtPyre_5F_LandMons[] = -{ - {27, 27, SPECIES_SHUPPET}, - {28, 28, SPECIES_SHUPPET}, - {26, 26, SPECIES_SHUPPET}, - {25, 25, SPECIES_SHUPPET}, - {29, 29, SPECIES_SHUPPET}, - {24, 24, SPECIES_SHUPPET}, - {23, 23, SPECIES_SHUPPET}, - {22, 22, SPECIES_SHUPPET}, - {27, 27, SPECIES_DUSKULL}, - {27, 27, SPECIES_DUSKULL}, - {25, 25, SPECIES_DUSKULL}, - {29, 29, SPECIES_DUSKULL}, -}; - -const struct WildPokemonInfo gMtPyre_5F_LandMonsInfo = {10, gMtPyre_5F_LandMons}; - -const struct WildPokemon gMtPyre_6F_LandMons[] = -{ - {27, 27, SPECIES_SHUPPET}, - {28, 28, SPECIES_SHUPPET}, - {26, 26, SPECIES_SHUPPET}, - {25, 25, SPECIES_SHUPPET}, - {29, 29, SPECIES_SHUPPET}, - {24, 24, SPECIES_SHUPPET}, - {23, 23, SPECIES_SHUPPET}, - {22, 22, SPECIES_SHUPPET}, - {27, 27, SPECIES_DUSKULL}, - {27, 27, SPECIES_DUSKULL}, - {25, 25, SPECIES_DUSKULL}, - {29, 29, SPECIES_DUSKULL}, -}; - -const struct WildPokemonInfo gMtPyre_6F_LandMonsInfo = {10, gMtPyre_6F_LandMons}; - -const struct WildPokemon gMtPyre_Exterior_LandMons[] = -{ - {27, 27, SPECIES_SHUPPET}, - {27, 27, SPECIES_SHUPPET}, - {28, 28, SPECIES_SHUPPET}, - {29, 29, SPECIES_SHUPPET}, - {29, 29, SPECIES_VULPIX}, - {27, 27, SPECIES_VULPIX}, - {29, 29, SPECIES_VULPIX}, - {25, 25, SPECIES_VULPIX}, - {27, 27, SPECIES_WINGULL}, - {27, 27, SPECIES_WINGULL}, - {26, 26, SPECIES_WINGULL}, - {28, 28, SPECIES_WINGULL}, -}; - -const struct WildPokemonInfo gMtPyre_Exterior_LandMonsInfo = {10, gMtPyre_Exterior_LandMons}; - -const struct WildPokemon gMtPyre_Summit_LandMons[] = -{ - {28, 28, SPECIES_SHUPPET}, - {29, 29, SPECIES_SHUPPET}, - {27, 27, SPECIES_SHUPPET}, - {26, 26, SPECIES_SHUPPET}, - {30, 30, SPECIES_SHUPPET}, - {25, 25, SPECIES_SHUPPET}, - {24, 24, SPECIES_SHUPPET}, - {28, 28, SPECIES_DUSKULL}, - {26, 26, SPECIES_DUSKULL}, - {30, 30, SPECIES_DUSKULL}, - {28, 28, SPECIES_CHIMECHO}, - {28, 28, SPECIES_CHIMECHO}, -}; - -const struct WildPokemonInfo gMtPyre_Summit_LandMonsInfo = {10, gMtPyre_Summit_LandMons}; - -const struct WildPokemon gGraniteCave_StevensRoom_LandMons[] = -{ - {7, 7, SPECIES_ZUBAT}, - {8, 8, SPECIES_MAKUHITA}, - {7, 7, SPECIES_MAKUHITA}, - {8, 8, SPECIES_ZUBAT}, - {9, 9, SPECIES_MAKUHITA}, - {8, 8, SPECIES_ABRA}, - {10, 10, SPECIES_MAKUHITA}, - {6, 6, SPECIES_MAKUHITA}, - {7, 7, SPECIES_ARON}, - {8, 8, SPECIES_ARON}, - {7, 7, SPECIES_ARON}, - {8, 8, SPECIES_ARON}, -}; - -const struct WildPokemonInfo gGraniteCave_StevensRoom_LandMonsInfo = {10, gGraniteCave_StevensRoom_LandMons}; - -const struct WildPokemon gRoute125_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute125_WaterMonsInfo = {4, gRoute125_WaterMons}; - -const struct WildPokemon gRoute125_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_SHARPEDO}, - {30, 35, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute125_FishingMonsInfo = {30, gRoute125_FishingMons}; - -const struct WildPokemon gRoute126_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute126_WaterMonsInfo = {4, gRoute126_WaterMons}; - -const struct WildPokemon gRoute126_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_SHARPEDO}, - {30, 35, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute126_FishingMonsInfo = {30, gRoute126_FishingMons}; - -const struct WildPokemon gRoute127_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute127_WaterMonsInfo = {4, gRoute127_WaterMons}; - -const struct WildPokemon gRoute127_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_SHARPEDO}, - {30, 35, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute127_FishingMonsInfo = {30, gRoute127_FishingMons}; - -const struct WildPokemon gRoute128_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute128_WaterMonsInfo = {4, gRoute128_WaterMons}; - -const struct WildPokemon gRoute128_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_LUVDISC}, - {10, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_LUVDISC}, - {30, 35, SPECIES_WAILMER}, - {30, 35, SPECIES_CORSOLA}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute128_FishingMonsInfo = {30, gRoute128_FishingMons}; - -const struct WildPokemon gRoute129_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_WAILORD}, -}; - -const struct WildPokemonInfo gRoute129_WaterMonsInfo = {4, gRoute129_WaterMons}; - -const struct WildPokemon gRoute129_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_SHARPEDO}, - {30, 35, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute129_FishingMonsInfo = {30, gRoute129_FishingMons}; - -const struct WildPokemon gRoute130_LandMons[] = -{ - {30, 30, SPECIES_WYNAUT}, - {35, 35, SPECIES_WYNAUT}, - {25, 25, SPECIES_WYNAUT}, - {40, 40, SPECIES_WYNAUT}, - {20, 20, SPECIES_WYNAUT}, - {45, 45, SPECIES_WYNAUT}, - {15, 15, SPECIES_WYNAUT}, - {50, 50, SPECIES_WYNAUT}, - {10, 10, SPECIES_WYNAUT}, - {5, 5, SPECIES_WYNAUT}, - {10, 10, SPECIES_WYNAUT}, - {5, 5, SPECIES_WYNAUT}, -}; - -const struct WildPokemonInfo gRoute130_LandMonsInfo = {20, gRoute130_LandMons}; - -const struct WildPokemon gRoute130_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute130_WaterMonsInfo = {4, gRoute130_WaterMons}; - -const struct WildPokemon gRoute130_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_SHARPEDO}, - {30, 35, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute130_FishingMonsInfo = {30, gRoute130_FishingMons}; - -const struct WildPokemon gRoute131_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute131_WaterMonsInfo = {4, gRoute131_WaterMons}; - -const struct WildPokemon gRoute131_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_SHARPEDO}, - {30, 35, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute131_FishingMonsInfo = {30, gRoute131_FishingMons}; - -const struct WildPokemon gRoute132_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute132_WaterMonsInfo = {4, gRoute132_WaterMons}; - -const struct WildPokemon gRoute132_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_SHARPEDO}, - {30, 35, SPECIES_WAILMER}, - {25, 30, SPECIES_HORSEA}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute132_FishingMonsInfo = {30, gRoute132_FishingMons}; - -const struct WildPokemon gRoute133_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute133_WaterMonsInfo = {4, gRoute133_WaterMons}; - -const struct WildPokemon gRoute133_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_SHARPEDO}, - {30, 35, SPECIES_WAILMER}, - {25, 30, SPECIES_HORSEA}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute133_FishingMonsInfo = {30, gRoute133_FishingMons}; - -const struct WildPokemon gRoute134_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gRoute134_WaterMonsInfo = {4, gRoute134_WaterMons}; - -const struct WildPokemon gRoute134_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_SHARPEDO}, - {30, 35, SPECIES_WAILMER}, - {25, 30, SPECIES_HORSEA}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gRoute134_FishingMonsInfo = {30, gRoute134_FishingMons}; - -const struct WildPokemon gAbandonedShip_HiddenFloorCorridors_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {5, 35, SPECIES_TENTACOOL}, - {5, 35, SPECIES_TENTACOOL}, - {5, 35, SPECIES_TENTACOOL}, - {30, 35, SPECIES_TENTACRUEL}, -}; - -const struct WildPokemonInfo gAbandonedShip_HiddenFloorCorridors_WaterMonsInfo = {4, gAbandonedShip_HiddenFloorCorridors_WaterMons}; - -const struct WildPokemon gAbandonedShip_HiddenFloorCorridors_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_TENTACOOL}, - {25, 30, SPECIES_TENTACOOL}, - {30, 35, SPECIES_TENTACOOL}, - {30, 35, SPECIES_TENTACRUEL}, - {25, 30, SPECIES_TENTACRUEL}, - {20, 25, SPECIES_TENTACRUEL}, -}; - -const struct WildPokemonInfo gAbandonedShip_HiddenFloorCorridors_FishingMonsInfo = {20, gAbandonedShip_HiddenFloorCorridors_FishingMons}; - -const struct WildPokemon gSeafloorCavern_Room1_LandMons[] = -{ - {30, 30, SPECIES_ZUBAT}, - {31, 31, SPECIES_ZUBAT}, - {32, 32, SPECIES_ZUBAT}, - {33, 33, SPECIES_ZUBAT}, - {28, 28, SPECIES_ZUBAT}, - {29, 29, SPECIES_ZUBAT}, - {34, 34, SPECIES_ZUBAT}, - {35, 35, SPECIES_ZUBAT}, - {34, 34, SPECIES_GOLBAT}, - {35, 35, SPECIES_GOLBAT}, - {33, 33, SPECIES_GOLBAT}, - {36, 36, SPECIES_GOLBAT}, -}; - -const struct WildPokemonInfo gSeafloorCavern_Room1_LandMonsInfo = {4, gSeafloorCavern_Room1_LandMons}; - -const struct WildPokemon gSeafloorCavern_Room2_LandMons[] = -{ - {30, 30, SPECIES_ZUBAT}, - {31, 31, SPECIES_ZUBAT}, - {32, 32, SPECIES_ZUBAT}, - {33, 33, SPECIES_ZUBAT}, - {28, 28, SPECIES_ZUBAT}, - {29, 29, SPECIES_ZUBAT}, - {34, 34, SPECIES_ZUBAT}, - {35, 35, SPECIES_ZUBAT}, - {34, 34, SPECIES_GOLBAT}, - {35, 35, SPECIES_GOLBAT}, - {33, 33, SPECIES_GOLBAT}, - {36, 36, SPECIES_GOLBAT}, -}; - -const struct WildPokemonInfo gSeafloorCavern_Room2_LandMonsInfo = {4, gSeafloorCavern_Room2_LandMons}; - -const struct WildPokemon gSeafloorCavern_Room3_LandMons[] = -{ - {30, 30, SPECIES_ZUBAT}, - {31, 31, SPECIES_ZUBAT}, - {32, 32, SPECIES_ZUBAT}, - {33, 33, SPECIES_ZUBAT}, - {28, 28, SPECIES_ZUBAT}, - {29, 29, SPECIES_ZUBAT}, - {34, 34, SPECIES_ZUBAT}, - {35, 35, SPECIES_ZUBAT}, - {34, 34, SPECIES_GOLBAT}, - {35, 35, SPECIES_GOLBAT}, - {33, 33, SPECIES_GOLBAT}, - {36, 36, SPECIES_GOLBAT}, -}; - -const struct WildPokemonInfo gSeafloorCavern_Room3_LandMonsInfo = {4, gSeafloorCavern_Room3_LandMons}; - -const struct WildPokemon gSeafloorCavern_Room4_LandMons[] = -{ - {30, 30, SPECIES_ZUBAT}, - {31, 31, SPECIES_ZUBAT}, - {32, 32, SPECIES_ZUBAT}, - {33, 33, SPECIES_ZUBAT}, - {28, 28, SPECIES_ZUBAT}, - {29, 29, SPECIES_ZUBAT}, - {34, 34, SPECIES_ZUBAT}, - {35, 35, SPECIES_ZUBAT}, - {34, 34, SPECIES_GOLBAT}, - {35, 35, SPECIES_GOLBAT}, - {33, 33, SPECIES_GOLBAT}, - {36, 36, SPECIES_GOLBAT}, -}; - -const struct WildPokemonInfo gSeafloorCavern_Room4_LandMonsInfo = {4, gSeafloorCavern_Room4_LandMons}; - -const struct WildPokemon gSeafloorCavern_Room5_LandMons[] = -{ - {30, 30, SPECIES_ZUBAT}, - {31, 31, SPECIES_ZUBAT}, - {32, 32, SPECIES_ZUBAT}, - {33, 33, SPECIES_ZUBAT}, - {28, 28, SPECIES_ZUBAT}, - {29, 29, SPECIES_ZUBAT}, - {34, 34, SPECIES_ZUBAT}, - {35, 35, SPECIES_ZUBAT}, - {34, 34, SPECIES_GOLBAT}, - {35, 35, SPECIES_GOLBAT}, - {33, 33, SPECIES_GOLBAT}, - {36, 36, SPECIES_GOLBAT}, -}; - -const struct WildPokemonInfo gSeafloorCavern_Room5_LandMonsInfo = {4, gSeafloorCavern_Room5_LandMons}; - -const struct WildPokemon gSeafloorCavern_Room6_LandMons[] = -{ - {30, 30, SPECIES_ZUBAT}, - {31, 31, SPECIES_ZUBAT}, - {32, 32, SPECIES_ZUBAT}, - {33, 33, SPECIES_ZUBAT}, - {28, 28, SPECIES_ZUBAT}, - {29, 29, SPECIES_ZUBAT}, - {34, 34, SPECIES_ZUBAT}, - {35, 35, SPECIES_ZUBAT}, - {34, 34, SPECIES_GOLBAT}, - {35, 35, SPECIES_GOLBAT}, - {33, 33, SPECIES_GOLBAT}, - {36, 36, SPECIES_GOLBAT}, -}; - -const struct WildPokemonInfo gSeafloorCavern_Room6_LandMonsInfo = {4, gSeafloorCavern_Room6_LandMons}; - -const struct WildPokemon gSeafloorCavern_Room6_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {5, 35, SPECIES_ZUBAT}, - {30, 35, SPECIES_ZUBAT}, - {30, 35, SPECIES_GOLBAT}, - {30, 35, SPECIES_GOLBAT}, -}; - -const struct WildPokemonInfo gSeafloorCavern_Room6_WaterMonsInfo = {4, gSeafloorCavern_Room6_WaterMons}; - -const struct WildPokemon gSeafloorCavern_Room6_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_WAILMER}, - {20, 25, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gSeafloorCavern_Room6_FishingMonsInfo = {10, gSeafloorCavern_Room6_FishingMons}; - -const struct WildPokemon gSeafloorCavern_Room7_LandMons[] = -{ - {30, 30, SPECIES_ZUBAT}, - {31, 31, SPECIES_ZUBAT}, - {32, 32, SPECIES_ZUBAT}, - {33, 33, SPECIES_ZUBAT}, - {28, 28, SPECIES_ZUBAT}, - {29, 29, SPECIES_ZUBAT}, - {34, 34, SPECIES_ZUBAT}, - {35, 35, SPECIES_ZUBAT}, - {34, 34, SPECIES_GOLBAT}, - {35, 35, SPECIES_GOLBAT}, - {33, 33, SPECIES_GOLBAT}, - {36, 36, SPECIES_GOLBAT}, -}; - -const struct WildPokemonInfo gSeafloorCavern_Room7_LandMonsInfo = {4, gSeafloorCavern_Room7_LandMons}; - -const struct WildPokemon gSeafloorCavern_Room7_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {5, 35, SPECIES_ZUBAT}, - {30, 35, SPECIES_ZUBAT}, - {30, 35, SPECIES_GOLBAT}, - {30, 35, SPECIES_GOLBAT}, -}; - -const struct WildPokemonInfo gSeafloorCavern_Room7_WaterMonsInfo = {4, gSeafloorCavern_Room7_WaterMons}; - -const struct WildPokemon gSeafloorCavern_Room7_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_WAILMER}, - {20, 25, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gSeafloorCavern_Room7_FishingMonsInfo = {10, gSeafloorCavern_Room7_FishingMons}; - -const struct WildPokemon gSeafloorCavern_Room8_LandMons[] = -{ - {30, 30, SPECIES_ZUBAT}, - {31, 31, SPECIES_ZUBAT}, - {32, 32, SPECIES_ZUBAT}, - {33, 33, SPECIES_ZUBAT}, - {28, 28, SPECIES_ZUBAT}, - {29, 29, SPECIES_ZUBAT}, - {34, 34, SPECIES_ZUBAT}, - {35, 35, SPECIES_ZUBAT}, - {34, 34, SPECIES_GOLBAT}, - {35, 35, SPECIES_GOLBAT}, - {33, 33, SPECIES_GOLBAT}, - {36, 36, SPECIES_GOLBAT}, -}; - -const struct WildPokemonInfo gSeafloorCavern_Room8_LandMonsInfo = {4, gSeafloorCavern_Room8_LandMons}; - -const struct WildPokemon gSeafloorCavern_Entrance_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {5, 35, SPECIES_ZUBAT}, - {30, 35, SPECIES_ZUBAT}, - {30, 35, SPECIES_GOLBAT}, - {30, 35, SPECIES_GOLBAT}, -}; - -const struct WildPokemonInfo gSeafloorCavern_Entrance_WaterMonsInfo = {4, gSeafloorCavern_Entrance_WaterMons}; - -const struct WildPokemon gSeafloorCavern_Entrance_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_WAILMER}, - {20, 25, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gSeafloorCavern_Entrance_FishingMonsInfo = {10, gSeafloorCavern_Entrance_FishingMons}; - -const struct WildPokemon gCaveOfOrigin_Entrance_LandMons[] = -{ - {30, 30, SPECIES_ZUBAT}, - {31, 31, SPECIES_ZUBAT}, - {32, 32, SPECIES_ZUBAT}, - {33, 33, SPECIES_ZUBAT}, - {28, 28, SPECIES_ZUBAT}, - {29, 29, SPECIES_ZUBAT}, - {34, 34, SPECIES_ZUBAT}, - {35, 35, SPECIES_ZUBAT}, - {34, 34, SPECIES_GOLBAT}, - {35, 35, SPECIES_GOLBAT}, - {33, 33, SPECIES_GOLBAT}, - {36, 36, SPECIES_GOLBAT}, -}; - -const struct WildPokemonInfo gCaveOfOrigin_Entrance_LandMonsInfo = {4, gCaveOfOrigin_Entrance_LandMons}; - -const struct WildPokemon gCaveOfOrigin_1F_LandMons[] = -{ - {30, 30, SPECIES_ZUBAT}, - {31, 31, SPECIES_ZUBAT}, - {32, 32, SPECIES_ZUBAT}, - {30, 30, SPECIES_SABLEYE}, - {32, 32, SPECIES_SABLEYE}, - {34, 34, SPECIES_SABLEYE}, - {33, 33, SPECIES_ZUBAT}, - {34, 34, SPECIES_ZUBAT}, - {34, 34, SPECIES_GOLBAT}, - {35, 35, SPECIES_GOLBAT}, - {33, 33, SPECIES_GOLBAT}, - {36, 36, SPECIES_GOLBAT}, -}; - -const struct WildPokemonInfo gCaveOfOrigin_1F_LandMonsInfo = {4, gCaveOfOrigin_1F_LandMons}; - -const struct WildPokemon gCaveOfOrigin_UnusedRubySapphireMap1_LandMons[] = -{ - {30, 30, SPECIES_ZUBAT}, - {31, 31, SPECIES_ZUBAT}, - {32, 32, SPECIES_ZUBAT}, - {30, 30, SPECIES_SABLEYE}, - {32, 32, SPECIES_SABLEYE}, - {34, 34, SPECIES_SABLEYE}, - {33, 33, SPECIES_ZUBAT}, - {34, 34, SPECIES_ZUBAT}, - {34, 34, SPECIES_GOLBAT}, - {35, 35, SPECIES_GOLBAT}, - {33, 33, SPECIES_GOLBAT}, - {36, 36, SPECIES_GOLBAT}, -}; - -const struct WildPokemonInfo gCaveOfOrigin_UnusedRubySapphireMap1_LandMonsInfo = {4, gCaveOfOrigin_UnusedRubySapphireMap1_LandMons}; - -const struct WildPokemon gCaveOfOrigin_UnusedRubySapphireMap2_LandMons[] = -{ - {30, 30, SPECIES_ZUBAT}, - {31, 31, SPECIES_ZUBAT}, - {32, 32, SPECIES_ZUBAT}, - {30, 30, SPECIES_SABLEYE}, - {32, 32, SPECIES_SABLEYE}, - {34, 34, SPECIES_SABLEYE}, - {33, 33, SPECIES_ZUBAT}, - {34, 34, SPECIES_ZUBAT}, - {34, 34, SPECIES_GOLBAT}, - {35, 35, SPECIES_GOLBAT}, - {33, 33, SPECIES_GOLBAT}, - {36, 36, SPECIES_GOLBAT}, -}; - -const struct WildPokemonInfo gCaveOfOrigin_UnusedRubySapphireMap2_LandMonsInfo = {4, gCaveOfOrigin_UnusedRubySapphireMap2_LandMons}; - -const struct WildPokemon gCaveOfOrigin_UnusedRubySapphireMap3_LandMons[] = -{ - {30, 30, SPECIES_ZUBAT}, - {31, 31, SPECIES_ZUBAT}, - {32, 32, SPECIES_ZUBAT}, - {30, 30, SPECIES_SABLEYE}, - {32, 32, SPECIES_SABLEYE}, - {34, 34, SPECIES_SABLEYE}, - {33, 33, SPECIES_ZUBAT}, - {34, 34, SPECIES_ZUBAT}, - {34, 34, SPECIES_GOLBAT}, - {35, 35, SPECIES_GOLBAT}, - {33, 33, SPECIES_GOLBAT}, - {36, 36, SPECIES_GOLBAT}, -}; - -const struct WildPokemonInfo gCaveOfOrigin_UnusedRubySapphireMap3_LandMonsInfo = {4, gCaveOfOrigin_UnusedRubySapphireMap3_LandMons}; - -const struct WildPokemon gNewMauville_Entrance_LandMons[] = -{ - {24, 24, SPECIES_VOLTORB}, - {24, 24, SPECIES_MAGNEMITE}, - {25, 25, SPECIES_VOLTORB}, - {25, 25, SPECIES_MAGNEMITE}, - {23, 23, SPECIES_VOLTORB}, - {23, 23, SPECIES_MAGNEMITE}, - {26, 26, SPECIES_VOLTORB}, - {26, 26, SPECIES_MAGNEMITE}, - {22, 22, SPECIES_VOLTORB}, - {22, 22, SPECIES_MAGNEMITE}, - {22, 22, SPECIES_VOLTORB}, - {22, 22, SPECIES_MAGNEMITE}, -}; - -const struct WildPokemonInfo gNewMauville_Entrance_LandMonsInfo = {10, gNewMauville_Entrance_LandMons}; - -const struct WildPokemon gSafariZone_Southwest_LandMons[] = -{ - {25, 25, SPECIES_ODDISH}, - {27, 27, SPECIES_ODDISH}, - {25, 25, SPECIES_GIRAFARIG}, - {27, 27, SPECIES_GIRAFARIG}, - {25, 25, SPECIES_NATU}, - {27, 27, SPECIES_DODUO}, - {25, 25, SPECIES_GLOOM}, - {27, 27, SPECIES_WOBBUFFET}, - {25, 25, SPECIES_PIKACHU}, - {27, 27, SPECIES_WOBBUFFET}, - {27, 27, SPECIES_PIKACHU}, - {29, 29, SPECIES_WOBBUFFET}, -}; - -const struct WildPokemonInfo gSafariZone_Southwest_LandMonsInfo = {25, gSafariZone_Southwest_LandMons}; - -const struct WildPokemon gSafariZone_Southwest_WaterMons[] = -{ - {20, 30, SPECIES_PSYDUCK}, - {20, 30, SPECIES_PSYDUCK}, - {30, 35, SPECIES_PSYDUCK}, - {30, 35, SPECIES_PSYDUCK}, - {30, 35, SPECIES_PSYDUCK}, -}; - -const struct WildPokemonInfo gSafariZone_Southwest_WaterMonsInfo = {9, gSafariZone_Southwest_WaterMons}; - -const struct WildPokemon gSafariZone_Southwest_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_GOLDEEN}, - {10, 30, SPECIES_MAGIKARP}, - {10, 25, SPECIES_GOLDEEN}, - {10, 30, SPECIES_GOLDEEN}, - {25, 30, SPECIES_GOLDEEN}, - {30, 35, SPECIES_GOLDEEN}, - {30, 35, SPECIES_SEAKING}, - {35, 40, SPECIES_SEAKING}, - {25, 30, SPECIES_SEAKING}, -}; - -const struct WildPokemonInfo gSafariZone_Southwest_FishingMonsInfo = {35, gSafariZone_Southwest_FishingMons}; - -const struct WildPokemon gSafariZone_North_LandMons[] = -{ - {27, 27, SPECIES_PHANPY}, - {27, 27, SPECIES_ODDISH}, - {29, 29, SPECIES_PHANPY}, - {29, 29, SPECIES_ODDISH}, - {27, 27, SPECIES_NATU}, - {29, 29, SPECIES_GLOOM}, - {31, 31, SPECIES_GLOOM}, - {29, 29, SPECIES_NATU}, - {29, 29, SPECIES_XATU}, - {27, 27, SPECIES_HERACROSS}, - {31, 31, SPECIES_XATU}, - {29, 29, SPECIES_HERACROSS}, -}; - -const struct WildPokemonInfo gSafariZone_North_LandMonsInfo = {25, gSafariZone_North_LandMons}; - -const struct WildPokemon gSafariZone_North_RockSmashMons[] = -{ - {10, 15, SPECIES_GEODUDE}, - {5, 10, SPECIES_GEODUDE}, - {15, 20, SPECIES_GEODUDE}, - {20, 25, SPECIES_GEODUDE}, - {25, 30, SPECIES_GEODUDE}, -}; - -const struct WildPokemonInfo gSafariZone_North_RockSmashMonsInfo = {25, gSafariZone_North_RockSmashMons}; - -const struct WildPokemon gSafariZone_Northwest_LandMons[] = -{ - {27, 27, SPECIES_RHYHORN}, - {27, 27, SPECIES_ODDISH}, - {29, 29, SPECIES_RHYHORN}, - {29, 29, SPECIES_ODDISH}, - {27, 27, SPECIES_DODUO}, - {29, 29, SPECIES_GLOOM}, - {31, 31, SPECIES_GLOOM}, - {29, 29, SPECIES_DODUO}, - {29, 29, SPECIES_DODRIO}, - {27, 27, SPECIES_PINSIR}, - {31, 31, SPECIES_DODRIO}, - {29, 29, SPECIES_PINSIR}, -}; - -const struct WildPokemonInfo gSafariZone_Northwest_LandMonsInfo = {25, gSafariZone_Northwest_LandMons}; - -const struct WildPokemon gSafariZone_Northwest_WaterMons[] = -{ - {20, 30, SPECIES_PSYDUCK}, - {20, 30, SPECIES_PSYDUCK}, - {30, 35, SPECIES_PSYDUCK}, - {30, 35, SPECIES_GOLDUCK}, - {25, 40, SPECIES_GOLDUCK}, -}; - -const struct WildPokemonInfo gSafariZone_Northwest_WaterMonsInfo = {9, gSafariZone_Northwest_WaterMons}; - -const struct WildPokemon gSafariZone_Northwest_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_GOLDEEN}, - {10, 30, SPECIES_MAGIKARP}, - {10, 25, SPECIES_GOLDEEN}, - {10, 30, SPECIES_GOLDEEN}, - {25, 30, SPECIES_GOLDEEN}, - {30, 35, SPECIES_GOLDEEN}, - {30, 35, SPECIES_SEAKING}, - {35, 40, SPECIES_SEAKING}, - {25, 30, SPECIES_SEAKING}, -}; - -const struct WildPokemonInfo gSafariZone_Northwest_FishingMonsInfo = {35, gSafariZone_Northwest_FishingMons}; - -const struct WildPokemon gVictoryRoad_B1F_LandMons[] = -{ - {40, 40, SPECIES_GOLBAT}, - {40, 40, SPECIES_HARIYAMA}, - {40, 40, SPECIES_LAIRON}, - {40, 40, SPECIES_LAIRON}, - {38, 38, SPECIES_GOLBAT}, - {38, 38, SPECIES_HARIYAMA}, - {42, 42, SPECIES_GOLBAT}, - {42, 42, SPECIES_HARIYAMA}, - {42, 42, SPECIES_LAIRON}, - {38, 38, SPECIES_MAWILE}, - {42, 42, SPECIES_LAIRON}, - {38, 38, SPECIES_MAWILE}, -}; - -const struct WildPokemonInfo gVictoryRoad_B1F_LandMonsInfo = {10, gVictoryRoad_B1F_LandMons}; - -const struct WildPokemon gVictoryRoad_B1F_RockSmashMons[] = -{ - {30, 40, SPECIES_GRAVELER}, - {30, 40, SPECIES_GEODUDE}, - {35, 40, SPECIES_GRAVELER}, - {35, 40, SPECIES_GRAVELER}, - {35, 40, SPECIES_GRAVELER}, -}; - -const struct WildPokemonInfo gVictoryRoad_B1F_RockSmashMonsInfo = {20, gVictoryRoad_B1F_RockSmashMons}; - -const struct WildPokemon gVictoryRoad_B2F_LandMons[] = -{ - {40, 40, SPECIES_GOLBAT}, - {40, 40, SPECIES_SABLEYE}, - {40, 40, SPECIES_LAIRON}, - {40, 40, SPECIES_LAIRON}, - {42, 42, SPECIES_GOLBAT}, - {42, 42, SPECIES_SABLEYE}, - {44, 44, SPECIES_GOLBAT}, - {44, 44, SPECIES_SABLEYE}, - {42, 42, SPECIES_LAIRON}, - {42, 42, SPECIES_MAWILE}, - {44, 44, SPECIES_LAIRON}, - {44, 44, SPECIES_MAWILE}, -}; - -const struct WildPokemonInfo gVictoryRoad_B2F_LandMonsInfo = {10, gVictoryRoad_B2F_LandMons}; - -const struct WildPokemon gVictoryRoad_B2F_WaterMons[] = -{ - {30, 35, SPECIES_GOLBAT}, - {25, 30, SPECIES_GOLBAT}, - {35, 40, SPECIES_GOLBAT}, - {35, 40, SPECIES_GOLBAT}, - {35, 40, SPECIES_GOLBAT}, -}; - -const struct WildPokemonInfo gVictoryRoad_B2F_WaterMonsInfo = {4, gVictoryRoad_B2F_WaterMons}; - -const struct WildPokemon gVictoryRoad_B2F_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_GOLDEEN}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_GOLDEEN}, - {10, 30, SPECIES_BARBOACH}, - {25, 30, SPECIES_BARBOACH}, - {30, 35, SPECIES_BARBOACH}, - {30, 35, SPECIES_WHISCASH}, - {35, 40, SPECIES_WHISCASH}, - {40, 45, SPECIES_WHISCASH}, -}; - -const struct WildPokemonInfo gVictoryRoad_B2F_FishingMonsInfo = {30, gVictoryRoad_B2F_FishingMons}; - -const struct WildPokemon gMeteorFalls_1F_1R_LandMons[] = -{ - {16, 16, SPECIES_ZUBAT}, - {17, 17, SPECIES_ZUBAT}, - {18, 18, SPECIES_ZUBAT}, - {15, 15, SPECIES_ZUBAT}, - {14, 14, SPECIES_ZUBAT}, - {16, 16, SPECIES_SOLROCK}, - {18, 18, SPECIES_SOLROCK}, - {14, 14, SPECIES_SOLROCK}, - {19, 19, SPECIES_ZUBAT}, - {20, 20, SPECIES_ZUBAT}, - {19, 19, SPECIES_ZUBAT}, - {20, 20, SPECIES_ZUBAT}, -}; - -const struct WildPokemonInfo gMeteorFalls_1F_1R_LandMonsInfo = {10, gMeteorFalls_1F_1R_LandMons}; - -const struct WildPokemon gMeteorFalls_1F_1R_WaterMons[] = -{ - {5, 35, SPECIES_ZUBAT}, - {30, 35, SPECIES_ZUBAT}, - {25, 35, SPECIES_SOLROCK}, - {15, 25, SPECIES_SOLROCK}, - {5, 15, SPECIES_SOLROCK}, -}; - -const struct WildPokemonInfo gMeteorFalls_1F_1R_WaterMonsInfo = {4, gMeteorFalls_1F_1R_WaterMons}; - -const struct WildPokemon gMeteorFalls_1F_1R_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_GOLDEEN}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_GOLDEEN}, - {10, 30, SPECIES_BARBOACH}, - {25, 30, SPECIES_BARBOACH}, - {30, 35, SPECIES_BARBOACH}, - {20, 25, SPECIES_BARBOACH}, - {35, 40, SPECIES_BARBOACH}, - {40, 45, SPECIES_BARBOACH}, -}; - -const struct WildPokemonInfo gMeteorFalls_1F_1R_FishingMonsInfo = {30, gMeteorFalls_1F_1R_FishingMons}; - -const struct WildPokemon gMeteorFalls_1F_2R_LandMons[] = -{ - {33, 33, SPECIES_GOLBAT}, - {35, 35, SPECIES_GOLBAT}, - {33, 33, SPECIES_GOLBAT}, - {35, 35, SPECIES_SOLROCK}, - {33, 33, SPECIES_SOLROCK}, - {37, 37, SPECIES_SOLROCK}, - {35, 35, SPECIES_GOLBAT}, - {39, 39, SPECIES_SOLROCK}, - {38, 38, SPECIES_GOLBAT}, - {40, 40, SPECIES_GOLBAT}, - {38, 38, SPECIES_GOLBAT}, - {40, 40, SPECIES_GOLBAT}, -}; - -const struct WildPokemonInfo gMeteorFalls_1F_2R_LandMonsInfo = {10, gMeteorFalls_1F_2R_LandMons}; - -const struct WildPokemon gMeteorFalls_1F_2R_WaterMons[] = -{ - {30, 35, SPECIES_GOLBAT}, - {30, 35, SPECIES_GOLBAT}, - {25, 35, SPECIES_SOLROCK}, - {15, 25, SPECIES_SOLROCK}, - {5, 15, SPECIES_SOLROCK}, -}; - -const struct WildPokemonInfo gMeteorFalls_1F_2R_WaterMonsInfo = {4, gMeteorFalls_1F_2R_WaterMons}; - -const struct WildPokemon gMeteorFalls_1F_2R_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_GOLDEEN}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_GOLDEEN}, - {10, 30, SPECIES_BARBOACH}, - {25, 30, SPECIES_BARBOACH}, - {30, 35, SPECIES_BARBOACH}, - {30, 35, SPECIES_WHISCASH}, - {35, 40, SPECIES_WHISCASH}, - {40, 45, SPECIES_WHISCASH}, -}; - -const struct WildPokemonInfo gMeteorFalls_1F_2R_FishingMonsInfo = {30, gMeteorFalls_1F_2R_FishingMons}; - -const struct WildPokemon gMeteorFalls_B1F_1R_LandMons[] = -{ - {33, 33, SPECIES_GOLBAT}, - {35, 35, SPECIES_GOLBAT}, - {33, 33, SPECIES_GOLBAT}, - {35, 35, SPECIES_SOLROCK}, - {33, 33, SPECIES_SOLROCK}, - {37, 37, SPECIES_SOLROCK}, - {35, 35, SPECIES_GOLBAT}, - {39, 39, SPECIES_SOLROCK}, - {38, 38, SPECIES_GOLBAT}, - {40, 40, SPECIES_GOLBAT}, - {38, 38, SPECIES_GOLBAT}, - {40, 40, SPECIES_GOLBAT}, -}; - -const struct WildPokemonInfo gMeteorFalls_B1F_1R_LandMonsInfo = {10, gMeteorFalls_B1F_1R_LandMons}; - -const struct WildPokemon gMeteorFalls_B1F_1R_WaterMons[] = -{ - {30, 35, SPECIES_GOLBAT}, - {30, 35, SPECIES_GOLBAT}, - {25, 35, SPECIES_SOLROCK}, - {15, 25, SPECIES_SOLROCK}, - {5, 15, SPECIES_SOLROCK}, -}; - -const struct WildPokemonInfo gMeteorFalls_B1F_1R_WaterMonsInfo = {4, gMeteorFalls_B1F_1R_WaterMons}; - -const struct WildPokemon gMeteorFalls_B1F_1R_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_GOLDEEN}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_GOLDEEN}, - {10, 30, SPECIES_BARBOACH}, - {25, 30, SPECIES_BARBOACH}, - {30, 35, SPECIES_BARBOACH}, - {30, 35, SPECIES_WHISCASH}, - {35, 40, SPECIES_WHISCASH}, - {40, 45, SPECIES_WHISCASH}, -}; - -const struct WildPokemonInfo gMeteorFalls_B1F_1R_FishingMonsInfo = {30, gMeteorFalls_B1F_1R_FishingMons}; - -const struct WildPokemon gShoalCave_LowTideStairsRoom_LandMons[] = -{ - {26, 26, SPECIES_ZUBAT}, - {26, 26, SPECIES_SPHEAL}, - {28, 28, SPECIES_ZUBAT}, - {28, 28, SPECIES_SPHEAL}, - {30, 30, SPECIES_ZUBAT}, - {30, 30, SPECIES_SPHEAL}, - {32, 32, SPECIES_ZUBAT}, - {32, 32, SPECIES_SPHEAL}, - {32, 32, SPECIES_GOLBAT}, - {32, 32, SPECIES_SPHEAL}, - {32, 32, SPECIES_GOLBAT}, - {32, 32, SPECIES_SPHEAL}, -}; - -const struct WildPokemonInfo gShoalCave_LowTideStairsRoom_LandMonsInfo = {10, gShoalCave_LowTideStairsRoom_LandMons}; - -const struct WildPokemon gShoalCave_LowTideLowerRoom_LandMons[] = -{ - {26, 26, SPECIES_ZUBAT}, - {26, 26, SPECIES_SPHEAL}, - {28, 28, SPECIES_ZUBAT}, - {28, 28, SPECIES_SPHEAL}, - {30, 30, SPECIES_ZUBAT}, - {30, 30, SPECIES_SPHEAL}, - {32, 32, SPECIES_ZUBAT}, - {32, 32, SPECIES_SPHEAL}, - {32, 32, SPECIES_GOLBAT}, - {32, 32, SPECIES_SPHEAL}, - {32, 32, SPECIES_GOLBAT}, - {32, 32, SPECIES_SPHEAL}, -}; - -const struct WildPokemonInfo gShoalCave_LowTideLowerRoom_LandMonsInfo = {10, gShoalCave_LowTideLowerRoom_LandMons}; - -const struct WildPokemon gShoalCave_LowTideInnerRoom_LandMons[] = -{ - {26, 26, SPECIES_ZUBAT}, - {26, 26, SPECIES_SPHEAL}, - {28, 28, SPECIES_ZUBAT}, - {28, 28, SPECIES_SPHEAL}, - {30, 30, SPECIES_ZUBAT}, - {30, 30, SPECIES_SPHEAL}, - {32, 32, SPECIES_ZUBAT}, - {32, 32, SPECIES_SPHEAL}, - {32, 32, SPECIES_GOLBAT}, - {32, 32, SPECIES_SPHEAL}, - {32, 32, SPECIES_GOLBAT}, - {32, 32, SPECIES_SPHEAL}, -}; - -const struct WildPokemonInfo gShoalCave_LowTideInnerRoom_LandMonsInfo = {10, gShoalCave_LowTideInnerRoom_LandMons}; - -const struct WildPokemon gShoalCave_LowTideInnerRoom_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {5, 35, SPECIES_ZUBAT}, - {25, 30, SPECIES_SPHEAL}, - {25, 30, SPECIES_SPHEAL}, - {25, 35, SPECIES_SPHEAL}, -}; - -const struct WildPokemonInfo gShoalCave_LowTideInnerRoom_WaterMonsInfo = {4, gShoalCave_LowTideInnerRoom_WaterMons}; - -const struct WildPokemon gShoalCave_LowTideInnerRoom_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_WAILMER}, - {20, 25, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gShoalCave_LowTideInnerRoom_FishingMonsInfo = {10, gShoalCave_LowTideInnerRoom_FishingMons}; - -const struct WildPokemon gShoalCave_LowTideEntranceRoom_LandMons[] = -{ - {26, 26, SPECIES_ZUBAT}, - {26, 26, SPECIES_SPHEAL}, - {28, 28, SPECIES_ZUBAT}, - {28, 28, SPECIES_SPHEAL}, - {30, 30, SPECIES_ZUBAT}, - {30, 30, SPECIES_SPHEAL}, - {32, 32, SPECIES_ZUBAT}, - {32, 32, SPECIES_SPHEAL}, - {32, 32, SPECIES_GOLBAT}, - {32, 32, SPECIES_SPHEAL}, - {32, 32, SPECIES_GOLBAT}, - {32, 32, SPECIES_SPHEAL}, -}; - -const struct WildPokemonInfo gShoalCave_LowTideEntranceRoom_LandMonsInfo = {10, gShoalCave_LowTideEntranceRoom_LandMons}; - -const struct WildPokemon gShoalCave_LowTideEntranceRoom_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {5, 35, SPECIES_ZUBAT}, - {25, 30, SPECIES_SPHEAL}, - {25, 30, SPECIES_SPHEAL}, - {25, 35, SPECIES_SPHEAL}, -}; - -const struct WildPokemonInfo gShoalCave_LowTideEntranceRoom_WaterMonsInfo = {4, gShoalCave_LowTideEntranceRoom_WaterMons}; - -const struct WildPokemon gShoalCave_LowTideEntranceRoom_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_WAILMER}, - {20, 25, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gShoalCave_LowTideEntranceRoom_FishingMonsInfo = {10, gShoalCave_LowTideEntranceRoom_FishingMons}; - -const struct WildPokemon gLilycoveCity_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gLilycoveCity_WaterMonsInfo = {4, gLilycoveCity_WaterMons}; - -const struct WildPokemon gLilycoveCity_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_WAILMER}, - {25, 30, SPECIES_STARYU}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gLilycoveCity_FishingMonsInfo = {10, gLilycoveCity_FishingMons}; - -const struct WildPokemon gDewfordTown_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gDewfordTown_WaterMonsInfo = {4, gDewfordTown_WaterMons}; - -const struct WildPokemon gDewfordTown_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_WAILMER}, - {20, 25, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gDewfordTown_FishingMonsInfo = {10, gDewfordTown_FishingMons}; - -const struct WildPokemon gSlateportCity_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gSlateportCity_WaterMonsInfo = {4, gSlateportCity_WaterMons}; - -const struct WildPokemon gSlateportCity_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_WAILMER}, - {20, 25, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gSlateportCity_FishingMonsInfo = {10, gSlateportCity_FishingMons}; - -const struct WildPokemon gMossdeepCity_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gMossdeepCity_WaterMonsInfo = {4, gMossdeepCity_WaterMons}; - -const struct WildPokemon gMossdeepCity_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_SHARPEDO}, - {30, 35, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gMossdeepCity_FishingMonsInfo = {10, gMossdeepCity_FishingMons}; - -const struct WildPokemon gPacifidlogTown_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gPacifidlogTown_WaterMonsInfo = {4, gPacifidlogTown_WaterMons}; - -const struct WildPokemon gPacifidlogTown_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_SHARPEDO}, - {30, 35, SPECIES_WAILMER}, - {25, 30, SPECIES_WAILMER}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gPacifidlogTown_FishingMonsInfo = {10, gPacifidlogTown_FishingMons}; - -const struct WildPokemon gEverGrandeCity_WaterMons[] = -{ - {5, 35, SPECIES_TENTACOOL}, - {10, 30, SPECIES_WINGULL}, - {15, 25, SPECIES_WINGULL}, - {25, 30, SPECIES_PELIPPER}, - {25, 30, SPECIES_PELIPPER}, -}; - -const struct WildPokemonInfo gEverGrandeCity_WaterMonsInfo = {4, gEverGrandeCity_WaterMons}; - -const struct WildPokemon gEverGrandeCity_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_LUVDISC}, - {10, 30, SPECIES_WAILMER}, - {30, 35, SPECIES_LUVDISC}, - {30, 35, SPECIES_WAILMER}, - {30, 35, SPECIES_CORSOLA}, - {35, 40, SPECIES_WAILMER}, - {40, 45, SPECIES_WAILMER}, -}; - -const struct WildPokemonInfo gEverGrandeCity_FishingMonsInfo = {10, gEverGrandeCity_FishingMons}; - -const struct WildPokemon gPetalburgCity_WaterMons[] = -{ - {20, 30, SPECIES_MARILL}, - {10, 20, SPECIES_MARILL}, - {30, 35, SPECIES_MARILL}, - {5, 10, SPECIES_MARILL}, - {5, 10, SPECIES_MARILL}, -}; - -const struct WildPokemonInfo gPetalburgCity_WaterMonsInfo = {1, gPetalburgCity_WaterMons}; - -const struct WildPokemon gPetalburgCity_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_GOLDEEN}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_GOLDEEN}, - {10, 30, SPECIES_CORPHISH}, - {25, 30, SPECIES_CORPHISH}, - {30, 35, SPECIES_CORPHISH}, - {20, 25, SPECIES_CORPHISH}, - {35, 40, SPECIES_CORPHISH}, - {40, 45, SPECIES_CORPHISH}, -}; - -const struct WildPokemonInfo gPetalburgCity_FishingMonsInfo = {10, gPetalburgCity_FishingMons}; - -const struct WildPokemon gUnderwater1_WaterMons[] = -{ - {20, 30, SPECIES_CLAMPERL}, - {20, 30, SPECIES_CHINCHOU}, - {30, 35, SPECIES_CLAMPERL}, - {30, 35, SPECIES_RELICANTH}, - {30, 35, SPECIES_RELICANTH}, -}; - -const struct WildPokemonInfo gUnderwater1_WaterMonsInfo = {4, gUnderwater1_WaterMons}; - -const struct WildPokemon gShoalCave_LowTideIceRoom_LandMons[] = -{ - {26, 26, SPECIES_ZUBAT}, - {26, 26, SPECIES_SPHEAL}, - {28, 28, SPECIES_ZUBAT}, - {28, 28, SPECIES_SPHEAL}, - {30, 30, SPECIES_ZUBAT}, - {30, 30, SPECIES_SPHEAL}, - {26, 26, SPECIES_SNORUNT}, - {32, 32, SPECIES_SPHEAL}, - {30, 30, SPECIES_GOLBAT}, - {28, 28, SPECIES_SNORUNT}, - {32, 32, SPECIES_GOLBAT}, - {30, 30, SPECIES_SNORUNT}, -}; - -const struct WildPokemonInfo gShoalCave_LowTideIceRoom_LandMonsInfo = {10, gShoalCave_LowTideIceRoom_LandMons}; - -const struct WildPokemon gSkyPillar_1F_LandMons[] = -{ - {33, 33, SPECIES_SABLEYE}, - {34, 34, SPECIES_GOLBAT}, - {35, 35, SPECIES_GOLBAT}, - {34, 34, SPECIES_SABLEYE}, - {36, 36, SPECIES_CLAYDOL}, - {37, 37, SPECIES_BANETTE}, - {38, 38, SPECIES_BANETTE}, - {36, 36, SPECIES_CLAYDOL}, - {37, 37, SPECIES_CLAYDOL}, - {38, 38, SPECIES_CLAYDOL}, - {37, 37, SPECIES_CLAYDOL}, - {38, 38, SPECIES_CLAYDOL}, -}; - -const struct WildPokemonInfo gSkyPillar_1F_LandMonsInfo = {10, gSkyPillar_1F_LandMons}; - -const struct WildPokemon gSootopolisCity_WaterMons[] = -{ - {5, 35, SPECIES_MAGIKARP}, - {10, 30, SPECIES_MAGIKARP}, - {15, 25, SPECIES_MAGIKARP}, - {25, 30, SPECIES_MAGIKARP}, - {25, 30, SPECIES_MAGIKARP}, -}; - -const struct WildPokemonInfo gSootopolisCity_WaterMonsInfo = {1, gSootopolisCity_WaterMons}; - -const struct WildPokemon gSootopolisCity_FishingMons[] = -{ - {5, 10, SPECIES_MAGIKARP}, - {5, 10, SPECIES_TENTACOOL}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_MAGIKARP}, - {10, 30, SPECIES_MAGIKARP}, - {30, 35, SPECIES_MAGIKARP}, - {30, 35, SPECIES_MAGIKARP}, - {35, 40, SPECIES_GYARADOS}, - {35, 45, SPECIES_GYARADOS}, - {5, 45, SPECIES_GYARADOS}, -}; - -const struct WildPokemonInfo gSootopolisCity_FishingMonsInfo = {10, gSootopolisCity_FishingMons}; - -const struct WildPokemon gSkyPillar_3F_LandMons[] = -{ - {33, 33, SPECIES_SABLEYE}, - {34, 34, SPECIES_GOLBAT}, - {35, 35, SPECIES_GOLBAT}, - {34, 34, SPECIES_SABLEYE}, - {36, 36, SPECIES_CLAYDOL}, - {37, 37, SPECIES_BANETTE}, - {38, 38, SPECIES_BANETTE}, - {36, 36, SPECIES_CLAYDOL}, - {37, 37, SPECIES_CLAYDOL}, - {38, 38, SPECIES_CLAYDOL}, - {37, 37, SPECIES_CLAYDOL}, - {38, 38, SPECIES_CLAYDOL}, -}; - -const struct WildPokemonInfo gSkyPillar_3F_LandMonsInfo = {10, gSkyPillar_3F_LandMons}; - -const struct WildPokemon gSkyPillar_5F_LandMons[] = -{ - {33, 33, SPECIES_SABLEYE}, - {34, 34, SPECIES_GOLBAT}, - {35, 35, SPECIES_GOLBAT}, - {34, 34, SPECIES_SABLEYE}, - {36, 36, SPECIES_CLAYDOL}, - {37, 37, SPECIES_BANETTE}, - {38, 38, SPECIES_BANETTE}, - {36, 36, SPECIES_CLAYDOL}, - {37, 37, SPECIES_CLAYDOL}, - {38, 38, SPECIES_ALTARIA}, - {39, 39, SPECIES_ALTARIA}, - {39, 39, SPECIES_ALTARIA}, -}; - -const struct WildPokemonInfo gSkyPillar_5F_LandMonsInfo = {10, gSkyPillar_5F_LandMons}; - -const struct WildPokemon gSafariZone_Southeast_LandMons[] = -{ - {33, 33, SPECIES_SUNKERN}, - {34, 34, SPECIES_MAREEP}, - {35, 35, SPECIES_SUNKERN}, - {36, 36, SPECIES_MAREEP}, - {34, 34, SPECIES_AIPOM}, - {33, 33, SPECIES_SPINARAK}, - {35, 35, SPECIES_HOOTHOOT}, - {34, 34, SPECIES_SNUBBULL}, - {36, 36, SPECIES_STANTLER}, - {37, 37, SPECIES_GLIGAR}, - {39, 39, SPECIES_STANTLER}, - {40, 40, SPECIES_GLIGAR}, -}; - -const struct WildPokemonInfo gSafariZone_Southeast_LandMonsInfo = {25, gSafariZone_Southeast_LandMons}; - -const struct WildPokemon gSafariZone_Southeast_WaterMons[] = -{ - {25, 30, SPECIES_WOOPER}, - {25, 30, SPECIES_MARILL}, - {25, 30, SPECIES_MARILL}, - {30, 35, SPECIES_MARILL}, - {35, 40, SPECIES_QUAGSIRE}, -}; - -const struct WildPokemonInfo gSafariZone_Southeast_WaterMonsInfo = {9, gSafariZone_Southeast_WaterMons}; - -const struct WildPokemon gSafariZone_Southeast_FishingMons[] = -{ - {25, 30, SPECIES_MAGIKARP}, - {25, 30, SPECIES_GOLDEEN}, - {25, 30, SPECIES_MAGIKARP}, - {25, 30, SPECIES_GOLDEEN}, - {30, 35, SPECIES_REMORAID}, - {25, 30, SPECIES_GOLDEEN}, - {25, 30, SPECIES_REMORAID}, - {30, 35, SPECIES_REMORAID}, - {30, 35, SPECIES_REMORAID}, - {35, 40, SPECIES_OCTILLERY}, -}; - -const struct WildPokemonInfo gSafariZone_Southeast_FishingMonsInfo = {35, gSafariZone_Southeast_FishingMons}; - -const struct WildPokemon gSafariZone_Northeast_LandMons[] = -{ - {33, 33, SPECIES_AIPOM}, - {34, 34, SPECIES_TEDDIURSA}, - {35, 35, SPECIES_AIPOM}, - {36, 36, SPECIES_TEDDIURSA}, - {34, 34, SPECIES_SUNKERN}, - {33, 33, SPECIES_LEDYBA}, - {35, 35, SPECIES_HOOTHOOT}, - {34, 34, SPECIES_PINECO}, - {36, 36, SPECIES_HOUNDOUR}, - {37, 37, SPECIES_MILTANK}, - {39, 39, SPECIES_HOUNDOUR}, - {40, 40, SPECIES_MILTANK}, -}; - -const struct WildPokemonInfo gSafariZone_Northeast_LandMonsInfo = {25, gSafariZone_Northeast_LandMons}; - -const struct WildPokemon gSafariZone_Northeast_RockSmashMons[] = -{ - {25, 30, SPECIES_SHUCKLE}, - {20, 25, SPECIES_SHUCKLE}, - {30, 35, SPECIES_SHUCKLE}, - {30, 35, SPECIES_SHUCKLE}, - {35, 40, SPECIES_SHUCKLE}, -}; - -const struct WildPokemonInfo gSafariZone_Northeast_RockSmashMonsInfo = {25, gSafariZone_Northeast_RockSmashMons}; - -const struct WildPokemon gMagmaHideout_1F_LandMons[] = -{ - {27, 27, SPECIES_GEODUDE}, - {28, 28, SPECIES_TORKOAL}, - {28, 28, SPECIES_GEODUDE}, - {30, 30, SPECIES_TORKOAL}, - {29, 29, SPECIES_GEODUDE}, - {30, 30, SPECIES_GEODUDE}, - {30, 30, SPECIES_GEODUDE}, - {30, 30, SPECIES_GRAVELER}, - {30, 30, SPECIES_GRAVELER}, - {31, 31, SPECIES_GRAVELER}, - {32, 32, SPECIES_GRAVELER}, - {33, 33, SPECIES_GRAVELER}, -}; - -const struct WildPokemonInfo gMagmaHideout_1F_LandMonsInfo = {10, gMagmaHideout_1F_LandMons}; - -const struct WildPokemon gMagmaHideout_2F_1R_LandMons[] = -{ - {27, 27, SPECIES_GEODUDE}, - {28, 28, SPECIES_TORKOAL}, - {28, 28, SPECIES_GEODUDE}, - {30, 30, SPECIES_TORKOAL}, - {29, 29, SPECIES_GEODUDE}, - {30, 30, SPECIES_GEODUDE}, - {30, 30, SPECIES_GEODUDE}, - {30, 30, SPECIES_GRAVELER}, - {30, 30, SPECIES_GRAVELER}, - {31, 31, SPECIES_GRAVELER}, - {32, 32, SPECIES_GRAVELER}, - {33, 33, SPECIES_GRAVELER}, -}; - -const struct WildPokemonInfo gMagmaHideout_2F_1R_LandMonsInfo = {10, gMagmaHideout_2F_1R_LandMons}; - -const struct WildPokemon gMagmaHideout_2F_2R_LandMons[] = -{ - {27, 27, SPECIES_GEODUDE}, - {28, 28, SPECIES_TORKOAL}, - {28, 28, SPECIES_GEODUDE}, - {30, 30, SPECIES_TORKOAL}, - {29, 29, SPECIES_GEODUDE}, - {30, 30, SPECIES_GEODUDE}, - {30, 30, SPECIES_GEODUDE}, - {30, 30, SPECIES_GRAVELER}, - {30, 30, SPECIES_GRAVELER}, - {31, 31, SPECIES_GRAVELER}, - {32, 32, SPECIES_GRAVELER}, - {33, 33, SPECIES_GRAVELER}, -}; - -const struct WildPokemonInfo gMagmaHideout_2F_2R_LandMonsInfo = {10, gMagmaHideout_2F_2R_LandMons}; - -const struct WildPokemon gMagmaHideout_3F_1R_LandMons[] = -{ - {27, 27, SPECIES_GEODUDE}, - {28, 28, SPECIES_TORKOAL}, - {28, 28, SPECIES_GEODUDE}, - {30, 30, SPECIES_TORKOAL}, - {29, 29, SPECIES_GEODUDE}, - {30, 30, SPECIES_GEODUDE}, - {30, 30, SPECIES_GEODUDE}, - {30, 30, SPECIES_GRAVELER}, - {30, 30, SPECIES_GRAVELER}, - {31, 31, SPECIES_GRAVELER}, - {32, 32, SPECIES_GRAVELER}, - {33, 33, SPECIES_GRAVELER}, -}; - -const struct WildPokemonInfo gMagmaHideout_3F_1R_LandMonsInfo = {10, gMagmaHideout_3F_1R_LandMons}; - -const struct WildPokemon gMagmaHideout_3F_2R_LandMons[] = -{ - {27, 27, SPECIES_GEODUDE}, - {28, 28, SPECIES_TORKOAL}, - {28, 28, SPECIES_GEODUDE}, - {30, 30, SPECIES_TORKOAL}, - {29, 29, SPECIES_GEODUDE}, - {30, 30, SPECIES_GEODUDE}, - {30, 30, SPECIES_GEODUDE}, - {30, 30, SPECIES_GRAVELER}, - {30, 30, SPECIES_GRAVELER}, - {31, 31, SPECIES_GRAVELER}, - {32, 32, SPECIES_GRAVELER}, - {33, 33, SPECIES_GRAVELER}, -}; - -const struct WildPokemonInfo gMagmaHideout_3F_2R_LandMonsInfo = {10, gMagmaHideout_3F_2R_LandMons}; - -const struct WildPokemon gMagmaHideout_4F_LandMons[] = -{ - {27, 27, SPECIES_GEODUDE}, - {28, 28, SPECIES_TORKOAL}, - {28, 28, SPECIES_GEODUDE}, - {30, 30, SPECIES_TORKOAL}, - {29, 29, SPECIES_GEODUDE}, - {30, 30, SPECIES_GEODUDE}, - {30, 30, SPECIES_GEODUDE}, - {30, 30, SPECIES_GRAVELER}, - {30, 30, SPECIES_GRAVELER}, - {31, 31, SPECIES_GRAVELER}, - {32, 32, SPECIES_GRAVELER}, - {33, 33, SPECIES_GRAVELER}, -}; - -const struct WildPokemonInfo gMagmaHideout_4F_LandMonsInfo = {10, gMagmaHideout_4F_LandMons}; - -const struct WildPokemon gMagmaHideout_3F_3R_LandMons[] = -{ - {27, 27, SPECIES_GEODUDE}, - {28, 28, SPECIES_TORKOAL}, - {28, 28, SPECIES_GEODUDE}, - {30, 30, SPECIES_TORKOAL}, - {29, 29, SPECIES_GEODUDE}, - {30, 30, SPECIES_GEODUDE}, - {30, 30, SPECIES_GEODUDE}, - {30, 30, SPECIES_GRAVELER}, - {30, 30, SPECIES_GRAVELER}, - {31, 31, SPECIES_GRAVELER}, - {32, 32, SPECIES_GRAVELER}, - {33, 33, SPECIES_GRAVELER}, -}; - -const struct WildPokemonInfo gMagmaHideout_3F_3R_LandMonsInfo = {10, gMagmaHideout_3F_3R_LandMons}; - -const struct WildPokemon gMagmaHideout_2F_3R_LandMons[] = -{ - {27, 27, SPECIES_GEODUDE}, - {28, 28, SPECIES_TORKOAL}, - {28, 28, SPECIES_GEODUDE}, - {30, 30, SPECIES_TORKOAL}, - {29, 29, SPECIES_GEODUDE}, - {30, 30, SPECIES_GEODUDE}, - {30, 30, SPECIES_GEODUDE}, - {30, 30, SPECIES_GRAVELER}, - {30, 30, SPECIES_GRAVELER}, - {31, 31, SPECIES_GRAVELER}, - {32, 32, SPECIES_GRAVELER}, - {33, 33, SPECIES_GRAVELER}, -}; - -const struct WildPokemonInfo gMagmaHideout_2F_3R_LandMonsInfo = {10, gMagmaHideout_2F_3R_LandMons}; - -const struct WildPokemon gMirageTower_1F_LandMons[] = -{ - {21, 21, SPECIES_SANDSHREW}, - {21, 21, SPECIES_TRAPINCH}, - {20, 20, SPECIES_SANDSHREW}, - {20, 20, SPECIES_TRAPINCH}, - {20, 20, SPECIES_SANDSHREW}, - {20, 20, SPECIES_TRAPINCH}, - {22, 22, SPECIES_SANDSHREW}, - {22, 22, SPECIES_TRAPINCH}, - {23, 23, SPECIES_SANDSHREW}, - {23, 23, SPECIES_TRAPINCH}, - {24, 24, SPECIES_SANDSHREW}, - {24, 24, SPECIES_TRAPINCH}, -}; - -const struct WildPokemonInfo gMirageTower_1F_LandMonsInfo = {10, gMirageTower_1F_LandMons}; - -const struct WildPokemon gMirageTower_2F_LandMons[] = -{ - {21, 21, SPECIES_SANDSHREW}, - {21, 21, SPECIES_TRAPINCH}, - {20, 20, SPECIES_SANDSHREW}, - {20, 20, SPECIES_TRAPINCH}, - {20, 20, SPECIES_SANDSHREW}, - {20, 20, SPECIES_TRAPINCH}, - {22, 22, SPECIES_SANDSHREW}, - {22, 22, SPECIES_TRAPINCH}, - {23, 23, SPECIES_SANDSHREW}, - {23, 23, SPECIES_TRAPINCH}, - {24, 24, SPECIES_SANDSHREW}, - {24, 24, SPECIES_TRAPINCH}, -}; - -const struct WildPokemonInfo gMirageTower_2F_LandMonsInfo = {10, gMirageTower_2F_LandMons}; - -const struct WildPokemon gMirageTower_3F_LandMons[] = -{ - {21, 21, SPECIES_SANDSHREW}, - {21, 21, SPECIES_TRAPINCH}, - {20, 20, SPECIES_SANDSHREW}, - {20, 20, SPECIES_TRAPINCH}, - {20, 20, SPECIES_SANDSHREW}, - {20, 20, SPECIES_TRAPINCH}, - {22, 22, SPECIES_SANDSHREW}, - {22, 22, SPECIES_TRAPINCH}, - {23, 23, SPECIES_SANDSHREW}, - {23, 23, SPECIES_TRAPINCH}, - {24, 24, SPECIES_SANDSHREW}, - {24, 24, SPECIES_TRAPINCH}, -}; - -const struct WildPokemonInfo gMirageTower_3F_LandMonsInfo = {10, gMirageTower_3F_LandMons}; - -const struct WildPokemon gMirageTower_4F_LandMons[] = -{ - {21, 21, SPECIES_SANDSHREW}, - {21, 21, SPECIES_TRAPINCH}, - {20, 20, SPECIES_SANDSHREW}, - {20, 20, SPECIES_TRAPINCH}, - {20, 20, SPECIES_SANDSHREW}, - {20, 20, SPECIES_TRAPINCH}, - {22, 22, SPECIES_SANDSHREW}, - {22, 22, SPECIES_TRAPINCH}, - {23, 23, SPECIES_SANDSHREW}, - {23, 23, SPECIES_TRAPINCH}, - {24, 24, SPECIES_SANDSHREW}, - {24, 24, SPECIES_TRAPINCH}, -}; - -const struct WildPokemonInfo gMirageTower_4F_LandMonsInfo = {10, gMirageTower_4F_LandMons}; - -const struct WildPokemon gDesertUnderpass_LandMons[] = -{ - {38, 38, SPECIES_DITTO}, - {35, 35, SPECIES_WHISMUR}, - {40, 40, SPECIES_DITTO}, - {40, 40, SPECIES_LOUDRED}, - {41, 41, SPECIES_DITTO}, - {36, 36, SPECIES_WHISMUR}, - {38, 38, SPECIES_LOUDRED}, - {42, 42, SPECIES_DITTO}, - {38, 38, SPECIES_WHISMUR}, - {43, 43, SPECIES_DITTO}, - {44, 44, SPECIES_LOUDRED}, - {45, 45, SPECIES_DITTO}, -}; - -const struct WildPokemonInfo gDesertUnderpass_LandMonsInfo = {10, gDesertUnderpass_LandMons}; - -const struct WildPokemon gArtisanCave_B1F_LandMons[] = -{ - {40, 40, SPECIES_SMEARGLE}, - {41, 41, SPECIES_SMEARGLE}, - {42, 42, SPECIES_SMEARGLE}, - {43, 43, SPECIES_SMEARGLE}, - {44, 44, SPECIES_SMEARGLE}, - {45, 45, SPECIES_SMEARGLE}, - {46, 46, SPECIES_SMEARGLE}, - {47, 47, SPECIES_SMEARGLE}, - {48, 48, SPECIES_SMEARGLE}, - {49, 49, SPECIES_SMEARGLE}, - {50, 50, SPECIES_SMEARGLE}, - {50, 50, SPECIES_SMEARGLE}, -}; - -const struct WildPokemonInfo gArtisanCave_B1F_LandMonsInfo = {10, gArtisanCave_B1F_LandMons}; - -const struct WildPokemon gArtisanCave_1F_LandMons[] = -{ - {40, 40, SPECIES_SMEARGLE}, - {41, 41, SPECIES_SMEARGLE}, - {42, 42, SPECIES_SMEARGLE}, - {43, 43, SPECIES_SMEARGLE}, - {44, 44, SPECIES_SMEARGLE}, - {45, 45, SPECIES_SMEARGLE}, - {46, 46, SPECIES_SMEARGLE}, - {47, 47, SPECIES_SMEARGLE}, - {48, 48, SPECIES_SMEARGLE}, - {49, 49, SPECIES_SMEARGLE}, - {50, 50, SPECIES_SMEARGLE}, - {50, 50, SPECIES_SMEARGLE}, -}; - -const struct WildPokemonInfo gArtisanCave_1F_LandMonsInfo = {10, gArtisanCave_1F_LandMons}; - -const struct WildPokemon gAlteringCave1_LandMons[] = -{ - {10, 10, SPECIES_ZUBAT}, - {12, 12, SPECIES_ZUBAT}, - {8, 8, SPECIES_ZUBAT}, - {14, 14, SPECIES_ZUBAT}, - {10, 10, SPECIES_ZUBAT}, - {12, 12, SPECIES_ZUBAT}, - {16, 16, SPECIES_ZUBAT}, - {6, 6, SPECIES_ZUBAT}, - {8, 8, SPECIES_ZUBAT}, - {14, 14, SPECIES_ZUBAT}, - {8, 8, SPECIES_ZUBAT}, - {14, 14, SPECIES_ZUBAT}, -}; - -const struct WildPokemonInfo gAlteringCave1_LandMonsInfo = {7, gAlteringCave1_LandMons}; - -const struct WildPokemon gAlteringCave2_LandMons[] = -{ - {7, 7, SPECIES_MAREEP}, - {9, 9, SPECIES_MAREEP}, - {5, 5, SPECIES_MAREEP}, - {11, 11, SPECIES_MAREEP}, - {7, 7, SPECIES_MAREEP}, - {9, 9, SPECIES_MAREEP}, - {13, 13, SPECIES_MAREEP}, - {3, 3, SPECIES_MAREEP}, - {5, 5, SPECIES_MAREEP}, - {11, 11, SPECIES_MAREEP}, - {5, 5, SPECIES_MAREEP}, - {11, 11, SPECIES_MAREEP}, -}; - -const struct WildPokemonInfo gAlteringCave2_LandMonsInfo = {7, gAlteringCave2_LandMons}; - -const struct WildPokemon gAlteringCave3_LandMons[] = -{ - {23, 23, SPECIES_PINECO}, - {25, 25, SPECIES_PINECO}, - {22, 22, SPECIES_PINECO}, - {27, 27, SPECIES_PINECO}, - {23, 23, SPECIES_PINECO}, - {25, 25, SPECIES_PINECO}, - {29, 29, SPECIES_PINECO}, - {19, 19, SPECIES_PINECO}, - {21, 21, SPECIES_PINECO}, - {27, 27, SPECIES_PINECO}, - {21, 21, SPECIES_PINECO}, - {27, 27, SPECIES_PINECO}, -}; - -const struct WildPokemonInfo gAlteringCave3_LandMonsInfo = {7, gAlteringCave3_LandMons}; - -const struct WildPokemon gAlteringCave4_LandMons[] = -{ - {16, 16, SPECIES_HOUNDOUR}, - {18, 18, SPECIES_HOUNDOUR}, - {14, 14, SPECIES_HOUNDOUR}, - {20, 20, SPECIES_HOUNDOUR}, - {16, 16, SPECIES_HOUNDOUR}, - {18, 18, SPECIES_HOUNDOUR}, - {22, 22, SPECIES_HOUNDOUR}, - {12, 12, SPECIES_HOUNDOUR}, - {14, 14, SPECIES_HOUNDOUR}, - {20, 20, SPECIES_HOUNDOUR}, - {14, 14, SPECIES_HOUNDOUR}, - {20, 20, SPECIES_HOUNDOUR}, -}; - -const struct WildPokemonInfo gAlteringCave4_LandMonsInfo = {7, gAlteringCave4_LandMons}; - -const struct WildPokemon gAlteringCave5_LandMons[] = -{ - {10, 10, SPECIES_TEDDIURSA}, - {12, 12, SPECIES_TEDDIURSA}, - {8, 8, SPECIES_TEDDIURSA}, - {14, 14, SPECIES_TEDDIURSA}, - {10, 10, SPECIES_TEDDIURSA}, - {12, 12, SPECIES_TEDDIURSA}, - {16, 16, SPECIES_TEDDIURSA}, - {6, 6, SPECIES_TEDDIURSA}, - {8, 8, SPECIES_TEDDIURSA}, - {14, 14, SPECIES_TEDDIURSA}, - {8, 8, SPECIES_TEDDIURSA}, - {14, 14, SPECIES_TEDDIURSA}, -}; - -const struct WildPokemonInfo gAlteringCave5_LandMonsInfo = {7, gAlteringCave5_LandMons}; - -const struct WildPokemon gAlteringCave6_LandMons[] = -{ - {22, 22, SPECIES_AIPOM}, - {24, 24, SPECIES_AIPOM}, - {20, 20, SPECIES_AIPOM}, - {26, 26, SPECIES_AIPOM}, - {22, 22, SPECIES_AIPOM}, - {24, 24, SPECIES_AIPOM}, - {28, 28, SPECIES_AIPOM}, - {18, 18, SPECIES_AIPOM}, - {20, 20, SPECIES_AIPOM}, - {26, 26, SPECIES_AIPOM}, - {20, 20, SPECIES_AIPOM}, - {26, 26, SPECIES_AIPOM}, -}; - -const struct WildPokemonInfo gAlteringCave6_LandMonsInfo = {7, gAlteringCave6_LandMons}; - -const struct WildPokemon gAlteringCave7_LandMons[] = -{ - {22, 22, SPECIES_SHUCKLE}, - {24, 24, SPECIES_SHUCKLE}, - {20, 20, SPECIES_SHUCKLE}, - {26, 26, SPECIES_SHUCKLE}, - {22, 22, SPECIES_SHUCKLE}, - {24, 24, SPECIES_SHUCKLE}, - {28, 28, SPECIES_SHUCKLE}, - {18, 18, SPECIES_SHUCKLE}, - {20, 20, SPECIES_SHUCKLE}, - {26, 26, SPECIES_SHUCKLE}, - {20, 20, SPECIES_SHUCKLE}, - {26, 26, SPECIES_SHUCKLE}, -}; - -const struct WildPokemonInfo gAlteringCave7_LandMonsInfo = {7, gAlteringCave7_LandMons}; - -const struct WildPokemon gAlteringCave8_LandMons[] = -{ - {22, 22, SPECIES_STANTLER}, - {24, 24, SPECIES_STANTLER}, - {20, 20, SPECIES_STANTLER}, - {26, 26, SPECIES_STANTLER}, - {22, 22, SPECIES_STANTLER}, - {24, 24, SPECIES_STANTLER}, - {28, 28, SPECIES_STANTLER}, - {18, 18, SPECIES_STANTLER}, - {20, 20, SPECIES_STANTLER}, - {26, 26, SPECIES_STANTLER}, - {20, 20, SPECIES_STANTLER}, - {26, 26, SPECIES_STANTLER}, -}; - -const struct WildPokemonInfo gAlteringCave8_LandMonsInfo = {7, gAlteringCave8_LandMons}; - -const struct WildPokemon gAlteringCave9_LandMons[] = -{ - {22, 22, SPECIES_SMEARGLE}, - {24, 24, SPECIES_SMEARGLE}, - {20, 20, SPECIES_SMEARGLE}, - {26, 26, SPECIES_SMEARGLE}, - {22, 22, SPECIES_SMEARGLE}, - {24, 24, SPECIES_SMEARGLE}, - {28, 28, SPECIES_SMEARGLE}, - {18, 18, SPECIES_SMEARGLE}, - {20, 20, SPECIES_SMEARGLE}, - {26, 26, SPECIES_SMEARGLE}, - {20, 20, SPECIES_SMEARGLE}, - {26, 26, SPECIES_SMEARGLE}, -}; - -const struct WildPokemonInfo gAlteringCave9_LandMonsInfo = {7, gAlteringCave9_LandMons}; - -const struct WildPokemon gMeteorFalls_StevensCave_LandMons[] = -{ - {33, 33, SPECIES_GOLBAT}, - {35, 35, SPECIES_GOLBAT}, - {33, 33, SPECIES_GOLBAT}, - {35, 35, SPECIES_SOLROCK}, - {33, 33, SPECIES_SOLROCK}, - {37, 37, SPECIES_SOLROCK}, - {35, 35, SPECIES_GOLBAT}, - {39, 39, SPECIES_SOLROCK}, - {38, 38, SPECIES_GOLBAT}, - {40, 40, SPECIES_GOLBAT}, - {38, 38, SPECIES_GOLBAT}, - {40, 40, SPECIES_GOLBAT}, -}; - -const struct WildPokemonInfo gMeteorFalls_StevensCave_LandMonsInfo = {10, gMeteorFalls_StevensCave_LandMons}; - -//The actual headers that link the encounter tables to particular maps start here. - -const struct WildPokemonHeader gWildMonHeaders[] = -{ - { - .mapGroup = MAP_GROUP(ROUTE101), - .mapNum = MAP_NUM(ROUTE101), - .landMonsInfo = &gRoute101_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(ROUTE102), - .mapNum = MAP_NUM(ROUTE102), - .landMonsInfo = &gRoute102_LandMonsInfo, - .waterMonsInfo = &gRoute102_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute102_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE103), - .mapNum = MAP_NUM(ROUTE103), - .landMonsInfo = &gRoute103_LandMonsInfo, - .waterMonsInfo = &gRoute103_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute103_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE104), - .mapNum = MAP_NUM(ROUTE104), - .landMonsInfo = &gRoute104_LandMonsInfo, - .waterMonsInfo = &gRoute104_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute104_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE105), - .mapNum = MAP_NUM(ROUTE105), - .landMonsInfo = NULL, - .waterMonsInfo = &gRoute105_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute105_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE110), - .mapNum = MAP_NUM(ROUTE110), - .landMonsInfo = &gRoute110_LandMonsInfo, - .waterMonsInfo = &gRoute110_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute110_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE111), - .mapNum = MAP_NUM(ROUTE111), - .landMonsInfo = &gRoute111_LandMonsInfo, - .waterMonsInfo = &gRoute111_WaterMonsInfo, - .rockSmashMonsInfo = &gRoute111_RockSmashMonsInfo, - .fishingMonsInfo = &gRoute111_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE112), - .mapNum = MAP_NUM(ROUTE112), - .landMonsInfo = &gRoute112_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(ROUTE113), - .mapNum = MAP_NUM(ROUTE113), - .landMonsInfo = &gRoute113_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(ROUTE114), - .mapNum = MAP_NUM(ROUTE114), - .landMonsInfo = &gRoute114_LandMonsInfo, - .waterMonsInfo = &gRoute114_WaterMonsInfo, - .rockSmashMonsInfo = &gRoute114_RockSmashMonsInfo, - .fishingMonsInfo = &gRoute114_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE116), - .mapNum = MAP_NUM(ROUTE116), - .landMonsInfo = &gRoute116_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(ROUTE117), - .mapNum = MAP_NUM(ROUTE117), - .landMonsInfo = &gRoute117_LandMonsInfo, - .waterMonsInfo = &gRoute117_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute117_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE118), - .mapNum = MAP_NUM(ROUTE118), - .landMonsInfo = &gRoute118_LandMonsInfo, - .waterMonsInfo = &gRoute118_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute118_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE124), - .mapNum = MAP_NUM(ROUTE124), - .landMonsInfo = NULL, - .waterMonsInfo = &gRoute124_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute124_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(PETALBURG_WOODS), - .mapNum = MAP_NUM(PETALBURG_WOODS), - .landMonsInfo = &gPetalburgWoods_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(RUSTURF_TUNNEL), - .mapNum = MAP_NUM(RUSTURF_TUNNEL), - .landMonsInfo = &gRusturfTunnel_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(GRANITE_CAVE_1F), - .mapNum = MAP_NUM(GRANITE_CAVE_1F), - .landMonsInfo = &gGraniteCave_1F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(GRANITE_CAVE_B1F), - .mapNum = MAP_NUM(GRANITE_CAVE_B1F), - .landMonsInfo = &gGraniteCave_B1F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(MT_PYRE_1F), - .mapNum = MAP_NUM(MT_PYRE_1F), - .landMonsInfo = &gMtPyre_1F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(VICTORY_ROAD_1F), - .mapNum = MAP_NUM(VICTORY_ROAD_1F), - .landMonsInfo = &gVictoryRoad_1F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(SAFARI_ZONE_SOUTH), - .mapNum = MAP_NUM(SAFARI_ZONE_SOUTH), - .landMonsInfo = &gSafariZone_South_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(UNDERWATER2), - .mapNum = MAP_NUM(UNDERWATER2), - .landMonsInfo = NULL, - .waterMonsInfo = &gUnderwater2_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(ABANDONED_SHIP_ROOMS_B1F), - .mapNum = MAP_NUM(ABANDONED_SHIP_ROOMS_B1F), - .landMonsInfo = NULL, - .waterMonsInfo = &gAbandonedShip_Rooms_B1F_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gAbandonedShip_Rooms_B1F_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(GRANITE_CAVE_B2F), - .mapNum = MAP_NUM(GRANITE_CAVE_B2F), - .landMonsInfo = &gGraniteCave_B2F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = &gGraniteCave_B2F_RockSmashMonsInfo, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(FIERY_PATH), - .mapNum = MAP_NUM(FIERY_PATH), - .landMonsInfo = &gFieryPath_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(METEOR_FALLS_B1F_2R), - .mapNum = MAP_NUM(METEOR_FALLS_B1F_2R), - .landMonsInfo = &gMeteorFalls_B1F_2R_LandMonsInfo, - .waterMonsInfo = &gMeteorFalls_B1F_2R_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gMeteorFalls_B1F_2R_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(JAGGED_PASS), - .mapNum = MAP_NUM(JAGGED_PASS), - .landMonsInfo = &gJaggedPass_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(ROUTE106), - .mapNum = MAP_NUM(ROUTE106), - .landMonsInfo = NULL, - .waterMonsInfo = &gRoute106_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute106_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE107), - .mapNum = MAP_NUM(ROUTE107), - .landMonsInfo = NULL, - .waterMonsInfo = &gRoute107_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute107_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE108), - .mapNum = MAP_NUM(ROUTE108), - .landMonsInfo = NULL, - .waterMonsInfo = &gRoute108_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute108_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE109), - .mapNum = MAP_NUM(ROUTE109), - .landMonsInfo = NULL, - .waterMonsInfo = &gRoute109_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute109_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE115), - .mapNum = MAP_NUM(ROUTE115), - .landMonsInfo = &gRoute115_LandMonsInfo, - .waterMonsInfo = &gRoute115_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute115_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(NEW_MAUVILLE_INSIDE), - .mapNum = MAP_NUM(NEW_MAUVILLE_INSIDE), - .landMonsInfo = &gNewMauville_Inside_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(ROUTE119), - .mapNum = MAP_NUM(ROUTE119), - .landMonsInfo = &gRoute119_LandMonsInfo, - .waterMonsInfo = &gRoute119_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute119_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE120), - .mapNum = MAP_NUM(ROUTE120), - .landMonsInfo = &gRoute120_LandMonsInfo, - .waterMonsInfo = &gRoute120_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute120_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE121), - .mapNum = MAP_NUM(ROUTE121), - .landMonsInfo = &gRoute121_LandMonsInfo, - .waterMonsInfo = &gRoute121_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute121_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE122), - .mapNum = MAP_NUM(ROUTE122), - .landMonsInfo = NULL, - .waterMonsInfo = &gRoute122_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute122_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE123), - .mapNum = MAP_NUM(ROUTE123), - .landMonsInfo = &gRoute123_LandMonsInfo, - .waterMonsInfo = &gRoute123_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute123_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(MT_PYRE_2F), - .mapNum = MAP_NUM(MT_PYRE_2F), - .landMonsInfo = &gMtPyre_2F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(MT_PYRE_3F), - .mapNum = MAP_NUM(MT_PYRE_3F), - .landMonsInfo = &gMtPyre_3F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(MT_PYRE_4F), - .mapNum = MAP_NUM(MT_PYRE_4F), - .landMonsInfo = &gMtPyre_4F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(MT_PYRE_5F), - .mapNum = MAP_NUM(MT_PYRE_5F), - .landMonsInfo = &gMtPyre_5F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(MT_PYRE_6F), - .mapNum = MAP_NUM(MT_PYRE_6F), - .landMonsInfo = &gMtPyre_6F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(MT_PYRE_EXTERIOR), - .mapNum = MAP_NUM(MT_PYRE_EXTERIOR), - .landMonsInfo = &gMtPyre_Exterior_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(MT_PYRE_SUMMIT), - .mapNum = MAP_NUM(MT_PYRE_SUMMIT), - .landMonsInfo = &gMtPyre_Summit_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(GRANITE_CAVE_STEVENS_ROOM), - .mapNum = MAP_NUM(GRANITE_CAVE_STEVENS_ROOM), - .landMonsInfo = &gGraniteCave_StevensRoom_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(ROUTE125), - .mapNum = MAP_NUM(ROUTE125), - .landMonsInfo = NULL, - .waterMonsInfo = &gRoute125_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute125_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE126), - .mapNum = MAP_NUM(ROUTE126), - .landMonsInfo = NULL, - .waterMonsInfo = &gRoute126_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute126_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE127), - .mapNum = MAP_NUM(ROUTE127), - .landMonsInfo = NULL, - .waterMonsInfo = &gRoute127_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute127_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE128), - .mapNum = MAP_NUM(ROUTE128), - .landMonsInfo = NULL, - .waterMonsInfo = &gRoute128_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute128_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE129), - .mapNum = MAP_NUM(ROUTE129), - .landMonsInfo = NULL, - .waterMonsInfo = &gRoute129_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute129_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE130), - .mapNum = MAP_NUM(ROUTE130), - .landMonsInfo = &gRoute130_LandMonsInfo, - .waterMonsInfo = &gRoute130_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute130_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE131), - .mapNum = MAP_NUM(ROUTE131), - .landMonsInfo = NULL, - .waterMonsInfo = &gRoute131_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute131_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE132), - .mapNum = MAP_NUM(ROUTE132), - .landMonsInfo = NULL, - .waterMonsInfo = &gRoute132_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute132_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE133), - .mapNum = MAP_NUM(ROUTE133), - .landMonsInfo = NULL, - .waterMonsInfo = &gRoute133_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute133_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ROUTE134), - .mapNum = MAP_NUM(ROUTE134), - .landMonsInfo = NULL, - .waterMonsInfo = &gRoute134_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gRoute134_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS), - .mapNum = MAP_NUM(ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS), - .landMonsInfo = NULL, - .waterMonsInfo = &gAbandonedShip_HiddenFloorCorridors_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gAbandonedShip_HiddenFloorCorridors_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM1), - .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM1), - .landMonsInfo = &gSeafloorCavern_Room1_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM2), - .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM2), - .landMonsInfo = &gSeafloorCavern_Room2_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM3), - .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM3), - .landMonsInfo = &gSeafloorCavern_Room3_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM4), - .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM4), - .landMonsInfo = &gSeafloorCavern_Room4_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM5), - .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM5), - .landMonsInfo = &gSeafloorCavern_Room5_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM6), - .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM6), - .landMonsInfo = &gSeafloorCavern_Room6_LandMonsInfo, - .waterMonsInfo = &gSeafloorCavern_Room6_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gSeafloorCavern_Room6_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM7), - .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM7), - .landMonsInfo = &gSeafloorCavern_Room7_LandMonsInfo, - .waterMonsInfo = &gSeafloorCavern_Room7_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gSeafloorCavern_Room7_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ROOM8), - .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ROOM8), - .landMonsInfo = &gSeafloorCavern_Room8_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(SEAFLOOR_CAVERN_ENTRANCE), - .mapNum = MAP_NUM(SEAFLOOR_CAVERN_ENTRANCE), - .landMonsInfo = NULL, - .waterMonsInfo = &gSeafloorCavern_Entrance_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gSeafloorCavern_Entrance_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(CAVE_OF_ORIGIN_ENTRANCE), - .mapNum = MAP_NUM(CAVE_OF_ORIGIN_ENTRANCE), - .landMonsInfo = &gCaveOfOrigin_Entrance_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(CAVE_OF_ORIGIN_1F), - .mapNum = MAP_NUM(CAVE_OF_ORIGIN_1F), - .landMonsInfo = &gCaveOfOrigin_1F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(CAVE_OF_ORIGIN_UNUSED_RUBY_SAPPHIRE_MAP1), - .mapNum = MAP_NUM(CAVE_OF_ORIGIN_UNUSED_RUBY_SAPPHIRE_MAP1), - .landMonsInfo = &gCaveOfOrigin_UnusedRubySapphireMap1_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(CAVE_OF_ORIGIN_UNUSED_RUBY_SAPPHIRE_MAP2), - .mapNum = MAP_NUM(CAVE_OF_ORIGIN_UNUSED_RUBY_SAPPHIRE_MAP2), - .landMonsInfo = &gCaveOfOrigin_UnusedRubySapphireMap2_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(CAVE_OF_ORIGIN_UNUSED_RUBY_SAPPHIRE_MAP3), - .mapNum = MAP_NUM(CAVE_OF_ORIGIN_UNUSED_RUBY_SAPPHIRE_MAP3), - .landMonsInfo = &gCaveOfOrigin_UnusedRubySapphireMap3_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(NEW_MAUVILLE_ENTRANCE), - .mapNum = MAP_NUM(NEW_MAUVILLE_ENTRANCE), - .landMonsInfo = &gNewMauville_Entrance_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(SAFARI_ZONE_SOUTHWEST), - .mapNum = MAP_NUM(SAFARI_ZONE_SOUTHWEST), - .landMonsInfo = &gSafariZone_Southwest_LandMonsInfo, - .waterMonsInfo = &gSafariZone_Southwest_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gSafariZone_Southwest_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(SAFARI_ZONE_NORTH), - .mapNum = MAP_NUM(SAFARI_ZONE_NORTH), - .landMonsInfo = &gSafariZone_North_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = &gSafariZone_North_RockSmashMonsInfo, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(SAFARI_ZONE_NORTHWEST), - .mapNum = MAP_NUM(SAFARI_ZONE_NORTHWEST), - .landMonsInfo = &gSafariZone_Northwest_LandMonsInfo, - .waterMonsInfo = &gSafariZone_Northwest_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gSafariZone_Northwest_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(VICTORY_ROAD_B1F), - .mapNum = MAP_NUM(VICTORY_ROAD_B1F), - .landMonsInfo = &gVictoryRoad_B1F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = &gVictoryRoad_B1F_RockSmashMonsInfo, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(VICTORY_ROAD_B2F), - .mapNum = MAP_NUM(VICTORY_ROAD_B2F), - .landMonsInfo = &gVictoryRoad_B2F_LandMonsInfo, - .waterMonsInfo = &gVictoryRoad_B2F_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gVictoryRoad_B2F_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(METEOR_FALLS_1F_1R), - .mapNum = MAP_NUM(METEOR_FALLS_1F_1R), - .landMonsInfo = &gMeteorFalls_1F_1R_LandMonsInfo, - .waterMonsInfo = &gMeteorFalls_1F_1R_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gMeteorFalls_1F_1R_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(METEOR_FALLS_1F_2R), - .mapNum = MAP_NUM(METEOR_FALLS_1F_2R), - .landMonsInfo = &gMeteorFalls_1F_2R_LandMonsInfo, - .waterMonsInfo = &gMeteorFalls_1F_2R_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gMeteorFalls_1F_2R_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(METEOR_FALLS_B1F_1R), - .mapNum = MAP_NUM(METEOR_FALLS_B1F_1R), - .landMonsInfo = &gMeteorFalls_B1F_1R_LandMonsInfo, - .waterMonsInfo = &gMeteorFalls_B1F_1R_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gMeteorFalls_B1F_1R_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(SHOAL_CAVE_LOW_TIDE_STAIRS_ROOM), - .mapNum = MAP_NUM(SHOAL_CAVE_LOW_TIDE_STAIRS_ROOM), - .landMonsInfo = &gShoalCave_LowTideStairsRoom_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(SHOAL_CAVE_LOW_TIDE_LOWER_ROOM), - .mapNum = MAP_NUM(SHOAL_CAVE_LOW_TIDE_LOWER_ROOM), - .landMonsInfo = &gShoalCave_LowTideLowerRoom_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(SHOAL_CAVE_LOW_TIDE_INNER_ROOM), - .mapNum = MAP_NUM(SHOAL_CAVE_LOW_TIDE_INNER_ROOM), - .landMonsInfo = &gShoalCave_LowTideInnerRoom_LandMonsInfo, - .waterMonsInfo = &gShoalCave_LowTideInnerRoom_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gShoalCave_LowTideInnerRoom_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(SHOAL_CAVE_LOW_TIDE_ENTRANCE_ROOM), - .mapNum = MAP_NUM(SHOAL_CAVE_LOW_TIDE_ENTRANCE_ROOM), - .landMonsInfo = &gShoalCave_LowTideEntranceRoom_LandMonsInfo, - .waterMonsInfo = &gShoalCave_LowTideEntranceRoom_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gShoalCave_LowTideEntranceRoom_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(LILYCOVE_CITY), - .mapNum = MAP_NUM(LILYCOVE_CITY), - .landMonsInfo = NULL, - .waterMonsInfo = &gLilycoveCity_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gLilycoveCity_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(DEWFORD_TOWN), - .mapNum = MAP_NUM(DEWFORD_TOWN), - .landMonsInfo = NULL, - .waterMonsInfo = &gDewfordTown_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gDewfordTown_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(SLATEPORT_CITY), - .mapNum = MAP_NUM(SLATEPORT_CITY), - .landMonsInfo = NULL, - .waterMonsInfo = &gSlateportCity_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gSlateportCity_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(MOSSDEEP_CITY), - .mapNum = MAP_NUM(MOSSDEEP_CITY), - .landMonsInfo = NULL, - .waterMonsInfo = &gMossdeepCity_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gMossdeepCity_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(PACIFIDLOG_TOWN), - .mapNum = MAP_NUM(PACIFIDLOG_TOWN), - .landMonsInfo = NULL, - .waterMonsInfo = &gPacifidlogTown_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gPacifidlogTown_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(EVER_GRANDE_CITY), - .mapNum = MAP_NUM(EVER_GRANDE_CITY), - .landMonsInfo = NULL, - .waterMonsInfo = &gEverGrandeCity_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gEverGrandeCity_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(PETALBURG_CITY), - .mapNum = MAP_NUM(PETALBURG_CITY), - .landMonsInfo = NULL, - .waterMonsInfo = &gPetalburgCity_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gPetalburgCity_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(UNDERWATER1), - .mapNum = MAP_NUM(UNDERWATER1), - .landMonsInfo = NULL, - .waterMonsInfo = &gUnderwater1_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(SHOAL_CAVE_LOW_TIDE_ICE_ROOM), - .mapNum = MAP_NUM(SHOAL_CAVE_LOW_TIDE_ICE_ROOM), - .landMonsInfo = &gShoalCave_LowTideIceRoom_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(SKY_PILLAR_1F), - .mapNum = MAP_NUM(SKY_PILLAR_1F), - .landMonsInfo = &gSkyPillar_1F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(SOOTOPOLIS_CITY), - .mapNum = MAP_NUM(SOOTOPOLIS_CITY), - .landMonsInfo = NULL, - .waterMonsInfo = &gSootopolisCity_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gSootopolisCity_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(SKY_PILLAR_3F), - .mapNum = MAP_NUM(SKY_PILLAR_3F), - .landMonsInfo = &gSkyPillar_3F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(SKY_PILLAR_5F), - .mapNum = MAP_NUM(SKY_PILLAR_5F), - .landMonsInfo = &gSkyPillar_5F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(SAFARI_ZONE_SOUTHEAST), - .mapNum = MAP_NUM(SAFARI_ZONE_SOUTHEAST), - .landMonsInfo = &gSafariZone_Southeast_LandMonsInfo, - .waterMonsInfo = &gSafariZone_Southeast_WaterMonsInfo, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = &gSafariZone_Southeast_FishingMonsInfo, - }, - { - .mapGroup = MAP_GROUP(SAFARI_ZONE_NORTHEAST), - .mapNum = MAP_NUM(SAFARI_ZONE_NORTHEAST), - .landMonsInfo = &gSafariZone_Northeast_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = &gSafariZone_Northeast_RockSmashMonsInfo, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(MAGMA_HIDEOUT_1F), - .mapNum = MAP_NUM(MAGMA_HIDEOUT_1F), - .landMonsInfo = &gMagmaHideout_1F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(MAGMA_HIDEOUT_2F_1R), - .mapNum = MAP_NUM(MAGMA_HIDEOUT_2F_1R), - .landMonsInfo = &gMagmaHideout_2F_1R_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(MAGMA_HIDEOUT_2F_2R), - .mapNum = MAP_NUM(MAGMA_HIDEOUT_2F_2R), - .landMonsInfo = &gMagmaHideout_2F_2R_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(MAGMA_HIDEOUT_3F_1R), - .mapNum = MAP_NUM(MAGMA_HIDEOUT_3F_1R), - .landMonsInfo = &gMagmaHideout_3F_1R_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(MAGMA_HIDEOUT_3F_2R), - .mapNum = MAP_NUM(MAGMA_HIDEOUT_3F_2R), - .landMonsInfo = &gMagmaHideout_3F_2R_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(MAGMA_HIDEOUT_4F), - .mapNum = MAP_NUM(MAGMA_HIDEOUT_4F), - .landMonsInfo = &gMagmaHideout_4F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(MAGMA_HIDEOUT_3F_3R), - .mapNum = MAP_NUM(MAGMA_HIDEOUT_3F_3R), - .landMonsInfo = &gMagmaHideout_3F_3R_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(MAGMA_HIDEOUT_2F_3R), - .mapNum = MAP_NUM(MAGMA_HIDEOUT_2F_3R), - .landMonsInfo = &gMagmaHideout_2F_3R_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(MIRAGE_TOWER_1F), - .mapNum = MAP_NUM(MIRAGE_TOWER_1F), - .landMonsInfo = &gMirageTower_1F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(MIRAGE_TOWER_2F), - .mapNum = MAP_NUM(MIRAGE_TOWER_2F), - .landMonsInfo = &gMirageTower_2F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(MIRAGE_TOWER_3F), - .mapNum = MAP_NUM(MIRAGE_TOWER_3F), - .landMonsInfo = &gMirageTower_3F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(MIRAGE_TOWER_4F), - .mapNum = MAP_NUM(MIRAGE_TOWER_4F), - .landMonsInfo = &gMirageTower_4F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(DESERT_UNDERPASS), - .mapNum = MAP_NUM(DESERT_UNDERPASS), - .landMonsInfo = &gDesertUnderpass_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(ARTISAN_CAVE_B1F), - .mapNum = MAP_NUM(ARTISAN_CAVE_B1F), - .landMonsInfo = &gArtisanCave_B1F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(ARTISAN_CAVE_1F), - .mapNum = MAP_NUM(ARTISAN_CAVE_1F), - .landMonsInfo = &gArtisanCave_1F_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(ALTERING_CAVE), - .mapNum = MAP_NUM(ALTERING_CAVE), - .landMonsInfo = &gAlteringCave1_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(ALTERING_CAVE), - .mapNum = MAP_NUM(ALTERING_CAVE), - .landMonsInfo = &gAlteringCave2_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(ALTERING_CAVE), - .mapNum = MAP_NUM(ALTERING_CAVE), - .landMonsInfo = &gAlteringCave3_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(ALTERING_CAVE), - .mapNum = MAP_NUM(ALTERING_CAVE), - .landMonsInfo = &gAlteringCave4_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(ALTERING_CAVE), - .mapNum = MAP_NUM(ALTERING_CAVE), - .landMonsInfo = &gAlteringCave5_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(ALTERING_CAVE), - .mapNum = MAP_NUM(ALTERING_CAVE), - .landMonsInfo = &gAlteringCave6_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(ALTERING_CAVE), - .mapNum = MAP_NUM(ALTERING_CAVE), - .landMonsInfo = &gAlteringCave7_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(ALTERING_CAVE), - .mapNum = MAP_NUM(ALTERING_CAVE), - .landMonsInfo = &gAlteringCave8_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(ALTERING_CAVE), - .mapNum = MAP_NUM(ALTERING_CAVE), - .landMonsInfo = &gAlteringCave9_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(METEOR_FALLS_STEVENS_CAVE), - .mapNum = MAP_NUM(METEOR_FALLS_STEVENS_CAVE), - .landMonsInfo = &gMeteorFalls_StevensCave_LandMonsInfo, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = MAP_GROUP(UNDEFINED), - .mapNum = MAP_NUM(UNDEFINED), - .landMonsInfo = NULL, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, -}; - -//Battle Pyramid-specific tables and headers start here. - -const struct WildPokemon gBattlePyramidPlaceholders_1[] = -{ - {5, 5, SPECIES_BULBASAUR}, - {5, 5, SPECIES_BULBASAUR}, - {5, 5, SPECIES_BULBASAUR}, - {5, 5, SPECIES_BULBASAUR}, - {5, 5, SPECIES_IVYSAUR}, - {5, 5, SPECIES_IVYSAUR}, - {5, 5, SPECIES_VENUSAUR}, - {5, 5, SPECIES_VENUSAUR}, - {5, 5, SPECIES_VENUSAUR}, - {5, 5, SPECIES_CHARMANDER}, - {5, 5, SPECIES_VENUSAUR}, - {5, 5, SPECIES_CHARMANDER}, -}; - -const struct WildPokemonInfo gBattlePyramidPlaceholders_1Info = {4, gBattlePyramidPlaceholders_1}; - -const struct WildPokemon gBattlePyramidPlaceholders_2[] = -{ - {5, 5, SPECIES_IVYSAUR}, - {5, 5, SPECIES_IVYSAUR}, - {5, 5, SPECIES_IVYSAUR}, - {5, 5, SPECIES_IVYSAUR}, - {5, 5, SPECIES_VENUSAUR}, - {5, 5, SPECIES_VENUSAUR}, - {5, 5, SPECIES_CHARMANDER}, - {5, 5, SPECIES_CHARMANDER}, - {5, 5, SPECIES_CHARMANDER}, - {5, 5, SPECIES_CHARMELEON}, - {5, 5, SPECIES_CHARMELEON}, - {5, 5, SPECIES_CHARMANDER}, -}; - -const struct WildPokemonInfo gBattlePyramidPlaceholders_2Info = {4, gBattlePyramidPlaceholders_2}; - -const struct WildPokemon gBattlePyramidPlaceholders_3[] = -{ - {5, 5, SPECIES_VENUSAUR}, - {5, 5, SPECIES_VENUSAUR}, - {5, 5, SPECIES_VENUSAUR}, - {5, 5, SPECIES_VENUSAUR}, - {5, 5, SPECIES_CHARMANDER}, - {5, 5, SPECIES_CHARMANDER}, - {5, 5, SPECIES_CHARMELEON}, - {5, 5, SPECIES_CHARMELEON}, - {5, 5, SPECIES_CHARMELEON}, - {5, 5, SPECIES_CHARIZARD}, - {5, 5, SPECIES_CHARMELEON}, - {5, 5, SPECIES_CHARIZARD}, -}; - -const struct WildPokemonInfo gBattlePyramidPlaceholders_3Info = {4, gBattlePyramidPlaceholders_3}; - -const struct WildPokemon gBattlePyramidPlaceholders_4[] = -{ - {5, 5, SPECIES_CHARMANDER}, - {5, 5, SPECIES_CHARMANDER}, - {5, 5, SPECIES_CHARMANDER}, - {5, 5, SPECIES_CHARMANDER}, - {5, 5, SPECIES_CHARMELEON}, - {5, 5, SPECIES_CHARMELEON}, - {5, 5, SPECIES_CHARIZARD}, - {5, 5, SPECIES_CHARIZARD}, - {5, 5, SPECIES_CHARIZARD}, - {5, 5, SPECIES_SQUIRTLE}, - {5, 5, SPECIES_CHARIZARD}, - {5, 5, SPECIES_SQUIRTLE}, -}; - -const struct WildPokemonInfo gBattlePyramidPlaceholders_4Info = {4, gBattlePyramidPlaceholders_4}; - -const struct WildPokemon gBattlePyramidPlaceholders_5[] = -{ - {5, 5, SPECIES_CHARMELEON}, - {5, 5, SPECIES_CHARMELEON}, - {5, 5, SPECIES_CHARMELEON}, - {5, 5, SPECIES_CHARMELEON}, - {5, 5, SPECIES_CHARIZARD}, - {5, 5, SPECIES_CHARIZARD}, - {5, 5, SPECIES_SQUIRTLE}, - {5, 5, SPECIES_SQUIRTLE}, - {5, 5, SPECIES_SQUIRTLE}, - {5, 5, SPECIES_WARTORTLE}, - {5, 5, SPECIES_SQUIRTLE}, - {5, 5, SPECIES_WARTORTLE}, -}; - -const struct WildPokemonInfo gBattlePyramidPlaceholders_5Info = {4, gBattlePyramidPlaceholders_5}; - -const struct WildPokemon gBattlePyramidPlaceholders_6[] = -{ - {5, 5, SPECIES_CHARIZARD}, - {5, 5, SPECIES_CHARIZARD}, - {5, 5, SPECIES_CHARIZARD}, - {5, 5, SPECIES_CHARMELEON}, - {5, 5, SPECIES_SQUIRTLE}, - {5, 5, SPECIES_SQUIRTLE}, - {5, 5, SPECIES_WARTORTLE}, - {5, 5, SPECIES_WARTORTLE}, - {5, 5, SPECIES_WARTORTLE}, - {5, 5, SPECIES_WARTORTLE}, - {5, 5, SPECIES_WARTORTLE}, - {5, 5, SPECIES_WARTORTLE}, -}; - -const struct WildPokemonInfo gBattlePyramidPlaceholders_6Info = {4, gBattlePyramidPlaceholders_6}; - -const struct WildPokemon gBattlePyramidPlaceholders_7[] = -{ - {5, 5, SPECIES_WARTORTLE}, - {5, 5, SPECIES_WARTORTLE}, - {5, 5, SPECIES_SQUIRTLE}, - {5, 5, SPECIES_SQUIRTLE}, - {5, 5, SPECIES_SQUIRTLE}, - {5, 5, SPECIES_CHARIZARD}, - {5, 5, SPECIES_CHARIZARD}, - {5, 5, SPECIES_CHARIZARD}, - {5, 5, SPECIES_CHARMELEON}, - {5, 5, SPECIES_CHARMELEON}, - {5, 5, SPECIES_CHARMELEON}, - {5, 5, SPECIES_CHARMELEON}, -}; - -const struct WildPokemonInfo gBattlePyramidPlaceholders_7Info = {8, gBattlePyramidPlaceholders_7}; - -const struct WildPokemonHeader gBattlePyramidWildMonHeaders[] = -{ - { - .mapGroup = 0, - .mapNum = 1, - .landMonsInfo = &gBattlePyramidPlaceholders_1Info, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = 0, - .mapNum = 2, - .landMonsInfo = &gBattlePyramidPlaceholders_2Info, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = 0, - .mapNum = 3, - .landMonsInfo = &gBattlePyramidPlaceholders_3Info, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = 0, - .mapNum = 4, - .landMonsInfo = &gBattlePyramidPlaceholders_4Info, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = 0, - .mapNum = 5, - .landMonsInfo = &gBattlePyramidPlaceholders_5Info, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = 0, - .mapNum = 6, - .landMonsInfo = &gBattlePyramidPlaceholders_6Info, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = 0, - .mapNum = 7, - .landMonsInfo = &gBattlePyramidPlaceholders_7Info, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = 255, - .mapNum = 255, - .landMonsInfo = NULL, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, -}; - -//Battle Pike-specific tables and headers start here. - -const struct WildPokemon gBattlePikeMons_1[] = -{ - {5, 5, SPECIES_SEVIPER}, - {5, 5, SPECIES_MILOTIC}, - {5, 5, SPECIES_DUSCLOPS}, - {5, 5, SPECIES_DUSCLOPS}, - {5, 5, SPECIES_DUSCLOPS}, - {5, 5, SPECIES_DUSCLOPS}, - {5, 5, SPECIES_SEVIPER}, - {5, 5, SPECIES_MILOTIC}, - {5, 5, SPECIES_DUSCLOPS}, - {5, 5, SPECIES_DUSCLOPS}, - {5, 5, SPECIES_SEVIPER}, - {5, 5, SPECIES_MILOTIC}, -}; - -const struct WildPokemonInfo gBattlePikeMonsInfo_1 = {10, gBattlePikeMons_1}; - -const struct WildPokemon gBattlePikeMons_2[] = -{ - {5, 5, SPECIES_SEVIPER}, - {5, 5, SPECIES_MILOTIC}, - {5, 5, SPECIES_ELECTRODE}, - {5, 5, SPECIES_ELECTRODE}, - {5, 5, SPECIES_ELECTRODE}, - {5, 5, SPECIES_ELECTRODE}, - {5, 5, SPECIES_SEVIPER}, - {5, 5, SPECIES_MILOTIC}, - {5, 5, SPECIES_ELECTRODE}, - {5, 5, SPECIES_ELECTRODE}, - {5, 5, SPECIES_SEVIPER}, - {5, 5, SPECIES_MILOTIC}, -}; - -const struct WildPokemonInfo gBattlePikeMonsInfo_2 = {10, gBattlePikeMons_2}; - -const struct WildPokemon gBattlePikeMons_3[] = -{ - {5, 5, SPECIES_SEVIPER}, - {5, 5, SPECIES_MILOTIC}, - {5, 5, SPECIES_BRELOOM}, - {5, 5, SPECIES_BRELOOM}, - {5, 5, SPECIES_BRELOOM}, - {5, 5, SPECIES_BRELOOM}, - {5, 5, SPECIES_SEVIPER}, - {5, 5, SPECIES_MILOTIC}, - {5, 5, SPECIES_BRELOOM}, - {5, 5, SPECIES_BRELOOM}, - {5, 5, SPECIES_SEVIPER}, - {5, 5, SPECIES_MILOTIC}, -}; - -const struct WildPokemonInfo gBattlePikeMonsInfo_3 = {10, gBattlePikeMons_3}; - -const struct WildPokemon gBattlePikeMons_4[] = -{ - {5, 5, SPECIES_SEVIPER}, - {5, 5, SPECIES_MILOTIC}, - {5, 5, SPECIES_WOBBUFFET}, - {5, 5, SPECIES_WOBBUFFET}, - {5, 5, SPECIES_WOBBUFFET}, - {5, 5, SPECIES_WOBBUFFET}, - {5, 5, SPECIES_SEVIPER}, - {5, 5, SPECIES_MILOTIC}, - {5, 5, SPECIES_WOBBUFFET}, - {5, 5, SPECIES_WOBBUFFET}, - {5, 5, SPECIES_SEVIPER}, - {5, 5, SPECIES_MILOTIC}, -}; - -const struct WildPokemonInfo gBattlePikeMonsInfo_4 = {10, gBattlePikeMons_4}; - -const struct WildPokemonHeader gBattlePikeWildMonHeaders[] = -{ - { - .mapGroup = 0, - .mapNum = 1, - .landMonsInfo = &gBattlePikeMonsInfo_1, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = 0, - .mapNum = 2, - .landMonsInfo = &gBattlePikeMonsInfo_2, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = 0, - .mapNum = 3, - .landMonsInfo = &gBattlePikeMonsInfo_3, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = 0, - .mapNum = 4, - .landMonsInfo = &gBattlePikeMonsInfo_4, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, - { - .mapGroup = 255, - .mapNum = 255, - .landMonsInfo = NULL, - .waterMonsInfo = NULL, - .rockSmashMonsInfo = NULL, - .fishingMonsInfo = NULL, - }, -}; - -//Special Feebas-related data. - -const struct WildPokemon gWildFeebasRoute119Data = {20, 25, SPECIES_FEEBAS}; - -const u16 gRoute119WaterTileData[] = -{ - 0, 0x2D, 0, - 0x2E, 0x5B, 0x83, - 0x5C, 0x8B, 0x12A, -}; - diff --git a/src/data/wild_encounters.json b/src/data/wild_encounters.json new file mode 100755 index 000000000..6dd24bfed --- /dev/null +++ b/src/data/wild_encounters.json @@ -0,0 +1,12186 @@ +{ + "wild_encounter_groups": [ + { + "label": "gWildMonHeaders", + "for_maps": true, + "encounters": [ + { + "map": "MAP_ROUTE101", + "base_label": "gRoute101", + "land_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 2, + "max_level": 2, + "species": "SPECIES_WURMPLE" + }, + { + "min_level": 2, + "max_level": 2, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 2, + "max_level": 2, + "species": "SPECIES_WURMPLE" + }, + { + "min_level": 3, + "max_level": 3, + "species": "SPECIES_WURMPLE" + }, + { + "min_level": 3, + "max_level": 3, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 3, + "max_level": 3, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 3, + "max_level": 3, + "species": "SPECIES_WURMPLE" + }, + { + "min_level": 3, + "max_level": 3, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 2, + "max_level": 2, + "species": "SPECIES_ZIGZAGOON" + }, + { + "min_level": 2, + "max_level": 2, + "species": "SPECIES_ZIGZAGOON" + }, + { + "min_level": 3, + "max_level": 3, + "species": "SPECIES_ZIGZAGOON" + }, + { + "min_level": 3, + "max_level": 3, + "species": "SPECIES_ZIGZAGOON" + } + ] + } + }, + { + "map": "MAP_ROUTE102", + "base_label": "gRoute102", + "land_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 3, + "max_level": 3, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 3, + "max_level": 3, + "species": "SPECIES_WURMPLE" + }, + { + "min_level": 4, + "max_level": 4, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 4, + "max_level": 4, + "species": "SPECIES_WURMPLE" + }, + { + "min_level": 3, + "max_level": 3, + "species": "SPECIES_LOTAD" + }, + { + "min_level": 4, + "max_level": 4, + "species": "SPECIES_LOTAD" + }, + { + "min_level": 3, + "max_level": 3, + "species": "SPECIES_ZIGZAGOON" + }, + { + "min_level": 3, + "max_level": 3, + "species": "SPECIES_ZIGZAGOON" + }, + { + "min_level": 4, + "max_level": 4, + "species": "SPECIES_ZIGZAGOON" + }, + { + "min_level": 4, + "max_level": 4, + "species": "SPECIES_RALTS" + }, + { + "min_level": 4, + "max_level": 4, + "species": "SPECIES_ZIGZAGOON" + }, + { + "min_level": 3, + "max_level": 3, + "species": "SPECIES_SEEDOT" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 20, + "max_level": 30, + "species": "SPECIES_MARILL" + }, + { + "min_level": 10, + "max_level": 20, + "species": "SPECIES_MARILL" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_MARILL" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MARILL" + }, + { + "min_level": 20, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_CORPHISH" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_CORPHISH" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_CORPHISH" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_CORPHISH" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_CORPHISH" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_CORPHISH" + } + ] + } + }, + { + "map": "MAP_ROUTE103", + "base_label": "gRoute103", + "land_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 2, + "max_level": 2, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 3, + "max_level": 3, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 3, + "max_level": 3, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 4, + "max_level": 4, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 2, + "max_level": 2, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 3, + "max_level": 3, + "species": "SPECIES_ZIGZAGOON" + }, + { + "min_level": 3, + "max_level": 3, + "species": "SPECIES_ZIGZAGOON" + }, + { + "min_level": 4, + "max_level": 4, + "species": "SPECIES_ZIGZAGOON" + }, + { + "min_level": 3, + "max_level": 3, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 3, + "max_level": 3, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 2, + "max_level": 2, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 4, + "max_level": 4, + "species": "SPECIES_WINGULL" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_SHARPEDO" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_ROUTE104", + "base_label": "gRoute104", + "land_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 4, + "max_level": 4, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 4, + "max_level": 4, + "species": "SPECIES_WURMPLE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_MARILL" + }, + { + "min_level": 4, + "max_level": 4, + "species": "SPECIES_MARILL" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 4, + "max_level": 4, + "species": "SPECIES_TAILLOW" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_TAILLOW" + }, + { + "min_level": 4, + "max_level": 4, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 4, + "max_level": 4, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 3, + "max_level": 3, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WINGULL" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_MAGIKARP" + } + ] + } + }, + { + "map": "MAP_ROUTE105", + "base_label": "gRoute105", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_ROUTE110", + "base_label": "gRoute110", + "land_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 12, + "max_level": 12, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 12, + "max_level": 12, + "species": "SPECIES_ELECTRIKE" + }, + { + "min_level": 12, + "max_level": 12, + "species": "SPECIES_GULPIN" + }, + { + "min_level": 13, + "max_level": 13, + "species": "SPECIES_ELECTRIKE" + }, + { + "min_level": 13, + "max_level": 13, + "species": "SPECIES_MINUN" + }, + { + "min_level": 13, + "max_level": 13, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 13, + "max_level": 13, + "species": "SPECIES_MINUN" + }, + { + "min_level": 13, + "max_level": 13, + "species": "SPECIES_GULPIN" + }, + { + "min_level": 12, + "max_level": 12, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 12, + "max_level": 12, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 12, + "max_level": 12, + "species": "SPECIES_PLUSLE" + }, + { + "min_level": 13, + "max_level": 13, + "species": "SPECIES_PLUSLE" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_ROUTE111", + "base_label": "gRoute111", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 21, + "max_level": 21, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 21, + "max_level": 21, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 19, + "max_level": 19, + "species": "SPECIES_BALTOY" + }, + { + "min_level": 21, + "max_level": 21, + "species": "SPECIES_BALTOY" + }, + { + "min_level": 19, + "max_level": 19, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 19, + "max_level": 19, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_BALTOY" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_CACNEA" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_CACNEA" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_CACNEA" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 20, + "max_level": 30, + "species": "SPECIES_MARILL" + }, + { + "min_level": 10, + "max_level": 20, + "species": "SPECIES_MARILL" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_MARILL" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MARILL" + }, + { + "min_level": 20, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + } + ] + }, + "rock_smash_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 10, + "max_level": 15, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 15, + "max_level": 20, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 15, + "max_level": 20, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 15, + "max_level": 20, + "species": "SPECIES_GEODUDE" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_BARBOACH" + } + ] + } + }, + { + "map": "MAP_ROUTE112", + "base_label": "gRoute112", + "land_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 15, + "max_level": 15, + "species": "SPECIES_NUMEL" + }, + { + "min_level": 15, + "max_level": 15, + "species": "SPECIES_NUMEL" + }, + { + "min_level": 15, + "max_level": 15, + "species": "SPECIES_MARILL" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_NUMEL" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_NUMEL" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_MARILL" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_NUMEL" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_MARILL" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_NUMEL" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_NUMEL" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_NUMEL" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_NUMEL" + } + ] + } + }, + { + "map": "MAP_ROUTE113", + "base_label": "gRoute113", + "land_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 15, + "max_level": 15, + "species": "SPECIES_SPINDA" + }, + { + "min_level": 15, + "max_level": 15, + "species": "SPECIES_SPINDA" + }, + { + "min_level": 15, + "max_level": 15, + "species": "SPECIES_SLUGMA" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_SPINDA" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_SPINDA" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_SLUGMA" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_SPINDA" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_SLUGMA" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_SPINDA" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_SKARMORY" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_SPINDA" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_SKARMORY" + } + ] + } + }, + { + "map": "MAP_ROUTE114", + "base_label": "gRoute114", + "land_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_SWABLU" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_LOTAD" + }, + { + "min_level": 17, + "max_level": 17, + "species": "SPECIES_SWABLU" + }, + { + "min_level": 15, + "max_level": 15, + "species": "SPECIES_SWABLU" + }, + { + "min_level": 15, + "max_level": 15, + "species": "SPECIES_LOTAD" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_LOMBRE" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_LOMBRE" + }, + { + "min_level": 18, + "max_level": 18, + "species": "SPECIES_LOMBRE" + }, + { + "min_level": 17, + "max_level": 17, + "species": "SPECIES_SEVIPER" + }, + { + "min_level": 15, + "max_level": 15, + "species": "SPECIES_SEVIPER" + }, + { + "min_level": 17, + "max_level": 17, + "species": "SPECIES_SEVIPER" + }, + { + "min_level": 15, + "max_level": 15, + "species": "SPECIES_NUZLEAF" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 20, + "max_level": 30, + "species": "SPECIES_MARILL" + }, + { + "min_level": 10, + "max_level": 20, + "species": "SPECIES_MARILL" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_MARILL" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MARILL" + }, + { + "min_level": 20, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + } + ] + }, + "rock_smash_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 10, + "max_level": 15, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 15, + "max_level": 20, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 15, + "max_level": 20, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 15, + "max_level": 20, + "species": "SPECIES_GEODUDE" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_BARBOACH" + } + ] + } + }, + { + "map": "MAP_ROUTE116", + "base_label": "gRoute116", + "land_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 6, + "max_level": 6, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 6, + "max_level": 6, + "species": "SPECIES_WHISMUR" + }, + { + "min_level": 6, + "max_level": 6, + "species": "SPECIES_NINCADA" + }, + { + "min_level": 7, + "max_level": 7, + "species": "SPECIES_ABRA" + }, + { + "min_level": 7, + "max_level": 7, + "species": "SPECIES_NINCADA" + }, + { + "min_level": 6, + "max_level": 6, + "species": "SPECIES_TAILLOW" + }, + { + "min_level": 7, + "max_level": 7, + "species": "SPECIES_TAILLOW" + }, + { + "min_level": 8, + "max_level": 8, + "species": "SPECIES_TAILLOW" + }, + { + "min_level": 7, + "max_level": 7, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 8, + "max_level": 8, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 7, + "max_level": 7, + "species": "SPECIES_SKITTY" + }, + { + "min_level": 8, + "max_level": 8, + "species": "SPECIES_SKITTY" + } + ] + } + }, + { + "map": "MAP_ROUTE117", + "base_label": "gRoute117", + "land_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 13, + "max_level": 13, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 13, + "max_level": 13, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 13, + "max_level": 13, + "species": "SPECIES_MARILL" + }, + { + "min_level": 13, + "max_level": 13, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 13, + "max_level": 13, + "species": "SPECIES_ILLUMISE" + }, + { + "min_level": 13, + "max_level": 13, + "species": "SPECIES_ILLUMISE" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_ILLUMISE" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_ILLUMISE" + }, + { + "min_level": 13, + "max_level": 13, + "species": "SPECIES_VOLBEAT" + }, + { + "min_level": 13, + "max_level": 13, + "species": "SPECIES_SEEDOT" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 20, + "max_level": 30, + "species": "SPECIES_MARILL" + }, + { + "min_level": 10, + "max_level": 20, + "species": "SPECIES_MARILL" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_MARILL" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MARILL" + }, + { + "min_level": 20, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_CORPHISH" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_CORPHISH" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_CORPHISH" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_CORPHISH" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_CORPHISH" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_CORPHISH" + } + ] + } + }, + { + "map": "MAP_ROUTE118", + "base_label": "gRoute118", + "land_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_ZIGZAGOON" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_ELECTRIKE" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_ZIGZAGOON" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_ELECTRIKE" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_LINOONE" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_MANECTRIC" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_KECLEON" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_CARVANHA" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_SHARPEDO" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_CARVANHA" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_CARVANHA" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_CARVANHA" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_CARVANHA" + } + ] + } + }, + { + "map": "MAP_ROUTE124", + "base_label": "gRoute124", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_SHARPEDO" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_PETALBURG_WOODS", + "base_label": "gPetalburgWoods", + "land_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WURMPLE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SHROOMISH" + }, + { + "min_level": 6, + "max_level": 6, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SILCOON" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CASCOON" + }, + { + "min_level": 6, + "max_level": 6, + "species": "SPECIES_WURMPLE" + }, + { + "min_level": 6, + "max_level": 6, + "species": "SPECIES_SHROOMISH" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_TAILLOW" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SLAKOTH" + }, + { + "min_level": 6, + "max_level": 6, + "species": "SPECIES_TAILLOW" + }, + { + "min_level": 6, + "max_level": 6, + "species": "SPECIES_SLAKOTH" + } + ] + } + }, + { + "map": "MAP_RUSTURF_TUNNEL", + "base_label": "gRusturfTunnel", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 6, + "max_level": 6, + "species": "SPECIES_WHISMUR" + }, + { + "min_level": 7, + "max_level": 7, + "species": "SPECIES_WHISMUR" + }, + { + "min_level": 6, + "max_level": 6, + "species": "SPECIES_WHISMUR" + }, + { + "min_level": 6, + "max_level": 6, + "species": "SPECIES_WHISMUR" + }, + { + "min_level": 7, + "max_level": 7, + "species": "SPECIES_WHISMUR" + }, + { + "min_level": 7, + "max_level": 7, + "species": "SPECIES_WHISMUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WHISMUR" + }, + { + "min_level": 8, + "max_level": 8, + "species": "SPECIES_WHISMUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WHISMUR" + }, + { + "min_level": 8, + "max_level": 8, + "species": "SPECIES_WHISMUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WHISMUR" + }, + { + "min_level": 8, + "max_level": 8, + "species": "SPECIES_WHISMUR" + } + ] + } + }, + { + "map": "MAP_GRANITE_CAVE_1F", + "base_label": "gGraniteCave_1F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 7, + "max_level": 7, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 8, + "max_level": 8, + "species": "SPECIES_MAKUHITA" + }, + { + "min_level": 7, + "max_level": 7, + "species": "SPECIES_MAKUHITA" + }, + { + "min_level": 8, + "max_level": 8, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 9, + "max_level": 9, + "species": "SPECIES_MAKUHITA" + }, + { + "min_level": 8, + "max_level": 8, + "species": "SPECIES_ABRA" + }, + { + "min_level": 10, + "max_level": 10, + "species": "SPECIES_MAKUHITA" + }, + { + "min_level": 6, + "max_level": 6, + "species": "SPECIES_MAKUHITA" + }, + { + "min_level": 7, + "max_level": 7, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 8, + "max_level": 8, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 6, + "max_level": 6, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 9, + "max_level": 9, + "species": "SPECIES_GEODUDE" + } + ] + } + }, + { + "map": "MAP_GRANITE_CAVE_B1F", + "base_label": "gGraniteCave_B1F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 9, + "max_level": 9, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 10, + "max_level": 10, + "species": "SPECIES_ARON" + }, + { + "min_level": 9, + "max_level": 9, + "species": "SPECIES_ARON" + }, + { + "min_level": 11, + "max_level": 11, + "species": "SPECIES_ARON" + }, + { + "min_level": 10, + "max_level": 10, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 9, + "max_level": 9, + "species": "SPECIES_ABRA" + }, + { + "min_level": 10, + "max_level": 10, + "species": "SPECIES_MAKUHITA" + }, + { + "min_level": 11, + "max_level": 11, + "species": "SPECIES_MAKUHITA" + }, + { + "min_level": 10, + "max_level": 10, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 10, + "max_level": 10, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 9, + "max_level": 9, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 11, + "max_level": 11, + "species": "SPECIES_SABLEYE" + } + ] + } + }, + { + "map": "MAP_MT_PYRE_1F", + "base_label": "gMtPyre_1F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_SHUPPET" + } + ] + } + }, + { + "map": "MAP_VICTORY_ROAD_1F", + "base_label": "gVictoryRoad_1F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_HARIYAMA" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_LAIRON" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_LOUDRED" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_MAKUHITA" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_HARIYAMA" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_ARON" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_WHISMUR" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_ARON" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_WHISMUR" + } + ] + } + }, + { + "map": "MAP_SAFARI_ZONE_SOUTH", + "base_label": "gSafariZone_South", + "land_mons": { + "encounter_rate": 25, + "mons": [ + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_GIRAFARIG" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_GIRAFARIG" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_NATU" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_DODUO" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_GLOOM" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_WOBBUFFET" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_PIKACHU" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_WOBBUFFET" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_PIKACHU" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_WOBBUFFET" + } + ] + } + }, + { + "map": "MAP_UNDERWATER2", + "base_label": "gUnderwater2", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 20, + "max_level": 30, + "species": "SPECIES_CLAMPERL" + }, + { + "min_level": 20, + "max_level": 30, + "species": "SPECIES_CHINCHOU" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_CLAMPERL" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_RELICANTH" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_RELICANTH" + } + ] + } + }, + { + "map": "MAP_ABANDONED_SHIP_ROOMS_B1F", + "base_label": "gAbandonedShip_Rooms_B1F", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_TENTACRUEL" + } + ] + }, + "fishing_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_TENTACRUEL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_TENTACRUEL" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_TENTACRUEL" + } + ] + } + }, + { + "map": "MAP_GRANITE_CAVE_B2F", + "base_label": "gGraniteCave_B2F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 10, + "max_level": 10, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 11, + "max_level": 11, + "species": "SPECIES_ARON" + }, + { + "min_level": 10, + "max_level": 10, + "species": "SPECIES_ARON" + }, + { + "min_level": 11, + "max_level": 11, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 12, + "max_level": 12, + "species": "SPECIES_ARON" + }, + { + "min_level": 10, + "max_level": 10, + "species": "SPECIES_ABRA" + }, + { + "min_level": 10, + "max_level": 10, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 11, + "max_level": 11, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 12, + "max_level": 12, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 10, + "max_level": 10, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 12, + "max_level": 12, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 10, + "max_level": 10, + "species": "SPECIES_SABLEYE" + } + ] + }, + "rock_smash_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 10, + "max_level": 15, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 10, + "max_level": 20, + "species": "SPECIES_NOSEPASS" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 15, + "max_level": 20, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 15, + "max_level": 20, + "species": "SPECIES_GEODUDE" + } + ] + } + }, + { + "map": "MAP_FIERY_PATH", + "base_label": "gFieryPath", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 15, + "max_level": 15, + "species": "SPECIES_NUMEL" + }, + { + "min_level": 15, + "max_level": 15, + "species": "SPECIES_KOFFING" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_NUMEL" + }, + { + "min_level": 15, + "max_level": 15, + "species": "SPECIES_MACHOP" + }, + { + "min_level": 15, + "max_level": 15, + "species": "SPECIES_TORKOAL" + }, + { + "min_level": 15, + "max_level": 15, + "species": "SPECIES_SLUGMA" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_KOFFING" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_MACHOP" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_TORKOAL" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_TORKOAL" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_GRIMER" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_GRIMER" + } + ] + } + }, + { + "map": "MAP_METEOR_FALLS_B1F_2R", + "base_label": "gMeteorFalls_B1F_2R", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_BAGON" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_BAGON" + }, + { + "min_level": 37, + "max_level": 37, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_BAGON" + }, + { + "min_level": 39, + "max_level": 39, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_GOLBAT" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 25, + "max_level": 35, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 5, + "max_level": 15, + "species": "SPECIES_SOLROCK" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WHISCASH" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WHISCASH" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WHISCASH" + } + ] + } + }, + { + "map": "MAP_JAGGED_PASS", + "base_label": "gJaggedPass", + "land_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 21, + "max_level": 21, + "species": "SPECIES_NUMEL" + }, + { + "min_level": 21, + "max_level": 21, + "species": "SPECIES_NUMEL" + }, + { + "min_level": 21, + "max_level": 21, + "species": "SPECIES_MACHOP" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_NUMEL" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_SPOINK" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_MACHOP" + }, + { + "min_level": 21, + "max_level": 21, + "species": "SPECIES_SPOINK" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_MACHOP" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_NUMEL" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_SPOINK" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_NUMEL" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_SPOINK" + } + ] + } + }, + { + "map": "MAP_ROUTE106", + "base_label": "gRoute106", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_ROUTE107", + "base_label": "gRoute107", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_ROUTE108", + "base_label": "gRoute108", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_ROUTE109", + "base_label": "gRoute109", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_ROUTE115", + "base_label": "gRoute115", + "land_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_SWABLU" + }, + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_TAILLOW" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_SWABLU" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_TAILLOW" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_TAILLOW" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_SWELLOW" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_JIGGLYPUFF" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_JIGGLYPUFF" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_WINGULL" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_NEW_MAUVILLE_INSIDE", + "base_label": "gNewMauville_Inside", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_VOLTORB" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_MAGNEMITE" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_VOLTORB" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_MAGNEMITE" + }, + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_VOLTORB" + }, + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_MAGNEMITE" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_VOLTORB" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_MAGNEMITE" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_VOLTORB" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_MAGNEMITE" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_ELECTRODE" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_MAGNETON" + } + ] + } + }, + { + "map": "MAP_ROUTE119", + "base_label": "gRoute119", + "land_mons": { + "encounter_rate": 15, + "mons": [ + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_ZIGZAGOON" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_LINOONE" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_ZIGZAGOON" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_LINOONE" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_TROPIUS" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_TROPIUS" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_TROPIUS" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_KECLEON" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_CARVANHA" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_CARVANHA" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_CARVANHA" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_CARVANHA" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_CARVANHA" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_CARVANHA" + } + ] + } + }, + { + "map": "MAP_ROUTE120", + "base_label": "gRoute120", + "land_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_MIGHTYENA" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_MIGHTYENA" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_MARILL" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_MARILL" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_ABSOL" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_ABSOL" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_KECLEON" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_SEEDOT" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 20, + "max_level": 30, + "species": "SPECIES_MARILL" + }, + { + "min_level": 10, + "max_level": 20, + "species": "SPECIES_MARILL" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_MARILL" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MARILL" + }, + { + "min_level": 20, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_BARBOACH" + } + ] + } + }, + { + "map": "MAP_ROUTE121", + "base_label": "gRoute121", + "land_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_MIGHTYENA" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_MIGHTYENA" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_GLOOM" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_KECLEON" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_ROUTE122", + "base_label": "gRoute122", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_SHARPEDO" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_ROUTE123", + "base_label": "gRoute123", + "land_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_POOCHYENA" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_MIGHTYENA" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_MIGHTYENA" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_GLOOM" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_KECLEON" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_MT_PYRE_2F", + "base_label": "gMtPyre_2F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_SHUPPET" + } + ] + } + }, + { + "map": "MAP_MT_PYRE_3F", + "base_label": "gMtPyre_3F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_SHUPPET" + } + ] + } + }, + { + "map": "MAP_MT_PYRE_4F", + "base_label": "gMtPyre_4F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_DUSKULL" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_DUSKULL" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_DUSKULL" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_DUSKULL" + } + ] + } + }, + { + "map": "MAP_MT_PYRE_5F", + "base_label": "gMtPyre_5F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_DUSKULL" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_DUSKULL" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_DUSKULL" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_DUSKULL" + } + ] + } + }, + { + "map": "MAP_MT_PYRE_6F", + "base_label": "gMtPyre_6F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_DUSKULL" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_DUSKULL" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_DUSKULL" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_DUSKULL" + } + ] + } + }, + { + "map": "MAP_MT_PYRE_EXTERIOR", + "base_label": "gMtPyre_Exterior", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_VULPIX" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_VULPIX" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_VULPIX" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_VULPIX" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_WINGULL" + } + ] + } + }, + { + "map": "MAP_MT_PYRE_SUMMIT", + "base_label": "gMtPyre_Summit", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_SHUPPET" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_DUSKULL" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_DUSKULL" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_DUSKULL" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_CHIMECHO" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_CHIMECHO" + } + ] + } + }, + { + "map": "MAP_GRANITE_CAVE_STEVENS_ROOM", + "base_label": "gGraniteCave_StevensRoom", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 7, + "max_level": 7, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 8, + "max_level": 8, + "species": "SPECIES_MAKUHITA" + }, + { + "min_level": 7, + "max_level": 7, + "species": "SPECIES_MAKUHITA" + }, + { + "min_level": 8, + "max_level": 8, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 9, + "max_level": 9, + "species": "SPECIES_MAKUHITA" + }, + { + "min_level": 8, + "max_level": 8, + "species": "SPECIES_ABRA" + }, + { + "min_level": 10, + "max_level": 10, + "species": "SPECIES_MAKUHITA" + }, + { + "min_level": 6, + "max_level": 6, + "species": "SPECIES_MAKUHITA" + }, + { + "min_level": 7, + "max_level": 7, + "species": "SPECIES_ARON" + }, + { + "min_level": 8, + "max_level": 8, + "species": "SPECIES_ARON" + }, + { + "min_level": 7, + "max_level": 7, + "species": "SPECIES_ARON" + }, + { + "min_level": 8, + "max_level": 8, + "species": "SPECIES_ARON" + } + ] + } + }, + { + "map": "MAP_ROUTE125", + "base_label": "gRoute125", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_SHARPEDO" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_ROUTE126", + "base_label": "gRoute126", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_SHARPEDO" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_ROUTE127", + "base_label": "gRoute127", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_SHARPEDO" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_ROUTE128", + "base_label": "gRoute128", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_LUVDISC" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_LUVDISC" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_CORSOLA" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_ROUTE129", + "base_label": "gRoute129", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILORD" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_SHARPEDO" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_ROUTE130", + "base_label": "gRoute130", + "land_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_WYNAUT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_WYNAUT" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_WYNAUT" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_WYNAUT" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_WYNAUT" + }, + { + "min_level": 45, + "max_level": 45, + "species": "SPECIES_WYNAUT" + }, + { + "min_level": 15, + "max_level": 15, + "species": "SPECIES_WYNAUT" + }, + { + "min_level": 50, + "max_level": 50, + "species": "SPECIES_WYNAUT" + }, + { + "min_level": 10, + "max_level": 10, + "species": "SPECIES_WYNAUT" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WYNAUT" + }, + { + "min_level": 10, + "max_level": 10, + "species": "SPECIES_WYNAUT" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WYNAUT" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_SHARPEDO" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_ROUTE131", + "base_label": "gRoute131", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_SHARPEDO" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_ROUTE132", + "base_label": "gRoute132", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_SHARPEDO" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_HORSEA" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_ROUTE133", + "base_label": "gRoute133", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_SHARPEDO" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_HORSEA" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_ROUTE134", + "base_label": "gRoute134", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_SHARPEDO" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_HORSEA" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS", + "base_label": "gAbandonedShip_HiddenFloorCorridors", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_TENTACRUEL" + } + ] + }, + "fishing_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_TENTACRUEL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_TENTACRUEL" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_TENTACRUEL" + } + ] + } + }, + { + "map": "MAP_SEAFLOOR_CAVERN_ROOM1", + "base_label": "gSeafloorCavern_Room1", + "land_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_GOLBAT" + } + ] + } + }, + { + "map": "MAP_SEAFLOOR_CAVERN_ROOM2", + "base_label": "gSeafloorCavern_Room2", + "land_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_GOLBAT" + } + ] + } + }, + { + "map": "MAP_SEAFLOOR_CAVERN_ROOM3", + "base_label": "gSeafloorCavern_Room3", + "land_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_GOLBAT" + } + ] + } + }, + { + "map": "MAP_SEAFLOOR_CAVERN_ROOM4", + "base_label": "gSeafloorCavern_Room4", + "land_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_GOLBAT" + } + ] + } + }, + { + "map": "MAP_SEAFLOOR_CAVERN_ROOM5", + "base_label": "gSeafloorCavern_Room5", + "land_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_GOLBAT" + } + ] + } + }, + { + "map": "MAP_SEAFLOOR_CAVERN_ROOM6", + "base_label": "gSeafloorCavern_Room6", + "land_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_GOLBAT" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_GOLBAT" + } + ] + }, + "fishing_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_SEAFLOOR_CAVERN_ROOM7", + "base_label": "gSeafloorCavern_Room7", + "land_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_GOLBAT" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_GOLBAT" + } + ] + }, + "fishing_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_SEAFLOOR_CAVERN_ROOM8", + "base_label": "gSeafloorCavern_Room8", + "land_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_GOLBAT" + } + ] + } + }, + { + "map": "MAP_SEAFLOOR_CAVERN_ENTRANCE", + "base_label": "gSeafloorCavern_Entrance", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_GOLBAT" + } + ] + }, + "fishing_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_CAVE_OF_ORIGIN_ENTRANCE", + "base_label": "gCaveOfOrigin_Entrance", + "land_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_GOLBAT" + } + ] + } + }, + { + "map": "MAP_CAVE_OF_ORIGIN_1F", + "base_label": "gCaveOfOrigin_1F", + "land_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_GOLBAT" + } + ] + } + }, + { + "map": "MAP_CAVE_OF_ORIGIN_UNUSED_RUBY_SAPPHIRE_MAP1", + "base_label": "gCaveOfOrigin_UnusedRubySapphireMap1", + "land_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_GOLBAT" + } + ] + } + }, + { + "map": "MAP_CAVE_OF_ORIGIN_UNUSED_RUBY_SAPPHIRE_MAP2", + "base_label": "gCaveOfOrigin_UnusedRubySapphireMap2", + "land_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_GOLBAT" + } + ] + } + }, + { + "map": "MAP_CAVE_OF_ORIGIN_UNUSED_RUBY_SAPPHIRE_MAP3", + "base_label": "gCaveOfOrigin_UnusedRubySapphireMap3", + "land_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_GOLBAT" + } + ] + } + }, + { + "map": "MAP_NEW_MAUVILLE_ENTRANCE", + "base_label": "gNewMauville_Entrance", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_VOLTORB" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_MAGNEMITE" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_VOLTORB" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_MAGNEMITE" + }, + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_VOLTORB" + }, + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_MAGNEMITE" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_VOLTORB" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_MAGNEMITE" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_VOLTORB" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_MAGNEMITE" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_VOLTORB" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_MAGNEMITE" + } + ] + } + }, + { + "map": "MAP_SAFARI_ZONE_SOUTHWEST", + "base_label": "gSafariZone_Southwest", + "land_mons": { + "encounter_rate": 25, + "mons": [ + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_GIRAFARIG" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_GIRAFARIG" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_NATU" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_DODUO" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_GLOOM" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_WOBBUFFET" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_PIKACHU" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_WOBBUFFET" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_PIKACHU" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_WOBBUFFET" + } + ] + }, + "water_mons": { + "encounter_rate": 9, + "mons": [ + { + "min_level": 20, + "max_level": 30, + "species": "SPECIES_PSYDUCK" + }, + { + "min_level": 20, + "max_level": 30, + "species": "SPECIES_PSYDUCK" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_PSYDUCK" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_PSYDUCK" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_PSYDUCK" + } + ] + }, + "fishing_mons": { + "encounter_rate": 35, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 25, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_SEAKING" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_SEAKING" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_SEAKING" + } + ] + } + }, + { + "map": "MAP_SAFARI_ZONE_NORTH", + "base_label": "gSafariZone_North", + "land_mons": { + "encounter_rate": 25, + "mons": [ + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_PHANPY" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_PHANPY" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_NATU" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_GLOOM" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_GLOOM" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_NATU" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_XATU" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_HERACROSS" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_XATU" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_HERACROSS" + } + ] + }, + "rock_smash_mons": { + "encounter_rate": 25, + "mons": [ + { + "min_level": 10, + "max_level": 15, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 15, + "max_level": 20, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_GEODUDE" + } + ] + } + }, + { + "map": "MAP_SAFARI_ZONE_NORTHWEST", + "base_label": "gSafariZone_Northwest", + "land_mons": { + "encounter_rate": 25, + "mons": [ + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_RHYHORN" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_RHYHORN" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_ODDISH" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_DODUO" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_GLOOM" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_GLOOM" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_DODUO" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_DODRIO" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_PINSIR" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_DODRIO" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_PINSIR" + } + ] + }, + "water_mons": { + "encounter_rate": 9, + "mons": [ + { + "min_level": 20, + "max_level": 30, + "species": "SPECIES_PSYDUCK" + }, + { + "min_level": 20, + "max_level": 30, + "species": "SPECIES_PSYDUCK" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_PSYDUCK" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_GOLDUCK" + }, + { + "min_level": 25, + "max_level": 40, + "species": "SPECIES_GOLDUCK" + } + ] + }, + "fishing_mons": { + "encounter_rate": 35, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 25, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_SEAKING" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_SEAKING" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_SEAKING" + } + ] + } + }, + { + "map": "MAP_VICTORY_ROAD_B1F", + "base_label": "gVictoryRoad_B1F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_HARIYAMA" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_LAIRON" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_LAIRON" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_HARIYAMA" + }, + { + "min_level": 42, + "max_level": 42, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 42, + "max_level": 42, + "species": "SPECIES_HARIYAMA" + }, + { + "min_level": 42, + "max_level": 42, + "species": "SPECIES_LAIRON" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_MAWILE" + }, + { + "min_level": 42, + "max_level": 42, + "species": "SPECIES_LAIRON" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_MAWILE" + } + ] + }, + "rock_smash_mons": { + "encounter_rate": 20, + "mons": [ + { + "min_level": 30, + "max_level": 40, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 30, + "max_level": 40, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_GRAVELER" + } + ] + } + }, + { + "map": "MAP_VICTORY_ROAD_B2F", + "base_label": "gVictoryRoad_B2F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_LAIRON" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_LAIRON" + }, + { + "min_level": 42, + "max_level": 42, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 42, + "max_level": 42, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 44, + "max_level": 44, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 44, + "max_level": 44, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 42, + "max_level": 42, + "species": "SPECIES_LAIRON" + }, + { + "min_level": 42, + "max_level": 42, + "species": "SPECIES_MAWILE" + }, + { + "min_level": 44, + "max_level": 44, + "species": "SPECIES_LAIRON" + }, + { + "min_level": 44, + "max_level": 44, + "species": "SPECIES_MAWILE" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_GOLBAT" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WHISCASH" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WHISCASH" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WHISCASH" + } + ] + } + }, + { + "map": "MAP_METEOR_FALLS_1F_1R", + "base_label": "gMeteorFalls_1F_1R", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 17, + "max_level": 17, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 18, + "max_level": 18, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 15, + "max_level": 15, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 18, + "max_level": 18, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 19, + "max_level": 19, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 19, + "max_level": 19, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_ZUBAT" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 25, + "max_level": 35, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 5, + "max_level": 15, + "species": "SPECIES_SOLROCK" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_BARBOACH" + } + ] + } + }, + { + "map": "MAP_METEOR_FALLS_1F_2R", + "base_label": "gMeteorFalls_1F_2R", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 37, + "max_level": 37, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 39, + "max_level": 39, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_GOLBAT" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 25, + "max_level": 35, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 5, + "max_level": 15, + "species": "SPECIES_SOLROCK" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WHISCASH" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WHISCASH" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WHISCASH" + } + ] + } + }, + { + "map": "MAP_METEOR_FALLS_B1F_1R", + "base_label": "gMeteorFalls_B1F_1R", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 37, + "max_level": 37, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 39, + "max_level": 39, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_GOLBAT" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 25, + "max_level": 35, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 5, + "max_level": 15, + "species": "SPECIES_SOLROCK" + } + ] + }, + "fishing_mons": { + "encounter_rate": 30, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_BARBOACH" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WHISCASH" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WHISCASH" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WHISCASH" + } + ] + } + }, + { + "map": "MAP_SHOAL_CAVE_LOW_TIDE_STAIRS_ROOM", + "base_label": "gShoalCave_LowTideStairsRoom", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_SPHEAL" + } + ] + } + }, + { + "map": "MAP_SHOAL_CAVE_LOW_TIDE_LOWER_ROOM", + "base_label": "gShoalCave_LowTideLowerRoom", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_SPHEAL" + } + ] + } + }, + { + "map": "MAP_SHOAL_CAVE_LOW_TIDE_INNER_ROOM", + "base_label": "gShoalCave_LowTideInnerRoom", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_SPHEAL" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 25, + "max_level": 35, + "species": "SPECIES_SPHEAL" + } + ] + }, + "fishing_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_SHOAL_CAVE_LOW_TIDE_ENTRANCE_ROOM", + "base_label": "gShoalCave_LowTideEntranceRoom", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_SPHEAL" + } + ] + }, + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 25, + "max_level": 35, + "species": "SPECIES_SPHEAL" + } + ] + }, + "fishing_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_LILYCOVE_CITY", + "base_label": "gLilycoveCity", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_STARYU" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_DEWFORD_TOWN", + "base_label": "gDewfordTown", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_SLATEPORT_CITY", + "base_label": "gSlateportCity", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_MOSSDEEP_CITY", + "base_label": "gMossdeepCity", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_SHARPEDO" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_PACIFIDLOG_TOWN", + "base_label": "gPacifidlogTown", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_SHARPEDO" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_EVER_GRANDE_CITY", + "base_label": "gEverGrandeCity", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_WINGULL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_PELIPPER" + } + ] + }, + "fishing_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_LUVDISC" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_LUVDISC" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_CORSOLA" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_WAILMER" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_WAILMER" + } + ] + } + }, + { + "map": "MAP_PETALBURG_CITY", + "base_label": "gPetalburgCity", + "water_mons": { + "encounter_rate": 1, + "mons": [ + { + "min_level": 20, + "max_level": 30, + "species": "SPECIES_MARILL" + }, + { + "min_level": 10, + "max_level": 20, + "species": "SPECIES_MARILL" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_MARILL" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MARILL" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MARILL" + } + ] + }, + "fishing_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_CORPHISH" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_CORPHISH" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_CORPHISH" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_CORPHISH" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_CORPHISH" + }, + { + "min_level": 40, + "max_level": 45, + "species": "SPECIES_CORPHISH" + } + ] + } + }, + { + "map": "MAP_UNDERWATER1", + "base_label": "gUnderwater1", + "water_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 20, + "max_level": 30, + "species": "SPECIES_CLAMPERL" + }, + { + "min_level": 20, + "max_level": 30, + "species": "SPECIES_CHINCHOU" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_CLAMPERL" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_RELICANTH" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_RELICANTH" + } + ] + } + }, + { + "map": "MAP_SHOAL_CAVE_LOW_TIDE_ICE_ROOM", + "base_label": "gShoalCave_LowTideIceRoom", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_SNORUNT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_SPHEAL" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_SNORUNT" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_SNORUNT" + } + ] + } + }, + { + "map": "MAP_SKY_PILLAR_1F", + "base_label": "gSkyPillar_1F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_CLAYDOL" + }, + { + "min_level": 37, + "max_level": 37, + "species": "SPECIES_BANETTE" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_BANETTE" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_CLAYDOL" + }, + { + "min_level": 37, + "max_level": 37, + "species": "SPECIES_CLAYDOL" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_CLAYDOL" + }, + { + "min_level": 37, + "max_level": 37, + "species": "SPECIES_CLAYDOL" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_CLAYDOL" + } + ] + } + }, + { + "map": "MAP_SOOTOPOLIS_CITY", + "base_label": "gSootopolisCity", + "water_mons": { + "encounter_rate": 1, + "mons": [ + { + "min_level": 5, + "max_level": 35, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 15, + "max_level": 25, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + } + ] + }, + "fishing_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 5, + "max_level": 10, + "species": "SPECIES_TENTACOOL" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 10, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_GYARADOS" + }, + { + "min_level": 35, + "max_level": 45, + "species": "SPECIES_GYARADOS" + }, + { + "min_level": 5, + "max_level": 45, + "species": "SPECIES_GYARADOS" + } + ] + } + }, + { + "map": "MAP_SKY_PILLAR_3F", + "base_label": "gSkyPillar_3F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_CLAYDOL" + }, + { + "min_level": 37, + "max_level": 37, + "species": "SPECIES_BANETTE" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_BANETTE" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_CLAYDOL" + }, + { + "min_level": 37, + "max_level": 37, + "species": "SPECIES_CLAYDOL" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_CLAYDOL" + }, + { + "min_level": 37, + "max_level": 37, + "species": "SPECIES_CLAYDOL" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_CLAYDOL" + } + ] + } + }, + { + "map": "MAP_SKY_PILLAR_5F", + "base_label": "gSkyPillar_5F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_SABLEYE" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_CLAYDOL" + }, + { + "min_level": 37, + "max_level": 37, + "species": "SPECIES_BANETTE" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_BANETTE" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_CLAYDOL" + }, + { + "min_level": 37, + "max_level": 37, + "species": "SPECIES_CLAYDOL" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_ALTARIA" + }, + { + "min_level": 39, + "max_level": 39, + "species": "SPECIES_ALTARIA" + }, + { + "min_level": 39, + "max_level": 39, + "species": "SPECIES_ALTARIA" + } + ] + } + }, + { + "map": "MAP_SAFARI_ZONE_SOUTHEAST", + "base_label": "gSafariZone_Southeast", + "land_mons": { + "encounter_rate": 25, + "mons": [ + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_SUNKERN" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_MAREEP" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_SUNKERN" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_MAREEP" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_AIPOM" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_SPINARAK" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_HOOTHOOT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_SNUBBULL" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_STANTLER" + }, + { + "min_level": 37, + "max_level": 37, + "species": "SPECIES_GLIGAR" + }, + { + "min_level": 39, + "max_level": 39, + "species": "SPECIES_STANTLER" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_GLIGAR" + } + ] + }, + "water_mons": { + "encounter_rate": 9, + "mons": [ + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_WOOPER" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_MARILL" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_MARILL" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_MARILL" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_QUAGSIRE" + } + ] + }, + "fishing_mons": { + "encounter_rate": 35, + "mons": [ + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_MAGIKARP" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_REMORAID" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_GOLDEEN" + }, + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_REMORAID" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_REMORAID" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_REMORAID" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_OCTILLERY" + } + ] + } + }, + { + "map": "MAP_SAFARI_ZONE_NORTHEAST", + "base_label": "gSafariZone_Northeast", + "land_mons": { + "encounter_rate": 25, + "mons": [ + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_AIPOM" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_TEDDIURSA" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_AIPOM" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_TEDDIURSA" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_SUNKERN" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_LEDYBA" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_HOOTHOOT" + }, + { + "min_level": 34, + "max_level": 34, + "species": "SPECIES_PINECO" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_HOUNDOUR" + }, + { + "min_level": 37, + "max_level": 37, + "species": "SPECIES_MILTANK" + }, + { + "min_level": 39, + "max_level": 39, + "species": "SPECIES_HOUNDOUR" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_MILTANK" + } + ] + }, + "rock_smash_mons": { + "encounter_rate": 25, + "mons": [ + { + "min_level": 25, + "max_level": 30, + "species": "SPECIES_SHUCKLE" + }, + { + "min_level": 20, + "max_level": 25, + "species": "SPECIES_SHUCKLE" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_SHUCKLE" + }, + { + "min_level": 30, + "max_level": 35, + "species": "SPECIES_SHUCKLE" + }, + { + "min_level": 35, + "max_level": 40, + "species": "SPECIES_SHUCKLE" + } + ] + } + }, + { + "map": "MAP_MAGMA_HIDEOUT_1F", + "base_label": "gMagmaHideout_1F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_TORKOAL" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_TORKOAL" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GRAVELER" + } + ] + } + }, + { + "map": "MAP_MAGMA_HIDEOUT_2F_1R", + "base_label": "gMagmaHideout_2F_1R", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_TORKOAL" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_TORKOAL" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GRAVELER" + } + ] + } + }, + { + "map": "MAP_MAGMA_HIDEOUT_2F_2R", + "base_label": "gMagmaHideout_2F_2R", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_TORKOAL" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_TORKOAL" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GRAVELER" + } + ] + } + }, + { + "map": "MAP_MAGMA_HIDEOUT_3F_1R", + "base_label": "gMagmaHideout_3F_1R", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_TORKOAL" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_TORKOAL" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GRAVELER" + } + ] + } + }, + { + "map": "MAP_MAGMA_HIDEOUT_3F_2R", + "base_label": "gMagmaHideout_3F_2R", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_TORKOAL" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_TORKOAL" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GRAVELER" + } + ] + } + }, + { + "map": "MAP_MAGMA_HIDEOUT_4F", + "base_label": "gMagmaHideout_4F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_TORKOAL" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_TORKOAL" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GRAVELER" + } + ] + } + }, + { + "map": "MAP_MAGMA_HIDEOUT_3F_3R", + "base_label": "gMagmaHideout_3F_3R", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_TORKOAL" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_TORKOAL" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GRAVELER" + } + ] + } + }, + { + "map": "MAP_MAGMA_HIDEOUT_2F_3R", + "base_label": "gMagmaHideout_2F_3R", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_TORKOAL" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_TORKOAL" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GEODUDE" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 30, + "max_level": 30, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 31, + "max_level": 31, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 32, + "max_level": 32, + "species": "SPECIES_GRAVELER" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GRAVELER" + } + ] + } + }, + { + "map": "MAP_MIRAGE_TOWER_1F", + "base_label": "gMirageTower_1F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 21, + "max_level": 21, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 21, + "max_level": 21, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_TRAPINCH" + } + ] + } + }, + { + "map": "MAP_MIRAGE_TOWER_2F", + "base_label": "gMirageTower_2F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 21, + "max_level": 21, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 21, + "max_level": 21, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_TRAPINCH" + } + ] + } + }, + { + "map": "MAP_MIRAGE_TOWER_3F", + "base_label": "gMirageTower_3F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 21, + "max_level": 21, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 21, + "max_level": 21, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_TRAPINCH" + } + ] + } + }, + { + "map": "MAP_MIRAGE_TOWER_4F", + "base_label": "gMirageTower_4F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 21, + "max_level": 21, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 21, + "max_level": 21, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_TRAPINCH" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_SANDSHREW" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_TRAPINCH" + } + ] + } + }, + { + "map": "MAP_DESERT_UNDERPASS", + "base_label": "gDesertUnderpass", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_DITTO" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_WHISMUR" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_DITTO" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_LOUDRED" + }, + { + "min_level": 41, + "max_level": 41, + "species": "SPECIES_DITTO" + }, + { + "min_level": 36, + "max_level": 36, + "species": "SPECIES_WHISMUR" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_LOUDRED" + }, + { + "min_level": 42, + "max_level": 42, + "species": "SPECIES_DITTO" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_WHISMUR" + }, + { + "min_level": 43, + "max_level": 43, + "species": "SPECIES_DITTO" + }, + { + "min_level": 44, + "max_level": 44, + "species": "SPECIES_LOUDRED" + }, + { + "min_level": 45, + "max_level": 45, + "species": "SPECIES_DITTO" + } + ] + } + }, + { + "map": "MAP_ARTISAN_CAVE_B1F", + "base_label": "gArtisanCave_B1F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 41, + "max_level": 41, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 42, + "max_level": 42, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 43, + "max_level": 43, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 44, + "max_level": 44, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 45, + "max_level": 45, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 46, + "max_level": 46, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 47, + "max_level": 47, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 48, + "max_level": 48, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 49, + "max_level": 49, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 50, + "max_level": 50, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 50, + "max_level": 50, + "species": "SPECIES_SMEARGLE" + } + ] + } + }, + { + "map": "MAP_ARTISAN_CAVE_1F", + "base_label": "gArtisanCave_1F", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 41, + "max_level": 41, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 42, + "max_level": 42, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 43, + "max_level": 43, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 44, + "max_level": 44, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 45, + "max_level": 45, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 46, + "max_level": 46, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 47, + "max_level": 47, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 48, + "max_level": 48, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 49, + "max_level": 49, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 50, + "max_level": 50, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 50, + "max_level": 50, + "species": "SPECIES_SMEARGLE" + } + ] + } + }, + { + "map": "MAP_ALTERING_CAVE", + "base_label": "gAlteringCave1", + "land_mons": { + "encounter_rate": 7, + "mons": [ + { + "min_level": 10, + "max_level": 10, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 12, + "max_level": 12, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 8, + "max_level": 8, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 10, + "max_level": 10, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 12, + "max_level": 12, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 6, + "max_level": 6, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 8, + "max_level": 8, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 8, + "max_level": 8, + "species": "SPECIES_ZUBAT" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_ZUBAT" + } + ] + } + }, + { + "map": "MAP_ALTERING_CAVE", + "base_label": "gAlteringCave2", + "land_mons": { + "encounter_rate": 7, + "mons": [ + { + "min_level": 7, + "max_level": 7, + "species": "SPECIES_MAREEP" + }, + { + "min_level": 9, + "max_level": 9, + "species": "SPECIES_MAREEP" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_MAREEP" + }, + { + "min_level": 11, + "max_level": 11, + "species": "SPECIES_MAREEP" + }, + { + "min_level": 7, + "max_level": 7, + "species": "SPECIES_MAREEP" + }, + { + "min_level": 9, + "max_level": 9, + "species": "SPECIES_MAREEP" + }, + { + "min_level": 13, + "max_level": 13, + "species": "SPECIES_MAREEP" + }, + { + "min_level": 3, + "max_level": 3, + "species": "SPECIES_MAREEP" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_MAREEP" + }, + { + "min_level": 11, + "max_level": 11, + "species": "SPECIES_MAREEP" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_MAREEP" + }, + { + "min_level": 11, + "max_level": 11, + "species": "SPECIES_MAREEP" + } + ] + } + }, + { + "map": "MAP_ALTERING_CAVE", + "base_label": "gAlteringCave3", + "land_mons": { + "encounter_rate": 7, + "mons": [ + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_PINECO" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_PINECO" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_PINECO" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_PINECO" + }, + { + "min_level": 23, + "max_level": 23, + "species": "SPECIES_PINECO" + }, + { + "min_level": 25, + "max_level": 25, + "species": "SPECIES_PINECO" + }, + { + "min_level": 29, + "max_level": 29, + "species": "SPECIES_PINECO" + }, + { + "min_level": 19, + "max_level": 19, + "species": "SPECIES_PINECO" + }, + { + "min_level": 21, + "max_level": 21, + "species": "SPECIES_PINECO" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_PINECO" + }, + { + "min_level": 21, + "max_level": 21, + "species": "SPECIES_PINECO" + }, + { + "min_level": 27, + "max_level": 27, + "species": "SPECIES_PINECO" + } + ] + } + }, + { + "map": "MAP_ALTERING_CAVE", + "base_label": "gAlteringCave4", + "land_mons": { + "encounter_rate": 7, + "mons": [ + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_HOUNDOUR" + }, + { + "min_level": 18, + "max_level": 18, + "species": "SPECIES_HOUNDOUR" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_HOUNDOUR" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_HOUNDOUR" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_HOUNDOUR" + }, + { + "min_level": 18, + "max_level": 18, + "species": "SPECIES_HOUNDOUR" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_HOUNDOUR" + }, + { + "min_level": 12, + "max_level": 12, + "species": "SPECIES_HOUNDOUR" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_HOUNDOUR" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_HOUNDOUR" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_HOUNDOUR" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_HOUNDOUR" + } + ] + } + }, + { + "map": "MAP_ALTERING_CAVE", + "base_label": "gAlteringCave5", + "land_mons": { + "encounter_rate": 7, + "mons": [ + { + "min_level": 10, + "max_level": 10, + "species": "SPECIES_TEDDIURSA" + }, + { + "min_level": 12, + "max_level": 12, + "species": "SPECIES_TEDDIURSA" + }, + { + "min_level": 8, + "max_level": 8, + "species": "SPECIES_TEDDIURSA" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_TEDDIURSA" + }, + { + "min_level": 10, + "max_level": 10, + "species": "SPECIES_TEDDIURSA" + }, + { + "min_level": 12, + "max_level": 12, + "species": "SPECIES_TEDDIURSA" + }, + { + "min_level": 16, + "max_level": 16, + "species": "SPECIES_TEDDIURSA" + }, + { + "min_level": 6, + "max_level": 6, + "species": "SPECIES_TEDDIURSA" + }, + { + "min_level": 8, + "max_level": 8, + "species": "SPECIES_TEDDIURSA" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_TEDDIURSA" + }, + { + "min_level": 8, + "max_level": 8, + "species": "SPECIES_TEDDIURSA" + }, + { + "min_level": 14, + "max_level": 14, + "species": "SPECIES_TEDDIURSA" + } + ] + } + }, + { + "map": "MAP_ALTERING_CAVE", + "base_label": "gAlteringCave6", + "land_mons": { + "encounter_rate": 7, + "mons": [ + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_AIPOM" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_AIPOM" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_AIPOM" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_AIPOM" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_AIPOM" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_AIPOM" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_AIPOM" + }, + { + "min_level": 18, + "max_level": 18, + "species": "SPECIES_AIPOM" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_AIPOM" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_AIPOM" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_AIPOM" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_AIPOM" + } + ] + } + }, + { + "map": "MAP_ALTERING_CAVE", + "base_label": "gAlteringCave7", + "land_mons": { + "encounter_rate": 7, + "mons": [ + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_SHUCKLE" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_SHUCKLE" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_SHUCKLE" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_SHUCKLE" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_SHUCKLE" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_SHUCKLE" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_SHUCKLE" + }, + { + "min_level": 18, + "max_level": 18, + "species": "SPECIES_SHUCKLE" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_SHUCKLE" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_SHUCKLE" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_SHUCKLE" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_SHUCKLE" + } + ] + } + }, + { + "map": "MAP_ALTERING_CAVE", + "base_label": "gAlteringCave8", + "land_mons": { + "encounter_rate": 7, + "mons": [ + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_STANTLER" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_STANTLER" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_STANTLER" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_STANTLER" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_STANTLER" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_STANTLER" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_STANTLER" + }, + { + "min_level": 18, + "max_level": 18, + "species": "SPECIES_STANTLER" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_STANTLER" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_STANTLER" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_STANTLER" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_STANTLER" + } + ] + } + }, + { + "map": "MAP_ALTERING_CAVE", + "base_label": "gAlteringCave9", + "land_mons": { + "encounter_rate": 7, + "mons": [ + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 22, + "max_level": 22, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 24, + "max_level": 24, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 28, + "max_level": 28, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 18, + "max_level": 18, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 20, + "max_level": 20, + "species": "SPECIES_SMEARGLE" + }, + { + "min_level": 26, + "max_level": 26, + "species": "SPECIES_SMEARGLE" + } + ] + } + }, + { + "map": "MAP_METEOR_FALLS_STEVENS_CAVE", + "base_label": "gMeteorFalls_StevensCave", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 33, + "max_level": 33, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 37, + "max_level": 37, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 35, + "max_level": 35, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 39, + "max_level": 39, + "species": "SPECIES_SOLROCK" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 38, + "max_level": 38, + "species": "SPECIES_GOLBAT" + }, + { + "min_level": 40, + "max_level": 40, + "species": "SPECIES_GOLBAT" + } + ] + } + } + ] + }, + { + "label": "gBattlePyramidWildMonHeaders", + "for_maps": false, + "encounters": [ + { + "base_label": "gBattlePyramid_1", + "land_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_BULBASAUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_BULBASAUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_BULBASAUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_BULBASAUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_IVYSAUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_IVYSAUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_VENUSAUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_VENUSAUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_VENUSAUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMANDER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_VENUSAUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMANDER" + } + ] + } + }, + { + "base_label": "gBattlePyramid_2", + "land_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_IVYSAUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_IVYSAUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_IVYSAUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_IVYSAUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_VENUSAUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_VENUSAUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMANDER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMANDER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMANDER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMELEON" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMELEON" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMANDER" + } + ] + } + }, + { + "base_label": "gBattlePyramid_3", + "land_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_VENUSAUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_VENUSAUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_VENUSAUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_VENUSAUR" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMANDER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMANDER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMELEON" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMELEON" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMELEON" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARIZARD" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMELEON" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARIZARD" + } + ] + } + }, + { + "base_label": "gBattlePyramid_4", + "land_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMANDER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMANDER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMANDER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMANDER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMELEON" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMELEON" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARIZARD" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARIZARD" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARIZARD" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SQUIRTLE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARIZARD" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SQUIRTLE" + } + ] + } + }, + { + "base_label": "gBattlePyramid_5", + "land_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMELEON" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMELEON" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMELEON" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMELEON" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARIZARD" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARIZARD" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SQUIRTLE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SQUIRTLE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SQUIRTLE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WARTORTLE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SQUIRTLE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WARTORTLE" + } + ] + } + }, + { + "base_label": "gBattlePyramid_6", + "land_mons": { + "encounter_rate": 4, + "mons": [ + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARIZARD" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARIZARD" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARIZARD" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMELEON" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SQUIRTLE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SQUIRTLE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WARTORTLE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WARTORTLE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WARTORTLE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WARTORTLE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WARTORTLE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WARTORTLE" + } + ] + } + }, + { + "base_label": "gBattlePyramid_7", + "land_mons": { + "encounter_rate": 8, + "mons": [ + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WARTORTLE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WARTORTLE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SQUIRTLE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SQUIRTLE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SQUIRTLE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARIZARD" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARIZARD" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARIZARD" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMELEON" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMELEON" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMELEON" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_CHARMELEON" + } + ] + } + } + ] + }, + { + "label": "gBattlePikeWildMonHeaders", + "for_maps": false, + "encounters": [ + { + "base_label": "gBattlePike_1", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SEVIPER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_MILOTIC" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_DUSCLOPS" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_DUSCLOPS" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_DUSCLOPS" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_DUSCLOPS" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SEVIPER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_MILOTIC" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_DUSCLOPS" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_DUSCLOPS" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SEVIPER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_MILOTIC" + } + ] + } + }, + { + "base_label": "gBattlePike_2", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SEVIPER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_MILOTIC" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_ELECTRODE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_ELECTRODE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_ELECTRODE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_ELECTRODE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SEVIPER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_MILOTIC" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_ELECTRODE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_ELECTRODE" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SEVIPER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_MILOTIC" + } + ] + } + }, + { + "base_label": "gBattlePike_3", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SEVIPER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_MILOTIC" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_BRELOOM" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_BRELOOM" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_BRELOOM" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_BRELOOM" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SEVIPER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_MILOTIC" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_BRELOOM" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_BRELOOM" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SEVIPER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_MILOTIC" + } + ] + } + }, + { + "base_label": "gBattlePike_4", + "land_mons": { + "encounter_rate": 10, + "mons": [ + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SEVIPER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_MILOTIC" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WOBBUFFET" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WOBBUFFET" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WOBBUFFET" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WOBBUFFET" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SEVIPER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_MILOTIC" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WOBBUFFET" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_WOBBUFFET" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_SEVIPER" + }, + { + "min_level": 5, + "max_level": 5, + "species": "SPECIES_MILOTIC" + } + ] + } + } + ] + } + ] +}
\ No newline at end of file diff --git a/src/data/wild_encounters.json.txt b/src/data/wild_encounters.json.txt new file mode 100755 index 000000000..8f88cc587 --- /dev/null +++ b/src/data/wild_encounters.json.txt @@ -0,0 +1,67 @@ +{{ doNotModifyHeader }} +## for wild_encounter_group in wild_encounter_groups +## for encounter in wild_encounter_group.encounters +{% if existsIn(encounter, "land_mons") %} +const struct WildPokemon {{ encounter.base_label }}_LandMons[] = +{ +## for wild_mon in encounter.land_mons.mons + { {{ wild_mon.min_level }}, {{ wild_mon.max_level }}, {{ wild_mon.species }} }, +## endfor +}; + +const struct WildPokemonInfo {{ encounter.base_label }}_LandMonsInfo = { {{encounter.land_mons.encounter_rate}}, {{ encounter.base_label }}_LandMons }; +{% endif %} +{% if existsIn(encounter, "water_mons") %} +const struct WildPokemon {{ encounter.base_label }}_WaterMons[] = +{ +## for wild_mon in encounter.water_mons.mons + { {{ wild_mon.min_level }}, {{ wild_mon.max_level }}, {{ wild_mon.species }} }, +## endfor +}; + +const struct WildPokemonInfo {{ encounter.base_label }}_WaterMonsInfo = { {{encounter.water_mons.encounter_rate}}, {{ encounter.base_label }}_WaterMons }; +{% endif %} +{% if existsIn(encounter, "rock_smash_mons") %} +const struct WildPokemon {{ encounter.base_label }}_RockSmashMons[] = +{ +## for wild_mon in encounter.rock_smash_mons.mons + { {{ wild_mon.min_level }}, {{ wild_mon.max_level }}, {{ wild_mon.species }} }, +## endfor +}; + +const struct WildPokemonInfo {{ encounter.base_label }}_RockSmashMonsInfo = { {{encounter.rock_smash_mons.encounter_rate}}, {{ encounter.base_label }}_RockSmashMons }; +{% endif %} +{% if existsIn(encounter, "fishing_mons") %} +const struct WildPokemon {{ encounter.base_label }}_FishingMons[] = +{ +## for wild_mon in encounter.fishing_mons.mons + { {{ wild_mon.min_level }}, {{ wild_mon.max_level }}, {{ wild_mon.species }} }, +## endfor +}; + +const struct WildPokemonInfo {{ encounter.base_label }}_FishingMonsInfo = { {{encounter.fishing_mons.encounter_rate}}, {{ encounter.base_label }}_FishingMons }; +{% endif %} +## endfor + +const struct WildPokemonHeader {{ wild_encounter_group.label }}[] = +{ +## for encounter in wild_encounter_group.encounters + { + .mapGroup = {% if wild_encounter_group.for_maps %}MAP_GROUP({{ removePrefix(encounter.map, "MAP_") }}){% else %}0{% endif %}, + .mapNum = {% if wild_encounter_group.for_maps %}MAP_NUM({{ removePrefix(encounter.map, "MAP_") }}){% else %}{{ loop.index1 }}{% endif %}, + .landMonsInfo = {% if existsIn(encounter, "land_mons") %}&{{ encounter.base_label }}_LandMonsInfo{% else %}NULL{% endif %}, + .waterMonsInfo = {% if existsIn(encounter, "water_mons") %}&{{ encounter.base_label }}_WaterMonsInfo{% else %}NULL{% endif %}, + .rockSmashMonsInfo = {% if existsIn(encounter, "rock_smash_mons") %}&{{ encounter.base_label }}_RockSmashMonsInfo{% else %}NULL{% endif %}, + .fishingMonsInfo = {% if existsIn(encounter, "fishing_mons") %}&{{ encounter.base_label }}_FishingMonsInfo{% else %}NULL{% endif %}, + }, +## endfor + { + .mapGroup = MAP_GROUP(UNDEFINED), + .mapNum = MAP_NUM(UNDEFINED), + .landMonsInfo = NULL, + .waterMonsInfo = NULL, + .rockSmashMonsInfo = NULL, + .fishingMonsInfo = NULL, + }, +}; +## endfor diff --git a/src/decoration.c b/src/decoration.c index 0f6dd082b..974859c88 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -36,6 +36,7 @@ #include "constants/event_objects.h" #include "constants/songs.h" #include "constants/region_map_sections.h" +#include "constants/metatile_labels.h" #define PLACE_DECORATION_SELECTOR_TAG 0xbe5 #define PLACE_DECORATION_PLAYER_TAG 0x008 diff --git a/src/dma3_manager.c b/src/dma3_manager.c index 51fa7072d..43744883f 100644 --- a/src/dma3_manager.c +++ b/src/dma3_manager.c @@ -8,7 +8,7 @@ #define DMA_REQUEST_COPY16 3 #define DMA_REQUEST_FILL16 4 -IWRAM_DATA struct +BSS_DATA struct { const u8 *src; u8 *dest; @@ -17,7 +17,7 @@ IWRAM_DATA struct u32 value; } gDma3Requests[MAX_DMA_REQUESTS]; -static bool8 gDma3ManagerLocked; +static volatile bool8 gDma3ManagerLocked; static u8 gDma3RequestCursor; void ClearDma3Requests(void) diff --git a/src/dodrio_berry_picking.c b/src/dodrio_berry_picking.c new file mode 100644 index 000000000..714b10ef6 --- /dev/null +++ b/src/dodrio_berry_picking.c @@ -0,0 +1,5086 @@ +#include "global.h" +#include "alloc.h" +#include "bg.h" +#include "dodrio_berry_picking.h" +#include "dynamic_placeholder_text_util.h" +#include "event_data.h" +#include "gpu_regs.h" +#include "international_string_util.h" +#include "item.h" +#include "link.h" +#include "link_rfu.h" +#include "m4a.h" +#include "main.h" +#include "palette.h" +#include "pokemon_jump.h" +#include "random.h" +#include "save.h" +#include "script.h" +#include "sound.h" +#include "string_util.h" +#include "strings.h" +#include "task.h" +#include "text_window.h" +#include "window.h" +#include "constants/items.h" +#include "constants/songs.h" +#include "constants/species.h" + +struct DodrioSubstruct_0160 +{ + /*0x0000 : 0x3000*/ u16 ALIGNED(4) tilemapBuffers[3][BG_SCREEN_SIZE]; + /*0x3000 : 0x3160*/ bool32 finished; + /*0x3004 : 0x3164*/ u8 ALIGNED(4) unk3004; + /*0x3008 : 0x3168*/ u8 ALIGNED(4) unk3008[10]; + /*0x3014 : 0x3174*/ u8 ALIGNED(4) state; + /*0x3018 : 0x3178*/ u8 ALIGNED(4) unk3018; + /*0x301C : 0x317C*/ u16 ALIGNED(4) unk301C; + /*0x3020 : 0x3180*/ u8 ALIGNED(4) unk3020; + /*0x3024 : 0x3184*/ u8 ALIGNED(4) unk3024; + /*0x3024 : 0x3184*/ void (*unk3028)(void); +}; // size = 0x302C + +struct DodrioStruct_2022CF4 +{ + u8 filler_00[0xc]; + u8 unkC[10]; + s16 unk16[10]; + u16 unk2A[10]; + u16 unk3E; +}; // size = 0x40 + +struct DodrioSubstruct_31A0_14 +{ + u8 unk0[11]; + u8 unkB[11]; +}; + +struct DodrioSubstruct_31A0_2C +{ + u8 unk0; + u8 ALIGNED(4) unk4; + u8 ALIGNED(4) unk8; +}; + +struct DodrioSubstruct_31A0 +{ + u8 name[0x10]; + u32 unk10; + struct DodrioSubstruct_31A0_14 unk14; + struct DodrioSubstruct_31A0_2C unk2C; + u8 filler_35[4]; +}; // size = 0x3C + +struct DodrioSubstruct_318C +{ + bool8 isShiny; +}; + +struct DodrioSubstruct_3308 +{ + u8 unk0; + u32 unk4; +}; + +struct DodrioStruct +{ + /*0x0000*/ void (*savedCallback)(void); + /*0x0004*/ u8 ALIGNED(4) unk04; + /*0x0008*/ u8 ALIGNED(4) unk08; + /*0x000C*/ u8 ALIGNED(4) unk0C; + /*0x0010*/ u8 ALIGNED(4) unk10; + /*0x0014*/ u8 ALIGNED(4) unk14; + /*0x0018*/ u8 ALIGNED(4) unk18; + /*0x001C*/ u8 ALIGNED(4) unk1C; + /*0x0020*/ u8 ALIGNED(4) unk20; + /*0x0024*/ u8 ALIGNED(4) unk24; + /*0x0028*/ u8 ALIGNED(4) multiplayerId; + /*0x0029*/ u8 filler_0029[7]; + /*0x0030*/ u8 ALIGNED(4) unk30; + /*0x0034*/ u8 ALIGNED(4) unk34[5]; + /*0x003C*/ u8 ALIGNED(4) unk3C; + /*0x0040*/ u8 ALIGNED(4) unk40; + /*0x0044*/ u8 ALIGNED(4) unk44; + /*0x0048*/ u8 ALIGNED(4) unk48; + /*0x004A*/ u16 unk4A[5][6]; + /*0x0086*/ u16 unk86[5]; + /*0x0090*/ u8 ALIGNED(4) unk90[5]; + /*0x0098*/ u8 ALIGNED(4) unk98[4]; + /*0x009C*/ u8 ALIGNED(4) unk9C[11]; + /*0x00A8*/ u8 ALIGNED(4) unkA8[5]; + /*0x00B0*/ u8 ALIGNED(4) unkB0[5]; + /*0x00B8*/ u8 ALIGNED(4) unkB8[11]; + /*0x00C4*/ u8 ALIGNED(4) unkC4[11]; + /*0x00D0*/ u8 ALIGNED(4) unkD0[11]; + /*0x00DC*/ u8 ALIGNED(4) unkDC[11]; + /*0x00E8*/ u8 ALIGNED(4) unkE8[11]; + /*0x00F4*/ u8 ALIGNED(4) unkF4[11][2]; + /*0x010C*/ u8 ALIGNED(4) unk10C[5]; + /*0x0112*/ u16 unk112; + /*0x0114*/ u16 unk114; + /*0x0118*/ u32 unk118; + /*0x011C*/ u32 unk11C; + /*0x0120*/ u32 unk120; + /*0x0124*/ u8 ALIGNED(4) unk124; + /*0x0128*/ u8 ALIGNED(4) unk128; + /*0x012C*/ u32 unk12C; + /*0x0130*/ u32 unk130[5]; + /*0x0144*/ u8 ALIGNED(4) unk144; + /*0x0148*/ u8 ALIGNED(4) unk148[11]; + /*0x0154*/ u8 ALIGNED(4) unk154; + /*0x0158*/ u8 ALIGNED(4) unk158[5]; + /*0x0160*/ struct DodrioSubstruct_0160 unk160; + /*0x318C*/ struct DodrioSubstruct_318C unk318C[5]; + /*0x31A0*/ struct DodrioSubstruct_31A0 unk31A0[5]; + /*0x32CC*/ struct DodrioSubstruct_31A0 unk32CC; + /*0x3308*/ struct DodrioSubstruct_3308 unk3308[5]; +}; // size = 0x3330 + +EWRAM_DATA static struct DodrioStruct * gUnknown_02022C98 = NULL; +EWRAM_DATA static u16 *gUnknown_02022C9C[5] = {NULL}; +EWRAM_DATA static u16 *gUnknown_02022CB0[2] = {NULL}; +EWRAM_DATA static u16 *gUnknown_02022CB8[11] = {NULL}; +EWRAM_DATA static u16 *gUnknown_02022CE4[4] = {NULL}; +EWRAM_DATA static struct DodrioStruct_2022CF4 *gUnknown_02022CF4 = NULL; +EWRAM_DATA static struct DodrioSubstruct_0160 *gUnknown_02022CF8 = NULL; + +static bool32 gUnknown_03000DB0; + +static void sub_8024A1C(void); +static void sub_8024A30(struct DodrioStruct *); +static void sub_8024BC8(u8 taskId); +static void sub_8024DBC(void); +static void sub_8024E00(void); +static void sub_8024E38(void); +static void sub_8024F10(void); +static void sub_8024F38(void); +static void sub_8024FFC(void); +static void sub_80250D4(void); +static void sub_8025158(void); +static void sub_8025198(void); +static void sub_8025230(void); +static void sub_8025324(void); +static void sub_8025470(void); +static void sub_8025644(void); +static void sub_80256AC(void); +static void sub_8025758(void); +static void sub_802589C(u8 taskId); +static void sub_8025910(u8 taskId); +static void sub_8025D04(void); +static void sub_8025D50(void); +static void sub_8025E0C(void); +static void sub_8025ED8(void); +static void sub_8025F48(void); +static void sub_8026044(void); +static void sub_80261CC(void); +static void sub_80261E4(void); +static void sub_80261F8(struct DodrioSubstruct_318C *, struct Pokemon *); +static void sub_802620C(TaskFunc, u8); +static void sub_802621C(TaskFunc); +static void sub_8026240(u8); +static bool32 sub_8026264(void); +static void sub_80262C0(void); +static bool32 sub_8026634(u8, u8, u8); +static void sub_802671C(void); +static void sub_8026AF4(void); +static void sub_8026B28(void); +static void sub_8026B5C(u8, u8*, u8*); +static bool32 sub_8026BB8(void); +static void sub_8026C28(void); +static bool32 sub_8026C50(void); +static bool32 sub_8026C90(void); +static void sub_8026D1C(u8); +static u8 sub_8026D8C(u8); +static u8 sub_8026DB0(u8, u8); +static void sub_8026F1C(u8, u8, u8); +static void sub_8027234(bool32 arg0); +static void sub_80272A4(void); +static void sub_80272E8(void); +static void sub_80273F0(void); +static void sub_802749C(void); +static u8 sub_8027518(u8); +static void sub_8027554(void); +static void sub_8027608(void); +static u32 sub_8027748(void); +static void sub_8027DD0(u32 arg0); +static void sub_8027E30(struct DodrioSubstruct_31A0 *arg0, struct DodrioSubstruct_31A0_2C *arg1, struct DodrioSubstruct_31A0_2C *arg2, struct DodrioSubstruct_31A0_2C *arg3, struct DodrioSubstruct_31A0_2C *arg4, struct DodrioSubstruct_31A0_2C *arg5, u8 arg6, u32 arg7, u32 arg8); +static u32 sub_8028164(u32 unused, struct DodrioSubstruct_31A0 *arg0, struct DodrioSubstruct_31A0_2C *arg1, struct DodrioSubstruct_31A0_2C *arg2, struct DodrioSubstruct_31A0_2C *arg3, struct DodrioSubstruct_31A0_2C *arg4, struct DodrioSubstruct_31A0_2C *arg5, u8 *arg6, u32 *arg7, u32 *arg8); +static void sub_80282EC(u8); +static u32 sub_8028318(u32 arg0, u8 *arg1); +static void sub_8028350(u32 arg0); +static u32 sub_8028374(u32 arg0); +static void sub_80283A8(void); +static void sub_8028408(struct DodrioSubstruct_318C *arg0, u8 arg1, u8 id, u8 arg3); +static void sub_80284CC(u8); +static void sub_8028504(u8); +static void sub_8028614(u8 count); +static void sub_802868C(bool8 invisible, u8 count); +static void sub_8028734(void); +static void sub_80287E4(void); +static void sub_80289E8(bool8 invisible); +static void sub_80286E4(void); +static bool32 sub_8028828(void); +static void sub_8028A34(void); +static void sub_8028A88(void); +static void sub_8028B80(void); +static void sub_8028D44(void); +static void sub_8028DFC(void); +static void sub_8028E4C(void); +static void sub_8028E84(void); +static void sub_8028EC8(bool8 invisible); +static void sub_8028FCC(void); +static void sub_802903C(void); +static void sub_8029274(struct DodrioSubstruct_0160 *PTR); +static void sub_80292E0(u8); +static bool32 sub_802A770(void); +static u8 sub_802A794(void); +static void sub_8028BF8(u8 id, bool8 invisible); +static void sub_8028C30(bool8 invisible); +static void sub_8028CA4(u16 id, u8 frameNum); +static void sub_8028C7C(u8 id, u8 y); +static void sub_80286B4(u8 id, u8 frameNum); +static u8 sub_8026E70(u8 arg0, u8 arg1); +static void sub_80288D4(u8 arg0); +static u32 sub_8027DFC(u32 arg0); +static u32 IncrementWithLimit(u32 arg0, u32 arg1); +static u32 Min(u32 arg0, u32 arg1); +static u32 sub_80276C0(u8 arg0); +static void sub_8027ACC(u8 taskId); +static void sub_8029314(u8 taskId); +static void sub_8027BEC(u8 windowId, s32 width); +static void nullsub_15(struct Sprite *sprite); +static void sub_80284A8(struct Sprite *sprite); +static u32 sub_802853C(struct Sprite *sprite); +static u32 sub_80285AC(struct Sprite *sprite); +static s16 sub_8028F14(u8 arg0, u8 arg1); +static void sub_8028654(bool8 invisible, u8 id); +static void sub_8029338(void); +static bool32 sub_802A8E8(void); +static void sub_802A7A8(void); +static void sub_802A72C(void (*func)(void)); +static void (*sub_802A75C(void))(void); +static void sub_8029338(void); +static void sub_8029440(void); +static void sub_802988C(void); +static void sub_802A010(void); +static void sub_802A380(void); +static void sub_802A454(void); +static void sub_802A534(void); +static void sub_802A588(void); +static void sub_802A6FC(void); +static void nullsub_16(void); + +// const rom data +static const u8 gUnknown_082F449C[5][5][11] = +{ + { + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0}, + }, + { + {0, 1, 2, 3, 4, 5, 6, 3, 8, 9, 0}, + {0, 1, 2, 5, 6, 3, 4, 5, 8, 9, 0}, + }, + { + {0, 1, 2, 3, 4, 5, 6, 7, 2, 9, 0}, + {0, 1, 4, 5, 6, 7, 2, 3, 4, 9, 0}, + {0, 1, 6, 7, 2, 3, 4, 5, 6, 9, 0}, + }, + { + {0, 1, 2, 3, 4, 5, 6, 7, 8, 1, 0}, + {0, 3, 4, 5, 6, 7, 8, 1, 2, 3, 0}, + {0, 5, 6, 7, 8, 1, 2, 3, 4, 5, 0}, + {0, 7, 8, 1, 2, 3, 4, 5, 6, 7, 0}, + }, + { + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0}, + {2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2}, + {4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4}, + {6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6}, + {8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8}, + }, +}; + +static const u8 gUknnown_082F45AF[5][5][3] = +{ + { + {4, 5, 6}, + }, + { + {3, 4, 5}, + {5, 6, 3}, + }, + { + {4, 5, 6}, + {6, 7, 2}, + {2, 3, 4}, + }, + { + {3, 4, 5}, + {5, 6, 7}, + {7, 8, 1}, + {1, 2, 3}, + }, + { + {4, 5, 6}, + {6, 7, 8}, + {8, 9, 0}, + {0, 1, 2}, + {2, 3, 4}, + }, +}; + +static const u8 gUnknown_082F45FA[5][5][3] = +{ + { + {1, 0, 1}, + }, + { + {1, 0, 1}, + {0, 1, 0}, + }, + { + {2, 0, 1}, + {0, 1, 2}, + {1, 2, 0}, + }, + { + {3, 0, 1}, + {0, 1, 2}, + {1, 2, 3}, + {2, 3, 0}, + }, + { + {4, 0, 1}, + {0, 1, 2}, + {1, 2, 3}, + {2, 3, 4}, + {3, 4, 0}, + }, +}; + +ALIGNED(4) +static const u8 gUnknown_082F4648[5][11] = +{ + {9, 9, 9, 9, 1, 1, 1, 9, 9, 9, 9}, + {9, 9, 9, 0, 0, 1, 1, 0, 9, 9, 9}, + {9, 9, 2, 2, 0, 0, 1, 1, 1, 9, 9}, + {9, 3, 3, 0, 0, 1, 1, 2, 2, 3, 9}, + {3, 3, 4, 4, 0, 0, 1, 1, 2, 2, 3}, +}; + +static const u8 gUnknown_082F467F[5][5] = +{ + {5}, + {4, 6}, + {3, 5, 7}, + {2, 4, 6, 8}, + {1, 3, 5, 6, 9}, +}; + +// Duplicate and unused gfx. Feel free to remove. +static const u32 sDuplicateGfx[] = INCBIN_U32("graphics/link_games/dodrioberry_bg1.gbapal", + "graphics/link_games/dodrioberry_bg2.gbapal", + "graphics/link_games/dodrioberry_pkmn.gbapal", + "graphics/link_games/dodrioberry_shiny.gbapal", + "graphics/link_games/dodrioberry_status.gbapal", + "graphics/link_games/dodrioberry_berrysprites.gbapal", + "graphics/link_games/dodrioberry_berrysprites.4bpp.lz", + "graphics/link_games/dodrioberry_platform.gbapal", + "graphics/link_games/dodrioberry_bg1.4bpp.lz", + "graphics/link_games/dodrioberry_bg2.4bpp.lz", + "graphics/link_games/dodrioberry_status.4bpp.lz", + "graphics/link_games/dodrioberry_platform.4bpp.lz", + "graphics/link_games/dodrioberry_pkmn.4bpp.lz", + "graphics/link_games/dodrioberry_bg1.bin.lz", + "graphics/link_games/dodrioberry_bg2right.bin.lz", + "graphics/link_games/dodrioberry_bg2left.bin.lz"); + + +static const u8 gUnknown_082F7A88[][3] = +{ + {40, 24, 13}, + {32, 19, 10}, + {22, 13, 7}, +}; + +ALIGNED(4) +static const u8 gUnknown_082F7A94[] = {8, 5, 8, 11, 15}; + +ALIGNED(4) +static const u8 gUnknown_082F7A9C[] = {5, 10, 20, 30, 50, 70, 100}; + +ALIGNED(4) +static const u8 gUnknown_082F7AA4[][10] = +{ + {15, 16, 17, 18, 19, 19, 18, 17, 16, 15}, + {20, 21, 22, 23, 24, 25, 26, 27, 28, 29}, + {30, 31, 32, 33, 34, 34, 33, 32, 31, 30}, +}; + +static void (*const gUnknown_082F7AC4[])(void) = +{ + sub_8024DBC, + sub_8024E00, + sub_8024E38, + sub_8024F10, + sub_8024F38, + sub_8025198, + sub_8025324, + sub_8025470, + sub_8025644, + sub_80256AC, + sub_8025758, + sub_80250D4 +}; + +static void (*const gUnknown_082F7AF4[])(void) = +{ + sub_8024DBC, + sub_8024E00, + sub_8024E38, + sub_8024F10, + sub_8024FFC, + sub_8025230, + sub_8025324, + sub_8025470, + sub_8025644, + sub_80256AC, + sub_8025758, + sub_8025158 +}; + +// code +void sub_802493C(u16 a0, void (*callback)(void)) +{ + gUnknown_03000DB0 = FALSE; + + if (gReceivedRemoteLinkPlayers != 0 && (gUnknown_02022C98 = AllocZeroed(sizeof(*gUnknown_02022C98))) != NULL) + { + sub_8024A1C(); + sub_8024A30(gUnknown_02022C98); + gUnknown_02022C98->savedCallback = callback; + gUnknown_02022C98->multiplayerId = GetMultiplayerId(); + gUnknown_02022C98->unk32CC = gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId]; + sub_80261F8(&gUnknown_02022C98->unk318C[gUnknown_02022C98->multiplayerId], &gPlayerParty[a0]); + CreateTask(sub_8024BC8, 1); + SetMainCallback2(sub_80261CC); + sub_80273F0(); + sub_8026B5C(gUnknown_02022C98->unk24, &gUnknown_02022C98->unk44, &gUnknown_02022C98->unk48); + StopMapMusic(); + PlayNewMapMusic(MUS_RG_KINOMIKUI); + } + else + { + SetMainCallback2(callback); + return; + } +} + +static void sub_8024A1C(void) +{ + ResetTasks(); + ResetSpriteData(); + FreeAllSpritePalettes(); +} + +static void sub_8024A30(struct DodrioStruct * data) +{ + u8 i; + + data->unk0C = 0; + data->unk10 = 0; + data->unk14 = 0; + data->unk18 = 0; + data->unk1C = 0; + data->unk11C = 0; + data->unk120 = 0; + data->unk30 = 0; + data->unk40 = 0; + data->unk3C = 0; + data->unk12C = 0; + + for (i = 0; i < 4; i++) + { + data->unk98[i] = 0; + } + + for (i = 0; i < 5; i++) + { + data->unkA8[i] = 0; + data->unkB0[i] = 0; + data->unk4A[i][0] = 0; + data->unk4A[i][1] = 0; + data->unk4A[i][2] = 0; + data->unk4A[i][3] = 0; + data->unk4A[i][5] = 0; + data->unk10C[i] = 0; + data->unk130[i] = 0; + } + + for (i = 0; i < 11; i++) + { + data->unkD0[i] = 0; + data->unkDC[i] = 0; + data->unkC4[i] = 0; + data->unkF4[i][0] = 0xFF; + data->unkF4[i][1] = 0xFF; + } + + data->unk20 = GetMultiplayerId() == 0 ? 1 : 0; + data->unk24 = GetLinkPlayerCount(); + data->unk34[0] = GetMultiplayerId(); + for (i = 1; i < data->unk24; i++) + { + data->unk34[i] = data->unk34[i - 1] + 1; + if (data->unk34[i] > data->unk24 - 1) + data->unk34[i] %= data->unk24; + } +} + +static void sub_8024BC8(u8 taskId) +{ + u8 r4, r5; + + switch (gUnknown_02022C98->unk0C) + { + case 0: + SetVBlankCallback(NULL); + sub_802620C(sub_8025910, 4); + gUnknown_02022C98->unk0C++; + break; + case 1: + if (!FuncIsActiveTask(sub_8025910)) + { + sub_8029274(&gUnknown_02022C98->unk160); + gUnknown_02022C98->unk0C++; + } + break; + case 2: + if (!sub_802A770()) + { + sub_8010434(); + gUnknown_02022C98->unk0C++; + } + break; + case 3: + if (IsLinkTaskFinished()) + { + if (gReceivedRemoteLinkPlayers != 0) + { + LoadWirelessStatusIndicatorSpriteGfx(); + CreateWirelessStatusIndicatorSprite(0, 0); + } + gUnknown_02022C98->unk0C++; + } + break; + case 4: + r5 = gUnknown_02022C98->unk24; + sub_80283A8(); + for (r4 = 0; r4 < r5; r4++) + { + sub_8028408(&gUnknown_02022C98->unk318C[gUnknown_02022C98->unk34[r4]], r4, gUnknown_02022C98->unk34[r4], gUnknown_02022C98->unk24); + } + sub_802868C(FALSE, gUnknown_02022C98->unk24); + gUnknown_02022C98->unk0C++; + break; + case 5: + sub_8028A34(); + sub_8028A88(); + sub_8028D44(); + sub_8028734(); + gUnknown_02022C98->unk0C++; + break; + case 6: + BlendPalettes(0xFFFFFFFF, 0x10, 0x00); + BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0); + SetVBlankCallback(sub_80261E4); + gUnknown_02022C98->unk0C++; + break; + case 7: + UpdatePaletteFade(); + if (!gPaletteFade.active) + { + gUnknown_02022C98->unk0C++; + } + break; + default: + DestroyTask(taskId); + sub_802621C(sub_802589C); + break; + } +} + +static void sub_8024D4C(u8 taskId) +{ + sub_8025D04(); + gUnknown_082F7AC4[gUnknown_02022C98->unk18](); + if (!gUnknown_03000DB0) + { + sub_8026AF4(); + } + sub_8025D50(); +} + +static void sub_8024D84(u8 taskId) +{ + sub_8025E0C(); + gUnknown_082F7AF4[gUnknown_02022C98->unk18](); + if (!gUnknown_03000DB0) + { + sub_8026B28(); + } + sub_8025ED8(); +} + +static void sub_8024DBC(void) +{ + switch (gUnknown_02022C98->unk10) + { + case 0: + sub_8028504(1); + sub_80292E0(1); + gUnknown_02022C98->unk10++; + break; + case 1: + if (!sub_802A770()) + sub_8026240(1); + break; + } +} + +static void sub_8024E00(void) +{ + if (gUnknown_02022C98->unk10 == 0) + { + sub_80262C0(); + gUnknown_02022C98->unk10++; + } + else + { + gUnknown_02022C98->unk118 = 1; + sub_8026240(2); + } +} + +static void sub_8024E38(void) +{ + switch (gUnknown_02022C98->unk10) + { + case 0: + sub_802EB24(7, 8, 120, 80, 0); + gUnknown_02022C98->unk10++; + break; + case 1: + sub_8010434(); + gUnknown_02022C98->unk10++; + break; + case 2: + if (IsLinkTaskFinished()) + { + gUnknown_02022C98->unk10++; + gUnknown_02022C98->unk30 = 0; + } + break; + case 3: + if (!sub_802EB84()) + { + gUnknown_02022C98->unk10++; + } + break; + case 4: + if (++gUnknown_02022C98->unk30 > 5) + { + sub_8010434(); + gUnknown_02022C98->unk10++; + } + break; + case 5: + if (IsLinkTaskFinished()) + { + sub_8026240(3); + } + break; + } +} + +static void sub_8024F10(void) +{ + if (gUnknown_02022C98->unk10 == 0) + { + if (gUnknown_02022C98->unk11C != 0) + { + sub_8026240(4); + } + } +} + +static void sub_8024F38(void) +{ + if (gUnknown_02022C98->unk10 == 0) + { + if (gUnknown_02022C98->unk40 < 10) + { + if (gUnknown_02022C98->unkA8[0] == 0) + { + if (JOY_NEW(DPAD_UP)) + { + if (gUnknown_02022C98->unk31A0[0].unk2C.unk0 == 0) + { + gUnknown_02022C98->unk31A0[0].unk2C.unk4 = 0; + gUnknown_02022C98->unk31A0[0].unk2C.unk0 = sub_8027518(2); + } + } + else if (JOY_NEW(DPAD_RIGHT)) + { + if (gUnknown_02022C98->unk31A0[0].unk2C.unk0 == 0) + { + gUnknown_02022C98->unk31A0[0].unk2C.unk4 = 0; + gUnknown_02022C98->unk31A0[0].unk2C.unk0 = sub_8027518(1); + } + } + else if (JOY_NEW(DPAD_LEFT)) + { + if (gUnknown_02022C98->unk31A0[0].unk2C.unk0 == 0) + { + gUnknown_02022C98->unk31A0[0].unk2C.unk4 = 0; + gUnknown_02022C98->unk31A0[0].unk2C.unk0 = sub_8027518(3); + } + } + else + { + gUnknown_02022C98->unk31A0[0].unk2C.unk0 = sub_8027518(0); + } + } + } + else + { + sub_8026240(11); + } + sub_802671C(); + sub_8025F48(); + } +} + +static void sub_8024FFC(void) +{ + if (gUnknown_02022C98->unk40 < 10) + { + if (JOY_NEW(DPAD_UP)) + { + if (gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId].unk2C.unk0 == 0) + { + gUnknown_02022C98->unk32CC.unk2C.unk0 = 2; + } + } + else if (JOY_NEW(DPAD_RIGHT)) + { + if (gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId].unk2C.unk0 == 0) + { + gUnknown_02022C98->unk32CC.unk2C.unk0 = 1; + } + } + else if (JOY_NEW(DPAD_LEFT)) + { + if (gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId].unk2C.unk0 == 0) + { + gUnknown_02022C98->unk32CC.unk2C.unk0 = 3; + } + } + else + { + gUnknown_02022C98->unk32CC.unk2C.unk0 = 0; + } + } + else + { + sub_8026240(11); + } + sub_8026044(); +} + +static void sub_80250D4(void) +{ + u8 i; + + sub_802671C(); + sub_8025F48(); + if (sub_8026C50() == 1) + { + sub_80272A4(); + sub_8026240(5); + } + else + { + gUnknown_02022C98->unk12C = 1; + for (i = 1; i < gUnknown_02022C98->unk24; i++) + { + if (gUnknown_02022C98->unk130[i] != 1) + { + gUnknown_02022C98->unk12C = 0; + break; + } + } + } +} + +static void sub_8025158(void) +{ + sub_8026044(); + if (sub_8026C90() == 1) + sub_8026240(5); +} + +static bool32 sub_8025170(void) +{ + u8 r4 = GetBlockReceivedStatus(); + u8 r0 = sub_800A9D8(); + if (r4 == r0) + { + ResetBlockReceivedFlags(); + return TRUE; + } + else + { + return FALSE; + } +} + +static void sub_8025198(void) +{ + switch (gUnknown_02022C98->unk10) + { + case 0: + if (SendBlock(0, gUnknown_02022C98->unk4A, sizeof(gUnknown_02022C98->unk4A))) + { + gUnknown_02022C98->unk08 = 0; + gUnknown_02022C98->unk10++; + } + break; + case 1: + if (IsLinkTaskFinished()) + { + gUnknown_02022C98->unk10++; + } + break; + case 2: + if (sub_8025170()) + { + gUnknown_02022C98->unk08 = gUnknown_02022C98->unk24; + } + if (gUnknown_02022C98->unk08 >= gUnknown_02022C98->unk24) + { + gUnknown_02022C98->unk14++; + gUnknown_02022C98->unk10++; + } + break; + default: + if (WaitFanfare(TRUE)) + { + sub_8026240(6); + FadeOutAndPlayNewMapMusic(MUS_RG_WIN_YASEI, 4); + } + break; + } +} + +static void sub_8025230(void) +{ + u8 i; + + switch (gUnknown_02022C98->unk10) { + case 0: + if (SendBlock(0, gUnknown_02022C98->unk4A[gUnknown_02022C98->unk14], + sizeof(gUnknown_02022C98->unk4A))) { + gUnknown_02022C98->unk08 = 0; + gUnknown_02022C98->unk10++; + } + break; + case 1: + if (IsLinkTaskFinished()) { + gUnknown_02022C98->unk10++; + } + break; + case 2: + if (sub_8025170()) { + for (i = 0; i < gUnknown_02022C98->unk24; i++) { + memcpy(gUnknown_02022C98->unk4A, gBlockRecvBuffer, sizeof(gUnknown_02022C98->unk4A)); + gUnknown_02022C98->unk08 = gUnknown_02022C98->unk24; + } + } + if (gUnknown_02022C98->unk08 >= gUnknown_02022C98->unk24) { + gUnknown_02022C98->unk14++; + gUnknown_02022C98->unk10++; + } + break; + default: + if (WaitFanfare(TRUE)) { + gUnknown_02022C98->unk114 = gUnknown_02022C98->unk4A[gUnknown_02022C98->multiplayerId][5]; + sub_8026240(6); + FadeOutAndPlayNewMapMusic(MUS_RG_WIN_YASEI, 4); + } + break; + } +} + +static void sub_8025324(void) +{ + u8 sp00 = 1; + u8 i; + + switch (gUnknown_02022C98->unk10) + { + case 0: + sub_802749C(); + sub_80289E8(TRUE); + sub_8028DFC(); + sub_8028EC8(TRUE); + sub_80292E0(2); + gUnknown_02022C98->unk10++; + break; + case 1: + if (!sub_802A770()) + { + sub_80292E0(5); + gUnknown_02022C98->unk10++; + } + break; + case 2: + sp00 = sub_802A794(); + if (SendBlock(0, &sp00, sizeof(sp00))) + { + gUnknown_02022C98->unk10++; + } + break; + case 3: + if (IsLinkTaskFinished()) + { + gUnknown_02022C98->unk10++; + gUnknown_02022C98->unk08 = 0; + } + break; + case 4: + if (sub_8025170()) + { + for (i = 0; i < gUnknown_02022C98->unk24; i++) + { + *(gUnknown_02022C98->unk10C + i) = *(u8 *)gBlockRecvBuffer[i]; + gUnknown_02022C98->unk08 = gUnknown_02022C98->unk24; + } + } + if (gUnknown_02022C98->unk08 >= gUnknown_02022C98->unk24) { + if (++gUnknown_02022C98->unk14 >= 120) + { + sub_80292E0(6); + gUnknown_02022C98->unk10++; + } + } + break; + default: + if (!sub_802A770()) + { + sub_8026240(7); + } + break; + } +} + +static void sub_8025470(void) +{ + u8 sp0; + u8 i; + + switch (gUnknown_02022C98->unk10) + { + case 0: + if (sub_8027748() >= 3000) + { + sub_80292E0(4); + } + gUnknown_02022C98->unk10++; + break; + case 1: + if (!sub_802A770()) + { + sub_80292E0(3); + gUnknown_02022C98->unk10++; + } + break; + case 2: + sub_8028FCC(); + sub_80272E8(); + gUnknown_02022C98->unk10++; + break; + case 3: + if ((sp0 = sub_802A794()) != 0) + { + gUnknown_02022C98->unk10++; + } + break; + case 4: + if (!sub_802A770()) + { + sub_80292E0(5); + gUnknown_02022C98->unk10++; + } + break; + case 5: + sp0 = sub_802A794(); + if (SendBlock(0, &sp0, sizeof(sp0))) + { + gUnknown_02022C98->unk08 = 0; + gUnknown_02022C98->unk10++; + } + break; + case 6: + if (IsLinkTaskFinished()) + { + gUnknown_02022C98->unk10++; + } + break; + case 7: + if (sub_8025170()) + { + for (i = 0; i < gUnknown_02022C98->unk24; i++) + { + *(gUnknown_02022C98->unk10C + i) = *(u8 *)gBlockRecvBuffer[i]; + gUnknown_02022C98->unk08 = gUnknown_02022C98->unk24; + } + } + if (gUnknown_02022C98->unk08 >= gUnknown_02022C98->unk24) { + if (++gUnknown_02022C98->unk14 >= 120) + { + sub_8027608(); + sub_80292E0(6); + gUnknown_02022C98->unk10++; + } + } + else + { + sub_8027554(); + } + break; + default: + if (!sub_802A770()) + { + for (i = 0; i < gUnknown_02022C98->unk24; i++) + { + if (gUnknown_02022C98->unk10C[i] == 2) + { + sub_8026240(8); + return; + } + } + sub_8026240(10); + } + break; + } +} + +static void sub_8025644(void) +{ + switch (gUnknown_02022C98->unk10) + { + case 0: + sub_800AC34(); + sub_80292E0(7); + gUnknown_02022C98->unk10++; + break; + case 1: + if (!sub_802A770()) + { + gUnknown_02022C98->unk10++; + } + break; + case 2: + if (sub_802A794() == 5) + { + gUnknown_02022C98->unk10++; + } + break; + default: + if (gReceivedRemoteLinkPlayers == 0) + { + sub_8026240(9); + } + break; + } +} + +static void sub_80256AC(void) +{ + switch (gUnknown_02022C98->unk10) + { + case 0: + BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0); + gUnknown_02022C98->unk10++; + break; + case 1: + UpdatePaletteFade(); + if (!gPaletteFade.active) + { + gUnknown_02022C98->unk10++; + } + break; + case 2: + sub_8028B80(); + sub_80287E4(); + sub_8028614(gUnknown_02022C98->unk24); + sub_8028E84(); + gUnknown_03000DB0 = TRUE; + sub_80292E0(8); + gUnknown_02022C98->unk10++; + break; + default: + if (!sub_802A770()) + { + SetMainCallback2(gUnknown_02022C98->savedCallback); + DestroyTask(gUnknown_02022C98->unk04); + Free(gUnknown_02022C98); + FreeAllWindowBuffers(); + } + break; + } +} + +static void sub_8025758(void) +{ + switch (gUnknown_02022C98->unk10) + { + case 0: + sub_80292E0(9); + BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0); + gUnknown_02022C98->unk10++; + break; + case 1: + UpdatePaletteFade(); + if (!gPaletteFade.active) + { + gUnknown_02022C98->unk10++; + } + break; + case 2: + ChangeBgX(0, 0, 0); + ChangeBgY(0, 0, 0); + ChangeBgX(1, 0, 0); + ChangeBgY(1, 0, 0); + ChangeBgX(2, 0, 0); + ChangeBgY(2, 0, 0); + ChangeBgX(3, 0, 0); + ChangeBgY(3, 0, 0); + gUnknown_02022C98->unk10++; + break; + case 3: + StopMapMusic(); + gUnknown_02022C98->unk10++; + break; + case 4: + PlayNewMapMusic(MUS_RG_KINOMIKUI); + sub_8028E4C(); + gUnknown_02022C98->unk10++; + break; + case 5: + BlendPalettes(0xFFFFFFFF, 16, 0); + BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0); + gUnknown_02022C98->unk10++; + break; + case 6: + UpdatePaletteFade(); + if (!gPaletteFade.active) + { + gUnknown_02022C98->unk10++; + } + break; + default: + DestroyTask(gUnknown_02022C98->unk04); + sub_802621C(sub_802589C); + sub_802903C(); + sub_8024A30(gUnknown_02022C98); + if (gReceivedRemoteLinkPlayers == 0) + { + gUnknown_02022C98->unk24 = 1; + } + sub_80273F0(); + sub_8028EC8(FALSE); + break; + } +} + +static void sub_802589C(u8 taskId) +{ + switch (gUnknown_02022C98->unk10) + { + case 0: + if (sub_8026264() == 1) + { + gUnknown_02022C98->unk10++; + } + break; + case 1: + sub_80286E4(); + gUnknown_02022C98->unk10++; + break; + case 2: + if (sub_8028828() == TRUE) + { + gUnknown_02022C98->unk10++; + } + break; + default: + if (gUnknown_02022C98->unk20 != 0) + { + sub_802621C(sub_8024D4C); + } + else + { + sub_802621C(sub_8024D84); + } + DestroyTask(taskId); + break; + } +} + +static void sub_8025910(u8 taskId) +{ + s16 * data = gTasks[taskId].data; + u8 i; + + switch (data[0]) + { + case 0: + if (SendBlock(0, &gUnknown_02022C98->unk318C[gUnknown_02022C98->multiplayerId].isShiny, sizeof(gUnknown_02022C98->unk318C[gUnknown_02022C98->multiplayerId].isShiny))) + { + gUnknown_02022C98->unk08 = 0; + data[0]++; + } + break; + case 1: + if (IsLinkTaskFinished()) + { + data[0]++; + } + break; + case 2: + if (sub_8025170()) + { + for (i = 0; i < gUnknown_02022C98->unk24; i++) + { + *(u8 *)&gUnknown_02022C98->unk318C[i] = *(u8 *)gBlockRecvBuffer[i]; + gUnknown_02022C98->unk08 = gUnknown_02022C98->unk24; + } + } + if (gUnknown_02022C98->unk08 >= gUnknown_02022C98->unk24) + { + DestroyTask(taskId); + sub_80292E0(6); + gUnknown_02022C98->unk10++; + } + break; + } +} + +static void sub_80259FC(void) +{ + u8 i; + u8 r7 = gUnknown_02022C98->unk24; + + gUnknown_02022C98->unk31A0[0].unk10 = sub_8028164(0, &gUnknown_02022C98->unk31A0[0], &gUnknown_02022C98->unk31A0[0].unk2C, &gUnknown_02022C98->unk31A0[1].unk2C, &gUnknown_02022C98->unk31A0[2].unk2C, &gUnknown_02022C98->unk31A0[3].unk2C, &gUnknown_02022C98->unk31A0[4].unk2C, &gUnknown_02022C98->unk40, &gUnknown_02022C98->unk120, &gUnknown_02022C98->unk12C); + gUnknown_02022C98->unk128 = 1; + + for (i = 1; i < r7; i++) + { + if ( gUnknown_02022C98->unkA8[i] == 0 + && sub_8028318(i, &gUnknown_02022C98->unk31A0[i].unk2C.unk0) == 0) + { + gUnknown_02022C98->unk31A0[i].unk2C.unk0 = 0; + gUnknown_02022C98->unk128 = 0; + } + } + if (++gUnknown_02022C98->unk124 >= 60) + { + if (gUnknown_02022C98->unk128 != 0) + { + sub_8011AC8(); + gUnknown_02022C98->unk124 = 0; + } + else if (gUnknown_02022C98->unk124 > 70) + { + sub_8011AC8(); + gUnknown_02022C98->unk124 = 0; + } + } + + for (i = 0; i < r7; i++) + { + if ( gUnknown_02022C98->unk31A0[i].unk2C.unk0 != 0 + && gUnknown_02022C98->unkA8[i] == 0) + { + gUnknown_02022C98->unkA8[i] = 1; + } + switch (gUnknown_02022C98->unkA8[i]) + { + case 0: + default: + break; + case 1 ... 3: + if (++gUnknown_02022C98->unkB0[i] >= 6) + { + gUnknown_02022C98->unkB0[i] = 0; + gUnknown_02022C98->unkA8[i] = 0; + gUnknown_02022C98->unk31A0[i].unk2C.unk0 = 0; + gUnknown_02022C98->unk31A0[i].unk2C.unk4 = 0; + gUnknown_02022C98->unk31A0[i].unk2C.unk8 = 0; + } + break; + case 4: + if (++gUnknown_02022C98->unkB0[i] >= 40) + { + gUnknown_02022C98->unkB0[i] = 0; + gUnknown_02022C98->unkA8[i] = 0; + gUnknown_02022C98->unk31A0[i].unk2C.unk0 = 0; + gUnknown_02022C98->unk31A0[i].unk2C.unk4 = 0; + gUnknown_02022C98->unk31A0[i].unk2C.unk8 = 0; + } + break; + } + } +} + +static void sub_8025C0C(void) +{ + u8 i; + u8 r6 = gUnknown_02022C98->unk24; + + gUnknown_02022C98->unk31A0[0].unk10 = sub_8028164(0, &gUnknown_02022C98->unk31A0[0], &gUnknown_02022C98->unk31A0[0].unk2C, &gUnknown_02022C98->unk31A0[1].unk2C, &gUnknown_02022C98->unk31A0[2].unk2C, &gUnknown_02022C98->unk31A0[3].unk2C, &gUnknown_02022C98->unk31A0[4].unk2C, &gUnknown_02022C98->unk40, &gUnknown_02022C98->unk120, &gUnknown_02022C98->unk12C); + gUnknown_02022C98->unk128 = 1; + + for (i = 1; i < r6; i++) + { + if (sub_8028374(i) != 0) + { + gUnknown_02022C98->unk130[i] = 1; + gUnknown_02022C98->unk128 = 0; + } + } + if (++gUnknown_02022C98->unk124 >= 60) + { + if (gUnknown_02022C98->unk128 != 0) + { + sub_8011AC8(); + gUnknown_02022C98->unk124 = 0; + } + else if (gUnknown_02022C98->unk124 > 70) + { + sub_8011AC8(); + gUnknown_02022C98->unk124 = 0; + } + } +} + +static void sub_8025D04(void) +{ + switch (gUnknown_02022C98->unk18) + { + case 3: + if (sub_8026BB8() == TRUE) + { + sub_8026C28(); + gUnknown_02022C98->unk11C = 1; + } + break; + case 4: + sub_80259FC(); + break; + case 11: + sub_8025C0C(); + break; + } +} + +static void sub_8025D50(void) +{ + switch (gUnknown_02022C98->unk18) + { + case 4: + sub_8027E30(&gUnknown_02022C98->unk32CC, &gUnknown_02022C98->unk31A0[0].unk2C, &gUnknown_02022C98->unk31A0[1].unk2C, &gUnknown_02022C98->unk31A0[2].unk2C, &gUnknown_02022C98->unk31A0[3].unk2C, &gUnknown_02022C98->unk31A0[4].unk2C, gUnknown_02022C98->unk40, gUnknown_02022C98->unk120, gUnknown_02022C98->unk12C); + break; + case 11: + sub_8027E30(&gUnknown_02022C98->unk32CC, &gUnknown_02022C98->unk31A0[0].unk2C, &gUnknown_02022C98->unk31A0[1].unk2C, &gUnknown_02022C98->unk31A0[2].unk2C, &gUnknown_02022C98->unk31A0[3].unk2C, &gUnknown_02022C98->unk31A0[4].unk2C, gUnknown_02022C98->unk40, gUnknown_02022C98->unk120, gUnknown_02022C98->unk12C); + break; + } +} + +static void sub_8025E0C(void) +{ + switch (gUnknown_02022C98->unk18) + { + case 4: + sub_8028164(gUnknown_02022C98->multiplayerId, &gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId], &gUnknown_02022C98->unk31A0[0].unk2C, &gUnknown_02022C98->unk31A0[1].unk2C, &gUnknown_02022C98->unk31A0[2].unk2C, &gUnknown_02022C98->unk31A0[3].unk2C, &gUnknown_02022C98->unk31A0[4].unk2C, &gUnknown_02022C98->unk40, &gUnknown_02022C98->unk120, &gUnknown_02022C98->unk12C); + break; + case 11: + sub_8028164(gUnknown_02022C98->multiplayerId, &gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId], &gUnknown_02022C98->unk31A0[0].unk2C, &gUnknown_02022C98->unk31A0[1].unk2C, &gUnknown_02022C98->unk31A0[2].unk2C, &gUnknown_02022C98->unk31A0[3].unk2C, &gUnknown_02022C98->unk31A0[4].unk2C, &gUnknown_02022C98->unk40, &gUnknown_02022C98->unk120, &gUnknown_02022C98->unk12C); + break; + } +} + +static void sub_8025ED8(void) +{ + switch (gUnknown_02022C98->unk18) + { + case 3: + sub_8027DD0(1); + gUnknown_02022C98->unk11C = 1; + break; + case 4: + if (gUnknown_02022C98->unk32CC.unk2C.unk0 != 0) + { + sub_80282EC(gUnknown_02022C98->unk32CC.unk2C.unk0); + } + break; + case 11: + if (gUnknown_02022C98->unk120 == 0 && gUnknown_02022C98->unk12C == 0) + { + sub_8028350(1); + } + break; + } +} + +static void sub_8025F48(void) +{ + if (gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId].unk2C.unk0 == 0) + { + if (!IsSEPlaying()) + { + gUnknown_02022C98->unk144 = 0; + } + } + else if (gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId].unk2C.unk4 == 1) + { + if (gUnknown_02022C98->unk144 == 0) + { + m4aSongNumStop(SE_SEIKAI); + PlaySE(SE_SEIKAI); + gUnknown_02022C98->unk144 = 1; + } + } + else if (gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId].unk2C.unk8 == 1) + { + if (gUnknown_02022C98->unk144 == 0 && !IsSEPlaying()) + { + PlaySE(SE_BOO); + sub_80284CC(1); + gUnknown_02022C98->unk144 = 1; + } + } + + if (gUnknown_02022C98->unk154 == 0 && gUnknown_02022C98->unk40 >= 10) + { + StopMapMusic(); + gUnknown_02022C98->unk154 = 1; + } + else if (gUnknown_02022C98->unk154 == 1) + { + PlayFanfareByFanfareNum(11); // MUS_ME_ZANNEN + gUnknown_02022C98->unk154 = 2; + } +} + +static void sub_8026044(void) +{ + u8 r8 = gUnknown_02022C98->unk44; + u8 r7 = gUnknown_02022C98->unk48; + u8 r4; + if (gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId].unk2C.unk0 == 0) + { + if (gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId].unk2C.unk4 != 1 && gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId].unk2C.unk8 != 1) + { + gUnknown_02022C98->unk144 = 0; + } + } + else if (gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId].unk2C.unk4 == 1) + { + if (gUnknown_02022C98->unk144 == 0) + { + m4aSongNumStop(SE_SEIKAI); + PlaySE(SE_SEIKAI); + gUnknown_02022C98->unk144 = 1; + } + } + else if (gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId].unk2C.unk8 == 1) + { + if (gUnknown_02022C98->unk144 == 0 && !IsSEPlaying()) + { + PlaySE(SE_BOO); + sub_80284CC(1); + gUnknown_02022C98->unk144 = 1; + } + } + for (r4 = r8; r4 < r7; r4++) + { + struct DodrioSubstruct_31A0_14 * ptr = &gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId].unk14; + if (ptr->unkB[r4] >= 10) + { + if (gUnknown_02022C98->unk148[r4] == 0) + { + PlaySE(SE_FUUSEN1 + ptr->unk0[r4]); + gUnknown_02022C98->unk148[r4] = 1; + } + } + else + { + gUnknown_02022C98->unk148[r4] = 0; + } + } + if (gUnknown_02022C98->unk154 == 0 && gUnknown_02022C98->unk40 >= 10) + { + StopMapMusic(); + gUnknown_02022C98->unk154 = 1; + } + else if (gUnknown_02022C98->unk154 == 1) + { + PlayFanfareByFanfareNum(11); // MUS_ME_ZANNEN + gUnknown_02022C98->unk154 = 2; + } +} + +static void sub_80261CC(void) +{ + RunTasks(); + AnimateSprites(); + BuildOamBuffer(); + UpdatePaletteFade(); +} + +static void sub_80261E4(void) +{ + TransferPlttBuffer(); + LoadOam(); + ProcessSpriteCopyRequests(); +} + +static void sub_80261F8(struct DodrioSubstruct_318C * a0, struct Pokemon * a1) +{ + a0->isShiny = IsMonShiny(a1); +} + +static void sub_802620C(TaskFunc func, u8 priority) +{ + CreateTask(func, priority); +} + +static void sub_802621C(TaskFunc func) +{ + gUnknown_02022C98->unk04 = CreateTask(func, 1); + gUnknown_02022C98->unk10 = 0; + gUnknown_02022C98->unk0C = 0; + gUnknown_02022C98->unk14 = 0; +} + +static void sub_8026240(u8 a0) +{ + gUnknown_02022C98->unk1C = gUnknown_02022C98->unk18; + gUnknown_02022C98->unk18 = a0; + gUnknown_02022C98->unk10 = 0; + gUnknown_02022C98->unk14 = 0; +} + +static bool32 sub_8026264(void) +{ + u8 r2 = gUnknown_02022C98->unk14 / 4; + gUnknown_02022C98->unk14++; + if (r2 != 0 && gUnknown_02022C98->unk14 % 4 == 0) + { + if (r2 < gUnknown_082F7A94[gUnknown_02022C98->unk24 - 1]) + { + SetGpuReg(REG_OFFSET_BG1HOFS, (r2 * 8)); + SetGpuReg(REG_OFFSET_BG2HOFS, -(r2 * 8)); + return FALSE; + } + else + { + return TRUE; + } + } + else + { + return FALSE; + } +} + +static void sub_80262C0(void) +{ + u8 i; + u8 start = gUnknown_02022C98->unk44; + u8 finish = gUnknown_02022C98->unk48; + + for (i = start; i < finish; i++) + { + struct DodrioSubstruct_31A0_14 * ptr = &gUnknown_02022C98->unk32CC.unk14; + ptr->unkB[i] = (i % 2 == 0) ? 1 : 0; + ptr->unk0[i] = 0; + } +} + +static void sub_8026324(void) +{ + u8 sp0 = gUnknown_02022C98->unk44; + u8 sp4 = gUnknown_02022C98->unk48; + u8 sp8 = gUnknown_02022C98->unk24; + u8 i, j, k, r5; + + if (gUnknown_02022C98->unk40 >= 10) + return; + + for (i = 0; i < sp8; i++) + { + u8 *ptr = &gUnknown_02022C98->unk31A0[i].unk2C.unk0; + if (*ptr != 0 && gUnknown_02022C98->unkA8[i] == 1) + { + for (j = sp0; j < sp4; j++) + { + r5 = gUnknown_082F449C[0][0][j]; + if (gUnknown_02022C98->unkF4[r5][0] == i || gUnknown_02022C98->unkF4[r5][1] == i) + break; + if (sub_8026634(i, *ptr, r5) == TRUE) + { + for (k = 0; k < 2; k++) + { + if (gUnknown_02022C98->unkF4[r5][k] == 0xFF) + { + gUnknown_02022C98->unkF4[r5][k] = i; + gUnknown_02022C98->unkA8[i] = 2; + gUnknown_02022C98->unkC4[r5] = 1; + break; + } + } + break; + } + if (gUnknown_02022C98->unk31A0[i].unk2C.unk8 == 1) + break; + } + } + } + + for (j = sp0; j < sp4; j++) + { + u8 id = 0xFF; + r5 = gUnknown_082F449C[0][0][j]; + if (gUnknown_02022C98->unkC4[r5] == 1) + { + s32 r2; + u8 r4, r3 = gUnknown_02022C98->unk90[sub_8026D8C(r5)] / 7; + if (r3 >= ARRAY_COUNT(gUnknown_082F7A88) - 1) + r3 = ARRAY_COUNT(gUnknown_082F7A88) - 1; + + r2 = gUnknown_082F7A88[r3][gUnknown_02022C98->unk31A0[0].unk14.unk0[r5]] - gUnknown_02022C98->unkD0[r5]; + if (r2 < 6) + gUnknown_02022C98->unk9C[r5] += r2; + + if (++gUnknown_02022C98->unk9C[r5] >= 6) + { + gUnknown_02022C98->unk9C[r5] = 0; + if (gUnknown_02022C98->unkF4[r5][0] == 0xFF && gUnknown_02022C98->unkF4[r5][1] == 0xFF) + { + continue; + } + else if (gUnknown_02022C98->unkF4[r5][0] != 0xFF && gUnknown_02022C98->unkF4[r5][1] == 0xFF) + { + r4 = gUnknown_02022C98->unkF4[r5][0]; + } + else + { + u8 unk0 = gUnknown_02022C98->unkF4[r5][0]; + i = gUnknown_02022C98->unkF4[r5][1]; // Have to re-use the variable to match. + if (!(Random() & 1)) + { + r4 = unk0; + id = i; + } + else + { + r4 = i; + id = unk0; + } + } + gUnknown_02022C98->unk32CC.unk14.unkB[r5] = 7; + gUnknown_02022C98->unkC4[r5] = 2; + gUnknown_02022C98->unkA8[r4] = 3; + gUnknown_02022C98->unkB8[r5] = r4; + gUnknown_02022C98->unk31A0[r4].unk2C.unk4 = 1; + gUnknown_02022C98->unk31A0[id].unk2C.unk8 = 1; + gUnknown_02022C98->unk86[r4]++; + sub_8026F1C(0, r5, r4); + sub_8027234(TRUE); + sub_8026D1C(r4); + gUnknown_02022C98->unkE8[r5] = gUnknown_02022C98->unk32CC.unk14.unk0[r5]; + gUnknown_02022C98->unk32CC.unk14.unk0[r5] = 3; + gUnknown_02022C98->unkF4[r5][0] = 0xFF; + gUnknown_02022C98->unkF4[r5][1] = 0xFF; + } + } + } +} + +static bool32 sub_8026634(u8 a0, u8 a1, u8 a2) +{ + s32 r7 = 0; + u8 r5 = gUnknown_02022C98->unk24 - 1; + struct DodrioSubstruct_31A0_14 * ptr = &gUnknown_02022C98->unk32CC.unk14; + + switch (a1) + { + case 3: + default: + r7 = 0; + break; + case 2: + r7 = 1; + break; + case 1: + r7 = 2; + break; + } + if (ptr->unkB[a2] == 6 || ptr->unkB[a2] == 7) + { + if (a2 == gUknnown_082F45AF[r5][a0][r7]) + { + if (gUnknown_02022C98->unkC4[a2] == 1 || gUnknown_02022C98->unkC4[a2] == 2) + { + gUnknown_02022C98->unk31A0[a0].unk2C.unk8 = 1; + return FALSE; + } + else + { + return TRUE; + } + } + } + else + { + if (a2 == gUknnown_082F45AF[r5][a0][r7]) + { + gUnknown_02022C98->unkA8[a0] = 4; + gUnknown_02022C98->unk31A0[a0].unk2C.unk8 = 1; + } + } + return FALSE; +} + +static void sub_802671C(void) +{ + u8 r1 = gUnknown_02022C98->unk44; + u8 r9 = gUnknown_02022C98->unk48; + u8 r3 = 0; + u8 r10 = 0; + u8 i; + u8 r2; + struct DodrioStruct *ptr; + + gUnknown_02022C98->unk120 = 0; + + for (i = r1; i < r9 - 1; i++) + { + ptr = gUnknown_02022C98; + + if (gUnknown_02022C98->unkC4[i] == 0 || gUnknown_02022C98->unkC4[i] == 1) + { + gUnknown_02022C98->unk120 = 1; + if (ptr->unk32CC.unk14.unkB[i] >= 10) + { + ptr->unk32CC.unk14.unkB[i] = 10; + gUnknown_02022C98->unkC4[i] = 3; + if (gUnknown_02022C98->unk148[i] == 0) + { + gUnknown_02022C98->unk148[i] = 1; + PlaySE(SE_FUUSEN1 + ptr->unk32CC.unk14.unk0[i]); + } + if (gUnknown_02022C98->unk40 < 10 || r10 == 1) + { + r10 = 1; + gUnknown_02022C98->unk148[i] = 0; + if (gUnknown_02022C98->unk40 < 10) + { + gUnknown_02022C98->unk40++; + } + sub_8026F1C(3, i, 0); + sub_8027234(FALSE); + } + } + else + { + r3 = gUnknown_02022C98->unk90[sub_8026D8C(i)] / 7; + if (r3 >= 2) + { + r3 = 2; + } + r2 = gUnknown_082F7A88[r3][ptr->unk32CC.unk14.unk0[i]]; + if (++gUnknown_02022C98->unkD0[i] >= r2) + { + ptr->unk32CC.unk14.unkB[i]++; + gUnknown_02022C98->unkD0[i] = 0; + } + sub_8026324(); + } + } + else if (gUnknown_02022C98->unkC4[i] == 2) + { + gUnknown_02022C98->unk120 = 1; + if (++gUnknown_02022C98->unkDC[i] >= 20) + { + gUnknown_02022C98->unk31A0[gUnknown_02022C98->unkB8[i]].unk2C.unk4 = 0; + gUnknown_02022C98->unkDC[i] = 0; + gUnknown_02022C98->unkD0[i] = 0; + gUnknown_02022C98->unkC4[i] = 0; + ptr->unk32CC.unk14.unkB[i] = 1; + ptr->unk32CC.unk14.unk0[i] = sub_8026DB0(sub_8026D8C(i), i); + } + } + else if (gUnknown_02022C98->unkC4[i] == 3) + { + if (++gUnknown_02022C98->unkDC[i] >= 20) + { + if (gUnknown_02022C98->unk40 < 10) + { + gUnknown_02022C98->unkDC[i] = 0; + gUnknown_02022C98->unkD0[i] = 0; + gUnknown_02022C98->unkC4[i] = 0; + ptr->unk32CC.unk14.unkB[i] = 1; + gUnknown_02022C98->unkE8[i] = ptr->unk32CC.unk14.unk0[i]; + ptr->unk32CC.unk14.unk0[i] = sub_8026DB0(sub_8026D8C(i), i); + } + } + } + } +} + +static void sub_8026988(void) +{ + u8 i, first, count; + + first = gUnknown_02022C98->unk44; + count = gUnknown_02022C98->unk48; + for (i = first; i < count; i++) + { + struct DodrioSubstruct_31A0 *ptr = &gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId]; + u8 var = gUnknown_082F449C[gUnknown_02022C98->unk24 - 1][gUnknown_02022C98->multiplayerId][i]; + + if (ptr->unk14.unkB[var] != 0) + sub_8028BF8(i, FALSE); + else + sub_8028BF8(i, TRUE); + + if (ptr->unk14.unkB[var] > 9) + { + sub_8028CA4(i, ptr->unk14.unk0[var] + 3); + sub_8028C7C(i, ptr->unk14.unkB[var] * 2 - 1); + } + else if (ptr->unk14.unk0[var] == 3) + { + ptr->unk14.unkB[var] = 7; + sub_8028CA4(i, 6); + sub_8028C7C(i, ptr->unk14.unkB[var] * 2 - 1); + } + else + { + sub_8028CA4(i, ptr->unk14.unk0[var]); + sub_8028C7C(i, ptr->unk14.unkB[var] * 2); + } + } +} + +static void sub_8026A88(void) +{ + u8 i, count; + + count = gUnknown_02022C98->unk24; + for (i = 0; i < count; i++) + { + struct DodrioSubstruct_31A0 *ptr = &gUnknown_02022C98->unk31A0[i]; + sub_80286B4(i, ptr->unk2C.unk0); + } +} + +static void sub_8026AC8(void) +{ + u8 i, count; + + count = gUnknown_02022C98->unk24; + for (i = 0; i < count; i++) + sub_80286B4(i, 4); +} + +static void sub_8026AF4(void) +{ + sub_8026988(); + if (gUnknown_02022C98->unk40 > 9) + sub_8026AC8(); + else + sub_8026A88(); + + sub_80288D4(gUnknown_02022C98->unk40); +} + +// This function is literally the same as the one above...Why? +static void sub_8026B28(void) +{ + sub_8026988(); + if (gUnknown_02022C98->unk40 > 9) + sub_8026AC8(); + else + sub_8026A88(); + + sub_80288D4(gUnknown_02022C98->unk40); +} + +static void sub_8026B5C(u8 arg0, u8 *arg1, u8 *arg2) +{ + switch (arg0) + { + case 1: + *arg1 = 4, *arg2 = 7; + break; + case 2: + *arg1 = 3, *arg2 = 8; + break; + case 3: + *arg1 = 2, *arg2 = 9; + break; + case 4: + *arg1 = 1, *arg2 = 10; + break; + case 5: + *arg1 = 0, *arg2 = 11; + break; + } +} + +static bool32 sub_8026BB8(void) +{ + u8 i, count; + + count = gUnknown_02022C98->unk24; + for (i = 1; i < count; i++) + { + if (gUnknown_02022C98->unk158[i] == 0) + gUnknown_02022C98->unk158[i] = sub_8027DFC(i); + } + + // This loop won't ever run, the seemingly poitnless assingment below is to make the compiler + // generate code for it. + count = count; + for (; i < count; i++) + { + if (gUnknown_02022C98->unk158[i] == 0) + return FALSE; + } + + return TRUE; +} + +static void sub_8026C28(void) +{ + u8 i; + + for (i = 0; i < 5; i++) + gUnknown_02022C98->unk158[i] = 0; +} + +static bool32 sub_8026C50(void) +{ + if (gUnknown_02022C98->unk40 > 9 && gUnknown_02022C98->unk120 == 0) + { + gUnknown_02022C98->unk40 = 10; + if (gUnknown_02022C98->unk12C != 0) + return TRUE; + } + + return FALSE; +} + +static bool32 sub_8026C90(void) +{ + u8 i, first, count; + + if (gUnknown_02022C98->unk40 > 9) + { + first = gUnknown_02022C98->unk44; + count = gUnknown_02022C98->unk48; + gUnknown_02022C98->unk40 = 10; + if (gUnknown_02022C98->unk12C != 0) + { + for (i = first; i < count; i++) + { + struct DodrioSubstruct_31A0 *ptr = &gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId]; + u8 var = gUnknown_082F449C[gUnknown_02022C98->unk24 - 1][gUnknown_02022C98->multiplayerId][i]; + + if (ptr->unk14.unkB[var] != 10) + return FALSE; + } + return TRUE; + } + } + + return FALSE; +} + +static void sub_8026D1C(u8 arg0) +{ + u8 var = gUnknown_082F7A9C[gUnknown_02022C98->unk90[arg0] % 7] + (gUnknown_02022C98->unk90[arg0] / 7) * 100; + if (gUnknown_02022C98->unk86[arg0] >= var) + gUnknown_02022C98->unk90[arg0]++; +} + +static u8 sub_8026D8C(u8 arg0) +{ + return gUnknown_082F4648[gUnknown_02022C98->unk24 - 1][arg0]; +} + +static u8 sub_8026DB0(u8 arg0, u8 arg1) +{ + u8 i, var3; + u8 count = gUnknown_02022C98->unk24 - 1; + u8 var0 = gUnknown_082F45FA[count][arg0][0]; + u8 var1 = gUnknown_082F45FA[count][arg0][1]; + u8 var2 = gUnknown_082F45FA[count][arg0][2]; + + for (i = 0; gUnknown_082F467F[count][i] != 0; i++) + { + if (arg1 == gUnknown_082F467F[count][i]) + return sub_8026E70(gUnknown_02022C98->unk90[var1], arg1); + } + + // Gets the highest of the three. + if (gUnknown_02022C98->unk90[var0] > gUnknown_02022C98->unk90[var1]) + var3 = gUnknown_02022C98->unk90[var0]; + else + var3 = gUnknown_02022C98->unk90[var1]; + + if (gUnknown_02022C98->unk90[var2] > var3) + var3 = gUnknown_02022C98->unk90[var2]; + + return sub_8026E70(var3, arg1); +} + +static u8 sub_8026E70(u8 arg0, u8 arg1) +{ + u8 var = gUnknown_02022C98->unkE8[arg1]; + switch (arg0 % 7) + { + default: return 0; + case 0: return 0; + case 1: return 1; + case 2: return 2; + case 3: + if (var == 0) + return 1; + else + return 0; + case 4: + if (var == 0) + return 2; + else + return 0; + case 5: + if (var == 2) + return 1; + else + return 2; + case 6: + if (var == 0) + return 1; + else if (var == 1) + return 2; + else + return 0; + } +} + +static bool32 sub_8026EEC(u16 arg0[5][6]) +{ + int sum, i; + for (sum = 0, i = 0; i < GetLinkPlayerCount(); sum += arg0[i][3], i++) + ; + + if (sum >= 11) + return TRUE; + else + return FALSE; +} + +static void sub_8026F1C(u8 arg0, u8 arg1, u8 arg2) +{ + u8 var; + u8 count = gUnknown_02022C98->unk24; + switch (arg0) + { + case 0: + case 1: + case 2: + var = gUnknown_02022C98->unk31A0[0].unk14.unk0[arg1]; + gUnknown_02022C98->unk4A[arg2][var] = IncrementWithLimit(gUnknown_02022C98->unk4A[arg2][var], 20000); + break; + case 3: + if (sub_8026EEC(gUnknown_02022C98->unk4A)) + break; + switch (count) + { + case 5: + switch (arg1) + { + case 0: + gUnknown_02022C98->unk4A[2][3]++; + gUnknown_02022C98->unk4A[3][3]++; + break; + case 1: + gUnknown_02022C98->unk4A[3][3]++; + break; + case 2: + gUnknown_02022C98->unk4A[3][3]++; + gUnknown_02022C98->unk4A[4][3]++; + break; + case 3: + gUnknown_02022C98->unk4A[4][3]++; + break; + case 4: + gUnknown_02022C98->unk4A[4][3]++; + gUnknown_02022C98->unk4A[0][3]++; + break; + case 5: + gUnknown_02022C98->unk4A[0][3]++; + break; + case 6: + gUnknown_02022C98->unk4A[0][3]++; + gUnknown_02022C98->unk4A[1][3]++; + break; + case 7: + gUnknown_02022C98->unk4A[1][3]++; + break; + case 8: + gUnknown_02022C98->unk4A[1][3]++; + gUnknown_02022C98->unk4A[2][3]++; + break; + case 9: + gUnknown_02022C98->unk4A[2][3]++; + break; + } + break; + case 4: + switch (arg1) + { + case 1: + gUnknown_02022C98->unk4A[2][3]++; + gUnknown_02022C98->unk4A[3][3]++; + break; + case 2: + gUnknown_02022C98->unk4A[3][3]++; + break; + case 3: + gUnknown_02022C98->unk4A[3][3]++; + gUnknown_02022C98->unk4A[0][3]++; + break; + case 4: + gUnknown_02022C98->unk4A[0][3]++; + break; + case 5: + gUnknown_02022C98->unk4A[0][3]++; + gUnknown_02022C98->unk4A[1][3]++; + break; + case 6: + gUnknown_02022C98->unk4A[1][3]++; + break; + case 7: + gUnknown_02022C98->unk4A[1][3]++; + gUnknown_02022C98->unk4A[2][3]++; + break; + case 8: + gUnknown_02022C98->unk4A[2][3]++; + break; + } + break; + case 3: + switch (arg1) + { + case 2: + gUnknown_02022C98->unk4A[1][3]++; + gUnknown_02022C98->unk4A[2][3]++; + break; + case 3: + gUnknown_02022C98->unk4A[2][3]++; + break; + case 4: + gUnknown_02022C98->unk4A[2][3]++; + gUnknown_02022C98->unk4A[0][3]++; + break; + case 5: + gUnknown_02022C98->unk4A[0][3]++; + break; + case 6: + gUnknown_02022C98->unk4A[0][3]++; + gUnknown_02022C98->unk4A[1][3]++; + break; + case 7: + gUnknown_02022C98->unk4A[1][3]++; + break; + } + break; + case 2: + switch (arg1) + { + case 3: + gUnknown_02022C98->unk4A[0][3]++; + gUnknown_02022C98->unk4A[1][3]++; + break; + case 4: + gUnknown_02022C98->unk4A[0][3]++; + break; + case 5: + gUnknown_02022C98->unk4A[0][3]++; + gUnknown_02022C98->unk4A[1][3]++; + break; + case 6: + gUnknown_02022C98->unk4A[1][3]++; + break; + } + break; + } + break; + } +} + +static void sub_8027234(bool32 arg0) +{ + if (gUnknown_02022C98->unk24 != 5) + return; + + if (arg0 == TRUE) + { + if (++gUnknown_02022C98->unk112 > gUnknown_02022C98->unk114) + gUnknown_02022C98->unk114 = gUnknown_02022C98->unk112; + if (gUnknown_02022C98->unk112 > 9999) + gUnknown_02022C98->unk112 = 9999; + } + else + { + if (gUnknown_02022C98->unk112 > gUnknown_02022C98->unk114) + gUnknown_02022C98->unk114 = gUnknown_02022C98->unk112; + gUnknown_02022C98->unk112 = 0; + } +} + +static void sub_80272A4(void) +{ + u8 i; + for (i = 0; i < gUnknown_02022C98->unk24; i++) + gUnknown_02022C98->unk4A[i][5] = gUnknown_02022C98->unk114; +} + +static void sub_80272E8(void) +{ + u8 i, j; + + for (i = 0; i < 5; i++) + { + for (j = 0; j < 11; j++) + gUnknown_02022C98->unk31A0[i].unk14.unkB[j] = 0; + gUnknown_02022C98->unk31A0[i].unk2C.unk0 = 0; + gUnknown_02022C98->unk31A0[i].unk2C.unk4 = 0; + gUnknown_02022C98->unk90[i] = 0; + gUnknown_02022C98->unk86[i] = 0; + gUnknown_02022C98->unk3308[i].unk0 = 0; + gUnknown_02022C98->unk3308[i].unk4 = 0; + gUnknown_02022C98->unk4A[i][0] = 0; + gUnknown_02022C98->unk4A[i][1] = 0; + gUnknown_02022C98->unk4A[i][2] = 0; + gUnknown_02022C98->unk4A[i][3] = 0; + gUnknown_02022C98->unk4A[i][4] = 0; + gUnknown_02022C98->unk4A[i][5] = 0; + } + gUnknown_02022C98->unk154 = 0; + gUnknown_02022C98->unk112 = 0; + gUnknown_02022C98->unk40 = 0; + sub_8026A88(); + sub_8026988(); +} + +static const s16 gUnknown_082F7B24[] = {10, 30, 50, 50}; + +static void sub_80273F0(void) +{ + u8 i, var = 0, var2 = 0; + + switch (gUnknown_02022C98->unk24) + { + case 4: var = 1; break; + case 5: var = 2; break; + } + + var2 = Random() % 10; + for (i = 0; i < 5; i++) + gUnknown_02022C98->unk4A[i][4] = gUnknown_082F7AA4[var][var2]; +} + +static u32 sub_802745C(u8 arg0) +{ + u32 sum = gUnknown_02022C98->unk4A[arg0][0] + + gUnknown_02022C98->unk4A[arg0][1] + + gUnknown_02022C98->unk4A[arg0][2]; + return min(sum, 9999); +} + +static void sub_802749C(void) +{ + u32 berriesPicked = Min(sub_802745C(gUnknown_02022C98->multiplayerId), 9999); + u32 score = Min(sub_80276C0(gUnknown_02022C98->multiplayerId), 999990); + + if (gSaveBlock2Ptr->berryPick.bestScore < score) + gSaveBlock2Ptr->berryPick.bestScore = score; + if (gSaveBlock2Ptr->berryPick.berriesPicked < berriesPicked) + gSaveBlock2Ptr->berryPick.berriesPicked = berriesPicked; + if (gSaveBlock2Ptr->berryPick.berriesPickedInRow < gUnknown_02022C98->unk114) + gSaveBlock2Ptr->berryPick.berriesPickedInRow = gUnknown_02022C98->unk114; +} + +static u8 sub_8027518(u8 arg0) +{ + u8 i, saved; + + saved = gUnknown_02022C98->unk98[3]; + for (i = 3; i != 0; i--) + gUnknown_02022C98->unk98[i] = gUnknown_02022C98->unk98[i - 1]; + gUnknown_02022C98->unk98[0] = arg0; + return saved; +} + +static void sub_8027554(void) +{ + if (gUnknown_02022C98->unkB0[gUnknown_02022C98->multiplayerId] == 0) + { + if (gMain.newKeys & DPAD_UP) + { + gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId].unk2C.unk0 = 2; + gUnknown_02022C98->unkB0[gUnknown_02022C98->multiplayerId] = 6; + PlaySE(SE_W204); + } + else if (gMain.newKeys & DPAD_LEFT) + { + gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId].unk2C.unk0 = 3; + gUnknown_02022C98->unkB0[gUnknown_02022C98->multiplayerId] = 6; + PlaySE(SE_W204); + } + else if (gMain.newKeys & DPAD_RIGHT) + { + gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId].unk2C.unk0 = 1; + gUnknown_02022C98->unkB0[gUnknown_02022C98->multiplayerId] = 6; + PlaySE(SE_W204); + } + else + { + gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId].unk2C.unk0 = 0; + } + } + else + { + gUnknown_02022C98->unkB0[gUnknown_02022C98->multiplayerId]--; + } +} + +static void sub_8027608(void) +{ + gUnknown_02022C98->unk31A0[gUnknown_02022C98->multiplayerId].unk2C.unk0 = 0; +} + +static u16 sub_802762C(void) +{ + return gUnknown_02022C98->unk4A[gUnknown_02022C98->multiplayerId][4] + FIRST_BERRY_INDEX; +} + +static u8 sub_8027650(void) +{ + return gUnknown_02022C98->unk24; +} + +static u8 *sub_8027660(u8 id) +{ + if (gReceivedRemoteLinkPlayers) + return gLinkPlayers[id].name; + else + return gUnknown_02022C98->unk31A0[id].name; +} + +static u16 sub_80276A0(u8 arg0, u8 arg1) +{ + return gUnknown_02022C98->unk4A[arg0][arg1]; +} + +static u32 sub_80276C0(u8 arg0) +{ + u8 i; + u32 var, sum = 0; + + for (i = 0; i < 3; i++) + sum += gUnknown_02022C98->unk4A[arg0][i] * gUnknown_082F7B24[i]; + + var = gUnknown_02022C98->unk4A[arg0][3] * gUnknown_082F7B24[3]; + if (sum <= var) + return 0; + else + return sum - var; +} + +static u32 sub_8027748(void) +{ + u8 i, count = gUnknown_02022C98->unk24; + u32 maxVar = sub_80276C0(0); + + for (i = 1; i < count; i++) + { + u32 var = sub_80276C0(i); + if (var > maxVar) + maxVar = var; + } + return Min(maxVar, 999990); +} + +static u32 sub_802778C(u8 arg0) +{ + u8 i, count = gUnknown_02022C98->unk24; + u16 maxVar = gUnknown_02022C98->unk4A[0][arg0]; + + for (i = 0; i < count; i++) + { + u16 var = gUnknown_02022C98->unk4A[i][arg0]; + if (var > maxVar) + maxVar = var; + } + return maxVar; +} + +static u32 sub_80277D0(u8 arg0) +{ + u32 vals[5], temp; + s16 r6 = TRUE; + u8 i, count = gUnknown_02022C98->unk24; + + for (i = 0; i < count; i++) + vals[i] = temp = sub_80276C0(i); + + while (r6) + { + r6 = FALSE; + for (i = 0; i < count - 1; i++) + { + if (vals[i] < vals[i + 1]) + { + SWAP(vals[i], vals[i + 1], temp); + r6 = TRUE; + } + } + } + + return vals[arg0]; +} + +static u32 sub_802784C(void) +{ + u8 i, r10 = 0, r8 = 0, r9 = 0, count = gUnknown_02022C98->unk24; + + // Function called two times for some reason. + sub_8027748(); + if (sub_8027748() == 0) + { + for (i = 0; i < count; i++) + { + gUnknown_02022C98->unk3308[i].unk0 = 4; + gUnknown_02022C98->unk3308[i].unk4 = 0; + } + } + + for (i = 0; i < count; i++) + gUnknown_02022C98->unk3308[i].unk4 = Min(sub_80276C0(i), 999990); + + do + { + u32 r6 = sub_80277D0(r10); + u8 r3 = r8; + for (i = 0; i < count; i++) + { + if (r6 == gUnknown_02022C98->unk3308[i].unk4) + { + gUnknown_02022C98->unk3308[i].unk0 = r3; + r8++; + r9++; + } + } + r10 = r8; + } while (r9 < count); + + return 0; +} + +static void sub_802793C(struct DodrioSubstruct_3308 *dst, u8 id) +{ + *dst = gUnknown_02022C98->unk3308[id]; +} + +// Unused function +static u8 sub_802795C(u8 arg0) +{ + u8 i, ret = 0, count = gUnknown_02022C98->unk24; + u32 var, vars[5] = {0}; + + for (i = 0; i < count; i++) + vars[i] = sub_80276C0(i); + + var = vars[arg0]; + for (i = 0; i < 5; i++) + { + if (i != arg0 && var < vars[i]) + ret++; + } + + return ret; +} + +static u8 sub_80279C8(void) +{ + u8 multiplayerId = gUnknown_02022C98->multiplayerId; + u16 itemId = sub_802762C(); + + if (sub_80276C0(multiplayerId) != sub_8027748()) + return 3; + if (!CheckBagHasSpace(itemId, 1)) + return 2; + + AddBagItem(itemId, 1); + if (!CheckBagHasSpace(itemId, 1)) + return 1; + return 0; +} + +// Really? What next, u32 Add(u32 a)return a+1;? +static u32 IncrementWithLimit(u32 a, u32 max) +{ + if (a < max) + return a + 1; + else + return max; +} + +// Gamefreak pls, min(a, b) ((a) < (b) ? (a) : (b)) is a well-known macro +static u32 Min(u32 a, u32 b) +{ + if (a < b) + return a; + else + return b; +} + +static u8 sub_8027A48(u8 id) +{ + return gUnknown_02022C98->unk34[id]; +} + +void sub_8027A5C(void) +{ + int i; + for (i = 0; i < PARTY_SIZE; i++) + { + if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_HAS_SPECIES) + && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_DODRIO) + { + gSpecialVar_Result = 1; + return; + } + } + + gSpecialVar_Result = 0; +} + +void sub_8027AAC(void) +{ + u8 taskId = CreateTask(sub_8027ACC, 0); + sub_8027ACC(taskId); +} + +// Data related to printing saved results. +static const struct WindowTemplate gUnknown_082F7B2C = +{ + .bg = 0, + .tilemapLeft = 5, + .tilemapTop = 1, + .width = 20, + .height = 11, + .paletteNum = 15, + .baseBlock = 0x1, +}; + +static const u8 *const gUnknown_082F7B34[3] = {gText_BerriesPicked, gText_BestScore, gText_BerriesInRowFivePlayers}; +static const u8 gUnknown_082F7B40[] = {4, 7, 4}; + +ALIGNED(4) +static const u8 gUnknown_082F7B44[][2] = {{25}, {41}, {57}}; +static const u8 gUnknown_082F7B4A[][2] = {{25}, {41}, {73}}; + +static void sub_8027ACC(u8 taskId) +{ + struct WindowTemplate window; + s32 i, width, widthCurr; + s16 *data = gTasks[taskId].data; + + switch (data[0]) + { + case 0: + window = gUnknown_082F7B2C; + width = GetStringWidth(1, gText_BerryPickingRecords, 0); + for (i = 0; i < ARRAY_COUNT(gUnknown_082F7B34); i++) + { + widthCurr = GetStringWidth(1, gUnknown_082F7B34[i], 0) + 50; + if (widthCurr > width) + width = widthCurr; + } + width = (width + 7) / 8; + if (width & 1) + width++; + window.tilemapLeft = (30 - width) / 2; + window.width = width; + data[1] = AddWindow(&window); + sub_8027BEC(data[1], width); + CopyWindowToVram(data[1], 3); + data[0]++; + break; + case 1: + if (!IsDma3ManagerBusyWithBgCopy()) + data[0]++; + break; + case 2: + if (gMain.newKeys & (A_BUTTON | B_BUTTON)) + { + rbox_fill_rectangle(data[1]); + CopyWindowToVram(data[1], 1); + data[0]++; + } + break; + case 3: + if (!IsDma3ManagerBusyWithBgCopy()) + { + RemoveWindow(data[1]); + DestroyTask(taskId); + EnableBothScriptContexts(); + } + break; + } +} + +static void sub_8027BEC(u8 windowId, s32 width) +{ + s32 i, x, numWidth; + s32 results[3]; + results[0] = gSaveBlock2Ptr->berryPick.berriesPicked; + results[1] = gSaveBlock2Ptr->berryPick.bestScore; + results[2] = gSaveBlock2Ptr->berryPick.berriesPickedInRow; + + LoadUserWindowBorderGfx_(windowId, 0x21D, 0xD0); + DrawTextBorderOuter(windowId, 0x21D, 0xD); + FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); + AddTextPrinterParameterized(windowId, 1, gText_BerryPickingRecords, GetStringCenterAlignXOffset(1, gText_BerryPickingRecords, width * 8), 1, TEXT_SPEED_FF, NULL); + for (i = 0; i < 3; i++) + { + ConvertIntToDecimalStringN(gStringVar1, results[i], STR_CONV_MODE_LEFT_ALIGN, gUnknown_082F7B40[i]); + numWidth = GetStringWidth(1, gStringVar1, -1); + AddTextPrinterParameterized(windowId, 1, gUnknown_082F7B34[i], 0, gUnknown_082F7B44[i][0], TEXT_SPEED_FF, NULL); + x = (width * 8) - numWidth; + AddTextPrinterParameterized(windowId, 1, gStringVar1, x, gUnknown_082F7B4A[i][0], TEXT_SPEED_FF, NULL); + } + PutWindowTilemap(windowId); +} + +// Debug functions? +static const u16 gUnknown_082F7B50[][4] = +{ + {9999, 0, 90, 9999}, + {9999, 9999, 70, 9999}, + {9999, 0, 9999, 0}, + {9999, 9999, 60, 0}, + {9999, 9999, 9999, 0}, +}; + +static const u8 gUnknown_082F7B78[] = _("あいうえおかき"); +static const u8 gUnknown_082F7B80[] = _("ABCDEFG"); +static const u8 gUnknown_082F7B88[] = _("0123456"); + +static const u8 *const gUnknown_082F7B90[] = +{ + gUnknown_082F7B78, + gUnknown_082F7B78, + gUnknown_082F7B78, + gUnknown_082F7B80, + gUnknown_082F7B88 +}; + +static void sub_8027D20(void) +{ + gUnknown_02022C98->unk24 = GetLinkPlayerCount(); +} + +static void sub_8027D38(void) +{ + u8 i, playerId; + + for (playerId = gUnknown_02022C98->unk24; playerId < 5; playerId++) + StringCopy(gLinkPlayers[playerId].name, gUnknown_082F7B90[playerId]); + + gUnknown_02022C98->unk24 = 5; + for (i = 0; i < 4; i++) + { + for (playerId = 0; playerId < gUnknown_02022C98->unk24; playerId++) + gUnknown_02022C98->unk4A[playerId][i] = gUnknown_082F7B50[playerId][i]; + } +} + +struct UnkPacket1 +{ + u8 id; + u8 ALIGNED(4) unk4; +}; + +static void sub_8027DD0(u32 arg0) +{ + struct UnkPacket1 packet; + packet.id = 1; + packet.unk4 = arg0; + sub_800FE50(&packet); +} + +static u32 sub_8027DFC(u32 arg0) +{ + struct UnkPacket1 *packet; + + if ((gRecvCmds[0][0] & 0xFF00) != 0x2F00) + return 0; + + packet = (void *)&gRecvCmds[arg0][1]; + if (packet->id == 1) + return packet->unk4; + + return 0; +} + +struct UnkPacket2 +{ + u8 id; + u8 unk1_0:4; + u8 unk1_1:4; + u8 unk2_0:4; + u8 unk2_1:4; + u8 unk3_0:4; + u8 unk3_1:4; + u8 unk4_0:4; + u8 unk4_1:4; + u8 unk5_0:4; + u8 unk5_1:4; + u8 unk6_0:2; + u8 unk6_1:2; + u8 unk6_2:2; + u8 unk6_3:2; + u8 unk7_0:2; + u8 unk7_1:2; + u8 unk7_2:2; + u8 unk7_3:2; + u8 unk8_0:2; + u8 unk8_1:2; + u8 unk8_2:2; + u8 unk8_3:2; + u8 unk9_0:2; + u8 unk9_1:2; + u8 unk9_2:2; + u8 unk9_3:1; + u8 unk9_4:1; + u8 unkA_0:1; + u8 unkA_1:1; + u8 unkA_2:1; + u8 unkA_3:5; + u8 unkB_0:1; + u8 unkB_1:1; + u8 unkB_2:1; + u8 unkB_3:1; + u8 unkB_4:1; + u8 unkB_5:1; + u8 unkB_6:1; +}; + +#ifdef NONMATCHING +static void sub_8027E30(struct DodrioSubstruct_31A0 *arg0, struct DodrioSubstruct_31A0_2C *arg1, struct DodrioSubstruct_31A0_2C *arg2, struct DodrioSubstruct_31A0_2C *arg3, struct DodrioSubstruct_31A0_2C *arg4, struct DodrioSubstruct_31A0_2C *arg5, u8 arg6, u32 arg7, u32 arg8) +{ + struct UnkPacket2 packet; + struct DodrioSubstruct_31A0_14 *ptr = &arg0->unk14; + + packet.id = 2; + packet.unk1_0 = ptr->unkB[0]; + packet.unk1_1 = ptr->unkB[1]; + packet.unk2_0 = ptr->unkB[2]; + packet.unk2_1 = ptr->unkB[3]; + packet.unk3_0 = ptr->unkB[4]; + packet.unk3_1 = ptr->unkB[5]; + packet.unk4_0 = ptr->unkB[6]; + packet.unk4_1 = ptr->unkB[7]; + packet.unk5_0 = ptr->unkB[8]; + packet.unk5_1 = ptr->unkB[9]; + + packet.unk6_0 = ptr->unk0[0]; + packet.unk6_1 = ptr->unk0[1]; + packet.unk6_2 = ptr->unk0[2]; + packet.unk6_3 = ptr->unk0[3]; + packet.unk7_0 = ptr->unk0[4]; + packet.unk7_1 = ptr->unk0[5]; + packet.unk7_2 = ptr->unk0[6]; + packet.unk7_3 = ptr->unk0[7]; + packet.unk8_0 = ptr->unk0[8]; + packet.unk8_1 = ptr->unk0[9]; + + packet.unk8_2 = arg1->unk0; + packet.unk8_3 = arg2->unk0; + packet.unk9_0 = arg3->unk0; + packet.unk9_1 = arg4->unk0; + packet.unk9_2 = arg5->unk0; + + packet.unk9_3 = arg1->unk4; + packet.unk9_4 = arg2->unk4; + packet.unkA_0 = arg3->unk4; + packet.unkA_1 = arg4->unk4; + packet.unkA_2 = arg5->unk4; + + packet.unkB_2 = arg1->unk8; + packet.unkB_3 = arg2->unk8; + packet.unkB_4 = arg3->unk8; + packet.unkB_5 = arg4->unk8; + packet.unkB_6 = arg5->unk8; + + packet.unkA_3 = arg6; + packet.unkB_1 = arg7; + packet.unkB_0 = arg8; + sub_800FE50(&packet); +} +#else +NAKED +static void sub_8027E30(struct DodrioSubstruct_31A0 *arg0, struct DodrioSubstruct_31A0_2C *arg1, struct DodrioSubstruct_31A0_2C *arg2, struct DodrioSubstruct_31A0_2C *arg3, struct DodrioSubstruct_31A0_2C *arg4, struct DodrioSubstruct_31A0_2C *arg5, u8 arg6, u32 arg7, u32 arg8) +{ + asm_unified(" push {r4-r7,lr}\n\ + mov r7, r10\n\ + mov r6, r9\n\ + mov r5, r8\n\ + push {r5-r7}\n\ + sub sp, 0x20\n\ + ldr r4, [sp, 0x48]\n\ + lsls r4, 24\n\ + str r4, [sp, 0x1C]\n\ + movs r4, 0x14\n\ + adds r4, r0\n\ + mov r9, r4\n\ + mov r5, sp\n\ + movs r4, 0x2\n\ + strb r4, [r5]\n\ + mov r10, sp\n\ + mov r5, r9\n\ + ldrb r4, [r5, 0xB]\n\ + movs r7, 0xF\n\ + adds r5, r7, 0\n\ + ands r5, r4\n\ + mov r6, r10\n\ + ldrb r6, [r6, 0x1]\n\ + mov r8, r6\n\ + movs r4, 0x10\n\ + negs r4, r4\n\ + mov r6, r8\n\ + ands r4, r6\n\ + orrs r4, r5\n\ + mov r5, r10\n\ + strb r4, [r5, 0x1]\n\ + mov r8, sp\n\ + mov r6, r9\n\ + ldrb r5, [r6, 0xC]\n\ + lsls r5, 4\n\ + ands r4, r7\n\ + orrs r4, r5\n\ + mov r5, r8\n\ + strb r4, [r5, 0x1]\n\ + ldrb r5, [r6, 0xD]\n\ + movs r6, 0xF\n\ + ands r5, r6\n\ + mov r4, r10\n\ + ldrb r4, [r4, 0x2]\n\ + mov r8, r4\n\ + movs r4, 0x10\n\ + negs r4, r4\n\ + mov r6, r8\n\ + ands r4, r6\n\ + orrs r4, r5\n\ + mov r5, r10\n\ + strb r4, [r5, 0x2]\n\ + mov r8, sp\n\ + mov r6, r9\n\ + ldrb r5, [r6, 0xE]\n\ + lsls r5, 4\n\ + ands r4, r7\n\ + orrs r4, r5\n\ + mov r5, r8\n\ + strb r4, [r5, 0x2]\n\ + ldrb r5, [r6, 0xF]\n\ + movs r6, 0xF\n\ + ands r5, r6\n\ + mov r4, r10\n\ + ldrb r4, [r4, 0x3]\n\ + mov r8, r4\n\ + movs r4, 0x10\n\ + negs r4, r4\n\ + mov r6, r8\n\ + ands r4, r6\n\ + orrs r4, r5\n\ + mov r5, r10\n\ + strb r4, [r5, 0x3]\n\ + mov r8, sp\n\ + mov r6, r9\n\ + ldrb r5, [r6, 0x10]\n\ + lsls r5, 4\n\ + ands r4, r7\n\ + orrs r4, r5\n\ + mov r5, r8\n\ + strb r4, [r5, 0x3]\n\ + ldrb r5, [r6, 0x11]\n\ + movs r6, 0xF\n\ + ands r5, r6\n\ + mov r4, r10\n\ + ldrb r4, [r4, 0x4]\n\ + mov r8, r4\n\ + movs r4, 0x10\n\ + negs r4, r4\n\ + mov r6, r8\n\ + ands r4, r6\n\ + orrs r4, r5\n\ + mov r5, r10\n\ + strb r4, [r5, 0x4]\n\ + mov r8, sp\n\ + mov r6, r9\n\ + ldrb r5, [r6, 0x12]\n\ + lsls r5, 4\n\ + ands r4, r7\n\ + orrs r4, r5\n\ + mov r5, r8\n\ + strb r4, [r5, 0x4]\n\ + ldrb r4, [r6, 0x13]\n\ + movs r6, 0xF\n\ + ands r4, r6\n\ + mov r6, r8\n\ + ldrb r5, [r6, 0x5]\n\ + movs r6, 0x10\n\ + negs r6, r6\n\ + ands r6, r5\n\ + orrs r6, r4\n\ + str r6, [sp, 0xC]\n\ + mov r4, r8\n\ + strb r6, [r4, 0x5]\n\ + mov r5, sp\n\ + mov r6, r9\n\ + ldrb r4, [r6, 0x14]\n\ + lsls r4, 4\n\ + ldr r6, [sp, 0xC]\n\ + ands r6, r7\n\ + orrs r6, r4\n\ + strb r6, [r5, 0x5]\n\ + mov r7, sp\n\ + movs r4, 0x3\n\ + mov r8, r4\n\ + ldrb r0, [r0, 0x14]\n\ + mov r5, r8\n\ + ands r0, r5\n\ + ldrb r5, [r7, 0x6]\n\ + movs r6, 0x4\n\ + negs r6, r6\n\ + mov r10, r6\n\ + mov r4, r10\n\ + ands r4, r5\n\ + orrs r4, r0\n\ + strb r4, [r7, 0x6]\n\ + mov r5, r9\n\ + ldrb r0, [r5, 0x1]\n\ + mov r6, r8\n\ + ands r0, r6\n\ + lsls r0, 2\n\ + movs r5, 0xD\n\ + negs r5, r5\n\ + ands r5, r4\n\ + orrs r5, r0\n\ + strb r5, [r7, 0x6]\n\ + mov r0, r9\n\ + ldrb r4, [r0, 0x2]\n\ + ands r4, r6\n\ + lsls r4, 4\n\ + movs r0, 0x31\n\ + negs r0, r0\n\ + ands r0, r5\n\ + orrs r0, r4\n\ + strb r0, [r7, 0x6]\n\ + mov r5, sp\n\ + mov r6, r9\n\ + ldrb r4, [r6, 0x3]\n\ + lsls r4, 6\n\ + movs r6, 0x3F\n\ + ands r0, r6\n\ + orrs r0, r4\n\ + strb r0, [r5, 0x6]\n\ + mov r4, r9\n\ + ldrb r0, [r4, 0x4]\n\ + mov r5, r8\n\ + ands r0, r5\n\ + ldrb r5, [r7, 0x7]\n\ + mov r4, r10\n\ + ands r4, r5\n\ + orrs r4, r0\n\ + strb r4, [r7, 0x7]\n\ + mov r6, r9\n\ + ldrb r0, [r6, 0x5]\n\ + mov r5, r8\n\ + ands r0, r5\n\ + lsls r0, 2\n\ + movs r5, 0xD\n\ + negs r5, r5\n\ + ands r5, r4\n\ + orrs r5, r0\n\ + strb r5, [r7, 0x7]\n\ + ldrb r4, [r6, 0x6]\n\ + mov r6, r8\n\ + ands r4, r6\n\ + lsls r4, 4\n\ + movs r0, 0x31\n\ + negs r0, r0\n\ + ands r0, r5\n\ + orrs r0, r4\n\ + strb r0, [r7, 0x7]\n\ + mov r5, sp\n\ + mov r6, r9\n\ + ldrb r4, [r6, 0x7]\n\ + lsls r4, 6\n\ + movs r6, 0x3F\n\ + ands r0, r6\n\ + orrs r0, r4\n\ + strb r0, [r5, 0x7]\n\ + mov r8, sp\n\ + mov r0, r9\n\ + ldrb r4, [r0, 0x8]\n\ + movs r7, 0x3\n\ + adds r0, r7, 0\n\ + ands r0, r4\n\ + mov r4, r8\n\ + ldrb r5, [r4, 0x8]\n\ + mov r4, r10\n\ + ands r4, r5\n\ + orrs r4, r0\n\ + mov r5, r8\n\ + strb r4, [r5, 0x8]\n\ + mov r6, r9\n\ + ldrb r5, [r6, 0x9]\n\ + adds r0, r7, 0\n\ + ands r0, r5\n\ + lsls r0, 2\n\ + movs r5, 0xD\n\ + negs r5, r5\n\ + ands r5, r4\n\ + orrs r5, r0\n\ + mov r0, r8\n\ + strb r5, [r0, 0x8]\n\ + ldrb r0, [r1]\n\ + adds r4, r7, 0\n\ + ands r4, r0\n\ + lsls r4, 4\n\ + movs r0, 0x31\n\ + negs r0, r0\n\ + ands r0, r5\n\ + orrs r0, r4\n\ + mov r4, r8\n\ + strb r0, [r4, 0x8]\n\ + mov r5, sp\n\ + ldrb r4, [r2]\n\ + lsls r4, 6\n\ + movs r6, 0x3F\n\ + ands r0, r6\n\ + orrs r0, r4\n\ + strb r0, [r5, 0x8]\n\ + ldrb r4, [r3]\n\ + adds r0, r7, 0\n\ + ands r0, r4\n\ + ldrb r4, [r5, 0x9]\n\ + mov r6, r10\n\ + ands r6, r4\n\ + orrs r6, r0\n\ + mov r10, r6\n\ + strb r6, [r5, 0x9]\n\ + ldr r0, [sp, 0x40]\n\ + ldrb r4, [r0]\n\ + adds r0, r7, 0\n\ + ands r0, r4\n\ + lsls r0, 2\n\ + movs r4, 0xD\n\ + negs r4, r4\n\ + ands r6, r4\n\ + orrs r6, r0\n\ + str r6, [sp, 0x10]\n\ + strb r6, [r5, 0x9]\n\ + mov r4, sp\n\ + ldr r5, [sp, 0x44]\n\ + ldrb r0, [r5]\n\ + adds r6, r7, 0\n\ + ands r6, r0\n\ + lsls r0, r6, 4\n\ + subs r7, 0x34\n\ + ldr r5, [sp, 0x10]\n\ + ands r7, r5\n\ + orrs r7, r0\n\ + strb r7, [r4, 0x9]\n\ + mov r5, sp\n\ + ldrb r0, [r1, 0x4]\n\ + movs r6, 0x1\n\ + mov r12, r6\n\ + mov r4, r12\n\ + ands r4, r0\n\ + lsls r4, 6\n\ + movs r0, 0x41\n\ + negs r0, r0\n\ + mov r10, r0\n\ + ands r0, r7\n\ + orrs r0, r4\n\ + strb r0, [r5, 0x9]\n\ + ldrb r4, [r2, 0x4]\n\ + lsls r4, 7\n\ + movs r5, 0x7F\n\ + ands r0, r5\n\ + orrs r0, r4\n\ + mov r4, r8\n\ + strb r0, [r4, 0x9]\n\ + ldrb r4, [r3, 0x4]\n\ + mov r0, r12\n\ + ands r0, r4\n\ + mov r5, r8\n\ + ldrb r4, [r5, 0xA]\n\ + movs r7, 0x2\n\ + negs r7, r7\n\ + adds r5, r7, 0\n\ + ands r5, r4\n\ + orrs r5, r0\n\ + mov r6, r8\n\ + strb r5, [r6, 0xA]\n\ + mov r9, sp\n\ + ldr r4, [sp, 0x40]\n\ + ldrb r0, [r4, 0x4]\n\ + mov r4, r12\n\ + ands r4, r0\n\ + lsls r4, 1\n\ + movs r6, 0x3\n\ + negs r6, r6\n\ + mov r8, r6\n\ + mov r0, r8\n\ + ands r0, r5\n\ + orrs r0, r4\n\ + mov r4, r9\n\ + strb r0, [r4, 0xA]\n\ + ldr r6, [sp, 0x44]\n\ + ldrb r5, [r6, 0x4]\n\ + mov r4, r12\n\ + ands r4, r5\n\ + lsls r4, 2\n\ + movs r5, 0x5\n\ + negs r5, r5\n\ + ands r0, r5\n\ + orrs r0, r4\n\ + mov r4, r9\n\ + strb r0, [r4, 0xA]\n\ + mov r4, sp\n\ + ldrb r1, [r1, 0x8]\n\ + mov r0, r12\n\ + ands r0, r1\n\ + lsls r0, 2\n\ + ldrb r1, [r4, 0xB]\n\ + ands r5, r1\n\ + orrs r5, r0\n\ + strb r5, [r4, 0xB]\n\ + ldrb r1, [r2, 0x8]\n\ + mov r0, r12\n\ + ands r0, r1\n\ + lsls r0, 3\n\ + movs r1, 0x9\n\ + negs r1, r1\n\ + ands r1, r5\n\ + orrs r1, r0\n\ + strb r1, [r4, 0xB]\n\ + ldrb r2, [r3, 0x8]\n\ + mov r0, r12\n\ + ands r0, r2\n\ + lsls r0, 4\n\ + movs r2, 0x11\n\ + negs r2, r2\n\ + ands r2, r1\n\ + orrs r2, r0\n\ + strb r2, [r4, 0xB]\n\ + mov r3, sp\n\ + ldr r5, [sp, 0x40]\n\ + ldrb r0, [r5, 0x8]\n\ + mov r1, r12\n\ + ands r1, r0\n\ + lsls r1, 5\n\ + movs r0, 0x21\n\ + negs r0, r0\n\ + ands r0, r2\n\ + orrs r0, r1\n\ + strb r0, [r3, 0xB]\n\ + mov r2, sp\n\ + ldrb r1, [r6, 0x8]\n\ + mov r6, r12\n\ + ands r6, r1\n\ + lsls r1, r6, 6\n\ + mov r3, r10\n\ + ands r0, r3\n\ + orrs r0, r1\n\ + strb r0, [r2, 0xB]\n\ + ldr r4, [sp, 0x1C]\n\ + lsrs r3, r4, 21\n\ + ldrb r1, [r2, 0xA]\n\ + movs r0, 0x7\n\ + ands r0, r1\n\ + orrs r0, r3\n\ + strb r0, [r2, 0xA]\n\ + mov r1, sp\n\ + ldr r5, [sp, 0x4C]\n\ + movs r6, 0x1\n\ + ands r5, r6\n\ + lsls r2, r5, 1\n\ + ldrb r0, [r1, 0xB]\n\ + mov r3, r8\n\ + ands r3, r0\n\ + orrs r3, r2\n\ + mov r8, r3\n\ + strb r3, [r1, 0xB]\n\ + mov r0, sp\n\ + ldr r4, [sp, 0x50]\n\ + ands r4, r6\n\ + mov r5, r8\n\ + ands r5, r7\n\ + orrs r5, r4\n\ + strb r5, [r0, 0xB]\n\ + bl sub_800FE50\n\ + add sp, 0x20\n\ + pop {r3-r5}\n\ + mov r8, r3\n\ + mov r9, r4\n\ + mov r10, r5\n\ + pop {r4-r7}\n\ + pop {r0}\n\ + bx r0\n\ +"); +} +#endif + +static u32 sub_8028164(u32 unused, struct DodrioSubstruct_31A0 *arg0, struct DodrioSubstruct_31A0_2C *arg1, struct DodrioSubstruct_31A0_2C *arg2, struct DodrioSubstruct_31A0_2C *arg3, struct DodrioSubstruct_31A0_2C *arg4, struct DodrioSubstruct_31A0_2C *arg5, u8 *arg6, u32 *arg7, u32 *arg8) +{ + struct UnkPacket2 *packet; + struct DodrioSubstruct_31A0_14 *ptr = &arg0->unk14; + + if ((gRecvCmds[0][0] & 0xFF00) != 0x2F00) + return 0; + + packet = (void *)&gRecvCmds[0][1]; + if (packet->id == 2) + { + ptr->unkB[0] = packet->unk1_0; + ptr->unkB[1] = packet->unk1_1; + ptr->unkB[2] = packet->unk2_0; + ptr->unkB[3] = packet->unk2_1; + ptr->unkB[4] = packet->unk3_0; + ptr->unkB[5] = packet->unk3_1; + ptr->unkB[6] = packet->unk4_0; + ptr->unkB[7] = packet->unk4_1; + ptr->unkB[8] = packet->unk5_0; + ptr->unkB[9] = packet->unk5_1; + ptr->unkB[10] = packet->unk1_0; + + ptr->unk0[0] = packet->unk6_0; + ptr->unk0[1] = packet->unk6_1; + ptr->unk0[2] = packet->unk6_2; + ptr->unk0[3] = packet->unk6_3; + ptr->unk0[4] = packet->unk7_0; + ptr->unk0[5] = packet->unk7_1; + ptr->unk0[6] = packet->unk7_2; + ptr->unk0[7] = packet->unk7_3; + ptr->unk0[8] = packet->unk8_0; + ptr->unk0[9] = packet->unk8_1; + ptr->unk0[10] = packet->unk6_0; + + arg1->unk0 = packet->unk8_2; + arg1->unk4 = packet->unk9_3; + arg1->unk8 = packet->unkB_2; + + arg2->unk0 = packet->unk8_3; + arg2->unk4 = packet->unk9_4; + arg2->unk8 = packet->unkB_3; + + arg3->unk0 = packet->unk9_0; + arg3->unk4 = packet->unkA_0; + arg3->unk8 = packet->unkB_4; + + arg4->unk0 = packet->unk9_1; + arg4->unk4 = packet->unkA_1; + arg4->unk8 = packet->unkB_5; + + arg5->unk0 = packet->unk9_2; + arg5->unk4 = packet->unkA_2; + arg5->unk8 = packet->unkB_6; + + *arg6 = packet->unkA_3; + *arg7 = packet->unkB_1; + *arg8 = packet->unkB_0; + return 1; + } + + return 0; +} + +struct UnkPacket3 +{ + u8 id; + u8 ALIGNED(4) unk4; +}; + +static void sub_80282EC(u8 arg0) +{ + struct UnkPacket3 packet; + packet.id = 3; + packet.unk4 = arg0; + sub_800FE50(&packet); +} + +static u32 sub_8028318(u32 arg0, u8 *arg1) +{ + struct UnkPacket3 *packet; + + if ((gRecvCmds[0][0] & 0xFF00) != 0x2F00) + return 0; + + packet = (void *)&gRecvCmds[arg0][1]; + if (packet->id == 3) + { + *arg1 = packet->unk4; + return 1; + } + + return 0; +} + +struct UnkPacket4 +{ + u8 id; + u32 unk4; +}; + +static void sub_8028350(u32 arg0) +{ + struct UnkPacket4 packet; + packet.id = 4; + packet.unk4 = arg0; + sub_800FE50(&packet); +} + +static u32 sub_8028374(u32 arg0) +{ + struct UnkPacket4 *packet; + + if ((gRecvCmds[0][0] & 0xFF00) != 0x2F00) + return 0; + + packet = (void *)&gRecvCmds[arg0][1]; + if (packet->id == 4) + return packet->unk4; + + return 0; +} + +// Large chunk of data +static const struct BgTemplate gUnknown_082F7BA4[] = +{ + { + .bg = 0, + .charBaseIndex = 0, + .mapBaseIndex = 30, + .screenSize = 0, + .paletteMode = 0, + .priority = 0, + .baseTile = 0 + }, + { + .bg = 1, + .charBaseIndex = 2, + .mapBaseIndex = 12, + .screenSize = 1, + .paletteMode = 0, + .priority = 1, + .baseTile = 0 + }, + { + .bg = 2, + .charBaseIndex = 2, + .mapBaseIndex = 14, + .screenSize = 1, + .paletteMode = 0, + .priority = 1, + .baseTile = 0 + }, + { + .bg = 3, + .charBaseIndex = 3, + .mapBaseIndex = 31, + .screenSize = 0, + .paletteMode = 0, + .priority = 2, + .baseTile = 0 + }, +}; + +// Unknown unreferenced data, feel free to remove. +static const u32 sUnused[] = {255, 0}; + +static const struct WindowTemplate gUnknown_082F7BBC[] = +{ + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 1, + .width = 28, + .height = 2, + .paletteNum = 13, + .baseBlock = 0x13, + }, + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 5, + .width = 28, + .height = 14, + .paletteNum = 13, + .baseBlock = 0x4B, + } +}; +static const struct WindowTemplate gUnknown_082F7BCC = +{ + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 5, + .width = 28, + .height = 7, + .paletteNum = 13, + .baseBlock = 0x4B, +}; +static const struct WindowTemplate gUnknown_082F7BD4[] = +{ + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 8, + .width = 19, + .height = 3, + .paletteNum = 13, + .baseBlock = 0x13, + }, + { + .bg = 0, + .tilemapLeft = 22, + .tilemapTop = 7, + .width = 6, + .height = 4, + .paletteNum = 13, + .baseBlock = 0x4C, + } +}; +static const struct WindowTemplate gUnknown_082F7BE4 = +{ + .bg = 0, + .tilemapLeft = 4, + .tilemapTop = 6, + .width = 22, + .height = 5, + .paletteNum = 13, + .baseBlock = 0x13, +}; +static const struct WindowTemplate gUnknown_082F7BEC = +{ + .bg = 0, + .tilemapLeft = 5, + .tilemapTop = 8, + .width = 19, + .height = 3, + .paletteNum = 13, + .baseBlock = 0x13, +}; + +// This is an unused copy of the tables from the top of the file. Feel free to remove. +static const u8 sDuplicateArray[] = +{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 3, 8, 9, 0, 0, 1, 2, 5, 6, 3, 4, 5, 8, 9, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 2, 9, + 0, 0, 1, 4, 5, 6, 7, 2, 3, 4, 9, 0, 0, 1, 6, 7, 2, 3, 4, 5, 6, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 1, 0, 0, 3, 4, 5, 6, 7, 8, 1, 2, 3, 0, 0, 5, 6, 7, 8, 1, 2, 3, 4, 5, 0, 0, 7, + 8, 1, 2, 3, 4, 5, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 2, 3, 4, 5, 6, 7, 8, 9, 0, + 1, 2, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 4, 5, 6, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 5, 5, 6, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 6, 6, 7, 2, 2, 3, 4, 0, 0, 0, 0, 0, 0, + 3, 4, 5, 5, 6, 7, 7, 8, 1, 1, 2, 3, 0, 0, 0, 4, 5, 6, 6, 7, 8, 8, 9, 0, 0, 1, 2, 2, 3, 4, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 1, 2, 1, 2, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 0, 1, + 2, 1, 2, 3, 2, 3, 0, 0, 0, 0, 4, 0, 1, 0, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4, 0, 0, 0, 0, 9, 9, 9, 9, 1, 1, 1, 9, 9, 9, 9, 9, + 9, 9, 0, 0, 1, 1, 0, 9, 9, 9, 9, 9, 2, 2, 0, 0, 1, 1, 1, 9, 9, 9, 3, 3, 0, 0, 1, 1, 2, 2, 3, 9, 3, 3, 4, 4, 0, 0, 1, 1, + 2, 2, 3, 5, 0, 0, 0, 0, 4, 6, 0, 0, 0, 3, 5, 7, 0, 0, 2, 4, 6, 8, 0, 1, 3, 5, 6, 9 +}; + +static const u16 gDodrioBerryBgPal1[] = INCBIN_U16("graphics/link_games/dodrioberry_bg1.gbapal", + "graphics/link_games/dodrioberry_bg2.gbapal"); +static const u16 gDodrioBerryPkmnPal[] = INCBIN_U16("graphics/link_games/dodrioberry_pkmn.gbapal"); +static const u16 gDodrioBerryShinyPal[] = INCBIN_U16("graphics/link_games/dodrioberry_shiny.gbapal"); +static const u16 gDodrioBerryStatusPal[] = INCBIN_U16("graphics/link_games/dodrioberry_status.gbapal"); +static const u16 gDodrioBerrySpritesPal[] = INCBIN_U16("graphics/link_games/dodrioberry_berrysprites.gbapal"); +static const u32 gDodrioBerrySpritesGfx[] = INCBIN_U32("graphics/link_games/dodrioberry_berrysprites.4bpp.lz"); +static const u16 gDodrioBerryPlatformPal[] = INCBIN_U16("graphics/link_games/dodrioberry_platform.gbapal"); +static const u32 gDodrioBerryBgGfx1[] = INCBIN_U32("graphics/link_games/dodrioberry_bg1.4bpp.lz"); +static const u32 gDodrioBerryBgGfx2[] = INCBIN_U32("graphics/link_games/dodrioberry_bg2.4bpp.lz"); +static const u32 gDodrioBerryStatusGfx[] = INCBIN_U32("graphics/link_games/dodrioberry_status.4bpp.lz"); +static const u32 gDodrioBerryPlatformGfx[] = INCBIN_U32("graphics/link_games/dodrioberry_platform.4bpp.lz"); +static const u32 gDodrioBerryPkmnGfx[] = INCBIN_U32("graphics/link_games/dodrioberry_pkmn.4bpp.lz"); +static const u32 gDodrioBerryBgTilemap1[] = INCBIN_U32("graphics/link_games/dodrioberry_bg1.bin.lz"); +static const u32 gDodrioBerryBgTilemap2Right[] = INCBIN_U32("graphics/link_games/dodrioberry_bg2right.bin.lz"); +static const u32 gDodrioBerryBgTilemap2Left[] = INCBIN_U32("graphics/link_games/dodrioberry_bg2left.bin.lz"); + +static const struct OamData sOamData_82FB1E0 = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 0, + .x = 0, + .matrixNum = 0, + .size = 3, + .tileNum = 0, + .priority = 2, + .paletteNum = 0, + .affineParam = 0 +}; + +static const struct OamData sOamData_82FB1E8 = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 0, + .x = 0, + .matrixNum = 0, + .size = 1, + .tileNum = 0, + .priority = 0, + .paletteNum = 0, + .affineParam = 0 +}; + +static const struct OamData sOamData_82FB1F0 = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 0, + .x = 0, + .matrixNum = 0, + .size = 1, + .tileNum = 0, + .priority = 2, + .paletteNum = 0, + .affineParam = 0 +}; + +static const struct OamData sOamData_82FB1F8 = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 1, + .x = 0, + .matrixNum = 0, + .size = 3, + .tileNum = 0, + .priority = 3, + .paletteNum = 0, + .affineParam = 0 +}; + +static const union AnimCmd sSpriteAnim_82FB200[] = +{ + ANIMCMD_FRAME(0, 20), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd sSpriteAnim_82FB208[] = +{ + ANIMCMD_FRAME(64, 20), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd sSpriteAnim_82FB210[] = +{ + ANIMCMD_FRAME(128, 20), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd sSpriteAnim_82FB218[] = +{ + ANIMCMD_FRAME(192, 20), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd sSpriteAnim_82FB220[] = +{ + ANIMCMD_FRAME(256, 20), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd *const sSpriteAnimTable_82FB228[] = +{ + sSpriteAnim_82FB200, + sSpriteAnim_82FB208, + sSpriteAnim_82FB210, + sSpriteAnim_82FB218, + sSpriteAnim_82FB220 +}; + +static const union AnimCmd sSpriteAnim_82FB23C[] = +{ + ANIMCMD_FRAME(0, 20), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd sSpriteAnim_82FB244[] = +{ + ANIMCMD_FRAME(4, 20), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd sSpriteAnim_82FB24C[] = +{ + ANIMCMD_FRAME(8, 20), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd *const sSpriteAnimTable_82FB254[] = +{ + sSpriteAnim_82FB23C, + sSpriteAnim_82FB244, + sSpriteAnim_82FB24C +}; + +static const union AnimCmd sSpriteAnim_82FB260[] = +{ + ANIMCMD_FRAME(0, 20), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd sSpriteAnim_82FB268[] = +{ + ANIMCMD_FRAME(4, 20), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd sSpriteAnim_82FB270[] = +{ + ANIMCMD_FRAME(8, 20), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd sSpriteAnim_82FB278[] = +{ + ANIMCMD_FRAME(12, 20), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd sSpriteAnim_82FB280[] = +{ + ANIMCMD_FRAME(16, 20), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd sSpriteAnim_82FB288[] = +{ + ANIMCMD_FRAME(20, 20), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd sSpriteAnim_82FB290[] = +{ + ANIMCMD_FRAME(24, 20), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd sSpriteAnim_82FB298[] = +{ + ANIMCMD_FRAME(28, 20), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd sSpriteAnim_82FB2A0[] = +{ + ANIMCMD_FRAME(32, 20), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd *const sSpriteAnimTable_82FB2A8[] = +{ + sSpriteAnim_82FB260, + sSpriteAnim_82FB268, + sSpriteAnim_82FB270, + sSpriteAnim_82FB278, + sSpriteAnim_82FB280, + sSpriteAnim_82FB288, + sSpriteAnim_82FB290, + sSpriteAnim_82FB298, + sSpriteAnim_82FB2A0 +}; + +static const union AnimCmd sSpriteAnim_82FB2CC[] = +{ + ANIMCMD_FRAME(0, 20), + ANIMCMD_JUMP(0) +}; + +static const union AnimCmd *const sSpriteAnimTable_82FB2D4[] = +{ + sSpriteAnim_82FB2CC +}; + +static void sub_80283A8(void) +{ + void *ptr = AllocZeroed(0x3000); + struct SpritePalette pal1 = {gDodrioBerryPkmnPal, 0}; + struct SpritePalette pal2 = {gDodrioBerryShinyPal, 1}; + + LZ77UnCompWram(gDodrioBerryPkmnGfx, ptr); + // This check should be one line up. + if (ptr != NULL) + { + struct SpriteSheet sheet = {ptr, 0x3000, 0}; + LoadSpriteSheet(&sheet); + Free(ptr); + } + LoadSpritePalette(&pal1); + LoadSpritePalette(&pal2); +} + +static void sub_8028408(struct DodrioSubstruct_318C *arg0, u8 arg1, u8 id, u8 arg3) +{ + struct SpriteTemplate sprTemplate = + { + .tileTag = 0, + .paletteTag = arg0->isShiny, + .oam = &sOamData_82FB1E0, + .anims = sSpriteAnimTable_82FB228, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_80284A8, + }; + + gUnknown_02022C9C[id] = AllocZeroed(4); + *gUnknown_02022C9C[id] = CreateSprite(&sprTemplate, sub_8028F14(arg1, arg3), 136, 3); + sub_8028654(TRUE, id); +} + +static void sub_80284A8(struct Sprite *sprite) +{ + switch (sprite->data[0]) + { + case 0: + break; + case 1: + sub_802853C(sprite); + break; + case 2: + sub_80285AC(sprite); + break; + } +} + +static void sub_80284CC(u8 unused) +{ + struct Sprite *sprite = &gSprites[*gUnknown_02022C9C[GetMultiplayerId()]]; + sprite->data[0] = 1; + sprite->data[1] = 0; + sprite->data[2] = 0; + sprite->data[3] = 0; + sprite->data[4] = 0; +} + +static void sub_8028504(u8 unused) +{ + struct Sprite *sprite = &gSprites[*gUnknown_02022C9C[GetMultiplayerId()]]; + sprite->data[0] = 2; + sprite->data[1] = 0; + sprite->data[2] = 0; + sprite->data[3] = 0; + sprite->data[4] = 0; +} + +static u32 sub_802853C(struct Sprite *sprite) +{ + s8 var; + u8 mod = (++sprite->data[1] / 2) % 4; + + if (sprite->data[1] >= 3) + { + switch (mod) + { + default: + var = 1; + break; + case 1: + case 2: + var = -1; + break; + } + + sprite->pos1.x += var; + if (++sprite->data[1] >= 40) + { + sprite->data[0] = 0; + sprite->pos1.x = sub_8028F14(0, sub_8027650()); + } + } + + return 0; +} + +static u32 sub_80285AC(struct Sprite *sprite) +{ + u8 mod = (++sprite->data[1] / 13) % 4; + + if (sprite->data[1] % 13 == 0 && mod != 0) + PlaySE(SE_W204); + if (sprite->data[1] >= 104) + { + sprite->data[0] = 0; + mod = 0; + } + sub_80286B4(GetMultiplayerId(), mod); + return 0; +} + +static void sub_8028614(u8 count) +{ + u8 i; + for (i = 0; i < count; i++) + { + struct Sprite *sprite = &gSprites[*gUnknown_02022C9C[i]]; + if (sprite != NULL) + DestroySpriteAndFreeResources(sprite); + // Memory should be freed here but is not. + } +} + +static void sub_8028654(bool8 invisible, u8 id) +{ + gSprites[*gUnknown_02022C9C[id]].invisible = invisible; +} + +static void sub_802868C(bool8 invisible, u8 count) +{ + u8 i; + for (i = 0; i < count; i++) + sub_8028654(invisible, i); +} + +static void sub_80286B4(u8 id, u8 frameNum) +{ + StartSpriteAnim(&gSprites[*gUnknown_02022C9C[id]], frameNum); +} + +static void nullsub_15(struct Sprite *sprite) +{ + +} + +static void sub_80286E4(void) +{ + u8 i; + for (i = 0; i < 10; i++) + { + struct Sprite *sprite = &gSprites[gUnknown_02022CF4->unk2A[i]]; + sprite->pos1.x = (i * 16) + 48; + sprite->pos1.y = -8 - (i * 8); + gUnknown_02022CF4->unkC[i] = 0; + } +} + +static void sub_8028734(void) +{ + u8 i; + void *ptr = AllocZeroed(0x180); + struct SpritePalette spPal = {gDodrioBerryStatusPal, 2}; + + LZ77UnCompWram(gDodrioBerryStatusGfx, ptr); + // This check should be one line up. + if (ptr != NULL) + { + struct SpriteSheet spSheet = {ptr, 0x180, 1}; + struct SpriteTemplate spTemplate = + { + .tileTag = 1, + .paletteTag = 2, + .oam = &sOamData_82FB1E8, + .anims = sSpriteAnimTable_82FB254, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = nullsub_15, + }; + + gUnknown_02022CF4 = AllocZeroed(sizeof(*gUnknown_02022CF4)); + LoadSpriteSheet(&spSheet); + LoadSpritePalette(&spPal); + for (i = 0; i < 10; i++) + gUnknown_02022CF4->unk2A[i] = CreateSprite(&spTemplate, (i * 16) + 48, -8 - (i * 8), 0); + } + + Free(ptr); +} + +static void sub_80287E4(void) +{ + u8 i; + for (i = 0; i < 10; i++) + { + struct Sprite *sprite = &gSprites[gUnknown_02022CF4->unk2A[i]]; + if (sprite != NULL) + DestroySpriteAndFreeResources(sprite); + } + FREE_AND_SET_NULL(gUnknown_02022CF4); +} + +static bool32 sub_8028828(void) +{ + u8 i; + bool32 r3 = FALSE; + for (i = 0; i < 10; i++) + { + struct Sprite *sprite = &gSprites[gUnknown_02022CF4->unk2A[i]]; + gUnknown_02022CF4->unk16[i] = 2; + if (gUnknown_02022CF4->unkC[i] != 0 && sprite->pos1.y == 8) + continue; + r3 = TRUE; + if (sprite->pos1.y == 8) + { + if (gUnknown_02022CF4->unkC[i] != 0) + continue; + gUnknown_02022CF4->unkC[i] = 1; + gUnknown_02022CF4->unk16[i] = -16; + PlaySE(SE_TK_KASYA); + } + sprite->pos1.y += gUnknown_02022CF4->unk16[i]; + } + + if (r3) + return FALSE; + else + return TRUE; +} + +static void sub_80288D4(u8 arg0) +{ + u8 i; + + if (arg0 > 10) + { + for (i = 0; i < 10; i++) + StartSpriteAnim(&gSprites[gUnknown_02022CF4->unk2A[i]], 1); + } + else + { + for (i = 0; i < 10 - arg0; i++) + { + if (arg0 > 6) + { + gUnknown_02022CF4->unk3E += arg0 - 6; + if (gUnknown_02022CF4->unk3E > 30) + gUnknown_02022CF4->unk3E = 0; + else if (gUnknown_02022CF4->unk3E > 10) + StartSpriteAnim(&gSprites[gUnknown_02022CF4->unk2A[i]], 2); + else + StartSpriteAnim(&gSprites[gUnknown_02022CF4->unk2A[i]], 0); + } + else + { + StartSpriteAnim(&gSprites[gUnknown_02022CF4->unk2A[i]], 0); + } + } + for (; i < 10; i++) + StartSpriteAnim(&gSprites[gUnknown_02022CF4->unk2A[i]], 1); + } +} + +static void sub_80289E8(bool8 invisible) +{ + u8 i; + for (i = 0; i < 10; i++) + gSprites[gUnknown_02022CF4->unk2A[i]].invisible = invisible; +} + +// Unknown unused data, feel free to remove. +static const u8 sUnused2[] = {0xD4, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0xFB, 0x0, 0x0}; + +static void sub_8028A34(void) +{ + void *ptr = AllocZeroed(0x480); + struct SpritePalette sprPal = {gDodrioBerrySpritesPal, 3}; + + LZ77UnCompWram(gDodrioBerrySpritesGfx, ptr); + if (ptr != NULL) + { + struct SpriteSheet sprSheet = {ptr, 0x480, 2}; + LoadSpriteSheet(&sprSheet); + } + + LoadSpritePalette(&sprPal); + Free(ptr); +} + +static const s16 gUnknown_082FB31C[] = {88, 128, 168, 208}; + +static void sub_8028A88(void) +{ + u8 i; + s16 x; + + struct SpriteTemplate sprTemplate1 = + { + .tileTag = 2, + .paletteTag = 3, + .oam = &sOamData_82FB1F0, + .anims = sSpriteAnimTable_82FB2A8, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy, + }; + struct SpriteTemplate sprTemplate2 = + { + .tileTag = 2, + .paletteTag = 3, + .oam = &sOamData_82FB1E8, + .anims = sSpriteAnimTable_82FB2A8, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy, + }; + + for (i = 0; i < 11; i++) + { + gUnknown_02022CB8[i] = AllocZeroed(4); + x = i * 16; + *gUnknown_02022CB8[i] = CreateSprite(&sprTemplate1, x + (i * 8), 8, 1); + sub_8028BF8(i, TRUE); + } + for (i = 0; i < 4; i++) + { + gUnknown_02022CE4[i] = AllocZeroed(4); + if (i == 3) + *gUnknown_02022CE4[i] = CreateSprite(&sprTemplate2, gUnknown_082FB31C[i], 49, 0); + else + *gUnknown_02022CE4[i] = CreateSprite(&sprTemplate2, gUnknown_082FB31C[i], 52, 0); + StartSpriteAnim(&gSprites[*gUnknown_02022CE4[i]], i); + } + + sub_8028C30(TRUE); +} + +static void sub_8028B80(void) +{ + struct Sprite *sprite; + u8 i; + + for (i = 0; i < 11; i++) + { + sprite = &gSprites[*gUnknown_02022CB8[i]]; + if (sprite != NULL) + DestroySprite(sprite); + FREE_AND_SET_NULL(gUnknown_02022CB8[i]); + } + for (i = 0; i < 4; i++) + { + sprite = &gSprites[*gUnknown_02022CE4[i]]; + if (sprite != NULL) + DestroySprite(sprite); + FREE_AND_SET_NULL(gUnknown_02022CE4[i]); + } +} + +static void sub_8028BF8(u8 id, bool8 invisible) +{ + gSprites[*gUnknown_02022CB8[id]].invisible = invisible; +} + +static void sub_8028C30(bool8 invisible) +{ + u8 i; + for (i = 0; i < 4; i++) + gSprites[*gUnknown_02022CE4[i]].invisible = invisible; +} + +static void sub_8028C7C(u8 id, u8 y) +{ + gSprites[*gUnknown_02022CB8[id]].pos1.y = y * 8; +} + +static void sub_8028CA4(u16 id, u8 frameNum) +{ + StartSpriteAnim(&gSprites[*gUnknown_02022CB8[id]], frameNum); +} + +// Unused +static void sub_8028CD0(u8 spriteId) +{ + gSprites[spriteId].pos1.x = 20 * spriteId + 50; + gSprites[spriteId].pos1.y = 50; +} + +// Gamefreak made a mistake there and goes out of bounds for the data array as it holds 8 elements +// in turn overwriting sprite's subpriority and subsprites fields. +#if defined(NONMATCHING) || MODERN + #define sKeepPosX data[1] +#else + #define sKeepPosX data[10] +#endif // NONMATCHING + +static void sub_8028CF4(struct Sprite *sprite) +{ + u8 i; + static const u8 array[] = {30, 20}; + + if (sprite->sKeepPosX != TRUE) + { + for (i = 0; i < 2; i++) + { + if (++gUnknown_02022CB0[i][1] > array[i]) + { + sprite->pos1.x--; + gUnknown_02022CB0[i][1] = 0; + } + } + } +} + +static const s16 gUnknown_082FB356[][2] = {{230, 55}, {30, 74}}; + +static void sub_8028D44(void) +{ + u8 i; + void *ptr = AllocZeroed(0x400); + struct SpritePalette sprPal = {gDodrioBerryPlatformPal, 6}; + + LZ77UnCompWram(gDodrioBerryPlatformGfx, ptr); + if (ptr != NULL) + { + struct SpriteSheet sprSheet = {ptr, 0x400, 5}; + struct SpriteTemplate sprTemplate = + { + .tileTag = 5, + .paletteTag = 6, + .oam = &sOamData_82FB1F8, + .anims = sSpriteAnimTable_82FB2D4, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_8028CF4, + }; + + LoadSpriteSheet(&sprSheet); + LoadSpritePalette(&sprPal); + for (i = 0; i < 2; i++) + { + gUnknown_02022CB0[i] = AllocZeroed(4); + *gUnknown_02022CB0[i] = CreateSprite(&sprTemplate, gUnknown_082FB356[i][0], gUnknown_082FB356[i][1], 4); + } + } + + Free(ptr); +} + +static void sub_8028DFC(void) +{ + u8 i; + for (i = 0; i < 2; i++) + { + struct Sprite *sprite = &gSprites[*gUnknown_02022CB0[i]]; + sprite->sKeepPosX = TRUE; + sprite->pos1.x = gUnknown_082FB356[i][0]; + sprite->pos1.y = gUnknown_082FB356[i][1]; + } +} + +static void sub_8028E4C(void) +{ + u8 i; + for (i = 0; i < 2; i++) + { + struct Sprite *sprite = &gSprites[*gUnknown_02022CB0[i]]; + sprite->sKeepPosX = FALSE; + } +} + +static void sub_8028E84(void) +{ + u8 i; + for (i = 0; i < 2; i++) + { + struct Sprite *sprite = &gSprites[*gUnknown_02022CB0[i]]; + if (sprite) + DestroySprite(sprite); + FREE_AND_SET_NULL(gUnknown_02022CB0[i]); + } +} + +static void sub_8028EC8(bool8 invisible) +{ + u8 i; + for (i = 0; i < 2; i++) + gSprites[*gUnknown_02022CB0[i]].invisible = invisible; +} + +#undef sKeepPosX + +static s16 sub_8028F14(u8 arg0, u8 arg1) +{ + s16 x = 0; + switch (arg1) + { + case 1: + x = 15; + break; + case 2: + switch (arg0) + { + case 0: x = 12; break; + case 1: x = 18; break; + } + break; + case 3: + switch (arg0) + { + case 0: x = 15; break; + case 1: x = 21; break; + case 2: x = 9; break; + } + break; + case 4: + switch (arg0) + { + case 0: x = 12; break; + case 1: x = 18; break; + case 2: x = 24; break; + case 3: x = 6; break; + } + break; + case 5: + switch (arg0) + { + case 0: x = 15; break; + case 1: x = 21; break; + case 2: x = 27; break; + case 3: x = 3; break; + case 4: x = 9; break; + } + break; + } + + return x * 8; +} + +static void sub_8028FCC(void) +{ + u8 i; + for (i = 0; i < 11; i++) + { + sub_8028BF8(i, TRUE); + sub_8028C7C(i, 1); + } + sub_80289E8(FALSE); +} + +static void sub_8028FF8(u8 frameId) +{ + LoadBgTiles(0, GetWindowFrameTilesPal(frameId)->tiles, 0x120, 1); + LoadPalette(GetWindowFrameTilesPal(frameId)->pal, 0xA0, 0x20); +} + +static void sub_802902C(void) +{ + LoadUserWindowBorderGfx_(0, 0xA, 0xB0); +} + +static void sub_802903C(void) +{ + gUnknown_02022CF8->finished = FALSE; + gUnknown_02022CF8->state = 0; + gUnknown_02022CF8->unk3018 = 0; + gUnknown_02022CF8->unk3020 = 0; + gUnknown_02022CF8->unk3024 = 0; +} + +static void sub_8029074(const struct WindowTemplate *winTempl) +{ + u8 pal = 0xA; + + FillBgTilemapBufferRect(0, 1, winTempl->tilemapLeft - 1, winTempl->tilemapTop - 1, 1, 1, pal); + FillBgTilemapBufferRect(0, 2, winTempl->tilemapLeft, winTempl->tilemapTop - 1, winTempl->width, 1, pal); + FillBgTilemapBufferRect(0, 3, winTempl->tilemapLeft + winTempl->width, winTempl->tilemapTop - 1, 1, 1, pal); + FillBgTilemapBufferRect(0, 4, winTempl->tilemapLeft - 1, winTempl->tilemapTop, 1, winTempl->height, pal); + FillBgTilemapBufferRect(0, 6, winTempl->tilemapLeft + winTempl->width, winTempl->tilemapTop, 1, winTempl->height, pal); + FillBgTilemapBufferRect(0, 7, winTempl->tilemapLeft - 1, winTempl->tilemapTop + winTempl->height, 1, 1, pal); + FillBgTilemapBufferRect(0, 8, winTempl->tilemapLeft, winTempl->tilemapTop + winTempl->height, winTempl->width, 1, pal); + FillBgTilemapBufferRect(0, 9, winTempl->tilemapLeft + winTempl->width, winTempl->tilemapTop + winTempl->height, 1, 1, pal); +} + +static void sub_8029174(const struct WindowTemplate *winTempl) +{ + u8 pal = 0xB; + + FillBgTilemapBufferRect(0, 10, winTempl->tilemapLeft - 1, winTempl->tilemapTop - 1, 1, 1, pal); + FillBgTilemapBufferRect(0, 11, winTempl->tilemapLeft, winTempl->tilemapTop - 1, winTempl->width, 1, pal); + FillBgTilemapBufferRect(0, 12, winTempl->tilemapLeft + winTempl->width, winTempl->tilemapTop - 1, 1, 1, pal); + FillBgTilemapBufferRect(0, 13, winTempl->tilemapLeft - 1, winTempl->tilemapTop, 1, winTempl->height, pal); + FillBgTilemapBufferRect(0, 15, winTempl->tilemapLeft + winTempl->width, winTempl->tilemapTop, 1, winTempl->height, pal); + FillBgTilemapBufferRect(0, 16, winTempl->tilemapLeft - 1, winTempl->tilemapTop + winTempl->height, 1, 1, pal); + FillBgTilemapBufferRect(0, 17, winTempl->tilemapLeft, winTempl->tilemapTop + winTempl->height, winTempl->width, 1, pal); + FillBgTilemapBufferRect(0, 18, winTempl->tilemapLeft + winTempl->width, winTempl->tilemapTop + winTempl->height, 1, 1, pal); +} + +static void sub_8029274(struct DodrioSubstruct_0160 *ptr) +{ + gUnknown_02022CF8 = ptr; + gUnknown_02022CF8->finished = FALSE; + gUnknown_02022CF8->state = 0; + gUnknown_02022CF8->unk3018 = 0; + gUnknown_02022CF8->unk3020 = 0; + gUnknown_02022CF8->unk3024 = 0; + gUnknown_02022CF8->unk3004 = CreateTask(sub_8029314, 3); + sub_802A72C(sub_8029338); +} + +static void sub_80292D4(void) +{ + FreeAllWindowBuffers(); +} + +// Data used by functions below. +struct WinCoords +{ + u8 left; + u8 top; +}; + +static const u8 gUnknown_082FB380[][3] = +{ + {1, 2, 3}, + {1, 4, 5}, + {1, 8, 9}, + {1, 6, 7}, +}; + +static const struct WinCoords gUnknown_082FB38C[] = {{12, 6}}; +static const struct WinCoords gUnknown_082FB390[] = {{9, 10}, {15, 6}}; +static const struct WinCoords gUnknown_082FB398[] = {{12, 6}, {18, 10}, {6, 10}}; +static const struct WinCoords gUnknown_082FB3A4[] = {{9, 10}, {15, 6}, {21, 10}, {3, 6}}; +static const struct WinCoords gUnknown_082FB3B4[] = {{12, 6}, {18, 10}, {23, 6}, {1, 6}, {6, 10}}; + +static const struct WinCoords *const gUnknown_082FB3C8[] = +{ + gUnknown_082FB38C, + gUnknown_082FB390, + gUnknown_082FB398, + gUnknown_082FB3A4, + gUnknown_082FB3B4, +}; + +static const u8 *const gUnknown_082FB3DC[] = +{ + gText_1Colon, + gText_2Colon, + gText_3Colon, + gText_4Colon, + gText_5Colon, +}; + +static const u16 gUnknown_082FB3F0[] = {92, 132, 172, 212}; +static const u16 gUnknown_082FB3F8[] = {33, 49, 65, 81, 97}; +static const u16 gUnknown_082FB402[] = {17, 33, 49, 65, 81}; + +struct +{ + u8 id; + void (*func)(void); +} const gUnknown_082FB40C[] = +{ + {0, sub_8029338}, + {1, sub_8029440}, + {2, sub_802988C}, + {3, sub_802A010}, + {4, sub_802A380}, + {5, sub_802A454}, + {6, sub_802A534}, + {7, sub_802A588}, + {8, sub_802A6FC}, + {9, nullsub_16}, +}; + +static void sub_80292E0(u8 arg0) +{ + u8 i; + for (i = 0; i < 10; i++) + { + if (gUnknown_082FB40C[i].id == arg0) + sub_802A72C(gUnknown_082FB40C[i].func); + } +} + +static void sub_8029314(u8 taskId) +{ + if (!gUnknown_02022CF8->finished) + sub_802A75C()(); +} + +static void sub_8029338(void) +{ + switch (gUnknown_02022CF8->state) + { + case 0: + sub_802A7A8(); + gUnknown_02022CF8->state++; + break; + case 1: + if (sub_802A8E8() == TRUE) + gUnknown_02022CF8->state++; + break; + case 2: + CopyToBgTilemapBuffer(3, gDodrioBerryBgTilemap1, 0, 0); + CopyToBgTilemapBuffer(1, gDodrioBerryBgTilemap2Left, 0, 0); + CopyToBgTilemapBuffer(2, gDodrioBerryBgTilemap2Right, 0, 0); + CopyBgTilemapBufferToVram(3); + CopyBgTilemapBufferToVram(1); + CopyBgTilemapBufferToVram(2); + gUnknown_02022CF8->state++; + break; + case 3: + ShowBg(0); + ShowBg(3); + ShowBg(1); + ShowBg(2); + gUnknown_02022CF8->state++; + break; + case 4: + sub_8028FF8(gSaveBlock2Ptr->optionsWindowFrameType); + sub_802902C(); + gUnknown_02022CF8->state++; + break; + default: + gUnknown_02022CF8->finished = TRUE; + break; + } +} + +static void sub_8029440(void) +{ + u8 i, playersCount, id, colorsId, *name; + u32 left; + struct WindowTemplate window; + const struct WinCoords *ptr; + + switch (gUnknown_02022CF8->state) + { + case 0: + playersCount = sub_8027650(); + ptr = gUnknown_082FB3C8[playersCount - 1]; + window.bg = 0; + window.width = 7; + window.height = 2; + window.paletteNum = 0xD; + window.baseBlock = 0x13; + for (i = 0; i < playersCount; ptr++, i++) + { + colorsId = 0; + id = sub_8027A48(i); + left = (56 - GetStringWidth(1, sub_8027660(id), -1)) / 2u; + window.tilemapLeft = ptr->left; + window.tilemapTop = ptr->top; + gUnknown_02022CF8->unk3008[i] = AddWindow(&window); + ClearWindowTilemap(gUnknown_02022CF8->unk3008[i]); + FillWindowPixelBuffer(gUnknown_02022CF8->unk3008[i], PIXEL_FILL(1)); + if (id == GetMultiplayerId()) + colorsId = 2; + name = sub_8027660(id); + AddTextPrinterParameterized3(gUnknown_02022CF8->unk3008[i], 1, left, 1, gUnknown_082FB380[colorsId], -1, name); + CopyWindowToVram(gUnknown_02022CF8->unk3008[i], 2); + window.baseBlock += 0xE; + sub_8029174(&window); + } + gUnknown_02022CF8->state++; + break; + case 1: + if (!IsDma3ManagerBusyWithBgCopy()) + { + playersCount = sub_8027650(); + for (i = 0; i < playersCount; i++) + PutWindowTilemap(gUnknown_02022CF8->unk3008[i]); + CopyBgTilemapBufferToVram(0); + gUnknown_02022CF8->state++; + } + break; + default: + if (++gUnknown_02022CF8->state > 180) + { + playersCount = sub_8027650(); + for (i = 0; i < playersCount; i++) + { + ClearWindowTilemap(gUnknown_02022CF8->unk3008[i]); + RemoveWindow(gUnknown_02022CF8->unk3008[i]); + } + FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 30, 20); + CopyBgTilemapBufferToVram(0); + gUnknown_02022CF8->finished = TRUE; + } + break; + } +} + +static void sub_80296A8(u8 playersCount_) +{ + u8 i, r8 = 0, r6 = 0; + u8 playersCount = playersCount_; // Pointless variable, I know, but it's needed to match. + u8 *name; + u32 x, numWidth; + u8 numString[32]; + u8 array[5] = {0, 1, 2, 3, 4}; + struct DodrioSubstruct_3308 temp, structArray[5]; + + for (i = 0; i < playersCount; i++) + { + array[i] = i; + sub_802793C(&temp, i); + structArray[i] = temp; + } + + if (sub_8027748() != 0) + { + do + { + for (i = 0; i < playersCount; i++) + { + if (structArray[i].unk0 == r8) + { + array[r6] = i; + r6++; + } + } + r8 = r6; + } while (r6 < playersCount); + } + + for (i = 0; i < playersCount; i++) + { + if (structArray[i].unk4 == 0) + structArray[i].unk0 = playersCount - 1; + } + + x = 216 - GetStringWidth(1, gText_SpacePoints, 0); + for (i = 0; i < playersCount; i++) + { + u8 colorsId = 0; + u8 id = array[i]; + u32 points = structArray[id].unk4; + + AddTextPrinterParameterized(gUnknown_02022CF8->unk3008[1], 1, gUnknown_082FB3DC[structArray[id].unk0], 8, gUnknown_082FB402[i], -1, NULL); + if (id == GetMultiplayerId()) + colorsId = 2; + name = sub_8027660(id); + AddTextPrinterParameterized3(gUnknown_02022CF8->unk3008[1], 1, 28, gUnknown_082FB402[i], gUnknown_082FB380[colorsId], -1, name); + ConvertIntToDecimalStringN(numString, points, STR_CONV_MODE_LEFT_ALIGN, 7); + numWidth = GetStringWidth(1, numString, -1); + AddTextPrinterParameterized(gUnknown_02022CF8->unk3008[1], 1, numString, x - numWidth, gUnknown_082FB402[i], -1, NULL); + AddTextPrinterParameterized(gUnknown_02022CF8->unk3008[1], 1, gText_SpacePoints, x, gUnknown_082FB402[i], -1, NULL); + } +} + +static void sub_802988C(void) +{ + u8 i, j, itemGiveRet, playersCount = sub_8027650(); + u8 *name; + u32 strWidth, x; + + switch (gUnknown_02022CF8->state) + { + case 0: + sub_802784C(); + gUnknown_02022CF8->unk301C = 0; + gUnknown_02022CF8->state++; + break; + case 1: + gUnknown_02022CF8->unk3008[0] = AddWindow(&gUnknown_082F7BBC[0]); + gUnknown_02022CF8->unk3008[1] = AddWindow(&gUnknown_082F7BBC[1]); + ClearWindowTilemap(gUnknown_02022CF8->unk3008[0]); + ClearWindowTilemap(gUnknown_02022CF8->unk3008[1]); + sub_8029174(&gUnknown_082F7BBC[0]); + sub_8029174(&gUnknown_082F7BBC[1]); + gUnknown_02022CF8->state++; + break; + case 2: + FillWindowPixelBuffer(gUnknown_02022CF8->unk3008[0], PIXEL_FILL(1)); + FillWindowPixelBuffer(gUnknown_02022CF8->unk3008[1], PIXEL_FILL(1)); + strWidth = GetStringWidth(1, gText_BerryPickingResults, -1); + x = (224 - strWidth) / 2; + AddTextPrinterParameterized(gUnknown_02022CF8->unk3008[0], 1, gText_BerryPickingResults, x, 1, -1, NULL); + AddTextPrinterParameterized(gUnknown_02022CF8->unk3008[1], 1, gText_10P30P50P50P, 68, 17, -1, NULL); + for (i = 0; i < playersCount; i++) + { + u8 colorsId = 0; + if (i == GetMultiplayerId()) + colorsId = 2; + + name = sub_8027660(i); + AddTextPrinterParameterized3(gUnknown_02022CF8->unk3008[1], 1, 0, gUnknown_082FB3F8[i], gUnknown_082FB380[colorsId], -1, name); + for (j = 0; j < 4; j++) + { + u32 width; + u16 result1 = Min(sub_80276A0(i, j), 9999); + u16 result2 = Min(sub_802778C(j), 9999); + + ConvertIntToDecimalStringN(gStringVar4, result1, STR_CONV_MODE_LEFT_ALIGN, 4); + width = GetStringWidth(1, gStringVar4, -1); + if (result2 == result1 && result2 != 0) + AddTextPrinterParameterized3(gUnknown_02022CF8->unk3008[1], 1, gUnknown_082FB3F0[j] - width, gUnknown_082FB3F8[i], gUnknown_082FB380[1], -1, gStringVar4); + else + AddTextPrinterParameterized(gUnknown_02022CF8->unk3008[1], 1, gStringVar4, gUnknown_082FB3F0[j] - width, gUnknown_082FB3F8[i], -1, NULL); + } + } + CopyWindowToVram(gUnknown_02022CF8->unk3008[0], 2); + CopyWindowToVram(gUnknown_02022CF8->unk3008[1], 2); + gUnknown_02022CF8->state++; + break; + case 3: + if (!IsDma3ManagerBusyWithBgCopy()) + { + PutWindowTilemap(gUnknown_02022CF8->unk3008[0]); + PutWindowTilemap(gUnknown_02022CF8->unk3008[1]); + } + CopyBgTilemapBufferToVram(0); + sub_8028C30(FALSE); + gUnknown_02022CF8->state++; + break; + case 4: + if (++gUnknown_02022CF8->unk301C >= 30 && gMain.newKeys & A_BUTTON) + { + gUnknown_02022CF8->unk301C = 0; + PlaySE(SE_SELECT); + sub_8028C30(TRUE); + gUnknown_02022CF8->state++; + } + break; + case 5: + FillWindowPixelBuffer(gUnknown_02022CF8->unk3008[0], PIXEL_FILL(1)); + FillWindowPixelBuffer(gUnknown_02022CF8->unk3008[1], PIXEL_FILL(1)); + strWidth = GetStringWidth(1, gText_AnnouncingRankings, -1); + x = (224 - strWidth) / 2; + AddTextPrinterParameterized(gUnknown_02022CF8->unk3008[0], 1, gText_AnnouncingRankings, x, 1, -1, NULL); + gUnknown_02022CF8->state++; + break; + case 6: + sub_80296A8(playersCount); + CopyWindowToVram(gUnknown_02022CF8->unk3008[0], 2); + CopyWindowToVram(gUnknown_02022CF8->unk3008[1], 2); + gUnknown_02022CF8->state++; + break; + case 7: + if (!IsDma3ManagerBusyWithBgCopy()) + { + PutWindowTilemap(gUnknown_02022CF8->unk3008[0]); + PutWindowTilemap(gUnknown_02022CF8->unk3008[1]); + } + CopyBgTilemapBufferToVram(0); + gUnknown_02022CF8->state++; + break; + case 8: + if (++gUnknown_02022CF8->unk301C >= 30 && gMain.newKeys & A_BUTTON) + { + gUnknown_02022CF8->unk301C = 0; + PlaySE(SE_SELECT); + if (sub_8027748() < 3000) + { + gUnknown_02022CF8->state = 127; + } + else + { + StopMapMusic(); + gUnknown_02022CF8->state++; + } + + FillBgTilemapBufferRect_Palette0(0, 0, 0, 5, 30, 15); + RemoveWindow(gUnknown_02022CF8->unk3008[1]); + gUnknown_02022CF8->unk3008[1] = AddWindow(&gUnknown_082F7BCC); + ClearWindowTilemap(gUnknown_02022CF8->unk3008[1]); + sub_8029174(&gUnknown_082F7BCC); + } + break; + case 9: + PlayNewMapMusic(MUS_FANFA1); + FillWindowPixelBuffer(gUnknown_02022CF8->unk3008[0], PIXEL_FILL(1)); + FillWindowPixelBuffer(gUnknown_02022CF8->unk3008[1], PIXEL_FILL(1)); + strWidth = GetStringWidth(1, gText_AnnouncingPrizes, -1); + x = (224 - strWidth) / 2; + AddTextPrinterParameterized(gUnknown_02022CF8->unk3008[0], 1, gText_AnnouncingPrizes, x, 1, -1, NULL); + DynamicPlaceholderTextUtil_Reset(); + CopyItemName(sub_802762C(), gStringVar1); + DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1); + DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_FirstPlacePrize); + AddTextPrinterParameterized(gUnknown_02022CF8->unk3008[1], 1, gStringVar4, 0, 1, -1, NULL); + itemGiveRet = sub_80279C8(); + if (itemGiveRet != 0 && itemGiveRet != 3) + { + DynamicPlaceholderTextUtil_Reset(); + CopyItemName(sub_802762C(), gStringVar1); + DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1); + if (itemGiveRet == 2) + DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_CantHoldAnyMore); + else if (itemGiveRet == 1) + DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_FilledStorageSpace); + AddTextPrinterParameterized(gUnknown_02022CF8->unk3008[1], 1, gStringVar4, 0, 41, -1, NULL); + } + CopyWindowToVram(gUnknown_02022CF8->unk3008[0], 2); + CopyWindowToVram(gUnknown_02022CF8->unk3008[1], 2); + gUnknown_02022CF8->state++; + break; + case 10: + if (!IsDma3ManagerBusyWithBgCopy()) + { + PutWindowTilemap(gUnknown_02022CF8->unk3008[0]); + PutWindowTilemap(gUnknown_02022CF8->unk3008[1]); + } + CopyBgTilemapBufferToVram(0); + FadeOutAndFadeInNewMapMusic(MUS_RG_WIN_YASEI, 20, 10); + gUnknown_02022CF8->state++; + break; + case 11: + if (++gUnknown_02022CF8->unk301C >= 30 && gMain.newKeys & A_BUTTON) + { + gUnknown_02022CF8->unk301C = 0; + PlaySE(SE_SELECT); + gUnknown_02022CF8->state++; + } + break; + default: + ClearWindowTilemap(gUnknown_02022CF8->unk3008[0]); + ClearWindowTilemap(gUnknown_02022CF8->unk3008[1]); + RemoveWindow(gUnknown_02022CF8->unk3008[0]); + RemoveWindow(gUnknown_02022CF8->unk3008[1]); + FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 30, 20); + CopyBgTilemapBufferToVram(0); + gUnknown_02022CF8->finished = TRUE; + break; + } +} + +static void sub_802A010(void) +{ + u8 y; + + switch (gUnknown_02022CF8->state) + { + case 0: + gUnknown_02022CF8->unk3008[0] = AddWindow(&gUnknown_082F7BD4[0]); + gUnknown_02022CF8->unk3008[1] = AddWindow(&gUnknown_082F7BD4[1]); + ClearWindowTilemap(gUnknown_02022CF8->unk3008[0]); + ClearWindowTilemap(gUnknown_02022CF8->unk3008[1]); + sub_8029174(&gUnknown_082F7BD4[0]); + sub_8029074(&gUnknown_082F7BD4[1]); + gUnknown_02022CF8->state++; + gUnknown_02022CF8->unk3020 = 0; + gUnknown_02022CF8->unk3024 = 0; + break; + case 1: + FillWindowPixelBuffer(gUnknown_02022CF8->unk3008[0], PIXEL_FILL(1)); + FillWindowPixelBuffer(gUnknown_02022CF8->unk3008[1], PIXEL_FILL(1)); + AddTextPrinterParameterized(gUnknown_02022CF8->unk3008[0], 1, gText_WantToPlayAgain, 0, 5, -1, NULL); + AddTextPrinterParameterized(gUnknown_02022CF8->unk3008[1], 1, gText_Yes, 8, 1, -1, NULL); + AddTextPrinterParameterized(gUnknown_02022CF8->unk3008[1], 1, gText_No, 8, 17, -1, NULL); + AddTextPrinterParameterized(gUnknown_02022CF8->unk3008[1], 1, gText_SelectorArrow2, 0, 1, -1, NULL); + CopyWindowToVram(gUnknown_02022CF8->unk3008[0], 2); + CopyWindowToVram(gUnknown_02022CF8->unk3008[1], 2); + gUnknown_02022CF8->state++; + break; + case 2: + if (!IsDma3ManagerBusyWithBgCopy()) + { + PutWindowTilemap(gUnknown_02022CF8->unk3008[0]); + PutWindowTilemap(gUnknown_02022CF8->unk3008[1]); + } + CopyBgTilemapBufferToVram(0); + gUnknown_02022CF8->state++; + break; + case 3: + y = gUnknown_02022CF8->unk3020; + if (y == 0) + y = 1; + FillWindowPixelBuffer(gUnknown_02022CF8->unk3008[1], PIXEL_FILL(1)); + AddTextPrinterParameterized(gUnknown_02022CF8->unk3008[1], 1, gText_Yes, 8, 1, -1, NULL); + AddTextPrinterParameterized(gUnknown_02022CF8->unk3008[1], 1, gText_No, 8, 17, -1, NULL); + AddTextPrinterParameterized(gUnknown_02022CF8->unk3008[1], 1, gText_SelectorArrow2, 0, ((y - 1) * 16) + 1, -1, NULL); + CopyWindowToVram(gUnknown_02022CF8->unk3008[1], 3); + // Increment state only if A or B button have been pressed. + if (gMain.newKeys & A_BUTTON) + { + PlaySE(SE_SELECT); + if (gUnknown_02022CF8->unk3020 == 0) + gUnknown_02022CF8->unk3020 = 1; + gUnknown_02022CF8->state++; + } + else if (gMain.newKeys & (DPAD_UP | DPAD_DOWN)) + { + PlaySE(SE_SELECT); + switch (gUnknown_02022CF8->unk3020) + { + case 0: + gUnknown_02022CF8->unk3020 = 2; + break; + case 1: + gUnknown_02022CF8->unk3020 = 2; + break; + case 2: + gUnknown_02022CF8->unk3020 = 1; + break; + } + } + else if (gMain.newKeys & B_BUTTON) + { + PlaySE(SE_SELECT); + gUnknown_02022CF8->unk3020 = 2; + gUnknown_02022CF8->state++; + } + break; + default: + gUnknown_02022CF8->unk3024 = gUnknown_02022CF8->unk3020; + ClearWindowTilemap(gUnknown_02022CF8->unk3008[0]); + ClearWindowTilemap(gUnknown_02022CF8->unk3008[1]); + RemoveWindow(gUnknown_02022CF8->unk3008[0]); + RemoveWindow(gUnknown_02022CF8->unk3008[1]); + FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 30, 20); + CopyBgTilemapBufferToVram(0); + gUnknown_02022CF8->finished = TRUE; + break; + } +} + +static void sub_802A380(void) +{ + switch (gUnknown_02022CF8->state) + { + case 0: + DrawDialogueFrame(0, FALSE); + AddTextPrinterParameterized2(0, 1, gText_SavingDontTurnOffPower, 0, NULL, 2, 1, 3); + gUnknown_02022CF8->state++; + break; + case 1: + CopyWindowToVram(0, 3); + gUnknown_02022CF8->state++; + break; + case 2: + if (!IsDma3ManagerBusyWithBgCopy()) + { + CreateTask(sub_8153688, 0); + gUnknown_02022CF8->state++; + } + break; + case 3: + if (!FuncIsActiveTask(sub_8153688)) + gUnknown_02022CF8->state++; + break; + default: + FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 30, 20); + CopyBgTilemapBufferToVram(0); + gUnknown_02022CF8->finished = TRUE; + break; + } +} + +static void sub_802A454(void) +{ + switch (gUnknown_02022CF8->state) + { + case 0: + gUnknown_02022CF8->unk3008[0] = AddWindow(&gUnknown_082F7BEC); + ClearWindowTilemap(gUnknown_02022CF8->unk3008[0]); + sub_8029174(&gUnknown_082F7BEC); + gUnknown_02022CF8->state++; + break; + case 1: + FillWindowPixelBuffer(gUnknown_02022CF8->unk3008[0], PIXEL_FILL(1)); + AddTextPrinterParameterized(gUnknown_02022CF8->unk3008[0], 1, gText_CommunicationStandby3, 0, 5, -1, NULL); + CopyWindowToVram(gUnknown_02022CF8->unk3008[0], 2); + gUnknown_02022CF8->state++; + break; + case 2: + if (!IsDma3ManagerBusyWithBgCopy()) + PutWindowTilemap(gUnknown_02022CF8->unk3008[0]); + CopyBgTilemapBufferToVram(0); + gUnknown_02022CF8->state++; + break; + default: + gUnknown_02022CF8->finished = TRUE; + break; + } +} + +static void sub_802A534(void) +{ + ClearWindowTilemap(gUnknown_02022CF8->unk3008[0]); + RemoveWindow(gUnknown_02022CF8->unk3008[0]); + FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 30, 20); + CopyBgTilemapBufferToVram(0); + gUnknown_02022CF8->finished = TRUE; +} + +static void sub_802A588(void) +{ + switch (gUnknown_02022CF8->state) + { + case 0: + gUnknown_02022CF8->unk3008[0] = AddWindow(&gUnknown_082F7BE4); + ClearWindowTilemap(gUnknown_02022CF8->unk3008[0]); + sub_8029174(&gUnknown_082F7BE4); + gUnknown_02022CF8->state++; + gUnknown_02022CF8->unk301C = 0; + gUnknown_02022CF8->unk3020 = 0; + gUnknown_02022CF8->unk3024 = 0; + break; + case 1: + FillWindowPixelBuffer(gUnknown_02022CF8->unk3008[0], PIXEL_FILL(1)); + AddTextPrinterParameterized(gUnknown_02022CF8->unk3008[0], 1, gText_SomeoneDroppedOut, 0, 5, -1, NULL); + CopyWindowToVram(gUnknown_02022CF8->unk3008[0], 2); + gUnknown_02022CF8->state++; + break; + case 2: + if (!IsDma3ManagerBusyWithBgCopy()) + PutWindowTilemap(gUnknown_02022CF8->unk3008[0]); + CopyBgTilemapBufferToVram(0); + gUnknown_02022CF8->state++; + break; + case 3: + if (++gUnknown_02022CF8->unk301C >= 120) + gUnknown_02022CF8->state++; + break; + default: + gUnknown_02022CF8->unk3024 = 5; + ClearWindowTilemap(gUnknown_02022CF8->unk3008[0]); + RemoveWindow(gUnknown_02022CF8->unk3008[0]); + FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 30, 20); + CopyBgTilemapBufferToVram(0); + gUnknown_02022CF8->finished = TRUE; + break; + } +} + +static void sub_802A6FC(void) +{ + DestroyTask(gUnknown_02022CF8->unk3004); + gUnknown_02022CF8->finished = TRUE; +} + +static void nullsub_16(void) +{ + +} + +static void sub_802A72C(void (*func)(void)) +{ + gUnknown_02022CF8->state = 0; + gUnknown_02022CF8->finished = FALSE; + gUnknown_02022CF8->unk3028 = func; +} + +static void (*sub_802A75C(void))(void) +{ + return gUnknown_02022CF8->unk3028; +} + +static bool32 sub_802A770(void) +{ + if (gUnknown_02022CF8->finished == TRUE) + return FALSE; + else + return TRUE; +} + +static u8 sub_802A794(void) +{ + return gUnknown_02022CF8->unk3024; +} + +static void sub_802A7A8(void) +{ + DmaClearLarge16(3, (void *)VRAM, VRAM_SIZE, 0x1000); + DmaClear32(3,(void *)OAM, OAM_SIZE); + DmaClear16(3, (void *)PLTT, PLTT_SIZE); + SetGpuReg(REG_OFFSET_DISPCNT, 0); + ResetBgsAndClearDma3BusyFlags(0); + InitBgsFromTemplates(0, gUnknown_082F7BA4, ARRAY_COUNT(gUnknown_082F7BA4)); + ChangeBgX(0, 0, 0); + ChangeBgY(0, 0, 0); + ChangeBgX(1, 0, 0); + ChangeBgY(1, 0, 0); + ChangeBgX(2, 0, 0); + ChangeBgY(2, 0, 0); + ChangeBgX(3, 0, 0); + ChangeBgY(3, 0, 0); + InitStandardTextBoxWindows(); + sub_8197200(); + SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP); + SetBgTilemapBuffer(3, gUnknown_02022CF8->tilemapBuffers[0]); + SetBgTilemapBuffer(1, gUnknown_02022CF8->tilemapBuffers[1]); + SetBgTilemapBuffer(2, gUnknown_02022CF8->tilemapBuffers[2]); +} + +static bool32 sub_802A8E8(void) +{ + switch (gUnknown_02022CF8->unk3018) + { + case 0: + LoadPalette(gDodrioBerryBgPal1, 0, sizeof(gDodrioBerryBgPal1)); + break; + case 1: + reset_temp_tile_data_buffers(); + break; + case 2: + decompress_and_copy_tile_data_to_vram(3, gDodrioBerryBgGfx1, 0, 0, 0); + break; + case 3: + decompress_and_copy_tile_data_to_vram(1, gDodrioBerryBgGfx2, 0, 0, 0); + break; + case 4: + if (free_temp_tile_data_buffers_if_possible() == TRUE) + return FALSE; + break; + case 5: + LoadPalette(stdpal_get(3), 0xD0, 0x20); + break; + default: + gUnknown_02022CF8->unk3018 = 0; + return TRUE; + } + + gUnknown_02022CF8->unk3018++; + return FALSE; +} diff --git a/src/egg_hatch.c b/src/egg_hatch.c index 605cd0366..835141ef2 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -73,7 +73,7 @@ static void CreateRandomEggShardSprite(void); static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8 spriteAnimIndex); // IWRAM bss -static IWRAM_DATA struct EggHatchData *sEggHatchData; +static struct EggHatchData *sEggHatchData; // rom data static const u16 sEggPalette[] = INCBIN_U16("graphics/pokemon/egg/normal.gbapal"); diff --git a/src/ereader_helpers.c b/src/ereader_helpers.c index cd64afe0e..11aaaafe7 100755 --- a/src/ereader_helpers.c +++ b/src/ereader_helpers.c @@ -26,17 +26,17 @@ static void sub_81D414C(void); static void sub_81D3F1C(u32, u32*, u32*); static void sub_81D3F68(void); -IWRAM_DATA struct Unknown030012C8 gUnknown_030012C8; -IWRAM_DATA u16 gUnknown_030012E0; -IWRAM_DATA u16 gUnknown_030012E2; -IWRAM_DATA u16 gUnknown_030012E4; -IWRAM_DATA u16 gUnknown_030012E6; -IWRAM_DATA u32 gUnknown_030012E8; -IWRAM_DATA u16 gUnknown_030012EC; -IWRAM_DATA u16 gUnknown_030012EE; -IWRAM_DATA u16 gUnknown_030012F0; -IWRAM_DATA u16 gUnknown_030012F2; -IWRAM_DATA u16 gUnknown_030012F4; +static struct Unknown030012C8 gUnknown_030012C8; +static u16 gUnknown_030012E0; +static u16 gUnknown_030012E2; +static u16 gUnknown_030012E4; +static u16 gUnknown_030012E6; +static u32 gUnknown_030012E8; +static u16 gUnknown_030012EC; +static u16 gUnknown_030012EE; +static u16 gUnknown_030012F0; +static u16 gUnknown_030012F2; +static u16 gUnknown_030012F4; extern const u8 gUnknown_08625B6C[][0x148]; diff --git a/src/ereader_screen.c b/src/ereader_screen.c index f74efa32b..98f0d9b8c 100755 --- a/src/ereader_screen.c +++ b/src/ereader_screen.c @@ -38,7 +38,7 @@ struct Unk03006370 static void sub_81D5084(u8); -extern struct Unk03006370 gUnknown_03006370; +struct Unk03006370 gUnknown_03006370; extern const u8 gUnknown_089A3470[]; extern const u8 gMultiBootProgram_BerryGlitchFix_Start[]; diff --git a/src/evolution_scene.c b/src/evolution_scene.c index 1e120bc90..96ca2ed1c 100644 --- a/src/evolution_scene.c +++ b/src/evolution_scene.c @@ -556,7 +556,7 @@ static void CreateShedinja(u16 preEvoSpecies, struct Pokemon* mon) SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_NICKNAME, (gSpeciesNames[gEvolutionTable[preEvoSpecies][1].targetSpecies])); SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_HELD_ITEM, (&data)); SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_MARKINGS, (&data)); - SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_10, (&data)); + SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_ENCRYPT_SEPARATOR, (&data)); for (i = MON_DATA_COOL_RIBBON; i < MON_DATA_COOL_RIBBON + 5; i++) SetMonData(&gPlayerParty[gPlayerPartyCount], i, (&data)); diff --git a/src/field_camera.c b/src/field_camera.c index b976cf2ff..7f294afdb 100644 --- a/src/field_camera.c +++ b/src/field_camera.c @@ -36,11 +36,11 @@ static void DrawMetatile(s32 a, u16 *b, u16 c); static void CameraPanningCB_PanAhead(void); // IWRAM bss vars -static IWRAM_DATA struct FieldCameraOffset sFieldCameraOffset; -static IWRAM_DATA s16 sHorizontalCameraPan; -static IWRAM_DATA s16 sVerticalCameraPan; -static IWRAM_DATA u8 gUnknown_03000E2C; -static IWRAM_DATA void (*sFieldCameraPanningCallback)(void); +static struct FieldCameraOffset sFieldCameraOffset; +static s16 sHorizontalCameraPan; +static s16 sVerticalCameraPan; +static u8 gUnknown_03000E2C; +static void (*sFieldCameraPanningCallback)(void); struct CameraObject gFieldCamera; u16 gTotalCameraPixelOffsetY; diff --git a/src/field_effect.c b/src/field_effect.c index 22bf44f28..7569bdc75 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -232,7 +232,7 @@ static void Fldeff_MoveDeoxysRock_Step(u8 taskId); // Static RAM declarations -static IWRAM_DATA u8 sActiveList[32]; +static u8 sActiveList[32]; // External declarations extern struct CompressedSpritePalette gMonPaletteTable[]; // GF made a mistake and did not extern it as const. diff --git a/src/field_effect_helpers.c b/src/field_effect_helpers.c index c715da25d..fb883b105 100755 --- a/src/field_effect_helpers.c +++ b/src/field_effect_helpers.c @@ -868,13 +868,13 @@ u32 FldEff_Unknown22(void) return 0; } -void StartAshFieldEffect(s16 x, s16 y, u16 c, s16 d) +void StartAshFieldEffect(s16 x, s16 y, u16 metatileId, s16 d) { gFieldEffectArguments[0] = x; gFieldEffectArguments[1] = y; gFieldEffectArguments[2] = 0x52; gFieldEffectArguments[3] = 1; - gFieldEffectArguments[4] = c; + gFieldEffectArguments[4] = metatileId; gFieldEffectArguments[5] = d; FieldEffectStart(FLDEFF_ASH); } diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index ab2667c8c..6d62cdc4a 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -336,14 +336,9 @@ void player_step(u8 direction, u16 newKeys, u16 heldKeys) static bool8 TryInterruptEventObjectSpecialAnim(struct EventObject *playerEventObj, u8 direction) { - #ifdef NONMATCHING - u8 r5 = direction; - u8 r6 = direction; - #else - u8 r5 = direction; - register u8 r6 asm("r6") = direction; - #endif - //a very bad HACK + u8 r5 = direction; + u8 r6 = direction; + r6++; r6--; if (EventObjectIsMovementOverridden(playerEventObj) && !EventObjectClearHeldMovementIfFinished(playerEventObj)) @@ -1337,13 +1332,13 @@ void SetPlayerAvatarStateMask(u8 flags) gPlayerAvatar.flags |= flags; } -static u8 GetPlayerAvatarStateTransitionByGraphicsId(u8 a, u8 gender) +static u8 GetPlayerAvatarStateTransitionByGraphicsId(u8 graphicsId, u8 gender) { u8 i; for (i = 0; i < 5; i++) { - if (gUnknown_0849750C[gender][i][0] == a) + if (gUnknown_0849750C[gender][i][0] == graphicsId) return gUnknown_0849750C[gender][i][1]; } return 1; @@ -1362,9 +1357,9 @@ u8 GetPlayerAvatarGraphicsIdByCurrentState(void) return 0; } -void SetPlayerAvatarExtraStateTransition(u8 a, u8 b) +void SetPlayerAvatarExtraStateTransition(u8 graphicsId, u8 b) { - u8 unk = GetPlayerAvatarStateTransitionByGraphicsId(a, gPlayerAvatar.gender); + u8 unk = GetPlayerAvatarStateTransitionByGraphicsId(graphicsId, gPlayerAvatar.gender); gPlayerAvatar.unk1 |= unk | b; DoPlayerAvatarTransition(); diff --git a/src/field_special_scene.c b/src/field_special_scene.c index e059e6ef8..dbf68e1a2 100644 --- a/src/field_special_scene.c +++ b/src/field_special_scene.c @@ -13,8 +13,10 @@ #include "sound.h" #include "sprite.h" #include "task.h" +#include "constants/event_objects.h" #include "constants/songs.h" #include "constants/vars.h" +#include "constants/metatile_labels.h" #define SECONDS(value) ((signed) (60.0 * value + 0.5)) @@ -202,9 +204,9 @@ void Task_HandleTruckSequence(u8 taskId) data[1]++; if (data[1] == 120) { - MapGridSetMetatileIdAt(11, 8, 520); - MapGridSetMetatileIdAt(11, 9, 528); - MapGridSetMetatileIdAt(11, 10, 536); + MapGridSetMetatileIdAt(11, 8, METATILE_ID(InsideOfTruck, ExitLight_Top)); + MapGridSetMetatileIdAt(11, 9, METATILE_ID(InsideOfTruck, ExitLight_Mid)); + MapGridSetMetatileIdAt(11, 10, METATILE_ID(InsideOfTruck, ExitLight_Bottom)); DrawWholeMapView(); PlaySE(SE_TRACK_DOOR); DestroyTask(taskId); @@ -216,9 +218,9 @@ void Task_HandleTruckSequence(u8 taskId) void ExecuteTruckSequence(void) { - MapGridSetMetatileIdAt(11, 8, 525); - MapGridSetMetatileIdAt(11, 9, 533); - MapGridSetMetatileIdAt(11, 10, 541); + MapGridSetMetatileIdAt(11, 8, METATILE_ID(InsideOfTruck, DoorClosedFloor_Top)); + MapGridSetMetatileIdAt(11, 9, METATILE_ID(InsideOfTruck, DoorClosedFloor_Mid)); + MapGridSetMetatileIdAt(11, 10, METATILE_ID(InsideOfTruck, DoorClosedFloor_Bottom)); DrawWholeMapView(); ScriptContext2_Enable(); CpuFastFill(0, gPlttBufferFaded, 0x400); @@ -311,7 +313,7 @@ void Task_HandlePorthole(u8 taskId) void sub_80FB6EC(void) { - u8 spriteId = AddPseudoEventObject(0x8C, SpriteCallbackDummy, 112, 80, 0); + u8 spriteId = AddPseudoEventObject(EVENT_OBJ_GFX_SS_TIDAL, SpriteCallbackDummy, 112, 80, 0); gSprites[spriteId].coordOffsetEnabled = FALSE; diff --git a/src/field_specials.c b/src/field_specials.c index 8bd990063..efe77bd70 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -55,13 +55,14 @@ #include "constants/vars.h" #include "constants/battle_frontier.h" #include "constants/weather.h" +#include "constants/metatile_labels.h" #include "palette.h" EWRAM_DATA bool8 gBikeCyclingChallenge = FALSE; EWRAM_DATA u8 gBikeCollisions = 0; static EWRAM_DATA u32 gBikeCyclingTimer = 0; static EWRAM_DATA u8 gUnknown_0203AB5C = 0; -static EWRAM_DATA u8 gUnknown_0203AB5D = 0; +static EWRAM_DATA u8 sPetalburgGymSlidingDoorFrameCounter = 0; static EWRAM_DATA u8 gUnknown_0203AB5E = 0; static EWRAM_DATA u16 gUnknown_0203AB60 = 0; static EWRAM_DATA u16 gUnknown_0203AB62 = 0; @@ -100,7 +101,7 @@ static void sub_81395BC(u8 taskId); static void sub_8139620(u8 taskId); static void sub_8139AF4(u8 taskId); static void sub_8139C2C(u16 a1, u8 a2); -static void sub_8139C80(u8 taskId); +static void MoveElevatorWindowLights(u8 taskId); static void sub_813A2DC(u8 taskId); static void sub_813AA60(u16 a0, u16 a1); static void sub_813ACE8(u8 a0, u16 a1); @@ -623,25 +624,26 @@ static void LoadLinkPartnerEventObjectSpritePalette(u8 graphicsId, u8 localEvent } } -static const struct UCoords8 gUnknown_085B2B68[] = { +static const struct UCoords8 sMauvilleGymSwitchCoords[] = { { 7, 22}, {11, 19}, {10, 16}, {15, 16} }; +// Flips the switches on the ground when the player steps on them. void MauvilleGymSpecial1(void) { u8 i; - for (i = 0; i < ARRAY_COUNT(gUnknown_085B2B68); i++) + for (i = 0; i < ARRAY_COUNT(sMauvilleGymSwitchCoords); i++) { if (i == gSpecialVar_0x8004) { - MapGridSetMetatileIdAt(gUnknown_085B2B68[i].x, gUnknown_085B2B68[i].y, 0x206); + MapGridSetMetatileIdAt(sMauvilleGymSwitchCoords[i].x, sMauvilleGymSwitchCoords[i].y, METATILE_ID(MauvilleGym, PressedSwitch)); } else { - MapGridSetMetatileIdAt(gUnknown_085B2B68[i].x, gUnknown_085B2B68[i].y, 0x205); + MapGridSetMetatileIdAt(sMauvilleGymSwitchCoords[i].x, sMauvilleGymSwitchCoords[i].y, METATILE_ID(MauvilleGym, RaisedSwitch)); } } } @@ -655,100 +657,101 @@ void MauvilleGymSpecial2(void) { switch (MapGridGetMetatileIdAt(x, y)) { - case 0x220: - MapGridSetMetatileIdAt(x, y, 0x230); + case METATILE_ID(MauvilleGym, GreenBeamH1_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH1_Off)); break; - case 0x221: - MapGridSetMetatileIdAt(x, y, 0x231); + case METATILE_ID(MauvilleGym, GreenBeamH2_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH2_Off)); break; - case 0x228: - MapGridSetMetatileIdAt(x, y, 0x238); + case METATILE_ID(MauvilleGym, GreenBeamH3_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH3_Off)); break; - case 0x229: - MapGridSetMetatileIdAt(x, y, 0x239); + case METATILE_ID(MauvilleGym, GreenBeamH4_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH4_Off)); break; - case 0x230: - MapGridSetMetatileIdAt(x, y, 0x220); + case METATILE_ID(MauvilleGym, GreenBeamH1_Off): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH1_On)); break; - case 0x231: - MapGridSetMetatileIdAt(x, y, 0x221); + case METATILE_ID(MauvilleGym, GreenBeamH2_Off): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH2_On)); break; - case 0x238: - MapGridSetMetatileIdAt(x, y, 0xe28); + case METATILE_ID(MauvilleGym, GreenBeamH3_Off): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH3_On) | METATILE_COLLISION_MASK); break; - case 0x239: - MapGridSetMetatileIdAt(x, y, 0xe29); + case METATILE_ID(MauvilleGym, GreenBeamH4_Off): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH4_On) | METATILE_COLLISION_MASK); break; - case 0x222: - MapGridSetMetatileIdAt(x, y, 0x232); + case METATILE_ID(MauvilleGym, RedBeamH1_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH1_Off)); break; - case 0x223: - MapGridSetMetatileIdAt(x, y, 0x233); + case METATILE_ID(MauvilleGym, RedBeamH2_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH2_Off)); break; - case 0x22a: - MapGridSetMetatileIdAt(x, y, 0x23a); + case METATILE_ID(MauvilleGym, RedBeamH3_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH3_Off)); break; - case 0x22b: - MapGridSetMetatileIdAt(x, y, 0x23b); + case METATILE_ID(MauvilleGym, RedBeamH4_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH4_Off)); break; - case 0x232: - MapGridSetMetatileIdAt(x, y, 0x222); + case METATILE_ID(MauvilleGym, RedBeamH1_Off): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH1_On)); break; - case 0x233: - MapGridSetMetatileIdAt(x, y, 0x223); + case METATILE_ID(MauvilleGym, RedBeamH2_Off): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH2_On)); break; - case 0x23a: - MapGridSetMetatileIdAt(x, y, 0xe2a); + case METATILE_ID(MauvilleGym, RedBeamH3_Off): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH3_On) | METATILE_COLLISION_MASK); break; - case 0x23b: - MapGridSetMetatileIdAt(x, y, 0xe2b); + case METATILE_ID(MauvilleGym, RedBeamH4_Off): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH4_On) | METATILE_COLLISION_MASK); break; - case 0x240: - MapGridSetMetatileIdAt(x, y, 0xe42); + case METATILE_ID(MauvilleGym, GreenBeamV1_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleBottom_On) | METATILE_COLLISION_MASK); break; - case 0x248: - MapGridSetMetatileIdAt(x, y, 0x21a); + case METATILE_ID(MauvilleGym, GreenBeamV2_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, FloorTile)); break; - case 0x241: - MapGridSetMetatileIdAt(x, y, 0xe43); + case METATILE_ID(MauvilleGym, RedBeamV1_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleBottom_Off) | METATILE_COLLISION_MASK); break; - case 0x249: - MapGridSetMetatileIdAt(x, y, 0x21a); + case METATILE_ID(MauvilleGym, RedBeamV2_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, FloorTile)); break; - case 0x242: - MapGridSetMetatileIdAt(x, y, 0xe40); + case METATILE_ID(MauvilleGym, PoleBottom_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamV1_On) | METATILE_COLLISION_MASK); break; - case 0x21a: - if (MapGridGetMetatileIdAt(x, y - 1) == 0x240) + case METATILE_ID(MauvilleGym, FloorTile): + if (MapGridGetMetatileIdAt(x, y - 1) == METATILE_ID(MauvilleGym, GreenBeamV1_On)) { - MapGridSetMetatileIdAt(x, y, 0xe48); + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamV2_On) | METATILE_COLLISION_MASK); } else { - MapGridSetMetatileIdAt(x, y, 0xe49); + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamV2_On) | METATILE_COLLISION_MASK); } break; - case 0x243: - MapGridSetMetatileIdAt(x, y, 0xe41); + case METATILE_ID(MauvilleGym, PoleBottom_Off): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamV1_On) | METATILE_COLLISION_MASK); break; - case 0x251: - MapGridSetMetatileIdAt(x, y, 0xe50); + case METATILE_ID(MauvilleGym, PoleTop_Off): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleTop_On) | METATILE_COLLISION_MASK); break; - case 0x250: - MapGridSetMetatileIdAt(x, y, 0x251); + case METATILE_ID(MauvilleGym, PoleTop_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleTop_Off)); break; } } } } +// Presses all switches and deactivates all beams. void MauvilleGymSpecial3(void) { int i, x, y; - const struct UCoords8 *switchCoords = gUnknown_085B2B68; - for (i = ARRAY_COUNT(gUnknown_085B2B68) - 1; i >= 0; i--) + const struct UCoords8 *switchCoords = sMauvilleGymSwitchCoords; + for (i = ARRAY_COUNT(sMauvilleGymSwitchCoords) - 1; i >= 0; i--) { - MapGridSetMetatileIdAt(switchCoords->x, switchCoords->y, 0x206); + MapGridSetMetatileIdAt(switchCoords->x, switchCoords->y, METATILE_ID(MauvilleGym, PressedSwitch)); switchCoords++; } for (y = 12; y < 24; y++) @@ -757,42 +760,42 @@ void MauvilleGymSpecial3(void) { switch (MapGridGetMetatileIdAt(x, y)) { - case 0x220: - MapGridSetMetatileIdAt(x, y, 0x230); + case METATILE_ID(MauvilleGym, GreenBeamH1_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH1_Off)); break; - case 0x221: - MapGridSetMetatileIdAt(x, y, 0x231); + case METATILE_ID(MauvilleGym, GreenBeamH2_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH2_Off)); break; - case 0x228: - MapGridSetMetatileIdAt(x, y, 0x238); + case METATILE_ID(MauvilleGym, GreenBeamH3_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH3_Off)); break; - case 0x229: - MapGridSetMetatileIdAt(x, y, 0x239); + case METATILE_ID(MauvilleGym, GreenBeamH4_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH4_Off)); break; - case 0x222: - MapGridSetMetatileIdAt(x, y, 0x232); + case METATILE_ID(MauvilleGym, RedBeamH1_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH1_Off)); break; - case 0x223: - MapGridSetMetatileIdAt(x, y, 0x233); + case METATILE_ID(MauvilleGym, RedBeamH2_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH2_Off)); break; - case 0x22a: - MapGridSetMetatileIdAt(x, y, 0x23a); + case METATILE_ID(MauvilleGym, RedBeamH3_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH3_Off)); break; - case 0x22b: - MapGridSetMetatileIdAt(x, y, 0x23b); + case METATILE_ID(MauvilleGym, RedBeamH4_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH4_Off)); break; - case 0x240: - MapGridSetMetatileIdAt(x, y, 0xe42); + case METATILE_ID(MauvilleGym, GreenBeamV1_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleBottom_On) | METATILE_COLLISION_MASK); break; - case 0x241: - MapGridSetMetatileIdAt(x, y, 0xe43); + case METATILE_ID(MauvilleGym, RedBeamV1_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleBottom_Off) | METATILE_COLLISION_MASK); break; - case 0x248: - case 0x249: - MapGridSetMetatileIdAt(x, y, 0x21a); + case METATILE_ID(MauvilleGym, GreenBeamV2_On): + case METATILE_ID(MauvilleGym, RedBeamV2_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, FloorTile)); break; - case 0x250: - MapGridSetMetatileIdAt(x, y, 0x251); + case METATILE_ID(MauvilleGym, PoleTop_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleTop_Off)); break; } } @@ -800,23 +803,30 @@ void MauvilleGymSpecial3(void) } static const u8 gUnknown_085B2B78[] = {0, 1, 1, 1, 1}; -static const u16 gUnknown_085B2B7E[] = {0x218, 0x219, 0x21a, 0x21b, 0x21c}; + +static const u16 sPetalburgGymSlidingDoorMetatiles[] = { + METATILE_ID(PetalburgGym, SlidingDoor_Frame0), + METATILE_ID(PetalburgGym, SlidingDoor_Frame1), + METATILE_ID(PetalburgGym, SlidingDoor_Frame2), + METATILE_ID(PetalburgGym, SlidingDoor_Frame3), + METATILE_ID(PetalburgGym, SlidingDoor_Frame4), +}; void PetalburgGymSpecial1(void) { gUnknown_0203AB5C = 0; - gUnknown_0203AB5D = 0; + sPetalburgGymSlidingDoorFrameCounter = 0; PlaySE(SE_KI_GASYAN); CreateTask(Task_PetalburgGym, 8); } static void Task_PetalburgGym(u8 taskId) { - if (gUnknown_085B2B78[gUnknown_0203AB5D] == gUnknown_0203AB5C) + if (gUnknown_085B2B78[sPetalburgGymSlidingDoorFrameCounter] == gUnknown_0203AB5C) { - PetalburgGymFunc(gSpecialVar_0x8004, gUnknown_085B2B7E[gUnknown_0203AB5D]); + PetalburgGymFunc(gSpecialVar_0x8004, sPetalburgGymSlidingDoorMetatiles[sPetalburgGymSlidingDoorFrameCounter]); gUnknown_0203AB5C = 0; - if ((++gUnknown_0203AB5D) == 5) + if ((++sPetalburgGymSlidingDoorFrameCounter) == ARRAY_COUNT(sPetalburgGymSlidingDoorMetatiles)) { DestroyTask(taskId); EnableBothScriptContexts(); @@ -828,74 +838,74 @@ static void Task_PetalburgGym(u8 taskId) } } -static void PetalburgGymFunc(u8 a0, u16 a1) +static void PetalburgGymFunc(u8 roomNumber, u16 metatileId) { - u16 x[4]; - u16 y[4]; + u16 doorCoordsX[4]; + u16 doorCoordsY[4]; u8 i; u8 nDoors = 0; - switch (a0) + switch (roomNumber) { case 1: nDoors = 2; - x[0] = 1; - x[1] = 7; - y[0] = 0x68; - y[1] = 0x68; + doorCoordsX[0] = 1; + doorCoordsX[1] = 7; + doorCoordsY[0] = 104; + doorCoordsY[1] = 104; break; case 2: nDoors = 2; - x[0] = 1; - x[1] = 7; - y[0] = 0x4e; - y[1] = 0x4e; + doorCoordsX[0] = 1; + doorCoordsX[1] = 7; + doorCoordsY[0] = 78; + doorCoordsY[1] = 78; break; case 3: nDoors = 2; - x[0] = 1; - x[1] = 7; - y[0] = 0x5b; - y[1] = 0x5b; + doorCoordsX[0] = 1; + doorCoordsX[1] = 7; + doorCoordsY[0] = 91; + doorCoordsY[1] = 91; break; case 4: nDoors = 1; - x[0] = 7; - y[0] = 0x27; + doorCoordsX[0] = 7; + doorCoordsY[0] = 39; break; case 5: nDoors = 2; - x[0] = 1; - x[1] = 7; - y[0] = 0x34; - y[1] = 0x34; + doorCoordsX[0] = 1; + doorCoordsX[1] = 7; + doorCoordsY[0] = 52; + doorCoordsY[1] = 52; break; case 6: nDoors = 1; - x[0] = 1; - y[0] = 0x41; + doorCoordsX[0] = 1; + doorCoordsY[0] = 65; break; case 7: nDoors = 1; - x[0] = 7; - y[0] = 0xd; + doorCoordsX[0] = 7; + doorCoordsY[0] = 13; break; case 8: nDoors = 1; - x[0] = 1; - y[0] = 0x1a; + doorCoordsX[0] = 1; + doorCoordsY[0] = 26; break; } for (i = 0; i < nDoors; i++) { - MapGridSetMetatileIdAt(x[i] + 7, y[i] + 7, a1 | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt(x[i] + 7, y[i] + 8, (a1 + 8) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(doorCoordsX[i] + 7, doorCoordsY[i] + 7, metatileId | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(doorCoordsX[i] + 7, doorCoordsY[i] + 8, (metatileId + 8) | METATILE_COLLISION_MASK); } DrawWholeMapView(); } void PetalburgGymSpecial2(void) { - PetalburgGymFunc(gSpecialVar_0x8004, gUnknown_085B2B7E[4]); + PetalburgGymFunc(gSpecialVar_0x8004, sPetalburgGymSlidingDoorMetatiles[4]); } void ShowFieldMessageStringVar4(void) @@ -1067,6 +1077,7 @@ static void PCTurnOnEffect_0(struct Task *task) task->data[3]++; } +// enum pc location, static void PCTurnOnEffect_1(s16 flag, s8 dx, s8 dy) { u16 tileId = 0; @@ -1074,30 +1085,30 @@ static void PCTurnOnEffect_1(s16 flag, s8 dx, s8 dy) { if (gSpecialVar_0x8004 == 0) { - tileId = 0x4; + tileId = METATILE_ID(Building, PC_Off); } else if (gSpecialVar_0x8004 == 1) { - tileId = 0x25a; + tileId = METATILE_ID(BrendansMaysHouse, BrendanPC_Off); } else if (gSpecialVar_0x8004 == 2) { - tileId = 0x259; + tileId = METATILE_ID(BrendansMaysHouse, MayPC_Off); } } else { if (gSpecialVar_0x8004 == 0) { - tileId = 0x5; + tileId = METATILE_ID(Building, PC_On); } else if (gSpecialVar_0x8004 == 1) { - tileId = 0x27f; + tileId = METATILE_ID(BrendansMaysHouse, BrendanPC_On); } else if (gSpecialVar_0x8004 == 2) { - tileId = 0x27e; + tileId = METATILE_ID(BrendansMaysHouse, MayPC_On); } } MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + 7, gSaveBlock1Ptr->pos.y + dy + 7, tileId | METATILE_COLLISION_MASK); @@ -1131,15 +1142,15 @@ static void PCTurnOffEffect(void) } if (gSpecialVar_0x8004 == 0) { - tileId = 0x4; + tileId = METATILE_ID(Building, PC_Off); } else if (gSpecialVar_0x8004 == 1) { - tileId = 0x25a; + tileId = METATILE_ID(BrendansMaysHouse, BrendanPC_Off); } else if (gSpecialVar_0x8004 == 2) { - tileId = 0x259; + tileId = METATILE_ID(BrendansMaysHouse, MayPC_Off); } MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + 7, gSaveBlock1Ptr->pos.y + dy + 7, tileId | METATILE_COLLISION_MASK); DrawWholeMapView(); @@ -1174,13 +1185,13 @@ static void LotteryCornerComputerEffect(struct Task *task) task->data[3] = 0; if (task->data[4] != 0) { - MapGridSetMetatileIdAt(18, 8, 0xe9d); - MapGridSetMetatileIdAt(18, 9, 0xea5); + MapGridSetMetatileIdAt(18, 8, METATILE_ID(Shop, Laptop1_Normal) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(18, 9, METATILE_ID(Shop, Laptop2_Normal) | METATILE_COLLISION_MASK); } else { - MapGridSetMetatileIdAt(18, 8, 0xe58); - MapGridSetMetatileIdAt(18, 9, 0xe60); + MapGridSetMetatileIdAt(18, 8, METATILE_ID(Shop, Laptop1_Flash) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(18, 9, METATILE_ID(Shop, Laptop2_Flash) | METATILE_COLLISION_MASK); } DrawWholeMapView(); task->data[4] ^= 1; @@ -1194,8 +1205,8 @@ static void LotteryCornerComputerEffect(struct Task *task) void EndLotteryCornerComputerEffect(void) { - MapGridSetMetatileIdAt(18, 8, 0xe9d); - MapGridSetMetatileIdAt(18, 9, 0xea5); + MapGridSetMetatileIdAt(18, 8, METATILE_ID(Shop, Laptop1_Normal) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(18, 9, METATILE_ID(Shop, Laptop2_Normal) | METATILE_COLLISION_MASK); DrawWholeMapView(); } @@ -1433,7 +1444,7 @@ void PutZigzagoonInPlayerParty(void) u16 monData; CreateMon(&gPlayerParty[0], SPECIES_ZIGZAGOON, 7, 0x20, FALSE, 0, FALSE, 0); monData = TRUE; - SetMonData(&gPlayerParty[0], MON_DATA_ALT_ABILITY, &monData); + SetMonData(&gPlayerParty[0], MON_DATA_ABILITY_NUM, &monData); monData = MOVE_TACKLE; SetMonData(&gPlayerParty[0], MON_DATA_MOVE1, &monData); monData = MOVE_NONE; @@ -1711,17 +1722,42 @@ const u8 *const gElevatorFloorsTable[] = { gText_Rooftop }; -const u16 gUnknown_085B2BF4[][3] = +static const u16 sElevatorWindowTiles_Ascending[][3] = { - {0x0329, 0x032a, 0x032b}, - {0x0331, 0x0332, 0x0333}, - {0x0339, 0x033a, 0x033b}, + { + METATILE_ID(BattleFrontier, Elevator_Top0), + METATILE_ID(BattleFrontier, Elevator_Top1), + METATILE_ID(BattleFrontier, Elevator_Top2) + }, + { + METATILE_ID(BattleFrontier, Elevator_Mid0), + METATILE_ID(BattleFrontier, Elevator_Mid1), + METATILE_ID(BattleFrontier, Elevator_Mid2) + }, + { + METATILE_ID(BattleFrontier, Elevator_Bottom0), + METATILE_ID(BattleFrontier, Elevator_Bottom1), + METATILE_ID(BattleFrontier, Elevator_Bottom2) + }, }; -const u16 gUnknown_085B2C06[][3] = + +static const u16 sElevatorWindowTiles_Descending[][3] = { - {0x0329, 0x032b, 0x032a}, - {0x0331, 0x0333, 0x0332}, - {0x0339, 0x033b, 0x033a}, + { + METATILE_ID(BattleFrontier, Elevator_Top0), + METATILE_ID(BattleFrontier, Elevator_Top2), + METATILE_ID(BattleFrontier, Elevator_Top1) + }, + { + METATILE_ID(BattleFrontier, Elevator_Mid0), + METATILE_ID(BattleFrontier, Elevator_Mid2), + METATILE_ID(BattleFrontier, Elevator_Mid1) + }, + { + METATILE_ID(BattleFrontier, Elevator_Bottom0), + METATILE_ID(BattleFrontier, Elevator_Bottom2), + METATILE_ID(BattleFrontier, Elevator_Bottom1) + }, }; void SetDepartmentStoreFloorVar(void) @@ -1864,21 +1900,21 @@ void sub_8139C10(void) RemoveWindow(gUnknown_0203AB5E); } -static void sub_8139C2C(u16 a1, u8 a2) +static void sub_8139C2C(u16 a1, bool8 descending) { static const u8 gUnknown_085B2C21[] = { 0x03, 0x06, 0x09, 0x0c, 0x0f, 0x12, 0x15, 0x18, 0x1b }; - if (FuncIsActiveTask(sub_8139C80) != TRUE) + if (FuncIsActiveTask(MoveElevatorWindowLights) != TRUE) { - u8 taskId = CreateTask(sub_8139C80, 8); + u8 taskId = CreateTask(MoveElevatorWindowLights, 8); gTasks[taskId].data[0] = 0; gTasks[taskId].data[1] = 0; - gTasks[taskId].data[2] = a2; + gTasks[taskId].data[2] = descending; gTasks[taskId].data[3] = gUnknown_085B2C21[a1]; } } -static void sub_8139C80(u8 taskId) +static void MoveElevatorWindowLights(u8 taskId) { u8 x, y; s16 *data = gTasks[taskId].data; @@ -1886,13 +1922,13 @@ static void sub_8139C80(u8 taskId) if (data[1] == 6) { data[0]++; - if (data[2] == 0) + if (data[2] == FALSE) { for (y = 0; y < 3; y++) { for (x = 0; x < 3; x++) { - MapGridSetMetatileIdAt(x + 8, y + 7, gUnknown_085B2BF4[y][data[0] % 3] | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x + 8, y + 7, sElevatorWindowTiles_Ascending[y][data[0] % 3] | METATILE_COLLISION_MASK); } } } @@ -1902,7 +1938,7 @@ static void sub_8139C80(u8 taskId) { for (x = 0; x < 3; x++) { - MapGridSetMetatileIdAt(x + 8, y + 7, gUnknown_085B2C06[y][data[0] % 3] | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x + 8, y + 7, sElevatorWindowTiles_Descending[y][data[0] % 3] | METATILE_COLLISION_MASK); } } } diff --git a/src/field_tasks.c b/src/field_tasks.c index 22b8697d8..63539e475 100644 --- a/src/field_tasks.c +++ b/src/field_tasks.c @@ -19,6 +19,7 @@ #include "constants/items.h" #include "constants/songs.h" #include "constants/vars.h" +#include "constants/metatile_labels.h" struct PacifidlogMetatileOffsets { @@ -50,26 +51,26 @@ static const TaskFunc sPerStepCallbacks[] = // they are in pairs but declared as 1D array static const struct PacifidlogMetatileOffsets sHalfSubmergedBridgeMetatileOffsets[] = { - { 0, 0, 0x259}, { 0, 1, 0x261}, - { 0, -1, 0x259}, { 0, 0, 0x261}, - { 0, 0, 0x252}, { 1, 0, 0x253}, - { -1, 0, 0x252}, { 0, 0, 0x253} + { 0, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Vertical0)}, {0, 1, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Vertical1)}, + { 0, -1, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Vertical0)}, {0, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Vertical1)}, + { 0, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Horizontal0)}, {1, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Horizontal1)}, + {-1, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Horizontal0)}, {0, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Horizontal1)} }; static const struct PacifidlogMetatileOffsets sFullySubmergedBridgeMetatileOffsets[] = { - { 0, 0, 0x25A}, { 0, 1, 0x262}, - { 0, -1, 0x25A}, { 0, 0, 0x262}, - { 0, 0, 0x254}, { 1, 0, 0x255}, - { -1, 0, 0x254}, { 0, 0, 0x255} + { 0, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Vertical0)}, {0, 1, METATILE_ID(Pacifidlog, SubmergedLogs_Vertical1)}, + { 0, -1, METATILE_ID(Pacifidlog, SubmergedLogs_Vertical0)}, {0, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Vertical1)}, + { 0, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Horizontal0)}, {1, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Horizontal1)}, + {-1, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Horizontal0)}, {0, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Horizontal1)} }; static const struct PacifidlogMetatileOffsets sFloatingBridgeMetatileOffsets[] = { - { 0, 0, 0x258}, { 0, 1, 0x260}, - { 0, -1, 0x258}, { 0, 0, 0x260}, - { 0, 0, 0x250}, { 1, 0, 0x251}, - { -1, 0, 0x250}, { 0, 0, 0x251} + { 0, 0, METATILE_ID(Pacifidlog, FloatingLogs_Vertical0)}, {0, 1, METATILE_ID(Pacifidlog, FloatingLogs_Vertical1)}, + { 0, -1, METATILE_ID(Pacifidlog, FloatingLogs_Vertical0)}, {0, 0, METATILE_ID(Pacifidlog, FloatingLogs_Vertical1)}, + { 0, 0, METATILE_ID(Pacifidlog, FloatingLogs_Horizontal0)}, {1, 0, METATILE_ID(Pacifidlog, FloatingLogs_Horizontal1)}, + {-1, 0, METATILE_ID(Pacifidlog, FloatingLogs_Horizontal0)}, {0, 0, METATILE_ID(Pacifidlog, FloatingLogs_Horizontal1)} }; // Each element corresponds to a y coordinate row in the sootopolis gym 1F map. @@ -103,7 +104,12 @@ static const u16 sSootopolisGymIceRowVars[] = 0 }; -static const u16 sMuddySlopeMetatiles[] = {0xe8, 0xeb, 0xea, 0xe9}; +static const u16 sMuddySlopeMetatiles[] = { + METATILE_ID(General, MuddySlope_Frame0), + METATILE_ID(General, MuddySlope_Frame3), + METATILE_ID(General, MuddySlope_Frame2), + METATILE_ID(General, MuddySlope_Frame1) +}; static void Task_RunPerStepCallback(u8 taskId) { @@ -374,11 +380,11 @@ static void SetLoweredForetreeBridgeMetatile(s16 x, s16 y) { switch (MapGridGetMetatileIdAt(x, y)) { - case 0x24e: - MapGridSetMetatileIdAt(x, y, 0x24f); + case METATILE_ID(Fortree, BridgeOverGrass_Raised): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, BridgeOverGrass_Lowered)); break; - case 0x256: - MapGridSetMetatileIdAt(x, y, 0x257); + case METATILE_ID(Fortree, BridgeOverTrees_Raised): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, BridgeOverTrees_Lowered)); break; } } @@ -391,11 +397,11 @@ static void SetNormalFortreeBridgeMetatile(s16 x, s16 y) { switch (MapGridGetMetatileIdAt(x, y)) { - case 0x24f: - MapGridSetMetatileIdAt(x, y, 0x24e); + case METATILE_ID(Fortree, BridgeOverGrass_Lowered): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, BridgeOverGrass_Raised)); break; - case 0x257: - MapGridSetMetatileIdAt(x, y, 0x256); + case METATILE_ID(Fortree, BridgeOverTrees_Lowered): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, BridgeOverTrees_Raised)); break; } } @@ -523,7 +529,7 @@ void SetSootopolisGymCrackedIceMetatiles(void) for (y = 0; y < height; y++) { if (IsIcePuzzleCoordVisited(x, y) == TRUE) - MapGridSetMetatileIdAt(x + 7, y + 7, 0x20e); + MapGridSetMetatileIdAt(x + 7, y + 7, METATILE_ID(SootopolisGym, Ice_Cracked)); } } } @@ -578,7 +584,7 @@ static void SootopolisGymIcePerStepCallback(u8 taskId) x = data[4]; y = data[5]; PlaySE(SE_RU_BARI); - MapGridSetMetatileIdAt(x, y, 0x20e); + MapGridSetMetatileIdAt(x, y, METATILE_ID(SootopolisGym, Ice_Cracked)); CurrentMapDrawMetatileAt(x, y); MarkIcePuzzleCoordVisited(x - 7, y - 7); data[1] = 1; @@ -594,7 +600,7 @@ static void SootopolisGymIcePerStepCallback(u8 taskId) x = data[4]; y = data[5]; PlaySE(SE_RU_GASYAN); - MapGridSetMetatileIdAt(x, y, 0x206); + MapGridSetMetatileIdAt(x, y, METATILE_ID(SootopolisGym, Ice_Broken)); CurrentMapDrawMetatileAt(x, y); data[1] = 1; } @@ -614,10 +620,10 @@ static void AshGrassPerStepCallback(u8 taskId) data[2] = y; if (MetatileBehavior_IsAshGrass(MapGridGetMetatileBehaviorAt(x, y))) { - if (MapGridGetMetatileIdAt(x, y) == 0x20a) - StartAshFieldEffect(x, y, 0x212, 4); + if (MapGridGetMetatileIdAt(x, y) == METATILE_ID(Fallarbor, AshGrass)) + StartAshFieldEffect(x, y, METATILE_ID(Fallarbor, NormalGrass), 4); else - StartAshFieldEffect(x, y, 0x206, 4); + StartAshFieldEffect(x, y, METATILE_ID(Lavaridge, NormalGrass), 4); if (CheckBagHasItem(ITEM_SOOT_SACK, 1)) { @@ -631,7 +637,7 @@ static void AshGrassPerStepCallback(u8 taskId) static void SetCrackedFloorHoleMetatile(s16 x, s16 y) { - MapGridSetMetatileIdAt(x, y, MapGridGetMetatileIdAt(x, y) == 0x22f ? 0x206 : 0x237); + MapGridSetMetatileIdAt(x, y, MapGridGetMetatileIdAt(x, y) == 0x22f ? 0x206 : 0x237);// unsure what these are referring to CurrentMapDrawMetatileAt(x, y); } @@ -686,7 +692,7 @@ static void SetMuddySlopeMetatile(s16 *data, s16 x, s16 y) MapGridSetMetatileIdAt(x, y, tile); CurrentMapDrawMetatileAt(x, y); - MapGridSetMetatileIdAt(x, y, 0xe8); + MapGridSetMetatileIdAt(x, y, METATILE_ID(General, MuddySlope_Frame0)); } static void Task_MuddySlope(u8 taskId) diff --git a/src/field_weather.c b/src/field_weather.c index 814e85ef4..024b6631f 100644 --- a/src/field_weather.c +++ b/src/field_weather.c @@ -68,7 +68,7 @@ static u8 None_Finish(void); EWRAM_DATA struct Weather gWeather = {0}; EWRAM_DATA static u8 sFieldEffectPaletteGammaTypes[32] = {0}; -IWRAM_DATA static const u8 *sPaletteGammaTypes; +static const u8 *sPaletteGammaTypes; // The drought weather effect uses a precalculated color lookup table. Presumably this // is because the underlying color shift calculation is slow. diff --git a/src/fire.c b/src/fire.c index d428dc13b..2998d46ca 100644 --- a/src/fire.c +++ b/src/fire.c @@ -891,6 +891,7 @@ static void sub_81094D0(u8 taskId) // animate Move_ERUPTION? break; default: + break; } } diff --git a/src/fldeff_cut.c b/src/fldeff_cut.c index be655b86a..3115ff231 100644 --- a/src/fldeff_cut.c +++ b/src/fldeff_cut.c @@ -20,6 +20,7 @@ #include "constants/event_objects.h" #include "constants/field_effects.h" #include "constants/songs.h" +#include "constants/metatile_labels.h" extern struct MapPosition gPlayerFacingPosition; @@ -29,42 +30,6 @@ extern const u8 FarawayIsland_Interior_EventScript_267EDB[]; extern const u8 gFieldEffectPic_CutGrass[]; extern const u16 gFieldEffectObjectPalette6[]; -// tileset 0 as first -#define METATILE_ID_GRASS 0x1 -#define METATILE_ID_POKE_GRASS 0xD - -#define METATILE_ID_POKE_GRASS_TREE_UP 0x25 -#define METATILE_ID_GRASS_TREE_UP 0xE - -#define METATILE_ID_POKE_GRASS_TREE_LEFT 0x1C6 -#define METATILE_ID_POKE_GRASS_TREE_RIGHT 0x1C7 - -#define METATILE_ID_GRASS_TREE_LEFT 0x1CE -#define METATILE_ID_GRASS_TREE_RIGHT 0x1CF - -#define METATILE_ID_POKE_LONG_GRASS 0x15 - -// tileset 6 as second -#define METATILE_ID_POKE_STEP_LAVA_GRASS 0x206 -#define METATILE_ID_POKE_LAVA_GRASS 0x207 -#define METATILE_ID_LAVA_FIELD 0x271 - -// tileset 7 as second -#define METATILE_ID_POKE_ASH_GRASS 0x20A -#define METATILE_ID_POKE_STEP_ASH_GRASS 0x212 -#define METATILE_ID_ASH 0x218 - -// tileset 8 as second -#define METATILE_ID_POKE_LONG_GRASS_START 0x208 - -#define METATILE_ID_SECRET_BASE_LEFT_LONG_GRASS 0x279 -#define METATILE_ID_SECRET_BASE_CENTER_LONG_GRASS 0x27A -#define METATILE_ID_SECRET_BASE_RIGHT_LONG_GRASS 0x27B - -#define METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS 0x281 -#define METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS 0x282 -#define METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS 0x283 - // cut 'square' defines #define CUT_NORMAL_SIDE 3 #define CUT_NORMAL_AREA CUT_NORMAL_SIDE * CUT_NORMAL_SIDE @@ -94,11 +59,11 @@ static void CutGrassSpriteCallbackEnd(struct Sprite *); static void HandleLongGrassOnHyper(u8, s16, s16); // IWRAM variables -static IWRAM_DATA u8 sCutSquareSide; -static IWRAM_DATA u8 sTileCountFromPlayer_X; -static IWRAM_DATA u8 sTileCountFromPlayer_Y; -static IWRAM_DATA u32 sUnused; -static IWRAM_DATA bool8 sHyperCutTiles[CUT_HYPER_AREA]; +static u8 sCutSquareSide; +static u8 sTileCountFromPlayer_X; +static u8 sTileCountFromPlayer_Y; +static u32 sUnused; +static bool8 sHyperCutTiles[CUT_HYPER_AREA]; // EWRAM variables static EWRAM_DATA u8 *sCutGrassSpriteArrayPtr = NULL; @@ -390,36 +355,36 @@ static void SetCutGrassMetatile(s16 x, s16 y) switch (metatileId) { - case METATILE_ID_POKE_LONG_GRASS_START: - case METATILE_ID_POKE_LONG_GRASS: - case METATILE_ID_POKE_GRASS: - MapGridSetMetatileIdAt(x, y, METATILE_ID_GRASS); + case METATILE_ID(Fortree, LongGrass_Root): + case METATILE_ID(General, LongGrass): + case METATILE_ID(General, TallGrass): + MapGridSetMetatileIdAt(x, y, METATILE_ID(General, Grass)); break; - case METATILE_ID_POKE_GRASS_TREE_LEFT: - MapGridSetMetatileIdAt(x, y, METATILE_ID_GRASS_TREE_LEFT); + case METATILE_ID(General, TallGrass_TreeLeft): + MapGridSetMetatileIdAt(x, y, METATILE_ID(General, Grass_TreeLeft)); break; - case METATILE_ID_POKE_GRASS_TREE_RIGHT: - MapGridSetMetatileIdAt(x, y, METATILE_ID_GRASS_TREE_RIGHT); + case METATILE_ID(General, TallGrass_TreeRight): + MapGridSetMetatileIdAt(x, y, METATILE_ID(General, Grass_TreeRight)); break; - case METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS: - MapGridSetMetatileIdAt(x, y, METATILE_ID_SECRET_BASE_LEFT_LONG_GRASS); + case METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, SecretBase_LongGrass_TopLeft)); break; - case METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS: - MapGridSetMetatileIdAt(x, y, METATILE_ID_SECRET_BASE_CENTER_LONG_GRASS); + case METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, SecretBase_LongGrass_TopMid)); break; - case METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS: - MapGridSetMetatileIdAt(x, y, METATILE_ID_SECRET_BASE_RIGHT_LONG_GRASS); + case METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, SecretBase_LongGrass_TopRight)); break; - case METATILE_ID_POKE_STEP_LAVA_GRASS: - case METATILE_ID_POKE_LAVA_GRASS: - MapGridSetMetatileIdAt(x, y, METATILE_ID_LAVA_FIELD); + case METATILE_ID(Lavaridge, NormalGrass): + case METATILE_ID(Lavaridge, AshGrass): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Lavaridge, LavaField)); break; - case METATILE_ID_POKE_STEP_ASH_GRASS: - case METATILE_ID_POKE_ASH_GRASS: - MapGridSetMetatileIdAt(x, y, METATILE_ID_ASH); + case METATILE_ID(Fallarbor, NormalGrass): + case METATILE_ID(Fallarbor, AshGrass): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Fallarbor, AshField)); break; - case METATILE_ID_POKE_GRASS_TREE_UP: - MapGridSetMetatileIdAt(x, y, METATILE_ID_GRASS_TREE_UP); + case METATILE_ID(General, TallGrass_TreeUp): + MapGridSetMetatileIdAt(x, y, METATILE_ID(General, Grass_TreeUp)); break; } } @@ -437,13 +402,13 @@ static u8 GetLongGrassCaseAt(s16 x, s16 y) { u16 metatileId = MapGridGetMetatileIdAt(x, y); - if (metatileId == METATILE_ID_GRASS) + if (metatileId == METATILE_ID(General, Grass)) return LONG_GRASS_FIELD; - else if (metatileId == METATILE_ID_SECRET_BASE_LEFT_LONG_GRASS) + else if (metatileId == METATILE_ID(Fortree, SecretBase_LongGrass_TopLeft)) return LONG_GRASS_BASE_LEFT; - else if (metatileId == METATILE_ID_SECRET_BASE_CENTER_LONG_GRASS) + else if (metatileId == METATILE_ID(Fortree, SecretBase_LongGrass_TopMid)) return LONG_GRASS_BASE_CENTER; - else if (metatileId == METATILE_ID_SECRET_BASE_RIGHT_LONG_GRASS) + else if (metatileId == METATILE_ID(Fortree, SecretBase_LongGrass_TopRight)) return LONG_GRASS_BASE_RIGHT; else return LONG_GRASS_NONE; @@ -457,34 +422,34 @@ static void SetCutGrassMetatiles(s16 x, s16 y) for (i = 0; i < sCutSquareSide; i++) { s16 currentX = x + i; - if (MapGridGetMetatileIdAt(currentX, y) == METATILE_ID_POKE_LONG_GRASS) + if (MapGridGetMetatileIdAt(currentX, y) == METATILE_ID(General, LongGrass)) { switch (GetLongGrassCaseAt(currentX, y + 1)) { case LONG_GRASS_FIELD: - MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID_POKE_LONG_GRASS_START); + MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID(Fortree, LongGrass_Root)); break; case LONG_GRASS_BASE_LEFT: - MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS); + MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft)); break; case LONG_GRASS_BASE_CENTER: - MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS); + MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid)); break; case LONG_GRASS_BASE_RIGHT: - MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS); + MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight)); break; } } - if (MapGridGetMetatileIdAt(currentX, lowerY) == METATILE_ID_GRASS) + if (MapGridGetMetatileIdAt(currentX, lowerY) == METATILE_ID(General, Grass)) { - if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID_POKE_LONG_GRASS_START) - MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID_GRASS); - if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS) - MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID_SECRET_BASE_LEFT_LONG_GRASS); - if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS) - MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID_SECRET_BASE_CENTER_LONG_GRASS); - if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS) - MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID_SECRET_BASE_RIGHT_LONG_GRASS); + if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID(Fortree, LongGrass_Root)) + MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID(General, Grass)); + if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft)) + MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID(Fortree, SecretBase_LongGrass_TopLeft)); + if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid)) + MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID(Fortree, SecretBase_LongGrass_TopMid)); + if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight)) + MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID(Fortree, SecretBase_LongGrass_TopRight)); } } @@ -521,62 +486,62 @@ static void HandleLongGrassOnHyper(u8 caseId, s16 x, s16 y) if (arr[0] == TRUE) { - if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID_POKE_LONG_GRASS_START) - MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_GRASS); - if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS) - MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_SECRET_BASE_LEFT_LONG_GRASS); - if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS) - MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_SECRET_BASE_CENTER_LONG_GRASS); - if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS) - MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_SECRET_BASE_RIGHT_LONG_GRASS); + if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID(Fortree, LongGrass_Root)) + MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(General, Grass)); + if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft)) + MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(Fortree, SecretBase_LongGrass_TopLeft)); + if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid)) + MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(Fortree, SecretBase_LongGrass_TopMid)); + if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight)) + MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(Fortree, SecretBase_LongGrass_TopRight)); } if (arr[1] == TRUE) { - if (MapGridGetMetatileIdAt(newX, y + 2) == METATILE_ID_POKE_LONG_GRASS) + if (MapGridGetMetatileIdAt(newX, y + 2) == METATILE_ID(General, LongGrass)) { switch (GetLongGrassCaseAt(newX, y + 3)) { case LONG_GRASS_FIELD: - MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_POKE_LONG_GRASS_START); + MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(Fortree, LongGrass_Root)); break; case LONG_GRASS_BASE_LEFT: - MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS); + MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft)); break; case LONG_GRASS_BASE_CENTER: - MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS); + MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid)); break; case LONG_GRASS_BASE_RIGHT: - MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS); + MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight)); break; } } - if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID_POKE_LONG_GRASS_START) - MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_GRASS); - if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS) - MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_SECRET_BASE_LEFT_LONG_GRASS); - if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS) - MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_SECRET_BASE_CENTER_LONG_GRASS); - if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS) - MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_SECRET_BASE_RIGHT_LONG_GRASS); + if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID(Fortree, LongGrass_Root)) + MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(General, Grass)); + if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft)) + MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(Fortree, SecretBase_LongGrass_TopLeft)); + if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid)) + MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(Fortree, SecretBase_LongGrass_TopMid)); + if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight)) + MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(Fortree, SecretBase_LongGrass_TopRight)); } if (arr[2] == TRUE) { - if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID_POKE_LONG_GRASS) + if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID(General, LongGrass)) { switch (GetLongGrassCaseAt(newX, y + 4)) { case LONG_GRASS_FIELD: - MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_POKE_LONG_GRASS_START); + MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(Fortree, LongGrass_Root)); break; case LONG_GRASS_BASE_LEFT: - MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS); + MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft)); break; case LONG_GRASS_BASE_CENTER: - MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS); + MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid)); break; case LONG_GRASS_BASE_RIGHT: - MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS); + MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight)); break; } } @@ -630,16 +595,16 @@ void FixLongGrassMetatilesWindowTop(s16 x, s16 y) switch (GetLongGrassCaseAt(x, y + 1)) { case LONG_GRASS_FIELD: - MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_POKE_LONG_GRASS_START); + MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(Fortree, LongGrass_Root)); break; case LONG_GRASS_BASE_LEFT: - MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS); + MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft)); break; case LONG_GRASS_BASE_CENTER: - MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS); + MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid)); break; case LONG_GRASS_BASE_RIGHT: - MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS); + MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight)); break; } } @@ -647,7 +612,7 @@ void FixLongGrassMetatilesWindowTop(s16 x, s16 y) void FixLongGrassMetatilesWindowBottom(s16 x, s16 y) { - if (MapGridGetMetatileIdAt(x, y) == METATILE_ID_GRASS) + if (MapGridGetMetatileIdAt(x, y) == METATILE_ID(General, Grass)) { u8 metatileBehavior = MapGridGetMetatileBehaviorAt(x, y + 1); if (MetatileBehavior_IsLongGrassSouthEdge(metatileBehavior)) @@ -655,17 +620,17 @@ void FixLongGrassMetatilesWindowBottom(s16 x, s16 y) s32 metatileId = MapGridGetMetatileIdAt(x, y + 1); switch (metatileId) { - case METATILE_ID_POKE_LONG_GRASS_START: - MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_GRASS); + case METATILE_ID(Fortree, LongGrass_Root): + MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(General, Grass)); break; - case METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS: - MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_SECRET_BASE_LEFT_LONG_GRASS); + case METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft): + MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_TopLeft)); break; - case METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS: - MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_SECRET_BASE_CENTER_LONG_GRASS); + case METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid): + MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_TopMid)); break; - case METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS: - MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_SECRET_BASE_RIGHT_LONG_GRASS); + case METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight): + MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_TopRight)); break; } } diff --git a/src/fldeff_escalator.c b/src/fldeff_escalator.c index 7ab2db4db..10fb78ee2 100644 --- a/src/fldeff_escalator.c +++ b/src/fldeff_escalator.c @@ -4,6 +4,7 @@ #include "fieldmap.h" #include "fldeff.h" #include "task.h" +#include "constants/metatile_labels.h" static EWRAM_DATA u8 sEscalatorAnim_TaskId = 0; @@ -53,13 +54,47 @@ static void sub_80E12E8(u8 taskId, const s16 *list, u16 isImpassableFlag) } } -static const u16 gUnknown_08589ABA[] = {0x284, 0x282, 0x280}; -static const u16 gUnknown_08589AC0[] = {0x285, 0x283, 0x281}; -static const u16 gUnknown_08589AC6[] = {0x28C, 0x28A, 0x288}; -static const u16 gUnknown_08589ACC[] = {0x28D, 0x28B, 0x289}; -static const u16 gUnknown_08589AD2[] = {0x2A0, 0x2A2, 0x2A4}; -static const u16 gUnknown_08589AD8[] = {0x2A1, 0x2A3, 0x2A5}; -static const u16 gUnknown_08589ADE[] = {0x2A8, 0x2AA, 0x2AC}; +static const u16 sElevatorMetatiles_1F_0[] = { + METATILE_ID(PokemonCenter, Elevator1F_Tile0_Frame2), + METATILE_ID(PokemonCenter, Elevator1F_Tile0_Frame1), + METATILE_ID(PokemonCenter, Elevator1F_Tile0_Frame0) +}; + +static const u16 sElevatorMetatiles_1F_1[] = { + METATILE_ID(PokemonCenter, Elevator1F_Tile1_Frame2), + METATILE_ID(PokemonCenter, Elevator1F_Tile1_Frame1), + METATILE_ID(PokemonCenter, Elevator1F_Tile1_Frame0) +}; + +static const u16 sElevatorMetatiles_1F_2[] = { + METATILE_ID(PokemonCenter, Elevator1F_Tile2_Frame2), + METATILE_ID(PokemonCenter, Elevator1F_Tile2_Frame1), + METATILE_ID(PokemonCenter, Elevator1F_Tile2_Frame0) +}; + +static const u16 sElevatorMetatiles_1F_3[] = { + METATILE_ID(PokemonCenter, Elevator1F_Tile3_Frame2), + METATILE_ID(PokemonCenter, Elevator1F_Tile3_Frame1), + METATILE_ID(PokemonCenter, Elevator1F_Tile3_Frame0) +}; + +static const u16 sElevatorMetatiles_2F_0[] = { + METATILE_ID(PokemonCenter, Elevator2F_Tile0_Frame0), + METATILE_ID(PokemonCenter, Elevator2F_Tile0_Frame1), + METATILE_ID(PokemonCenter, Elevator2F_Tile0_Frame2) +}; + +static const u16 sElevatorMetatiles_2F_1[] = { + METATILE_ID(PokemonCenter, Elevator2F_Tile1_Frame0), + METATILE_ID(PokemonCenter, Elevator2F_Tile1_Frame1), + METATILE_ID(PokemonCenter, Elevator2F_Tile1_Frame2) +}; + +static const u16 sElevatorMetatiles_2F_2[] = { + METATILE_ID(PokemonCenter, Elevator2F_Tile2_Frame0), + METATILE_ID(PokemonCenter, Elevator2F_Tile2_Frame1), + METATILE_ID(PokemonCenter, Elevator2F_Tile2_Frame2) +}; static void sub_80E1444(u8 taskId) { @@ -70,25 +105,25 @@ static void sub_80E1444(u8 taskId) switch (data[0]) { case 0: - sub_80E12E8(taskId, gUnknown_08589ABA, 0); + sub_80E12E8(taskId, sElevatorMetatiles_1F_0, 0); break; case 1: - sub_80E12E8(taskId, gUnknown_08589AC0, 0); + sub_80E12E8(taskId, sElevatorMetatiles_1F_1, 0); break; case 2: - sub_80E12E8(taskId, gUnknown_08589AC6, METATILE_COLLISION_MASK); + sub_80E12E8(taskId, sElevatorMetatiles_1F_2, METATILE_COLLISION_MASK); break; case 3: - sub_80E12E8(taskId, gUnknown_08589ACC, 0); + sub_80E12E8(taskId, sElevatorMetatiles_1F_3, 0); break; case 4: - sub_80E12E8(taskId, gUnknown_08589AD2, METATILE_COLLISION_MASK); + sub_80E12E8(taskId, sElevatorMetatiles_2F_0, METATILE_COLLISION_MASK); break; case 5: - sub_80E12E8(taskId, gUnknown_08589AD8, 0); + sub_80E12E8(taskId, sElevatorMetatiles_2F_1, 0); break; case 6: - sub_80E12E8(taskId, gUnknown_08589ADE, 0); + sub_80E12E8(taskId, sElevatorMetatiles_2F_2, 0); break; } diff --git a/src/fldeff_flash.c b/src/fldeff_flash.c index c002f700f..a2457307b 100644 --- a/src/fldeff_flash.c +++ b/src/fldeff_flash.c @@ -219,8 +219,8 @@ static void sub_8137404(u8 taskId) static void sub_8137420(u8 taskId) { SetGpuReg(REG_OFFSET_DISPCNT, 0); - LZ77UnCompVram(gCaveTransitionTiles, (void *)0x600C000); - LZ77UnCompVram(gCaveTransitionTilemap, (void *)0x600F800); + LZ77UnCompVram(gCaveTransitionTiles, (void *)(VRAM + 0xC000)); + LZ77UnCompVram(gCaveTransitionTilemap, (void *)(VRAM + 0xF800)); LoadPalette(gCaveTransitionPalette_White, 0xE0, 0x20); LoadPalette(gUnknown_085B28A0, 0xE0, 0x10); SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0 @@ -304,8 +304,8 @@ static void sub_81375BC(u8 taskId) static void sub_81375D8(u8 taskId) { SetGpuReg(REG_OFFSET_DISPCNT, 0); - LZ77UnCompVram(gCaveTransitionTiles, (void *)0x600C000); - LZ77UnCompVram(gCaveTransitionTilemap, (void *)0x600F800); + LZ77UnCompVram(gCaveTransitionTiles, (void *)(VRAM + 0xC000)); + LZ77UnCompVram(gCaveTransitionTilemap, (void *)(VRAM + 0xF800)); SetGpuReg(REG_OFFSET_BLDCNT, 0); SetGpuReg(REG_OFFSET_BLDALPHA, 0); SetGpuReg(REG_OFFSET_BLDY, 0); diff --git a/src/fldeff_misc.c b/src/fldeff_misc.c index 39ed30260..c68a95d41 100644 --- a/src/fldeff_misc.c +++ b/src/fldeff_misc.c @@ -22,6 +22,7 @@ #include "constants/metatile_behaviors.h" #include "constants/songs.h" #include "constants/vars.h" +#include "constants/metatile_labels.h" EWRAM_DATA struct MapPosition gPlayerFacingPosition = {0}; @@ -800,16 +801,16 @@ static void Task_SecretBasePCTurnOn(u8 taskId) { case 4: case 12: - MapGridSetMetatileIdAt(data[0], data[1], 548); + MapGridSetMetatileIdAt(data[0], data[1], 0x224); CurrentMapDrawMetatileAt(data[0], data[1]); break; case 8: case 16: - MapGridSetMetatileIdAt(data[0], data[1], 544); + MapGridSetMetatileIdAt(data[0], data[1], 0x220); CurrentMapDrawMetatileAt(data[0], data[1]); break; case 20: - MapGridSetMetatileIdAt(data[0], data[1], 548); + MapGridSetMetatileIdAt(data[0], data[1], 0x224); CurrentMapDrawMetatileAt(data[0], data[1]); FieldEffectActiveListRemove(FLDEFF_PCTURN_ON); EnableBothScriptContexts(); @@ -828,9 +829,9 @@ void DoSecretBasePCTurnOffEffect(void) PlaySE(SE_PC_OFF); if (!VarGet(VAR_CURRENT_SECRET_BASE)) - MapGridSetMetatileIdAt(x, y, 3616); + MapGridSetMetatileIdAt(x, y, 0x220 | METATILE_COLLISION_MASK); else - MapGridSetMetatileIdAt(x, y, 3617); + MapGridSetMetatileIdAt(x, y, 0x221 | METATILE_COLLISION_MASK); CurrentMapDrawMetatileAt(x, y); } @@ -902,8 +903,8 @@ bool8 FldEff_NopA700(void) static void DoSecretBaseBreakableDoorEffect(s16 x, s16 y) { PlaySE(SE_TOY_KABE); - MapGridSetMetatileIdAt(x, y, 630); - MapGridSetMetatileIdAt(x, y - 1, 622); + MapGridSetMetatileIdAt(x, y, 0x276); + MapGridSetMetatileIdAt(x, y - 1, 0x26E); CurrentMapDrawMetatileAt(x, y); CurrentMapDrawMetatileAt(x, y - 1); } diff --git a/src/fldeff_softboiled.c b/src/fldeff_softboiled.c index eca7d045b..c18602c68 100644 --- a/src/fldeff_softboiled.c +++ b/src/fldeff_softboiled.c @@ -32,7 +32,7 @@ bool8 SetUpFieldMove_SoftBoiled(void) void sub_8161560(u8 taskId) { gUnknown_0203CEC8.unkB = 0xA; - gUnknown_0203CEC8.unkA = gUnknown_0203CEC8.unk9; + gUnknown_0203CEC8.unkA = gUnknown_0203CEC8.slotId; sub_81B0FCC(GetCursorSelectionMonId(), 0x1); display_pokemon_menu_message(0x5); gTasks[taskId].func = sub_81B1370; @@ -42,7 +42,7 @@ void sub_81615A8(u8 taskId) { u16 hp; - u8 unk9 = gUnknown_0203CEC8.unk9; + u8 slotId = gUnknown_0203CEC8.slotId; u8 pokemonIndex = gUnknown_0203CEC8.unkA; if(pokemonIndex > 6) { @@ -53,20 +53,20 @@ void sub_81615A8(u8 taskId) } hp = GetMonData(&gPlayerParty[pokemonIndex], MON_DATA_HP); - if(hp == 0 || unk9 == pokemonIndex || GetMonData(&gPlayerParty[pokemonIndex], MON_DATA_MAX_HP) == hp) + if(hp == 0 || slotId == pokemonIndex || GetMonData(&gPlayerParty[pokemonIndex], MON_DATA_MAX_HP) == hp) { sub_81617B8(taskId); return; } PlaySE(SE_KAIFUKU); - sub_81B1F18(taskId, unk9, -1, GetMonData(&gPlayerParty[unk9], MON_DATA_MAX_HP)/5, sub_816166C); + sub_81B1F18(taskId, slotId, -1, GetMonData(&gPlayerParty[slotId], MON_DATA_MAX_HP)/5, sub_816166C); } static void sub_816166C(u8 taskId) { PlaySE(SE_KAIFUKU); - sub_81B1F18(taskId, gUnknown_0203CEC8.unkA, 1, GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_MAX_HP)/5, sub_81616C0); + sub_81B1F18(taskId, gUnknown_0203CEC8.unkA, 1, GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_MAX_HP)/5, sub_81616C0); } static void sub_81616C0(u8 taskId) @@ -83,8 +83,8 @@ static void sub_8161724(u8 taskId) if(sub_81B1BD4() == 1) return; gUnknown_0203CEC8.unkB = 0x0; - sub_81B0FCC(gUnknown_0203CEC8.unk9, 0); - gUnknown_0203CEC8.unk9 = gUnknown_0203CEC8.unkA; + sub_81B0FCC(gUnknown_0203CEC8.slotId, 0); + gUnknown_0203CEC8.slotId = gUnknown_0203CEC8.unkA; sub_81B0FCC(gUnknown_0203CEC8.unkA, 1); ClearStdWindowAndFrameToTransparent(0x6, FALSE); ClearWindowTilemap(0x6); diff --git a/src/ghost.c b/src/ghost.c index 97b86aa76..dd29fb7ca 100644 --- a/src/ghost.c +++ b/src/ghost.c @@ -1148,7 +1148,8 @@ static void sub_8112B78(struct Sprite *sprite) if (++coeffB > 16) coeffB = 16; - if (--(s16)coeffA < 0) + --coeffA; + if ((s16)coeffA < 0) coeffA = 0; SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(coeffA, coeffB)); diff --git a/src/gpu_regs.c b/src/gpu_regs.c index e5ff4fe8f..3bcc4fd93 100644 --- a/src/gpu_regs.c +++ b/src/gpu_regs.c @@ -10,9 +10,9 @@ static u8 sGpuRegBuffer[GPU_REG_BUF_SIZE]; static u8 sGpuRegWaitingList[GPU_REG_BUF_SIZE]; -static bool8 sGpuRegBufferLocked; -static bool8 sShouldSyncRegIE; -static u16 sRegIE; +static volatile bool8 sGpuRegBufferLocked; +static volatile bool8 sShouldSyncRegIE; +static vu16 sRegIE; static void CopyBufferedValueToGpuReg(u8 regOffset); static void SyncRegIE(void); diff --git a/src/graphics.c b/src/graphics.c index 0832101d8..679f16af1 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1172,13 +1172,11 @@ const u32 gBagScreenMale_Pal[] = INCBIN_U32("graphics/interface/bag_screen_male. const u32 gBagScreenFemale_Pal[] = INCBIN_U32("graphics/interface/bag_screen_female.gbapal.lz"); const u32 gBagScreen_Gfx[] = INCBIN_U32("graphics/interface/bag_screen.4bpp.lz"); - -const u32 gUnknown_08D9A88C[] = INCBIN_U32("graphics/unknown/unknown_D9A88C.bin.lz"); +const u32 gBagScreen_GfxTileMap[] = INCBIN_U32("graphics/interface/bag_screen_tilemap.bin.lz"); const u32 gBattleFrontierGfx_PyramidBag[] = INCBIN_U32("graphics/interface/bag_pyramid.4bpp.lz"); -const u32 gUnknown_08D9ADD0[] = INCBIN_U32("graphics/interface/bag_pyramid.gbapal.lz"); // female palette is first and male is second. - -const u32 gUnknown_08D9AE04[] = INCBIN_U32("graphics/unknown/unknown_D9AE04.bin.lz"); +const u32 gBattleFrontierGfx_PyramidBag_Pal[] = INCBIN_U32("graphics/interface/bag_pyramid.gbapal.lz"); // female palette is first and male is second. +const u32 gBattleFrontierGfx_PyramidBagTileMap[] = INCBIN_U32("graphics/interface/bag_pyramid_tilemap.bin.lz"); const u32 gUnknown_08D9AF44[] = INCBIN_U32("graphics/unknown/unknown_D9AF44.gbapal.lz"); diff --git a/src/item.c b/src/item.c index fe8e8eadd..5e505724c 100644 --- a/src/item.c +++ b/src/item.c @@ -18,6 +18,9 @@ extern u16 gUnknown_0203CF30[]; // this file's functions +#if !defined(NONMATCHING) && MODERN +#define static +#endif static bool8 CheckPyramidBagHasItem(u16 itemId, u16 count); static bool8 CheckPyramidBagHasSpace(u16 itemId, u16 count); diff --git a/src/item_menu.c b/src/item_menu.c index bfeeaacd0..5b47a567b 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -53,40 +53,40 @@ void GoToBagMenu(u8 bagMenuType, u8 pocketId, void ( *postExitMenuMainCallback2)()); void CB2_Bag(void); -bool8 setup_bag_menu(void); -void bag_menu_init_bgs(void); -bool8 load_bag_menu_graphics(void); -void setup_bag_menu_textboxes(void); -void allocate_bag_item_list_buffers(void); -void load_bag_item_list_buffers(u8); -void bag_menu_print_pocket_names(const u8*, const u8*); -void bag_menu_copy_pocket_name_to_window(u32); -void bag_menu_draw_pocket_indicator_square(u8, u8); +bool8 SetupBagMenu(void); +void BagMenu_InitBGs(void); +bool8 LoadBagMenu_Graphics(void); +void SetupBagMenu_Textboxes(void); +void AllocateBagItemListBuffers(void); +void LoadBagItemListBuffers(u8); +void BagMenu_PrintPocketNames(const u8*, const u8*); +void BagMenu_CopyPocketNameToWindow(u32); +void BagMenu_DrawPocketIndicatorSquare(u8, u8); void bag_menu_add_pocket_scroll_arrow_indicators_maybe(void); void bag_menu_add_list_scroll_arrow_indicators_maybe(void); -void bag_menu_prepare_tmhm_move_window(void); +void BagMenu_PrepareTMHMMoveWindow(void); bool8 IsWallysBag(void); void Task_WallyTutorialBagMenu(u8); void Task_BagMenu(u8); -void get_name(s8*, u16); +void GetItemName(s8*, u16); u16 ItemIdToBattleMoveId(u16); u16 BagGetItemIdByPocketPosition(u8, u16); -void bag_menu_print_description_box_text(int); -void bag_menu_print_cursor(u8, u8); -void bag_menu_print(u8, u8, const u8*, u8, u8, u8, u8, u8, u8); +void BagMenu_PrintDescription(int); +void BagMenu_PrintCursor(u8, u8); +void BagMenu_Print(u8, u8, const u8*, u8, u8, u8, u8, u8, u8); bool8 ItemId_GetImportance(u16); u16 BagGetQuantityByPocketPosition(u8, u16); void sub_81AB89C(void); -void task_close_bag_menu_2(u8); +void TaskCloseBagMenu_2(u8); u8 AddItemMessageWindow(u8); void bag_menu_RemoveBagItem_message_window(u8); void set_callback3_to_bag(u8); -void sub_81ABC54(u8, s16); -u8 bag_menu_add_window(u8); +void PrintItemDepositAmount(u8, s16); +u8 BagMenu_AddWindow(u8); u8 GetSwitchBagPocketDirection(void); void SwitchBagPocket(u8, s16, u16); bool8 sub_81AC2C0(void); -void bag_menu_swap_items(u8); +void BagMenu_SwapItems(u8); void sub_81AC10C(u8); void sub_81AC3C0(u8); void sub_81AC498(u8); @@ -97,15 +97,15 @@ void sub_81ACB54(u8, u8, u8); void Task_HandleInBattleItemMenuInput(u8); void Task_HandleOutOfBattleItemMenuInput(u8); bool8 sub_81ACDFC(s8); -void bag_menu_remove_window(u8); -void bag_menu_print_there_is_no_pokemon(u8); +void BagMenu_RemoveWindow(u8); +void BagMenu_PrintThereIsNoPokemon(u8); void Task_ChooseHowManyToToss(u8); -void BagMenuConfirmToss(u8); -void bag_menu_yes_no(u8, u8, const struct YesNoFuncTable*); +void BagMenu_TossItems(u8); +void BagMenu_YesNo(u8, u8, const struct YesNoFuncTable*); void Task_ActuallyToss(u8); void ItemMenu_Cancel(u8); void sub_81AD350(u8); -void bag_menu_print_cant_be_held_msg(u8); +void BagMenu_PrintItemCantBeHeld(u8); void bag_menu_AddMoney_window(void); void sub_81AD680(u8); void sub_81AD730(u8); @@ -126,8 +126,8 @@ static void SetPocketListPositions(void); void sub_81ABAE0(void); u8 sub_81AB1F0(u8); void sub_81AC23C(u8); -void bag_menu_change_item_callback(s32 a, bool8 b, struct ListMenu*); -void sub_81AB520(u8 rboxId, int item_index_in_pocket, u8 a); +void BagMenu_MoveCursorCallback(s32 a, bool8 b, struct ListMenu*); +void PrintItemQuantityPlusGFX(u8 rboxId, s32 item_index_in_pocket, u8 a); void ItemMenu_UseOutOfBattle(u8 taskId); void ItemMenu_Toss(u8 taskId); void ItemMenu_Register(u8 taskId); @@ -141,13 +141,13 @@ void unknown_ItemMenu_Give2(u8 taskId); void unknown_ItemMenu_Confirm2(u8 taskId); void unknown_item_menu_type(u8 taskId); void item_menu_type_2(u8 taskId); -void display_sell_item_ask_str(u8 taskId); -void display_deposit_item_ask_str(u8 taskId); +void DisplaySellItemAskString(u8 taskId); +void DisplayDepositItemAskString(u8 taskId); void item_menu_type_b(u8 taskId); -void BagMenuActuallyToss(u8 taskId); -void BagMenuCancelToss(u8 taskId); -void sub_81AD84C(u8 taskId); -void sub_81AD6FC(u8 taskId); +void BagMenu_ConfirmToss(u8 taskId); +void BagMenu_CancelToss(u8 taskId); +void BagMenu_ConfirmSell(u8 taskId); +void BagMenu_CancelSell(u8 taskId); // .rodata @@ -185,8 +185,8 @@ static const struct BgTemplate sBgTemplates_ItemMenu[3] = static const struct ListMenuTemplate sItemListMenu = { .items = NULL, - .moveCursorFunc = bag_menu_change_item_callback, - .itemPrintFunc = sub_81AB520, + .moveCursorFunc = BagMenu_MoveCursorCallback, + .itemPrintFunc = PrintItemQuantityPlusGFX, .totalItems = 0, .maxShowed = 0, .windowId = 0, @@ -204,7 +204,7 @@ static const struct ListMenuTemplate sItemListMenu = .cursorKind = 0 }; -const struct MenuAction gUnknown_08613FB4[] = { +const struct MenuAction sItemMenuActions[] = { {gMenuText_Use, ItemMenu_UseOutOfBattle}, {gMenuText_Toss, ItemMenu_Toss}, {gMenuText_Register, ItemMenu_Register}, @@ -239,10 +239,10 @@ const TaskFunc gUnknown_08614054[] = { unknown_item_menu_type, unknown_item_menu_type, item_menu_type_2, - display_sell_item_ask_str, + DisplaySellItemAskString, unknown_ItemMenu_Confirm, unknown_item_menu_type, - display_deposit_item_ask_str, + DisplayDepositItemAskString, unknown_item_menu_type, unknown_item_menu_type, unknown_item_menu_type, @@ -250,11 +250,11 @@ const TaskFunc gUnknown_08614054[] = { item_menu_type_b }; -const struct YesNoFuncTable gUnknown_08614084 = {BagMenuActuallyToss, BagMenuCancelToss}; +const struct YesNoFuncTable sYesNoTossFunctions = {BagMenu_ConfirmToss, BagMenu_CancelToss}; -const struct YesNoFuncTable gUnknown_0861408C = {sub_81AD84C, sub_81AD6FC}; +const struct YesNoFuncTable sYesNoSellItemFunctions = {BagMenu_ConfirmSell, BagMenu_CancelSell}; -const struct ScrollArrowsTemplate gUnknown_08614094 = {SCROLL_ARROW_LEFT, 0x1C, 16, SCROLL_ARROW_RIGHT, 100, 16, -1, -1, 0x6F, 0x6F, 0}; +const struct ScrollArrowsTemplate gBagScrollArrowsTemplate = {SCROLL_ARROW_LEFT, 0x1C, 16, SCROLL_ARROW_RIGHT, 100, 16, -1, -1, 0x6F, 0x6F, 0}; const u8 gUnknown_086140A4[] = INCBIN_U8("graphics/interface/select_button.4bpp"); @@ -439,8 +439,8 @@ struct TempWallyStruct { u16 pocket; }; -EWRAM_DATA struct UnkBagStruct *gUnknown_0203CE54 = 0; -EWRAM_DATA struct BagStruct gUnknown_0203CE58 = {0}; +EWRAM_DATA struct BagMenuStruct *gBagMenu = 0; +EWRAM_DATA struct BagStruct gBagPositionStruct = {0}; static EWRAM_DATA struct ListBuffer1 *sListBuffer1 = 0; static EWRAM_DATA struct ListBuffer2 *sListBuffer2 = 0; EWRAM_DATA u16 gSpecialVar_ItemId = 0; @@ -453,9 +453,9 @@ extern const u16 gUnknown_0860F074[]; void ResetBagScrollPositions(void) { - gUnknown_0203CE58.pocket = ITEMS_POCKET; - memset(gUnknown_0203CE58.cursorPosition, 0, 10); - memset(gUnknown_0203CE58.scrollPosition, 0, 10); + gBagPositionStruct.pocket = ITEMS_POCKET; + memset(gBagPositionStruct.cursorPosition, 0, 10); + memset(gBagPositionStruct.scrollPosition, 0, 10); } void CB2_BagMenuFromStartMenu(void) @@ -513,28 +513,28 @@ void sub_81AAC70(void) void GoToBagMenu(u8 bagMenuType, u8 pocketId, void ( *postExitMenuMainCallback2)()) { u8 temp; - gUnknown_0203CE54 = AllocZeroed(sizeof(struct UnkBagStruct)); - if (gUnknown_0203CE54 == 0) + gBagMenu = AllocZeroed(sizeof(struct BagMenuStruct)); + if (gBagMenu == 0) { SetMainCallback2(postExitMenuMainCallback2); } else { if (bagMenuType != RETURN_LOCATION_UNCHANGED) - gUnknown_0203CE58.location = bagMenuType; + gBagPositionStruct.location = bagMenuType; if (postExitMenuMainCallback2) - gUnknown_0203CE58.bagCallback = postExitMenuMainCallback2; + gBagPositionStruct.bagCallback = postExitMenuMainCallback2; if (pocketId < POCKETS_COUNT) - gUnknown_0203CE58.pocket = pocketId; - temp = gUnknown_0203CE58.location - (POCKETS_COUNT - 1); + gBagPositionStruct.pocket = pocketId; + temp = gBagPositionStruct.location - (POCKETS_COUNT - 1); if (temp <= 1) - gUnknown_0203CE54->unk81B = 1; - gUnknown_0203CE54->mainCallback2 = 0; - gUnknown_0203CE54->unk81A = 0xFF; - gUnknown_0203CE54->unk81E = -1; - gUnknown_0203CE54->unk81F = -1; - memset(gUnknown_0203CE54->spriteId, 0xFF, sizeof(gUnknown_0203CE54->spriteId)); - memset(gUnknown_0203CE54->windowPointers, 0xFF, 10); + gBagMenu->unk81B = 1; + gBagMenu->mainCallback2 = 0; + gBagMenu->unk81A = 0xFF; + gBagMenu->unk81E = -1; + gBagMenu->unk81F = -1; + memset(gBagMenu->spriteId, 0xFF, sizeof(gBagMenu->spriteId)); + memset(gBagMenu->windowPointers, 0xFF, 10); SetMainCallback2(CB2_Bag); } } @@ -557,10 +557,10 @@ void vblank_cb_bag_menu(void) void CB2_Bag(void) { - while(sub_81221EC() != TRUE && setup_bag_menu() != TRUE && sub_81221AC() != TRUE) {}; + while(sub_81221EC() != TRUE && SetupBagMenu() != TRUE && sub_81221AC() != TRUE) {}; } -bool8 setup_bag_menu(void) +bool8 SetupBagMenu(void) { u32 index; u8 taskId; @@ -598,17 +598,17 @@ bool8 setup_bag_menu(void) gMain.state++; break; case 7: - bag_menu_init_bgs(); - gUnknown_0203CE54->unk834 = 0; + BagMenu_InitBGs(); + gBagMenu->unk834 = 0; gMain.state++; break; case 8: - if (!load_bag_menu_graphics()) + if (!LoadBagMenu_Graphics()) break; gMain.state++; break; case 9: - setup_bag_menu_textboxes(); + SetupBagMenu_Textboxes(); gMain.state++; break; case 10: @@ -618,28 +618,28 @@ bool8 setup_bag_menu(void) gMain.state++; break; case 11: - allocate_bag_item_list_buffers(); + AllocateBagItemListBuffers(); gMain.state++; break; case 12: - load_bag_item_list_buffers(gUnknown_0203CE58.pocket); + LoadBagItemListBuffers(gBagPositionStruct.pocket); gMain.state++; break; case 13: - bag_menu_print_pocket_names(gPocketNamesStringsTable[gUnknown_0203CE58.pocket], 0); - bag_menu_copy_pocket_name_to_window(0); - bag_menu_draw_pocket_indicator_square(gUnknown_0203CE58.pocket, 1); + BagMenu_PrintPocketNames(gPocketNamesStringsTable[gBagPositionStruct.pocket], 0); + BagMenu_CopyPocketNameToWindow(0); + BagMenu_DrawPocketIndicatorSquare(gBagPositionStruct.pocket, 1); gMain.state++; break; case 14: - taskId = sub_81AB1F0(gUnknown_0203CE58.location); - gTasks[taskId].data[0] = ListMenuInit(&gMultiuseListMenuTemplate, gUnknown_0203CE58.scrollPosition[gUnknown_0203CE58.pocket], gUnknown_0203CE58.cursorPosition[gUnknown_0203CE58.pocket]); + taskId = sub_81AB1F0(gBagPositionStruct.location); + gTasks[taskId].data[0] = ListMenuInit(&gMultiuseListMenuTemplate, gBagPositionStruct.scrollPosition[gBagPositionStruct.pocket], gBagPositionStruct.cursorPosition[gBagPositionStruct.pocket]); gTasks[taskId].data[3] = 0; gTasks[taskId].data[8] = 0; gMain.state++; break; case 15: - AddBagVisualSprite(gUnknown_0203CE58.pocket); + AddBagVisualSprite(gBagPositionStruct.pocket); gMain.state++; break; case 16: @@ -652,7 +652,7 @@ bool8 setup_bag_menu(void) gMain.state++; break; case 18: - bag_menu_prepare_tmhm_move_window(); + BagMenu_PrepareTMHMMoveWindow(); gMain.state++; break; case 19: @@ -672,13 +672,13 @@ bool8 setup_bag_menu(void) return FALSE; } -void bag_menu_init_bgs(void) +void BagMenu_InitBGs(void) { ResetVramOamAndBgCntRegs(); - memset(gUnknown_0203CE54->tilemapBuffer, 0, 0x800); + memset(gBagMenu->tilemapBuffer, 0, 0x800); ResetBgsAndClearDma3BusyFlags(0); InitBgsFromTemplates(0, sBgTemplates_ItemMenu, 3); - SetBgTilemapBuffer(2, gUnknown_0203CE54->tilemapBuffer); + SetBgTilemapBuffer(2, gBagMenu->tilemapBuffer); ResetAllBgsCoordinates(); schedule_bg_copy_tilemap_to_vram(2); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP); @@ -688,20 +688,20 @@ void bag_menu_init_bgs(void) SetGpuReg(REG_OFFSET_BLDCNT, 0); } -bool8 load_bag_menu_graphics(void) +bool8 LoadBagMenu_Graphics(void) { - switch (gUnknown_0203CE54->unk834) + switch (gBagMenu->unk834) { case 0: reset_temp_tile_data_buffers(); decompress_and_copy_tile_data_to_vram(2, gBagScreen_Gfx, 0, 0, 0); - gUnknown_0203CE54->unk834++; + gBagMenu->unk834++; break; case 1: if (free_temp_tile_data_buffers_if_possible() != TRUE) { - LZDecompressWram(gUnknown_08D9A88C, gUnknown_0203CE54->tilemapBuffer); - gUnknown_0203CE54->unk834++; + LZDecompressWram(gBagScreen_GfxTileMap, gBagMenu->tilemapBuffer); + gBagMenu->unk834++; } break; case 2: @@ -709,22 +709,22 @@ bool8 load_bag_menu_graphics(void) LoadCompressedPalette(gBagScreenFemale_Pal, 0, 0x40); else LoadCompressedPalette(gBagScreenMale_Pal, 0, 0x40); - gUnknown_0203CE54->unk834++; + gBagMenu->unk834++; break; case 3: if (IsWallysBag() == TRUE || gSaveBlock2Ptr->playerGender == MALE) - LoadCompressedSpriteSheet(&gUnknown_0857FB34); + LoadCompressedSpriteSheet(&gBagMaleSpriteSheet); else - LoadCompressedSpriteSheet(&gUnknown_0857FB3C); - gUnknown_0203CE54->unk834++; + LoadCompressedSpriteSheet(&gBagFemaleSpriteSheet); + gBagMenu->unk834++; break; case 4: - LoadCompressedSpritePalette(&gUnknown_0857FB44); - gUnknown_0203CE54->unk834++; + LoadCompressedSpritePalette(&gBagPaletteTable); + gBagMenu->unk834++; break; default: LoadListMenuArrowsGfx(); - gUnknown_0203CE54->unk834 = 0; + gBagMenu->unk834 = 0; return TRUE; } return FALSE; @@ -740,23 +740,23 @@ u8 sub_81AB1F0(u8 a) return taskId; } -void allocate_bag_item_list_buffers(void) +void AllocateBagItemListBuffers(void) { sListBuffer1 = Alloc(sizeof(struct ListBuffer1)); sListBuffer2 = Alloc(sizeof(struct ListBuffer2)); } -void load_bag_item_list_buffers(u8 pocketId) +void LoadBagItemListBuffers(u8 pocketId) { u16 i; struct BagPocket *pocket = &gBagPockets[pocketId]; struct ListMenuItem *subBuffer; - if (!gUnknown_0203CE54->hideCloseBagText) + if (!gBagMenu->hideCloseBagText) { - for (i = 0; i < gUnknown_0203CE54->numItemStacks[pocketId] - 1; i++) + for (i = 0; i < gBagMenu->numItemStacks[pocketId] - 1; i++) { - get_name(sListBuffer2->name[i], pocket->itemSlots[i].itemId); + GetItemName(sListBuffer2->name[i], pocket->itemSlots[i].itemId); subBuffer = sListBuffer1->subBuffers; subBuffer[i].name = sListBuffer2->name[i]; subBuffer[i].id = i; @@ -768,23 +768,23 @@ void load_bag_item_list_buffers(u8 pocketId) } else { - for (i = 0; i < gUnknown_0203CE54->numItemStacks[pocketId]; i++) + for (i = 0; i < gBagMenu->numItemStacks[pocketId]; i++) { - get_name(sListBuffer2->name[i], pocket->itemSlots[i].itemId); + GetItemName(sListBuffer2->name[i], pocket->itemSlots[i].itemId); subBuffer = sListBuffer1->subBuffers; subBuffer[i].name = sListBuffer2->name[i]; subBuffer[i].id = i; } } gMultiuseListMenuTemplate = sItemListMenu; - gMultiuseListMenuTemplate.totalItems = gUnknown_0203CE54->numItemStacks[pocketId]; + gMultiuseListMenuTemplate.totalItems = gBagMenu->numItemStacks[pocketId]; gMultiuseListMenuTemplate.items = sListBuffer1->subBuffers; - gMultiuseListMenuTemplate.maxShowed = gUnknown_0203CE54->numShownItems[pocketId]; + gMultiuseListMenuTemplate.maxShowed = gBagMenu->numShownItems[pocketId]; } -void get_name(s8 *dest, u16 itemId) +void GetItemName(s8 *dest, u16 itemId) { - switch (gUnknown_0203CE58.pocket) + switch (gBagPositionStruct.pocket) { case TMHM_POCKET: StringCopy(gStringVar2, gMoveNames[ItemIdToBattleMoveId(itemId)]); @@ -810,27 +810,27 @@ void get_name(s8 *dest, u16 itemId) } } -void bag_menu_change_item_callback(s32 a, bool8 b, struct ListMenu *unused) +void BagMenu_MoveCursorCallback(s32 a, bool8 b, struct ListMenu *unused) { if (b != 1) { PlaySE(SE_SELECT); ShakeBagVisual(); } - if (gUnknown_0203CE54->unk81A == 0xFF) + if (gBagMenu->unk81A == 0xFF) { - RemoveBagItemIconSprite(1 ^ gUnknown_0203CE54->unk81B_1); + RemoveBagItemIconSprite(1 ^ gBagMenu->unk81B_1); if (a != -2) - AddBagItemIconSprite(BagGetItemIdByPocketPosition(gUnknown_0203CE58.pocket + 1, a), gUnknown_0203CE54->unk81B_1); + AddBagItemIconSprite(BagGetItemIdByPocketPosition(gBagPositionStruct.pocket + 1, a), gBagMenu->unk81B_1); else - AddBagItemIconSprite(-1, gUnknown_0203CE54->unk81B_1); - gUnknown_0203CE54->unk81B_1 ^= 1; - if (!gUnknown_0203CE54->unk81B_3) - bag_menu_print_description_box_text(a); + AddBagItemIconSprite(-1, gBagMenu->unk81B_1); + gBagMenu->unk81B_1 ^= 1; + if (!gBagMenu->unk81B_3) + BagMenu_PrintDescription(a); } } -void sub_81AB520(u8 rboxId, int item_index_in_pocket, u8 a) +void PrintItemQuantityPlusGFX(u8 rboxId, s32 item_index_in_pocket, u8 a) { u16 itemId; u16 itemQuantity; @@ -838,30 +838,30 @@ void sub_81AB520(u8 rboxId, int item_index_in_pocket, u8 a) int offset; if (item_index_in_pocket != -2) { - if (gUnknown_0203CE54->unk81A != 0xFF) + if (gBagMenu->unk81A != 0xFF) { - if (gUnknown_0203CE54->unk81A == (u8)item_index_in_pocket) - bag_menu_print_cursor(a, 2); + if (gBagMenu->unk81A == (u8)item_index_in_pocket) + BagMenu_PrintCursor(a, 2); else - bag_menu_print_cursor(a, -1); + BagMenu_PrintCursor(a, -1); } - itemId = BagGetItemIdByPocketPosition(gUnknown_0203CE58.pocket + 1, item_index_in_pocket); - itemQuantity = BagGetQuantityByPocketPosition(gUnknown_0203CE58.pocket + 1, item_index_in_pocket); + itemId = BagGetItemIdByPocketPosition(gBagPositionStruct.pocket + 1, item_index_in_pocket); + itemQuantity = BagGetQuantityByPocketPosition(gBagPositionStruct.pocket + 1, item_index_in_pocket); if (itemId >= ITEM_HM01 && itemId <= ITEM_HM08) BlitBitmapToWindow(rboxId, gBagMenuHMIcon_Gfx, 8, a - 1, 16, 16); - if (gUnknown_0203CE58.pocket == BERRIES_POCKET) + if (gBagPositionStruct.pocket == BERRIES_POCKET) { ConvertIntToDecimalStringN(gStringVar1, itemQuantity, 1, 3); StringExpandPlaceholders(gStringVar4, gText_xVar1); offset = GetStringRightAlignXOffset(7, gStringVar4, 0x77); - bag_menu_print(rboxId, 7, gStringVar4, offset, a, 0, 0, -1, 0); + BagMenu_Print(rboxId, 7, gStringVar4, offset, a, 0, 0, -1, 0); } - else if (gUnknown_0203CE58.pocket != KEYITEMS_POCKET && (unique = ItemId_GetImportance(itemId)) == FALSE) + else if (gBagPositionStruct.pocket != KEYITEMS_POCKET && (unique = ItemId_GetImportance(itemId)) == FALSE) { ConvertIntToDecimalStringN(gStringVar1, itemQuantity, 1, 2); StringExpandPlaceholders(gStringVar4, gText_xVar1); offset = GetStringRightAlignXOffset(7, gStringVar4, 0x77); - bag_menu_print(rboxId, 7, gStringVar4, offset, a, unique, unique, -1, unique); + BagMenu_Print(rboxId, 7, gStringVar4, offset, a, unique, unique, -1, unique); } else { @@ -871,96 +871,96 @@ void sub_81AB520(u8 rboxId, int item_index_in_pocket, u8 a) } } -void bag_menu_print_description_box_text(int a) +void BagMenu_PrintDescription(int a) { const u8 *str; if (a != -2) { - str = ItemId_GetDescription(BagGetItemIdByPocketPosition(gUnknown_0203CE58.pocket + 1, a)); + str = ItemId_GetDescription(BagGetItemIdByPocketPosition(gBagPositionStruct.pocket + 1, a)); } else { - StringCopy(gStringVar1, gReturnToXStringsTable[gUnknown_0203CE58.location]); + StringCopy(gStringVar1, gReturnToXStringsTable[gBagPositionStruct.location]); StringExpandPlaceholders(gStringVar4, gText_ReturnToVar1); str = gStringVar4; } FillWindowPixelBuffer(1, PIXEL_FILL(0)); - bag_menu_print(1, 1, str, 3, 1, 0, 0, 0, 0); + BagMenu_Print(1, 1, str, 3, 1, 0, 0, 0, 0); } -void bag_menu_print_cursor_(u8 a, u8 b) +void BagMenu_PrintCursor_(u8 a, u8 b) { - bag_menu_print_cursor(ListMenuGetYCoordForPrintingArrowCursor(a), b); + BagMenu_PrintCursor(ListMenuGetYCoordForPrintingArrowCursor(a), b); } -void bag_menu_print_cursor(u8 a, u8 b) +void BagMenu_PrintCursor(u8 a, u8 b) { if (b == 0xFF) FillWindowPixelRect(0, PIXEL_FILL(0), 0, a, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1)); else - bag_menu_print(0, 1, gText_SelectorArrow2, 0, a, 0, 0, 0, b); + BagMenu_Print(0, 1, gText_SelectorArrow2, 0, a, 0, 0, 0, b); } void bag_menu_add_pocket_scroll_arrow_indicators_maybe(void) { - if (gUnknown_0203CE54->unk81E == 0xFF) - gUnknown_0203CE54->unk81E = AddScrollIndicatorArrowPairParameterized(SCROLL_ARROW_UP, 0xAC, 12, 0x94, gUnknown_0203CE54->numItemStacks[gUnknown_0203CE58.pocket] - gUnknown_0203CE54->numShownItems[gUnknown_0203CE58.pocket], 0x6E, 0x6E, &gUnknown_0203CE58.scrollPosition[gUnknown_0203CE58.pocket]); + if (gBagMenu->unk81E == 0xFF) + gBagMenu->unk81E = AddScrollIndicatorArrowPairParameterized(SCROLL_ARROW_UP, 0xAC, 12, 0x94, gBagMenu->numItemStacks[gBagPositionStruct.pocket] - gBagMenu->numShownItems[gBagPositionStruct.pocket], 0x6E, 0x6E, &gBagPositionStruct.scrollPosition[gBagPositionStruct.pocket]); } void sub_81AB824(void) { - if (gUnknown_0203CE54->unk81E != 0xFF) + if (gBagMenu->unk81E != 0xFF) { - RemoveScrollIndicatorArrowPair(gUnknown_0203CE54->unk81E); - gUnknown_0203CE54->unk81E = 0xFF; + RemoveScrollIndicatorArrowPair(gBagMenu->unk81E); + gBagMenu->unk81E = 0xFF; } sub_81AB89C(); } void bag_menu_add_list_scroll_arrow_indicators_maybe(void) { - if (gUnknown_0203CE54->unk81B != 1 && gUnknown_0203CE54->unk81F == 0xFF) - gUnknown_0203CE54->unk81F = AddScrollIndicatorArrowPair(&gUnknown_08614094, &gUnknown_0203CE58.unk6); + if (gBagMenu->unk81B != 1 && gBagMenu->unk81F == 0xFF) + gBagMenu->unk81F = AddScrollIndicatorArrowPair(&gBagScrollArrowsTemplate, &gBagPositionStruct.unk6); } void sub_81AB89C(void) { - if (gUnknown_0203CE54->unk81F != 0xFF) + if (gBagMenu->unk81F != 0xFF) { - RemoveScrollIndicatorArrowPair(gUnknown_0203CE54->unk81F); - gUnknown_0203CE54->unk81F = 0xFF; + RemoveScrollIndicatorArrowPair(gBagMenu->unk81F); + gBagMenu->unk81F = 0xFF; } } -void free_bag_item_list_buffers(void) +void FreeBagItemListBuffers(void) { Free(sListBuffer2); Free(sListBuffer1); FreeAllWindowBuffers(); - Free(gUnknown_0203CE54); + Free(gBagMenu); } void unknown_ItemMenu_Confirm(u8 taskId) { BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK); - gTasks[taskId].func = task_close_bag_menu_2; + gTasks[taskId].func = TaskCloseBagMenu_2; } -void task_close_bag_menu_2(u8 taskId) +void TaskCloseBagMenu_2(u8 taskId) { s16* data = gTasks[taskId].data; if (!gPaletteFade.active) { - DestroyListMenuTask(data[0], &gUnknown_0203CE58.scrollPosition[gUnknown_0203CE58.pocket], &gUnknown_0203CE58.cursorPosition[gUnknown_0203CE58.pocket]); - if (gUnknown_0203CE54->mainCallback2 != 0) - SetMainCallback2(gUnknown_0203CE54->mainCallback2); + DestroyListMenuTask(data[0], &gBagPositionStruct.scrollPosition[gBagPositionStruct.pocket], &gBagPositionStruct.cursorPosition[gBagPositionStruct.pocket]); + if (gBagMenu->mainCallback2 != 0) + SetMainCallback2(gBagMenu->mainCallback2); else - SetMainCallback2(gUnknown_0203CE58.bagCallback); + SetMainCallback2(gBagPositionStruct.bagCallback); sub_81AB824(); ResetSpriteData(); FreeAllSpritePalettes(); - free_bag_item_list_buffers(); + FreeBagItemListBuffers(); DestroyTask(taskId); } } @@ -979,17 +979,17 @@ void sub_81AB9A8(u8 pocketId) CompactItemsInBagPocket(pocket); break; } - gUnknown_0203CE54->numItemStacks[pocketId] = 0; + gBagMenu->numItemStacks[pocketId] = 0; for (i = 0; i < pocket->capacity && pocket->itemSlots[i].itemId; i++) - gUnknown_0203CE54->numItemStacks[pocketId]++; + gBagMenu->numItemStacks[pocketId]++; - if (!gUnknown_0203CE54->hideCloseBagText) - gUnknown_0203CE54->numItemStacks[pocketId]++; + if (!gBagMenu->hideCloseBagText) + gBagMenu->numItemStacks[pocketId]++; - if (gUnknown_0203CE54->numItemStacks[pocketId] > 8) - gUnknown_0203CE54->numShownItems[pocketId] = 8; + if (gBagMenu->numItemStacks[pocketId] > 8) + gBagMenu->numShownItems[pocketId] = 8; else - gUnknown_0203CE54->numShownItems[pocketId] = gUnknown_0203CE54->numItemStacks[pocketId]; + gBagMenu->numShownItems[pocketId] = gBagMenu->numItemStacks[pocketId]; } void sub_81ABA6C(void) @@ -1001,7 +1001,7 @@ void sub_81ABA6C(void) void SetInitialScrollAndCursorPositions(u8 pocketId) { - sub_812225C(&gUnknown_0203CE58.scrollPosition[pocketId], &gUnknown_0203CE58.cursorPosition[pocketId], gUnknown_0203CE54->numShownItems[pocketId], gUnknown_0203CE54->numItemStacks[pocketId]); + sub_812225C(&gBagPositionStruct.scrollPosition[pocketId], &gBagPositionStruct.cursorPosition[pocketId], gBagMenu->numShownItems[pocketId], gBagMenu->numItemStacks[pocketId]); } static void SetPocketListPositions(void) @@ -1015,12 +1015,12 @@ void sub_81ABAE0(void) { u8 i; for (i = 0; i < POCKETS_COUNT; i++) - sub_8122298(&gUnknown_0203CE58.scrollPosition[i], &gUnknown_0203CE58.cursorPosition[i], gUnknown_0203CE54->numShownItems[i], gUnknown_0203CE54->numItemStacks[i], 8); + sub_8122298(&gBagPositionStruct.scrollPosition[i], &gBagPositionStruct.cursorPosition[i], gBagMenu->numShownItems[i], gBagMenu->numItemStacks[i], 8); } u8 GetItemListPosition(u8 pocketId) { - return gUnknown_0203CE58.scrollPosition[pocketId] + gUnknown_0203CE58.cursorPosition[pocketId]; + return gBagPositionStruct.scrollPosition[pocketId] + gBagPositionStruct.cursorPosition[pocketId]; } void DisplayItemMessage(u8 taskId, u8 fontId, const u8 *str, void ( *callback)(u8 taskId)) @@ -1033,16 +1033,16 @@ void DisplayItemMessage(u8 taskId, u8 fontId, const u8 *str, void ( *callback)(u schedule_bg_copy_tilemap_to_vram(1); } -void bag_menu_inits_lists_menu(u8 taskId) +void BagMenu_InitListsMenu(u8 taskId) { s16* data = gTasks[taskId].data; - u16* scrollPos = &gUnknown_0203CE58.scrollPosition[gUnknown_0203CE58.pocket]; - u16* cursorPos = &gUnknown_0203CE58.cursorPosition[gUnknown_0203CE58.pocket]; + u16* scrollPos = &gBagPositionStruct.scrollPosition[gBagPositionStruct.pocket]; + u16* cursorPos = &gBagPositionStruct.cursorPosition[gBagPositionStruct.pocket]; bag_menu_RemoveBagItem_message_window(4); DestroyListMenuTask(data[0], scrollPos, cursorPos); - sub_81AB9A8(gUnknown_0203CE58.pocket); - SetInitialScrollAndCursorPositions(gUnknown_0203CE58.pocket); - load_bag_item_list_buffers(gUnknown_0203CE58.pocket); + sub_81AB9A8(gBagPositionStruct.pocket); + SetInitialScrollAndCursorPositions(gBagPositionStruct.pocket); + LoadBagItemListBuffers(gBagPositionStruct.pocket); data[0] = ListMenuInit(&gMultiuseListMenuTemplate, *scrollPos, *cursorPos); schedule_bg_copy_tilemap_to_vram(0); set_callback3_to_bag(taskId); @@ -1050,12 +1050,12 @@ void bag_menu_inits_lists_menu(u8 taskId) void sub_81ABC3C(u8 a) { - sub_81ABC54(bag_menu_add_window(a), 1); + PrintItemDepositAmount(BagMenu_AddWindow(a), 1); } -void sub_81ABC54(u8 a, s16 b) +void PrintItemDepositAmount(u8 a, s16 b) { - u8 r3 = (gUnknown_0203CE58.pocket == BERRIES_POCKET) ? 3 : 2; + u8 r3 = (gBagPositionStruct.pocket == BERRIES_POCKET) ? 3 : 2; ConvertIntToDecimalStringN(gStringVar1, b, 2, r3); StringExpandPlaceholders(gStringVar4, gText_xVar1); AddTextPrinterParameterized(a, 1, gStringVar4, GetStringCenterAlignXOffset(1, gStringVar4, 0x28), 2, 0, 0); @@ -1063,7 +1063,7 @@ void sub_81ABC54(u8 a, s16 b) void sub_81ABCC0(int a, int b, int c) { - u8 r3 = (gUnknown_0203CE58.pocket == BERRIES_POCKET) ? 3 : 2; + u8 r3 = (gBagPositionStruct.pocket == BERRIES_POCKET) ? 3 : 2; ConvertIntToDecimalStringN(gStringVar1, b, 2, r3); StringExpandPlaceholders(gStringVar4, gText_xVar1); AddTextPrinterParameterized(a, 1, gStringVar4, 0, 1, -1, 0); @@ -1073,8 +1073,8 @@ void sub_81ABCC0(int a, int b, int c) void Task_BagMenu(u8 taskId) { s16* data = gTasks[taskId].data; - u16* scrollPos = &gUnknown_0203CE58.scrollPosition[gUnknown_0203CE58.pocket]; - u16* cursorPos = &gUnknown_0203CE58.cursorPosition[gUnknown_0203CE58.pocket]; + u16* scrollPos = &gBagPositionStruct.scrollPosition[gBagPositionStruct.pocket]; + u16* cursorPos = &gBagPositionStruct.cursorPosition[gBagPositionStruct.pocket]; u16 select; if (sub_81221EC() != TRUE && !gPaletteFade.active) { @@ -1092,10 +1092,10 @@ void Task_BagMenu(u8 taskId) if (sub_81AC2C0() == 1) { ListMenuGetScrollAndRow(data[0], scrollPos, cursorPos); - if ((*scrollPos + *cursorPos) != gUnknown_0203CE54->numItemStacks[gUnknown_0203CE58.pocket] - 1) + if ((*scrollPos + *cursorPos) != gBagMenu->numItemStacks[gBagPositionStruct.pocket] - 1) { PlaySE(SE_SELECT); - bag_menu_swap_items(taskId); + BagMenu_SwapItems(taskId); } } return; @@ -1109,7 +1109,7 @@ void Task_BagMenu(u8 taskId) case LIST_NOTHING_CHOSEN: break; case LIST_CANCEL: - if (gUnknown_0203CE58.location == 5) + if (gBagPositionStruct.location == 5) { PlaySE(SE_HAZURE); break; @@ -1121,11 +1121,11 @@ void Task_BagMenu(u8 taskId) default: // A_BUTTON PlaySE(SE_SELECT); sub_81AB824(); - bag_menu_print_cursor_(data[0], 2); + BagMenu_PrintCursor_(data[0], 2); data[1] = listPosition; - data[2] = BagGetQuantityByPocketPosition(gUnknown_0203CE58.pocket + 1, listPosition); - gSpecialVar_ItemId = BagGetItemIdByPocketPosition(gUnknown_0203CE58.pocket + 1, listPosition); - gUnknown_08614054[gUnknown_0203CE58.location](taskId); + data[2] = BagGetQuantityByPocketPosition(gBagPositionStruct.pocket + 1, listPosition); + gSpecialVar_ItemId = BagGetItemIdByPocketPosition(gBagPositionStruct.pocket + 1, listPosition); + gUnknown_08614054[gBagPositionStruct.location](taskId); break; } } @@ -1146,7 +1146,7 @@ void set_callback3_to_bag(u8 taskId) u8 GetSwitchBagPocketDirection(void) { u8 LRKeys; - if (gUnknown_0203CE54->unk81B != 0) + if (gBagMenu->unk81B != 0) return 0; LRKeys = GetLRKeysState(); if ((gMain.newKeys & DPAD_LEFT) || LRKeys == 1) @@ -1184,25 +1184,25 @@ void SwitchBagPocket(u8 taskId, s16 deltaBagPocketId, u16 a3) { ClearWindowTilemap(0); ClearWindowTilemap(1); - DestroyListMenuTask(data[0], &gUnknown_0203CE58.scrollPosition[gUnknown_0203CE58.pocket], &gUnknown_0203CE58.cursorPosition[gUnknown_0203CE58.pocket]); + DestroyListMenuTask(data[0], &gBagPositionStruct.scrollPosition[gBagPositionStruct.pocket], &gBagPositionStruct.cursorPosition[gBagPositionStruct.pocket]); schedule_bg_copy_tilemap_to_vram(0); - gSprites[gUnknown_0203CE54->spriteId[2 + (gUnknown_0203CE54->unk81B_1 ^ 1)]].invisible = TRUE; + gSprites[gBagMenu->spriteId[2 + (gBagMenu->unk81B_1 ^ 1)]].invisible = TRUE; sub_81AB824(); } - pocketId = gUnknown_0203CE58.pocket; + pocketId = gBagPositionStruct.pocket; ChangeBagPocketId(&pocketId, deltaBagPocketId); if (deltaBagPocketId == 1) { - bag_menu_print_pocket_names(gPocketNamesStringsTable[gUnknown_0203CE58.pocket], gPocketNamesStringsTable[pocketId]); - bag_menu_copy_pocket_name_to_window(0); + BagMenu_PrintPocketNames(gPocketNamesStringsTable[gBagPositionStruct.pocket], gPocketNamesStringsTable[pocketId]); + BagMenu_CopyPocketNameToWindow(0); } else { - bag_menu_print_pocket_names(gPocketNamesStringsTable[pocketId], gPocketNamesStringsTable[gUnknown_0203CE58.pocket]); - bag_menu_copy_pocket_name_to_window(8); + BagMenu_PrintPocketNames(gPocketNamesStringsTable[pocketId], gPocketNamesStringsTable[gBagPositionStruct.pocket]); + BagMenu_CopyPocketNameToWindow(8); } - bag_menu_draw_pocket_indicator_square(gUnknown_0203CE58.pocket, 0); - bag_menu_draw_pocket_indicator_square(pocketId, 1); + BagMenu_DrawPocketIndicatorSquare(gBagPositionStruct.pocket, 0); + BagMenu_DrawPocketIndicatorSquare(pocketId, 1); FillBgTilemapBufferRect_Palette0(2, 11, 14, 2, 15, 16); schedule_bg_copy_tilemap_to_vram(2); SetBagVisualPocketId(pocketId, 1); @@ -1220,12 +1220,12 @@ void sub_81AC10C(u8 taskId) switch (GetSwitchBagPocketDirection()) { case 1: - ChangeBagPocketId(&gUnknown_0203CE58.pocket, data[11]); + ChangeBagPocketId(&gBagPositionStruct.pocket, data[11]); SwitchTaskToFollowupFunc(taskId); SwitchBagPocket(taskId, -1, 1); return; case 2: - ChangeBagPocketId(&gUnknown_0203CE58.pocket, data[11]); + ChangeBagPocketId(&gBagPositionStruct.pocket, data[11]); SwitchTaskToFollowupFunc(taskId); SwitchBagPocket(taskId, 1, 1); return; @@ -1238,17 +1238,17 @@ void sub_81AC10C(u8 taskId) if (!(++data[12] & 1)) { if (data[11] == 1) - bag_menu_copy_pocket_name_to_window((u8)(data[12] >> 1)); + BagMenu_CopyPocketNameToWindow((u8)(data[12] >> 1)); else - bag_menu_copy_pocket_name_to_window((u8)(8 - (data[12] >> 1))); + BagMenu_CopyPocketNameToWindow((u8)(8 - (data[12] >> 1))); } if (data[12] == 16) data[13]++; break; case 1: - ChangeBagPocketId(&gUnknown_0203CE58.pocket, data[11]); - load_bag_item_list_buffers(gUnknown_0203CE58.pocket); - data[0] = ListMenuInit(&gMultiuseListMenuTemplate, gUnknown_0203CE58.scrollPosition[gUnknown_0203CE58.pocket], gUnknown_0203CE58.cursorPosition[gUnknown_0203CE58.pocket]); + ChangeBagPocketId(&gBagPositionStruct.pocket, data[11]); + LoadBagItemListBuffers(gBagPositionStruct.pocket); + data[0] = ListMenuInit(&gMultiuseListMenuTemplate, gBagPositionStruct.scrollPosition[gBagPositionStruct.pocket], gBagPositionStruct.cursorPosition[gBagPositionStruct.pocket]); PutWindowTilemap(1); PutWindowTilemap(2); schedule_bg_copy_tilemap_to_vram(0); @@ -1264,7 +1264,7 @@ void sub_81AC23C(u8 a) schedule_bg_copy_tilemap_to_vram(2); } -void bag_menu_draw_pocket_indicator_square(u8 x, u8 is_current_bag) +void BagMenu_DrawPocketIndicatorSquare(u8 x, u8 is_current_bag) { if (is_current_bag == 0) FillBgTilemapBufferRect_Palette0(2, 0x1017, x + 5, 3, 1, 1); @@ -1275,29 +1275,29 @@ void bag_menu_draw_pocket_indicator_square(u8 x, u8 is_current_bag) bool8 sub_81AC2C0(void) { - if (gUnknown_0203CE58.location <= 1) + if (gBagPositionStruct.location <= 1) { - u8 temp = gUnknown_0203CE58.pocket - 2; + u8 temp = gBagPositionStruct.pocket - 2; if (temp > 1) return TRUE; } return FALSE; } -void bag_menu_swap_items(u8 taskId) +void BagMenu_SwapItems(u8 taskId) { s16* data = gTasks[taskId].data; ListMenuSetUnkIndicatorsStructField(data[0], 16, 1); - data[1] = gUnknown_0203CE58.scrollPosition[gUnknown_0203CE58.pocket] + gUnknown_0203CE58.cursorPosition[gUnknown_0203CE58.pocket]; - gUnknown_0203CE54->unk81A = data[1]; - CopyItemName(BagGetItemIdByPocketPosition(gUnknown_0203CE58.pocket + 1, data[1]), gStringVar1); + data[1] = gBagPositionStruct.scrollPosition[gBagPositionStruct.pocket] + gBagPositionStruct.cursorPosition[gBagPositionStruct.pocket]; + gBagMenu->unk81A = data[1]; + CopyItemName(BagGetItemIdByPocketPosition(gBagPositionStruct.pocket + 1, data[1]), gStringVar1); StringExpandPlaceholders(gStringVar4, gText_MoveVar1Where); FillWindowPixelBuffer(1, PIXEL_FILL(0)); - bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0); + BagMenu_Print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0); sub_80D4FEC(data[1]); sub_81AB89C(); - bag_menu_print_cursor_(data[0], 2); + BagMenu_PrintCursor_(data[0], 2); gTasks[taskId].func = sub_81AC3C0; } @@ -1311,15 +1311,15 @@ void sub_81AC3C0(u8 taskId) if (gMain.newKeys & SELECT_BUTTON) { PlaySE(SE_SELECT); - ListMenuGetScrollAndRow(data[0], &gUnknown_0203CE58.scrollPosition[gUnknown_0203CE58.pocket], &gUnknown_0203CE58.cursorPosition[gUnknown_0203CE58.pocket]); + ListMenuGetScrollAndRow(data[0], &gBagPositionStruct.scrollPosition[gBagPositionStruct.pocket], &gBagPositionStruct.cursorPosition[gBagPositionStruct.pocket]); sub_81AC498(taskId); } else { input = ListMenu_ProcessInput(data[0]); - ListMenuGetScrollAndRow(data[0], &gUnknown_0203CE58.scrollPosition[gUnknown_0203CE58.pocket], &gUnknown_0203CE58.cursorPosition[gUnknown_0203CE58.pocket]); + ListMenuGetScrollAndRow(data[0], &gBagPositionStruct.scrollPosition[gBagPositionStruct.pocket], &gBagPositionStruct.cursorPosition[gBagPositionStruct.pocket]); sub_80D4FC8(0); - sub_80D4FEC(gUnknown_0203CE58.cursorPosition[gUnknown_0203CE58.pocket]); + sub_80D4FEC(gBagPositionStruct.cursorPosition[gBagPositionStruct.pocket]); switch (input) { case LIST_NOTHING_CHOSEN: @@ -1342,20 +1342,20 @@ void sub_81AC3C0(u8 taskId) void sub_81AC498(u8 taskId) { s16* data = gTasks[taskId].data; - u16* scrollPos = &gUnknown_0203CE58.scrollPosition[gUnknown_0203CE58.pocket]; - u16* cursorPos = &gUnknown_0203CE58.cursorPosition[gUnknown_0203CE58.pocket]; + u16* scrollPos = &gBagPositionStruct.scrollPosition[gBagPositionStruct.pocket]; + u16* cursorPos = &gBagPositionStruct.cursorPosition[gBagPositionStruct.pocket]; u16 realPos = (*scrollPos + *cursorPos); if (data[1] == realPos || data[1] == (realPos - 1)) sub_81AC590(taskId); else { - MoveItemSlotInList(gBagPockets[gUnknown_0203CE58.pocket].itemSlots, data[1], realPos); - gUnknown_0203CE54->unk81A = -1; + MoveItemSlotInList(gBagPockets[gBagPositionStruct.pocket].itemSlots, data[1], realPos); + gBagMenu->unk81A = -1; DestroyListMenuTask(data[0], scrollPos, cursorPos); if (data[1] < realPos) - gUnknown_0203CE58.cursorPosition[gUnknown_0203CE58.pocket]--; - load_bag_item_list_buffers(gUnknown_0203CE58.pocket); + gBagPositionStruct.cursorPosition[gBagPositionStruct.pocket]--; + LoadBagItemListBuffers(gBagPositionStruct.pocket); data[0] = ListMenuInit(&gMultiuseListMenuTemplate, *scrollPos, *cursorPos); sub_80D4FC8(1); bag_menu_add_list_scroll_arrow_indicators_maybe(); @@ -1366,14 +1366,14 @@ void sub_81AC498(u8 taskId) void sub_81AC590(u8 taskId) { s16* data = gTasks[taskId].data; - u16* scrollPos = &gUnknown_0203CE58.scrollPosition[gUnknown_0203CE58.pocket]; - u16* cursorPos = &gUnknown_0203CE58.cursorPosition[gUnknown_0203CE58.pocket]; + u16* scrollPos = &gBagPositionStruct.scrollPosition[gBagPositionStruct.pocket]; + u16* cursorPos = &gBagPositionStruct.cursorPosition[gBagPositionStruct.pocket]; - gUnknown_0203CE54->unk81A = -1; + gBagMenu->unk81A = -1; DestroyListMenuTask(data[0], scrollPos, cursorPos); if (data[1] < (*scrollPos + *cursorPos)) - gUnknown_0203CE58.cursorPosition[gUnknown_0203CE58.pocket]--; - load_bag_item_list_buffers(gUnknown_0203CE58.pocket); + gBagPositionStruct.cursorPosition[gBagPositionStruct.pocket]--; + LoadBagItemListBuffers(gBagPositionStruct.pocket); data[0] = ListMenuInit(&gMultiuseListMenuTemplate, *scrollPos, *cursorPos); sub_80D4FC8(1); bag_menu_add_list_scroll_arrow_indicators_maybe(); @@ -1382,59 +1382,59 @@ void sub_81AC590(u8 taskId) void sub_81AC644(u8 unused) { - switch (gUnknown_0203CE58.location - 1) + switch (gBagPositionStruct.location - 1) { case 0: case 9: if (ItemId_GetBattleUsage(gSpecialVar_ItemId)) { - gUnknown_0203CE54->unk820 = gUnknown_08614042; - gUnknown_0203CE54->unk828 = 2; + gBagMenu->unk820 = gUnknown_08614042; + gBagMenu->unk828 = 2; } else { - gUnknown_0203CE54->unk820 = &gUnknown_08614046; - gUnknown_0203CE54->unk828 = 1; + gBagMenu->unk820 = &gUnknown_08614046; + gBagMenu->unk828 = 1; } break; case 4: - gUnknown_0203CE54->unk820 = gUnknown_08614047; - gUnknown_0203CE54->unk828 = 4; + gBagMenu->unk820 = gUnknown_08614047; + gBagMenu->unk828 = 4; break; case 8: if (!ItemId_GetImportance(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY) { - gUnknown_0203CE54->unk820 = gUnknown_0861404B; - gUnknown_0203CE54->unk828 = 2; + gBagMenu->unk820 = gUnknown_0861404B; + gBagMenu->unk828 = 2; } else { - gUnknown_0203CE54->unk820 = &gUnknown_08614046; - gUnknown_0203CE54->unk828 = 1; + gBagMenu->unk820 = &gUnknown_08614046; + gBagMenu->unk828 = 1; } break; case 6: if (!ItemId_GetImportance(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY) { - gUnknown_0203CE54->unk820 = gUnknown_0861404D; - gUnknown_0203CE54->unk828 = 2; + gBagMenu->unk820 = gUnknown_0861404D; + gBagMenu->unk828 = 2; } else { - gUnknown_0203CE54->unk820 = &gUnknown_08614046; - gUnknown_0203CE54->unk828 = 1; + gBagMenu->unk820 = &gUnknown_08614046; + gBagMenu->unk828 = 1; } break; case 7: if (!ItemId_GetImportance(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY) { - gUnknown_0203CE54->unk820 = gUnknown_0861404F; - gUnknown_0203CE54->unk828 = 2; + gBagMenu->unk820 = gUnknown_0861404F; + gBagMenu->unk828 = 2; } else { - gUnknown_0203CE54->unk820 = &gUnknown_08614046; - gUnknown_0203CE54->unk828 = 1; + gBagMenu->unk820 = &gUnknown_08614046; + gBagMenu->unk828 = 1; } break; case 1: @@ -1444,56 +1444,56 @@ void sub_81AC644(u8 unused) default: if (sub_81221AC() == TRUE || InUnionRoom() == TRUE) { - if (gUnknown_0203CE58.pocket == KEYITEMS_POCKET || !sub_8122148(gSpecialVar_ItemId)) + if (gBagPositionStruct.pocket == KEYITEMS_POCKET || !sub_8122148(gSpecialVar_ItemId)) { - gUnknown_0203CE54->unk820 = &gUnknown_08614046; - gUnknown_0203CE54->unk828 = 1; + gBagMenu->unk820 = &gUnknown_08614046; + gBagMenu->unk828 = 1; } else { - gUnknown_0203CE54->unk820 = gUnknown_08614044; - gUnknown_0203CE54->unk828 = 2; + gBagMenu->unk820 = gUnknown_08614044; + gBagMenu->unk828 = 2; } } else { - switch (gUnknown_0203CE58.pocket) + switch (gBagPositionStruct.pocket) { case ITEMS_POCKET: - gUnknown_0203CE54->unk820 = &gUnknown_0203CE54->unk824; - gUnknown_0203CE54->unk828 = 4; - memcpy(&gUnknown_0203CE54->unk824, &gUnknown_0861402C, 4); + gBagMenu->unk820 = &gBagMenu->unk824; + gBagMenu->unk828 = 4; + memcpy(&gBagMenu->unk824, &gUnknown_0861402C, 4); if (ItemIsMail(gSpecialVar_ItemId) == TRUE) - gUnknown_0203CE54->unk824 = 6; + gBagMenu->unk824 = 6; break; case KEYITEMS_POCKET: - gUnknown_0203CE54->unk820 = &gUnknown_0203CE54->unk824; - gUnknown_0203CE54->unk828 = 4; - memcpy(&gUnknown_0203CE54->unk824, &gUnknown_08614030, 4); + gBagMenu->unk820 = &gBagMenu->unk824; + gBagMenu->unk828 = 4; + memcpy(&gBagMenu->unk824, &gUnknown_08614030, 4); if (gSaveBlock1Ptr->registeredItem == gSpecialVar_ItemId) - gUnknown_0203CE54->unk825 = 8; + gBagMenu->unk825 = 8; if (gSpecialVar_ItemId == ITEM_MACH_BIKE || gSpecialVar_ItemId == ITEM_ACRO_BIKE) { if (TestPlayerAvatarFlags(6)) - gUnknown_0203CE54->unk824 = 7; + gBagMenu->unk824 = 7; } break; case BALLS_POCKET: - gUnknown_0203CE54->unk820 = gUnknown_08614034; - gUnknown_0203CE54->unk828 = 4; + gBagMenu->unk820 = gUnknown_08614034; + gBagMenu->unk828 = 4; break; case TMHM_POCKET: - gUnknown_0203CE54->unk820 = gUnknown_08614038; - gUnknown_0203CE54->unk828 = 4; + gBagMenu->unk820 = gUnknown_08614038; + gBagMenu->unk828 = 4; break; case BERRIES_POCKET: - gUnknown_0203CE54->unk820 = gUnknown_0861403C; - gUnknown_0203CE54->unk828 = 6; + gBagMenu->unk820 = gUnknown_0861403C; + gBagMenu->unk828 = 6; break; } } } - if (gUnknown_0203CE58.pocket == TMHM_POCKET) + if (gBagPositionStruct.pocket == TMHM_POCKET) { ClearWindowTilemap(1); PrintTMHMMoveData(gSpecialVar_ItemId); @@ -1506,34 +1506,34 @@ void sub_81AC644(u8 unused) CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_Var1IsSelected); FillWindowPixelBuffer(1, PIXEL_FILL(0)); - bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0); - } - if (gUnknown_0203CE54->unk828 == 1) - sub_81ACAF8(bag_menu_add_window(0)); - else if (gUnknown_0203CE54->unk828 == 2) - sub_81ACAF8(bag_menu_add_window(1)); - else if (gUnknown_0203CE54->unk828 == 4) - sub_81ACB54(bag_menu_add_window(2), 2, 2); + BagMenu_Print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0); + } + if (gBagMenu->unk828 == 1) + sub_81ACAF8(BagMenu_AddWindow(0)); + else if (gBagMenu->unk828 == 2) + sub_81ACAF8(BagMenu_AddWindow(1)); + else if (gBagMenu->unk828 == 4) + sub_81ACB54(BagMenu_AddWindow(2), 2, 2); else - sub_81ACB54(bag_menu_add_window(3), 2, 3); + sub_81ACB54(BagMenu_AddWindow(3), 2, 3); } void sub_81ACAF8(u8 a) { - AddItemMenuActionTextPrinters(a, 7, 8, 1, 0, 16, gUnknown_0203CE54->unk828, gUnknown_08613FB4, gUnknown_0203CE54->unk820); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(a, gUnknown_0203CE54->unk828, 0); + AddItemMenuActionTextPrinters(a, 7, 8, 1, 0, 16, gBagMenu->unk828, sItemMenuActions, gBagMenu->unk820); + InitMenuInUpperLeftCornerPlaySoundWhenAPressed(a, gBagMenu->unk828, 0); } void sub_81ACB54(u8 a, u8 b, u8 c) { - sub_8198DBC(a, 7, 8, 1, 0x38, b, c, gUnknown_08613FB4, gUnknown_0203CE54->unk820); + sub_8198DBC(a, 7, 8, 1, 0x38, b, c, sItemMenuActions, gBagMenu->unk820); sub_8199944(a, 0x38, b, c, 0); } void unknown_item_menu_type(u8 taskId) { sub_81AC644(taskId); - if (gUnknown_0203CE54->unk828 <= 2) + if (gBagMenu->unk828 <= 2) gTasks[taskId].func = Task_HandleInBattleItemMenuInput; else gTasks[taskId].func = Task_HandleOutOfBattleItemMenuInput; @@ -1550,11 +1550,11 @@ void Task_HandleInBattleItemMenuInput(u8 taskId) break; case MENU_B_PRESSED: PlaySE(SE_SELECT); - gUnknown_08613FB4[4].func.void_u8(taskId); + sItemMenuActions[4].func.void_u8(taskId); break; default: PlaySE(SE_SELECT); - gUnknown_08613FB4[gUnknown_0203CE54->unk820[r4]].func.void_u8(taskId); + sItemMenuActions[gBagMenu->unk820[r4]].func.void_u8(taskId); break; } } @@ -1575,7 +1575,7 @@ void Task_HandleOutOfBattleItemMenuInput(u8 taskId) } else if (gMain.newKeys & DPAD_DOWN) { - if (cursorPos < (gUnknown_0203CE54->unk828 - 2) && sub_81ACDFC(cursorPos + 2)) + if (cursorPos < (gBagMenu->unk828 - 2) && sub_81ACDFC(cursorPos + 2)) { PlaySE(SE_SELECT); sub_8199134(0, 1); @@ -1600,12 +1600,12 @@ void Task_HandleOutOfBattleItemMenuInput(u8 taskId) else if (gMain.newKeys & A_BUTTON) { PlaySE(SE_SELECT); - gUnknown_08613FB4[gUnknown_0203CE54->unk820[cursorPos]].func.void_u8(taskId); + sItemMenuActions[gBagMenu->unk820[cursorPos]].func.void_u8(taskId); } else if (gMain.newKeys & B_BUTTON) { PlaySE(SE_SELECT); - gUnknown_08613FB4[4].func.void_u8(taskId); + sItemMenuActions[4].func.void_u8(taskId); } } } @@ -1614,41 +1614,41 @@ bool8 sub_81ACDFC(s8 a) { if (a < 0) return FALSE; - if (a > gUnknown_0203CE54->unk828) + if (a > gBagMenu->unk828) return FALSE; - if (gUnknown_0203CE54->unk820[a] == 14) + if (gBagMenu->unk820[a] == 14) return FALSE; return TRUE; } -void bag_menu_remove_some_window(void) +void BagMenu_RemoveSomeWindow(void) { - if (gUnknown_0203CE54->unk828 == 1) - bag_menu_remove_window(0); - else if (gUnknown_0203CE54->unk828 == 2) + if (gBagMenu->unk828 == 1) + BagMenu_RemoveWindow(0); + else if (gBagMenu->unk828 == 2) { - bag_menu_remove_window(1); + BagMenu_RemoveWindow(1); } - else if (gUnknown_0203CE54->unk828 == 4) + else if (gBagMenu->unk828 == 4) { - bag_menu_remove_window(2); + BagMenu_RemoveWindow(2); } else - bag_menu_remove_window(3); + BagMenu_RemoveWindow(3); } void ItemMenu_UseOutOfBattle(u8 taskId) { if (ItemId_GetFieldFunc(gSpecialVar_ItemId)) { - bag_menu_remove_some_window(); + BagMenu_RemoveSomeWindow(); if (CalculatePlayerPartyCount() == 0 && ItemId_GetType(gSpecialVar_ItemId) == 1) - bag_menu_print_there_is_no_pokemon(taskId); + BagMenu_PrintThereIsNoPokemon(taskId); else { FillWindowPixelBuffer(1, PIXEL_FILL(0)); schedule_bg_copy_tilemap_to_vram(0); - if (gUnknown_0203CE58.pocket != BERRIES_POCKET) + if (gBagPositionStruct.pocket != BERRIES_POCKET) ItemId_GetFieldFunc(gSpecialVar_ItemId)(taskId); else sub_80FDD10(taskId); @@ -1660,24 +1660,24 @@ void ItemMenu_Toss(u8 taskId) { s16* data = gTasks[taskId].data; - bag_menu_remove_some_window(); + BagMenu_RemoveSomeWindow(); data[8] = 1; if (data[2] == 1) { - BagMenuConfirmToss(taskId); + BagMenu_TossItems(taskId); } else { CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_TossHowManyVar1s); FillWindowPixelBuffer(1, PIXEL_FILL(0)); - bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0); + BagMenu_Print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0); sub_81ABC3C(7); gTasks[taskId].func = Task_ChooseHowManyToToss; } } -void BagMenuConfirmToss(u8 taskId) +void BagMenu_TossItems(u8 taskId) { s16* data = gTasks[taskId].data; @@ -1685,16 +1685,16 @@ void BagMenuConfirmToss(u8 taskId) ConvertIntToDecimalStringN(gStringVar2, data[8], 0, 3); StringExpandPlaceholders(gStringVar4, gText_ConfirmTossItems); FillWindowPixelBuffer(1, PIXEL_FILL(0)); - bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0); - bag_menu_yes_no(taskId, 5, &gUnknown_08614084); + BagMenu_Print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0); + BagMenu_YesNo(taskId, 5, &sYesNoTossFunctions); } -void BagMenuCancelToss(u8 taskId) +void BagMenu_CancelToss(u8 taskId) { s16* data = gTasks[taskId].data; - bag_menu_print_description_box_text(data[1]); - bag_menu_print_cursor_(data[0], 0); + BagMenu_PrintDescription(data[1]); + BagMenu_PrintCursor_(data[0], 0); set_callback3_to_bag(taskId); } @@ -1704,23 +1704,23 @@ void Task_ChooseHowManyToToss(u8 taskId) if (AdjustQuantityAccordingToDPadInput(&data[8], data[2]) == TRUE) { - sub_81ABC54(gUnknown_0203CE54->unk817, data[8]); + PrintItemDepositAmount(gBagMenu->unk817, data[8]); } else if (gMain.newKeys & A_BUTTON) { PlaySE(SE_SELECT); - bag_menu_remove_window(7); - BagMenuConfirmToss(taskId); + BagMenu_RemoveWindow(7); + BagMenu_TossItems(taskId); } else if (gMain.newKeys & B_BUTTON) { PlaySE(SE_SELECT); - bag_menu_remove_window(7); - BagMenuCancelToss(taskId); + BagMenu_RemoveWindow(7); + BagMenu_CancelToss(taskId); } } -void BagMenuActuallyToss(u8 taskId) +void BagMenu_ConfirmToss(u8 taskId) { s16* data = gTasks[taskId].data; @@ -1728,24 +1728,24 @@ void BagMenuActuallyToss(u8 taskId) ConvertIntToDecimalStringN(gStringVar2, data[8], 0, 3); StringExpandPlaceholders(gStringVar4, gText_ThrewAwayVar2Var1s); FillWindowPixelBuffer(1, PIXEL_FILL(0)); - bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0); + BagMenu_Print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0); gTasks[taskId].func = Task_ActuallyToss; } void Task_ActuallyToss(u8 taskId) { s16* data = gTasks[taskId].data; - u16* scrollPos = &gUnknown_0203CE58.scrollPosition[gUnknown_0203CE58.pocket]; - u16* cursorPos = &gUnknown_0203CE58.cursorPosition[gUnknown_0203CE58.pocket]; + u16* scrollPos = &gBagPositionStruct.scrollPosition[gBagPositionStruct.pocket]; + u16* cursorPos = &gBagPositionStruct.cursorPosition[gBagPositionStruct.pocket]; if (gMain.newKeys & (A_BUTTON | B_BUTTON)) { PlaySE(SE_SELECT); RemoveBagItem(gSpecialVar_ItemId, data[8]); DestroyListMenuTask(data[0], scrollPos, cursorPos); - sub_81AB9A8(gUnknown_0203CE58.pocket); - SetInitialScrollAndCursorPositions(gUnknown_0203CE58.pocket); - load_bag_item_list_buffers(gUnknown_0203CE58.pocket); + sub_81AB9A8(gBagPositionStruct.pocket); + SetInitialScrollAndCursorPositions(gBagPositionStruct.pocket); + LoadBagItemListBuffers(gBagPositionStruct.pocket); data[0] = ListMenuInit(&gMultiuseListMenuTemplate, *scrollPos, *cursorPos); schedule_bg_copy_tilemap_to_vram(0); set_callback3_to_bag(taskId); @@ -1755,15 +1755,15 @@ void Task_ActuallyToss(u8 taskId) void ItemMenu_Register(u8 taskId) { s16* data = gTasks[taskId].data; - u16* scrollPos = &gUnknown_0203CE58.scrollPosition[gUnknown_0203CE58.pocket]; - u16* cursorPos = &gUnknown_0203CE58.cursorPosition[gUnknown_0203CE58.pocket]; + u16* scrollPos = &gBagPositionStruct.scrollPosition[gBagPositionStruct.pocket]; + u16* cursorPos = &gBagPositionStruct.cursorPosition[gBagPositionStruct.pocket]; if (gSaveBlock1Ptr->registeredItem == gSpecialVar_ItemId) gSaveBlock1Ptr->registeredItem = 0; else gSaveBlock1Ptr->registeredItem = gSpecialVar_ItemId; DestroyListMenuTask(data[0], scrollPos, cursorPos); - load_bag_item_list_buffers(gUnknown_0203CE58.pocket); + LoadBagItemListBuffers(gBagPositionStruct.pocket); data[0] = ListMenuInit(&gMultiuseListMenuTemplate, *scrollPos, *cursorPos); schedule_bg_copy_tilemap_to_vram(0); ItemMenu_Cancel(taskId); @@ -1771,7 +1771,7 @@ void ItemMenu_Register(u8 taskId) void ItemMenu_Give(u8 taskId) { - bag_menu_remove_some_window(); + BagMenu_RemoveSomeWindow(); if (!itemid_80BF6D8_mail_related(gSpecialVar_ItemId)) { DisplayItemMessage(taskId, 1, gText_CantWriteMail, sub_81AD350); @@ -1779,25 +1779,25 @@ void ItemMenu_Give(u8 taskId) else if (!ItemId_GetImportance(gSpecialVar_ItemId)) { if (CalculatePlayerPartyCount() == 0) - bag_menu_print_there_is_no_pokemon(taskId); + BagMenu_PrintThereIsNoPokemon(taskId); else { - gUnknown_0203CE54->mainCallback2 = sub_81B7F60; + gBagMenu->mainCallback2 = sub_81B7F60; unknown_ItemMenu_Confirm(taskId); } } else { - bag_menu_print_cant_be_held_msg(taskId); + BagMenu_PrintItemCantBeHeld(taskId); } } -void bag_menu_print_there_is_no_pokemon(u8 taskId) +void BagMenu_PrintThereIsNoPokemon(u8 taskId) { DisplayItemMessage(taskId, 1, gText_NoPokemon, sub_81AD350); } -void bag_menu_print_cant_be_held_msg(u8 taskId) +void BagMenu_PrintItemCantBeHeld(u8 taskId) { CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_Var1CantBeHeld); @@ -1809,13 +1809,13 @@ void sub_81AD350(u8 taskId) if (gMain.newKeys & A_BUTTON) { PlaySE(SE_SELECT); - bag_menu_inits_lists_menu(taskId); + BagMenu_InitListsMenu(taskId); } } void ItemMenu_CheckTag(u8 taskId) { - gUnknown_0203CE54->mainCallback2 = DoBerryTagScreen; + gBagMenu->mainCallback2 = DoBerryTagScreen; unknown_ItemMenu_Confirm(taskId); } @@ -1823,11 +1823,11 @@ void ItemMenu_Cancel(u8 taskId) { s16* data = gTasks[taskId].data; - bag_menu_remove_some_window(); - bag_menu_print_description_box_text(data[1]); + BagMenu_RemoveSomeWindow(); + BagMenu_PrintDescription(data[1]); schedule_bg_copy_tilemap_to_vram(0); schedule_bg_copy_tilemap_to_vram(1); - bag_menu_print_cursor_(data[0], 0); + BagMenu_PrintCursor_(data[0], 0); set_callback3_to_bag(taskId); } @@ -1835,7 +1835,7 @@ void ItemMenu_UseInBattle(u8 taskId) { if (ItemId_GetBattleFunc(gSpecialVar_ItemId)) { - bag_menu_remove_some_window(); + BagMenu_RemoveSomeWindow(); ItemId_GetBattleFunc(gSpecialVar_ItemId)(taskId); } } @@ -1857,13 +1857,13 @@ void item_menu_type_2(u8 taskId) StringExpandPlaceholders(gStringVar4, gText_Var1CantBeHeldHere); DisplayItemMessage(taskId, 1, gStringVar4, sub_81AD350); } - else if (gUnknown_0203CE58.pocket != KEYITEMS_POCKET && !ItemId_GetImportance(gSpecialVar_ItemId)) + else if (gBagPositionStruct.pocket != KEYITEMS_POCKET && !ItemId_GetImportance(gSpecialVar_ItemId)) { unknown_ItemMenu_Confirm(taskId); } else { - bag_menu_print_cant_be_held_msg(taskId); + BagMenu_PrintItemCantBeHeld(taskId); } } @@ -1871,10 +1871,10 @@ void item_menu_type_b(u8 taskId) { if (ItemIsMail(gSpecialVar_ItemId) == TRUE) DisplayItemMessage(taskId, 1, gText_CantWriteMail, sub_81AD350); - else if (gUnknown_0203CE58.pocket != KEYITEMS_POCKET && !ItemId_GetImportance(gSpecialVar_ItemId)) + else if (gBagPositionStruct.pocket != KEYITEMS_POCKET && !ItemId_GetImportance(gSpecialVar_ItemId)) gTasks[taskId].func = unknown_ItemMenu_Confirm; else - bag_menu_print_cant_be_held_msg(taskId); + BagMenu_PrintItemCantBeHeld(taskId); } bool8 UseRegisteredKeyItemOnField(void) @@ -1905,7 +1905,7 @@ bool8 UseRegisteredKeyItemOnField(void) return TRUE; } -void display_sell_item_ask_str(u8 taskId) +void DisplaySellItemAskString(u8 taskId) { s16* data = gTasks[taskId].data; @@ -1913,7 +1913,7 @@ void display_sell_item_ask_str(u8 taskId) { CopyItemName(gSpecialVar_ItemId, gStringVar2); StringExpandPlaceholders(gStringVar4, gText_CantBuyKeyItem); - DisplayItemMessage(taskId, 1, gStringVar4, bag_menu_inits_lists_menu); + DisplayItemMessage(taskId, 1, gStringVar4, BagMenu_InitListsMenu); } else { @@ -1943,23 +1943,23 @@ void sub_81AD680(u8 taskId) void sub_81AD6E4(u8 taskId) { - bag_menu_yes_no(taskId, 6, &gUnknown_0861408C); + BagMenu_YesNo(taskId, 6, &sYesNoSellItemFunctions); } -void sub_81AD6FC(u8 taskId) +void BagMenu_CancelSell(u8 taskId) { s16* data = gTasks[taskId].data; bag_menu_remove_money_window(); bag_menu_RemoveBagItem_message_window(4); - bag_menu_print_cursor_(data[0], 0); + BagMenu_PrintCursor_(data[0], 0); set_callback3_to_bag(taskId); } void sub_81AD730(u8 taskId) { s16* data = gTasks[taskId].data; - u8 windowId = bag_menu_add_window(8); + u8 windowId = BagMenu_AddWindow(8); sub_81ABCC0(windowId, 1, (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * data[8]); bag_menu_AddMoney_window(); @@ -1972,26 +1972,26 @@ void sub_81AD794(u8 taskId) if (AdjustQuantityAccordingToDPadInput(&data[8], data[2]) == TRUE) { - sub_81ABCC0(gUnknown_0203CE54->unk818, data[8], (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * data[8]); + sub_81ABCC0(gBagMenu->unk818, data[8], (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * data[8]); } else if (gMain.newKeys & A_BUTTON) { PlaySE(SE_SELECT); - bag_menu_remove_window(8); + BagMenu_RemoveWindow(8); sub_81AD680(taskId); } else if (gMain.newKeys & B_BUTTON) { PlaySE(SE_SELECT); - bag_menu_print_cursor_(data[0], 0); + BagMenu_PrintCursor_(data[0], 0); bag_menu_remove_money_window(); - bag_menu_remove_window(8); + BagMenu_RemoveWindow(8); bag_menu_RemoveBagItem_message_window(4); set_callback3_to_bag(taskId); } } -void sub_81AD84C(u8 taskId) +void BagMenu_ConfirmSell(u8 taskId) { s16* data = gTasks[taskId].data; @@ -2004,19 +2004,19 @@ void sub_81AD84C(u8 taskId) void sub_81AD8C8(u8 taskId) { s16* data = gTasks[taskId].data; - u16* scrollPos = &gUnknown_0203CE58.scrollPosition[gUnknown_0203CE58.pocket]; - u16* cursorPos = &gUnknown_0203CE58.cursorPosition[gUnknown_0203CE58.pocket]; + u16* scrollPos = &gBagPositionStruct.scrollPosition[gBagPositionStruct.pocket]; + u16* cursorPos = &gBagPositionStruct.cursorPosition[gBagPositionStruct.pocket]; PlaySE(SE_REGI); RemoveBagItem(gSpecialVar_ItemId, data[8]); AddMoney(&gSaveBlock1Ptr->money, (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * data[8]); DestroyListMenuTask(data[0], scrollPos, cursorPos); - sub_81AB9A8(gUnknown_0203CE58.pocket); - SetInitialScrollAndCursorPositions(gUnknown_0203CE58.pocket); - load_bag_item_list_buffers(gUnknown_0203CE58.pocket); + sub_81AB9A8(gBagPositionStruct.pocket); + SetInitialScrollAndCursorPositions(gBagPositionStruct.pocket); + LoadBagItemListBuffers(gBagPositionStruct.pocket); data[0] = ListMenuInit(&gMultiuseListMenuTemplate, *scrollPos, *cursorPos); - bag_menu_print_cursor_(data[0], 2); - PrintMoneyAmountInMoneyBox(gUnknown_0203CE54->unk819, GetMoney(&gSaveBlock1Ptr->money), 0); + BagMenu_PrintCursor_(data[0], 2); + PrintMoneyAmountInMoneyBox(gBagMenu->unk819, GetMoney(&gSaveBlock1Ptr->money), 0); gTasks[taskId].func = sub_81AD9C0; } @@ -2026,11 +2026,11 @@ void sub_81AD9C0(u8 taskId) { PlaySE(SE_SELECT); bag_menu_remove_money_window(); - bag_menu_inits_lists_menu(taskId); + BagMenu_InitListsMenu(taskId); } } -void display_deposit_item_ask_str(u8 taskId) +void DisplayDepositItemAskString(u8 taskId) { s16* data = gTasks[taskId].data; @@ -2044,7 +2044,7 @@ void display_deposit_item_ask_str(u8 taskId) CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_DepositHowManyVar1); FillWindowPixelBuffer(1, PIXEL_FILL(0)); - bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0); + BagMenu_Print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0); sub_81ABC3C(7); gTasks[taskId].func = sub_81ADA7C; } @@ -2056,20 +2056,20 @@ void sub_81ADA7C(u8 taskId) if (AdjustQuantityAccordingToDPadInput(&data[8], data[2]) == TRUE) { - sub_81ABC54(gUnknown_0203CE54->unk817, data[8]); + PrintItemDepositAmount(gBagMenu->unk817, data[8]); } else if (gMain.newKeys & A_BUTTON) { PlaySE(SE_SELECT); - bag_menu_remove_window(7); + BagMenu_RemoveWindow(7); sub_81ADB14(taskId); } else if (gMain.newKeys & B_BUTTON) { PlaySE(SE_SELECT); - bag_menu_print_description_box_text(data[1]); - bag_menu_print_cursor_(data[0], 0); - bag_menu_remove_window(7); + BagMenu_PrintDescription(data[1]); + BagMenu_PrintCursor_(data[0], 0); + BagMenu_RemoveWindow(7); set_callback3_to_bag(taskId); } } @@ -2081,7 +2081,7 @@ void sub_81ADB14(u8 taskId) FillWindowPixelBuffer(1, PIXEL_FILL(0)); if (ItemId_GetImportance(gSpecialVar_ItemId)) { - bag_menu_print(1, 1, gText_CantStoreImportantItems, 3, 1, 0, 0, 0, 0); + BagMenu_Print(1, 1, gText_CantStoreImportantItems, 3, 1, 0, 0, 0, 0); gTasks[taskId].func = sub_81ADC0C; } else if (AddPCItem(gSpecialVar_ItemId, data[8]) == TRUE) @@ -2089,12 +2089,12 @@ void sub_81ADB14(u8 taskId) CopyItemName(gSpecialVar_ItemId, gStringVar1); ConvertIntToDecimalStringN(gStringVar2, data[8], 0, 3); StringExpandPlaceholders(gStringVar4, gText_DepositedVar2Var1s); - bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0); + BagMenu_Print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0); gTasks[taskId].func = Task_ActuallyToss; } else { - bag_menu_print(1, 1, gText_NoRoomForItems, 3, 1, 0, 0, 0, 0); + BagMenu_Print(1, 1, gText_NoRoomForItems, 3, 1, 0, 0, 0, 0); gTasks[taskId].func = sub_81ADC0C; } } @@ -2106,15 +2106,15 @@ void sub_81ADC0C(u8 taskId) if (gMain.newKeys & (A_BUTTON | B_BUTTON)) { PlaySE(SE_SELECT); - bag_menu_print_description_box_text(data[1]); - bag_menu_print_cursor_(data[0], 0); + BagMenu_PrintDescription(data[1]); + BagMenu_PrintCursor_(data[0], 0); set_callback3_to_bag(taskId); } } bool8 IsWallysBag(void) { - if (gUnknown_0203CE58.location == 10) + if (gBagPositionStruct.location == 10) return TRUE; return FALSE; } @@ -2126,11 +2126,11 @@ void PrepareBagForWallyTutorial(void) gUnknown_0203CE80 = AllocZeroed(sizeof(struct TempWallyStruct)); memcpy(gUnknown_0203CE80->bagPocket_Items, gSaveBlock1Ptr->bagPocket_Items, sizeof(gSaveBlock1Ptr->bagPocket_Items)); memcpy(gUnknown_0203CE80->bagPocket_PokeBalls, gSaveBlock1Ptr->bagPocket_PokeBalls, sizeof(gSaveBlock1Ptr->bagPocket_PokeBalls)); - gUnknown_0203CE80->pocket = gUnknown_0203CE58.pocket; + gUnknown_0203CE80->pocket = gBagPositionStruct.pocket; for (i = 0; i <= 4; i++) { - gUnknown_0203CE80->cursorPosition[i] = gUnknown_0203CE58.cursorPosition[i]; - gUnknown_0203CE80->scrollPosition[i] = gUnknown_0203CE58.scrollPosition[i]; + gUnknown_0203CE80->cursorPosition[i] = gBagPositionStruct.cursorPosition[i]; + gUnknown_0203CE80->scrollPosition[i] = gBagPositionStruct.scrollPosition[i]; } ClearItemSlots(gSaveBlock1Ptr->bagPocket_Items, 30); ClearItemSlots(gSaveBlock1Ptr->bagPocket_PokeBalls, 16); @@ -2143,11 +2143,11 @@ void RestoreBagAfterWallyTutorial(void) memcpy(gSaveBlock1Ptr->bagPocket_Items, gUnknown_0203CE80->bagPocket_Items, sizeof(gUnknown_0203CE80->bagPocket_Items)); memcpy(gSaveBlock1Ptr->bagPocket_PokeBalls, gUnknown_0203CE80->bagPocket_PokeBalls, sizeof(gUnknown_0203CE80->bagPocket_PokeBalls)); - gUnknown_0203CE58.pocket = gUnknown_0203CE80->pocket; + gBagPositionStruct.pocket = gUnknown_0203CE80->pocket; for (i = 0; i <= 4; i++) { - gUnknown_0203CE58.cursorPosition[i] = gUnknown_0203CE80->cursorPosition[i]; - gUnknown_0203CE58.scrollPosition[i] = gUnknown_0203CE80->scrollPosition[i]; + gBagPositionStruct.cursorPosition[i] = gUnknown_0203CE80->cursorPosition[i]; + gBagPositionStruct.scrollPosition[i] = gUnknown_0203CE80->scrollPosition[i]; } Free(gUnknown_0203CE80); } @@ -2175,14 +2175,14 @@ void Task_WallyTutorialBagMenu(u8 taskId) break; case 0xCC: PlaySE(SE_SELECT); - bag_menu_print_cursor_(data[0], 2); + BagMenu_PrintCursor_(data[0], 2); gSpecialVar_ItemId = ITEM_POKE_BALL; sub_81AC644(taskId); data[8]++; break; case 0x132: PlaySE(SE_SELECT); - bag_menu_remove_some_window(); + BagMenu_RemoveSomeWindow(); DestroyListMenuTask(data[0], 0, 0); RestoreBagAfterWallyTutorial(); unknown_ItemMenu_Confirm(taskId); @@ -2198,7 +2198,7 @@ void unknown_ItemMenu_Show(u8 taskId) { gSpecialVar_0x8005 = gSpecialVar_ItemId; gSpecialVar_Result = 1; - bag_menu_remove_some_window(); + BagMenu_RemoveSomeWindow(); unknown_ItemMenu_Confirm(taskId); } @@ -2212,7 +2212,7 @@ void unknown_ItemMenu_Give2(u8 taskId) { RemoveBagItem(gSpecialVar_ItemId, 1); gSpecialVar_Result = 1; - bag_menu_remove_some_window(); + BagMenu_RemoveSomeWindow(); unknown_ItemMenu_Confirm(taskId); } @@ -2225,7 +2225,7 @@ void bag_menu_leave_maybe_2(void) void unknown_ItemMenu_Confirm2(u8 taskId) { gSpecialVar_Result = 1; - bag_menu_remove_some_window(); + BagMenu_RemoveSomeWindow(); unknown_ItemMenu_Confirm(taskId); } @@ -2235,7 +2235,7 @@ void bag_menu_leave_maybe(void) SetMainCallback2(CB2_ReturnToField); } -void bag_menu_print_pocket_names(const u8 *pocketName1, const u8 *pocketName2) +void BagMenu_PrintPocketNames(const u8 *pocketName1, const u8 *pocketName2) { struct WindowTemplate window = {0, 0, 0, 0, 0, 0, 0}; u16 windowId; @@ -2246,24 +2246,24 @@ void bag_menu_print_pocket_names(const u8 *pocketName1, const u8 *pocketName2) windowId = AddWindow(&window); FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); offset = GetStringCenterAlignXOffset(1, pocketName1, 0x40); - bag_menu_print(windowId, 1, pocketName1, offset, 1, 0, 0, -1, 1); + BagMenu_Print(windowId, 1, pocketName1, offset, 1, 0, 0, -1, 1); if (pocketName2) { offset = GetStringCenterAlignXOffset(1, pocketName2, 0x40); - bag_menu_print(windowId, 1, pocketName2, offset + 0x40, 1, 0, 0, -1, 1); + BagMenu_Print(windowId, 1, pocketName2, offset + 0x40, 1, 0, 0, -1, 1); } - CpuCopy32((u8*)GetWindowAttribute(windowId, WINDOW_TILE_DATA), gUnknown_0203CE54->pocketNameBuffer, 0x400); + CpuCopy32((u8*)GetWindowAttribute(windowId, WINDOW_TILE_DATA), gBagMenu->pocketNameBuffer, 0x400); RemoveWindow(windowId); } -void bag_menu_copy_pocket_name_to_window(u32 a) +void BagMenu_CopyPocketNameToWindow(u32 a) { u8 (* r4)[32][32]; u8* windowAttribute; int b; if (a > 8) a = 8; - r4 = &gUnknown_0203CE54->pocketNameBuffer; + r4 = &gBagMenu->pocketNameBuffer; windowAttribute = (u8*)GetWindowAttribute(2, WINDOW_TILE_DATA); CpuCopy32(r4[0][a], windowAttribute, 0x100); b = a + 16; @@ -2271,7 +2271,7 @@ void bag_menu_copy_pocket_name_to_window(u32 a) CopyWindowToVram(2, 2); } -void setup_bag_menu_textboxes(void) +void SetupBagMenu_Textboxes(void) { u8 i; @@ -2290,19 +2290,19 @@ void setup_bag_menu_textboxes(void) schedule_bg_copy_tilemap_to_vram(1); } -void bag_menu_print(u8 windowId, u8 fontId, const u8 *str, u8 left, u8 top, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 h) +void BagMenu_Print(u8 windowId, u8 fontId, const u8 *str, u8 left, u8 top, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 h) { AddTextPrinterParameterized4(windowId, fontId, left, top, letterSpacing, lineSpacing, sFontColorTable[h], speed, str); } u8 sub_81AE124(u8 a) { - return gUnknown_0203CE54->windowPointers[a]; + return gBagMenu->windowPointers[a]; } -u8 bag_menu_add_window(u8 a) +u8 BagMenu_AddWindow(u8 a) { - u8 *ptr = &gUnknown_0203CE54->windowPointers[a]; + u8 *ptr = &gBagMenu->windowPointers[a]; if (*ptr == 0xFF) { *ptr = AddWindow(&gUnknown_086141AC[a]); @@ -2312,9 +2312,9 @@ u8 bag_menu_add_window(u8 a) return *ptr; } -void bag_menu_remove_window(u8 a) +void BagMenu_RemoveWindow(u8 a) { - u8 *ptr = &gUnknown_0203CE54->windowPointers[a]; + u8 *ptr = &gBagMenu->windowPointers[a]; if (*ptr != 0xFF) { ClearStdWindowAndFrameToTransparent(*ptr, 0); @@ -2327,7 +2327,7 @@ void bag_menu_remove_window(u8 a) u8 AddItemMessageWindow(u8 a) { - u8 *ptr = &gUnknown_0203CE54->windowPointers[a]; + u8 *ptr = &gBagMenu->windowPointers[a]; if (*ptr == 0xFF) *ptr = AddWindow(&gUnknown_086141AC[a]); return *ptr; @@ -2335,7 +2335,7 @@ u8 AddItemMessageWindow(u8 a) void bag_menu_RemoveBagItem_message_window(u8 a) { - u8 *ptr = &gUnknown_0203CE54->windowPointers[a]; + u8 *ptr = &gBagMenu->windowPointers[a]; if (*ptr != 0xFF) { ClearDialogWindowAndFrameToTransparent(*ptr, FALSE); @@ -2347,25 +2347,25 @@ void bag_menu_RemoveBagItem_message_window(u8 a) } } -void bag_menu_yes_no(u8 a, u8 b, const struct YesNoFuncTable *funcTable) +void BagMenu_YesNo(u8 a, u8 b, const struct YesNoFuncTable *funcTable) { CreateYesNoMenuWithCallbacks(a, &gUnknown_086141AC[b], 1, 0, 2, 1, 14, funcTable); } void bag_menu_AddMoney_window(void) { - u8 windowId = bag_menu_add_window(9); + u8 windowId = BagMenu_AddWindow(9); PrintMoneyAmountInMoneyBoxWithBorder(windowId, 1, 14, GetMoney(&gSaveBlock1Ptr->money)); AddMoneyLabelObject(19, 11); } void bag_menu_remove_money_window(void) { - bag_menu_remove_window(9); + BagMenu_RemoveWindow(9); RemoveMoneyLabelObject(); } -void bag_menu_prepare_tmhm_move_window(void) +void BagMenu_PrepareTMHMMoveWindow(void) { FillWindowPixelBuffer(3, PIXEL_FILL(0)); blit_move_info_icon(3, 19, 0, 0); @@ -2385,7 +2385,7 @@ void PrintTMHMMoveData(u16 itemId) if (itemId == ITEM_NONE) { for (i = 0; i < 4; i++) - bag_menu_print(4, 1, gText_ThreeDashes, 7, i * 12, 0, 0, -1, 4); + BagMenu_Print(4, 1, gText_ThreeDashes, 7, i * 12, 0, 0, -1, 4); CopyWindowToVram(4, 2); } else @@ -2401,7 +2401,7 @@ void PrintTMHMMoveData(u16 itemId) ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[moveId].power, 1, 3); text = gStringVar1; } - bag_menu_print(4, 1, text, 7, 12, 0, 0, -1, 4); + BagMenu_Print(4, 1, text, 7, 12, 0, 0, -1, 4); if (gBattleMoves[moveId].accuracy == 0) { text = gText_ThreeDashes; @@ -2411,9 +2411,9 @@ void PrintTMHMMoveData(u16 itemId) ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[moveId].accuracy, 1, 3); text = gStringVar1; } - bag_menu_print(4, 1, text, 7, 24, 0, 0, -1, 4); + BagMenu_Print(4, 1, text, 7, 24, 0, 0, -1, 4); ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[moveId].pp, 1, 3); - bag_menu_print(4, 1, gStringVar1, 7, 36, 0, 0, -1, 4); + BagMenu_Print(4, 1, gStringVar1, 7, 36, 0, 0, -1, 4); CopyWindowToVram(4, 2); } } diff --git a/src/item_menu_icons.c b/src/item_menu_icons.c index 83ed3abfe..780a50160 100644 --- a/src/item_menu_icons.c +++ b/src/item_menu_icons.c @@ -24,12 +24,12 @@ static void SpriteCB_SwitchPocketRotatingBallInit(struct Sprite *sprite); static void SpriteCB_SwitchPocketRotatingBallContinue(struct Sprite *sprite); // static const rom data -static const u16 gUnknown_0857F564[] = INCBIN_U16("graphics/interface/bag_spinner.gbapal"); -static const u8 gUnknown_0857F584[] = INCBIN_U8("graphics/interface/bag_spinner.4bpp"); -static const u8 gUnknown_0857F604[] = INCBIN_U8("graphics/unused/cherry.4bpp"); -static const u16 gUnknown_0857FA84[] = INCBIN_U16("graphics/unused/cherry.gbapal"); +static const u16 gRotatingBall_Pal[] = INCBIN_U16("graphics/interface/bag_spinner.gbapal"); +static const u8 gRotatingBall[] = INCBIN_U8("graphics/interface/bag_spinner.4bpp"); +static const u8 gCherryUnused[] = INCBIN_U8("graphics/unused/cherry.4bpp"); +static const u16 gCherryUnused_Pal[] = INCBIN_U16("graphics/unused/cherry.gbapal"); -static const struct OamData sOamData_857FAA4 = +static const struct OamData sBagOamData = { .y = 0, .affineMode = 1, @@ -46,59 +46,59 @@ static const struct OamData sOamData_857FAA4 = .affineParam = 0 }; -static const union AnimCmd sSpriteAnim_857FAAC[] = +static const union AnimCmd sSpriteAnim_Bag_Closed[] = { ANIMCMD_FRAME(0, 4), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_857FAB4[] = +static const union AnimCmd sSpriteAnim_Bag_Items[] = { ANIMCMD_FRAME(64, 4), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_857FABC[] = +static const union AnimCmd sSpriteAnim_Bag_KeyItems[] = { ANIMCMD_FRAME(128, 4), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_857FAC4[] = +static const union AnimCmd sSpriteAnim_Bag_Pokeballs[] = { ANIMCMD_FRAME(192, 4), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_857FACC[] = +static const union AnimCmd sSpriteAnim_Bag_TMsHMs[] = { ANIMCMD_FRAME(256, 4), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_857FAD4[] = +static const union AnimCmd sSpriteAnim_Bag_Berries[] = { ANIMCMD_FRAME(320, 4), ANIMCMD_END }; -static const union AnimCmd *const sSpriteAnimTable_857FADC[] = +static const union AnimCmd *const sBagSpriteAnimTable[] = { - sSpriteAnim_857FAAC, - sSpriteAnim_857FAB4, - sSpriteAnim_857FAC4, - sSpriteAnim_857FACC, - sSpriteAnim_857FAD4, - sSpriteAnim_857FABC + sSpriteAnim_Bag_Closed, + sSpriteAnim_Bag_Items, + sSpriteAnim_Bag_Pokeballs, + sSpriteAnim_Bag_TMsHMs, + sSpriteAnim_Bag_Berries, + sSpriteAnim_Bag_KeyItems }; -static const union AffineAnimCmd sSpriteAffineAnim_857FAF4[] = +static const union AffineAnimCmd sSpriteAffineAnim_BagNormal[] = { AFFINEANIMCMD_FRAME(256, 256, 0, 0), AFFINEANIMCMD_END }; -static const union AffineAnimCmd sSpriteAffineAnim_857FB04[] = +static const union AffineAnimCmd sSpriteAffineAnim_BagShake[] = { AFFINEANIMCMD_FRAME(0, 0, 254, 2), AFFINEANIMCMD_FRAME(0, 0, 2, 4), @@ -107,39 +107,39 @@ static const union AffineAnimCmd sSpriteAffineAnim_857FB04[] = AFFINEANIMCMD_END }; -static const union AffineAnimCmd *const sSpriteAffineAnimTable_857FB2C[] = +static const union AffineAnimCmd *const sBagAffineAnimCmds[] = { - sSpriteAffineAnim_857FAF4, - sSpriteAffineAnim_857FB04 + sSpriteAffineAnim_BagNormal, + sSpriteAffineAnim_BagShake }; -const struct CompressedSpriteSheet gUnknown_0857FB34 = +const struct CompressedSpriteSheet gBagMaleSpriteSheet = { - gBagMaleTiles, 0x3000, 100 + gBagMaleTiles, 0x3000, TAG_BAG_GFX }; -const struct CompressedSpriteSheet gUnknown_0857FB3C = +const struct CompressedSpriteSheet gBagFemaleSpriteSheet = { - gBagFemaleTiles, 0x3000, 100 + gBagFemaleTiles, 0x3000, TAG_BAG_GFX }; -const struct CompressedSpritePalette gUnknown_0857FB44 = +const struct CompressedSpritePalette gBagPaletteTable = { - gBagPalette, 100 + gBagPalette, TAG_BAG_GFX }; -static const struct SpriteTemplate gUnknown_0857FB4C = +static const struct SpriteTemplate gBagSpriteTemplate = { - .tileTag = 100, - .paletteTag = 100, - .oam = &sOamData_857FAA4, - .anims = sSpriteAnimTable_857FADC, + .tileTag = TAG_BAG_GFX, + .paletteTag = TAG_BAG_GFX, + .oam = &sBagOamData, + .anims = sBagSpriteAnimTable, .images = NULL, - .affineAnims = sSpriteAffineAnimTable_857FB2C, + .affineAnims = sBagAffineAnimCmds, .callback = SpriteCallbackDummy, }; -static const struct OamData sOamData_857FB64 = +static const struct OamData sRotatingBallOamData = { .y = 0, .affineMode = 0, @@ -156,61 +156,61 @@ static const struct OamData sOamData_857FB64 = .affineParam = 0 }; -static const union AnimCmd sSpriteAnim_857FB6C[] = +static const union AnimCmd sSpriteAffineAnim_RotatingBallStationary[] = { ANIMCMD_FRAME(0, 0), ANIMCMD_END }; -static const union AnimCmd *const sSpriteAnimTable_857FB74[] = +static const union AnimCmd *const sRotatingBallSpriteAnimTable[] = { - sSpriteAnim_857FB6C + sSpriteAffineAnim_RotatingBallStationary }; -static const union AffineAnimCmd sSpriteAffineAnim_857FB78[] = +static const union AffineAnimCmd sSpriteAffineAnim_RotatingBallRotation1[] = { AFFINEANIMCMD_FRAME(0, 0, 8, 16), AFFINEANIMCMD_END }; -static const union AffineAnimCmd sSpriteAffineAnim_857FB88[] = +static const union AffineAnimCmd sSpriteAffineAnim_RotatingBallRotation2[] = { AFFINEANIMCMD_FRAME(0, 0, 248, 16), AFFINEANIMCMD_END }; -static const union AffineAnimCmd *const sSpriteAffineAnimTable_857FB98[] = +static const union AffineAnimCmd *const sRotatingBallAnimCmds[] = { - sSpriteAffineAnim_857FB78, + sSpriteAffineAnim_RotatingBallRotation1, }; -static const union AffineAnimCmd *const sSpriteAffineAnimTable_857FB9C[] = +static const union AffineAnimCmd *const sRotatingBallAnimCmds_FullRotation[] = { - sSpriteAffineAnim_857FB88, + sSpriteAffineAnim_RotatingBallRotation2, }; -static const struct SpriteSheet gUnknown_0857FBA0 = +static const struct SpriteSheet gRotatingBallTable = { - gUnknown_0857F584, 0x80, 101 + gRotatingBall, 0x80, TAG_ROTATING_BALL_GFX }; -static const struct SpritePalette gUnknown_0857FBA8 = +static const struct SpritePalette gRotatingBallPaletteTable = { - gUnknown_0857F564, 101 + gRotatingBall_Pal, TAG_ROTATING_BALL_GFX }; -static const struct SpriteTemplate gSpriteTemplate_RotatingBall = +static const struct SpriteTemplate gRotatingBallSpriteTemplate = { - .tileTag = 101, - .paletteTag = 101, - .oam = &sOamData_857FB64, - .anims = sSpriteAnimTable_857FB74, + .tileTag = TAG_ROTATING_BALL_GFX, + .paletteTag = TAG_ROTATING_BALL_GFX, + .oam = &sRotatingBallOamData, + .anims = sRotatingBallSpriteAnimTable, .images = NULL, - .affineAnims = sSpriteAffineAnimTable_857FB98, + .affineAnims = sRotatingBallAnimCmds, .callback = SpriteCB_SwitchPocketRotatingBallInit, }; -static const struct OamData sOamData_857FBC8 = +static const struct OamData sBerryPicOamData = { .y = 0, .affineMode = 0, @@ -227,7 +227,7 @@ static const struct OamData sOamData_857FBC8 = .affineParam = 0 }; -static const struct OamData sOamData_857FBD0 = +static const struct OamData sBerryPicRotatingOamData = { .y = 0, .affineMode = 3, @@ -250,28 +250,28 @@ static const union AnimCmd sSpriteAnim_857FBD8[] = ANIMCMD_END }; -static const union AnimCmd *const sSpriteAnimTable_857FBE0[] = +static const union AnimCmd *const sBerryPicSpriteAnimTable[] = { sSpriteAnim_857FBD8 }; -static const struct SpriteFrameImage sSpriteImageTable_857FBE4[] = +static const struct SpriteFrameImage sBerryPicSpriteImageTable[] = { {&gDecompressionBuffer[0], 0x800}, }; -static const struct SpriteTemplate gUnknown_0857FBEC = +static const struct SpriteTemplate gBerryPicSpriteTemplate = { - .tileTag = 65535, - .paletteTag = 30020, - .oam = &sOamData_857FBC8, - .anims = sSpriteAnimTable_857FBE0, - .images = sSpriteImageTable_857FBE4, + .tileTag = TAG_BERRY_PIC_TILE, + .paletteTag = TAG_BERRY_PIC_PAL, + .oam = &sBerryPicOamData, + .anims = sBerryPicSpriteAnimTable, + .images = sBerryPicSpriteImageTable, .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy, }; -static const union AffineAnimCmd sSpriteAffineAnim_857FC04[] = +static const union AffineAnimCmd sSpriteAffineAnim_BerryPicRotation1[] = { AFFINEANIMCMD_FRAME(-1, -1, 253, 96), AFFINEANIMCMD_FRAME(0, 0, 0, 16), @@ -282,7 +282,7 @@ static const union AffineAnimCmd sSpriteAffineAnim_857FC04[] = AFFINEANIMCMD_JUMP(0) }; -static const union AffineAnimCmd sSpriteAffineAnim_857FC3C[] = +static const union AffineAnimCmd sSpriteAffineAnim_BerryPicRotation2[] = { AFFINEANIMCMD_FRAME(-1, -1, 3, 96), AFFINEANIMCMD_FRAME(0, 0, 0, 16), @@ -293,20 +293,20 @@ static const union AffineAnimCmd sSpriteAffineAnim_857FC3C[] = AFFINEANIMCMD_JUMP(0) }; -static const union AffineAnimCmd *const sSpriteAffineAnimTable_857FC74[] = +static const union AffineAnimCmd *const sBerryPicRotatingAnimCmds[] = { - sSpriteAffineAnim_857FC04, - sSpriteAffineAnim_857FC3C + sSpriteAffineAnim_BerryPicRotation1, + sSpriteAffineAnim_BerryPicRotation2 }; -static const struct SpriteTemplate gUnknown_0857FC7C = +static const struct SpriteTemplate gBerryPicRotatingSpriteTemplate = { - .tileTag = 0xFFFF, - .paletteTag = 0x7544, - .oam = &sOamData_857FBD0, - .anims = sSpriteAnimTable_857FBE0, - .images = sSpriteImageTable_857FBE4, - .affineAnims = sSpriteAffineAnimTable_857FC74, + .tileTag = TAG_BERRY_PIC_TILE, + .paletteTag = TAG_BERRY_PIC_PAL, + .oam = &sBerryPicRotatingOamData, + .anims = sBerryPicSpriteAnimTable, + .images = sBerryPicSpriteImageTable, + .affineAnims = sBerryPicRotatingAnimCmds, .callback = SpriteCallbackDummy, }; @@ -357,17 +357,17 @@ static const struct CompressedTilesPal gBerryPicTable[] = {gBerryPic_Enigma, gBerryPalette_Enigma}, }; -const struct CompressedSpriteSheet gUnknown_0857FDEC = +const struct CompressedSpriteSheet gBerryCheckCircleSpriteSheet = { - gBerryCheckCircle_Gfx, 0x800, 10000 + gBerryCheckCircle_Gfx, 0x800, TAG_BERRY_CHECK_CIRCLE_GFX }; -const struct CompressedSpritePalette gUnknown_0857FDF4 = +const struct CompressedSpritePalette gBerryCheckCirclePaletteTable = { - gUnknown_08D9BEF0, 10000 + gBerryCheck_Pal, TAG_BERRY_CHECK_CIRCLE_GFX }; -static const struct OamData sOamData_857FDFC = +static const struct OamData sBerryCheckCircleOamData = { .y = 0, .affineMode = 0, @@ -384,23 +384,23 @@ static const struct OamData sOamData_857FDFC = .affineParam = 0 }; -static const union AnimCmd sSpriteAnim_857FE04[] = +static const union AnimCmd sSpriteAnim_BerryCheckCircle[] = { ANIMCMD_FRAME(0, 0), ANIMCMD_END }; -static const union AnimCmd *const sSpriteAnimTable_857FE0C[] = +static const union AnimCmd *const sBerryCheckCircleSpriteAnimTable[] = { - sSpriteAnim_857FE04 + sSpriteAnim_BerryCheckCircle }; -static const struct SpriteTemplate gUnknown_0857FE10 = +static const struct SpriteTemplate gBerryCheckCircleSpriteTemplate = { - .tileTag = 10000, - .paletteTag = 10000, - .oam = &sOamData_857FDFC, - .anims = sSpriteAnimTable_857FE0C, + .tileTag = TAG_BERRY_CHECK_CIRCLE_GFX, + .paletteTag = TAG_BERRY_CHECK_CIRCLE_GFX, + .oam = &sBerryCheckCircleOamData, + .anims = sBerryCheckCircleSpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy, @@ -409,7 +409,7 @@ static const struct SpriteTemplate gUnknown_0857FE10 = // code void RemoveBagSprite(u8 id) { - u8 *spriteId = &gUnknown_0203CE54->spriteId[id]; + u8 *spriteId = &gBagMenu->spriteId[id]; if (*spriteId != 0xFF) { FreeSpriteTilesByTag(id + 100); @@ -422,14 +422,14 @@ void RemoveBagSprite(u8 id) void AddBagVisualSprite(u8 bagPocketId) { - u8 *spriteId = &gUnknown_0203CE54->spriteId[0]; - *spriteId = CreateSprite(&gUnknown_0857FB4C, 68, 66, 0); + u8 *spriteId = &gBagMenu->spriteId[0]; + *spriteId = CreateSprite(&gBagSpriteTemplate, 68, 66, 0); SetBagVisualPocketId(bagPocketId, FALSE); } void SetBagVisualPocketId(u8 bagPocketId, bool8 isSwitchingPockets) { - struct Sprite *sprite = &gSprites[gUnknown_0203CE54->spriteId[0]]; + struct Sprite *sprite = &gSprites[gBagMenu->spriteId[0]]; if (isSwitchingPockets) { sprite->pos2.y = -5; @@ -458,7 +458,7 @@ static void SpriteCB_BagVisualSwitchingPockets(struct Sprite *sprite) void ShakeBagVisual(void) { - struct Sprite *sprite = &gSprites[gUnknown_0203CE54->spriteId[0]]; + struct Sprite *sprite = &gSprites[gBagMenu->spriteId[0]]; if (sprite->affineAnimEnded) { StartSpriteAffineAnim(sprite, 1); @@ -477,14 +477,14 @@ static void SpriteCB_ShakeBagVisual(struct Sprite *sprite) void AddSwitchPocketRotatingBallSprite(s16 rotationDirection) { - u8 *spriteId = &gUnknown_0203CE54->spriteId[1]; - LoadSpriteSheet(&gUnknown_0857FBA0); - LoadSpritePalette(&gUnknown_0857FBA8); - *spriteId = CreateSprite(&gSpriteTemplate_RotatingBall, 16, 16, 0); + u8 *spriteId = &gBagMenu->spriteId[1]; + LoadSpriteSheet(&gRotatingBallTable); + LoadSpritePalette(&gRotatingBallPaletteTable); + *spriteId = CreateSprite(&gRotatingBallSpriteTemplate, 16, 16, 0); gSprites[*spriteId].data[0] = rotationDirection; } -static void update_switch_pocket_rotating_ball_coords(struct Sprite *sprite) +static void UpdateSwitchPocketRotatingBallCoords(struct Sprite *sprite) { sprite->centerToCornerVecX = sprite->data[1] - ((sprite->data[3] + 1) & 1); sprite->centerToCornerVecY = sprite->data[1] - ((sprite->data[3] + 1) & 1); @@ -494,28 +494,28 @@ static void SpriteCB_SwitchPocketRotatingBallInit(struct Sprite *sprite) { sprite->oam.affineMode = 1; if (sprite->data[0] == -1) - sprite->affineAnims = sSpriteAffineAnimTable_857FB98; + sprite->affineAnims = sRotatingBallAnimCmds; else - sprite->affineAnims = sSpriteAffineAnimTable_857FB9C; + sprite->affineAnims = sRotatingBallAnimCmds_FullRotation; InitSpriteAffineAnim(sprite); sprite->data[1] = sprite->centerToCornerVecX; sprite->data[1] = sprite->centerToCornerVecY; - update_switch_pocket_rotating_ball_coords(sprite); + UpdateSwitchPocketRotatingBallCoords(sprite); sprite->callback = SpriteCB_SwitchPocketRotatingBallContinue; } static void SpriteCB_SwitchPocketRotatingBallContinue(struct Sprite *sprite) { sprite->data[3]++; - update_switch_pocket_rotating_ball_coords(sprite); + UpdateSwitchPocketRotatingBallCoords(sprite); if (sprite->data[3] == 16) RemoveBagSprite(1); } void AddBagItemIconSprite(u16 itemId, u8 id) { - u8 *spriteId = &gUnknown_0203CE54->spriteId[id + 2]; + u8 *spriteId = &gBagMenu->spriteId[id + 2]; if (*spriteId == 0xFF) { u8 iconSpriteId; @@ -539,17 +539,17 @@ void RemoveBagItemIconSprite(u8 id) void sub_80D4FAC(void) { - sub_8122344(&gUnknown_0203CE54->spriteId[4], 8); + sub_8122344(&gBagMenu->spriteId[4], 8); } void sub_80D4FC8(u8 arg0) { - sub_81223FC(&gUnknown_0203CE54->spriteId[4], 8, arg0); + sub_81223FC(&gBagMenu->spriteId[4], 8, arg0); } void sub_80D4FEC(u8 arg0) { - sub_8122448(&gUnknown_0203CE54->spriteId[4], 136, 120, (arg0 + 1) * 16); + sub_8122448(&gBagMenu->spriteId[4], 136, 120, (arg0 + 1) * 16); } static void sub_80D5018(void *mem0, void *mem1) @@ -572,7 +572,7 @@ static void sub_80D5018(void *mem0, void *mem1) } } -static void sub_80D5070(u8 berryId) +static void LoadBerryGfx(u8 berryId) { struct CompressedSpritePalette pal; @@ -582,7 +582,7 @@ static void sub_80D5070(u8 berryId) } pal.data = gBerryPicTable[berryId].pal; - pal.tag = 0x7544; + pal.tag = TAG_BERRY_PIC_PAL; LoadCompressedSpritePalette(&pal); LZDecompressWram(gBerryPicTable[berryId].tiles, &gDecompressionBuffer[0x1000]); sub_80D5018(&gDecompressionBuffer[0x1000], &gDecompressionBuffer[0]); @@ -590,22 +590,22 @@ static void sub_80D5070(u8 berryId) u8 CreateBerryTagSprite(u8 id, s16 x, s16 y) { - sub_80D5070(id); - return CreateSprite(&gUnknown_0857FBEC, x, y, 0); + LoadBerryGfx(id); + return CreateSprite(&gBerryPicSpriteTemplate, x, y, 0); } void FreeBerryTagSpritePalette(void) { - FreeSpritePaletteByTag(0x7544); + FreeSpritePaletteByTag(TAG_BERRY_PIC_PAL); } -u8 sub_80D511C(u8 berryId, u8 x, u8 y, bool8 startAffine) +u8 LoadSpinningBerryPicGfx(u8 berryId, u8 x, u8 y, bool8 startAffine) { u8 spriteId; - FreeSpritePaletteByTag(0x7544); - sub_80D5070(berryId); - spriteId = CreateSprite(&gUnknown_0857FC7C, x, y, 0); + FreeSpritePaletteByTag(TAG_BERRY_PIC_PAL); + LoadBerryGfx(berryId); + spriteId = CreateSprite(&gBerryPicRotatingSpriteTemplate, x, y, 0); if (startAffine == TRUE) StartSpriteAffineAnim(&gSprites[spriteId], 1); @@ -614,5 +614,5 @@ u8 sub_80D511C(u8 berryId, u8 x, u8 y, bool8 startAffine) u8 CreateBerryFlavorCircleSprite(s16 x) { - return CreateSprite(&gUnknown_0857FE10, x, 116, 0); + return CreateSprite(&gBerryCheckCircleSpriteTemplate, x, 116, 0); } diff --git a/src/item_use.c b/src/item_use.c index 97aceb7ad..2f4374423 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -51,7 +51,7 @@ void SetUpItemUseCallback(u8 taskId); void MapPostLoadHook_UseItem(void); void sub_80AF6D4(void); void Task_CallItemUseOnFieldCallback(u8 taskId); -void bag_menu_inits_lists_menu(u8 taskId); +void BagMenu_InitListsMenu(u8 taskId); void ItemUseOnFieldCB_Bike(u8 taskId); void ItemUseOnFieldCB_Rod(u8 taskId); void ItemUseOnFieldCB_Itemfinder(u8 taskId); @@ -101,7 +101,7 @@ static const u8 gUnknown_085920E4[] = {DIR_NORTH, DIR_EAST, DIR_SOUTH, DIR_WEST} static const struct YesNoFuncTable gUnknown_085920E8 = { .yesFunc = sub_80FE03C, - .noFunc = bag_menu_inits_lists_menu, + .noFunc = BagMenu_InitListsMenu, }; // .text @@ -115,7 +115,7 @@ void SetUpItemUseCallback(u8 taskId) type = ItemId_GetType(gSpecialVar_ItemId) - 1; if (!InBattlePyramid()) { - gUnknown_0203CE54->mainCallback2 = gUnknown_085920D8[type]; + gBagMenu->mainCallback2 = gUnknown_085920D8[type]; unknown_ItemMenu_Confirm(taskId); } else @@ -154,7 +154,7 @@ void DisplayCannotUseItemMessage(u8 taskId, bool8 isUsingRegisteredKeyItemOnFiel if (!isUsingRegisteredKeyItemOnField) { if (!InBattlePyramid()) - DisplayItemMessage(taskId, 1, gStringVar4, bag_menu_inits_lists_menu); + DisplayItemMessage(taskId, 1, gStringVar4, BagMenu_InitListsMenu); else DisplayItemMessageInBattlePyramid(taskId, gText_DadsAdvice, sub_81C6714); } @@ -199,7 +199,7 @@ void sub_80FD254(void) void ItemUseOutOfBattle_Mail(u8 taskId) { - gUnknown_0203CE54->mainCallback2 = sub_80FD254; + gBagMenu->mainCallback2 = sub_80FD254; unknown_ItemMenu_Confirm(taskId); } @@ -595,7 +595,7 @@ void ItemUseOutOfBattle_PokeblockCase(u8 taskId) } else if (gTasks[taskId].data[3] != TRUE) { - gUnknown_0203CE54->mainCallback2 = sub_80FDBEC; + gBagMenu->mainCallback2 = sub_80FDBEC; unknown_ItemMenu_Confirm(taskId); } else @@ -628,7 +628,7 @@ void ItemUseOutOfBattle_CoinCase(u8 taskId) if (!gTasks[taskId].data[3]) { - DisplayItemMessage(taskId, 1, gStringVar4, bag_menu_inits_lists_menu); + DisplayItemMessage(taskId, 1, gStringVar4, BagMenu_InitListsMenu); } else { @@ -643,7 +643,7 @@ void ItemUseOutOfBattle_PowderJar(u8 taskId) if (!gTasks[taskId].data[3]) { - DisplayItemMessage(taskId, 1, gStringVar4, bag_menu_inits_lists_menu); + DisplayItemMessage(taskId, 1, gStringVar4, BagMenu_InitListsMenu); } else { @@ -657,7 +657,7 @@ void sub_80FDD10(u8 taskId) { gUnknown_0203A0F4 = sub_80FDD74; gFieldCallback = MapPostLoadHook_UseItem; - gUnknown_0203CE54->mainCallback2 = CB2_ReturnToField; + gBagMenu->mainCallback2 = CB2_ReturnToField; unknown_ItemMenu_Confirm(taskId); } else @@ -782,7 +782,7 @@ void task08_0809AD8C(u8 taskId) void sub_80FE024(u8 taskId) { - bag_menu_yes_no(taskId, 6, &gUnknown_085920E8); + BagMenu_YesNo(taskId, 6, &gUnknown_085920E8); } void sub_80FE03C(u8 taskId) @@ -813,7 +813,7 @@ void ItemUseOutOfBattle_Repel(u8 taskId) if (VarGet(VAR_REPEL_STEP_COUNT) == 0) gTasks[taskId].func = sub_80FE124; else if (!InBattlePyramid()) - DisplayItemMessage(taskId, 1, gText_RepelEffectsLingered, bag_menu_inits_lists_menu); + DisplayItemMessage(taskId, 1, gText_RepelEffectsLingered, BagMenu_InitListsMenu); else DisplayItemMessageInBattlePyramid(taskId, gText_RepelEffectsLingered, sub_81C6714); } @@ -837,7 +837,7 @@ void sub_80FE164(u8 taskId) VarSet(VAR_REPEL_STEP_COUNT, ItemId_GetHoldEffectParam(gSpecialVar_ItemId)); sub_80FE058(); if (!InBattlePyramid()) - DisplayItemMessage(taskId, 1, gStringVar4, bag_menu_inits_lists_menu); + DisplayItemMessage(taskId, 1, gStringVar4, BagMenu_InitListsMenu); else DisplayItemMessageInBattlePyramid(taskId, gStringVar4, sub_81C6714); } @@ -849,7 +849,7 @@ void sub_80FE1D0(u8 taskId) { PlaySE(SE_BIDORO); if (!InBattlePyramid()) - DisplayItemMessage(taskId, 1, gStringVar4, bag_menu_inits_lists_menu); + DisplayItemMessage(taskId, 1, gStringVar4, BagMenu_InitListsMenu); else DisplayItemMessageInBattlePyramid(taskId, gStringVar4, sub_81C6714); } @@ -928,7 +928,7 @@ void ItemUseInBattle_PokeBall(u8 taskId) } else if (!InBattlePyramid()) { - DisplayItemMessage(taskId, 1, gText_BoxFull, bag_menu_inits_lists_menu); + DisplayItemMessage(taskId, 1, gText_BoxFull, BagMenu_InitListsMenu); } else DisplayItemMessageInBattlePyramid(taskId, gText_BoxFull, sub_81C6714); @@ -965,7 +965,7 @@ void ItemUseInBattle_StatIncrease(u8 taskId) if (ExecuteTableBasedItemEffect(&gPlayerParty[partyId], gSpecialVar_ItemId, partyId, 0) != FALSE) { if (!InBattlePyramid()) - DisplayItemMessage(taskId, 1, gText_WontHaveEffect, bag_menu_inits_lists_menu); + DisplayItemMessage(taskId, 1, gText_WontHaveEffect, BagMenu_InitListsMenu); else DisplayItemMessageInBattlePyramid(taskId, gText_WontHaveEffect, sub_81C6714); } @@ -980,7 +980,7 @@ void sub_80FE54C(u8 taskId) { if (!InBattlePyramid()) { - gUnknown_0203CE54->mainCallback2 = sub_81B89F0; + gBagMenu->mainCallback2 = sub_81B89F0; unknown_ItemMenu_Confirm(taskId); } else diff --git a/src/librfu.c b/src/librfu.c new file mode 100644 index 000000000..cdf14b693 --- /dev/null +++ b/src/librfu.c @@ -0,0 +1,9 @@ +#include "global.h" +#include "librfu.h" + +struct RfuUnk1* gUnknown_03007870[4]; +struct RfuUnk2* gUnknown_03007880[4]; +struct RfuUnk5 *gUnknown_03007890; +u32 *gUnknown_03007894; +struct RfuUnk3* gUnknown_03007898; +u8 gUnknown_030078A0[12]; diff --git a/src/librfu_intr.c b/src/librfu_intr.c index bdf8b072a..c6db9a50c 100644 --- a/src/librfu_intr.c +++ b/src/librfu_intr.c @@ -1,4 +1,5 @@ #include "global.h" #include "main.h" +#include "librfu.h" //TODO: decompile asm/librfu_intr.s to here diff --git a/src/librfu_stwi.c b/src/librfu_stwi.c index 556b79bf8..670692118 100644 --- a/src/librfu_stwi.c +++ b/src/librfu_stwi.c @@ -1,6 +1,8 @@ #include "global.h" #include "librfu.h" +struct RfuStruct *gRfuState; + extern IntrFunc IntrSIO32(void); extern void STWI_stop_timer(void); diff --git a/src/link.c b/src/link.c index bcdcb52a4..9928b48da 100644 --- a/src/link.c +++ b/src/link.c @@ -52,22 +52,21 @@ struct LinkTestBGInfo // Static RAM declarations -IWRAM_DATA struct BlockTransfer sBlockSend; -IWRAM_DATA u32 link_c_unused_03000d1c; -IWRAM_DATA struct BlockTransfer sBlockRecv[MAX_LINK_PLAYERS]; -IWRAM_DATA u32 sBlockSendDelayCounter; -IWRAM_DATA u32 gUnknown_03000D54; -IWRAM_DATA u8 gUnknown_03000D58; -IWRAM_DATA u32 sPlayerDataExchangeStatus; -IWRAM_DATA u32 gUnknown_03000D60; -IWRAM_DATA u8 sLinkTestLastBlockSendPos; -ALIGNED() IWRAM_DATA u8 sLinkTestLastBlockRecvPos[MAX_LINK_PLAYERS]; -IWRAM_DATA u8 sNumVBlanksWithoutSerialIntr; -IWRAM_DATA bool8 sSendBufferEmpty; -IWRAM_DATA u16 sSendNonzeroCheck; -IWRAM_DATA u16 sRecvNonzeroCheck; -IWRAM_DATA u8 sChecksumAvailable; -IWRAM_DATA u8 sHandshakePlayerCount; +static struct BlockTransfer sBlockSend; +static struct BlockTransfer sBlockRecv[MAX_LINK_PLAYERS]; +static u32 sBlockSendDelayCounter; +static u32 gUnknown_03000D54; +static u8 gUnknown_03000D58; +static u32 sPlayerDataExchangeStatus; +static u32 gUnknown_03000D60; +static u8 sLinkTestLastBlockSendPos; +static u8 sLinkTestLastBlockRecvPos[MAX_LINK_PLAYERS]; +static u8 sNumVBlanksWithoutSerialIntr; +static bool8 sSendBufferEmpty; +static u16 sSendNonzeroCheck; +static u16 sRecvNonzeroCheck; +static u8 sChecksumAvailable; +static u8 sHandshakePlayerCount; u16 gLinkPartnersHeldKeys[6]; u32 gLinkDebugSeed; diff --git a/src/link_rfu.c b/src/link_rfu.c index 9732e9889..1f3ae4f3c 100644 --- a/src/link_rfu.c +++ b/src/link_rfu.c @@ -24,10 +24,10 @@ extern u16 gHeldKeyCodeToSend; struct UnkRfuStruct_1 gUnknown_03004140; struct UnkRfuStruct_2 gUnknown_03005000; -IWRAM_DATA u8 gUnknown_03000D74; -ALIGNED(4) IWRAM_DATA u8 gUnknown_03000D78[8]; -IWRAM_DATA u8 gUnknown_03000D80[16]; -IWRAM_DATA u16 gUnknown_03000D90[8]; +BSS_DATA u8 gUnknown_03000D74; +ALIGNED(4) BSS_DATA u8 gUnknown_03000D78[8]; +BSS_DATA u8 gUnknown_03000D80[16]; +BSS_DATA u16 gUnknown_03000D90[8]; EWRAM_DATA u8 gWirelessStatusIndicatorSpriteId = 0; EWRAM_DATA ALIGNED(4) struct UnkLinkRfuStruct_02022B14 gUnknown_02022B14 = {}; @@ -2021,6 +2021,8 @@ void sub_800DBF8(u8 *q1, u8 mode) } } +// File boundary here maybe? + void PkmnStrToASCII(u8 *q1, const u8 *q2) { s32 i; @@ -2413,7 +2415,7 @@ void RecordMixTrainerNames(void) } } } - + // Save the connected trainers first, at the top of the list. nextSpace = 0; for (i = 0; i < GetLinkPlayerCount(); i++) @@ -2444,7 +2446,7 @@ void RecordMixTrainerNames(void) } } } - + // Finalize the new list, and clean up. memcpy(gSaveBlock1Ptr->trainerNameRecords, newRecords, 20 * sizeof(struct TrainerNameRecord)); free(newRecords); @@ -2914,70 +2916,21 @@ void sub_800EF88(u8 a0) } } -#ifdef NONMATCHING -// FIXME: gUnknown_03005000.unk_c87 should be in r5 -// FIXME: gRecvCmds should be in r6 and r7 void sub_800EFB0(void) { s32 i, j; + for (i = 0; i < 5; i++) { + struct UnkRfuStruct_2 *ptr = &gUnknown_03005000; for (j = 0; j < 7; j++) { - gUnknown_03005000.unk_c87[i][j][1] = gRecvCmds[i][j] >> 8; - gUnknown_03005000.unk_c87[i][j][0] = gRecvCmds[i][j]; + ptr->unk_c87[i][j][1] = gRecvCmds[i][j] >> 8; + ptr->unk_c87[i][j][0] = gRecvCmds[i][j]; } } CpuFill16(0, gRecvCmds, sizeof gRecvCmds); } -#else -NAKED void sub_800EFB0(void) -{ - asm_unified("\tpush {r4-r7,lr}\n" - "\tsub sp, 0x4\n" - "\tmovs r2, 0\n" - "\tldr r7, =gRecvCmds\n" - "\tldr r0, =gUnknown_03005000\n" - "\tadds r6, r7, 0\n" - "\tldr r1, =0x00000c87\n" - "\tadds r5, r0, r1\n" - "_0800EFC0:\n" - "\tmovs r3, 0\n" - "\tlsls r0, r2, 3\n" - "\tlsls r1, r2, 4\n" - "\tadds r4, r2, 0x1\n" - "\tsubs r0, r2\n" - "\tlsls r0, 1\n" - "\tadds r2, r0, r5\n" - "\tadds r1, r6\n" - "_0800EFD0:\n" - "\tldrh r0, [r1]\n" - "\tlsrs r0, 8\n" - "\tstrb r0, [r2, 0x1]\n" - "\tldrh r0, [r1]\n" - "\tstrb r0, [r2]\n" - "\tadds r2, 0x2\n" - "\tadds r1, 0x2\n" - "\tadds r3, 0x1\n" - "\tcmp r3, 0x6\n" - "\tble _0800EFD0\n" - "\tadds r2, r4, 0\n" - "\tcmp r2, 0x4\n" - "\tble _0800EFC0\n" - "\tmovs r0, 0\n" - "\tmov r1, sp\n" - "\tstrh r0, [r1]\n" - "\tldr r2, =0x01000028\n" - "\tmov r0, sp\n" - "\tadds r1, r7, 0\n" - "\tbl CpuSet\n" - "\tadd sp, 0x4\n" - "\tpop {r4-r7}\n" - "\tpop {r0}\n" - "\tbx r0\n" - "\t.pool"); -} -#endif void sub_800F014(void) { @@ -3542,7 +3495,7 @@ void sub_800FD14(u16 command) } } -void sub_800FE50(u16 *a0) +void sub_800FE50(void *a0) { if (gSendCmd[0] == 0 && !sub_8011A80()) { @@ -5191,4 +5144,3 @@ u32 GetRfuRecvQueueLength(void) { return gUnknown_03005000.unk_124.unk_8c2; } - diff --git a/src/load_save.c b/src/load_save.c index 150c557c6..5857f2b46 100644 --- a/src/load_save.c +++ b/src/load_save.c @@ -42,10 +42,10 @@ EWRAM_DATA struct LoadedSaveData gLoadedSaveData = {0}; EWRAM_DATA u32 gLastEncryptionKey = 0; // IWRAM common -IWRAM_DATA bool32 gFlashMemoryPresent; -IWRAM_DATA struct SaveBlock1 *gSaveBlock1Ptr; -IWRAM_DATA struct SaveBlock2 *gSaveBlock2Ptr; -IWRAM_DATA struct PokemonStorage *gPokemonStoragePtr; +bool32 gFlashMemoryPresent; +struct SaveBlock1 *gSaveBlock1Ptr; +struct SaveBlock2 *gSaveBlock2Ptr; +struct PokemonStorage *gPokemonStoragePtr; // code void CheckForFlashMemory(void) @@ -1,3 +1,4 @@ +#include <string.h> #include "gba/m4a_internal.h" extern const u8 gCgb3Vol[]; diff --git a/src/main.c b/src/main.c index 40381bb68..06425e661 100644 --- a/src/main.c +++ b/src/main.c @@ -85,7 +85,27 @@ void EnableVCountIntrAtLine150(void); void AgbMain() { +#if MODERN + // Modern compilers are liberal with the stack on entry to this function, + // so RegisterRamReset may crash if it resets IWRAM. + RegisterRamReset(RESET_ALL & ~RESET_IWRAM); + asm("mov\tr1, #0xC0\n" + "\tlsl\tr1, r1, #0x12\n" + "\tmov r2, #0xFC\n" + "\tlsl r2, r2, #0x7\n" + "\tadd\tr2, r1, r2\n" + "\tmov\tr0, #0\n" + "\tmov\tr3, r0\n" + "\tmov\tr4, r0\n" + "\tmov\tr5, r0\n" + ".LCU0:\n" + "\tstmia r1!, {r0, r3, r4, r5}\n" + "\tcmp\tr1, r2\n" + "\tbcc\t.LCU0\n" + ); +#else RegisterRamReset(RESET_ALL); +#endif //MODERN *(vu16 *)BG_PLTT = 0x7FFF; InitGpuRegManager(); REG_WAITCNT = WAITCNT_PREFETCH_ENABLE | WAITCNT_WS0_S_1 | WAITCNT_WS0_N_3; diff --git a/src/main_menu.c b/src/main_menu.c index bc509c70d..6a0bd9e2d 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -176,7 +176,7 @@ static EWRAM_DATA u8 gUnknown_02022D04 = 0; static EWRAM_DATA u16 sCurrItemAndOptionMenuCheck = 0; -static IWRAM_DATA u8 sBirchSpeechMainTaskId; +static u8 sBirchSpeechMainTaskId; // Static ROM declarations diff --git a/src/match_call.c b/src/match_call.c index 6221affe1..b02af9977 100644 --- a/src/match_call.c +++ b/src/match_call.c @@ -2012,4 +2012,4 @@ void sub_8197184(u32 windowId, u32 destOffset, u32 paletteId) void sub_81971C4(u32 windowId, u32 tileOffset, u32 paletteId) { DrawMatchCallTextBoxBorder(windowId, tileOffset, paletteId); -}
\ No newline at end of file +} diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index 8bb9cb6e4..64f04f3bc 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -33,7 +33,7 @@ static void Task_BardSong(u8 taskId); static void StorytellerSetup(void); static void Storyteller_ResetFlag(void); -IWRAM_DATA u8 sSelectedStory; +static u8 sSelectedStory; struct BardSong gBardSong; diff --git a/src/menu_helpers.c b/src/menu_helpers.c index 801e2546b..cb0d621c6 100644 --- a/src/menu_helpers.c +++ b/src/menu_helpers.c @@ -27,7 +27,7 @@ EWRAM_DATA static struct YesNoFuncTable gUnknown_0203A138 = {0}; EWRAM_DATA static u8 gUnknown_0203A140 = 0; // IWRAM bss vars -IWRAM_DATA static TaskFunc gUnknown_0300117C; +static TaskFunc gUnknown_0300117C; // const rom data static const struct OamData sOamData_859F4E8 = diff --git a/src/menu_specialized.c b/src/menu_specialized.c index 34dd1fe2b..d33d53707 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -1290,7 +1290,7 @@ void sub_81D3094(void *tilesDst, void *palDst, u16 boxId, u16 monId, u16 arg5, u u32 personality = GetBoxOrPartyMonData(boxId, monId, MON_DATA_PERSONALITY, NULL); LoadSpecialPokePic(&gMonFrontPicTable[species], tilesDst, species, personality, TRUE); - LZ77UnCompWram(GetFrontSpritePalFromSpeciesAndPersonality(species, trainerId, personality), palDst); + LZ77UnCompWram(GetMonSpritePalFromSpeciesAndPersonality(species, trainerId, personality), palDst); } } diff --git a/src/mirage_tower.c b/src/mirage_tower.c index 898180df4..e398c2334 100644 --- a/src/mirage_tower.c +++ b/src/mirage_tower.c @@ -18,6 +18,7 @@ #include "constants/maps.h" #include "constants/rgb.h" #include "constants/songs.h" +#include "constants/metatile_labels.h" struct MirageTowerPulseBlend { u8 taskId; @@ -109,24 +110,24 @@ const struct SpriteSheet gMirageTowerCeilingCrumbleSpriteSheets[] = static const struct MetatileCoords sInvisibleMirageTowerMetatiles[] = { - {18, 53, 0x251}, - {19, 53, 0x251}, - {20, 53, 0x251}, - {18, 54, 0x251}, - {19, 54, 0x251}, - {20, 54, 0x251}, - {18, 55, 0x251}, - {19, 55, 0x251}, - {20, 55, 0x251}, - {18, 56, 0x251}, - {19, 56, 0x251}, - {20, 56, 0x251}, - {18, 57, 0x259}, - {19, 57, 0x259}, - {20, 57, 0x259}, - {18, 58, 0x121}, - {19, 58, 0x121}, - {20, 58, 0x121}, + {18, 53, METATILE_ID(Mauville, DeepSand_Center)}, + {19, 53, METATILE_ID(Mauville, DeepSand_Center)}, + {20, 53, METATILE_ID(Mauville, DeepSand_Center)}, + {18, 54, METATILE_ID(Mauville, DeepSand_Center)}, + {19, 54, METATILE_ID(Mauville, DeepSand_Center)}, + {20, 54, METATILE_ID(Mauville, DeepSand_Center)}, + {18, 55, METATILE_ID(Mauville, DeepSand_Center)}, + {19, 55, METATILE_ID(Mauville, DeepSand_Center)}, + {20, 55, METATILE_ID(Mauville, DeepSand_Center)}, + {18, 56, METATILE_ID(Mauville, DeepSand_Center)}, + {19, 56, METATILE_ID(Mauville, DeepSand_Center)}, + {20, 56, METATILE_ID(Mauville, DeepSand_Center)}, + {18, 57, METATILE_ID(Mauville, DeepSand_BottomMid)}, + {19, 57, METATILE_ID(Mauville, DeepSand_BottomMid)}, + {20, 57, METATILE_ID(Mauville, DeepSand_BottomMid)}, + {18, 58, METATILE_ID(General, SandPit_Center)}, + {19, 58, METATILE_ID(General, SandPit_Center)}, + {20, 58, METATILE_ID(General, SandPit_Center)}, }; static const union AnimCmd gSpriteAnim_8617DEC[] = @@ -257,7 +258,7 @@ EWRAM_DATA static struct Struct203CF10 *sUnknown_0203CF10 = NULL; EWRAM_DATA static struct BgRegOffsets *sBgShakeOffsets = NULL; EWRAM_DATA struct MirageTowerPulseBlend *sMirageTowerPulseBlend = NULL; -IWRAM_DATA static u16 gUnknown_030012A8[8]; +static u16 gUnknown_030012A8[8]; bool8 IsMirageTowerVisible(void) { diff --git a/src/multiboot.c b/src/multiboot.c index da90a55c0..c7e14392e 100644 --- a/src/multiboot.c +++ b/src/multiboot.c @@ -1,7 +1,7 @@ #include "gba/gba.h" #include "multiboot.h" -IWRAM_DATA static u16 MultiBoot_required_data[MULTIBOOT_NCHILD]; +static u16 MultiBoot_required_data[MULTIBOOT_NCHILD]; static int MultiBootSend(struct MultiBootParam *mp, u16 data); static int MultiBootHandShake(struct MultiBootParam *mp); @@ -435,7 +435,7 @@ static int MultiBootHandShake(struct MultiBootParam *mp) #undef must_data } -static void MultiBootWaitCycles(u32 cycles) +static NOINLINE void MultiBootWaitCycles(u32 cycles) { asm("mov r2, pc"); asm("lsr r2, #24"); diff --git a/src/overworld.c b/src/overworld.c index 4356752c1..2097abc53 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -186,15 +186,15 @@ static u8 GetAdjustedInitialDirection(struct InitialPlayerAvatarState *playerStr static u16 GetCenterScreenMetatileBehavior(void); // IWRAM bss vars -IWRAM_DATA static void *sUnusedOverworldCallback; -IWRAM_DATA static u8 sPlayerTradingStates[4]; +static void *sUnusedOverworldCallback; +static u8 sPlayerTradingStates[4]; // This callback is called with a player's key code. It then returns an // adjusted key code, effectively intercepting the input before anything // can process it. -IWRAM_DATA static u16 (*sPlayerKeyInterceptCallback)(u32); -IWRAM_DATA static bool8 sUnknown_03000E18; -IWRAM_DATA static u8 sRfuKeepAliveTimer; -IWRAM_DATA static u32 sUnusedVar; +static u16 (*sPlayerKeyInterceptCallback)(u32); +static bool8 sUnknown_03000E18; +static u8 sRfuKeepAliveTimer; +static u32 sUnusedVar; // IWRAM common u16 *gBGTilemapBuffers1; diff --git a/src/palette.c b/src/palette.c index 5d1d6635c..eb49ce4c6 100644 --- a/src/palette.c +++ b/src/palette.c @@ -54,8 +54,10 @@ static void UpdateBlendRegisters(void); static bool8 IsSoftwarePaletteFadeFinishing(void); static void sub_80A2D54(u8 taskId); -EWRAM_DATA u16 gPlttBufferUnfaded[PLTT_BUFFER_SIZE] = {0}; -EWRAM_DATA u16 gPlttBufferFaded[PLTT_BUFFER_SIZE] = {0}; +// palette buffers require alignment with agbcc because +// unaligned word reads are issued in BlendPalette otherwise +ALIGNED(4) EWRAM_DATA u16 gPlttBufferUnfaded[PLTT_BUFFER_SIZE] = {0}; +ALIGNED(4) EWRAM_DATA u16 gPlttBufferFaded[PLTT_BUFFER_SIZE] = {0}; EWRAM_DATA struct PaletteStruct sPaletteStructs[0x10] = {0}; EWRAM_DATA struct PaletteFadeControl gPaletteFade = {0}; static EWRAM_DATA u32 gFiller_2037FE0 = 0; diff --git a/src/party_menu.c b/src/party_menu.c index d13dc1e97..dd0a4dabd 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -97,18 +97,21 @@ struct Unk_Rodata1 struct Struct203CEC4 { - TaskFunc unk0; + TaskFunc task; MainCallback exitCallback; u32 unk8_0:1; u32 unk8_1:3; u32 unk8_2:7; u32 unk9_0:7; - u32 unkA_0:14; - u8 unkC[3]; - u8 unkF[8]; - u8 unk17; - u16 palBuffer[0xB0]; - u8 filler[0xA0]; + u32 messageId:14; + u8 windowId[3]; + u8 actions[8]; + u8 listSize; + // In vanilla Emerald, only the first 0xB0 hwords (0x160 bytes) are actually used. + // However, a full 0x100 hwords (0x200 bytes) are allocated. + // It is likely that the 0x160 value used below is a constant defined by + // bin2c, the utility used to encode the compressed palette data. + u16 palBuffer[BG_PLTT_SIZE / sizeof(u16)]; s16 data[16]; }; @@ -117,10 +120,10 @@ struct Struct203CEDC const struct Unk_Rodata1 *unk0; const u8 *unk4; u8 windowId; - u8 unk9; - u8 unkA; - u8 unkB; - u8 unkC; + u8 monSpriteId; + u8 itemSpriteId; + u8 pokeballSpriteId; + u8 statusSpriteId; }; // EWRAM vars @@ -162,7 +165,7 @@ static void FreePartyPointers(void); static void PartyPaletteBufferCopy(u8); static void sub_81B0CEC(u8); static void UpdateSelectedPartyBox(struct Struct203CEDC *, u8); -static void sub_81B2720(u8); +static void DrawEmptySlot(u8 windowId); static void DisplayPartyPokemonSelectForRelearner(u8); static void DisplayPartyPokemonSelectForContest(u8); static void DisplayPartyPokemonSelectForBattle(u8); @@ -244,7 +247,7 @@ static void sub_81B227C(u8); static bool8 CanLearnTutorMove(u16, u8); static u16 GetTutorMove(u8); static bool8 sub_81B314C(void); -static void sub_81B3414(struct Pokemon*, u8); +static void CreateActionList(struct Pokemon*, u8); static u8 sub_81B8A2C(struct Pokemon*); static u8 sub_81B856C(s8); static void sub_81B469C(u8); @@ -292,7 +295,7 @@ static void UpdatePartyMonIconFrame(struct Sprite*); static void UpdatePartyMonIconFrameAndBounce(struct Sprite*); static void sub_81B5CB0(u16, struct Struct203CEDC*); static void sub_81B5DF0(u8, u8); -static void sub_81B5E74(struct Sprite*); +static void SpriteCB_HeldItem(struct Sprite*); static void party_menu_get_status_condition_and_update_object(struct Pokemon*, struct Struct203CEDC*); static void party_menu_update_status_condition_object(u8, struct Struct203CEDC*); static u8 sub_81B8984(void); @@ -470,7 +473,7 @@ static const u8 gUnknown_08615704[][6][8] = static const u32 gUnknown_086157C4[] = INCBIN_U32("graphics/interface/unknown_6157C4.bin"); static const u32 gUnknown_086157E0[] = INCBIN_U32("graphics/interface/unknown_6157E0.bin"); -static const u8 gUnknown_086157FC[][3] = +static const u8 sFontColorTable[][3] = { {0, 3, 2}, {0, 1, 6}, @@ -921,11 +924,33 @@ static const struct WindowTemplate gUnknown_08615980 = .baseBlock = 0x39D, }; -static const u8 gUnknown_08615988[] = {24, 25, 25, 25, 25, 25, 25, 25, 25, 26, 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, 40, 59, 60, 58, 58, 58, 58, 58, 58, 61, 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, 46, 47, 47, 47, 47, 47, 47, 47, 47, 48}; -static const u8 gUnknown_086159CE[] = {24, 25, 25, 25, 25, 25, 25, 25, 25, 26, 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, 40, 41, 41, 41, 41, 41, 41, 41, 41, 42, 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, 46, 47, 47, 47, 47, 47, 47, 47, 47, 48}; -static const u8 gUnknown_08615A14[] = {43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, 49, 33, 33, 33, 33, 33, 33, 33, 33, 52, 53, 51, 51, 51, 51, 51, 51, 54, 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57}; -static const u8 gUnknown_08615A4A[] = {43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, 49, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 50, 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57}; -static const u8 gUnknown_08615A80[] = {21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 37, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 39}; +static const u8 sMainSlotTileNums[] = {24, 25, 25, 25, 25, 25, 25, 25, 25, 26, + 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, + 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, + 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, + 40, 59, 60, 58, 58, 58, 58, 58, 58, 61, + 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, + 46, 47, 47, 47, 47, 47, 47, 47, 47, 48}; + +static const u8 sMainSlotTileNums_Egg[] = {24, 25, 25, 25, 25, 25, 25, 25, 25, 26, + 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, + 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, + 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, + 40, 41, 41, 41, 41, 41, 41, 41, 41, 42, + 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, + 46, 47, 47, 47, 47, 47, 47, 47, 47, 48}; + +static const u8 sOtherSlotsTileNums[] = {43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, + 49, 33, 33, 33, 33, 33, 33, 33, 33, 52, 53, 51, 51, 51, 51, 51, 51, 54, + 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57}; + +static const u8 sOtherSlotsTileNums_Egg[] = {43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, + 49, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 50, + 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57}; + +static const u8 sEmptySlotTileNums[] = {21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, + 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, + 37, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 39}; static const u8 gUnknown_08615AB6[] = {11, 12}; static const u8 gUnknown_08615AB8[] = {9, 10}; static const u8 gUnknown_08615ABA[] = {4, 5, 6}; @@ -950,52 +975,52 @@ static const u8 gUnknown_08615AEB[] = {97, 103, 104}; static const u8 gUnknown_08615AEE[] = {161, 167, 168}; static const u8 gUnknown_08615AF1[] = {17, 27, 28}; -static const u8 *const gUnknown_08615AF4[] = -{ - gUnknown_085E9E43, - gUnknown_085EA010, - gUnknown_085EA02A, - gUnknown_085E9E55, - gUnknown_085E9E64, - gUnknown_085E9E79, - gUnknown_085E9E8F, - gUnknown_085E9EBC, - gUnknown_085E9ED4, - gUnknown_085E9EE9, - gUnknown_085E9FDB, - gUnknown_085EA046, - gUnknown_085EA05B, - gUnknown_085E9F01, - gUnknown_085E9F58, - gUnknown_085E9F6F, - gUnknown_085E9F81, - gUnknown_085E9F90, - gUnknown_085E9FA7, - gUnknown_085E9FC2, +static const u8 *const sActionStringTable[] = +{ + gText_ChoosePokemon, + gText_ChoosePokemonCancel, + gText_ChoosePokemonConfirm, + gText_MoveToWhere, + gText_TeachWhichPokemon, + gText_UseOnWhichPokemon, + gText_GiveToWhichPokemon, + gText_NothingToCut, + gText_CantSurfHere, + gText_AlreadySurfing, + gText_CurrentIsTooFast, + gText_EnjoyCycling, + gText_InUseAlready_PM, + gText_CantUseHere, + gText_NoPokemonForBattle, + gText_ChoosePokemon2, + gText_NotEnoughHp, + gText_PokemonAreNeeded, + gText_PokemonCantBeSame, + gText_NoIdenticalHoldItems, gText_EmptyString2, - gUnknown_085E9EA6, - gUnknown_085E9F16, - gUnknown_085E9F2A, - gUnknown_085E9F42, - gUnknown_085E9FF9, - gUnknown_085EA073, + gText_DoWhatWithPokemon, + gText_RestoreWhichMove, + gText_BoostPp, + gText_DoWhatWithItem, + gText_DoWhatWithMail, + gText_AlreadyHoldingOne, }; -static const u8 *const gUnknown_08615B60[] = -{ - gUnknown_085EA091, - gUnknown_085EA099, - gUnknown_085EA09E, - gUnknown_085EA0A4, - gUnknown_085EA0AB, - gUnknown_085EA0E7, - gUnknown_085EA0B1, - gUnknown_085EA0B6, - gUnknown_085EA0BF, - gUnknown_085EA0C5, - gUnknown_085EA0CF, - gUnknown_085EA0D7, - gUnknown_085EA0DC, +static const u8 *const sSelectionStringTable[] = +{ + gText_NoUse, + gText_Able, + gText_First_PM, + gText_Second_PM, + gText_Third_PM, + gText_Fourth, + gText_Able2, + gText_NotAble, + gText_Able3, + gText_NotAble2, + gText_Learned, + gText_Have, + gText_DontHave, }; // Unknown unused data. Feel free to remove. @@ -1093,21 +1118,21 @@ struct [MENU_FIELD_MOVES + FIELD_MOVE_SWEET_SCENT] = {gMoveNames[MOVE_SWEET_SCENT], CursorCb_FieldMove}, }; -static const u8 gUnknown_08615D10[] = {0, 1, 2}; -static const u8 gUnknown_08615D13[] = {10, 0, 2}; -static const u8 gUnknown_08615D16[] = {11, 0, 2}; -static const u8 gUnknown_08615D19[] = {0, 2}; -static const u8 gUnknown_08615D1B[] = {12, 0, 2}; -static const u8 gUnknown_08615D1E[] = {13, 0, 2}; -static const u8 gUnknown_08615D21[] = {14, 0, 2}; -static const u8 gUnknown_08615D24[] = {4, 5, 9}; -static const u8 gUnknown_08615D27[] = {8, 7, 9}; -static const u8 gUnknown_08615D2A[] = {15, 0, 2}; -static const u8 gUnknown_08615D2D[] = {16, 0, 2}; -static const u8 gUnknown_08615D30[] = {17, 0, 2}; -static const u8 gUnknown_08615D33[] = {5, 18, 2}; - -static const u8 *const gUnknown_08615D38[] = +static const u8 gUnknown_08615D10[] = {MENU_SUMMARY, MENU_SWITCH, MENU_CANCEL1}; +static const u8 gUnknown_08615D13[] = {MENU_SHIFT, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 gUnknown_08615D16[] = {MENU_SEND_OUT, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 gUnknown_08615D19[] = {MENU_SUMMARY, MENU_CANCEL1}; +static const u8 gUnknown_08615D1B[] = {MENU_ENTER, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 gUnknown_08615D1E[] = {MENU_NO_ENTRY, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 gUnknown_08615D21[] = {MENU_STORE, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 gUnknown_08615D24[] = {MENU_GIVE, MENU_TAKE_ITEM, MENU_CANCEL2}; +static const u8 gUnknown_08615D27[] = {MENU_READ, MENU_TAKE_MAIL, MENU_CANCEL2}; +static const u8 gUnknown_08615D2A[] = {MENU_REGISTER, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 gUnknown_08615D2D[] = {MENU_TRADE1, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 gUnknown_08615D30[] = {MENU_TRADE2, MENU_SUMMARY, MENU_CANCEL1}; +static const u8 gUnknown_08615D33[] = {MENU_TAKE_ITEM, MENU_TOSS, MENU_CANCEL1}; + +static const u8 *const sActionTable[] = { NULL, gUnknown_08615D10, @@ -1125,7 +1150,23 @@ static const u8 *const gUnknown_08615D38[] = gUnknown_08615D33, }; -static const u8 gUnknown_08615D70[] = {0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03}; +static const u8 sListSizeTable[] = +{ + 0x00, + ARRAY_COUNT(gUnknown_08615D10), + ARRAY_COUNT(gUnknown_08615D13), + ARRAY_COUNT(gUnknown_08615D16), + ARRAY_COUNT(gUnknown_08615D1B), + ARRAY_COUNT(gUnknown_08615D1E), + ARRAY_COUNT(gUnknown_08615D21), + ARRAY_COUNT(gUnknown_08615D19), + ARRAY_COUNT(gUnknown_08615D24), + ARRAY_COUNT(gUnknown_08615D27), + ARRAY_COUNT(gUnknown_08615D2A), + ARRAY_COUNT(gUnknown_08615D2D), + ARRAY_COUNT(gUnknown_08615D30), + ARRAY_COUNT(gUnknown_08615D33) +}; static const u16 sFieldMoves[] = { @@ -1168,10 +1209,10 @@ static const u8 *const gUnknown_08615E0C[] = gText_CantTradeWithTrainer, }; -static const u32 gUnknown_08615E30[] = INCBIN_U32("graphics/interface/hold_icons.4bpp"); -static const u16 gUnknown_08615E70[] = INCBIN_U16("graphics/interface/hold_icons.gbapal"); +static const u32 sHeldItemGfx[] = INCBIN_U32("graphics/interface/hold_icons.4bpp"); +static const u16 sHeldItemPalette[] = INCBIN_U16("graphics/interface/hold_icons.gbapal"); -static const struct OamData gOamData_83765EC = +static const struct OamData sOamData_HeldItem = { .y = 0, .affineMode = 0, @@ -1188,46 +1229,46 @@ static const struct OamData gOamData_83765EC = .affineParam = 0, }; -static const union AnimCmd gSpriteAnim_83765F4[] = +static const union AnimCmd sSpriteAnim_HeldItem[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END }; -static const union AnimCmd gSpriteAnim_83765FC[] = +static const union AnimCmd sSpriteAnim_HeldMail[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END }; -static const union AnimCmd *const gSpriteAnimTable_8376604[] = +static const union AnimCmd *const sSpriteAnimTable_HeldItem[] = { - gSpriteAnim_83765F4, - gSpriteAnim_83765FC, + sSpriteAnim_HeldItem, + sSpriteAnim_HeldMail, }; -static const struct SpriteSheet gUnknown_08615EB0 = +static const struct SpriteSheet sSpriteSheet_HeldItem = { - gUnknown_08615E30, sizeof(gUnknown_08615E30), 0xd750 + sHeldItemGfx, sizeof(sHeldItemGfx), 0xd750 }; -static const struct SpritePalette gUnknown_08615EB8 = +static const struct SpritePalette sSpritePalette_HeldItem = { - gUnknown_08615E70, 0xd750 + sHeldItemPalette, 0xd750 }; -static const struct SpriteTemplate gSpriteTemplate_8615EC0 = +static const struct SpriteTemplate sSpriteTemplate_HeldItem = { 0xd750, 0xd750, - &gOamData_83765EC, - gSpriteAnimTable_8376604, + &sOamData_HeldItem, + sSpriteAnimTable_HeldItem, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy }; -static const struct OamData sOamData_8615ED8 = +static const struct OamData sOamData_MenuPokeball = { .y = 0, .affineMode = 0, @@ -1244,40 +1285,40 @@ static const struct OamData sOamData_8615ED8 = .affineParam = 0 }; -static const union AnimCmd sSpriteAnim_8615EE0[] = +static const union AnimCmd sPokeballAnim_Closed[] = { ANIMCMD_FRAME(0, 0), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_8615EE8[] = +static const union AnimCmd sPokeballAnim_Open[] = { ANIMCMD_FRAME(16, 0), ANIMCMD_END }; -static const union AnimCmd *const sSpriteAnimTable_8615EF0[] = +static const union AnimCmd *const sSpriteAnimTable_Pokeball[] = { - sSpriteAnim_8615EE0, - sSpriteAnim_8615EE8 + sPokeballAnim_Closed, + sPokeballAnim_Open }; -static const struct CompressedSpriteSheet gUnknown_08615EF8 = +static const struct CompressedSpriteSheet sSpriteSheet_MenuPokeball = { gPartyMenuPokeball_Gfx, 0x400, 0x04b0 }; -static const struct CompressedSpritePalette gUnknown_08615F00 = +static const struct CompressedSpritePalette sSpritePalette_MenuPokeball = { gPartyMenuPokeball_Pal, 0x04b0 }; -static const struct SpriteTemplate gSpriteTemplate_8615F08 = +static const struct SpriteTemplate sSpriteTemplate_MenuPokeball = { .tileTag = 0x04b0, .paletteTag = 0x04b0, - .oam = &sOamData_8615ED8, - .anims = sSpriteAnimTable_8615EF0, + .oam = &sOamData_MenuPokeball, + .anims = sSpriteAnimTable_Pokeball, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy, @@ -1346,7 +1387,7 @@ static const union AnimCmd *const sSpriteAnimTable_8615F58[] = sSpriteAnim_8615F50 }; -static const struct CompressedSpriteSheet gUnknown_08615F70 = +static const struct CompressedSpriteSheet sSpriteSheet_MenuPokeballSmall = { gPartyMenuPokeballSmall_Gfx, 0x0300, 0x04b1 }; @@ -1362,7 +1403,7 @@ static const struct SpriteTemplate gSpriteTemplate_8615F78 = .callback = SpriteCallbackDummy, }; -static const struct OamData sOamData_8615F90 = +static const struct OamData sOamData_StatusCondition = { .y = 0, .affineMode = 0, @@ -1379,82 +1420,82 @@ static const struct OamData sOamData_8615F90 = .affineParam = 0 }; -static const union AnimCmd sSpriteAnim_8615F98[] = +static const union AnimCmd sSpriteAnim_StatusPoison[] = { ANIMCMD_FRAME(0, 0), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_8615FA0[] = +static const union AnimCmd sSpriteAnim_StatusParalyzed[] = { ANIMCMD_FRAME(4, 0), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_8615FA8[] = +static const union AnimCmd sSpriteAnim_StatusSleep[] = { ANIMCMD_FRAME(8, 0), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_8615FB0[] = +static const union AnimCmd sSpriteAnim_StatusFrozen[] = { ANIMCMD_FRAME(12, 0), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_8615FB8[] = +static const union AnimCmd sSpriteAnim_StatusBurn[] = { ANIMCMD_FRAME(16, 0), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_8615FC0[] = +static const union AnimCmd sSpriteAnim_StatusPokerus[] = { ANIMCMD_FRAME(20, 0), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_8615FC8[] = +static const union AnimCmd sSpriteAnim_StatusFaint[] = { ANIMCMD_FRAME(24, 0), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_8615FD0[] = +static const union AnimCmd sSpriteAnim_Blank[] = { ANIMCMD_FRAME(28, 0), ANIMCMD_END }; -static const union AnimCmd *const sSpriteAnimTable_8615FD8[] = +static const union AnimCmd *const sSpriteTemplate_StatusCondition[] = { - sSpriteAnim_8615F98, - sSpriteAnim_8615FA0, - sSpriteAnim_8615FA8, - sSpriteAnim_8615FB0, - sSpriteAnim_8615FB8, - sSpriteAnim_8615FC0, - sSpriteAnim_8615FC8, - sSpriteAnim_8615FD0 + sSpriteAnim_StatusPoison, + sSpriteAnim_StatusParalyzed, + sSpriteAnim_StatusSleep, + sSpriteAnim_StatusFrozen, + sSpriteAnim_StatusBurn, + sSpriteAnim_StatusPokerus, + sSpriteAnim_StatusFaint, + sSpriteAnim_Blank }; -static const struct CompressedSpriteSheet gUnknown_08615FF8 = +static const struct CompressedSpriteSheet sSpriteSheet_StatusIcons = { gStatusGfx_Icons, 0x400, 1202 }; -static const struct CompressedSpritePalette gUnknown_08616000 = +static const struct CompressedSpritePalette sSpritePalette_StatusIcons = { gStatusPal_Icons, 1202 }; -static const struct SpriteTemplate gSpriteTemplate_8616008 = +static const struct SpriteTemplate sSpriteTemplate_StatusIcons = { .tileTag = 1202, .paletteTag = 1202, - .oam = &sOamData_8615F90, - .anims = sSpriteAnimTable_8615FD8, + .oam = &sOamData_StatusCondition, + .anims = sSpriteTemplate_StatusCondition, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy, @@ -1536,7 +1577,7 @@ static const u16 gTMHMMoves[] = }; // code -static void InitPartyMenu(u8 a, u8 b, u8 c, u8 d, u8 e, TaskFunc task, MainCallback callback) +static void InitPartyMenu(u8 a, u8 b, u8 c, u8 d, u8 messageId, TaskFunc task, MainCallback callback) { u16 i; @@ -1551,12 +1592,12 @@ static void InitPartyMenu(u8 a, u8 b, u8 c, u8 d, u8 e, TaskFunc task, MainCallb gUnknown_0203CEC8.unk8_0 = a; gUnknown_0203CEC8.exitCallback = callback; gUnknown_0203CEC8.unkB = c; - gUnknown_0203CEC4->unkA_0 = e; - gUnknown_0203CEC4->unk0 = task; + gUnknown_0203CEC4->messageId = messageId; + gUnknown_0203CEC4->task = task; gUnknown_0203CEC4->exitCallback = NULL; gUnknown_0203CEC4->unk8_1 = 0; - gUnknown_0203CEC4->unk8_2 = 0xFF; - gUnknown_0203CEC4->unk9_0 = 0xFF; + gUnknown_0203CEC4->unk8_2 = 0x7F; + gUnknown_0203CEC4->unk9_0 = 0x7F; if (a == 4) gUnknown_0203CEC4->unk8_0 = TRUE; @@ -1568,13 +1609,13 @@ static void InitPartyMenu(u8 a, u8 b, u8 c, u8 d, u8 e, TaskFunc task, MainCallb for (i = 0; i <= 15; i++) gUnknown_0203CEC4->data[i] = 0; - for (i = 0; i < 3; i++) - gUnknown_0203CEC4->unkC[i] = 0xFF; + for (i = 0; i < ARRAY_COUNT(gUnknown_0203CEC4->windowId); i++) + gUnknown_0203CEC4->windowId[i] = 0xFF; if (d == 0) - gUnknown_0203CEC8.unk9 = 0; - else if (gUnknown_0203CEC8.unk9 > 5 || GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_SPECIES) == SPECIES_NONE) - gUnknown_0203CEC8.unk9 = 0; // wut why is this else if? + gUnknown_0203CEC8.slotId = 0; + else if (gUnknown_0203CEC8.slotId > 5 || GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_SPECIES) == SPECIES_NONE) + gUnknown_0203CEC8.slotId = 0; // wut why is this else if? gTextFlags.autoScroll = 0; CalculatePlayerPartyCount(); @@ -1710,8 +1751,8 @@ static bool8 PartyMenuSetup(void) gMain.state++; break; case 20: - CreateTask(gUnknown_0203CEC4->unk0, 0); - display_pokemon_menu_message(gUnknown_0203CEC4->unkA_0); + CreateTask(gUnknown_0203CEC4->task, 0); + display_pokemon_menu_message(gUnknown_0203CEC4->messageId); gMain.state++; break; case 21: @@ -1779,7 +1820,7 @@ static bool8 AllocPartyMenuBg(void) static bool8 AllocPartyMiscGfx(void) { - int sizeout; + u32 sizeout; switch (gUnknown_0203CEC4->data[0]) { @@ -1857,10 +1898,10 @@ static void PartyMenuInitHelperStructs(u8 a) gUnknown_0203CEDC[i].unk0 = &gUnknown_086156C4[1]; gUnknown_0203CEDC[i].unk4 = gUnknown_08615704[a][i]; gUnknown_0203CEDC[i].windowId = i; - gUnknown_0203CEDC[i].unk9 = 0xFF; - gUnknown_0203CEDC[i].unkA = 0xFF; - gUnknown_0203CEDC[i].unkB = 0xFF; - gUnknown_0203CEDC[i].unkC = 0xFF; + gUnknown_0203CEDC[i].monSpriteId = 0xFF; + gUnknown_0203CEDC[i].itemSpriteId = 0xFF; + gUnknown_0203CEDC[i].pokeballSpriteId = 0xFF; + gUnknown_0203CEDC[i].statusSpriteId = 0xFF; } gUnknown_0203CEDC[0].unk0 = &gUnknown_086156C4[0]; if (a == 3) @@ -1886,7 +1927,7 @@ static void RenderPartyMenuBox(u8 slot) { if (GetMonData(&gPlayerParty[slot], MON_DATA_SPECIES) == SPECIES_NONE) { - sub_81B2720(gUnknown_0203CEDC[slot].windowId); + DrawEmptySlot(gUnknown_0203CEDC[slot].windowId); UpdateSelectedPartyBox(&gUnknown_0203CEDC[slot], 0x40); CopyWindowToVram(gUnknown_0203CEDC[slot].windowId, 2); } @@ -1907,7 +1948,7 @@ static void RenderPartyMenuBox(u8 slot) if (gUnknown_0203CEC8.unk8_0 == 5) sub_81B0FCC(slot, 0); - else if (gUnknown_0203CEC8.unk9 == slot) + else if (gUnknown_0203CEC8.slotId == slot) sub_81B0FCC(slot, 1); else sub_81B0FCC(slot, 0); @@ -2071,7 +2112,7 @@ static void sub_81B0CEC(u8 slot) if (gUnknown_02022FF8[actualSlot].species == SPECIES_NONE) { - sub_81B2720(structPtr->windowId); + DrawEmptySlot(structPtr->windowId); } else { @@ -2159,7 +2200,7 @@ static void sub_81B0F28(void) { gUnknown_0203CEC4->unk9_0 = sub_81B5F34(0xC6, 0x94); } - sub_81B0FCC(gUnknown_0203CEC8.unk9, 1); + sub_81B0FCC(gUnknown_0203CEC8.slotId, 1); } } @@ -2173,8 +2214,8 @@ void sub_81B0FCC(u8 slot, u8 b) if (GetMonData(&gPlayerParty[slot], MON_DATA_SPECIES) != SPECIES_NONE) { UpdateSelectedPartyBox(&gUnknown_0203CEDC[slot], GetPartyBoxPalBitfield(slot, b)); - AnimateSelectedPartyIcon(gUnknown_0203CEDC[slot].unk9, b); - sub_81B5F98(gUnknown_0203CEDC[slot].unkB, b); + AnimateSelectedPartyIcon(gUnknown_0203CEDC[slot].monSpriteId, b); + sub_81B5F98(gUnknown_0203CEDC[slot].pokeballSpriteId, b); } return; case 6: @@ -2221,10 +2262,10 @@ static u8 GetPartyBoxPalBitfield(u8 slot, u8 b) returnVar |= 16; if (gUnknown_0203CEC8.unkB == 8) { - if (slot == gUnknown_0203CEC8.unk9 || slot == gUnknown_0203CEC8.unkA) + if (slot == gUnknown_0203CEC8.slotId || slot == gUnknown_0203CEC8.unkA) returnVar |= 4; } - if (gUnknown_0203CEC8.unkB == 10 && slot == gUnknown_0203CEC8.unk9 ) + if (gUnknown_0203CEC8.unkB == 10 && slot == gUnknown_0203CEC8.slotId ) returnVar |= 32; return returnVar; @@ -2293,7 +2334,7 @@ static void c3_0811FAB4(u8 taskId) u8 GetCursorSelectionMonId(void) { - return gUnknown_0203CEC8.unk9; + return gUnknown_0203CEC8.slotId; } u8 sub_81B1360(void) @@ -2331,7 +2372,7 @@ static s8* sub_81B13EC(void) if (gUnknown_0203CEC8.unkB == 8 || gUnknown_0203CEC8.unkB == 10) return &gUnknown_0203CEC8.unkA; else - return &gUnknown_0203CEC8.unk9; + return &gUnknown_0203CEC8.slotId; } static void sub_81B140C(u8 taskId, s8 *ptr) @@ -2347,7 +2388,7 @@ static void sub_81B140C(u8 taskId, s8 *ptr) case 7: if (sub_81B15A4((u8*)ptr)) { - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); sub_81615A8(taskId); } break; @@ -2357,7 +2398,7 @@ static void sub_81B140C(u8 taskId, s8 *ptr) if (gUnknown_0203CEC8.unk8_0 == 1) gUnknown_0203CEC4->exitCallback = sub_81B9140; - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); gUnknown_03006328(taskId, sub_81B6794); } break; @@ -2365,7 +2406,7 @@ static void sub_81B140C(u8 taskId, s8 *ptr) if (sub_81B15A4((u8*)ptr)) { PlaySE(SE_SELECT); - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); sub_81B7E4C(taskId); } break; @@ -2373,7 +2414,7 @@ static void sub_81B140C(u8 taskId, s8 *ptr) if (sub_81B15A4((u8*)ptr)) { PlaySE(SE_SELECT); - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); sub_81B8474(taskId); } break; @@ -2382,7 +2423,7 @@ static void sub_81B140C(u8 taskId, s8 *ptr) if (sub_81B15A4((u8*)ptr)) { PlaySE(SE_SELECT); - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); sub_81B7FAC(taskId); } break; @@ -2462,7 +2503,7 @@ static bool8 sub_81B1660(u8 taskId) if (stringPtr == NULL) return FALSE; - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); StringExpandPlaceholders(gStringVar4, stringPtr); sub_81B1B5C(gStringVar4, 1); gTasks[taskId].func = sub_81B16D4; @@ -2484,7 +2525,7 @@ static void sub_81B1708(u8 taskId) { case 0: gUnknown_0203CEE8 = 0; - gUnknown_0203CEC8.unk9 = 7; + gUnknown_0203CEC8.slotId = 7; sub_81B8558(); sub_81B12C0(taskId); break; @@ -3132,7 +3173,7 @@ static void sub_81B2428(bool8 a) firstWindowId = AddWindow(&gUnknown_08615918); FillWindowPixelBuffer(firstWindowId, PIXEL_FILL(0)); mainOffset = GetStringCenterAlignXOffset(0, gMenuText_Confirm, 48); - AddTextPrinterParameterized4(firstWindowId, 0, mainOffset, 1, 0, 0, gUnknown_086157FC[0], -1, gMenuText_Confirm); + AddTextPrinterParameterized4(firstWindowId, 0, mainOffset, 1, 0, 0, sFontColorTable[0], -1, gMenuText_Confirm); PutWindowTilemap(firstWindowId); CopyWindowToVram(firstWindowId, 2); windowId = AddWindow(&gUnknown_08615910); @@ -3147,12 +3188,12 @@ static void sub_81B2428(bool8 a) if (gUnknown_0203CEC8.unk8_0 != 10) { mainOffset = GetStringCenterAlignXOffset(0, gText_Cancel, 48); - AddTextPrinterParameterized3(windowId, 0, mainOffset + offset, 1, gUnknown_086157FC[0], -1, gText_Cancel); + AddTextPrinterParameterized3(windowId, 0, mainOffset + offset, 1, sFontColorTable[0], -1, gText_Cancel); } else { mainOffset = GetStringCenterAlignXOffset(0, gText_Cancel2, 48); - AddTextPrinterParameterized3(windowId, 0, mainOffset + offset, 1, gUnknown_086157FC[0], -1, gText_Cancel2); + AddTextPrinterParameterized3(windowId, 0, mainOffset + offset, 1, sFontColorTable[0], -1, gText_Cancel2); } PutWindowTilemap(windowId); CopyWindowToVram(windowId, 2); @@ -3182,35 +3223,35 @@ static void BlitBitmapToPartyWindow(u8 windowId, const u8 *b, u8 c, u8 x, u8 y, } } -static void BlitBitmapToPartyWindow_Default1(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 f) +static void BlitBitmapToPartyWindow_Default1(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 isEgg) { if (width == 0 && height == 0) { width = 10; height = 7; } - if (f == 0) - BlitBitmapToPartyWindow(windowId, gUnknown_08615988, 10, x, y, width, height); + if (isEgg == FALSE) + BlitBitmapToPartyWindow(windowId, sMainSlotTileNums, 10, x, y, width, height); else - BlitBitmapToPartyWindow(windowId, gUnknown_086159CE, 10, x, y, width, height); + BlitBitmapToPartyWindow(windowId, sMainSlotTileNums_Egg, 10, x, y, width, height); } -static void BlitBitmapToPartyWindow_Default2(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 f) +static void BlitBitmapToPartyWindow_Default2(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 isEgg) { if (width == 0 && height == 0) { width = 18; height = 3; } - if (f == 0) - BlitBitmapToPartyWindow(windowId, gUnknown_08615A14, 18, x, y, width, height); + if (isEgg == FALSE) + BlitBitmapToPartyWindow(windowId, sOtherSlotsTileNums, 18, x, y, width, height); else - BlitBitmapToPartyWindow(windowId, gUnknown_08615A4A, 18, x, y, width, height); + BlitBitmapToPartyWindow(windowId, sOtherSlotsTileNums_Egg, 18, x, y, width, height); } -static void sub_81B2720(u8 windowId) +static void DrawEmptySlot(u8 windowId) { - BlitBitmapToPartyWindow(windowId, gUnknown_08615A80, 18, 0, 0, 18, 3); + BlitBitmapToPartyWindow(windowId, sEmptySlotTileNums, 18, 0, 0, 18, 3); } static void UpdateSelectedPartyBox(struct Struct203CEDC *ptr, u8 bitfield) @@ -3338,7 +3379,7 @@ static void UpdateSelectedPartyBox(struct Struct203CEDC *ptr, u8 bitfield) static void DisplayPartyPokemonBarDetail(u8 windowId, const u8 *str, u8 color, const u8 *align) { - AddTextPrinterParameterized3(windowId, 0, align[0], align[1], gUnknown_086157FC[color], 0, str); + AddTextPrinterParameterized3(windowId, 0, align[0], align[1], sFontColorTable[color], 0, str); } static void DisplayPartyPokemonNickname(struct Pokemon *mon, struct Struct203CEDC *ptr, u8 c) @@ -3499,7 +3540,7 @@ static void DisplayPartyPokemonOtherText(u8 stringID, struct Struct203CEDC *ptr, ptr->unk0->unk0(ptr->windowId, ptr->unk0->unk1C >> 3, ptr->unk0->unk1D >> 3, unk, unk2, 1); } if (c != 2) - AddTextPrinterParameterized3(ptr->windowId, 1, ptr->unk0->unk1C, ptr->unk0->unk1D, gUnknown_086157FC[0], 0, gUnknown_08615B60[stringID]); + AddTextPrinterParameterized3(ptr->windowId, 1, ptr->unk0->unk1C, ptr->unk0->unk1D, sFontColorTable[0], 0, sSelectionStringTable[stringID]); } static void sub_81B302C(u8 *ptr) @@ -3515,7 +3556,7 @@ static void sub_81B302C(u8 *ptr) void display_pokemon_menu_message(u32 stringID) { - u8 *windowPtr = &gUnknown_0203CEC4->unkC[1]; + u8 *windowPtr = &gUnknown_0203CEC4->windowId[1]; if (*windowPtr != 0xFF) sub_81B302C(windowPtr); @@ -3552,7 +3593,7 @@ void display_pokemon_menu_message(u32 stringID) stringID = 1; } DrawStdFrameWithCustomTileAndPalette(*windowPtr, FALSE, 0x4F, 0xD); - StringExpandPlaceholders(gStringVar4, gUnknown_08615AF4[stringID]); + StringExpandPlaceholders(gStringVar4, sActionStringTable[stringID]); AddTextPrinterParameterized(*windowPtr, 1, gStringVar4, 0, 1, 0, 0); schedule_bg_copy_tilemap_to_vram(2); } @@ -3587,7 +3628,7 @@ static u8 sub_81B31B0(u8 a) switch (a) { case 0: - SetWindowTemplateFields(&window, 2, 19, 19 - (gUnknown_0203CEC4->unk17 * 2), 10, gUnknown_0203CEC4->unk17 * 2, 14, 0x2E9); + SetWindowTemplateFields(&window, 2, 19, 19 - (gUnknown_0203CEC4->listSize * 2), 10, gUnknown_0203CEC4->listSize * 2, 14, 0x2E9); break; case 1: window = gUnknown_08615950; @@ -3600,23 +3641,23 @@ static u8 sub_81B31B0(u8 a) break; } - gUnknown_0203CEC4->unkC[0] = AddWindow(&window); - DrawStdFrameWithCustomTileAndPalette(gUnknown_0203CEC4->unkC[0], FALSE, 0x4F, 13); + gUnknown_0203CEC4->windowId[0] = AddWindow(&window); + DrawStdFrameWithCustomTileAndPalette(gUnknown_0203CEC4->windowId[0], FALSE, 0x4F, 13); if (a == 3) - return gUnknown_0203CEC4->unkC[0]; + return gUnknown_0203CEC4->windowId[0]; cursorDimension = GetMenuCursorDimensionByFont(1, 0); fontAttribute = GetFontAttribute(1, 2); - for (i = 0; i < gUnknown_0203CEC4->unk17; i++) + for (i = 0; i < gUnknown_0203CEC4->listSize; i++) { - u8 unk = (gUnknown_0203CEC4->unkF[i] > 18) ? 4 : 3; - AddTextPrinterParameterized4(gUnknown_0203CEC4->unkC[0], 1, cursorDimension, (i * 16) + 1, fontAttribute, 0, gUnknown_086157FC[unk], 0, sCursorOptions[gUnknown_0203CEC4->unkF[i]].text); + u8 unk = (gUnknown_0203CEC4->actions[i] > 18) ? 4 : 3; + AddTextPrinterParameterized4(gUnknown_0203CEC4->windowId[0], 1, cursorDimension, (i * 16) + 1, fontAttribute, 0, sFontColorTable[unk], 0, sCursorOptions[gUnknown_0203CEC4->actions[i]].text); } - InitMenuInUpperLeftCorner(gUnknown_0203CEC4->unkC[0], gUnknown_0203CEC4->unk17, 0, 1); + InitMenuInUpperLeftCorner(gUnknown_0203CEC4->windowId[0], gUnknown_0203CEC4->listSize, 0, 1); schedule_bg_copy_tilemap_to_vram(2); - return gUnknown_0203CEC4->unkC[0]; + return gUnknown_0203CEC4->windowId[0]; } static void sub_81B3300(const u8 *text) @@ -3633,46 +3674,46 @@ static void sub_81B334C(void) static u8 sub_81B3364(void) { - gUnknown_0203CEC4->unkC[0] = AddWindow(&gUnknown_08615970); - DrawStdFrameWithCustomTileAndPalette(gUnknown_0203CEC4->unkC[0], FALSE, 0x4F, 13); - return gUnknown_0203CEC4->unkC[0]; + gUnknown_0203CEC4->windowId[0] = AddWindow(&gUnknown_08615970); + DrawStdFrameWithCustomTileAndPalette(gUnknown_0203CEC4->windowId[0], FALSE, 0x4F, 13); + return gUnknown_0203CEC4->windowId[0]; } static void sub_81B3394(void) { - ClearWindowTilemap(gUnknown_0203CEC4->unkC[0]); - sub_81B302C(&gUnknown_0203CEC4->unkC[0]); + ClearWindowTilemap(gUnknown_0203CEC4->windowId[0]); + sub_81B302C(&gUnknown_0203CEC4->windowId[0]); } -static void sub_81B33B4(struct Pokemon *mons, u8 a, u8 b) +static void sub_81B33B4(struct Pokemon *mons, u8 slotId, u8 b) { u8 i; if (b == 0) { - sub_81B3414(mons, a); + CreateActionList(mons, slotId); } else { - gUnknown_0203CEC4->unk17 = gUnknown_08615D70[b]; - for (i = 0; i < gUnknown_0203CEC4->unk17; i++) - gUnknown_0203CEC4->unkF[i] = gUnknown_08615D38[b][i]; + gUnknown_0203CEC4->listSize = sListSizeTable[b]; + for (i = 0; i < gUnknown_0203CEC4->listSize; i++) + gUnknown_0203CEC4->actions[i] = sActionTable[b][i]; } } -static void sub_81B3414(struct Pokemon *mons, u8 a) +static void CreateActionList(struct Pokemon *mons, u8 slotId) { u8 i, j; - gUnknown_0203CEC4->unk17 = 0; - AppendToList(gUnknown_0203CEC4->unkF, &gUnknown_0203CEC4->unk17, 0); + gUnknown_0203CEC4->listSize = 0; + AppendToList(gUnknown_0203CEC4->actions, &gUnknown_0203CEC4->listSize, MENU_SUMMARY); for (i = 0; i < MAX_MON_MOVES; i++) { for (j = 0; sFieldMoves[j] != FIELD_MOVE_TERMINATOR; j++) { - if (GetMonData(&mons[a], i + MON_DATA_MOVE1) == sFieldMoves[j]) + if (GetMonData(&mons[slotId], i + MON_DATA_MOVE1) == sFieldMoves[j]) { - AppendToList(gUnknown_0203CEC4->unkF, &gUnknown_0203CEC4->unk17, j + 19); + AppendToList(gUnknown_0203CEC4->actions, &gUnknown_0203CEC4->listSize, j + MENU_FIELD_MOVES); break; } } @@ -3681,13 +3722,13 @@ static void sub_81B3414(struct Pokemon *mons, u8 a) if (!InBattlePike()) { if (GetMonData(&mons[1], MON_DATA_SPECIES) != SPECIES_NONE) - AppendToList(gUnknown_0203CEC4->unkF, &gUnknown_0203CEC4->unk17, 1); - if (ItemIsMail(GetMonData(&mons[a], MON_DATA_HELD_ITEM))) - AppendToList(gUnknown_0203CEC4->unkF, &gUnknown_0203CEC4->unk17, 6); + AppendToList(gUnknown_0203CEC4->actions, &gUnknown_0203CEC4->listSize, MENU_SWITCH); + if (ItemIsMail(GetMonData(&mons[slotId], MON_DATA_HELD_ITEM))) + AppendToList(gUnknown_0203CEC4->actions, &gUnknown_0203CEC4->listSize, MENU_MAIL); else - AppendToList(gUnknown_0203CEC4->unkF, &gUnknown_0203CEC4->unk17, 3); + AppendToList(gUnknown_0203CEC4->actions, &gUnknown_0203CEC4->listSize, MENU_ITEM); } - AppendToList(gUnknown_0203CEC4->unkF, &gUnknown_0203CEC4->unk17, 2); + AppendToList(gUnknown_0203CEC4->actions, &gUnknown_0203CEC4->listSize, MENU_CANCEL1); } static u8 sub_81B353C(struct Pokemon *mon) @@ -3706,7 +3747,7 @@ static u8 sub_81B353C(struct Pokemon *mon) returnVar = sub_81B8A2C(mon); break; case 4: - switch (sub_81B856C(gUnknown_0203CEC8.unk9)) + switch (sub_81B856C(gUnknown_0203CEC8.slotId)) { default: returnVar = 7; @@ -3743,14 +3784,14 @@ static u8 sub_81B353C(struct Pokemon *mon) static bool8 sub_81B3608(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; + struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; u16 item; GetMonNickname(mon, gStringVar1); - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); if (gUnknown_0203CEC8.unk8_0 != 12) { - sub_81B33B4(gPlayerParty, gUnknown_0203CEC8.unk9, sub_81B353C(mon)); + sub_81B33B4(gPlayerParty, gUnknown_0203CEC8.slotId, sub_81B353C(mon)); sub_81B31B0(0); display_pokemon_menu_message(21); } @@ -3759,7 +3800,7 @@ static bool8 sub_81B3608(u8 taskId) item = GetMonData(mon, MON_DATA_HELD_ITEM); if (item != ITEM_NONE) { - sub_81B33B4(gPlayerParty, gUnknown_0203CEC8.unk9, sub_81B353C(mon)); + sub_81B33B4(gPlayerParty, gUnknown_0203CEC8.slotId, sub_81B353C(mon)); sub_81B31B0(1); CopyItemName(item, gStringVar2); display_pokemon_menu_message(26); @@ -3792,7 +3833,7 @@ static void HandleMenuInput(u8 taskId) s8 input; s16 *data = gTasks[taskId].data; - if (gUnknown_0203CEC4->unk17 <= 3) + if (gUnknown_0203CEC4->listSize <= 3) input = Menu_ProcessInputNoWrapAround_other(); else input = ProcessMenuInput_other(); @@ -3804,12 +3845,12 @@ static void HandleMenuInput(u8 taskId) break; case MENU_B_PRESSED: PlaySE(SE_SELECT); - sub_81B302C(&gUnknown_0203CEC4->unkC[2]); - sCursorOptions[gUnknown_0203CEC4->unkF[gUnknown_0203CEC4->unk17 - 1]].func(taskId); + sub_81B302C(&gUnknown_0203CEC4->windowId[2]); + sCursorOptions[gUnknown_0203CEC4->actions[gUnknown_0203CEC4->listSize - 1]].func(taskId); break; default: - sub_81B302C(&gUnknown_0203CEC4->unkC[2]); - sCursorOptions[gUnknown_0203CEC4->unkF[input]].func(taskId); + sub_81B302C(&gUnknown_0203CEC4->windowId[2]); + sCursorOptions[gUnknown_0203CEC4->actions[input]].func(taskId); break; } } @@ -3827,18 +3868,18 @@ static void sub_81B3828(void) if (gUnknown_0203CEC8.unk8_0 == 1) { pokemon_change_order(); - ShowPokemonSummaryScreen(PSS_MODE_UNK1, gPlayerParty, gUnknown_0203CEC8.unk9, gPlayerPartyCount - 1, sub_81B3894); + ShowPokemonSummaryScreen(PSS_MODE_UNK1, gPlayerParty, gUnknown_0203CEC8.slotId, gPlayerPartyCount - 1, sub_81B3894); } else { - ShowPokemonSummaryScreen(PSS_MODE_NORMAL, gPlayerParty, gUnknown_0203CEC8.unk9, gPlayerPartyCount - 1, sub_81B3894); + ShowPokemonSummaryScreen(PSS_MODE_NORMAL, gPlayerParty, gUnknown_0203CEC8.slotId, gPlayerPartyCount - 1, sub_81B3894); } } static void sub_81B3894(void) { gPaletteFade.bufferTransferDisabled = TRUE; - gUnknown_0203CEC8.unk9 = gLastViewedMonIndex; + gUnknown_0203CEC8.slotId = gLastViewedMonIndex; InitPartyMenu(gUnknown_0203CEC8.unk8_0, 0xFF, gUnknown_0203CEC8.unkB, 1, 21, sub_81B36FC, gUnknown_0203CEC8.exitCallback); } @@ -3846,11 +3887,11 @@ static void CursorCb_Switch(u8 taskId) { PlaySE(SE_SELECT); gUnknown_0203CEC8.unkB = 8; - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); - sub_81B302C(&gUnknown_0203CEC4->unkC[0]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); + sub_81B302C(&gUnknown_0203CEC4->windowId[0]); display_pokemon_menu_message(3); - sub_81B0FCC(gUnknown_0203CEC8.unk9, 1); - gUnknown_0203CEC8.unkA = gUnknown_0203CEC8.unk9; + sub_81B0FCC(gUnknown_0203CEC8.slotId, 1); + gUnknown_0203CEC8.unkA = gUnknown_0203CEC8.slotId; gTasks[taskId].func = sub_81B1370; } @@ -3859,13 +3900,13 @@ static void sub_81B3938(u8 taskId) s16 *data = gTasks[taskId].data; u8 windowIds[2]; - if (gUnknown_0203CEC8.unkA == gUnknown_0203CEC8.unk9) + if (gUnknown_0203CEC8.unkA == gUnknown_0203CEC8.slotId) { sub_81B407C(taskId); } else { - windowIds[0] = gUnknown_0203CEDC[gUnknown_0203CEC8.unk9].windowId; + windowIds[0] = gUnknown_0203CEDC[gUnknown_0203CEC8.slotId].windowId; data[0] = GetWindowAttribute(windowIds[0], WINDOW_TILEMAP_LEFT); data[1] = GetWindowAttribute(windowIds[0], WINDOW_TILEMAP_TOP); data[2] = GetWindowAttribute(windowIds[0], WINDOW_WIDTH); @@ -3892,7 +3933,7 @@ static void sub_81B3938(u8 taskId) ClearWindowTilemap(windowIds[0]); ClearWindowTilemap(windowIds[1]); gUnknown_0203CEC8.unkB = 9; - sub_81B0FCC(gUnknown_0203CEC8.unk9, 1); + sub_81B0FCC(gUnknown_0203CEC8.slotId, 1); sub_81B0FCC(gUnknown_0203CEC8.unkA, 1); sub_81B3CC0(taskId); gTasks[taskId].func = sub_81B3D48; @@ -3939,10 +3980,10 @@ static void sub_81B3B40(const void *rectSrc, s16 a, s16 b, s16 c, s16 d, s16 e) static void sub_81B3C0C(struct Struct203CEDC *ptr, s16 a) { - gSprites[ptr->unkB].pos2.x += a * 8; - gSprites[ptr->unkA].pos2.x += a * 8; - gSprites[ptr->unk9].pos2.x += a * 8; - gSprites[ptr->unkC].pos2.x += a * 8; + gSprites[ptr->pokeballSpriteId].pos2.x += a * 8; + gSprites[ptr->itemSpriteId].pos2.x += a * 8; + gSprites[ptr->monSpriteId].pos2.x += a * 8; + gSprites[ptr->statusSpriteId].pos2.x += a * 8; } static void sub_81B3C60(u8 taskId) @@ -3950,7 +3991,7 @@ static void sub_81B3C60(u8 taskId) s16 *data = gTasks[taskId].data; if (data[10] != 0) - sub_81B3C0C(&gUnknown_0203CEDC[gUnknown_0203CEC8.unk9], data[10]); + sub_81B3C0C(&gUnknown_0203CEDC[gUnknown_0203CEC8.slotId], data[10]); if (data[11] != 0) sub_81B3C0C(&gUnknown_0203CEDC[gUnknown_0203CEC8.unkA], data[11]); } @@ -3982,13 +4023,13 @@ static void sub_81B3D48(u8 taskId) data[10] *= -1; data[11] *= -1; swap_pokemon_and_oams(); - DisplayPartyPokemonData(gUnknown_0203CEC8.unk9); + DisplayPartyPokemonData(gUnknown_0203CEC8.slotId); DisplayPartyPokemonData(gUnknown_0203CEC8.unkA); - PutWindowTilemap(gUnknown_0203CEDC[gUnknown_0203CEC8.unk9].windowId); + PutWindowTilemap(gUnknown_0203CEDC[gUnknown_0203CEC8.slotId].windowId); PutWindowTilemap(gUnknown_0203CEDC[gUnknown_0203CEC8.unkA].windowId); sub_8199CBC(0, gUnknown_0203CEF0, data[0], data[1], data[2], data[3]); sub_8199CBC(0, gUnknown_0203CEF4, data[4], data[5], data[6], data[7]); - ClearWindowTilemap(gUnknown_0203CEDC[gUnknown_0203CEC8.unk9].windowId); + ClearWindowTilemap(gUnknown_0203CEDC[gUnknown_0203CEC8.slotId].windowId); ClearWindowTilemap(gUnknown_0203CEDC[gUnknown_0203CEC8.unkA].windowId); gTasks[taskId].func = sub_81B3E60; } @@ -4002,7 +4043,7 @@ static void sub_81B3E60(u8 taskId) sub_81B3C60(taskId); if (data[10] == 0 && data[11] == 0) { - PutWindowTilemap(gUnknown_0203CEDC[gUnknown_0203CEC8.unk9].windowId); + PutWindowTilemap(gUnknown_0203CEDC[gUnknown_0203CEC8.slotId].windowId); PutWindowTilemap(gUnknown_0203CEDC[gUnknown_0203CEC8.unkA].windowId); schedule_bg_copy_tilemap_to_vram(0); Free(gUnknown_0203CEF0); @@ -4047,27 +4088,27 @@ static void swap_pokemon_and_oams(void) struct Pokemon *mon1, *mon2; struct Pokemon *monBuffer; - structPtrs[0] = &gUnknown_0203CEDC[gUnknown_0203CEC8.unk9]; + structPtrs[0] = &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId]; structPtrs[1] = &gUnknown_0203CEDC[gUnknown_0203CEC8.unkA]; - mon1 = &gPlayerParty[gUnknown_0203CEC8.unk9]; + mon1 = &gPlayerParty[gUnknown_0203CEC8.slotId]; mon2 = &gPlayerParty[gUnknown_0203CEC8.unkA]; monBuffer = Alloc(sizeof(struct Pokemon)); *monBuffer = *mon1; *mon1 = *mon2; *mon2 = *monBuffer; Free(monBuffer); - oamt_swap_pos(&structPtrs[0]->unkB, &structPtrs[1]->unkB); - oamt_swap_pos(&structPtrs[0]->unkA, &structPtrs[1]->unkA); - oamt_swap_pos(&structPtrs[0]->unk9, &structPtrs[1]->unk9); - oamt_swap_pos(&structPtrs[0]->unkC, &structPtrs[1]->unkC); + oamt_swap_pos(&structPtrs[0]->pokeballSpriteId, &structPtrs[1]->pokeballSpriteId); + oamt_swap_pos(&structPtrs[0]->itemSpriteId, &structPtrs[1]->itemSpriteId); + oamt_swap_pos(&structPtrs[0]->monSpriteId, &structPtrs[1]->monSpriteId); + oamt_swap_pos(&structPtrs[0]->statusSpriteId, &structPtrs[1]->statusSpriteId); } static void sub_81B407C(u8 taskId) { - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); gUnknown_0203CEC8.unkB = 0; - sub_81B0FCC(gUnknown_0203CEC8.unk9, 0); - gUnknown_0203CEC8.unk9 = gUnknown_0203CEC8.unkA; + sub_81B0FCC(gUnknown_0203CEC8.slotId, 0); + gUnknown_0203CEC8.slotId = gUnknown_0203CEC8.unkA; sub_81B0FCC(gUnknown_0203CEC8.unkA, 1); display_pokemon_menu_message(0); gTasks[taskId].func = sub_81B1370; @@ -4076,8 +4117,8 @@ static void sub_81B407C(u8 taskId) static void CursorCb_Cancel1(u8 taskId) { PlaySE(SE_SELECT); - sub_81B302C(&gUnknown_0203CEC4->unkC[0]); - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); + sub_81B302C(&gUnknown_0203CEC4->windowId[0]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); if (gUnknown_0203CEC8.unk8_0 == 6) display_pokemon_menu_message(15); else @@ -4088,9 +4129,9 @@ static void CursorCb_Cancel1(u8 taskId) static void CursorCb_Item(u8 taskId) { PlaySE(SE_SELECT); - sub_81B302C(&gUnknown_0203CEC4->unkC[0]); - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); - sub_81B33B4(gPlayerParty, gUnknown_0203CEC8.unk9, 8); + sub_81B302C(&gUnknown_0203CEC4->windowId[0]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); + sub_81B33B4(gPlayerParty, gUnknown_0203CEC8.slotId, 8); sub_81B31B0(1); display_pokemon_menu_message(24); gTasks[taskId].data[0] = 0xFF; @@ -4120,7 +4161,7 @@ static void c2_8123744(void) } else { - gUnknown_0203CEFC = GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_HELD_ITEM); + gUnknown_0203CEFC = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_HELD_ITEM); if (gUnknown_0203CEFC != ITEM_NONE) { InitPartyMenu(gUnknown_0203CEC8.unk8_0, 0xFF, gUnknown_0203CEC8.unkB, 1, 0x7F, sub_81B4350, gUnknown_0203CEC8.exitCallback); @@ -4128,7 +4169,7 @@ static void c2_8123744(void) else if (ItemIsMail(gSpecialVar_ItemId)) { RemoveBagItem(gSpecialVar_ItemId, 1); - sub_81B1DB8(&gPlayerParty[gUnknown_0203CEC8.unk9], gSpecialVar_ItemId); + sub_81B1DB8(&gPlayerParty[gUnknown_0203CEC8.slotId], gSpecialVar_ItemId); sub_81B452C(); } else @@ -4145,8 +4186,8 @@ static void sub_81B42D0(u8 taskId) if (!gPaletteFade.active) { item = gSpecialVar_ItemId; - sub_81B1C84(&gPlayerParty[gUnknown_0203CEC8.unk9], item, 0, 0); - sub_81B1DB8(&gPlayerParty[gUnknown_0203CEC8.unk9], item); + sub_81B1C84(&gPlayerParty[gUnknown_0203CEC8.slotId], item, 0, 0); + sub_81B1DB8(&gPlayerParty[gUnknown_0203CEC8.slotId], item); RemoveBagItem(item, 1); gTasks[taskId].func = sub_81B469C; } @@ -4156,7 +4197,7 @@ static void sub_81B4350(u8 taskId) { if (!gPaletteFade.active) { - sub_81B1D1C(&gPlayerParty[gUnknown_0203CEC8.unk9], gUnknown_0203CEFC, 1); + sub_81B1D1C(&gPlayerParty[gUnknown_0203CEC8.slotId], gUnknown_0203CEFC, 1); gTasks[taskId].func = sub_81B43A8; } } @@ -4185,12 +4226,12 @@ static void sub_81B43DC(u8 taskId) } else if (ItemIsMail(gSpecialVar_ItemId)) { - sub_81B1DB8(&gPlayerParty[gUnknown_0203CEC8.unk9], gSpecialVar_ItemId); + sub_81B1DB8(&gPlayerParty[gUnknown_0203CEC8.slotId], gSpecialVar_ItemId); gTasks[taskId].func = sub_81B44FC; } else { - sub_81B1DB8(&gPlayerParty[gUnknown_0203CEC8.unk9], gSpecialVar_ItemId); + sub_81B1DB8(&gPlayerParty[gUnknown_0203CEC8.slotId], gSpecialVar_ItemId); sub_81B1D68(gSpecialVar_ItemId, gUnknown_0203CEFC, 1); gTasks[taskId].func = sub_81B469C; } @@ -4214,7 +4255,7 @@ static void sub_81B44FC(u8 taskId) static void sub_81B452C(void) { - u8 mail = GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_MAIL); + u8 mail = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_MAIL); DoEasyChatScreen( EASY_CHAT_TYPE_MAIL, @@ -4225,7 +4266,7 @@ static void sub_81B452C(void) static void sub_81B4578(void) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; + struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; u16 item = GetMonData(mon, MON_DATA_HELD_ITEM); if (gSpecialVar_Result == FALSE) @@ -4247,7 +4288,7 @@ static void sub_81B4624(u8 taskId) if (!gPaletteFade.active) { if (gUnknown_0203CEFC == ITEM_NONE) - sub_81B1C84(&gPlayerParty[gUnknown_0203CEC8.unk9], gSpecialVar_ItemId, 0, 0); + sub_81B1C84(&gPlayerParty[gUnknown_0203CEC8.slotId], gSpecialVar_ItemId, 0, 0); else sub_81B1D68(gSpecialVar_ItemId, gUnknown_0203CEFC, 0); gTasks[taskId].func = sub_81B469C; @@ -4256,17 +4297,17 @@ static void sub_81B4624(u8 taskId) static void sub_81B469C(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; + struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; if (sub_81B1BD4() != TRUE) { - sub_81B5C94(mon, &gUnknown_0203CEDC[gUnknown_0203CEC8.unk9]); + sub_81B5C94(mon, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId]); if (gUnknown_0203CEC8.unk8_0 == 12) { if (GetMonData(mon, MON_DATA_HELD_ITEM) != ITEM_NONE) - DisplayPartyPokemonOtherText(11, &gUnknown_0203CEDC[gUnknown_0203CEC8.unk9], 1); + DisplayPartyPokemonOtherText(11, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId], 1); else - DisplayPartyPokemonOtherText(12, &gUnknown_0203CEDC[gUnknown_0203CEC8.unk9], 1); + DisplayPartyPokemonOtherText(12, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId], 1); } sub_81B1C1C(taskId); } @@ -4274,12 +4315,12 @@ static void sub_81B469C(u8 taskId) static void CursorCb_TakeItem(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; + struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; u16 item = GetMonData(mon, MON_DATA_HELD_ITEM); PlaySE(SE_SELECT); - sub_81B302C(&gUnknown_0203CEC4->unkC[0]); - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); + sub_81B302C(&gUnknown_0203CEC4->windowId[0]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); switch (TryTakeMonItem(mon)) { case 0: @@ -4301,12 +4342,12 @@ static void CursorCb_TakeItem(u8 taskId) static void CursorCb_Toss(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; + struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; u16 item = GetMonData(mon, MON_DATA_HELD_ITEM); PlaySE(SE_SELECT); - sub_81B302C(&gUnknown_0203CEC4->unkC[0]); - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); + sub_81B302C(&gUnknown_0203CEC4->windowId[0]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); if (item == ITEM_NONE) { GetMonNickname(mon, gStringVar1); @@ -4334,7 +4375,7 @@ static void sub_81B48A8(u8 taskId) static void sub_81B48DC(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; + struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; switch (Menu_ProcessInputNoWrapClearOnChoose()) { @@ -4354,15 +4395,15 @@ static void sub_81B48DC(u8 taskId) static void sub_81B4988(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; + struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; if (sub_81B1BD4() != TRUE) { u16 item = ITEM_NONE; SetMonData(mon, MON_DATA_HELD_ITEM, &item); - sub_81B5C94(mon, &gUnknown_0203CEDC[gUnknown_0203CEC8.unk9]); - DisplayPartyPokemonOtherText(12, &gUnknown_0203CEDC[gUnknown_0203CEC8.unk9], 1); + sub_81B5C94(mon, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId]); + DisplayPartyPokemonOtherText(12, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId], 1); gTasks[taskId].func = sub_81B1C1C; } } @@ -4370,9 +4411,9 @@ static void sub_81B4988(u8 taskId) static void CursorCb_Mail(u8 taskId) { PlaySE(SE_SELECT); - sub_81B302C(&gUnknown_0203CEC4->unkC[0]); - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); - sub_81B33B4(gPlayerParty, gUnknown_0203CEC8.unk9, 9); + sub_81B302C(&gUnknown_0203CEC4->windowId[0]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); + sub_81B33B4(gPlayerParty, gUnknown_0203CEC8.slotId, 9); sub_81B31B0(2); display_pokemon_menu_message(25); gTasks[taskId].data[0] = 0xFF; @@ -4388,7 +4429,7 @@ static void CursorCb_Read(u8 taskId) static void sub_81B4A98(void) { - ReadMail(&gSaveBlock1Ptr->mail[GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_MAIL)], sub_81B4AE0, 1); + ReadMail(&gSaveBlock1Ptr->mail[GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_MAIL)], sub_81B4AE0, 1); } static void sub_81B4AE0(void) @@ -4400,8 +4441,8 @@ static void sub_81B4AE0(void) static void CursorCb_TakeMail(u8 taskId) { PlaySE(SE_SELECT); - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); - sub_81B302C(&gUnknown_0203CEC4->unkC[0]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); + sub_81B302C(&gUnknown_0203CEC4->windowId[0]); sub_81B1B5C(gText_SendMailToPC, 1); gTasks[taskId].func = sub_81B4B6C; } @@ -4420,7 +4461,7 @@ static void sub_81B4BA0(u8 taskId) switch (Menu_ProcessInputNoWrapClearOnChoose()) { case 0: - if (TakeMailFromMon2(&gPlayerParty[gUnknown_0203CEC8.unk9]) != 0xFF) + if (TakeMailFromMon2(&gPlayerParty[gUnknown_0203CEC8.slotId]) != 0xFF) { sub_81B1B5C(gText_MailSentToPC, 0); gTasks[taskId].func = sub_81B469C; @@ -4456,10 +4497,10 @@ static void sub_81B4C94(u8 taskId) switch (Menu_ProcessInputNoWrapClearOnChoose()) { case 0: - item = GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_HELD_ITEM); + item = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_HELD_ITEM); if (AddBagItem(item, 1) == TRUE) { - TakeMailFromMon(&gPlayerParty[gUnknown_0203CEC8.unk9]); + TakeMailFromMon(&gPlayerParty[gUnknown_0203CEC8.slotId]); sub_81B1B5C(gText_MailTakenFromPkmn, 0); gTasks[taskId].func = sub_81B469C; } @@ -4480,12 +4521,12 @@ static void sub_81B4C94(u8 taskId) static void CursorCb_Cancel2(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; + struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; PlaySE(SE_SELECT); - sub_81B302C(&gUnknown_0203CEC4->unkC[0]); - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); - sub_81B33B4(gPlayerParty, gUnknown_0203CEC8.unk9, sub_81B353C(mon)); + sub_81B302C(&gUnknown_0203CEC4->windowId[0]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); + sub_81B33B4(gPlayerParty, gUnknown_0203CEC8.slotId, sub_81B353C(mon)); if (gUnknown_0203CEC8.unk8_0 != 12) { sub_81B31B0(0); @@ -4504,14 +4545,14 @@ static void CursorCb_Cancel2(u8 taskId) static void CursorCb_SendMon(u8 taskId) { PlaySE(SE_SELECT); - sub_81B302C(&gUnknown_0203CEC4->unkC[0]); + sub_81B302C(&gUnknown_0203CEC4->windowId[0]); if (sub_81B8A7C() == TRUE) { sub_81B12C0(taskId); } else { - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); sub_81B1B5C(gStringVar4, 1); gTasks[taskId].func = sub_81B1C1C; } @@ -4522,16 +4563,16 @@ static void CursorCb_Enter(u8 taskId) u8 unk; u8 i; - sub_81B302C(&gUnknown_0203CEC4->unkC[0]); - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); + sub_81B302C(&gUnknown_0203CEC4->windowId[0]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); unk = sub_81B8830(); for (i = 0; i < unk; i++) { if (gSelectedOrderFromParty[i] == 0) { PlaySE(SE_SELECT); - gSelectedOrderFromParty[i] = gUnknown_0203CEC8.unk9 + 1; - DisplayPartyPokemonOtherText(i + 2, &gUnknown_0203CEDC[gUnknown_0203CEC8.unk9], 1); + gSelectedOrderFromParty[i] = gUnknown_0203CEC8.slotId + 1; + DisplayPartyPokemonOtherText(i + 2, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId], 1); if (i == (unk - 1)) sub_81B4F88(); display_pokemon_menu_message(0); @@ -4548,9 +4589,9 @@ static void CursorCb_Enter(u8 taskId) static void sub_81B4F88(void) { - sub_81B0FCC(gUnknown_0203CEC8.unk9, 0); - gUnknown_0203CEC8.unk9 = 6; - sub_81B0FCC(gUnknown_0203CEC8.unk9, 1); + sub_81B0FCC(gUnknown_0203CEC8.slotId, 0); + gUnknown_0203CEC8.slotId = 6; + sub_81B0FCC(gUnknown_0203CEC8.slotId, 1); } static void CursorCb_NoEntry(u8 taskId) @@ -4559,12 +4600,12 @@ static void CursorCb_NoEntry(u8 taskId) u8 i, j; PlaySE(SE_SELECT); - sub_81B302C(&gUnknown_0203CEC4->unkC[0]); - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); + sub_81B302C(&gUnknown_0203CEC4->windowId[0]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); unk = sub_81B8830(); for (i = 0; i < unk; i++) { - if (gSelectedOrderFromParty[i] == (gUnknown_0203CEC8.unk9 + 1)) + if (gSelectedOrderFromParty[i] == (gUnknown_0203CEC8.slotId + 1)) { for (j = i; j < (unk - 1); j++) gSelectedOrderFromParty[j] = gSelectedOrderFromParty[j + 1]; @@ -4572,7 +4613,7 @@ static void CursorCb_NoEntry(u8 taskId) break; } } - DisplayPartyPokemonOtherText(1, &gUnknown_0203CEDC[gUnknown_0203CEC8.unk9], 1); + DisplayPartyPokemonOtherText(1, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId], 1); for (i = 0; i < (unk - 1); i++) { if (gSelectedOrderFromParty[i] != 0) @@ -4590,9 +4631,9 @@ static void CursorCb_Store(u8 taskId) static void CursorCb_Register(u8 taskId) { - u16 species2 = GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_SPECIES2); - u16 species = GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_SPECIES); - u8 obedience = GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_OBEDIENCE); + u16 species2 = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_SPECIES2); + u16 species = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_SPECIES); + u8 obedience = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_OBEDIENCE); switch (sub_807A8D0(*(struct UnkLinkRfuStruct_02022B14Substruct *)sub_800F7DC(), species2, species, obedience)) { @@ -4608,8 +4649,8 @@ static void CursorCb_Register(u8 taskId) return; } PlaySE(SE_HAZURE); - sub_81B302C(&gUnknown_0203CEC4->unkC[0]); - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); + sub_81B302C(&gUnknown_0203CEC4->windowId[0]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); StringAppend(gStringVar4, gText_PauseUntilPress); sub_81B1B5C(gStringVar4, 1); gTasks[taskId].func = sub_81B1C1C; @@ -4617,17 +4658,17 @@ static void CursorCb_Register(u8 taskId) static void CursorCb_Trade1(u8 taskId) { - u16 species2 = GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_SPECIES2); - u16 species = GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_SPECIES); - u8 obedience = GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_OBEDIENCE); + u16 species2 = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_SPECIES2); + u16 species = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_SPECIES); + u8 obedience = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_OBEDIENCE); u32 stringId = sub_807A7E0(*(struct UnkLinkRfuStruct_02022B14Substruct *)sub_800F7DC(), gUnknown_02022C38, species2, gUnknown_02022C3C, gUnknown_02022C3E, species, obedience); if (stringId != 0) { StringExpandPlaceholders(gStringVar4, gUnknown_08615E0C[stringId - 1]); PlaySE(SE_HAZURE); - sub_81B302C(&gUnknown_0203CEC4->unkC[0]); - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); + sub_81B302C(&gUnknown_0203CEC4->windowId[0]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); StringAppend(gStringVar4, gText_PauseUntilPress); sub_81B1B5C(gStringVar4, 1); gTasks[taskId].func = sub_81B1C1C; @@ -4641,9 +4682,9 @@ static void CursorCb_Trade1(u8 taskId) static void CursorCb_Trade2(u8 taskId) { - sub_81B302C(&gUnknown_0203CEC4->unkC[0]); - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); - switch (sub_807A918(gPlayerParty, gUnknown_0203CEC8.unk9)) + sub_81B302C(&gUnknown_0203CEC4->windowId[0]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); + switch (sub_807A918(gPlayerParty, gUnknown_0203CEC8.slotId)) { case 1: StringExpandPlaceholders(gStringVar4, gText_OnlyPkmnForBattle); @@ -4656,7 +4697,7 @@ static void CursorCb_Trade2(u8 taskId) break; default: PlaySE(SE_SELECT); - GetMonNickname(&gPlayerParty[gUnknown_0203CEC8.unk9], gStringVar1); + GetMonNickname(&gPlayerParty[gUnknown_0203CEC8.slotId], gStringVar1); StringExpandPlaceholders(gStringVar4, gJPText_PutVar1IntoSpinner); sub_81B1B5C(gStringVar4, 1); gTasks[taskId].func = sub_81B53FC; @@ -4694,15 +4735,15 @@ static void sub_81B5430(u8 taskId) static void CursorCb_FieldMove(u8 taskId) { - u8 fieldMove = gUnknown_0203CEC4->unkF[Menu_GetCursorPos()] - MENU_FIELD_MOVES; + u8 fieldMove = gUnknown_0203CEC4->actions[Menu_GetCursorPos()] - MENU_FIELD_MOVES; const struct MapHeader *mapHeader; PlaySE(SE_SELECT); if (sFieldMoveCursorCallbacks[fieldMove].fieldMoveFunc == NULL) return; - sub_81B302C(&gUnknown_0203CEC4->unkC[0]); - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); + sub_81B302C(&gUnknown_0203CEC4->windowId[0]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); if (sub_81221AC() == TRUE || InUnionRoom() == TRUE) { if (fieldMove == FIELD_MOVE_MILK_DRINK || fieldMove == FIELD_MOVE_SOFT_BOILED) @@ -4823,7 +4864,7 @@ static void task_launch_hm_phase_2(u8 taskId) static u16 brm_get_selected_species(void) { - return GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_SPECIES); + return GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_SPECIES); } static void task_brm_cancel_1_on_keypad_a_or_b(u8 taskId) @@ -4925,15 +4966,15 @@ static void party_menu_icon_anim(struct Pokemon *mon, struct Struct203CEDC *ptr, bit = (gUnknown_08616020[a] ^ bit) ? 1 : 0; species2 = GetMonData(mon, MON_DATA_SPECIES2); party_menu_link_mon_icon_anim(species2, GetMonData(mon, MON_DATA_PERSONALITY), ptr, 1, bit); - sub_81B5B38(ptr->unk9, mon); + sub_81B5B38(ptr->monSpriteId, mon); } static void party_menu_link_mon_icon_anim(u16 species, u32 pid, struct Struct203CEDC *ptr, u8 priority, u32 bit) { if (species != SPECIES_NONE) { - ptr->unk9 = CreateMonIcon(species, sub_80D3014, ptr->unk4[0], ptr->unk4[1], 4, pid, bit); - gSprites[ptr->unk9].oam.priority = priority; + ptr->monSpriteId = CreateMonIcon(species, sub_80D3014, ptr->unk4[0], ptr->unk4[1], 4, pid, bit); + gSprites[ptr->monSpriteId].oam.priority = priority; } } @@ -5011,7 +5052,7 @@ static void party_menu_held_item_object(struct Pokemon *mon, struct Struct203CED { if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_NONE) { - ptr->unkA = CreateSprite(&gSpriteTemplate_8615EC0, ptr->unk4[2], ptr->unk4[3], 0); + ptr->itemSpriteId = CreateSprite(&sSpriteTemplate_HeldItem, ptr->unk4[2], ptr->unk4[3], 0); sub_81B5C94(mon, ptr); } } @@ -5020,8 +5061,8 @@ static void party_menu_link_mon_held_item_object(u16 species, u16 item, struct S { if (species != SPECIES_NONE) { - ptr->unkA = CreateSprite(&gSpriteTemplate_8615EC0, ptr->unk4[2], ptr->unk4[3], 0); - gSprites[ptr->unkA].oam.priority = 0; + ptr->itemSpriteId = CreateSprite(&sSpriteTemplate_HeldItem, ptr->unk4[2], ptr->unk4[3], 0); + gSprites[ptr->itemSpriteId].oam.priority = 0; sub_81B5CB0(item, ptr); } } @@ -5035,22 +5076,22 @@ static void sub_81B5CB0(u16 item, struct Struct203CEDC *ptr) { if (item == ITEM_NONE) { - gSprites[ptr->unkA].invisible = TRUE; + gSprites[ptr->itemSpriteId].invisible = TRUE; } else { if (ItemIsMail(item)) - StartSpriteAnim(&gSprites[ptr->unkA], 1); + StartSpriteAnim(&gSprites[ptr->itemSpriteId], 1); else - StartSpriteAnim(&gSprites[ptr->unkA], 0); - gSprites[ptr->unkA].invisible = FALSE; + StartSpriteAnim(&gSprites[ptr->itemSpriteId], 0); + gSprites[ptr->itemSpriteId].invisible = FALSE; } } void LoadHeldItemIcons(void) { - LoadSpriteSheet(&gUnknown_08615EB0); - LoadSpritePalette(&gUnknown_08615EB8); + LoadSpriteSheet(&sSpriteSheet_HeldItem); + LoadSpritePalette(&sSpritePalette_HeldItem); } void sub_81B5D4C(u8 *a, u8 *b, u8 c) @@ -5082,17 +5123,17 @@ void sub_81B5D4C(u8 *a, u8 *b, u8 c) static void sub_81B5DF0(u8 spriteId, u8 isMail) { u8 subpriority = gSprites[spriteId].subpriority; - u8 newSpriteId = CreateSprite(&gSpriteTemplate_8615EC0, 250, 170, subpriority - 1); + u8 newSpriteId = CreateSprite(&sSpriteTemplate_HeldItem, 250, 170, subpriority - 1); gSprites[newSpriteId].pos2.x = 4; gSprites[newSpriteId].pos2.y = 10; - gSprites[newSpriteId].callback = sub_81B5E74; + gSprites[newSpriteId].callback = SpriteCB_HeldItem; gSprites[newSpriteId].data[7] = spriteId; StartSpriteAnim(&gSprites[newSpriteId], isMail); gSprites[newSpriteId].callback(&gSprites[newSpriteId]); } -static void sub_81B5E74(struct Sprite *sprite) +static void SpriteCB_HeldItem(struct Sprite *sprite) { u8 otherSpriteId = sprite->data[7]; @@ -5111,21 +5152,21 @@ static void sub_81B5E74(struct Sprite *sprite) static void party_menu_pokeball_object(struct Pokemon *mon, struct Struct203CEDC *ptr) { if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_NONE) - ptr->unkB = CreateSprite(&gSpriteTemplate_8615F08, ptr->unk4[6], ptr->unk4[7], 8); + ptr->pokeballSpriteId = CreateSprite(&sSpriteTemplate_MenuPokeball, ptr->unk4[6], ptr->unk4[7], 8); } static void party_menu_link_mon_pokeball_object(u16 species, struct Struct203CEDC *ptr) { if (species != SPECIES_NONE) { - ptr->unkB = CreateSprite(&gSpriteTemplate_8615F08, ptr->unk4[6], ptr->unk4[7], 8); - gSprites[ptr->unkB].oam.priority = 0; + ptr->pokeballSpriteId = CreateSprite(&sSpriteTemplate_MenuPokeball, ptr->unk4[6], ptr->unk4[7], 8); + gSprites[ptr->pokeballSpriteId].oam.priority = 0; } } static u8 sub_81B5F34(u8 x, u8 y) { - u8 spriteId = CreateSprite(&gSpriteTemplate_8615F08, x, y, 8); + u8 spriteId = CreateSprite(&sSpriteTemplate_MenuPokeball, x, y, 8); gSprites[spriteId].oam.priority = 2; return spriteId; @@ -5161,16 +5202,16 @@ static void sub_81B5FBC(u8 spriteId, u8 spriteId2, u8 a) static void LoadPartyMenuPokeballGfx(void) { - LoadCompressedSpriteSheet(&gUnknown_08615EF8); - LoadCompressedSpriteSheet(&gUnknown_08615F70); - LoadCompressedSpritePalette(&gUnknown_08615F00); + LoadCompressedSpriteSheet(&sSpriteSheet_MenuPokeball); + LoadCompressedSpriteSheet(&sSpriteSheet_MenuPokeballSmall); + LoadCompressedSpritePalette(&sSpritePalette_MenuPokeball); } static void party_menu_status_condition_object(struct Pokemon *mon, struct Struct203CEDC *ptr) { if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_NONE) { - ptr->unkC = CreateSprite(&gSpriteTemplate_8616008, ptr->unk4[4], ptr->unk4[5], 0); + ptr->statusSpriteId = CreateSprite(&sSpriteTemplate_StatusIcons, ptr->unk4[4], ptr->unk4[5], 0); party_menu_get_status_condition_and_update_object(mon, ptr); } } @@ -5179,9 +5220,9 @@ static void party_menu_link_mon_status_condition_object(u16 species, u8 status, { if (species != SPECIES_NONE) { - ptr->unkC = CreateSprite(&gSpriteTemplate_8616008, ptr->unk4[4], ptr->unk4[5], 0); + ptr->statusSpriteId = CreateSprite(&sSpriteTemplate_StatusIcons, ptr->unk4[4], ptr->unk4[5], 0); party_menu_update_status_condition_object(status, ptr); - gSprites[ptr->unkC].oam.priority = 0; + gSprites[ptr->statusSpriteId].oam.priority = 0; } } @@ -5196,19 +5237,19 @@ static void party_menu_update_status_condition_object(u8 status, struct Struct20 { case AILMENT_NONE: case AILMENT_PKRS: - gSprites[ptr->unkC].invisible = TRUE; + gSprites[ptr->statusSpriteId].invisible = TRUE; break; default: - StartSpriteAnim(&gSprites[ptr->unkC], status - 1); - gSprites[ptr->unkC].invisible = FALSE; + StartSpriteAnim(&gSprites[ptr->statusSpriteId], status - 1); + gSprites[ptr->statusSpriteId].invisible = FALSE; break; } } static void LoadPartyMenuAilmentGfx(void) { - LoadCompressedSpriteSheet(&gUnknown_08615FF8); - LoadCompressedSpritePalette(&gUnknown_08616000); + LoadCompressedSpriteSheet(&sSpriteSheet_StatusIcons); + LoadCompressedSpritePalette(&sSpritePalette_StatusIcons); } void sub_81B617C(void) @@ -5233,12 +5274,12 @@ void sub_81B617C(void) if (GetItemEffectType(gSpecialVar_ItemId) == ITEM_EFFECT_SACRED_ASH) { - gUnknown_0203CEC8.unk9 = 0; + gUnknown_0203CEC8.slotId = 0; for (i = 0; i < PARTY_SIZE; i++) { if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) != SPECIES_NONE && GetMonData(&gPlayerParty[i], MON_DATA_HP) == 0) { - gUnknown_0203CEC8.unk9 = i; + gUnknown_0203CEC8.slotId = i; break; } } @@ -5381,7 +5422,7 @@ static bool8 ExecuteTableBasedItemEffect__(u8 partyMonIndex, u16 item, u8 monMov void ItemUseCB_Medicine(u8 taskId, TaskFunc task) { u16 hp = 0; - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; + struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; u16 item = gSpecialVar_ItemId; bool8 canHeal; @@ -5394,7 +5435,7 @@ void ItemUseCB_Medicine(u8 taskId, TaskFunc task) if (hp == GetMonData(mon, MON_DATA_MAX_HP)) canHeal = FALSE; } - if (ExecuteTableBasedItemEffect__(gUnknown_0203CEC8.unk9, item, 0)) + if (ExecuteTableBasedItemEffect__(gUnknown_0203CEC8.slotId, item, 0)) { iTriedHonestlyIDid: gUnknown_0203CEE8 = 0; @@ -5420,14 +5461,14 @@ void ItemUseCB_Medicine(u8 taskId, TaskFunc task) { PlaySE(SE_BIDORO); } - party_menu_get_status_condition_and_update_object(mon, &gUnknown_0203CEDC[gUnknown_0203CEC8.unk9]); - if (gSprites[gUnknown_0203CEDC[gUnknown_0203CEC8.unk9].unkC].invisible) - DisplayPartyPokemonLevelCheck(mon, &gUnknown_0203CEDC[gUnknown_0203CEC8.unk9], 1); + party_menu_get_status_condition_and_update_object(mon, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId]); + if (gSprites[gUnknown_0203CEDC[gUnknown_0203CEC8.slotId].statusSpriteId].invisible) + DisplayPartyPokemonLevelCheck(mon, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId], 1); if (canHeal == TRUE) { if (hp == 0) - sub_81B0FCC(gUnknown_0203CEC8.unk9, 1); - sub_81B1F18(taskId, gUnknown_0203CEC8.unk9, 1, GetMonData(mon, MON_DATA_HP) - hp, sub_81B672C); + sub_81B0FCC(gUnknown_0203CEC8.slotId, 1); + sub_81B1F18(taskId, gUnknown_0203CEC8.slotId, 1, GetMonData(mon, MON_DATA_HP) - hp, sub_81B672C); sub_81B1FA8(taskId, 0, hp); return; } @@ -5443,7 +5484,7 @@ void ItemUseCB_Medicine(u8 taskId, TaskFunc task) static void sub_81B672C(u8 taskId) { - GetMonNickname(&gPlayerParty[gUnknown_0203CEC8.unk9], gStringVar1); + GetMonNickname(&gPlayerParty[gUnknown_0203CEC8.slotId], gStringVar1); StringExpandPlaceholders(gStringVar4, gText_PkmnHPRestoredByVar2); sub_81B1B5C(gStringVar4, 0); schedule_bg_copy_tilemap_to_vram(2); @@ -5463,12 +5504,12 @@ static void sub_81B6794(u8 taskId) void sub_81B67C8(u8 taskId, TaskFunc task) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; + struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; u16 item = gSpecialVar_ItemId; u8 effectType = GetItemEffectType(item); u16 friendship = GetMonData(mon, MON_DATA_FRIENDSHIP); u16 relevantEV = ItemEffectToMonEv(mon, effectType); - bool8 cannotUseEffect = ExecuteTableBasedItemEffect__(gUnknown_0203CEC8.unk9, item, 0); + bool8 cannotUseEffect = ExecuteTableBasedItemEffect__(gUnknown_0203CEC8.slotId, item, 0); u16 newFriendship = GetMonData(mon, MON_DATA_FRIENDSHIP); u16 newRelevantEV = ItemEffectToMonEv(mon, effectType); @@ -5583,7 +5624,7 @@ static void ether_effect_related_3(u8 taskId) } else { - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); + sub_81B302C(&gUnknown_0203CEC4->windowId[1]); ether_effect_related_2(taskId); } } @@ -5608,14 +5649,14 @@ void dp05_ether(u8 taskId, TaskFunc task) { PlaySE(SE_SELECT); display_pokemon_menu_message(22); - sub_81B6A10(gUnknown_0203CEC8.unk9); + sub_81B6A10(gUnknown_0203CEC8.slotId); gTasks[taskId].func = ether_effect_related_3; } } static void ether_effect_related_2(u8 taskId) { - sub_81B302C(&gUnknown_0203CEC4->unkC[0]); + sub_81B302C(&gUnknown_0203CEC4->windowId[0]); gUnknown_0203CEC8.unkE = Menu_GetCursorPos(); ether_effect_related(taskId); } @@ -5624,7 +5665,7 @@ static void sub_81B6BB4(u8 taskId) { gTasks[taskId].func = sub_81B1370; gUnknown_0203CEC4->exitCallback = NULL; - sub_81B302C(&gUnknown_0203CEC4->unkC[0]); + sub_81B302C(&gUnknown_0203CEC4->windowId[0]); display_pokemon_menu_message(5); } @@ -5636,7 +5677,7 @@ static void ether_effect_related(u8 taskId) struct Struct203CEC8 *ptr = &gUnknown_0203CEC8; struct Pokemon *mon; - if (ExecuteTableBasedItemEffect__(ptr->unk9, item, *moveslot)) + if (ExecuteTableBasedItemEffect__(ptr->slotId, item, *moveslot)) { gUnknown_0203CEE8 = 0; PlaySE(SE_SELECT); @@ -5647,7 +5688,7 @@ static void ether_effect_related(u8 taskId) else { gUnknown_0203CEE8 = 1; - mon = &gPlayerParty[ptr->unk9]; + mon = &gPlayerParty[ptr->slotId]; PlaySE(SE_KAIFUKU); RemoveBagItem(item, 1); move = GetMonData(mon, MON_DATA_MOVE1 + *moveslot); @@ -5663,7 +5704,7 @@ void dp05_pp_up(u8 taskId, TaskFunc task) { PlaySE(SE_SELECT); display_pokemon_menu_message(23); - sub_81B6A10(gUnknown_0203CEC8.unk9); + sub_81B6A10(gUnknown_0203CEC8.slotId); gTasks[taskId].func = ether_effect_related_3; } @@ -5719,7 +5760,7 @@ void sub_81B6DC4(u8 taskId, TaskFunc task) u16 item; PlaySE(SE_SELECT); - mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; + mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; move = &gUnknown_0203CEC8.unkE; item = gSpecialVar_ItemId; GetMonNickname(mon, gStringVar1); @@ -5750,7 +5791,7 @@ void sub_81B6DC4(u8 taskId, TaskFunc task) static void sub_81B6EB4(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; + struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; s16 *move = &gUnknown_0203CEC8.unkE; u16 item = gSpecialVar_ItemId; @@ -5828,7 +5869,7 @@ static void sub_81B7088(u8 taskId) static void sub_81B70B8(void) { - ShowSelectMovePokemonSummaryScreen(gPlayerParty, gUnknown_0203CEC8.unk9, gPlayerPartyCount - 1, sub_81B70F0, gUnknown_0203CEC8.unkE); + ShowSelectMovePokemonSummaryScreen(gPlayerParty, gUnknown_0203CEC8.slotId, gPlayerPartyCount - 1, sub_81B70F0, gUnknown_0203CEC8.unkE); } static void sub_81B70F0(void) @@ -5849,7 +5890,7 @@ static void sub_81B711C(u8 taskId) static void sub_81B7154(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; + struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; u16 move = GetMonData(mon, MON_DATA_MOVE1 + sub_81C1B94()); GetMonNickname(mon, gStringVar1); @@ -5865,7 +5906,7 @@ static void sub_81B71D4(u8 taskId) if (sub_81B1BD4() != TRUE) { - mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; + mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; RemoveMonPPBonus(mon, sub_81C1B94()); move = gUnknown_0203CEC8.unkE; SetMonMoveSlot(mon, move, sub_81C1B94()); @@ -5893,7 +5934,7 @@ static void sub_81B7294(u8 taskId) static void sub_81B72C8(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; + struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; switch (Menu_ProcessInputNoWrapClearOnChoose()) { @@ -5932,7 +5973,7 @@ static void sub_81B73E4(u8 taskId) void dp05_rare_candy(u8 taskId, TaskFunc task) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; + struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; struct Struct203CEC4 *ptr = gUnknown_0203CEC4; s16 *arrayPtr = ptr->data; u16 *itemPtr = &gSpecialVar_ItemId; @@ -5941,7 +5982,7 @@ void dp05_rare_candy(u8 taskId, TaskFunc task) if (GetMonData(mon, MON_DATA_LEVEL) != MAX_LEVEL) { sub_81B79A0(mon, arrayPtr); - cannotUseEffect = ExecuteTableBasedItemEffect__(gUnknown_0203CEC8.unk9, *itemPtr, 0); + cannotUseEffect = ExecuteTableBasedItemEffect__(gUnknown_0203CEC8.slotId, *itemPtr, 0); sub_81B79A0(mon, &ptr->data[6]); } else @@ -5960,7 +6001,7 @@ void dp05_rare_candy(u8 taskId, TaskFunc task) { gUnknown_0203CEE8 = 1; PlayFanfareByFanfareNum(0); - sub_81B754C(gUnknown_0203CEC8.unk9, mon); + sub_81B754C(gUnknown_0203CEC8.slotId, mon); RemoveBagItem(gSpecialVar_ItemId, 1); GetMonNickname(mon, gStringVar1); ConvertIntToDecimalStringN(gStringVar2, GetMonData(mon, MON_DATA_LEVEL), 0, 3); @@ -5974,12 +6015,12 @@ void dp05_rare_candy(u8 taskId, TaskFunc task) static void sub_81B754C(u8 slot, struct Pokemon *mon) { party_menu_get_status_condition_and_update_object(mon, &gUnknown_0203CEDC[slot]); - if (gSprites[gUnknown_0203CEDC[slot].unkC].invisible) + if (gSprites[gUnknown_0203CEDC[slot].statusSpriteId].invisible) DisplayPartyPokemonLevelCheck(mon, &gUnknown_0203CEDC[slot], 1); DisplayPartyPokemonHPCheck(mon, &gUnknown_0203CEDC[slot], 1); DisplayPartyPokemonMaxHPCheck(mon, &gUnknown_0203CEDC[slot], 1); DisplayPartyPokemonHPBarCheck(mon, &gUnknown_0203CEDC[slot]); - sub_81B5B38(gUnknown_0203CEDC[slot].unk9, mon); + sub_81B5B38(gUnknown_0203CEDC[slot].monSpriteId, mon); sub_81B0FCC(slot, 1); schedule_bg_copy_tilemap_to_vram(0); } @@ -6030,7 +6071,7 @@ static void sub_81B7704(u8 taskId) if (WaitFanfare(0) && ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON))) { sub_81B3394(); - result = MonTryLearningNewMove(&gPlayerParty[gUnknown_0203CEC8.unk9], 1); + result = MonTryLearningNewMove(&gPlayerParty[gUnknown_0203CEC8.slotId], 1); gUnknown_0203CEC8.unk10 = 1; switch (result) { @@ -6052,7 +6093,7 @@ static void sub_81B7704(u8 taskId) static void sub_81B77AC(u8 taskId) { - u16 result = MonTryLearningNewMove(&gPlayerParty[gUnknown_0203CEC8.unk9], 0); + u16 result = MonTryLearningNewMove(&gPlayerParty[gUnknown_0203CEC8.slotId], 0); switch (result) { @@ -6072,14 +6113,14 @@ static void sub_81B77AC(u8 taskId) static void sub_81B7810(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; + struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; u16 targetSpecies = GetEvolutionTargetSpecies(mon, 0, 0); if (targetSpecies != SPECIES_NONE) { FreePartyPointers(); gCB2_AfterEvolution = gUnknown_0203CEC8.exitCallback; - BeginEvolutionScene(mon, targetSpecies, 1, gUnknown_0203CEC8.unk9); + BeginEvolutionScene(mon, targetSpecies, 1, gUnknown_0203CEC8.slotId); DestroyTask(taskId); } else @@ -6090,7 +6131,7 @@ static void sub_81B7810(u8 taskId) static void sub_81B787C(u8 taskId) { - GetMonNickname(&gPlayerParty[gUnknown_0203CEC8.unk9], gStringVar1); + GetMonNickname(&gPlayerParty[gUnknown_0203CEC8.slotId], gStringVar1); StringCopy(gStringVar2, gMoveNames[gMoveToLearn]); StringExpandPlaceholders(gStringVar4, gText_PkmnNeedsToReplaceMove); sub_81B1B5C(gStringVar4, 1); @@ -6101,7 +6142,7 @@ static void sub_81B787C(u8 taskId) static void sub_81B7910(u8 taskId, u16 move) { - GetMonNickname(&gPlayerParty[gUnknown_0203CEC8.unk9], gStringVar1); + GetMonNickname(&gPlayerParty[gUnknown_0203CEC8.slotId], gStringVar1); StringCopy(gStringVar2, gMoveNames[move]); StringExpandPlaceholders(gStringVar4, gText_PkmnLearnedMove3); sub_81B1B5C(gStringVar4, 1); @@ -6124,13 +6165,13 @@ void sub_81B79E8(u8 taskId, TaskFunc task) { gUnknown_0203CEC4->data[0] = 0; gUnknown_0203CEC4->data[1] = 0; - gUnknown_0203CEC4->data[2] = gUnknown_0203CEC8.unk9; + gUnknown_0203CEC4->data[2] = gUnknown_0203CEC8.slotId; sub_81B7A28(taskId); } static void sub_81B7A28(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; + struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; u16 hp; if (GetMonData(mon, MON_DATA_SPECIES) == SPECIES_NONE) @@ -6140,19 +6181,19 @@ static void sub_81B7A28(u8 taskId) } hp = GetMonData(mon, MON_DATA_HP); - if (ExecuteTableBasedItemEffect__(gUnknown_0203CEC8.unk9, gSpecialVar_ItemId, 0)) + if (ExecuteTableBasedItemEffect__(gUnknown_0203CEC8.slotId, gSpecialVar_ItemId, 0)) { gTasks[taskId].func = task_sacred_ash_party_loop; return; } PlaySE(SE_KAIFUKU); - party_menu_get_status_condition_and_update_object(mon, &gUnknown_0203CEDC[gUnknown_0203CEC8.unk9]); - if (gSprites[gUnknown_0203CEDC[gUnknown_0203CEC8.unk9].unkC].invisible) - DisplayPartyPokemonLevelCheck(mon, &gUnknown_0203CEDC[gUnknown_0203CEC8.unk9], 1); + party_menu_get_status_condition_and_update_object(mon, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId]); + if (gSprites[gUnknown_0203CEDC[gUnknown_0203CEC8.slotId].statusSpriteId].invisible) + DisplayPartyPokemonLevelCheck(mon, &gUnknown_0203CEDC[gUnknown_0203CEC8.slotId], 1); sub_81B0FCC(gUnknown_0203CEC4->data[2], 0); - sub_81B0FCC(gUnknown_0203CEC8.unk9, 1); - sub_81B1F18(taskId, gUnknown_0203CEC8.unk9, 1, GetMonData(mon, MON_DATA_HP) - hp, sub_81B7C10); + sub_81B0FCC(gUnknown_0203CEC8.slotId, 1); + sub_81B1F18(taskId, gUnknown_0203CEC8.slotId, 1, GetMonData(mon, MON_DATA_HP) - hp, sub_81B7C10); sub_81B1FA8(taskId, 0, hp); gUnknown_0203CEC4->data[0] = 1; gUnknown_0203CEC4->data[1] = 1; @@ -6165,9 +6206,9 @@ static void task_sacred_ash_party_loop(u8 taskId) if (gUnknown_0203CEC4->data[0] == 1) { gUnknown_0203CEC4->data[0] = 0; - gUnknown_0203CEC4->data[2] = gUnknown_0203CEC8.unk9; + gUnknown_0203CEC4->data[2] = gUnknown_0203CEC8.slotId; } - if (++(gUnknown_0203CEC8.unk9) == PARTY_SIZE) + if (++(gUnknown_0203CEC8.slotId) == PARTY_SIZE) { if (gUnknown_0203CEC4->data[1] == 0) { @@ -6181,7 +6222,7 @@ static void task_sacred_ash_party_loop(u8 taskId) RemoveBagItem(gSpecialVar_ItemId, 1); } gTasks[taskId].func = sub_81B6794; - gUnknown_0203CEC8.unk9 = 0; + gUnknown_0203CEC8.slotId = 0; } else { @@ -6192,7 +6233,7 @@ static void task_sacred_ash_party_loop(u8 taskId) static void sub_81B7C10(u8 taskId) { - GetMonNickname(&gPlayerParty[gUnknown_0203CEC8.unk9], gStringVar1); + GetMonNickname(&gPlayerParty[gUnknown_0203CEC8.slotId], gStringVar1); StringExpandPlaceholders(gStringVar4, gText_PkmnHPRestoredByVar2); sub_81B1B5C(gStringVar4, 0); schedule_bg_copy_tilemap_to_vram(2); @@ -6203,7 +6244,7 @@ void sub_81B7C74(u8 taskId, TaskFunc task) { PlaySE(SE_SELECT); gCB2_AfterEvolution = gUnknown_0203CEC8.exitCallback; - if (ExecuteTableBasedItemEffect__(gUnknown_0203CEC8.unk9, gSpecialVar_ItemId, 0)) + if (ExecuteTableBasedItemEffect__(gUnknown_0203CEC8.slotId, gSpecialVar_ItemId, 0)) { gUnknown_0203CEE8 = 0; sub_81B1B5C(gText_WontHaveEffect, 1); @@ -6292,7 +6333,7 @@ static void sub_81B7E4C(u8 taskId) if (!gPaletteFade.active) { - mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; + mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; move = &gUnknown_0203CEC8.unkE; GetMonNickname(mon, gStringVar1); gUnknown_0203CEC8.unkE = GetTutorMove(gSpecialVar_0x8005); @@ -6333,7 +6374,7 @@ void sub_81B7F60(void) static void sub_81B7FAC(u8 taskId) { - gUnknown_0203CEFC = GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_HELD_ITEM); + gUnknown_0203CEFC = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_HELD_ITEM); if (gUnknown_0203CEFC == ITEM_NONE) { sub_81B8044(taskId); @@ -6344,7 +6385,7 @@ static void sub_81B7FAC(u8 taskId) } else { - sub_81B1D1C(&gPlayerParty[gUnknown_0203CEC8.unk9], gUnknown_0203CEFC, 1); + sub_81B1D1C(&gPlayerParty[gUnknown_0203CEC8.slotId], gUnknown_0203CEFC, 1); gTasks[taskId].func = sub_81B82A0; } } @@ -6370,8 +6411,8 @@ static void sub_81B8088(u8 taskId) if (!gPaletteFade.active) { item = gUnknown_0203CEC8.unkC; - sub_81B1C84(&gPlayerParty[gUnknown_0203CEC8.unk9], item, 0, 1); - sub_81B1DB8(&gPlayerParty[gUnknown_0203CEC8.unk9], item); + sub_81B1C84(&gPlayerParty[gUnknown_0203CEC8.slotId], item, 0, 1); + sub_81B1DB8(&gPlayerParty[gUnknown_0203CEC8.slotId], item); sub_81B83F0(item); gTasks[taskId].func = sub_81B8104; } @@ -6379,7 +6420,7 @@ static void sub_81B8088(u8 taskId) static void sub_81B8104(u8 taskId) { - s8 slot = gUnknown_0203CEC8.unk9; + s8 slot = gUnknown_0203CEC8.slotId; if (sub_81B1BD4() != TRUE) { @@ -6392,8 +6433,8 @@ static void sub_81B814C(void) { u8 mail; - sub_81B1DB8(&gPlayerParty[gUnknown_0203CEC8.unk9], gUnknown_0203CEC8.unkC); - mail = GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_MAIL); + sub_81B1DB8(&gPlayerParty[gUnknown_0203CEC8.slotId], gUnknown_0203CEC8.unkC); + mail = GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_MAIL); DoEasyChatScreen( EASY_CHAT_TYPE_MAIL, gSaveBlock1Ptr->mail[mail].words, @@ -6403,7 +6444,7 @@ static void sub_81B814C(void) static void sub_81B81A8(void) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; + struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; u16 item = GetMonData(mon, MON_DATA_HELD_ITEM); if (gSpecialVar_Result == FALSE) @@ -6427,7 +6468,7 @@ static void sub_81B8230(u8 taskId) if (gUnknown_0203CEFC != ITEM_NONE) sub_81B1D68(gUnknown_0203CEC8.unkC, gUnknown_0203CEFC, 0); else - sub_81B1C84(&gPlayerParty[gUnknown_0203CEC8.unk9], gUnknown_0203CEC8.unkC, 0, 1); + sub_81B1C84(&gPlayerParty[gUnknown_0203CEC8.slotId], gUnknown_0203CEC8.unkC, 0, 1); gTasks[taskId].func = sub_81B8104; } } @@ -6464,7 +6505,7 @@ static void sub_81B82D4(u8 taskId) } else { - sub_81B1DB8(&gPlayerParty[gUnknown_0203CEC8.unk9], item); + sub_81B1DB8(&gPlayerParty[gUnknown_0203CEC8.slotId], item); sub_81B1D68(item, gUnknown_0203CEFC, 1); gTasks[taskId].func = sub_81B8104; } @@ -6507,7 +6548,7 @@ void sub_81B8448(void) static void sub_81B8474(u8 taskId) { - struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; + struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.slotId]; struct MailStruct *mail; gUnknown_0203CEE8 = 0; @@ -7107,7 +7148,7 @@ static void sub_81B91B4(u8 taskId) for (i = 3; i < PARTY_SIZE; i++) { if (gUnknown_02022FF8[i - 3].species != SPECIES_NONE) - AnimateSelectedPartyIcon(gUnknown_0203CEDC[i].unk9, 0); + AnimateSelectedPartyIcon(gUnknown_0203CEDC[i].monSpriteId, 0); } PlaySE(SE_W231); // Harden SE? gTasks[taskId].func = sub_81B9240; @@ -7138,10 +7179,10 @@ static void sub_81B9294(u8 taskId) { if (gUnknown_02022FF8[i - 3].species != SPECIES_NONE) { - sub_81B9270(gUnknown_0203CEDC[i].unk9, data[0] - 8); - sub_81B9270(gUnknown_0203CEDC[i].unkA, data[0] - 8); - sub_81B9270(gUnknown_0203CEDC[i].unkB, data[0] - 8); - sub_81B9270(gUnknown_0203CEDC[i].unkC, data[0] - 8); + sub_81B9270(gUnknown_0203CEDC[i].monSpriteId, data[0] - 8); + sub_81B9270(gUnknown_0203CEDC[i].itemSpriteId, data[0] - 8); + sub_81B9270(gUnknown_0203CEDC[i].pokeballSpriteId, data[0] - 8); + sub_81B9270(gUnknown_0203CEDC[i].statusSpriteId, data[0] - 8); } } ChangeBgX(2, 0x800, 1); diff --git a/src/pokedex.c b/src/pokedex.c index 2588e2b73..da3f06bf1 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -3855,7 +3855,7 @@ void blockset_load_palette_to_gpu(u8 taskId) otId = ((u16)gTasks[taskId].data[13] << 16) | (u16)gTasks[taskId].data[12]; personality = ((u16)gTasks[taskId].data[15] << 16) | (u16)gTasks[taskId].data[14]; paletteNum = gSprites[gTasks[taskId].data[3]].oam.paletteNum; - lzPaletteData = GetFrontSpritePalFromSpeciesAndPersonality(species, otId, personality); + lzPaletteData = GetMonSpritePalFromSpeciesAndPersonality(species, otId, personality); LoadCompressedPalette(lzPaletteData, 0x100 | paletteNum * 16, 32); DestroyTask(taskId); } diff --git a/src/pokedex_area_screen.c b/src/pokedex_area_screen.c index 1eb8c0953..dc69b5d54 100755 --- a/src/pokedex_area_screen.c +++ b/src/pokedex_area_screen.c @@ -763,11 +763,11 @@ static void sub_813D6B4(void) static void CreateAreaMarkerSprites(void) { u8 spriteId; - static IWRAM_DATA s16 x; - static IWRAM_DATA s16 y; - static IWRAM_DATA s16 i; - static IWRAM_DATA s16 mapSecId; - static IWRAM_DATA s16 numSprites; + static s16 x; + static s16 y; + static s16 i; + static s16 mapSecId; + static s16 numSprites; LoadSpriteSheet(&sAreaMarkerSpriteSheet); LoadSpritePalette(&sAreaMarkerSpritePalette); diff --git a/src/pokemon.c b/src/pokemon.c index fc9a0843f..2485caa50 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -1879,14 +1879,14 @@ static const u16 sDeoxysBaseStats[] = 90, // Sp.Defense }; -const u16 gUnknown_08329D54[] = +const u16 gLinkPlayerFacilityClasses[] = { FACILITY_CLASS_COOLTRAINER_M, FACILITY_CLASS_BLACK_BELT, FACILITY_CLASS_CAMPER, FACILITY_CLASS_YOUNGSTER, FACILITY_CLASS_PSYCHIC_M, FACILITY_CLASS_BUG_CATCHER, - FACILITY_CLASS_PKMN_BREEDER_M, FACILITY_CLASS_GUITARIST, FACILITY_CLASS_COOLTRAINER_F, - FACILITY_CLASS_HEX_MANIAC, FACILITY_CLASS_PICNICKER, FACILITY_CLASS_LASS, - FACILITY_CLASS_PSYCHIC_F, FACILITY_CLASS_BATTLE_GIRL, FACILITY_CLASS_POKEMON_BREEDER_F, - FACILITY_CLASS_BEAUTY + FACILITY_CLASS_PKMN_BREEDER_M, FACILITY_CLASS_GUITARIST, + FACILITY_CLASS_COOLTRAINER_F, FACILITY_CLASS_HEX_MANIAC, FACILITY_CLASS_PICNICKER, + FACILITY_CLASS_LASS, FACILITY_CLASS_PSYCHIC_F, FACILITY_CLASS_BATTLE_GIRL, + FACILITY_CLASS_POKEMON_BREEDER_F, FACILITY_CLASS_BEAUTY }; static const u8 sHoldEffectToType[][2] = @@ -2183,7 +2183,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV, { value = Random32(); shinyValue = HIHALF(value) ^ LOHALF(value) ^ HIHALF(personality) ^ LOHALF(personality); - } while (shinyValue < 8); + } while (shinyValue < SHINY_ODDS); } else if (otIdType == OT_ID_PRESET) //Pokemon has a preset OT ID { @@ -2248,10 +2248,10 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV, SetBoxMonData(boxMon, MON_DATA_SPDEF_IV, &iv); } - if (gBaseStats[species].ability2) + if (gBaseStats[species].abilities[1]) { value = personality & 1; - SetBoxMonData(boxMon, MON_DATA_ALT_ABILITY, &value); + SetBoxMonData(boxMon, MON_DATA_ABILITY_NUM, &value); } GiveBoxMonInitialMoveset(boxMon); @@ -2402,8 +2402,8 @@ void CreateBattleTowerMon(struct Pokemon *mon, struct BattleTowerPokemon *src) SetMonData(mon, MON_DATA_SPEED_EV, &src->speedEV); SetMonData(mon, MON_DATA_SPATK_EV, &src->spAttackEV); SetMonData(mon, MON_DATA_SPDEF_EV, &src->spDefenseEV); - value = src->altAbility; - SetMonData(mon, MON_DATA_ALT_ABILITY, &value); + value = src->abilityNum; + SetMonData(mon, MON_DATA_ABILITY_NUM, &value); value = src->hpIV; SetMonData(mon, MON_DATA_HP_IV, &value); value = src->attackIV; @@ -2464,8 +2464,8 @@ void CreateBattleTowerMon2(struct Pokemon *mon, struct BattleTowerPokemon *src, SetMonData(mon, MON_DATA_SPEED_EV, &src->speedEV); SetMonData(mon, MON_DATA_SPATK_EV, &src->spAttackEV); SetMonData(mon, MON_DATA_SPDEF_EV, &src->spDefenseEV); - value = src->altAbility; - SetMonData(mon, MON_DATA_ALT_ABILITY, &value); + value = src->abilityNum; + SetMonData(mon, MON_DATA_ABILITY_NUM, &value); value = src->hpIV; SetMonData(mon, MON_DATA_HP_IV, &value); value = src->attackIV; @@ -2580,7 +2580,7 @@ void sub_80686FC(struct Pokemon *mon, struct BattleTowerPokemon *dest) dest->speedIV = GetMonData(mon, MON_DATA_SPEED_IV, NULL); dest->spAttackIV = GetMonData(mon, MON_DATA_SPATK_IV, NULL); dest->spDefenseIV = GetMonData(mon, MON_DATA_SPDEF_IV, NULL); - dest->altAbility = GetMonData(mon, MON_DATA_ALT_ABILITY, NULL); + dest->abilityNum = GetMonData(mon, MON_DATA_ABILITY_NUM, NULL); dest->personality = GetMonData(mon, MON_DATA_PERSONALITY, NULL); GetMonData(mon, MON_DATA_NICKNAME, dest->nickname); } @@ -2711,7 +2711,7 @@ u16 sub_8068B48(void) arrId = gLinkPlayers[linkId].trainerId & 7; arrId |= gLinkPlayers[linkId].gender << 3; - return FacilityClassToPicIndex(gUnknown_08329D54[arrId]); + return FacilityClassToPicIndex(gLinkPlayerFacilityClasses[arrId]); } u16 sub_8068BB0(void) @@ -2726,7 +2726,7 @@ u16 sub_8068BB0(void) arrId = gLinkPlayers[linkId].trainerId & 7; arrId |= gLinkPlayers[linkId].gender << 3; - return gFacilityClassToTrainerClass[gUnknown_08329D54[arrId]]; + return gFacilityClassToTrainerClass[gLinkPlayerFacilityClasses[arrId]]; } void CreateObedientEnemyMon(void) @@ -3642,7 +3642,8 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data) struct PokemonSubstruct2 *substruct2 = NULL; struct PokemonSubstruct3 *substruct3 = NULL; - if (field > MON_DATA_10) + // Any field greater than MON_DATA_ENCRYPT_SEPARATOR is encrypted and must be treated as such + if (field > MON_DATA_ENCRYPT_SEPARATOR) { substruct0 = &(GetSubstruct(boxMon, boxMon->personality, 0)->type0); substruct1 = &(GetSubstruct(boxMon, boxMon->personality, 1)->type1); @@ -3736,7 +3737,7 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data) case MON_DATA_CHECKSUM: retVal = boxMon->checksum; break; - case MON_DATA_10: + case MON_DATA_ENCRYPT_SEPARATOR: retVal = boxMon->unknown; break; case MON_DATA_SPECIES: @@ -3841,8 +3842,8 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data) case MON_DATA_IS_EGG: retVal = substruct3->isEgg; break; - case MON_DATA_ALT_ABILITY: - retVal = substruct3->altAbility; + case MON_DATA_ABILITY_NUM: + retVal = substruct3->abilityNum; break; case MON_DATA_COOL_RIBBON: retVal = substruct3->coolRibbon; @@ -3977,7 +3978,7 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data) break; } - if (field > MON_DATA_10) + if (field > MON_DATA_ENCRYPT_SEPARATOR) EncryptBoxMon(boxMon); return retVal; @@ -4040,7 +4041,7 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg) struct PokemonSubstruct2 *substruct2 = NULL; struct PokemonSubstruct3 *substruct3 = NULL; - if (field > MON_DATA_10) + if (field > MON_DATA_ENCRYPT_SEPARATOR) { substruct0 = &(GetSubstruct(boxMon, boxMon->personality, 0)->type0); substruct1 = &(GetSubstruct(boxMon, boxMon->personality, 1)->type1); @@ -4099,7 +4100,7 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg) case MON_DATA_CHECKSUM: SET16(boxMon->checksum); break; - case MON_DATA_10: + case MON_DATA_ENCRYPT_SEPARATOR: SET16(boxMon->unknown); break; case MON_DATA_SPECIES: @@ -4220,8 +4221,8 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg) else boxMon->isEgg = 0; break; - case MON_DATA_ALT_ABILITY: - SET8(substruct3->altAbility); + case MON_DATA_ABILITY_NUM: + SET8(substruct3->abilityNum); break; case MON_DATA_COOL_RIBBON: SET8(substruct3->coolRibbon); @@ -4295,7 +4296,7 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg) break; } - if (field > MON_DATA_10) + if (field > MON_DATA_ENCRYPT_SEPARATOR) { boxMon->checksum = CalculateBoxMonChecksum(boxMon); EncryptBoxMon(boxMon); @@ -4428,12 +4429,12 @@ u8 GetMonsStateToDoubles_2(void) return (aliveCount > 1) ? PLAYER_HAS_TWO_USABLE_MONS : PLAYER_HAS_ONE_USABLE_MON; } -u8 GetAbilityBySpecies(u16 species, bool8 altAbility) +u8 GetAbilityBySpecies(u16 species, bool8 abilityNum) { - if (altAbility) - gLastUsedAbility = gBaseStats[species].ability2; + if (abilityNum) + gLastUsedAbility = gBaseStats[species].abilities[1]; else - gLastUsedAbility = gBaseStats[species].ability1; + gLastUsedAbility = gBaseStats[species].abilities[0]; return gLastUsedAbility; } @@ -4441,8 +4442,8 @@ u8 GetAbilityBySpecies(u16 species, bool8 altAbility) u8 GetMonAbility(struct Pokemon *mon) { u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); - u8 altAbility = GetMonData(mon, MON_DATA_ALT_ABILITY, NULL); - return GetAbilityBySpecies(species, altAbility); + u8 abilityNum = GetMonData(mon, MON_DATA_ABILITY_NUM, NULL); + return GetAbilityBySpecies(species, abilityNum); } void CreateSecretBaseEnemyParty(struct SecretBase *secretBaseRecord) @@ -4585,11 +4586,11 @@ void CopyPlayerPartyMonToBattleData(u8 battlerId, u8 partyIndex) gBattleMons[battlerId].spAttack = GetMonData(&gPlayerParty[partyIndex], MON_DATA_SPATK, NULL); gBattleMons[battlerId].spDefense = GetMonData(&gPlayerParty[partyIndex], MON_DATA_SPDEF, NULL); gBattleMons[battlerId].isEgg = GetMonData(&gPlayerParty[partyIndex], MON_DATA_IS_EGG, NULL); - gBattleMons[battlerId].altAbility = GetMonData(&gPlayerParty[partyIndex], MON_DATA_ALT_ABILITY, NULL); + gBattleMons[battlerId].abilityNum = GetMonData(&gPlayerParty[partyIndex], MON_DATA_ABILITY_NUM, NULL); gBattleMons[battlerId].otId = GetMonData(&gPlayerParty[partyIndex], MON_DATA_OT_ID, NULL); gBattleMons[battlerId].type1 = gBaseStats[gBattleMons[battlerId].species].type1; gBattleMons[battlerId].type2 = gBaseStats[gBattleMons[battlerId].species].type2; - gBattleMons[battlerId].ability = GetAbilityBySpecies(gBattleMons[battlerId].species, gBattleMons[battlerId].altAbility); + gBattleMons[battlerId].ability = GetAbilityBySpecies(gBattleMons[battlerId].species, gBattleMons[battlerId].abilityNum); GetMonData(&gPlayerParty[partyIndex], MON_DATA_NICKNAME, nickname); StringCopy10(gBattleMons[battlerId].nickname, nickname); GetMonData(&gPlayerParty[partyIndex], MON_DATA_OT_NAME, gBattleMons[battlerId].otName); @@ -6320,10 +6321,10 @@ const u32 *GetMonFrontSpritePal(struct Pokemon *mon) u16 species = GetMonData(mon, MON_DATA_SPECIES2, 0); u32 otId = GetMonData(mon, MON_DATA_OT_ID, 0); u32 personality = GetMonData(mon, MON_DATA_PERSONALITY, 0); - return GetFrontSpritePalFromSpeciesAndPersonality(species, otId, personality); + return GetMonSpritePalFromSpeciesAndPersonality(species, otId, personality); } -const u32 *GetFrontSpritePalFromSpeciesAndPersonality(u16 species, u32 otId, u32 personality) +const u32 *GetMonSpritePalFromSpeciesAndPersonality(u16 species, u32 otId, u32 personality) { u32 shinyValue; @@ -6331,7 +6332,7 @@ const u32 *GetFrontSpritePalFromSpeciesAndPersonality(u16 species, u32 otId, u32 return gMonPaletteTable[0].data; shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality); - if (shinyValue < 8) + if (shinyValue < SHINY_ODDS) return gMonShinyPaletteTable[species].data; else return gMonPaletteTable[species].data; @@ -6350,7 +6351,7 @@ const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u u32 shinyValue; shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality); - if (shinyValue < 8) + if (shinyValue < SHINY_ODDS) return &gMonShinyPaletteTable[species]; else return &gMonPaletteTable[species]; @@ -6524,7 +6525,7 @@ bool8 IsShinyOtIdPersonality(u32 otId, u32 personality) { bool8 retVal = FALSE; u32 shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality); - if (shinyValue < 8) + if (shinyValue < SHINY_ODDS) retVal = TRUE; return retVal; } diff --git a/src/pokemon_animation.c b/src/pokemon_animation.c index 52fa6db51..340327475 100644 --- a/src/pokemon_animation.c +++ b/src/pokemon_animation.c @@ -177,9 +177,9 @@ static void SpriteCB_SetDummyOnAnimEnd(struct Sprite *sprite); #define STRUCT_COUNT 4 // IWRAM bss -static IWRAM_DATA struct UnkAnimStruct sUnknown_03001240[STRUCT_COUNT]; -static IWRAM_DATA u8 sUnknown_03001270; -static IWRAM_DATA bool32 sUnknown_03001274; +static struct UnkAnimStruct sUnknown_03001240[STRUCT_COUNT]; +static u8 sUnknown_03001270; +static bool32 sUnknown_03001274; // const rom data static const u8 sSpeciesToBackAnimSet[] = @@ -861,16 +861,27 @@ u8 GetSpeciesBackAnimSet(u16 species) } #define tState data[0] -#define tPtrLO data[1] -#define tPtrHI data[2] +#define tPtrHi data[1] +#define tPtrLo data[2] #define tAnimId data[3] #define tSaved0 data[4] #define tSaved2 data[5] +// BUG: In vanilla, tPtrLo is read as an s16, so if bit 15 of the +// address were to be set it would cause the pointer to be read +// as 0xFFFFXXXX instead of the desired 0x02YYXXXX. +// By dumb luck, this is not an issue in vanilla. However, +// changing the link order revealed this bug. +#if MODERN +#define ANIM_SPRITE(taskId) ((struct Sprite *)((gTasks[taskId].tPtrHi << 16) | ((u16)gTasks[taskId].tPtrLo))) +#else +#define ANIM_SPRITE(taskId) ((struct Sprite *)((gTasks[taskId].tPtrHi << 16) | (gTasks[taskId].tPtrLo))) +#endif //MODERN + static void Task_HandleMonAnimation(u8 taskId) { u32 i; - struct Sprite *sprite = (struct Sprite*)(u32)((gTasks[taskId].tPtrLO << 0x10) | (gTasks[taskId].tPtrHI)); + struct Sprite *sprite = ANIM_SPRITE(taskId); if (gTasks[taskId].tState == 0) { @@ -900,8 +911,8 @@ static void Task_HandleMonAnimation(u8 taskId) void LaunchAnimationTaskForFrontSprite(struct Sprite *sprite, u8 frontAnimId) { u8 taskId = CreateTask(Task_HandleMonAnimation, 128); - gTasks[taskId].tPtrLO = (u32)(sprite) >> 0x10; - gTasks[taskId].tPtrHI = (u32)(sprite); + gTasks[taskId].tPtrHi = (u32)(sprite) >> 0x10; + gTasks[taskId].tPtrLo = (u32)(sprite); gTasks[taskId].tAnimId = frontAnimId; } @@ -916,8 +927,8 @@ void LaunchAnimationTaskForBackSprite(struct Sprite *sprite, u8 backAnimSet) u8 nature, taskId, animId, battlerId; taskId = CreateTask(Task_HandleMonAnimation, 128); - gTasks[taskId].tPtrLO = (u32)(sprite) >> 0x10; - gTasks[taskId].tPtrHI = (u32)(sprite); + gTasks[taskId].tPtrHi = (u32)(sprite) >> 0x10; + gTasks[taskId].tPtrLo = (u32)(sprite); battlerId = sprite->data[0]; nature = GetNature(&gPlayerParty[gBattlerPartyIndexes[battlerId]]); @@ -927,8 +938,8 @@ void LaunchAnimationTaskForBackSprite(struct Sprite *sprite, u8 backAnimSet) } #undef tState -#undef tPtrLO -#undef tPtrHI +#undef tPtrHi +#undef tPtrLo #undef tAnimId #undef tSaved0 #undef tSaved2 diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 6a135875e..ee68de326 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -1223,7 +1223,7 @@ u8 GetValidMonIconPalIndex(u16 species) return gMonIconPaletteIndices[species]; } -u8 sub_80D30A0(u16 species) +u8 GetMonIconPaletteIndexFromSpecies(u16 species) { return gMonIconPaletteIndices[species]; } diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index 4a457adc4..5272b3292 100755 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -1,7 +1,9 @@ #include "global.h" #include "alloc.h" +#include "bg.h" #include "data.h" #include "decompress.h" +#include "dynamic_placeholder_text_util.h" #include "event_data.h" #include "item.h" #include "link.h" @@ -10,11 +12,14 @@ #include "menu.h" #include "palette.h" #include "random.h" +#include "rom_8034C54.h" #include "save.h" #include "sound.h" #include "sprite.h" #include "string_util.h" +#include "strings.h" #include "task.h" +#include "text_window.h" #include "trig.h" #include "pokemon.h" #include "pokemon_jump.h" @@ -43,6 +48,33 @@ struct PokemonJump1_82E4 u8 unk1C[11]; }; +struct PokemonJump2 +{ + int unk0; + u16 unk4; + u8 unk6; + u8 filler7[0xa - 0x7]; + u8 unkA; + u8 unkB; + u8 unkC; + u8 unkD; + u8 unkE; + u8 unkF; + u16 filler10; + u16 unk12; + u16 unk14; + u8 filler16[0x1c - 0x16]; + u16 unk1C[5]; + u8 txtBuff[2][0x40]; + u8 strBuff[0x100]; + u16 tilemapBuffer[(0x81a8 - 0x1a6) / 2]; // 0x1A6 + struct Sprite *unk81A8[MAX_RFU_PLAYERS]; + struct Sprite *unk81BC[MAX_RFU_PLAYERS]; + struct Sprite *unk81D0[8]; + u8 filler81F0[0xC]; + u8 unk81FC[MAX_RFU_PLAYERS]; +}; + struct PokemonJump1 { MainCallback returnCallback; @@ -102,8 +134,7 @@ struct PokemonJump1 u8 unk8B[MAX_RFU_PLAYERS]; u16 unk90[MAX_RFU_PLAYERS]; u16 unk9A[MAX_RFU_PLAYERS]; - void **unkA4; - u8 fillerA8[0x8200]; + struct PokemonJump2 unkA4; struct PokemonJump1_MonInfo unk82A8[MAX_RFU_PLAYERS]; struct PokemonJump1_82E4 unk82E4[MAX_RFU_PLAYERS]; struct PokemonJump1_82E4 *unk83AC; @@ -125,20 +156,6 @@ struct Unk802B078 int unk8; }; - -struct PokemonJump2 -{ - u8 filler0[0xE]; - u8 unkE; - u8 unkF; - u8 filler10[0x8198]; - struct Sprite *unk81A8[MAX_RFU_PLAYERS]; - struct Sprite *unk81BC[MAX_RFU_PLAYERS]; - struct Sprite *unk81D0[8]; - u8 filler81F0[0xC]; - u8 unk81FC[MAX_RFU_PLAYERS]; -}; - static void sub_802AA60(struct PokemonJump1 *); void sub_802AA94(struct PokemonJump1 *); void sub_802AB20(void); @@ -216,15 +233,16 @@ static void sub_802CC40(struct Sprite *sprite); static void sub_802CD08(struct Sprite *sprite); static void sub_802CDD4(struct Sprite *sprite); void sub_802DC9C(u32); -void sub_802D074(void *); +void sub_802D074(struct PokemonJump2 *); +void sub_802D0BC(struct PokemonJump2 *); void sub_802D0AC(void); void sub_802D0C8(int); -int sub_802D0F0(void); +bool32 sub_802D0F0(void); void sub_802D764(void); bool32 sub_802D788(void); -void sub_802D7E8(u16, u16); -void sub_802D884(u16); -void sub_802D8FC(u16); +void sub_802D7E8(u16 itemId, u16 quantity); +void sub_802D884(u16 itemId); +void sub_802D8FC(u16 itemId); bool32 sub_802D974(void); void sub_802DA14(void); void sub_802DC80(int, s8); @@ -249,9 +267,10 @@ bool32 sub_802E264(struct PokemonJump1_82E4 *, int, u8 *, u16 *); bool32 sub_802E2D0(struct PokemonJump1_82E4 *, int); int sub_802E354(int, u16, u16); void sub_802E3A8(void); +void sub_802D12C(u8 taskId); -extern struct PokemonJump1 *gUnknown_02022CFC; -extern struct PokemonJump2 *gUnknown_02022D00; +EWRAM_DATA struct PokemonJump1 *gUnknown_02022CFC = NULL; +EWRAM_DATA struct PokemonJump2 *gUnknown_02022D00 = NULL; const struct PokemonJumpMons gPkmnJumpSpecies[] = { @@ -388,15 +407,33 @@ extern const u16 gUnknown_082FB64C[4]; extern const u16 gUnknown_082FB654[]; extern const s8 gUnknown_082FB65C[][48]; extern const int gUnknown_082FB6EC[]; -extern const int gUnknown_082FB714[]; +extern const u32 gUnknown_082FB714[][2]; extern const u16 gUnknown_082FB704[8]; extern const struct CompressedSpriteSheet gUnknown_082FBE08[5]; extern const struct SpritePalette gUnknown_082FBE30[2]; extern const struct SpriteTemplate gUnknown_082FBE40; extern const struct SpriteTemplate gUnknown_082FC00C; -extern const s16 gUnknown_082FBE58[]; +extern const s16 gUnknown_082FBE58[][10]; extern const s16 gUnknown_082FBEA8[8]; -extern const struct SpriteTemplate gUnknown_082FBEB8[4]; +extern const struct SpriteTemplate *gUnknown_082FBEB8[4]; +extern const struct BgTemplate gUnknown_082FE164[4]; +extern const struct WindowTemplate gUnknown_082FE174[]; +extern const u16 gPkmnJumpBgPal[]; +extern const u16 gPkmnJumpVenusaurPal[]; +extern const u16 gPkmnJumpResultsPal[]; +extern const u16 gPkmnJumpPal3[]; +extern const u32 gPkmnJumpVenusaurGfx[]; +extern const u32 gPkmnJumpBgTilemap[]; +extern const u32 gPkmnJumpBgGfx[]; +extern const u32 gPkmnJumpVenusaurTilemap[]; +extern const u32 gPkmnJumpResultsGfx[]; +extern const u32 gPkmnJumpResultsTilemap[]; + +struct +{ + int id; + void (*func)(void); +} extern const gUnknown_082FE18C[10]; void sub_802A9A8(u16 partyIndex, MainCallback callback) { @@ -1145,8 +1182,6 @@ static bool32 sub_802B720(void) static bool32 sub_802B7E0(void) { - int var0; - switch (gUnknown_02022CFC->unkA) { case 0: @@ -1155,8 +1190,7 @@ static bool32 sub_802B7E0(void) gUnknown_02022CFC->unkA++; break; case 1: - var0 = sub_802D0F0(); - if (!var0) + if (!sub_802D0F0()) { sub_802DDF4(gUnknown_02022CFC->unk6); gUnknown_02022CFC->unk3C = 0; @@ -1813,7 +1847,7 @@ static void sub_802C398(int multiplayerId) sub_802DC80(multiplayerId, var1); if (!var1 && multiplayerId == gUnknown_02022CFC->unk6) sub_802C1BC(); - + player->unk0 = var1; } @@ -2028,7 +2062,7 @@ static void sub_802C7A0(u16 arg0) static bool32 sub_802C7BC(void) { - if (gUnknown_02022CFC->unk78 >= gUnknown_082FB714[0]) + if (gUnknown_02022CFC->unk78 >= gUnknown_082FB714[0][0]) return TRUE; else return FALSE; @@ -2053,6 +2087,22 @@ static u16 sub_802C818(void) return gUnknown_082FB704[index]; } +#ifdef NONMATCHING +// Impossible to match. +static u16 sub_802C838(void) +{ + u32 val, i; + + val = 0; + for (i = 0; i < 5; val = gUnknown_082FB714[i][1], i++) + { + if (gUnknown_02022CFC->unk78 < gUnknown_082FB714[i][0]) + break; + } + + return val; +} +#else NAKED static u16 sub_802C838(void) { @@ -2091,12 +2141,13 @@ _0802C874:\n\ pop {r1}\n\ bx r1"); } +#endif static u16 sub_802C880(u16 item, u16 quantity) { while (quantity && !CheckBagHasSpace(item, quantity)) quantity--; - + return quantity; } @@ -2151,7 +2202,7 @@ void sub_802C974(struct PokemonJump2 *arg0) for (i = 0; i < ARRAY_COUNT(gUnknown_082FBE08); i++) LoadCompressedSpriteSheet(&gUnknown_082FBE08[i]); - + for (i = 0; i < ARRAY_COUNT(gUnknown_082FBE30); i++) LoadSpritePalette(&gUnknown_082FBE30[i]); @@ -2197,7 +2248,7 @@ void sub_802C9D4(struct PokemonJump2 *arg0, struct PokemonJump1_MonInfo *jumpMon spriteSheet.size = 0x800; LoadSpriteSheet(&spriteSheet); - spritePalette.data = GetFrontSpritePalFromSpeciesAndPersonality(jumpMon->species, jumpMon->otId, jumpMon->personality); + spritePalette.data = GetMonSpritePalFromSpeciesAndPersonality(jumpMon->species, jumpMon->otId, jumpMon->personality); spritePalette.tag = multiplayerId; LoadCompressedSpritePalette(&spritePalette); @@ -2382,25 +2433,557 @@ void sub_802CE48(struct PokemonJump2 *arg0, s16 x, s16 y, u8 multiplayerId) } } -// void sub_802CE9C(struct PokemonJump2 *arg0) -// { -// int i; -// int count; -// u8 spriteId; - -// count = 0; -// for (i = 0; i < 4; i++) -// { -// spriteId = CreateSprite(&gUnknown_082FBEB8[i], gUnknown_082FBEA8[count], gUnknown_082FBE58[i * 10], 2); -// arg0->unk81D0[count] = &gSprites[spriteId]; -// count++; -// } - -// for (i = 0; i < 4; i++) -// { -// spriteId = CreateSprite(&gUnknown_082FBEB8[i], gUnknown_082FBEA8[count], gUnknown_082FBE58[i * 10], 2); -// arg0->unk81D0[count] = &gSprites[spriteId]; -// arg0->unk81D0[count]->hFlip = 1; -// count++; -// } -// } +void sub_802CE9C(struct PokemonJump2 *arg0) +{ + int i; + int count; + u8 spriteId; + + count = 0; + for (i = 0; i < 4; i++) + { + spriteId = CreateSprite(gUnknown_082FBEB8[i], gUnknown_082FBEA8[count], gUnknown_082FBE58[i][0], 2); + arg0->unk81D0[count] = &gSprites[spriteId]; + count++; + } + + for (i = 3; i >= 0; i--) + { + spriteId = CreateSprite(gUnknown_082FBEB8[i], gUnknown_082FBEA8[count], gUnknown_082FBE58[i][0], 2); + arg0->unk81D0[count] = &gSprites[spriteId]; + arg0->unk81D0[count]->hFlip = 1; + count++; + } +} + +void sub_802CF50(struct PokemonJump2 *arg0, int arg1) +{ + int i, count, palNum; + int priority; + + if (arg1 > 5) + { + arg1 = 10 - arg1; + priority = 3; + palNum = arg0->unkF; + } + else + { + priority = 2; + palNum = arg0->unkE; + } + + count = 0; + for (i = 0; i < 4; i++) + { + arg0->unk81D0[count]->pos1.y = gUnknown_082FBE58[i][arg1]; + arg0->unk81D0[count]->oam.priority = priority; + arg0->unk81D0[count]->oam.paletteNum = palNum; + StartSpriteAnim(arg0->unk81D0[count], arg1); + count++; + } + + for (i = 3; i >= 0; i--) + { + arg0->unk81D0[count]->pos1.y = gUnknown_082FBE58[i][arg1]; + arg0->unk81D0[count]->oam.priority = priority; + arg0->unk81D0[count]->oam.paletteNum = palNum; + StartSpriteAnim(arg0->unk81D0[count], arg1); + count++; + } +} + +void sub_802D044(struct PokemonJump2 *arg0) +{ + sub_802EB24(9, 7, 120, 80, 0); + sub_802CD3C(arg0); +} + +bool32 sub_802D068(void) +{ + return sub_802EB84(); +} + +void sub_802D150(void); +void sub_802DD08(void); +void sub_802DB8C(void); +void sub_802DBF8(void); +void sub_802DE1C(void); +void sub_802DFD4(void); +void sub_802D108(void (*func)(void)); +void sub_802DF70(int arg0); +u32 sub_802DA9C(u8 arg0, u8 arg1, u8 arg2, u8 arg3); +void sub_802DB18(u8 arg0, u8 arg1, u8 arg2); + +void sub_802D074(struct PokemonJump2 *arg0) +{ + u8 taskId; + + gUnknown_02022D00 = arg0; + sub_802D0BC(gUnknown_02022D00); + taskId = CreateTask(sub_802D12C, 3); + gUnknown_02022D00->unk6 = taskId; + SetWordTaskArg(gUnknown_02022D00->unk6, 2, (u32) gUnknown_02022D00); + sub_802D108(sub_802D150); +} + +void sub_802D0AC(void) +{ + FreeAllWindowBuffers(); + sub_8034CC8(); +} + +void sub_802D0BC(struct PokemonJump2 *arg0) +{ + arg0->unk4 = 0; + arg0->unk0 = 0; + arg0->unk12 = 0xFF; +} + +void sub_802D0C8(int arg0) +{ + int i; + + for (i = 0; i < ARRAY_COUNT(gUnknown_082FE18C); i++) + { + if (gUnknown_082FE18C[i].id == arg0) + sub_802D108(gUnknown_082FE18C[i].func); + } +} + +bool32 sub_802D0F0(void) +{ + return (gUnknown_02022D00->unk0 != 1); +} + +void sub_802D108(void (*func)(void)) +{ + SetWordTaskArg(gUnknown_02022D00->unk6, 0, (u32) func); + gUnknown_02022D00->unk4 = 0; + gUnknown_02022D00->unk0 = 0; +} + +void sub_802D12C(u8 taskId) +{ + if (!gUnknown_02022D00->unk0) + { + void (*func)(void) = (void *)(GetWordTaskArg(taskId, 0)); + + func(); + } +} + +void sub_802D150(void) +{ + switch (gUnknown_02022D00->unk4) + { + case 0: + ResetBgsAndClearDma3BusyFlags(0); + InitBgsFromTemplates(0, gUnknown_082FE164, ARRAY_COUNT(gUnknown_082FE164)); + InitWindows(gUnknown_082FE174); + reset_temp_tile_data_buffers(); + sub_802C974(gUnknown_02022D00); + sub_802DD08(); + LoadPalette(gPkmnJumpBgPal, 0, 0x20); + decompress_and_copy_tile_data_to_vram(3, gPkmnJumpBgGfx, 0, 0, 0); + decompress_and_copy_tile_data_to_vram(3, gPkmnJumpBgTilemap, 0, 0, 1); + LoadPalette(gPkmnJumpVenusaurPal, 0x30, 0x20); + decompress_and_copy_tile_data_to_vram(2, gPkmnJumpVenusaurGfx, 0, 0, 0); + decompress_and_copy_tile_data_to_vram(2, gPkmnJumpVenusaurTilemap, 0, 0, 1); + LoadPalette(gPkmnJumpResultsPal, 0x10, 0x20); + decompress_and_copy_tile_data_to_vram(1, gPkmnJumpResultsGfx, 0, 0, 0); + decompress_and_copy_tile_data_to_vram(1, gPkmnJumpResultsTilemap, 0, 0, 1); + LoadPalette(gPkmnJumpPal3, 0x20, 0x20); + SetBgTilemapBuffer(0, gUnknown_02022D00->tilemapBuffer); + FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20); + sub_802DB8C(); + sub_802DD64(0); + sub_8098C6C(0, 1, 0xE0); + CopyBgTilemapBufferToVram(0); + CopyBgTilemapBufferToVram(2); + CopyBgTilemapBufferToVram(1); + ResetBgPositions(); + gUnknown_02022D00->unk4++; + break; + case 1: + if (!free_temp_tile_data_buffers_if_possible()) + { + sub_802DBF8(); + sub_802CE9C(gUnknown_02022D00); + sub_802CF50(gUnknown_02022D00, 6); + ShowBg(3); + ShowBg(0); + ShowBg(2); + HideBg(1); + gUnknown_02022D00->unk4++; + } + break; + case 2: + gUnknown_02022D00->unk0 = 1; + break; + } +} + +void sub_802D2E4(void) +{ + switch (gUnknown_02022D00->unk4) + { + case 0: + sub_802DE1C(); + gUnknown_02022D00->unk4++; + break; + case 1: + if (!IsDma3ManagerBusyWithBgCopy()) + { + sub_802DF70(0); + gUnknown_02022D00->unk4++; + } + break; + case 2: + if (!IsDma3ManagerBusyWithBgCopy()) + { + sub_802DFD4(); + gUnknown_02022D00->unk4++; + } + break; + case 3: + if (!IsDma3ManagerBusyWithBgCopy()) + gUnknown_02022D00->unk0 = 1; + break; + } +} + +void sub_802D350(void) +{ + switch (gUnknown_02022D00->unk4) + { + case 0: + sub_802DE1C(); + gUnknown_02022D00->unk4++; + break; + case 1: + if (!IsDma3ManagerBusyWithBgCopy()) + { + sub_802DF70(1); + gUnknown_02022D00->unk4++; + } + break; + case 2: + if (!IsDma3ManagerBusyWithBgCopy()) + { + sub_802DFD4(); + gUnknown_02022D00->unk4++; + } + break; + case 3: + if (!IsDma3ManagerBusyWithBgCopy()) + gUnknown_02022D00->unk0 = 1; + break; + } +} + +void sub_802D3BC(void) +{ + int i, numPlayers; + + numPlayers = sub_802C8AC(); + switch (gUnknown_02022D00->unk4) + { + case 0: + for (i = 0; i < numPlayers; i++) + ClearWindowTilemap(gUnknown_02022D00->unk1C[i]); + + CopyBgTilemapBufferToVram(0); + gUnknown_02022D00->unk4++; + break; + case 1: + if (!IsDma3ManagerBusyWithBgCopy()) + { + for (i = 0; i < numPlayers; i++) + RemoveWindow(gUnknown_02022D00->unk1C[i]); + + gUnknown_02022D00->unk0 = 1; + } + break; + } +} + +void sub_802D448(void) +{ + switch (gUnknown_02022D00->unk4) + { + case 0: + gUnknown_02022D00->unk12 = sub_802DA9C(1, 8, 20, 2); + AddTextPrinterParameterized(gUnknown_02022D00->unk12, 1, gText_WantToPlayAgain2, 0, 1, TEXT_SPEED_FF, NULL); + CopyWindowToVram(gUnknown_02022D00->unk12, 2); + gUnknown_02022D00->unk4++; + break; + case 1: + if (!IsDma3ManagerBusyWithBgCopy()) + { + PutWindowTilemap(gUnknown_02022D00->unk12); + DrawTextBorderOuter(gUnknown_02022D00->unk12, 1, 14); + sub_802DB18(23, 7, 0); + CopyBgTilemapBufferToVram(0); + gUnknown_02022D00->unk4++; + } + break; + case 2: + if (!IsDma3ManagerBusyWithBgCopy()) + gUnknown_02022D00->unk0 = 1; + break; + } +} + +void sub_802D4F4(void) +{ + switch (gUnknown_02022D00->unk4) + { + case 0: + gUnknown_02022D00->unk12 = sub_802DA9C(2, 7, 26, 4); + AddTextPrinterParameterized(gUnknown_02022D00->unk12, 1, gText_SavingDontTurnOffPower, 0, 1, TEXT_SPEED_FF, NULL); + CopyWindowToVram(gUnknown_02022D00->unk12, 2); + gUnknown_02022D00->unk4++; + break; + case 1: + if (!IsDma3ManagerBusyWithBgCopy()) + { + PutWindowTilemap(gUnknown_02022D00->unk12); + DrawTextBorderOuter(gUnknown_02022D00->unk12, 1, 14); + CopyBgTilemapBufferToVram(0); + gUnknown_02022D00->unk4++; + } + break; + case 2: + if (!IsDma3ManagerBusyWithBgCopy()) + gUnknown_02022D00->unk0 = 1; + break; + } +} + +void sub_802D598(void) +{ + switch (gUnknown_02022D00->unk4) + { + case 0: + sub_802DA14(); + sub_8198C78(); + CopyBgTilemapBufferToVram(0); + gUnknown_02022D00->unk4++; + break; + case 1: + if (!sub_802DA44() && !IsDma3ManagerBusyWithBgCopy()) + gUnknown_02022D00->unk0 = 1; + break; + } +} + +void sub_802D5E4(void) +{ + switch (gUnknown_02022D00->unk4) + { + case 0: + gUnknown_02022D00->unk12 = sub_802DA9C(2, 8, 22, 4); + AddTextPrinterParameterized(gUnknown_02022D00->unk12, 1, gText_SomeoneDroppedOut2, 0, 1, TEXT_SPEED_FF, NULL); + CopyWindowToVram(gUnknown_02022D00->unk12, 2); + gUnknown_02022D00->unk4++; + break; + case 1: + if (!IsDma3ManagerBusyWithBgCopy()) + { + PutWindowTilemap(gUnknown_02022D00->unk12); + DrawTextBorderOuter(gUnknown_02022D00->unk12, 1, 14); + CopyBgTilemapBufferToVram(0); + gUnknown_02022D00->unk4++; + } + break; + case 2: + if (!IsDma3ManagerBusyWithBgCopy()) + gUnknown_02022D00->unk0 = 1; + break; + } +} + +void sub_802D688(void) +{ + switch (gUnknown_02022D00->unk4) + { + case 0: + gUnknown_02022D00->unk12 = sub_802DA9C(7, 10, 16, 2); + AddTextPrinterParameterized(gUnknown_02022D00->unk12, 1, gText_CommunicationStandby4, 0, 1, TEXT_SPEED_FF, NULL); + CopyWindowToVram(gUnknown_02022D00->unk12, 2); + gUnknown_02022D00->unk4++; + break; + case 1: + if (!IsDma3ManagerBusyWithBgCopy()) + { + PutWindowTilemap(gUnknown_02022D00->unk12); + DrawTextBorderOuter(gUnknown_02022D00->unk12, 1, 14); + CopyBgTilemapBufferToVram(0); + gUnknown_02022D00->unk4++; + } + break; + case 2: + if (!IsDma3ManagerBusyWithBgCopy()) + gUnknown_02022D00->unk0 = 1; + break; + } +} + +void sub_802D72C(void) +{ + switch (gUnknown_02022D00->unk4) + { + case 0: + sub_802D044(gUnknown_02022D00); + gUnknown_02022D00->unk4++; + break; + case 1: + if (!sub_802D068()) + gUnknown_02022D00->unk0 = 1; + break; + } +} + +void sub_802D764(void) +{ + gUnknown_02022D00->unkA = 0; + gUnknown_02022D00->unkB = 0; + gUnknown_02022D00->unkC = 6; + sub_802DC9C(gUnknown_02022D00->unkC); +} + +bool32 sub_802D788(void) +{ + switch (gUnknown_02022D00->unkA) + { + case 0: + gUnknown_02022D00->unkB++; + if (gUnknown_02022D00->unkB > 10) + { + gUnknown_02022D00->unkB = 0; + gUnknown_02022D00->unkC++; + if (gUnknown_02022D00->unkC >= 10) + { + gUnknown_02022D00->unkC = 0; + gUnknown_02022D00->unkA++; + } + } + sub_802DC9C(gUnknown_02022D00->unkC); + if (gUnknown_02022D00->unkC != 7) + break; + case 1: + return FALSE; + } + + return TRUE; +} + +void sub_802D7E8(u16 itemId, u16 quantity) +{ + CopyItemNameHandlePlural(itemId, gUnknown_02022D00->txtBuff[0], quantity); + ConvertIntToDecimalStringN(gUnknown_02022D00->txtBuff[1], quantity, STR_CONV_MODE_LEFT_ALIGN, 1); + DynamicPlaceholderTextUtil_Reset(); + DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gUnknown_02022D00->txtBuff[0]); + DynamicPlaceholderTextUtil_SetPlaceholderPtr(1, gUnknown_02022D00->txtBuff[1]); + DynamicPlaceholderTextUtil_ExpandPlaceholders(gUnknown_02022D00->strBuff, gText_AwesomeWonF701F700); + gUnknown_02022D00->unk12 = sub_802DA9C(4, 8, 22, 4); + AddTextPrinterParameterized(gUnknown_02022D00->unk12, 1, gUnknown_02022D00->strBuff, 0, 1, TEXT_SPEED_FF, NULL); + CopyWindowToVram(gUnknown_02022D00->unk12, 2); + gUnknown_02022D00->unk14 = MUS_FANFA1; + gUnknown_02022D00->unkD = 0; +} + +void sub_802D884(u16 itemId) +{ + CopyItemName(itemId, gUnknown_02022D00->txtBuff[0]); + DynamicPlaceholderTextUtil_Reset(); + DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gUnknown_02022D00->txtBuff[0]); + DynamicPlaceholderTextUtil_ExpandPlaceholders(gUnknown_02022D00->strBuff, gText_FilledStorageSpace2); + gUnknown_02022D00->unk12 = sub_802DA9C(4, 8, 22, 4); + AddTextPrinterParameterized(gUnknown_02022D00->unk12, 1, gUnknown_02022D00->strBuff, 0, 1, TEXT_SPEED_FF, NULL); + CopyWindowToVram(gUnknown_02022D00->unk12, 2); + gUnknown_02022D00->unk14 = 0; + gUnknown_02022D00->unkD = 0; +} + +void sub_802D8FC(u16 itemId) +{ + CopyItemName(itemId, gUnknown_02022D00->txtBuff[0]); + DynamicPlaceholderTextUtil_Reset(); + DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gUnknown_02022D00->txtBuff[0]); + DynamicPlaceholderTextUtil_ExpandPlaceholders(gUnknown_02022D00->strBuff, gText_CantHoldMore); + gUnknown_02022D00->unk12 = sub_802DA9C(4, 9, 22, 2); + AddTextPrinterParameterized(gUnknown_02022D00->unk12, 1, gUnknown_02022D00->strBuff, 0, 1, TEXT_SPEED_FF, NULL); + CopyWindowToVram(gUnknown_02022D00->unk12, 2); + gUnknown_02022D00->unk14 = 0; + gUnknown_02022D00->unkD = 0; +} + +bool32 sub_802D974(void) +{ + switch (gUnknown_02022D00->unkD) + { + case 0: + if (!IsDma3ManagerBusyWithBgCopy()) + { + PutWindowTilemap(gUnknown_02022D00->unk12); + DrawTextBorderOuter(gUnknown_02022D00->unk12, 1, 14); + CopyBgTilemapBufferToVram(0); + gUnknown_02022D00->unkD++; + } + break; + case 1: + if (IsDma3ManagerBusyWithBgCopy()) + break; + if (gUnknown_02022D00->unk14 == 0) + { + gUnknown_02022D00->unkD += 2; + return FALSE; + } + PlayFanfare(gUnknown_02022D00->unk14); + gUnknown_02022D00->unkD++; + case 2: + if (!IsFanfareTaskInactive()) + break; + gUnknown_02022D00->unkD++; + case 3: + return FALSE; + } + + return TRUE; +} + +void sub_802DA14(void) +{ + if (gUnknown_02022D00->unk12 != 0xFF) + { + rbox_fill_rectangle(gUnknown_02022D00->unk12); + CopyWindowToVram(gUnknown_02022D00->unk12, 1); + gUnknown_02022D00->unkD = 0; + } +} + +// Can't match this +/* +bool32 sub_802DA44(void) +{ + if (gUnknown_02022D00->unk12 == 0xFF) + return FALSE; + + if (gUnknown_02022D00->unkD == 0) + { + if (!IsDma3ManagerBusyWithBgCopy()) + { + RemoveWindow(gUnknown_02022D00->unk12); + gUnknown_02022D00->unk12 = 0xFF; + gUnknown_02022D00->unkD++; + return FALSE; + } + } + else if (gUnknown_02022D00->unkD == 1) + return FALSE; + + return TRUE; +} +*/ diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 148be7c5c..59ec8f4f1 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -443,7 +443,7 @@ enum #define TAG_TILE_1 0x1 // IWRAM bss -IWRAM_DATA static u32 gUnknown_03000F78[98]; +static u32 gUnknown_03000F78[98]; // EWRAM DATA EWRAM_DATA static u8 sPreviousBoxOption = 0; @@ -464,6 +464,9 @@ EWRAM_DATA static u8 sMovingMonOrigBoxPos = 0; EWRAM_DATA static bool8 sCanOnlyMove = 0; // This file's functions. +#if !defined(NONMATCHING) && MODERN +#define static +#endif static void CreatePCMenu(u8 whichMenu, s16 *windowIdPtr); static void Cb2_EnterPSS(u8 boxOption); static u8 GetCurrentBoxOption(void); @@ -6824,7 +6827,7 @@ static void SetCursorMonData(void *pokemon, u8 mode) sPSSData->cursorMonLevel = GetLevelFromBoxMonExp(boxMon); sPSSData->cursorMonMarkings = GetBoxMonData(boxMon, MON_DATA_MARKINGS); sPSSData->cursorMonPersonality = GetBoxMonData(boxMon, MON_DATA_PERSONALITY); - sPSSData->cursorMonPalette = GetFrontSpritePalFromSpeciesAndPersonality(sPSSData->cursorMonSpecies, otId, sPSSData->cursorMonPersonality); + sPSSData->cursorMonPalette = GetMonSpritePalFromSpeciesAndPersonality(sPSSData->cursorMonSpecies, otId, sPSSData->cursorMonPersonality); gender = GetGenderFromSpeciesAndPersonality(sPSSData->cursorMonSpecies, sPSSData->cursorMonPersonality); sPSSData->cursorMonItem = GetBoxMonData(boxMon, MON_DATA_HELD_ITEM); } @@ -6936,10 +6939,24 @@ static u8 InBoxInput_Normal(void) sPSSData->field_CD2 = 0; sPSSData->field_CD3 = 0; sPSSData->field_CD7 = 0; - retVal = 0; - if (!(gMain.newAndRepeatedKeys & DPAD_UP)) + + do { - if (gMain.newAndRepeatedKeys & DPAD_DOWN) + if (gMain.newAndRepeatedKeys & DPAD_UP) + { + retVal = TRUE; + if (sBoxCursorPosition >= IN_BOX_ROWS) + { + cursorPosition -= IN_BOX_ROWS; + } + else + { + cursorArea = CURSOR_AREA_BOX; + cursorPosition = 0; + } + break; + } + else if (gMain.newAndRepeatedKeys & DPAD_DOWN) { retVal = TRUE; cursorPosition += IN_BOX_ROWS; @@ -6951,6 +6968,7 @@ static u8 InBoxInput_Normal(void) sPSSData->field_CD2 = 1; sPSSData->field_CD7 = 1; } + break; } else if (gMain.newAndRepeatedKeys & DPAD_LEFT) { @@ -6964,6 +6982,7 @@ static u8 InBoxInput_Normal(void) sPSSData->field_CD3 = -1; cursorPosition += (IN_BOX_ROWS - 1); } + break; } else if (gMain.newAndRepeatedKeys & DPAD_RIGHT) { @@ -6977,81 +6996,70 @@ static u8 InBoxInput_Normal(void) sPSSData->field_CD3 = 1; cursorPosition -= (IN_BOX_ROWS - 1); } + break; } else if (gMain.newKeys & START_BUTTON) { retVal = TRUE; cursorArea = CURSOR_AREA_BOX; cursorPosition = 0; + break; } - else + + if ((gMain.newKeys & A_BUTTON) && sub_80CFA5C()) { - if ((gMain.newKeys & A_BUTTON) && sub_80CFA5C()) - { - if (!sCanOnlyMove) - return 8; + if (!sCanOnlyMove) + return 8; - if (sPSSData->boxOption == BOX_OPTION_MOVE_MONS || sIsMonBeingMoved == TRUE) - { - switch (sub_80CFF98(0)) - { - case 1: - return 11; - case 2: - return 12; - case 3: - return 13; - case 4: - return 14; - case 5: - return 15; - case 12: - return 16; - case 13: - return 17; - case 15: - return 18; - } - } - else + if (sPSSData->boxOption != BOX_OPTION_MOVE_MONS || sIsMonBeingMoved == TRUE) + { + switch (sub_80CFF98(0)) { - sPSSData->inBoxMovingMode = 1; - return 20; + case 1: + return 11; + case 2: + return 12; + case 3: + return 13; + case 4: + return 14; + case 5: + return 15; + case 12: + return 16; + case 13: + return 17; + case 15: + return 18; } } - - if (gMain.newKeys & B_BUTTON) - return 19; - - if (gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR) - { - if (gMain.heldKeys & L_BUTTON) - return 10; - if (gMain.heldKeys & R_BUTTON) - return 9; - } - - if (gMain.newKeys & SELECT_BUTTON) + else { - sub_80CFDC4(); - return 0; + sPSSData->inBoxMovingMode = 1; + return 20; } - retVal = FALSE; } - } - else - { - retVal = TRUE; - if (sBoxCursorPosition >= IN_BOX_ROWS) + + if (gMain.newKeys & B_BUTTON) + return 19; + + if (gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR) { - cursorPosition -= IN_BOX_ROWS; + if (gMain.heldKeys & L_BUTTON) + return 10; + if (gMain.heldKeys & R_BUTTON) + return 9; } - else + + if (gMain.newKeys & SELECT_BUTTON) { - cursorArea = CURSOR_AREA_BOX; - cursorPosition = 0; + sub_80CFDC4(); + return 0; } - } + + retVal = 0; + + } while (0); if (retVal) sub_80CD894(cursorArea, cursorPosition); @@ -7533,20 +7541,30 @@ static u8 HandleInput_InParty(void) gotoBox = FALSE; retVal = 0; - if (!(gMain.newAndRepeatedKeys & DPAD_UP)) + do { - if (gMain.newAndRepeatedKeys & DPAD_DOWN) + if (gMain.newAndRepeatedKeys & DPAD_UP) + { + if (--cursorPosition < 0) + cursorPosition = PARTY_SIZE; + if (cursorPosition != sBoxCursorPosition) + retVal = 1; + break; + } + else if (gMain.newAndRepeatedKeys & DPAD_DOWN) { if (++cursorPosition > PARTY_SIZE) cursorPosition = 0; if (cursorPosition != sBoxCursorPosition) retVal = 1; + break; } - else if ((gMain.newAndRepeatedKeys & DPAD_LEFT) && sBoxCursorPosition != 0) + else if (gMain.newAndRepeatedKeys & DPAD_LEFT && sBoxCursorPosition != 0) { retVal = 1; sPSSData->field_CD6 = sBoxCursorPosition; cursorPosition = 0; + break; } else if (gMain.newAndRepeatedKeys & DPAD_RIGHT) { @@ -7561,73 +7579,67 @@ static u8 HandleInput_InParty(void) cursorArea = CURSOR_AREA_IN_BOX; cursorPosition = 0; } + break; } - else + + if (gMain.newKeys & A_BUTTON) { - if (gMain.newKeys & A_BUTTON) + if (sBoxCursorPosition == PARTY_SIZE) { - if (sBoxCursorPosition == PARTY_SIZE) - { - if (sPSSData->boxOption == BOX_OPTION_DEPOSIT) - return 4; + if (sPSSData->boxOption == BOX_OPTION_DEPOSIT) + return 4; - gotoBox = TRUE; - } - else if (sub_80CFA5C()) + gotoBox = TRUE; + } + else if (sub_80CFA5C()) + { + if (!sCanOnlyMove) + return 8; + + switch (sub_80CFF98(0)) { - if (!sCanOnlyMove) - return 8; - - switch (sub_80CFF98(0)) - { - case 1: - return 11; - case 2: - return 12; - case 3: - return 13; - case 4: - return 14; - case 5: - return 15; - case 12: - return 16; - case 13: - return 17; - case 15: - return 18; - } + case 1: + return 11; + case 2: + return 12; + case 3: + return 13; + case 4: + return 14; + case 5: + return 15; + case 12: + return 16; + case 13: + return 17; + case 15: + return 18; } } + } - if (gMain.newKeys & B_BUTTON) - { - if (sPSSData->boxOption == BOX_OPTION_DEPOSIT) - return 19; + if (gMain.newKeys & B_BUTTON) + { + if (sPSSData->boxOption == BOX_OPTION_DEPOSIT) + return 19; - gotoBox = TRUE; - } + gotoBox = TRUE; + } - if (gotoBox) - { - retVal = 6; - cursorArea = CURSOR_AREA_IN_BOX; - cursorPosition = 0; - } - else if (gMain.newKeys & SELECT_BUTTON) - { - sub_80CFDC4(); - return 0; - } + if (gotoBox) + { + retVal = 6; + cursorArea = CURSOR_AREA_IN_BOX; + cursorPosition = 0; } - } - else - { - if (--cursorPosition < 0) - cursorPosition = PARTY_SIZE; - if (cursorPosition != sBoxCursorPosition) - retVal = 1; - } + else if (gMain.newKeys & SELECT_BUTTON) + { + sub_80CFDC4(); + return 0; + } + + } while (0); + if (retVal != 0) { if (retVal != 6) @@ -7911,63 +7923,63 @@ _080CF7D8:\n\ static u8 HandleInput_OnBox(void) { u8 retVal; - s8 cursorArea = sBoxCursorArea; - s8 cursorPosition = sBoxCursorPosition; + s8 cursorArea; + s8 cursorPosition; sPSSData->field_CD3 = 0; sPSSData->field_CD2 = 0; sPSSData->field_CD7 = 0; - retVal = 0; - if (!(gMain.newAndRepeatedKeys & DPAD_UP)) + do { - if (gMain.newAndRepeatedKeys & DPAD_DOWN) + if (gMain.newAndRepeatedKeys & DPAD_UP) + { + retVal = 1; + cursorArea = CURSOR_AREA_BUTTONS; + cursorPosition = 0; + sPSSData->field_CD7 = 1; + break; + } + else if (gMain.newAndRepeatedKeys & DPAD_DOWN) { retVal = 1; cursorArea = CURSOR_AREA_IN_BOX; cursorPosition = 2; + break; } - else + + if (gMain.heldKeys & DPAD_LEFT) + return 10; + if (gMain.heldKeys & DPAD_RIGHT) + return 9; + + if (gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR) { - if (gMain.heldKeys & DPAD_LEFT) + if (gMain.heldKeys & L_BUTTON) return 10; - if (gMain.heldKeys & DPAD_RIGHT) + if (gMain.heldKeys & R_BUTTON) return 9; + } - if (gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR) - { - if (gMain.heldKeys & L_BUTTON) - return 10; - if (gMain.heldKeys & R_BUTTON) - return 9; - } + if (gMain.newKeys & A_BUTTON) + { + sub_80CD1A8(FALSE); + AddBoxMenu(); + return 7; + } - if (gMain.newKeys & A_BUTTON) - { - sub_80CD1A8(FALSE); - AddBoxMenu(); - return 7; - } + if (gMain.newKeys & B_BUTTON) + return 19; - if (gMain.newKeys & B_BUTTON) - return 19; + if (gMain.newKeys & SELECT_BUTTON) + { + sub_80CFDC4(); + return 0; + } - if (gMain.newKeys & SELECT_BUTTON) - { - sub_80CFDC4(); - return 0; - } + retVal = 0; - retVal = 0; - } - } - else - { - retVal = 1; - cursorArea = CURSOR_AREA_BUTTONS; - cursorPosition = 0; - sPSSData->field_CD7 = 1; - } + } while (0); if (retVal) { @@ -8116,62 +8128,57 @@ static u8 HandleInput_OnButtons(void) sPSSData->field_CD2 = 0; sPSSData->field_CD7 = 0; - if (!(gMain.newAndRepeatedKeys & DPAD_UP)) + do { - if (gMain.newAndRepeatedKeys & (DPAD_DOWN | START_BUTTON)) + if (gMain.newAndRepeatedKeys & DPAD_UP) + { + retVal = 1; + cursorArea = CURSOR_AREA_IN_BOX; + sPSSData->field_CD2 = -1; + cursorPosition = (sBoxCursorPosition == 0) ? IN_BOX_COUNT - 1 - 5 : IN_BOX_COUNT - 1; + sPSSData->field_CD7 = 1; + break; + } + else if (gMain.newAndRepeatedKeys & (DPAD_DOWN | START_BUTTON)) { retVal = 1; cursorArea = CURSOR_AREA_BOX; cursorPosition = 0; sPSSData->field_CD7 = 1; + break; } - else if (gMain.newAndRepeatedKeys & DPAD_LEFT) + + if (gMain.newAndRepeatedKeys & DPAD_LEFT) { retVal = 1; if (--cursorPosition < 0) - { cursorPosition = 1; - } + break; } else if (gMain.newAndRepeatedKeys & DPAD_RIGHT) { retVal = 1; if (++cursorPosition > 1) - { cursorPosition = 0; - } + break; } - else if (gMain.newKeys & A_BUTTON) - { + + if (gMain.newKeys & A_BUTTON) return (cursorPosition == 0) ? 5 : 4; - } - else if (gMain.newKeys & B_BUTTON) - { + if (gMain.newKeys & B_BUTTON) return 19; - } - else if (gMain.newKeys & SELECT_BUTTON) + + if (gMain.newKeys & SELECT_BUTTON) { sub_80CFDC4(); return 0; } - else - { - retVal = 0; - } - } - else - { - retVal = 1; - cursorArea = CURSOR_AREA_IN_BOX; - sPSSData->field_CD2 = -1; - cursorPosition = (sBoxCursorPosition == 0) ? IN_BOX_COUNT - 1 - 5 : IN_BOX_COUNT - 1; - sPSSData->field_CD7 = 1; - } + + retVal = 0; + } while (0); if (retVal != 0) - { sub_80CD894(cursorArea, cursorPosition); - } return retVal; } @@ -8750,9 +8757,14 @@ static s16 sub_80D00AC(void) { s32 textId = -2; - if (!(gMain.newKeys & A_BUTTON)) + do { - if (gMain.newKeys & B_BUTTON) + if (gMain.newKeys & A_BUTTON) + { + textId = Menu_GetCursorPos(); + break; + } + else if (gMain.newKeys & B_BUTTON) { PlaySE(SE_SELECT); textId = -1; @@ -8768,11 +8780,7 @@ static s16 sub_80D00AC(void) PlaySE(SE_SELECT); Menu_MoveCursor(1); } - } - else - { - textId = Menu_GetCursorPos(); - } + } while (0); if (textId != -2) sub_80D013C(); @@ -8780,9 +8788,6 @@ static s16 sub_80D00AC(void) if (textId >= 0) textId = sPSSData->menuItems[textId].textId; - #ifndef NONMATCHING - asm("":::"r4"); - #endif // NONMATCHING return textId; } diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 2ec088628..79aac4b5e 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -115,7 +115,7 @@ static EWRAM_DATA struct PokemonSummaryScreenData u8 level; // 0x5 u8 ribbonCount; // 0x6 u8 ailment; // 0x7 - u8 altAbility; // 0x8 + u8 abilityNum; // 0x8 u8 metLocation; // 0x9 u8 metLevel; // 0xA u8 metGame; // 0xB @@ -1356,7 +1356,7 @@ static bool8 ExtractMonDataToSummaryStruct(struct Pokemon *mon) sum->species2 = GetMonData(mon, MON_DATA_SPECIES2); sum->exp = GetMonData(mon, MON_DATA_EXP); sum->level = GetMonData(mon, MON_DATA_LEVEL); - sum->altAbility = GetMonData(mon, MON_DATA_ALT_ABILITY); + sum->abilityNum = GetMonData(mon, MON_DATA_ABILITY_NUM); sum->item = GetMonData(mon, MON_DATA_HELD_ITEM); sum->pid = GetMonData(mon, MON_DATA_PERSONALITY); sum->sanity = GetMonData(mon, MON_DATA_SANITY_IS_BAD_EGG); @@ -3062,13 +3062,13 @@ static void PrintMonOTID(void) static void PrintMonAbilityName(void) { - u8 ability = GetAbilityBySpecies(sMonSummaryScreen->summary.species, sMonSummaryScreen->summary.altAbility); + u8 ability = GetAbilityBySpecies(sMonSummaryScreen->summary.species, sMonSummaryScreen->summary.abilityNum); SummaryScreen_PrintTextOnWindow(AddWindowFromTemplateList(sPageInfoTemplate, PSS_DATA_WINDOW_INFO_ABILITY), gAbilityNames[ability], 0, 1, 0, 1); } static void PrintMonAbilityDescription(void) { - u8 ability = GetAbilityBySpecies(sMonSummaryScreen->summary.species, sMonSummaryScreen->summary.altAbility); + u8 ability = GetAbilityBySpecies(sMonSummaryScreen->summary.species, sMonSummaryScreen->summary.abilityNum); SummaryScreen_PrintTextOnWindow(AddWindowFromTemplateList(sPageInfoTemplate, PSS_DATA_WINDOW_INFO_ABILITY), gAbilityDescriptionPointers[ability], 0, 17, 0, 0); } diff --git a/src/pokenav.c b/src/pokenav.c index be3826bed..132e4123b 100644 --- a/src/pokenav.c +++ b/src/pokenav.c @@ -318,7 +318,7 @@ void Task_RunLoopedTask_LinkMode(u8 taskId) if (sub_8087598()) return; - + task = (LoopedTask)GetWordTaskArg(taskId, 1); state = &gTasks[taskId].data[0]; action = task(*state); @@ -605,7 +605,7 @@ void sub_81C7694(u32 a0) gPokenavResources->fieldA = value; } -u16 sub_81C76AC(void) +u32 sub_81C76AC(void) { return gPokenavResources->fieldA; } diff --git a/src/pokenav_main_menu.c b/src/pokenav_main_menu.c index 94dab60bb..4422a70e3 100644 --- a/src/pokenav_main_menu.c +++ b/src/pokenav_main_menu.c @@ -64,16 +64,16 @@ static void HideLeftHeaderSubmenuSprites(bool32 isOnRightSide); static void HideLeftHeaderSprites(bool32 isOnRightSide); static void ShowLeftHeaderSprites(u32 startY, bool32 isOnRightSide); static void ShowLeftHeaderSubmenuSprites(u32 startY, bool32 isOnRightSide); -static void MoveLeftHeader(struct Sprite *sprite, int startX, int endX, int duration); +static void MoveLeftHeader(struct Sprite *sprite, s32 startX, s32 endX, s32 duration); static void SpriteCB_MoveLeftHeader(struct Sprite *sprite); static void InitPokenavMainMenuResources(void); static void InitHoennMapHeaderSprites(void); static void sub_81C7B74(void); -static u32 LoopedTask_ScrollMenuHeaderDown(int a0); -static u32 LoopedTask_ScrollMenuHeaderUp(int a0); +static u32 LoopedTask_ScrollMenuHeaderDown(s32 a0); +static u32 LoopedTask_ScrollMenuHeaderUp(s32 a0); static void sub_81C7BF8(u32 a0); static void SpriteCB_SpinningPokenav(struct Sprite* sprite); -static u32 LoopedTask_InitPokenavMenu(int a0); +static u32 LoopedTask_InitPokenavMenu(s32 a0); const u16 gSpinningPokenavPaletteData[] = INCBIN_U16("graphics/pokenav/icon2.gbapal"); const u32 gSpinningPokenavGfx[] = INCBIN_U32("graphics/pokenav/icon2.4bpp.lz"); @@ -360,7 +360,7 @@ bool32 WaitForPokenavShutdownFade(void) return TRUE; } -static u32 LoopedTask_InitPokenavMenu(int a0) +static u32 LoopedTask_InitPokenavMenu(s32 a0) { struct PokenavMainMenuResources *structPtr; @@ -440,7 +440,7 @@ bool32 MainMenuLoopedTaskIsBusy(void) return IsLoopedTaskActive(structPtr->currentTaskId); } -static u32 LoopedTask_ScrollMenuHeaderDown(int a0) +static u32 LoopedTask_ScrollMenuHeaderDown(s32 a0) { switch (a0) { @@ -461,7 +461,7 @@ static u32 LoopedTask_ScrollMenuHeaderDown(int a0) } } -static u32 LoopedTask_ScrollMenuHeaderUp(int a0) +static u32 LoopedTask_ScrollMenuHeaderUp(s32 a0) { if (ChangeBgY(0, 384, 2) <= 0) { @@ -637,7 +637,7 @@ _081C7AAE:\n\ .syntax divided"); } -void sub_81C7AC0(int a0) +void sub_81C7AC0(s32 a0) { struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0); @@ -708,7 +708,7 @@ static void sub_81C7BF8(u32 windowId) static void InitPokenavMainMenuResources(void) { - int i; + s32 i; u8 spriteId; struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0); @@ -758,13 +758,13 @@ void ResumeSpinningPokenavSprite(void) static void InitHoennMapHeaderSprites(void) { - int i, spriteId; + s32 i, spriteId; struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0); LoadCompressedSpriteSheet(&sPokenavHoennMapLeftHeaderSpriteSheet); AllocSpritePalette(1); AllocSpritePalette(2); - for (i = 0; i < (int)ARRAY_COUNT(structPtr->leftHeaderSprites); i++) + for (i = 0; i < (s32)ARRAY_COUNT(structPtr->leftHeaderSprites); i++) { spriteId = CreateSprite(&sPokenavLeftHeaderHoennMapSpriteTemplate, 0, 0, 1); structPtr->leftHeaderSprites[i] = &gSprites[spriteId]; @@ -859,10 +859,10 @@ void sub_81C7FC4(u32 arg0, bool32 arg1) void sub_81C7FDC(void) { - int i; + s32 i; struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0); - for (i = 0; i < (int)ARRAY_COUNT(structPtr->leftHeaderSprites); i++) + for (i = 0; i < (s32)ARRAY_COUNT(structPtr->leftHeaderSprites); i++) { structPtr->leftHeaderSprites[i]->invisible = TRUE; structPtr->submenuLeftHeaderSprites[i]->invisible = TRUE; @@ -881,7 +881,7 @@ bool32 sub_81C8010(void) static void ShowLeftHeaderSprites(u32 startY, bool32 isOnRightSide) { - int start, end, i; + s32 start, end, i; struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0); if (!isOnRightSide) @@ -889,7 +889,7 @@ static void ShowLeftHeaderSprites(u32 startY, bool32 isOnRightSide) else start = 256, end = 160; - for (i = 0; i < (int)ARRAY_COUNT(structPtr->leftHeaderSprites); i++) + for (i = 0; i < (s32)ARRAY_COUNT(structPtr->leftHeaderSprites); i++) { structPtr->leftHeaderSprites[i]->pos1.y = startY; MoveLeftHeader(structPtr->leftHeaderSprites[i], start, end, 12); @@ -898,7 +898,7 @@ static void ShowLeftHeaderSprites(u32 startY, bool32 isOnRightSide) static void ShowLeftHeaderSubmenuSprites(u32 startY, bool32 isOnRightSide) { - int start, end, i; + s32 start, end, i; struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0); if (!isOnRightSide) @@ -906,7 +906,7 @@ static void ShowLeftHeaderSubmenuSprites(u32 startY, bool32 isOnRightSide) else start = 256, end = 192; - for (i = 0; i < (int)ARRAY_COUNT(structPtr->submenuLeftHeaderSprites); i++) + for (i = 0; i < (s32)ARRAY_COUNT(structPtr->submenuLeftHeaderSprites); i++) { structPtr->submenuLeftHeaderSprites[i]->pos1.y = startY; MoveLeftHeader(structPtr->submenuLeftHeaderSprites[i], start, end, 12); @@ -915,7 +915,7 @@ static void ShowLeftHeaderSubmenuSprites(u32 startY, bool32 isOnRightSide) static void HideLeftHeaderSprites(bool32 isOnRightSide) { - int start, end, i; + s32 start, end, i; struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0); if (!isOnRightSide) @@ -923,7 +923,7 @@ static void HideLeftHeaderSprites(bool32 isOnRightSide) else start = 192, end = 256; - for (i = 0; i < (int)ARRAY_COUNT(structPtr->leftHeaderSprites); i++) + for (i = 0; i < (s32)ARRAY_COUNT(structPtr->leftHeaderSprites); i++) { MoveLeftHeader(structPtr->leftHeaderSprites[i], start, end, 12); } @@ -931,7 +931,7 @@ static void HideLeftHeaderSprites(bool32 isOnRightSide) static void HideLeftHeaderSubmenuSprites(bool32 isOnRightSide) { - int start, end, i; + s32 start, end, i; struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0); if (!isOnRightSide) @@ -939,13 +939,13 @@ static void HideLeftHeaderSubmenuSprites(bool32 isOnRightSide) else start = 192, end = 256; - for (i = 0; i < (int)ARRAY_COUNT(structPtr->submenuLeftHeaderSprites); i++) + for (i = 0; i < (s32)ARRAY_COUNT(structPtr->submenuLeftHeaderSprites); i++) { MoveLeftHeader(structPtr->submenuLeftHeaderSprites[i], start, end, 12); } } -static void MoveLeftHeader(struct Sprite *sprite, int startX, int endX, int duration) +static void MoveLeftHeader(struct Sprite *sprite, s32 startX, s32 endX, s32 duration) { sprite->pos1.x = startX; sprite->data[0] = startX * 16; diff --git a/src/pokenav_match_call_data.c b/src/pokenav_match_call_data.c index 70fa42541..d2d89babf 100644 --- a/src/pokenav_match_call_data.c +++ b/src/pokenav_match_call_data.c @@ -6,6 +6,7 @@ #include "battle.h" #include "gym_leader_rematch.h" #include "match_call.h" +#include "constants/region_map_sections.h" // Static type declarations @@ -17,13 +18,13 @@ typedef struct MatchCallTextDataStruct { struct MatchCallStructCommon { u8 type; - u8 v1; + u8 mapSec; u16 flag; }; struct MatchCallStruct0 { u8 type; - u8 v1; + u8 mapSec; u16 flag; const u8 *desc; const u8 *name; @@ -32,7 +33,7 @@ struct MatchCallStruct0 { struct MatchCallStruct1 { u8 type; - u8 v1; + u8 mapSec; u16 flag; u16 rematchTableIdx; const u8 *desc; @@ -42,12 +43,12 @@ struct MatchCallStruct1 { struct MatchCallSubstruct2 { u16 flag; - u8 v2; + u8 mapSec; }; struct MatchCallStruct2 { u8 type; - u8 v1; + u8 mapSec; u16 flag; u16 rematchTableIdx; const u8 *desc; @@ -57,7 +58,7 @@ struct MatchCallStruct2 { struct MatchCallStruct3 { u8 type; - u8 v1; + u8 mapSec; u16 flag; const u8 *desc; const u8 *name; @@ -75,7 +76,7 @@ struct MatchCallStruct4 { // Note: Type1 and Type5 have identical struct layouts. struct MatchCallStruct5 { u8 type; - u8 v1; + u8 mapSec; u16 flag; u16 rematchTableIdx; const u8 *desc; @@ -96,7 +97,7 @@ typedef union { struct UnkStruct_08625388 { u16 idx; u16 v2; - u16 v4; + u32 v4; const u8 *v8[4]; }; @@ -110,11 +111,11 @@ static bool32 MatchCallGetFlag_Type2(match_call_t); static bool32 MatchCallGetFlag_Type3(match_call_t); static bool32 MatchCallGetFlag_Type4(match_call_t); -static u8 sub_81D1714(match_call_t); -static u8 sub_81D1718(match_call_t); -static u8 sub_81D171C(match_call_t); -static u8 sub_81D1750(match_call_t); -static u8 sub_81D1754(match_call_t); +static u8 MatchCallGetMapSec_Type0(match_call_t); +static u8 MatchCallGetMapSec_Type1(match_call_t); +static u8 MatchCallGetMapSec_Type2(match_call_t); +static u8 MatchCallGetMapSec_Type3(match_call_t); +static u8 MatchCallGetMapSec_Type4(match_call_t); static bool32 MatchCall_IsRematchable_Type0(match_call_t); static bool32 MatchCall_IsRematchable_Type1(match_call_t); @@ -325,7 +326,7 @@ static const match_call_text_data_t sMrStoneTextScripts[] = { static const struct MatchCallStruct0 sMrStoneMatchCallHeader = { .type = 0, - .v1 = 10, + .mapSec = MAPSEC_RUSTBORO_CITY, .flag = 0xFFFF, .desc = gMrStoneMatchCallDesc, .name = gMrStoneMatchCallName, @@ -348,7 +349,7 @@ static const match_call_text_data_t sNormanTextScripts[] = { static const struct MatchCallStruct5 sNormanMatchCallHeader = { .type = 5, - .v1 = 7, + .mapSec = MAPSEC_PETALBURG_CITY, .flag = FLAG_ENABLE_NORMAN_MATCH_CALL, .rematchTableIdx = REMATCH_NORMAN, .desc = gNormanMatchCallDesc, @@ -359,7 +360,7 @@ static const struct MatchCallStruct5 sNormanMatchCallHeader = static const struct MatchCallStruct3 sProfBirchMatchCallHeader = { .type = 3, - .v1 = 0, + .mapSec = 0, .flag = FLAG_ENABLE_PROF_BIRCH_MATCH_CALL, .desc = gProfBirchMatchCallDesc, .name = gProfBirchMatchCallName @@ -375,7 +376,7 @@ static const match_call_text_data_t sMomTextScripts[] = { static const struct MatchCallStruct0 sMomMatchCallHeader = { .type = 0, - .v1 = 0, + .mapSec = MAPSEC_LITTLEROOT_TOWN, .flag = FLAG_ENABLE_MOM_MATCH_CALL, .desc = gMomMatchCallDesc, .name = gMomMatchCallName, @@ -396,7 +397,7 @@ static const match_call_text_data_t sStevenTextScripts[] = { static const struct MatchCallStruct0 sStevenMatchCallHeader = { .type = 0, - .v1 = 0xD5, + .mapSec = MAPSEC_NONE, .flag = FLAG_REGISTERED_STEVEN_POKENAV, .desc = gStevenMatchCallDesc, .name = gStevenMatchCallName, @@ -473,16 +474,16 @@ static const match_call_text_data_t sWallyTextScripts[] = { }; const struct MatchCallSubstruct2 sWallyAdditionalData[] = { - { FLAG_HIDE_MAUVILLE_CITY_WALLY, 0x05 }, - { FLAG_GROUDON_AWAKENED_MAGMA_HIDEOUT, 0xD5 }, - { FLAG_HIDE_VICTORY_ROAD_ENTRANCE_WALLY, 0x46 }, - { 0xFFFF, 0xD5 } + { FLAG_HIDE_MAUVILLE_CITY_WALLY, MAPSEC_VERDANTURF_TOWN }, + { FLAG_GROUDON_AWAKENED_MAGMA_HIDEOUT, MAPSEC_NONE }, + { FLAG_HIDE_VICTORY_ROAD_ENTRANCE_WALLY, MAPSEC_VICTORY_ROAD }, + { 0xFFFF, MAPSEC_NONE } }; static const struct MatchCallStruct2 sWallyMatchCallHeader = { .type = 2, - .v1 = 0, + .mapSec = 0, .flag = FLAG_ENABLE_WALLY_MATCH_CALL, .rematchTableIdx = REMATCH_WALLY_3, .desc = gWallyMatchCallDesc, @@ -505,7 +506,7 @@ static const match_call_text_data_t sScottTextScripts[] = { static const struct MatchCallStruct0 sScottMatchCallHeader = { .type = 0, - .v1 = 0xD5, + .mapSec = MAPSEC_NONE, .flag = FLAG_ENABLE_SCOTT_MATCH_CALL, .desc = gScottMatchCallDesc, .name = gScottMatchCallName, @@ -523,7 +524,7 @@ static const match_call_text_data_t sRoxanneTextScripts[] = { static const struct MatchCallStruct5 sRoxanneMatchCallHeader = { .type = 5, - .v1 = 10, + .mapSec = MAPSEC_RUSTBORO_CITY, .flag = FLAG_ENABLE_ROXANNE_MATCH_CALL, .rematchTableIdx = REMATCH_ROXANNE, .desc = gRoxanneMatchCallDesc, @@ -542,7 +543,7 @@ static const match_call_text_data_t sBrawlyTextScripts[] = { static const struct MatchCallStruct5 sBrawlyMatchCallHeader = { .type = 5, - .v1 = 2, + .mapSec = MAPSEC_DEWFORD_TOWN, .flag = FLAG_ENABLE_BRAWLY_MATCH_CALL, .rematchTableIdx = REMATCH_BRAWLY, .desc = gBrawlyMatchCallDesc, @@ -561,7 +562,7 @@ static const match_call_text_data_t sWattsonTextScripts[] = { static const struct MatchCallStruct5 sWattsonMatchCallHeader = { .type = 5, - .v1 = 9, + .mapSec = MAPSEC_MAUVILLE_CITY, .flag = FLAG_ENABLE_WATTSON_MATCH_CALL, .rematchTableIdx = REMATCH_WATTSON, .desc = gWattsonMatchCallDesc, @@ -580,7 +581,7 @@ static const match_call_text_data_t sFlanneryTextScripts[] = { static const struct MatchCallStruct5 sFlanneryMatchCallHeader = { .type = 5, - .v1 = 3, + .mapSec = MAPSEC_LAVARIDGE_TOWN, .flag = FLAG_ENABLE_FLANNERY_MATCH_CALL, .rematchTableIdx = REMATCH_FLANNERY, .desc = gFlanneryMatchCallDesc, @@ -599,7 +600,7 @@ static const match_call_text_data_t sWinonaTextScripts[] = { static const struct MatchCallStruct5 sWinonaMatchCallHeader = { .type = 5, - .v1 = 11, + .mapSec = MAPSEC_FORTREE_CITY, .flag = FLAG_ENABLE_WINONA_MATCH_CALL, .rematchTableIdx = REMATCH_WINONA, .desc = gWinonaMatchCallDesc, @@ -618,7 +619,7 @@ static const match_call_text_data_t sTateLizaTextScripts[] = { static const struct MatchCallStruct5 sTateLizaMatchCallHeader = { .type = 5, - .v1 = 13, + .mapSec = MAPSEC_MOSSDEEP_CITY, .flag = FLAG_ENABLE_TATE_AND_LIZA_MATCH_CALL, .rematchTableIdx = REMATCH_TATE_AND_LIZA, .desc = gTateLizaMatchCallDesc, @@ -637,7 +638,7 @@ static const match_call_text_data_t sJuanTextScripts[] = { static const struct MatchCallStruct5 sJuanMatchCallHeader = { .type = 5, - .v1 = 14, + .mapSec = MAPSEC_SOOTOPOLIS_CITY, .flag = FLAG_ENABLE_JUAN_MATCH_CALL, .rematchTableIdx = REMATCH_JUAN, .desc = gJuanMatchCallDesc, @@ -653,7 +654,7 @@ static const match_call_text_data_t sSidneyTextScripts[] = { static const struct MatchCallStruct5 sSidneyMatchCallHeader = { .type = 5, - .v1 = 15, + .mapSec = MAPSEC_EVER_GRANDE_CITY, .flag = FLAG_REMATCH_SIDNEY, .rematchTableIdx = REMATCH_SIDNEY, .desc = gEliteFourMatchCallDesc, @@ -669,7 +670,7 @@ static const match_call_text_data_t sPhoebeTextScripts[] = { static const struct MatchCallStruct5 sPhoebeMatchCallHeader = { .type = 5, - .v1 = 15, + .mapSec = MAPSEC_EVER_GRANDE_CITY, .flag = FLAG_REMATCH_PHOEBE, .rematchTableIdx = REMATCH_PHOEBE, .desc = gEliteFourMatchCallDesc, @@ -685,7 +686,7 @@ static const match_call_text_data_t sGlaciaTextScripts[] = { static const struct MatchCallStruct5 sGlaciaMatchCallHeader = { .type = 5, - .v1 = 15, + .mapSec = MAPSEC_EVER_GRANDE_CITY, .flag = FLAG_REMATCH_GLACIA, .rematchTableIdx = REMATCH_GLACIA, .desc = gEliteFourMatchCallDesc, @@ -701,7 +702,7 @@ static const match_call_text_data_t sDrakeTextScripts[] = { static const struct MatchCallStruct5 sDrakeMatchCallHeader = { .type = 5, - .v1 = 15, + .mapSec = MAPSEC_EVER_GRANDE_CITY, .flag = FLAG_REMATCH_DRAKE, .rematchTableIdx = REMATCH_DRAKE, .desc = gEliteFourMatchCallDesc, @@ -717,7 +718,7 @@ static const match_call_text_data_t sWallaceTextScripts[] = { static const struct MatchCallStruct5 sWallaceMatchCallHeader = { .type = 5, - .v1 = 15, + .mapSec = MAPSEC_EVER_GRANDE_CITY, .flag = FLAG_REMATCH_WALLACE, .rematchTableIdx = REMATCH_WALLACE, .desc = gChampionMatchCallDesc, @@ -753,24 +754,24 @@ static bool32 (*const sMatchCallGetFlagFuncs[])(match_call_t) = { MatchCallGetFlag_Type0, MatchCallGetFlag_Type1, MatchCallGetFlag_Type2, - MatchCallGetFlag_Type3, - MatchCallGetFlag_Type4 + MatchCallGetFlag_Type4, + MatchCallGetFlag_Type3 }; -static u8 (*const gUnknown_08625310[])(match_call_t) = { - sub_81D1714, - sub_81D1718, - sub_81D171C, - sub_81D1750, - sub_81D1754 +static u8 (*const sMatchCallGetMapSecFuncs[])(match_call_t) = { + MatchCallGetMapSec_Type0, + MatchCallGetMapSec_Type1, + MatchCallGetMapSec_Type2, + MatchCallGetMapSec_Type4, + MatchCallGetMapSec_Type3 }; static bool32 (*const sMatchCall_IsRematchableFunctions[])(match_call_t) = { MatchCall_IsRematchable_Type0, MatchCall_IsRematchable_Type1, MatchCall_IsRematchable_Type2, - MatchCall_IsRematchable_Type3, - MatchCall_IsRematchable_Type4 + MatchCall_IsRematchable_Type4, + MatchCall_IsRematchable_Type3 }; static bool32 (*const gUnknown_08625338[])(match_call_t) = { @@ -785,24 +786,24 @@ static u32 (*const sMatchCall_GetRematchTableIdxFunctions[])(match_call_t) = { MatchCall_GetRematchTableIdx_Type0, MatchCall_GetRematchTableIdx_Type1, MatchCall_GetRematchTableIdx_Type2, - MatchCall_GetRematchTableIdx_Type3, - MatchCall_GetRematchTableIdx_Type4 + MatchCall_GetRematchTableIdx_Type4, + MatchCall_GetRematchTableIdx_Type3 }; static void (*const sMatchCall_GetMessageFunctions[])(match_call_t, u8 *) = { MatchCall_GetMessage_Type0, MatchCall_GetMessage_Type1, MatchCall_GetMessage_Type2, - MatchCall_GetMessage_Type3, - MatchCall_GetMessage_Type4 + MatchCall_GetMessage_Type4, + MatchCall_GetMessage_Type3 }; static void (*const sMatchCall_GetNameAndDescFunctions[])(match_call_t, const u8 **, const u8 **) = { MatchCall_GetNameAndDesc_Type0, MatchCall_GetNameAndDesc_Type1, MatchCall_GetNameAndDesc_Type2, - MatchCall_GetNameAndDesc_Type3, - MatchCall_GetNameAndDesc_Type4 + MatchCall_GetNameAndDesc_Type4, + MatchCall_GetNameAndDesc_Type3 }; static const struct UnkStruct_08625388 sMatchCallCheckPageOverrides[] = { @@ -883,7 +884,7 @@ static bool32 MatchCallGetFlag_Type2(match_call_t matchCall) return FlagGet(matchCall.type2->flag); } -static bool32 MatchCallGetFlag_Type3(match_call_t matchCall) +static bool32 MatchCallGetFlag_Type4(match_call_t matchCall) { if (matchCall.type4->gender != gSaveBlock2Ptr->playerGender) return FALSE; @@ -892,12 +893,12 @@ static bool32 MatchCallGetFlag_Type3(match_call_t matchCall) return FlagGet(matchCall.type4->flag); } -static bool32 MatchCallGetFlag_Type4(match_call_t matchCall) +static bool32 MatchCallGetFlag_Type3(match_call_t matchCall) { return FlagGet(matchCall.type3->flag); } -u8 sub_81D16DC(u32 idx) +u8 MatchCallMapSecGetByIndex(u32 idx) { match_call_t matchCall; u32 i; @@ -906,20 +907,20 @@ u8 sub_81D16DC(u32 idx) return 0; matchCall = sMatchCallHeaders[idx]; i = MatchCallGetFunctionIndex(matchCall); - return gUnknown_08625310[i](matchCall); + return sMatchCallGetMapSecFuncs[i](matchCall); } -static u8 sub_81D1714(match_call_t matchCall) +static u8 MatchCallGetMapSec_Type0(match_call_t matchCall) { - return matchCall.type0->v1; + return matchCall.type0->mapSec; } -static u8 sub_81D1718(match_call_t matchCall) +static u8 MatchCallGetMapSec_Type1(match_call_t matchCall) { - return matchCall.type1->v1; + return matchCall.type1->mapSec; } -static u8 sub_81D171C(match_call_t matchCall) +static u8 MatchCallGetMapSec_Type2(match_call_t matchCall) { s32 i; @@ -928,17 +929,17 @@ static u8 sub_81D171C(match_call_t matchCall) if (!FlagGet(matchCall.type2->v10[i].flag)) break; } - return matchCall.type2->v10[i].v2; + return matchCall.type2->v10[i].mapSec; } -static u8 sub_81D1750(match_call_t matchCall) +static u8 MatchCallGetMapSec_Type4(match_call_t matchCall) { - return 0xd5; + return MAPSEC_NONE; } -static u8 sub_81D1754(match_call_t matchCall) +static u8 MatchCallGetMapSec_Type3(match_call_t matchCall) { - return 0xd5; + return MAPSEC_NONE; } bool32 MatchCall_IsRematchable(u32 idx) @@ -970,12 +971,12 @@ static bool32 MatchCall_IsRematchable_Type2(match_call_t matchCall) return gSaveBlock1Ptr->trainerRematches[matchCall.type2->rematchTableIdx] ? TRUE : FALSE; } -static bool32 MatchCall_IsRematchable_Type3(match_call_t matchCall) +static bool32 MatchCall_IsRematchable_Type4(match_call_t matchCall) { return FALSE; } -static bool32 MatchCall_IsRematchable_Type4(match_call_t matchCall) +static bool32 MatchCall_IsRematchable_Type3(match_call_t matchCall) { return FALSE; } @@ -1051,12 +1052,12 @@ static u32 MatchCall_GetRematchTableIdx_Type2(match_call_t matchCall) return matchCall.type2->rematchTableIdx; } -static u32 MatchCall_GetRematchTableIdx_Type3(match_call_t matchCall) +static u32 MatchCall_GetRematchTableIdx_Type4(match_call_t matchCall) { return REMATCH_TABLE_ENTRIES; } -static u32 MatchCall_GetRematchTableIdx_Type4(match_call_t matchCall) +static u32 MatchCall_GetRematchTableIdx_Type3(match_call_t matchCall) { return REMATCH_TABLE_ENTRIES; } @@ -1091,12 +1092,12 @@ static void MatchCall_GetMessage_Type2(match_call_t matchCall, u8 *dest) sub_81D1920(matchCall.type2->textData, dest); } -static void MatchCall_GetMessage_Type3(match_call_t matchCall, u8 *dest) +static void MatchCall_GetMessage_Type4(match_call_t matchCall, u8 *dest) { sub_81D1920(matchCall.type4->textData, dest); } -static void MatchCall_GetMessage_Type4(match_call_t matchCall, u8 *dest) +static void MatchCall_GetMessage_Type3(match_call_t matchCall, u8 *dest) { sub_8197080(dest); } @@ -1190,13 +1191,13 @@ static void MatchCall_GetNameAndDesc_Type2(match_call_t matchCall, const u8 **de *desc = matchCall.type2->desc; } -static void MatchCall_GetNameAndDesc_Type3(match_call_t matchCall, const u8 **desc, const u8 **name) +static void MatchCall_GetNameAndDesc_Type4(match_call_t matchCall, const u8 **desc, const u8 **name) { *desc = matchCall.type4->desc; *name = matchCall.type4->name; } -static void MatchCall_GetNameAndDesc_Type4(match_call_t matchCall, const u8 **desc, const u8 **name) +static void MatchCall_GetNameAndDesc_Type3(match_call_t matchCall, const u8 **desc, const u8 **name) { *desc = matchCall.type3->desc; *name = matchCall.type3->name; @@ -1209,7 +1210,6 @@ static void MatchCall_GetNameAndDescByRematchIdx(u32 idx, const u8 **desc, const *name = trainer->trainerName; } -#ifdef NONMATCHING const u8 *sub_81D1B40(u32 idx, u32 offset) { u32 i; @@ -1218,95 +1218,21 @@ const u8 *sub_81D1B40(u32 idx, u32 offset) { if (sMatchCallCheckPageOverrides[i].idx == idx) { - for (; i + 1 < ARRAY_COUNT(sMatchCallCheckPageOverrides) && sMatchCallCheckPageOverrides[i + 1].idx == idx; i++) + while (1) { + if (i + 1 >= ARRAY_COUNT(sMatchCallCheckPageOverrides)) + break; + if (sMatchCallCheckPageOverrides[i + 1].idx != idx) + break; if (!FlagGet(sMatchCallCheckPageOverrides[i + 1].v4)) break; + i++; } return sMatchCallCheckPageOverrides[i].v8[offset]; } } return NULL; } -#else -NAKED const u8 *sub_81D1B40(u32 idx, u32 offset) -{ - asm_unified("\tpush {r4-r7,lr}\n" - "\tmov r7, r9\n" - "\tmov r6, r8\n" - "\tpush {r6,r7}\n" - "\tadds r6, r0, 0\n" - "\tmovs r5, 0\n" - "\tldr r2, =sMatchCallCheckPageOverrides\n" - "\tmovs r0, 0x8\n" - "\tadds r0, r2\n" - "\tmov r9, r0\n" - "_081D1B54:\n" - "\tlsls r0, r5, 1\n" - "\tadds r0, r5\n" - "\tlsls r0, 3\n" - "\tadds r0, r2\n" - "\tldrh r0, [r0]\n" - "\tcmp r0, r6\n" - "\tbne _081D1BBC\n" - "\tadds r4, r5, 0x1\n" - "\tlsls r1, 2\n" - "\tmov r8, r1\n" - "\tcmp r4, 0x3\n" - "\tbhi _081D1BA8\n" - "\tlsls r0, r4, 1\n" - "\tadds r0, r4\n" - "\tlsls r0, 3\n" - "\tadds r0, r2\n" - "\tldrh r0, [r0]\n" - "\tcmp r0, r6\n" - "\tbne _081D1BA8\n" - "\tldr r7, =sMatchCallCheckPageOverrides\n" - "_081D1B7C:\n" - "\tlsls r0, r4, 1\n" - "\tadds r0, r4\n" - "\tlsls r0, 3\n" - "\tadds r1, r7, 0x4\n" - "\tadds r0, r1\n" - "\tldrh r0, [r0]\n" - "\tbl FlagGet\n" - "\tlsls r0, 24\n" - "\tcmp r0, 0\n" - "\tbeq _081D1BA8\n" - "\tadds r5, r4, 0\n" - "\tadds r4, r5, 0x1\n" - "\tcmp r4, 0x3\n" - "\tbhi _081D1BA8\n" - "\tlsls r0, r4, 1\n" - "\tadds r0, r4\n" - "\tlsls r0, 3\n" - "\tadds r0, r7\n" - "\tldrh r0, [r0]\n" - "\tcmp r0, r6\n" - "\tbeq _081D1B7C\n" - "_081D1BA8:\n" - "\tlsls r0, r5, 1\n" - "\tadds r0, r5\n" - "\tlsls r0, 3\n" - "\tadd r0, r8\n" - "\tadd r0, r9\n" - "\tldr r0, [r0]\n" - "\tb _081D1BC4\n" - "\t.pool\n" - "_081D1BBC:\n" - "\tadds r5, 0x1\n" - "\tcmp r5, 0x3\n" - "\tbls _081D1B54\n" - "\tmovs r0, 0\n" - "_081D1BC4:\n" - "\tpop {r3,r4}\n" - "\tmov r8, r3\n" - "\tmov r9, r4\n" - "\tpop {r4-r7}\n" - "\tpop {r1}\n" - "\tbx r1"); -} -#endif int sub_81D1BD0(u32 idx) { diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index 795b4d599..bae3a8d7a 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -1164,4 +1164,4 @@ u32 sub_81C91AC(struct UnknownInnerStruct_81C81D4 *a0, const struct BgTemplate * a0->downArrow = NULL; return 1; } -}
\ No newline at end of file +} diff --git a/src/pokenav_unk_10.c b/src/pokenav_unk_10.c new file mode 100644 index 000000000..0ca0ea20d --- /dev/null +++ b/src/pokenav_unk_10.c @@ -0,0 +1,562 @@ +#include "global.h" +#include "decompress.h" +#include "dynamic_placeholder_text_util.h" +#include "international_string_util.h" +#include "pokenav.h" +#include "sprite.h" +#include "string_util.h" +#include "text.h" +#include "trainer_pokemon_sprites.h" +#include "window.h" + +struct Pokenav10Struct +{ + u32 field_0[5]; + struct Sprite *field_14; +}; + +struct Pokenav10Struct2 +{ + u32 filler0[2]; + u16 field_8; + u16 field_A; + u16 field_C; + u8 filler[2]; + u16 field_10; +}; + +// To do: move to C. +extern const u16 gUnknown_08623FF8[]; +extern const u16 gUnknown_08624038[]; +extern const u16 gUnknown_08624018[]; +extern const u16 gUnknown_08624078[]; +extern const u16 gUnknown_08624058[]; +extern const u32 gUnknown_08624280[]; +extern const u8 gText_RibbonsF700[]; +extern const u8 *const gRibbonDescriptionPointers[][2]; +extern const u8 *const gGiftRibbonDescriptionPointers[][2]; + +static u32 gUnknown_030012C0; +static u32 gUnknown_030012C4; + +void sub_81D0E84(struct Pokenav10Struct2 *structPtr); +void sub_81D0FF0(struct Pokenav10Struct2 *structPtr); +void sub_81D10D0(struct Pokenav10Struct2 *structPtr); +u32 sub_81D06C4(void); +u32 sub_81D07D8(void); +u32 sub_81D06D4(void); +void sub_81D06E4(u8 *nick, u8 *level, u8 *gender); +void sub_81D0760(u16 *species, u32 *personality, u32 *otId); +u16 sub_81D1184(s32 unused0, s32 unused1); +void sub_81D1258(struct Sprite *sprite, s32 arg1, s32 arg2, s32 arg3); +void sub_81D1284(struct Sprite *sprite); +u32 *sub_81D0914(u32 *arg0); +u32 *sub_81D092C(u32 *arg0); +void sub_81D1350(void); +void sub_81D13BC(u16 *dst, u32 id); +void sub_81D1370(u32 arg0, u32 id); +u16 sub_81D0944(void); +u32 sub_81D0954(void); +void sub_81D1500(struct Pokenav10Struct *structPtr); +bool32 sub_81D1524(struct Pokenav10Struct *structPtr); +void sub_81D1538(struct Sprite *sprite); +u32 sub_81D0C84(s32); +u32 sub_81D0D2C(s32); +u32 sub_81D0D8C(s32); +u32 sub_81D0E00(s32); +u32 sub_81D0C54(s32); + +const u8 gUnknown_086237F8[][4] = +{ + {1, 1, 0, 0}, + {3, 4, 1, 0}, + {3, 4, 5, 0}, + {3, 4, 9, 0}, + {3, 4, 13, 0}, + {3, 4, 17, 0}, + {1, 1, 21, 0}, + {1, 1, 22, 0}, + {1, 1, 23, 0}, + {1, 1, 24, 0}, + {1, 1, 25, 1}, + {1, 1, 26, 1}, + {1, 1, 27, 1}, + {1, 1, 28, 1}, + {1, 1, 29, 1}, + {1, 1, 30, 1}, + {1, 1, 31, 1} +}; + +#include "data/text/ribbon_descriptions.h" +#include "data/text/gift_ribbon_descriptions.h" + +const u16 gUnknown_08623FF8[] = INCBIN_U16("graphics/pokenav/ribbons_icon1.gbapal"); +const u16 gUnknown_08624018[] = INCBIN_U16("graphics/pokenav/ribbons_icon2.gbapal"); +const u16 gUnknown_08624038[] = INCBIN_U16("graphics/pokenav/ribbons_icon3.gbapal"); +const u16 gUnknown_08624058[] = INCBIN_U16("graphics/pokenav/ribbons_icon4.gbapal"); +const u16 gUnknown_08624078[] = INCBIN_U16("graphics/pokenav/ribbons_icon5.gbapal"); +const u16 gUnknown_08624098[] = INCBIN_U16("graphics/pokenav/8624098.gbapal"); +const u32 gUnknown_086240B8[] = INCBIN_U32("graphics/pokenav/ribbons_icon.4bpp.lz"); +const u32 gUnknown_08624280[] = INCBIN_U32("graphics/pokenav/ribbons_icon_big.4bpp.lz"); + +const struct BgTemplate gUnknown_08624B98[2] = +{ + { + .bg = 1, + .charBaseIndex = 3, + .mapBaseIndex = 0x07, + .screenSize = 0, + .paletteMode = 0, + .priority = 1, + .baseTile = 0 + }, + { + .bg = 2, + .charBaseIndex = 1, + .mapBaseIndex = 0x06, + .screenSize = 0, + .paletteMode = 0, + .priority = 2, + .baseTile = 0 + } +}; + +const LoopedTask gUnknown_08624BA0[] = +{ + NULL, + sub_81D0C84, + sub_81D0D2C, + sub_81D0D8C, + sub_81D0E00, + sub_81D0C54 +}; + +static const struct WindowTemplate gUnknown_08624BB8 = +{ + .bg = 2, + .tilemapLeft = 12, + .tilemapTop = 13, + .width = 16, + .height = 4, + .paletteNum = 1, + .baseBlock = 0x14, +}; + +void sub_81D0E60(struct Pokenav10Struct2 *structPtr) +{ + structPtr->field_A = AddWindow(&gUnknown_08624BB8); + PutWindowTilemap(structPtr->field_A); + sub_81D0E84(structPtr); +} + +void sub_81D0E84(struct Pokenav10Struct2 *structPtr) +{ + u8 color[] = {4, 2, 3}; + + ConvertIntToDecimalStringN(gStringVar1, sub_81D07D8(), STR_CONV_MODE_LEFT_ALIGN, 2); + DynamicPlaceholderTextUtil_Reset(); + DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1); + DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_RibbonsF700); + FillWindowPixelBuffer(structPtr->field_A, PIXEL_FILL(4)); + AddTextPrinterParameterized3(structPtr->field_A, 1, 0, 1, color, -1, gStringVar4); + CopyWindowToVram(structPtr->field_A, 2); +} + +void sub_81D0EFC(struct Pokenav10Struct2 *structPtr) +{ + s32 i; + u32 ribbonId = sub_81D0954(); + u8 color[] = {4, 2, 3}; + + FillWindowPixelBuffer(structPtr->field_A, PIXEL_FILL(4)); + if (ribbonId < 25) + { + for (i = 0; i < 2; i++) + AddTextPrinterParameterized3(structPtr->field_A, 1, 0, (i * 16) + 1, color, -1, gRibbonDescriptionPointers[ribbonId][i]); + } + else + { + ribbonId = gSaveBlock1Ptr->giftRibbons[ribbonId - 25]; + if (ribbonId == 0) + return; + + ribbonId--; + for (i = 0; i < 2; i++) + AddTextPrinterParameterized3(structPtr->field_A, 1, 0, (i * 16) + 1, color, -1, gGiftRibbonDescriptionPointers[ribbonId][i]); + } + + CopyWindowToVram(structPtr->field_A, 2); +} + +static const struct WindowTemplate gUnknown_08624BC4 = +{ + .bg = 2, + .tilemapLeft = 14, + .tilemapTop = 1, + .width = 13, + .height = 2, + .paletteNum = 10, + .baseBlock = 0x54, +}; + +void sub_81D0FCC(struct Pokenav10Struct2 *structPtr) +{ + structPtr->field_8 = AddWindow(&gUnknown_08624BC4); + PutWindowTilemap(structPtr->field_8); + sub_81D0FF0(structPtr); +} + +static const u8 sMaleIconString[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_RED}{WHITE}{GREEN}♂{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}"); +static const u8 sFemaleIconString[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_GREEN}{WHITE}{BLUE}♀{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}"); +static const u8 sGenderlessIconString[] = _("{UNK_SPACER}"); + +void sub_81D0FF0(struct Pokenav10Struct2 *structPtr) +{ + const u8 *genderTxt; + u8 *txtPtr; + u8 level, gender; + u16 windowId = structPtr->field_8; + + FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); + sub_81D06E4(gStringVar3, &level, &gender); + AddTextPrinterParameterized(windowId, 1, gStringVar3, 0, 1, TEXT_SPEED_FF, NULL); + switch (gender) + { + case MON_MALE: + genderTxt = sMaleIconString; + break; + case MON_FEMALE: + genderTxt = sFemaleIconString; + break; + default: + genderTxt = sGenderlessIconString; + break; + } + + txtPtr = StringCopy(gStringVar1, genderTxt); + *(txtPtr++) = CHAR_SLASH; + *(txtPtr++) = CHAR_SPECIAL_F9; + *(txtPtr++) = 5; + ConvertIntToDecimalStringN(txtPtr, level, STR_CONV_MODE_LEFT_ALIGN, 3); + AddTextPrinterParameterized(windowId, 1, gStringVar1, 60, 1, TEXT_SPEED_FF, NULL); + CopyWindowToVram(windowId, 2); +} + +static const struct WindowTemplate gUnknown_08624BE8[] = +{ + { + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 5, + .width = 7, + .height = 2, + .paletteNum = 1, + .baseBlock = 0x6E, + }, + {}, +}; + +void sub_81D10A4(struct Pokenav10Struct2 *structPtr) +{ + structPtr->field_C = AddWindow(gUnknown_08624BE8); + FillWindowPixelBuffer(structPtr->field_C, PIXEL_FILL(1)); + PutWindowTilemap(structPtr->field_C); + sub_81D10D0(structPtr); +} + +void sub_81D10D0(struct Pokenav10Struct2 *structPtr) +{ + s32 x; + u8 *txtPtr; + u32 id = sub_81D06C4() + 1; + u32 count = sub_81D06D4(); + + txtPtr = ConvertIntToDecimalStringN(gStringVar1, id, STR_CONV_MODE_RIGHT_ALIGN, 3); + *(txtPtr++) = CHAR_SLASH; + ConvertIntToDecimalStringN(txtPtr, count, STR_CONV_MODE_RIGHT_ALIGN, 3); + x = GetStringCenterAlignXOffset(1, gStringVar1, 56); + AddTextPrinterParameterized(structPtr->field_C, 1, gStringVar1, x, 1, TEXT_SPEED_FF, NULL); + CopyWindowToVram(structPtr->field_C, 2); +} + +void sub_81D1148(struct Pokenav10Struct2 *structPtr) +{ + u16 species; + u32 personality, otId; + + sub_81D0760(&species, &personality, &otId); + ResetAllPicSprites(); + structPtr->field_10 = sub_81D1184(40, 104); + sub_81C7990(15, 0); +} + +void sub_81D1178(struct Pokenav10Struct2 *structPtr) +{ + FreeAndDestroyMonPicSprite(structPtr->field_10); +} + +u16 sub_81D1184(s32 unused0, s32 unused1) +{ + u16 species, spriteId; + u32 personality, otId; + + sub_81D0760(&species, &personality, &otId); + spriteId = CreateMonPicSprite_HandleDeoxys(species, otId, personality, TRUE, 40, 104, 15, 0xFFFF); + gSprites[spriteId].oam.priority = 0; + return spriteId; +} + +void sub_81D11D8(struct Pokenav10Struct2 *structPtr) +{ + sub_81D1258(&gSprites[structPtr->field_10], 40, -32, 6); +} + +void sub_81D11FC(struct Pokenav10Struct2 *structPtr) +{ + FreeAndDestroyMonPicSprite(structPtr->field_10); + structPtr->field_10 = sub_81D1184(-32, 104); + sub_81D1258(&gSprites[structPtr->field_10], -32, 40, 6); +} + +bool32 sub_81D1234(struct Pokenav10Struct2 *structPtr) +{ + return (gSprites[structPtr->field_10].callback != SpriteCallbackDummy); +} + +void sub_81D1258(struct Sprite *sprite, s32 arg1, s32 arg2, s32 arg3) +{ + u32 var = arg2 - arg1; + + sprite->pos1.x = arg1; + sprite->data[0] = arg1 << 4; + sprite->data[1] = (var << 4) / arg3; + sprite->data[2] = arg3; + sprite->data[3] = arg2; + + sprite->callback = sub_81D1284; +} + +void sub_81D1284(struct Sprite *sprite) +{ + if (sprite->data[2] != 0) + { + sprite->data[2]--; + sprite->data[0] += sprite->data[1]; + sprite->pos1.x = sprite->data[0] >> 4; + if (sprite->pos1.x <= -32) + sprite->invisible = TRUE; + else + sprite->invisible = FALSE; + } + else + { + sprite->pos1.x = sprite->data[3]; + sprite->callback = SpriteCallbackDummy; + } +} + +void sub_81D12D8(void) +{ + u32 *ptr; + + sub_81D1350(); + + ptr = sub_81D0914(&gUnknown_030012C0); + for (gUnknown_030012C4 = 0; gUnknown_030012C4 < gUnknown_030012C0; gUnknown_030012C4++) + sub_81D1370(gUnknown_030012C4, *(ptr++)); + + ptr = sub_81D092C(&gUnknown_030012C0); + for (gUnknown_030012C4 = 0; gUnknown_030012C4 < gUnknown_030012C0; gUnknown_030012C4++) + sub_81D1370(gUnknown_030012C4 + 27, *(ptr++)); + + CopyBgTilemapBufferToVram(1); +} + +void sub_81D1350(void) +{ + FillBgTilemapBufferRect_Palette0(1, 0, 0, 0, 32, 20); +} + +void sub_81D1370(u32 arg0, u32 id) +{ + u16 bgData[4]; + u32 destX = (arg0 % 9) * 2 + 11; + u32 destY = (arg0 / 9) * 2 + 4; + + sub_81D13BC(bgData, id); + CopyToBgTilemapBufferRect(1, bgData, destX, destY, 2, 2); +} + +struct +{ + u16 var0; + u16 var2; +} static const gUnknown_08624BF8[] = +{ + {0, 0}, + {1, 0}, + {2, 0}, + {3, 0}, + {4, 0}, + {1, 1}, + {2, 1}, + {3, 1}, + {4, 1}, + {1, 2}, + {2, 2}, + {3, 2}, + {4, 2}, + {1, 3}, + {2, 3}, + {3, 3}, + {4, 3}, + {1, 4}, + {2, 4}, + {3, 4}, + {4, 4}, + {5, 0}, + {6, 0}, + {7, 1}, + {8, 2}, + {9, 1}, + {9, 3}, + {9, 4}, + {10, 3}, + {10, 4}, + {11, 0}, + {11, 1}, +}; + +void sub_81D13BC(u16 *dst, u32 id) +{ + u16 r3 = gUnknown_08624BF8[id].var2 + 2; + u16 r1 = (gUnknown_08624BF8[id].var0 * 2) + 1; + + dst[0] = r1 | (r3 << 12); + dst[1] = r1 | (r3 << 12) |0x400; + dst[2] = (r1 + 1) | (r3 << 12); + dst[3] = (r1 + 1) | (r3 << 12) | 0x400; +} + +static const struct CompressedSpriteSheet gUnknown_08624C78 = +{ + gUnknown_08624280, 0x1800, 9 +}; + +static const struct SpritePalette gUnknown_08624C80[] = +{ + {gUnknown_08623FF8, 15}, + {gUnknown_08624018, 16}, + {gUnknown_08624038, 17}, + {gUnknown_08624058, 18}, + {gUnknown_08624078, 19}, + {}, +}; + +static const struct OamData sOamData_8624CB0 = +{ + .y = 0, + .affineMode = 1, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = SPRITE_SHAPE(32x32), + .x = 0, + .matrixNum = 0, + .size = SPRITE_SIZE(32x32), + .tileNum = 0, + .priority = 1, + .paletteNum = 0, + .affineParam = 0 +}; + +static const union AffineAnimCmd sSpriteAffineAnim_8624CB8[] = +{ + AFFINEANIMCMD_FRAME(128, 128, 0, 0), + AFFINEANIMCMD_END +}; + +static const union AffineAnimCmd sSpriteAffineAnim_8624CC8[] = +{ + AFFINEANIMCMD_FRAME(128, 128, 0, 0), + AFFINEANIMCMD_FRAME(32, 32, 0, 4), + AFFINEANIMCMD_END +}; + +static const union AffineAnimCmd sSpriteAffineAnim_8624CE0[] = +{ + AFFINEANIMCMD_FRAME(256, 256, 0, 0), + AFFINEANIMCMD_FRAME(-32, -32, 0, 4), + AFFINEANIMCMD_END +}; + +static const union AffineAnimCmd *const sSpriteAffineAnimTable_8624CF8[] = +{ + sSpriteAffineAnim_8624CB8, + sSpriteAffineAnim_8624CC8, + sSpriteAffineAnim_8624CE0 +}; + +static const struct SpriteTemplate gUnknown_08624D04 = +{ + .tileTag = 9, + .paletteTag = 15, + .oam = &sOamData_8624CB0, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = sSpriteAffineAnimTable_8624CF8, + .callback = SpriteCallbackDummy, +}; + +void sub_81D13FC(struct Pokenav10Struct *structPtr) +{ + u8 spriteId; + + LoadCompressedSpriteSheet(&gUnknown_08624C78); + Pokenav_AllocAndLoadPalettes(gUnknown_08624C80); + + spriteId = CreateSprite(&gUnknown_08624D04, 0, 0, 0); + structPtr->field_14 = &gSprites[spriteId]; + structPtr->field_14->invisible = TRUE; +} + +void sub_81D1448(struct Pokenav10Struct *structPtr) +{ + u32 ribbonId; + s32 r4 = sub_81D0944(); + s32 r5 = (r4 % 9) * 16 + 96; + s32 r0 = (r4 / 9) * 16 + 40; + + structPtr->field_14->pos1.x = r5; + structPtr->field_14->pos1.y = r0; + + ribbonId = sub_81D0954(); + structPtr->field_14->oam.tileNum = (gUnknown_08624BF8[ribbonId].var0 * 16) + GetSpriteTileStartByTag(9); + structPtr->field_14->oam.paletteNum = IndexOfSpritePaletteTag(gUnknown_08624BF8[ribbonId].var2 + 15); + + StartSpriteAffineAnim(structPtr->field_14, 1); + structPtr->field_14->invisible = FALSE; + structPtr->field_14->data[0] = 0; + structPtr->field_14->callback = sub_81D1538; +} + +void sub_81D1500(struct Pokenav10Struct *structPtr) +{ + structPtr->field_14->data[0] = 1; + StartSpriteAffineAnim(structPtr->field_14, 2); + structPtr->field_14->callback = sub_81D1538; +} + +bool32 sub_81D1524(struct Pokenav10Struct *structPtr) +{ + return (structPtr->field_14->callback != SpriteCallbackDummy); +} + +void sub_81D1538(struct Sprite *sprite) +{ + if (sprite->affineAnimEnded) + { + sprite->invisible = sprite->data[0]; + sprite->callback = SpriteCallbackDummy; + } +} diff --git a/src/pokenav_unk_2.c b/src/pokenav_unk_2.c new file mode 100644 index 000000000..60aa5ea5e --- /dev/null +++ b/src/pokenav_unk_2.c @@ -0,0 +1,273 @@ +#include "global.h" +#include "bg.h" +#include "gym_leader_rematch.h" +#include "pokenav.h" +#include "sprite.h" +#include "window.h" +#include "strings.h" +#include "scanline_effect.h" + +extern const u32 gPokenavOptions_Gfx[]; +extern const u16 gPokenavOptions_Pal[]; + +const u16 gUnknown_0861FC78[] = INCBIN_U16("graphics/pokenav/bg.gbapal"); +const u32 gUnknown_0861FC98[] = INCBIN_U32("graphics/pokenav/bg.4bpp.lz"); +const u32 gUnknown_0861FCAC[] = INCBIN_U32("graphics/pokenav/bg.bin.lz"); +const u16 gUnknown_0861FD4C[] = INCBIN_U16("graphics/pokenav/outline.gbapal"); +const u32 gUnknown_0861FD6C[] = INCBIN_U32("graphics/pokenav/outline.4bpp.lz"); +const u32 gUnknown_0861FFF4[] = INCBIN_U32("graphics/pokenav/outline_map.bin.lz"); +const u16 gUnknown_08620104[] = INCBIN_U16("graphics/pokenav/blue_light.gbapal"); +const u32 gUnknown_08620124[] = INCBIN_U32("graphics/pokenav/blue_light.4bpp.lz"); + +const struct BgTemplate gUnknown_08620194[3] = +{ + { + .bg = 1, + .charBaseIndex = 1, + .mapBaseIndex = 0x0F, + .screenSize = 0, + .paletteMode = 0, + .priority = 1, + .baseTile = 0 + }, + { + .bg = 2, + .charBaseIndex = 2, + .mapBaseIndex = 0x17, + .screenSize = 0, + .paletteMode = 0, + .priority = 2, + .baseTile = 0 + }, + { + .bg = 3, + .charBaseIndex = 3, + .mapBaseIndex = 0x1F, + .screenSize = 0, + .paletteMode = 0, + .priority = 3, + .baseTile = 0 + } +}; + +u32 sub_81C9C6C(s32); +u32 sub_81C9CA8(s32); +u32 sub_81C9D44(s32); +u32 sub_81C9DD8(s32); +u32 sub_81C9E58(s32); +u32 sub_81C9EC8(s32); +u32 sub_81C9EF8(s32); +u32 sub_81C9F28(s32); + +u32 (*const gUnknown_086201A0[])(s32) = +{ + NULL, + sub_81C9C6C, + sub_81C9CA8, + sub_81C9D44, + sub_81C9DD8, + sub_81C9E58, + sub_81C9EC8, + sub_81C9EF8, + sub_81C9F28 +}; + +const struct CompressedSpriteSheet gUnknown_086201C4[] = +{ + { + .data = gPokenavOptions_Gfx, + .size = 0x3400, + .tag = 0x0003 + }, + { + .data = gUnknown_08620124, + .size = 0x0100, + .tag = 0x0001 + } +}; + + const struct SpritePalette gUnknown_086201D4[] = + { + {gPokenavOptions_Pal + 0x00, 4}, + {gPokenavOptions_Pal + 0x10, 5}, + {gPokenavOptions_Pal + 0x20, 6}, + {gPokenavOptions_Pal + 0x30, 7}, + {gPokenavOptions_Pal + 0x40, 8}, + {gUnknown_08620104, 3}, + {} +}; + +const u16 gUnknown_0862020C[] = {0, 0}; +const u16 gUnknown_08620210[] = {0x20, 1}; +const u16 gUnknown_08620214[] = {0x40, 4}; +const u16 gUnknown_08620218[] = {0x60, 2}; +const u16 gUnknown_0862021C[] = {0x80, 3}; +const u16 gUnknown_08620220[] = {0xA0, 1}; +const u16 gUnknown_08620224[] = {0xC0, 1}; +const u16 gUnknown_08620228[] = {0xE0, 4}; +const u16 gUnknown_0862022C[] = {0x100, 1}; +const u16 gUnknown_08620230[] = {0x120, 2}; +const u16 gUnknown_08620234[] = {0x140, 0}; +const u16 gUnknown_08620238[] = {0x160, 0}; +const u16 gUnknown_0862023C[] = {0x180, 3}; + +struct UnkStruct_08620240 +{ + u16 unk0; + u16 unk2; + const u16 *unk4[6]; +}; + +const struct UnkStruct_08620240 gUnknown_08620240[5] = +{ + { + 0x2A, + 0x14, + {gUnknown_0862020C, gUnknown_08620210, gUnknown_0862021C, NULL, NULL, NULL} + }, + { + 0x2A, + 0x14, + {gUnknown_0862020C, gUnknown_08620210, gUnknown_08620214, gUnknown_0862021C, NULL, NULL} + }, + { + 0x2A, + 0x14, + {gUnknown_0862020C, gUnknown_08620210, gUnknown_08620214, gUnknown_08620218, gUnknown_0862021C, NULL} + }, + { + 0x38, + 0x14, + {gUnknown_08620220, gUnknown_08620224, gUnknown_0862023C, NULL, NULL, NULL} + }, + { + 0x28, + 0x10, + {gUnknown_08620228, gUnknown_0862022C, gUnknown_08620230, gUnknown_08620234, gUnknown_08620238, gUnknown_0862023C} + }, +}; + +const struct WindowTemplate gUnknown_086202CC = +{ + .bg = 1, + .tilemapLeft = 3, + .tilemapTop = 17, + .width = 0x18, + .height = 0x2, + .paletteNum = 1, + .baseBlock = 8 +}; + +const u8 *const gUnknown_086202D4[] = +{ + gUnknown_085EBCC5, + gUnknown_085EBCE8, + gUnknown_085EBD01, + gUnknown_085EBD1C, + gUnknown_085EBD34, + gUnknown_085EBD83, + gUnknown_085EBDA2, + gUnknown_085EBDBF, + gUnknown_085EBDDB, + gUnknown_085EBDEE, + gUnknown_085EBE06, + gUnknown_085EBE19, + gUnknown_085EBE2D, + gUnknown_085EBE41 +}; + +const u8 gUnknown_0862030C[] = {6, 8, 7}; + +const u8 gUnknown_0862030F[] = {6, 8, 7, 0, 0}; + +const struct OamData gUnknown_08620314 = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .bpp = 0, + .shape = SPRITE_SHAPE(32x16), + .x = 0, + .size = SPRITE_SIZE(32x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const union AffineAnimCmd gUnknown_0862031C[] = +{ + AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd gUnknown_0862032C[] = +{ + AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), + AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 0x12), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd *const gUnknown_08620344[] = +{ + gUnknown_0862031C, + gUnknown_0862032C +}; + +const struct SpriteTemplate gUnknown_0862034C = +{ + .tileTag = 3, + .paletteTag = 4, + .oam = &gUnknown_08620314, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gUnknown_08620344, + .callback = SpriteCallbackDummy, +}; + +const struct OamData gUnknown_08620364 = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .bpp = 0, + .shape = SPRITE_SHAPE(32x16), + .x = 0, + .size = SPRITE_SIZE(32x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct SpriteTemplate gUnknown_0862036C = +{ + .tileTag = 1, + .paletteTag = 3, + .oam = &gUnknown_08620364, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy, +}; + +const struct ScanlineEffectParams gUnknown_08620384 = +{ + (void *)REG_ADDR_WIN0H, + ((DMA_ENABLE | DMA_START_HBLANK | DMA_REPEAT | DMA_DEST_RELOAD) << 16) | 1, + 1, + 0 +}; + +bool32 sub_81C98D4(void) +{ + s32 i; + + for (i = 0; i < REMATCH_TABLE_ENTRIES; i++) + { + if (sub_81CB0C8(i) == gMapHeader.regionMapSectionId + && sub_81CAE08(i) + && gSaveBlock1Ptr->trainerRematches[i]) + return TRUE; + } + + return FALSE; +} diff --git a/src/pokenav_unk_3.c b/src/pokenav_unk_3.c index c6705a352..9b62bea78 100755 --- a/src/pokenav_unk_3.c +++ b/src/pokenav_unk_3.c @@ -34,12 +34,13 @@ static u32 sub_81CABFC(struct Pokenav3Struct *); static u32 sub_81CAC04(struct Pokenav3Struct *); static u32 sub_81CACB8(struct Pokenav3Struct *); static u32 sub_81CACF8(struct Pokenav3Struct *); -static u32 sub_81CAD20(int); +static u32 sub_81CAD20(s32); static bool32 sub_81CB1D0(void); -extern const u8 gUnknown_08622508[]; -extern const u8 gUnknown_0862250A[]; -extern const u8 *const gUnknown_08622028[][4]; +#include "data/text/match_call_messages.h" + +const u8 gUnknown_08622508[] = {0, 2}; +const u8 gUnknown_0862250A[] = {0, 1, 2}; bool32 sub_81CAAE8(void) { @@ -190,7 +191,7 @@ static u32 sub_81CACF8(struct Pokenav3Struct *state) return 0; } -static u32 sub_81CAD20(int taskState) +static u32 sub_81CAD20(s32 taskState) { int i, j; struct Pokenav3Struct *state = GetSubstructPtr(5); @@ -207,7 +208,7 @@ static u32 sub_81CAD20(int taskState) { state->unk1C[state->unkA].unk2 = j; state->unk1C[state->unkA].unk0 = 1; - state->unk1C[state->unkA].unk1 = sub_81D16DC(j); + state->unk1C[state->unkA].unk1 = MatchCallMapSecGetByIndex(j); state->unkA++; } @@ -282,7 +283,7 @@ int unref_sub_81CAE6C(int arg0) arg0 += state->unkC; if (arg0 >= state->unkA) return REMATCH_TABLE_ENTRIES; - + return state->unk1C[arg0].unk2; } @@ -321,7 +322,7 @@ int sub_81CAF04(int index) index = GetTrainerIdxByRematchIdx(state->unk1C[index].unk2); return gTrainers[index].trainerPic; } - + var0 = state->unk1C[index].unk2; index = MatchCall_GetRematchTableIdx(var0); if (index != REMATCH_TABLE_ENTRIES) @@ -364,7 +365,7 @@ const u8 *sub_81CAFD8(int index, int textType) var0 = state->unk1C[index].unk2; } - return gUnknown_08622028[var0][textType]; + return gMatchCallMessages[var0][textType]; } u16 sub_81CB01C(void) @@ -411,7 +412,7 @@ void sub_81CB050(u32 arg0, u8 *str) } } -int sub_81CB0C8(int rematchIndex) +u8 sub_81CB0C8(int rematchIndex) { int mapGroup = gRematchTable[rematchIndex].mapGroup; int mapNum = gRematchTable[rematchIndex].mapNum; diff --git a/src/pokenav_unk_4.c b/src/pokenav_unk_4.c index 6fa76daf2..93dab4491 100755 --- a/src/pokenav_unk_4.c +++ b/src/pokenav_unk_4.c @@ -50,7 +50,7 @@ struct Pokenav4Struct }; static bool32 sub_81CB310(void); -static u32 sub_81CB324(int); +static u32 sub_81CB324(s32); static void sub_81CBBB8(void); static void sub_81CBC1C(void); static void sub_81CC2B4(void); @@ -93,27 +93,191 @@ static void sub_81CC330(struct Pokenav4Struct *); static struct Sprite *sub_81CC370(void); static void sub_81CC440(struct Sprite *sprite); static void sub_81CC4A4(struct Sprite *sprite); +void sub_81CC34C(struct Sprite *sprite); +u32 sub_81CB510(s32); +u32 sub_81CB588(s32); +u32 sub_81CB600(s32); +u32 sub_81CB678(s32); +u32 sub_81CB6F0(s32); +u32 sub_81CB734(s32); +u32 sub_81CB75C(s32); +u32 sub_81CB7A0(s32); +u32 sub_81CB824(s32); +u32 sub_81CB888(s32); +u32 sub_81CB93C(s32); +u32 sub_81CBAD4(s32); +u32 sub_81CB9C8(s32); +u32 sub_81CBA68(s32); +u32 sub_81CBB74(s32); -extern const LoopedTask gUnknown_08622798[]; -extern const struct BgTemplate gUnknown_0862278C[3]; -extern const u16 gUnknown_08622510[]; -extern const u32 gUnknown_08622530[]; -extern const u32 gUnknown_08622760[]; -extern const u16 gUnknown_08622700[]; -extern const u16 gUnknown_08622720[]; -extern const u8 gUnknown_086225D4[]; -extern const u16 gUnknown_086226E0[]; -extern const struct BgTemplate gUnknown_08622794; -extern const struct WindowTemplate gUnknown_086227D8; -extern const struct WindowTemplate gUnknown_086227E0; -extern const u8 *const gUnknown_086227E8[]; extern const struct WindowTemplate gUnknown_08622808; -extern const u8 gUnknown_086227F4[]; -extern const struct CompressedSpriteSheet gUnknown_08622810[1]; -extern const struct SpritePalette gUnknown_08622818[]; extern const struct SpriteTemplate gUnknown_08622830; extern const struct SpriteTemplate gUnknown_08622850; +const u16 gUnknown_08622510[] = INCBIN_U16("graphics/pokenav/ui_matchcall.gbapal"); +const u32 gUnknown_08622530[] = INCBIN_U32("graphics/pokenav/ui_matchcall.4bpp.lz"); +const u32 gUnknown_086225D4[] = INCBIN_U32("graphics/pokenav/ui_matchcall.bin.lz"); +const u16 gUnknown_08622698[] = INCBIN_U16("graphics/pokenav/arrow2.gbapal"); +const u32 gUnknown_086226B8[] = INCBIN_U32("graphics/pokenav/arrow2.4bpp.lz"); +const u16 gUnknown_086226E0[] = INCBIN_U16("graphics/pokenav/86226E0.gbapal"); +const u16 gUnknown_08622700[] = INCBIN_U16("graphics/pokenav/8622700.gbapal"); +const u16 gUnknown_08622720[] = INCBIN_U16("graphics/pokenav/pokeball_matchcall.gbapal"); +const u32 gUnknown_08622760[] = INCBIN_U32("graphics/pokenav/pokeball_matchcall.4bpp.lz"); + +const struct BgTemplate gUnknown_0862278C[3] = +{ + { + .bg = 1, + .charBaseIndex = 3, + .mapBaseIndex = 0x1F, + .screenSize = 0, + .paletteMode = 0, + .priority = 1, + .baseTile = 0 + }, + { + .bg = 2, + .charBaseIndex = 2, + .mapBaseIndex = 0x06, + .screenSize = 0, + .paletteMode = 0, + .priority = 2, + .baseTile = 0x80 + }, + { + .bg = 3, + .charBaseIndex = 1, + .mapBaseIndex = 0x07, + .screenSize = 0, + .paletteMode = 0, + .priority = 3, + .baseTile = 0 + } +}; + +const LoopedTask gUnknown_08622798[] = +{ + NULL, + sub_81CB510, + sub_81CB588, + sub_81CB600, + sub_81CB678, + sub_81CB6F0, + sub_81CB734, + sub_81CB75C, + sub_81CB7A0, + sub_81CB824, + sub_81CB888, + sub_81CB93C, + sub_81CBAD4, + sub_81CB9C8, + sub_81CBA68, + sub_81CBB74 +}; + +const struct WindowTemplate gUnknown_086227D8 = +{ + .bg = 2, + .tilemapLeft = 0, + .tilemapTop = 5, + .width = 11, + .height = 2, + .paletteNum = 2, + .baseBlock = 16 +}; + +const struct WindowTemplate gUnknown_086227E0 = +{ + .bg = 2, + .tilemapLeft = 0, + .tilemapTop = 9, + .width = 11, + .height = 8, + .paletteNum = 2, + .baseBlock = 38 +}; + +const u8 *const gUnknown_086227E8[] = +{ + gUnknown_085EC017, + gUnknown_085EC01C, + gUnknown_085EC022 +}; + +const u8 gUnknown_086227F4[] = _("·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·\p"); + +const struct WindowTemplate gUnknown_08622808 = +{ + .bg = 1, + .tilemapLeft = 1, + .tilemapTop = 12, + .width = 0x1C, + .height = 0x04, + .paletteNum = 1, + .baseBlock = 10 +}; + +const struct CompressedSpriteSheet gUnknown_08622810[1] = +{ + {gUnknown_086226B8, 0x40, 7} +}; + +const struct SpritePalette gUnknown_08622818[] = +{ + {gUnknown_08622698, 12}, + {} +}; + +const struct OamData gUnknown_08622828 = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .bpp = 0, + .shape = SPRITE_SHAPE(8x16), + .x = 0, + .size = SPRITE_SIZE(8x16), + .tileNum = 0, + .priority = 1, + .paletteNum = 0, +}; + +const struct SpriteTemplate gUnknown_08622830 = +{ + .tileTag = 7, + .paletteTag = 12, + .oam = &gUnknown_08622828, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_81CC34C, +}; + +const struct OamData gUnknown_08622848 = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .bpp = 0, + .shape = SPRITE_SHAPE(64x64), + .x = 0, + .size = SPRITE_SIZE(64x64), + .tileNum = 0, + .priority = 1, + .paletteNum = 0, +}; + +const struct SpriteTemplate gUnknown_08622850 = +{ + .tileTag = 8, + .paletteTag = 13, + .oam = &gUnknown_08622848, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy, +}; + bool32 sub_81CB260(void) { struct Pokenav4Struct *state = AllocSubstruct(6, sizeof(struct Pokenav4Struct)); @@ -156,7 +320,7 @@ static bool32 sub_81CB310(void) return IsLoopedTaskActive(state->unk4); } -static u32 sub_81CB324(int taskState) +static u32 sub_81CB324(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) @@ -229,7 +393,7 @@ static u32 sub_81CB324(int taskState) } } -u32 sub_81CB510(int taskState) +u32 sub_81CB510(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) @@ -266,7 +430,7 @@ u32 sub_81CB510(int taskState) return 4; } -u32 sub_81CB588(int taskState) +u32 sub_81CB588(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) @@ -303,7 +467,7 @@ u32 sub_81CB588(int taskState) return 4; } -u32 sub_81CB600(int taskState) +u32 sub_81CB600(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) @@ -340,7 +504,7 @@ u32 sub_81CB600(int taskState) return 4; } -u32 sub_81CB678(int taskState) +u32 sub_81CB678(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) @@ -377,7 +541,7 @@ u32 sub_81CB678(int taskState) return 4; } -u32 sub_81CB6F0(int taskState) +u32 sub_81CB6F0(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) @@ -396,7 +560,7 @@ u32 sub_81CB6F0(int taskState) return 4; } -u32 sub_81CB734(int taskState) +u32 sub_81CB734(s32 taskState) { struct Pokenav4Struct *state; u16 var0; @@ -408,7 +572,7 @@ u32 sub_81CB734(int taskState) return 4; } -u32 sub_81CB75C(int taskState) +u32 sub_81CB75C(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) @@ -427,7 +591,7 @@ u32 sub_81CB75C(int taskState) return 4; } -u32 sub_81CB7A0(int taskState) +u32 sub_81CB7A0(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) @@ -459,7 +623,7 @@ u32 sub_81CB7A0(int taskState) return 4; } -u32 sub_81CB824(int taskState) +u32 sub_81CB824(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) @@ -485,7 +649,7 @@ u32 sub_81CB824(int taskState) return 4; } -u32 sub_81CB888(int taskState) +u32 sub_81CB888(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); u32 result = 0; @@ -549,7 +713,7 @@ u32 sub_81CB888(int taskState) return result; } -u32 sub_81CB93C(int taskState) +u32 sub_81CB93C(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) @@ -578,7 +742,7 @@ u32 sub_81CB93C(int taskState) return 4; } -u32 sub_81CB9C8(int taskState) +u32 sub_81CB9C8(s32 taskState) { int index; int var0; @@ -617,7 +781,7 @@ u32 sub_81CB9C8(int taskState) return 4; } -u32 sub_81CBA68(int taskState) +u32 sub_81CBA68(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) @@ -643,7 +807,7 @@ u32 sub_81CBA68(int taskState) return 4; } -u32 sub_81CBAD4(int taskState) +u32 sub_81CBAD4(s32 taskState) { int index; int var0; @@ -682,7 +846,7 @@ u32 sub_81CBAD4(int taskState) return 4; } -u32 sub_81CBB74(int taskState) +u32 sub_81CBB74(s32 taskState) { switch (taskState) { @@ -718,7 +882,7 @@ static void sub_81CBBB8(void) template.unkE = 7; template.unk10 = sub_81CB050; template.unk14 = sub_81CBCEC; - sub_81C81D4(&gUnknown_08622794, &template, 2); + sub_81C81D4(&gUnknown_0862278C[2], &template, 2); CreateTask(sub_81CBC64, 7); } diff --git a/src/pokenav_unk_5.c b/src/pokenav_unk_5.c index eccc200d5..ccab58078 100755 --- a/src/pokenav_unk_5.c +++ b/src/pokenav_unk_5.c @@ -32,18 +32,18 @@ struct Pokenav5Struct_2 u8 cityZoomPics[22][0xC8]; }; -struct CityZoomPic +struct CityMapEntry { u16 mapSecId; - u16 unk2; - const u32 *data; + u16 index; + const u32 *tilemap; }; static u32 sub_81CC568(struct Pokenav5Struct *); static u32 sub_81CC5B4(struct Pokenav5Struct *); static u32 sub_81CC5DC(struct Pokenav5Struct *); -static u32 sub_81CC6F4(int); -static u32 sub_81CCD34(int); +static u32 sub_81CC6F4(s32); +static u32 sub_81CCD34(s32); static bool32 sub_81CC6BC(void); static void sub_81CC9EC(void); static void sub_81CC9C0(void); @@ -61,17 +61,110 @@ static void sub_81CCDE8(struct Pokenav5Struct_2 *, int, int); static void sub_81CCFA4(int); static void sub_81CCC9C(u8 taskId); static void sub_81CCF78(void); +void sub_81CCEF4(struct Sprite *sprite); +u32 sub_81CC848(s32); +u32 sub_81CC878(s32); +u32 sub_81CC8D8(s32); +u32 sub_81CC95C(s32); -extern const LoopedTask gUnknown_086230E4[]; -extern const struct BgTemplate gUnknown_086230D8[2]; -extern const struct CompressedSpriteSheet gUnknown_086230F8[1]; -extern const struct SpritePalette gUnknown_08623100[]; -extern const struct WindowTemplate gUnknown_08623110; -extern const u32 gUnknown_08622888[]; -extern const u16 gUnknown_08622868[]; extern const u16 gHoennMapZoomIcons_Pal[]; -extern const struct CityZoomPic gUnknown_08623118[22]; extern const struct SpriteTemplate gUnknown_086231D0; +extern const u32 gHoennMapZoomIcons_Gfx[]; + +const u16 gUnknown_08622868[] = INCBIN_U16("graphics/pokenav/8622868.gbapal"); +const u32 gUnknown_08622888[] = INCBIN_U32("graphics/pokenav/zoom_tiles.4bpp.lz"); + +#include "data/region_map/city_map_tilemaps.h" + + +const struct BgTemplate gUnknown_086230D8[3] = +{ + { + .bg = 1, + .charBaseIndex = 1, + .mapBaseIndex = 0x1F, + .screenSize = 0, + .paletteMode = 0, + .priority = 1, + .baseTile = 0 + }, + { + .bg = 2, + .charBaseIndex = 2, + .mapBaseIndex = 0x06, + .screenSize = 0, + .paletteMode = 0, + .priority = 2, + .baseTile = 0 + }, + { + .bg = 2, + .charBaseIndex = 0, + .mapBaseIndex = 0x00, + .screenSize = 2, + .paletteMode = 0, + .priority = 3, + .baseTile = 0 + }, +}; + +const LoopedTask gUnknown_086230E4[] = +{ + NULL, + sub_81CC848, + sub_81CC878, + sub_81CC8D8, + sub_81CC95C +}; + +const struct CompressedSpriteSheet gUnknown_086230F8[1] = +{ + {gHoennMapZoomIcons_Gfx, 0x800, 6} +}; + +const struct SpritePalette gUnknown_08623100[] = +{ + {gHoennMapZoomIcons_Pal, 11}, + {} +}; + +const struct WindowTemplate gUnknown_08623110 = +{ + .bg = 1, + .tilemapLeft = 17, + .tilemapTop = 4, + .width = 12, + .height = 13, + .paletteNum = 1, + .baseBlock = 0x4C +}; + +#include "data/region_map/city_map_entries.h" + +const struct OamData gUnknown_086231C8 = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .bpp = 0, + .shape = SPRITE_SHAPE(32x8), + .x = 0, + .size = SPRITE_SIZE(32x8), + .tileNum = 0, + .priority = 1, + .paletteNum = 0, +}; + +const struct SpriteTemplate gUnknown_086231D0 = +{ + .tileTag = 6, + .paletteTag = 11, + .oam = &gUnknown_086231C8, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_81CCEF4, +}; u32 sub_81CC4D4(void) { @@ -202,7 +295,7 @@ static bool8 sub_81CC6D0(void) return gSaveBlock2Ptr->regionMapZoom == 1; } -static u32 sub_81CC6F4(int taskState) +static u32 sub_81CC6F4(s32 taskState) { int var0; struct RegionMap *regionMap; @@ -215,7 +308,7 @@ static u32 sub_81CC6F4(int taskState) HideBg(2); HideBg(3); SetBgMode(1); - InitBgTemplates(gUnknown_086230D8, ARRAY_COUNT(gUnknown_086230D8)); + InitBgTemplates(gUnknown_086230D8, ARRAY_COUNT(gUnknown_086230D8) - 1); regionMap = GetSubstructPtr(16); sub_8122CF8(regionMap, &gUnknown_086230D8[1], sub_81CC6D0()); sub_81CC9C0(); @@ -278,7 +371,7 @@ static u32 sub_81CC6F4(int taskState) } } -u32 sub_81CC848(int taskState) +u32 sub_81CC848(s32 taskState) { struct Pokenav5Struct_2 *state = GetSubstructPtr(4); switch (taskState) @@ -295,7 +388,7 @@ u32 sub_81CC848(int taskState) return 4; } -u32 sub_81CC878(int taskState) +u32 sub_81CC878(s32 taskState) { switch (taskState) { @@ -321,7 +414,7 @@ u32 sub_81CC878(int taskState) return 4; } -u32 sub_81CC8D8(int taskState) +u32 sub_81CC8D8(s32 taskState) { struct Pokenav5Struct_2 *state = GetSubstructPtr(4); switch (taskState) @@ -354,7 +447,7 @@ u32 sub_81CC8D8(int taskState) return 4; } -u32 sub_81CC95C(int taskState) +u32 sub_81CC95C(s32 taskState) { switch (taskState) { @@ -518,12 +611,12 @@ static bool32 sub_81CCD24(void) return FuncIsActiveLoopedTask(sub_81CCD34); } -static u32 sub_81CCD34(int taskState) +static u32 sub_81CCD34(s32 taskState) { struct Pokenav5Struct_2 *state = GetSubstructPtr(4); - if (taskState < (int)ARRAY_COUNT(gUnknown_08623118)) + if (taskState < (int)ARRAY_COUNT(gPokenavCityMaps)) { - LZ77UnCompWram(gUnknown_08623118[taskState].data, state->cityZoomPics[taskState]); + LZ77UnCompWram(gPokenavCityMaps[taskState].tilemap, state->cityZoomPics[taskState]); return 1; } @@ -533,10 +626,10 @@ static u32 sub_81CCD34(int taskState) static void sub_81CCD70(struct Pokenav5Struct_2 *state, int mapSecId, int pos) { int i; - for (i = 0; i < (int)ARRAY_COUNT(gUnknown_08623118) && (gUnknown_08623118[i].mapSecId != mapSecId || gUnknown_08623118[i].unk2 != pos); i++) + for (i = 0; i < (int)ARRAY_COUNT(gPokenavCityMaps) && (gPokenavCityMaps[i].mapSecId != mapSecId || gPokenavCityMaps[i].index != pos); i++) ; - if (i == ARRAY_COUNT(gUnknown_08623118)) + if (i == ARRAY_COUNT(gPokenavCityMaps)) return; FillBgTilemapBufferRect_Palette0(1, 0x1041, 17, 6, 12, 11); diff --git a/src/pokenav_unk_6.c b/src/pokenav_unk_6.c new file mode 100644 index 000000000..638884d3f --- /dev/null +++ b/src/pokenav_unk_6.c @@ -0,0 +1,625 @@ +#include "global.h" +#include "data.h" +#include "decompress.h" +#include "main.h" +#include "menu_specialized.h" +#include "mon_markings.h" +#include "pokenav.h" +#include "pokemon.h" +#include "pokemon_storage_system.h" +#include "sound.h" +#include "string_util.h" +#include "strings.h" +#include "text.h" +#include "constants/songs.h" +#include "constants/species.h" + +struct PokenavSub11 +{ + u32 monPal[3][0x20]; + u8 fill[0x180]; + u32 monPicGfx[3][0x800]; + u8 unk6300; + s16 unk6302; + u32 (*unk6304)(struct PokenavSub11 *); + u8 fill2[0x6320 - 0x6308]; + u8 unk6320[3][24]; + u8 unk6368[3][64]; + struct UnknownStruct_81D1ED4 unk6428; + u8 unk6780[3]; + u8 unk6783[3]; + s8 unk6786; + s8 unk6787; + s8 unk6788; + s8 unk6789; + u8 unk678A; +}; + +void sub_81CD970(void); +void sub_81CD9F8(void); +u32 sub_81CD08C(struct PokenavSub11 *structPtr); +u32 sub_81CD19C(struct PokenavSub11 *structPtr); +u32 sub_81CD110(struct PokenavSub11 *structPtr); +u8 sub_81CD1E4(struct PokenavSub11 *structPtr); +u8 sub_81CD258(u8 arg0); +void sub_81CD824(s16 arg0, u8 arg1); +void sub_81CDA1C(s16 arg0, u8 arg1); +void sub_81CDB98(s16 arg0, u8 arg1); + +// code +bool32 sub_81CCFD8(void) +{ + struct PokenavSub11 *structPtr = AllocSubstruct(11, sizeof(struct PokenavSub11)); + + if (structPtr == NULL) + return FALSE; + + sub_81D1ED4(&structPtr->unk6428); + sub_81CD970(); + gKeyRepeatStartDelay = 20; + structPtr->unk6304 = sub_81CD08C; + return TRUE; +} + +bool32 sub_81CD024(void) +{ + struct PokenavSub11 *structPtr = AllocSubstruct(11, sizeof(struct PokenavSub11)); + + if (structPtr == NULL) + return FALSE; + + sub_81D1ED4(&structPtr->unk6428); + sub_81CD9F8(); + gKeyRepeatStartDelay = 20; + structPtr->unk6304 = sub_81CD08C; + return TRUE; +} + +u32 sub_81CD070(void) +{ + struct PokenavSub11 *structPtr = GetSubstructPtr(11); + + return structPtr->unk6304(structPtr); +} + +u32 sub_81CD08C(struct PokenavSub11 *structPtr) +{ + struct PokenavSub18 *unkPtr = GetSubstructPtr(18); + u32 ret = sub_81CD1E4(structPtr); + + if (ret == 0) + { + if (gMain.newKeys & B_BUTTON) + { + PlaySE(SE_SELECT); + structPtr->unk6304 = sub_81CD19C; + ret = 2; + } + else if (gMain.newKeys & A_BUTTON) + { + if (structPtr->unk6300 == 0) + { + if (unkPtr->unk2 == unkPtr->unk0 - 1) + { + PlaySE(SE_SELECT); + structPtr->unk6304 = sub_81CD19C; + ret = 2; + } + } + else + { + PlaySE(SE_SELECT); + ret = 5; + structPtr->unk6304 = sub_81CD110; + } + } + } + + return ret; +} + +u32 sub_81CD110(struct PokenavSub11 *structPtr) +{ + struct PokenavSub18 *unkPtr; + u8 markings; + u32 ret = 0, boxId, monId; + + if (!sub_811FBA4()) + { + structPtr->unk6783[structPtr->unk6786] = sub_81CEF14(); + unkPtr = GetSubstructPtr(18); + boxId = unkPtr->unk4[unkPtr->unk2].boxId; + monId = unkPtr->unk4[unkPtr->unk2].monId; + markings = structPtr->unk6783[structPtr->unk6786]; + + if (boxId == TOTAL_BOXES_COUNT) + SetMonData(&gPlayerParty[monId], MON_DATA_MARKINGS, &markings); + else + SetBoxMonDataAt(boxId, monId, MON_DATA_MARKINGS, &markings); + + structPtr->unk6304 = sub_81CD08C; + ret = 6; + } + + return ret; +} + +u32 sub_81CD19C(struct PokenavSub11 *structPtr) +{ + if (structPtr->unk6300 == 0) + return 0x186A2; + else + return 0x186AA; +} + +void sub_81CD1C0(void) +{ + struct PokenavSub11 *structPtr = GetSubstructPtr(11); + if (structPtr->unk6300 == 0) + FreePokenavSubstruct(18); + + FreePokenavSubstruct(11); +} + +u8 sub_81CD1E4(struct PokenavSub11 *structPtr) +{ + struct PokenavSub18 *unkPtr = GetSubstructPtr(18); + u8 ret = 0; + + if (gMain.heldKeys & DPAD_UP) + { + if (structPtr->unk6300 == 0 || unkPtr->unk2 != 0) + { + PlaySE(SE_SELECT); + ret = sub_81CD258(1); + } + } + else if (gMain.heldKeys & DPAD_DOWN) + { + if (structPtr->unk6300 == 0 || unkPtr->unk2 < unkPtr->unk0 - 1) + { + PlaySE(SE_SELECT); + ret = sub_81CD258(0); + } + } + + return ret; +} + +u8 sub_81CD258(u8 arg0) +{ + u16 r7; + bool8 r6, r0; + struct PokenavSub11 *structPtr = GetSubstructPtr(11); + struct PokenavSub18 *unkPtr = GetSubstructPtr(18); + + r7 = (arg0) ? structPtr->unk6788 : structPtr->unk6787; + sub_81D1F84(&structPtr->unk6428, structPtr->unk6428.unk14[structPtr->unk6786], structPtr->unk6428.unk14[r7]); + r6 = (unkPtr->unk2 != ((sub_81CDD5C() != 0) ? unkPtr->unk0 : unkPtr->unk0 - 1)); + if (arg0) + { + structPtr->unk6788 = structPtr->unk6787; + structPtr->unk6787 = structPtr->unk6786; + structPtr->unk6786 = r7; + structPtr->unk6789 = structPtr->unk6788; + + unkPtr->unk2 = (unkPtr->unk2 == 0) ? unkPtr->unk0 - 1 : unkPtr->unk2 - 1; + structPtr->unk6302 = (unkPtr->unk2 != 0) ? unkPtr->unk2 - 1 : unkPtr->unk0 - 1; + } + else + { + structPtr->unk6787 = structPtr->unk6788; + structPtr->unk6788 = structPtr->unk6786; + structPtr->unk6786 = r7; + structPtr->unk6789 = structPtr->unk6787; + + unkPtr->unk2 = (unkPtr->unk2 < unkPtr->unk0 - 1) ? unkPtr->unk2 + 1 : 0; + structPtr->unk6302 = (unkPtr->unk2 < unkPtr->unk0 - 1) ? unkPtr->unk2 + 1 : 0; + } + + r0 = (unkPtr->unk2 != ((sub_81CDD5C() != 0) ? unkPtr->unk0 : unkPtr->unk0 - 1)); + + if (!r6) + return 3; + else if (!r0) + return 4; + else + return 1; +} + +bool32 sub_81CD3C4(void) +{ + s32 var; + struct PokenavSub11 *structPtr = GetSubstructPtr(11); + struct PokenavSub18 *unkPtr = GetSubstructPtr(18); + + switch (structPtr->unk678A) + { + case 0: + sub_81CD824(unkPtr->unk2, 0); + break; + case 1: + sub_81CDA1C(unkPtr->unk2, 0); + break; + case 2: + sub_81CDB98(unkPtr->unk2, 0); + break; + case 3: + if (unkPtr->unk0 == 1) + { + structPtr->unk6786 = 0; + structPtr->unk6787 = 0; + structPtr->unk6788 = 0; + structPtr->unk678A = 0; + return TRUE; + } + else + { + structPtr->unk6786 = 0; + structPtr->unk6787 = 1; + structPtr->unk6788 = 2; + } + break; + // These were probably ternaries just like cases 7-9, but couldn't match it any other way. + case 4: + var = unkPtr->unk2 + 1; + if (var >= unkPtr->unk0) + var = 0; + sub_81CD824(var, 1); + break; + case 5: + var = unkPtr->unk2 + 1; + if (var >= unkPtr->unk0) + var = 0; + sub_81CDA1C(var, 1); + break; + case 6: + var = unkPtr->unk2 + 1; + if (var >= unkPtr->unk0) + var = 0; + sub_81CDB98(var, 1); + break; + case 7: + sub_81CD824((unkPtr->unk2 - 1 >= 0) ? unkPtr->unk2 - 1 : unkPtr->unk0 - 1, 2); + break; + case 8: + sub_81CDA1C((unkPtr->unk2 - 1 >= 0) ? unkPtr->unk2 - 1 : unkPtr->unk0 - 1, 2); + break; + case 9: + sub_81CDB98((unkPtr->unk2 - 1 >= 0) ? unkPtr->unk2 - 1 : unkPtr->unk0 - 1, 2); + structPtr->unk678A = 0; + return TRUE; + } + + structPtr->unk678A++; + return FALSE; +} + +bool32 sub_81CD548(u8 arg0) +{ + struct PokenavSub11 *structPtr = GetSubstructPtr(11); + + switch (arg0) + { + case 0: + sub_81CD824(structPtr->unk6302, structPtr->unk6789); + break; + case 1: + sub_81CDA1C(structPtr->unk6302, structPtr->unk6789); + break; + case 2: + sub_81CDB98(structPtr->unk6302, structPtr->unk6789); + return TRUE; + } + + return FALSE; +} + +u8 *sub_81CD5CC(u8 *dst, const u8 *src, s16 n) +{ + while (*src != EOS) + *dst++ = *src++, n--; + + while (n-- > 0) + *dst++ = CHAR_SPACE; + + *dst = EOS; + return dst; +} + +u8 *sub_81CD624(u8 *str, u16 id, bool8 arg3) +{ + u16 boxId, monId, gender, species, level, lvlDigits; + struct BoxPokemon *boxMon; + u8 *txtPtr, *str_; + struct PokenavSub18 *unkPtr = GetSubstructPtr(18); + + boxId = unkPtr->unk4[id].boxId; + monId = unkPtr->unk4[id].monId; + *(str++) = EXT_CTRL_CODE_BEGIN; + *(str++) = 4; + *(str++) = 8; + *(str++) = 0; + *(str++) = 9; + + if (GetBoxOrPartyMonData(boxId, monId, MON_DATA_IS_EGG, NULL)) + return StringCopyPadded(str, gText_EggNickname, CHAR_SPACE, 12); + + GetBoxOrPartyMonData(boxId, monId, MON_DATA_NICKNAME, str); + StringGetEnd10(str); + species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES, NULL); + if (boxId == TOTAL_BOXES_COUNT) + { + level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL); + gender = GetMonGender(&gPlayerParty[monId]); + } + else + { + boxMon = GetBoxedMonPtr(boxId, monId); + gender = GetBoxMonGender(boxMon); + level = GetLevelFromBoxMonExp(boxMon); + } + + if ((species == SPECIES_NIDORAN_F || species == SPECIES_NIDORAN_M) && !StringCompare(str, gSpeciesNames[species])) + gender = MON_GENDERLESS; + + str_ = str; // For some reason, a variable is needed to match. + while (*str_ != EOS) + *(str_++); + + *(str_++) = EXT_CTRL_CODE_BEGIN; + *(str_++) = 0x12; + *(str_++) = 0x3C; + switch (gender) + { + default: + *(str_++) = 0x77; + break; + case MON_MALE: + *(str_++) = EXT_CTRL_CODE_BEGIN; + *(str_++) = EXT_CTRL_CODE_COLOR; + *(str_++) = 4; + *(str_++) = EXT_CTRL_CODE_BEGIN; + *(str_++) = 3; + *(str_++) = 5; + *(str_++) = CHAR_MALE; + break; + case MON_FEMALE: + *(str_++) = EXT_CTRL_CODE_BEGIN; + *(str_++) = EXT_CTRL_CODE_COLOR; + *(str_++) = 6; + *(str_++) = EXT_CTRL_CODE_BEGIN; + *(str_++) = 3; + *(str_++) = 7; + *(str_++) = CHAR_FEMALE; + break; + } + + *(str_++) = EXT_CTRL_CODE_BEGIN; + *(str_++) = 4; + *(str_++) = 8; + *(str_++) = 0; + *(str_++) = 9; + *(str_++) = CHAR_SLASH; + *(str_++) = CHAR_SPECIAL_F9; + *(str_++) = 5; + txtPtr = str_; + str_ = ConvertIntToDecimalStringN(str_, level, STR_CONV_MODE_LEFT_ALIGN, 3); + lvlDigits = str_ - txtPtr; + *(str_++) = CHAR_SPACE; + if (!arg3) + { + lvlDigits = 3 - lvlDigits; + while (lvlDigits-- != 0) + *(str_++) = CHAR_SPACE; + } + + *str_ = EOS; + return str_; +} + +void sub_81CD824(s16 arg0, u8 arg1) +{ + u16 boxId, i; + struct PokenavSub11 *structPtr = GetSubstructPtr(11); + struct PokenavSub18 *unkPtr = GetSubstructPtr(18); + + if (arg0 != (sub_81CDD5C() != 0 ? unkPtr->unk0 : unkPtr->unk0 - 1)) + { + sub_81CD624(structPtr->unk6368[arg1], arg0, FALSE); + boxId = unkPtr->unk4[arg0].boxId; + structPtr->unk6320[arg1][0] = EXT_CTRL_CODE_BEGIN; + structPtr->unk6320[arg1][1] = 4; + structPtr->unk6320[arg1][2] = 8; + structPtr->unk6320[arg1][3] = 0; + structPtr->unk6320[arg1][4] = 9; + if (boxId == TOTAL_BOXES_COUNT) + sub_81CD5CC(&structPtr->unk6320[arg1][5], gText_InParty, 8); + else + sub_81CD5CC(&structPtr->unk6320[arg1][5], GetBoxNamePtr(boxId), 8); + } + else + { + for (i = 0; i < 12; i++) + structPtr->unk6368[arg1][i] = CHAR_SPACE; + structPtr->unk6368[arg1][i] = EOS; + + for (i = 0; i < 8; i++) + structPtr->unk6320[arg1][i] = CHAR_SPACE; + structPtr->unk6320[arg1][i] = EOS; + } +} + +void sub_81CD970(void) +{ + u16 i, count; + struct PokenavSub11 *structPtr = GetSubstructPtr(11); + struct PokenavSub18 *unkPtr = AllocSubstruct(18, sizeof(struct PokenavSub18)); + + structPtr->unk6300 = 0; + for (i = 0, count = 0; i < CalculatePlayerPartyCount(); i++) + { + if (!GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG)) + { + unkPtr->unk4[count].boxId = TOTAL_BOXES_COUNT; + unkPtr->unk4[count].monId = i; + unkPtr->unk4[count].unk6 = 0; + count++; + } + } + + unkPtr->unk4[count].boxId = 0; + unkPtr->unk4[count].monId = 0; + unkPtr->unk4[count].unk6 = 0; + unkPtr->unk2 = 0; + unkPtr->unk0 = count + 1; + structPtr->unk678A = 0; +} + +void sub_81CD9F8(void) +{ + struct PokenavSub11 *structPtr = GetSubstructPtr(11); + structPtr->unk6300 = 1; + structPtr->unk678A = 0; +} + +void sub_81CDA1C(s16 arg0, u8 arg1) +{ + u16 boxId, monId, i; + struct PokenavSub11 *structPtr = GetSubstructPtr(11); + struct PokenavSub18 *unkPtr = GetSubstructPtr(18); + + if (arg0 != (sub_81CDD5C() != 0 ? unkPtr->unk0 : unkPtr->unk0 - 1)) + { + boxId = unkPtr->unk4[arg0].boxId; + monId = unkPtr->unk4[arg0].monId; + structPtr->unk6428.unk0[arg1][0] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_COOL, NULL); + structPtr->unk6428.unk0[arg1][1] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_TOUGH, NULL); + structPtr->unk6428.unk0[arg1][2] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SMART, NULL); + structPtr->unk6428.unk0[arg1][3] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_CUTE, NULL); + structPtr->unk6428.unk0[arg1][4] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_BEAUTY, NULL); + structPtr->unk6780[arg1] = (GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL) != 255) + ? GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL) / 29u + : 9; + structPtr->unk6783[arg1] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_MARKINGS, NULL); + sub_81D2754(structPtr->unk6428.unk0[arg1], structPtr->unk6428.unk14[arg1]); + } + else + { + for (i = 0; i < 5; i++) + { + structPtr->unk6428.unk0[arg1][i] = 0; + structPtr->unk6428.unk14[arg1][i].unk0 = 155; + structPtr->unk6428.unk14[arg1][i].unk2 = 91; + } + } +} + +void sub_81CDB98(s16 arg0, u8 arg1) +{ + u16 boxId, monId, species; + u32 personality, tid; + struct PokenavSub11 *structPtr = GetSubstructPtr(11); + struct PokenavSub18 *unkPtr = GetSubstructPtr(18); + + if (arg0 == (sub_81CDD5C() != 0 ? unkPtr->unk0 : unkPtr->unk0 - 1)) + return; + + boxId = unkPtr->unk4[arg0].boxId; + monId = unkPtr->unk4[arg0].monId; + species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES2, NULL); + tid = GetBoxOrPartyMonData(boxId, monId, MON_DATA_OT_ID, NULL); + personality = GetBoxOrPartyMonData(boxId, monId, MON_DATA_PERSONALITY, NULL); + LoadSpecialPokePic(&gMonFrontPicTable[species], structPtr->monPicGfx[arg1], species, personality, TRUE); + LZ77UnCompWram(GetMonSpritePalFromSpeciesAndPersonality(species, tid, personality), structPtr->monPal[arg1]); +} + +u16 sub_81CDC50(void) +{ + struct PokenavSub18 *unkPtr = GetSubstructPtr(18); + return unkPtr->unk0; +} + +u16 sub_81CDC60(void) +{ + struct PokenavSub18 *unkPtr = GetSubstructPtr(18); + return unkPtr->unk2; +} + +struct UnknownStruct_81D1ED4 *sub_81CDC70(void) +{ + struct PokenavSub11 *structPtr = GetSubstructPtr(11); + return &structPtr->unk6428; +} + +u8 sub_81CDC84(void) +{ + struct PokenavSub11 *structPtr = GetSubstructPtr(11); + return structPtr->unk6786; +} + +u8 sub_81CDC9C(void) +{ + struct PokenavSub11 *structPtr = GetSubstructPtr(11); + return structPtr->unk6302; +} + +void *sub_81CDCB4(u8 id) +{ + struct PokenavSub11 *structPtr = GetSubstructPtr(11); + return structPtr->monPicGfx[id]; +} + +void *sub_81CDCD4(u8 id) +{ + struct PokenavSub11 *structPtr = GetSubstructPtr(11); + return structPtr->monPal[id]; +} + +u8 sub_81CDCEC(void) +{ + struct PokenavSub11 *structPtr = GetSubstructPtr(11); + return structPtr->unk6789; +} + +u8 *sub_81CDD04(u8 id) +{ + struct PokenavSub11 *structPtr = GetSubstructPtr(11); + return structPtr->unk6368[id]; +} + +u8 *sub_81CDD24(u8 id) +{ + struct PokenavSub11 *structPtr = GetSubstructPtr(11); + return structPtr->unk6320[id]; +} + +u16 sub_81CDD48(void) +{ + struct PokenavSub18 *unkPtr = GetSubstructPtr(18); + return unkPtr->unk4[unkPtr->unk2].unk6; +} + +bool32 sub_81CDD5C(void) +{ + struct PokenavSub11 *structPtr = GetSubstructPtr(11); + if (structPtr->unk6300 == 1) + return TRUE; + else + return FALSE; +} + +u8 sub_81CDD7C(void) +{ + struct PokenavSub11 *structPtr = GetSubstructPtr(11); + if (structPtr->unk6300 == 1) + return structPtr->unk6783[structPtr->unk6786]; + else + return 0; +} + +u8 sub_81CDDB0(void) +{ + struct PokenavSub11 *structPtr = GetSubstructPtr(11); + return structPtr->unk6780[structPtr->unk6786]; +} diff --git a/src/pokenav_unk_7.c b/src/pokenav_unk_7.c new file mode 100644 index 000000000..90b677fa7 --- /dev/null +++ b/src/pokenav_unk_7.c @@ -0,0 +1,884 @@ +#include "global.h" +#include "bg.h" +#include "window.h" +#include "pokenav.h" +#include "decompress.h" +#include "gpu_regs.h" +#include "graphics.h" +#include "menu.h" +#include "menu_specialized.h" +#include "mon_markings.h" +#include "palette.h" +#include "pokenav.h" +#include "scanline_effect.h" +#include "string_util.h" +#include "strings.h" +#include "text.h" + +u32 sub_81CE37C(s32); +u32 sub_81CE2D0(s32); +u32 sub_81CE4D8(s32); +u32 sub_81CE5E4(s32); +u32 sub_81CE6BC(s32); +u32 sub_81CE700(s32); + +BSS_DATA u8 gUnknown_030012BC; + +const u16 gUnknown_086231E8[] = INCBIN_U16("graphics/pokenav/86231E8.gbapal"); +const u16 gUnknown_08623208[] = INCBIN_U16("graphics/pokenav/8623208.gbapal"); +const u32 gUnknown_08623228[] = INCBIN_U32("graphics/pokenav/8623228.4bpp.lz"); +const u32 gUnknown_0862323C[] = INCBIN_U32("graphics/pokenav/862323C.bin.lz"); +const u16 gUnknown_08623338[] = INCBIN_U16("graphics/pokenav/8623338.gbapal"); + +const struct BgTemplate gUnknown_08623358[3] = +{ + { + .bg = 1, + .charBaseIndex = 1, + .mapBaseIndex = 0x1F, + .screenSize = 0, + .paletteMode = 0, + .priority = 1, + .baseTile = 0 + }, + { + .bg = 2, + .charBaseIndex = 3, + .mapBaseIndex = 0x1D, + .screenSize = 0, + .paletteMode = 0, + .priority = 2, + .baseTile = 0 + }, + { + .bg = 3, + .charBaseIndex = 2, + .mapBaseIndex = 0x1E, + .screenSize = 0, + .paletteMode = 0, + .priority = 3, + .baseTile = 0 + } +}; + +const struct WindowTemplate gUnknown_08623364 = +{ + .bg = 1, + .tilemapLeft = 13, + .tilemapTop = 1, + .width = 13, + .height = 4, + .paletteNum = 15, + .baseBlock = 2 +}; + +const struct WindowTemplate gUnknown_0862336C = +{ + .bg = 1, + .tilemapLeft = 1, + .tilemapTop = 6, + .width = 7, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x36 +}; + +const struct WindowTemplate gUnknown_08623374 = +{ + .bg = 1, + .tilemapLeft = 1, + .tilemapTop = 0x1C, + .width = 5, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x44 +}; + +const struct WindowTemplate gUnknown_0862337C = +{ + .bg = 1, + .tilemapLeft = 13, + .tilemapTop = 0x1C, + .width = 3, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x44 +}; + +const LoopedTask gUnknown_08623384[] = +{ + NULL, + sub_81CE37C, + sub_81CE2D0, + sub_81CE4D8, + sub_81CE5E4, + sub_81CE6BC, + sub_81CE700 +}; + +struct Pokenav7Struct +{ + u32 loopedTaskId; + u8 tilemapBuffers[3][BG_SCREEN_SIZE]; + u8 filler[2]; + u8 unk1806[10]; + u32 (*unk1810)(void); + s16 unk1814; + u8 unk1816; + u16 unk1818; + u16 unk181A; + void *unk181C; + u8 unk1820; + u8 unk1821; + u8 unk1822; + u8 unk1823; + struct PokemonMarkMenu monMarks; + struct Sprite *unk28dc; + struct Sprite *unk28e0[10]; + u8 unk2908; + u8 filler2[0x38ac - 0x2909]; +}; + +extern s8 sub_81CDC84(void); // This function's declaration here is different than its definition in pokenav_unk_6. u8/s8 + +u32 sub_81CDE94(s32 state); +u32 sub_81CDE80(void); +void sub_81CED30(u8 var); +void sub_81CE9E4(void); +void sub_81CE934(void); +bool32 sub_81CE754(u8 a0, u16 a1, bool8 a2); +void sub_81CEE44(void); +void sub_81CEE90(void); +void sub_81CEEC8(void); +void sub_81CEE68(void); +void sub_81CEE74(bool8 showBg); + +// code +bool32 sub_81CDDD4(void) +{ + struct Pokenav7Struct *structPtr = AllocSubstruct(0xC, sizeof(struct Pokenav7Struct)); + + if (structPtr == NULL) + return FALSE; + + structPtr->unk1816 = 0xFF; + structPtr->loopedTaskId = CreateLoopedTask(sub_81CDE94, 1); + structPtr->unk1810 = sub_81CDE80; + structPtr->unk2908 = 0; + return TRUE; +} + +void sub_81CDE2C(int id) +{ + struct Pokenav7Struct *structPtr = GetSubstructPtr(0xC); + structPtr->loopedTaskId = CreateLoopedTask(gUnknown_08623384[id], 1); + structPtr->unk1810 = sub_81CDE80; +} + +u32 sub_81CDE64(void) +{ + struct Pokenav7Struct *structPtr = GetSubstructPtr(0xC); + return structPtr->unk1810(); +} + +u32 sub_81CDE80(void) +{ + struct Pokenav7Struct *structPtr = GetSubstructPtr(0xC); + return IsLoopedTaskActive(structPtr->loopedTaskId); +} + +u32 sub_81CDE94(s32 state) +{ + struct Pokenav7Struct *structPtr = GetSubstructPtr(0xC); + + switch (state) + { + case 0: + if (sub_81CD3C4() != TRUE) + return 2; + return 0; + case 1: + InitBgTemplates(gUnknown_08623358, ARRAY_COUNT(gUnknown_08623358)); + ChangeBgX(1, 0, 0); + ChangeBgY(1, 0, 0); + ChangeBgX(2, 0, 0); + ChangeBgY(2, 0, 0); + ChangeBgX(3, 0, 0); + ChangeBgY(3, 0, 0); + SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON | DISPCNT_WIN1_ON | DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP | DISPCNT_BG0_ON | DISPCNT_BG3_ON); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG2 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG3); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(11, 4)); + decompress_and_copy_tile_data_to_vram(3, gPokenavCondition_Gfx, 0, 0, 0); + return 0; + case 2: + if (free_temp_tile_data_buffers_if_possible()) + return 2; + decompress_and_copy_tile_data_to_vram(2, gUnknown_08623228, 0, 0, 0); + return 0; + case 3: + if (free_temp_tile_data_buffers_if_possible()) + return 2; + + LZ77UnCompVram(gPokenavCondition_Tilemap, structPtr->tilemapBuffers[0]); + SetBgTilemapBuffer(3, structPtr->tilemapBuffers[0]); + if (sub_81CDD5C() == TRUE) + CopyToBgTilemapBufferRect(3, gPokenavOptions_Tilemap, 0, 5, 9, 4); + + CopyBgTilemapBufferToVram(3); + CopyPaletteIntoBufferUnfaded(gPokenavCondition_Pal, 0x10, 0x20); + CopyPaletteIntoBufferUnfaded(gUnknown_08623208, 0xF0, 0x20); + structPtr->unk1814 = -80; + return 0; + case 4: + if (free_temp_tile_data_buffers_if_possible()) + return 2; + + LZ77UnCompVram(gUnknown_0862323C, structPtr->tilemapBuffers[2]); + SetBgTilemapBuffer(2, structPtr->tilemapBuffers[2]); + CopyBgTilemapBufferToVram(2); + CopyPaletteIntoBufferUnfaded(gUnknown_086231E8, 0x30, 0x20); + sub_81D21DC(2); + return 0; + case 5: + sub_8199DF0(1, 0, 0, 1); + sub_8199DF0(1, 17, 1, 1); + CpuFill32(0, structPtr->tilemapBuffers[1], BG_SCREEN_SIZE); + SetBgTilemapBuffer(1, structPtr->tilemapBuffers[1]); + return 0; + case 6: + if (free_temp_tile_data_buffers_if_possible()) + return 2; + + structPtr->unk1820 = AddWindow(&gUnknown_08623364); + if (sub_81CDD5C() == TRUE) + { + structPtr->unk1821 = AddWindow(&gUnknown_0862336C); + structPtr->unk1822 = AddWindow(&gUnknown_08623374); + structPtr->unk1823 = AddWindow(&gUnknown_0862337C); + } + DeactivateAllTextPrinters(); + return 0; + case 7: + sub_81CED30(0); + return 0; + case 8: + sub_81CE9E4(); + return 0; + case 9: + if (sub_81CDD5C() == TRUE) + sub_81CE934(); + return 0; + case 10: + sub_81CE754(0, sub_81CDC84(), TRUE); + return 0; + case 11: + sub_81CE754(1, sub_81CDC84(), TRUE); + return 0; + case 12: + sub_81CE754(2, sub_81CDC84(), TRUE); + return 0; + case 13: + if (sub_81CE754(3, sub_81CDC84(), TRUE) != TRUE) + return 2; + PutWindowTilemap(structPtr->unk1820); + if (sub_81CDD5C() == TRUE) + { + PutWindowTilemap(structPtr->unk1821); + PutWindowTilemap(structPtr->unk1822); + PutWindowTilemap(structPtr->unk1823); + } + return 0; + case 14: + ShowBg(1); + HideBg(2); + ShowBg(3); + if (sub_81CDD5C() == TRUE) + sub_81C7BA4(4); + return 0; + case 15: + sub_81C7AC0(1); + if (!sub_81CDD5C()) + { + LoadLeftHeaderGfxForIndex(6); + sub_81C7FA0(1, TRUE, 0); + sub_81C7FA0(6, TRUE, 0); + } + return 0; + case 16: + if (IsPaletteFadeActive()) + return 2; + if (!sub_81CDD5C() && sub_81C8010()) + return 2; + SetVBlankCallback_(sub_81CEE44); + return 0; + case 17: + sub_81CEE90(); + sub_81D20AC(sub_81CDC70()); + return 0; + case 18: + if (sub_81D20BC(sub_81CDC70())) + return 2; + return 0; + case 19: + sub_81CEE74(TRUE); + return 0; + case 20: + if (!sub_81D3178(sub_81CDC70(), &structPtr->unk1814)) + { + sub_81D3464(structPtr->unk28e0); + if (sub_81CDD5C() == TRUE || sub_81CDC60() != sub_81CDC50()) + sub_81D3480(structPtr->unk28e0, structPtr->unk1816, sub_81CDDB0()); + + return 4; + } + return 2; + } + + return 4; +} + +u32 sub_81CE2D0(s32 state) +{ + struct Pokenav7Struct *structPtr = GetSubstructPtr(0xC); + + switch (state) + { + case 0: + sub_81CEEC8(); + sub_81D3520(structPtr->unk28e0); + return 1; + case 1: + if (sub_81D31A4(sub_81CDC70(), &structPtr->unk1814)) + return 2; + sub_81CEE74(FALSE); + return 1; + case 2: + sub_81C7AC0(0); + if (!sub_81CDD5C()) + sub_81C78A0(); + return 0; + case 3: + if (IsPaletteFadeActive() || MainMenuLoopedTaskIsBusy()) + return 2; + sub_81D354C(structPtr->unk28e0); + HideBg(1); + HideBg(2); + HideBg(3); + return 1; + } + + return 4; +} + +u32 sub_81CE37C(s32 state) +{ + struct Pokenav7Struct *structPtr = GetSubstructPtr(0xC); + struct UnknownStruct_81D1ED4 *unkPtr = sub_81CDC70(); + + switch (state) + { + case 0: + sub_81CD548(0); + return 1; + case 1: + sub_81CD548(1); + return 1; + case 2: + sub_81CD548(2); + sub_81D3520(structPtr->unk28e0); + return 1; + case 3: + sub_81D2074(unkPtr); + return 1; + case 4: + if (!sub_81D3150(&structPtr->unk1814)) + { + sub_81CED30(sub_81CDC84()); + return 1; + } + return 2; + case 5: + sub_81CE754(0, sub_81CDC84(), FALSE); + return 1; + case 6: + sub_81CE754(1, sub_81CDC84(), FALSE); + return 1; + case 7: + sub_81CE754(2, sub_81CDC84(), FALSE); + return 1; + case 8: + if (sub_81CE754(3, sub_81CDC84(), FALSE) == TRUE) + return 1; + return 2; + case 9: + unkPtr = sub_81CDC70(); + if (!sub_81D3178(unkPtr, &structPtr->unk1814)) + { + sub_81D3464(structPtr->unk28e0); + if (sub_81CDD5C() != TRUE && sub_81CDC60() == sub_81CDC50()) + return 1; + + sub_81D3480(structPtr->unk28e0, structPtr->unk1816, sub_81CDDB0()); + return 1; + } + return 2; + } + + return 4; +} + +u32 sub_81CE4D8(s32 state) +{ + struct Pokenav7Struct *structPtr = GetSubstructPtr(0xC); + + switch (state) + { + case 0: + sub_81CD548(0); + return 1; + case 1: + sub_81CD548(1); + return 1; + case 2: + sub_81CD548(2); + return 1; + case 3: + sub_81CED30(sub_81CDC84()); + return 1; + case 4: + sub_81CE754(0, sub_81CDC84(), FALSE); + return 1; + case 5: + sub_81CE754(1, sub_81CDC84(), FALSE); + return 1; + case 6: + sub_81CE754(2, sub_81CDC84(), FALSE); + return 1; + case 7: + if (sub_81CE754(3, sub_81CDC84(), FALSE) == TRUE) + return 1; + return 2; + case 8: + if (!sub_81D3178(sub_81CDC70(), &structPtr->unk1814)) + { + sub_81D3464(structPtr->unk28e0); + sub_81D3480(structPtr->unk28e0, structPtr->unk1816, sub_81CDDB0()); + return 1; + } + return 2; + } + + return 4; +} + +u32 sub_81CE5E4(s32 state) +{ + struct Pokenav7Struct *structPtr = GetSubstructPtr(0xC); + + switch (state) + { + case 0: + sub_81CD548(0); + return 1; + case 1: + sub_81CD548(1); + return 1; + case 2: + sub_81CD548(2); + sub_81D3520(structPtr->unk28e0); + return 1; + case 3: + if (!sub_81D31A4(sub_81CDC70(), &structPtr->unk1814)) + return 1; + return 2; + case 4: + sub_81CE754(0, sub_81CDC84(), FALSE); + return 1; + case 5: + sub_81CE754(1, sub_81CDC84(), FALSE); + return 1; + case 6: + sub_81CE754(2, sub_81CDC84(), FALSE); + return 1; + case 7: + if (sub_81CE754(3, sub_81CDC84(), FALSE) == TRUE) + return 1; + return 2; + } + + return 4; +} + +u32 sub_81CE6BC(s32 state) +{ + switch (state) + { + case 0: + sub_811FAA4(sub_81CDD7C(), 0xb0, 0x20); + return 1; + case 1: + sub_81C7BA4(5); + return 1; + case 2: + if (IsDma3ManagerBusyWithBgCopy_() == TRUE) + return 2; + return 1; + } + + return 4; +} + +u32 sub_81CE700(s32 state) +{ + switch (state) + { + case 0: + sub_811FAF8(); + return 1; + case 1: + sub_81C7BA4(4); + return 1; + case 2: + if (IsDma3ManagerBusyWithBgCopy_() == TRUE) + return 2; + return 1; + } + + return 4; +} + +u8 *sub_81CE738(u8 *dst, u16 num) +{ + u8 *txtPtr = ConvertIntToDecimalStringN(dst, num, STR_CONV_MODE_RIGHT_ALIGN, 4); + txtPtr = StringCopy(txtPtr, gText_Number2); + + return txtPtr; +} + +bool32 sub_81CE754(u8 a0, u16 a1, bool8 a2) +{ + u8 text[32]; + const u8 *str; + struct Pokenav7Struct *structPtr = GetSubstructPtr(0xC); + + switch (a0) + { + case 0: + FillWindowPixelBuffer(structPtr->unk1820, 0); + if (sub_81CDD5C() == TRUE) + FillWindowPixelBuffer(structPtr->unk1821, 0); + break; + case 1: + if (sub_81CDC60() != sub_81CDC50() - 1 || sub_81CDD5C() == TRUE) + { + str = sub_81CDD04(a1); + AddTextPrinterParameterized(structPtr->unk1820, 1, str, 0, 1, 0, NULL); + } + break; + case 2: + if (sub_81CDD5C() == TRUE) + { + str = sub_81CDD24(a1); + AddTextPrinterParameterized(structPtr->unk1820, 1, str, 0, 17, 0, NULL); + text[0] = EXT_CTRL_CODE_BEGIN; + text[1] = 4; + text[2] = 8; + text[3] = 0; + text[4] = 9; + StringCopy(text + 5, gText_Number2); + AddTextPrinterParameterized(structPtr->unk1821, 1, text, 4, 1, 0, NULL); + ConvertIntToDecimalStringN(text + 5, sub_81CDD48(), STR_CONV_MODE_RIGHT_ALIGN, 4); + AddTextPrinterParameterized(structPtr->unk1821, 1, text, 28, 1, 0, NULL); + } + break; + case 3: + switch (structPtr->unk2908) + { + case 0: + if (a2) + CopyWindowToVram(structPtr->unk1820, 3); + else + CopyWindowToVram(structPtr->unk1820, 2); + + if (sub_81CDD5C() == TRUE) + { + structPtr->unk2908++; + return FALSE; + } + else + { + structPtr->unk2908 = 0; + return TRUE; + } + case 1: + if (a2) + CopyWindowToVram(structPtr->unk1821, 3); + else + CopyWindowToVram(structPtr->unk1821, 2); + + structPtr->unk2908 = 0; + return TRUE; + } + } + + return FALSE; +} + +void sub_81CE934(void) +{ + struct Pokenav7Struct *structPtr = GetSubstructPtr(0xC); + + CopyWindowToVram(structPtr->unk1822, 3); + CopyWindowToVram(structPtr->unk1823, 3); +} + +void sub_81CE964(struct Sprite *sprite) +{ + if (sprite->data[0] == sub_81CDC60()) + StartSpriteAnim(sprite, 0); + else + StartSpriteAnim(sprite, 1); +} + +void sub_81CE990(struct Sprite *sprite) +{ + if (sub_81CDC60() == sub_81CDC50() - 1) + sprite->oam.paletteNum = IndexOfSpritePaletteTag(0x65); + else + sprite->oam.paletteNum = IndexOfSpritePaletteTag(0x66); +} + +void sub_81CE9C8(struct Sprite *sprite) +{ + StartSpriteAnim(sprite, sub_81CDD7C()); +} + +void sub_81CE9E4(void) +{ + struct SpriteSheet sprSheets[4]; + struct SpriteTemplate sprTemplate; + struct SpritePalette sprPals[3]; + struct SpriteSheet sprSheet; + struct Sprite *sprite; + u16 i, spriteId; + struct Pokenav7Struct *structPtr = GetSubstructPtr(0xC); + + sub_81D321C(sprSheets, &sprTemplate, sprPals); + if (sub_81CDD5C() == TRUE) + { + structPtr->monMarks.baseTileTag = 0x6A; + structPtr->monMarks.basePaletteTag = 0x6A; + sub_811F90C(&structPtr->monMarks); + sub_811FA90(); + sprite = sub_811FF94(0x69, 0x69, gUnknown_08623338); + sprite->oam.priority = 3; + sprite->pos1.x = 192; + sprite->pos1.y = 32; + sprite->callback = sub_81CE9C8; + structPtr->unk28dc = sprite; + sub_81C7990(IndexOfSpritePaletteTag(0x69), 0); + } + else + { + LoadSpriteSheets(sprSheets); + Pokenav_AllocAndLoadPalettes(sprPals); + for (i = 0; i < sub_81CDC50() - 1; i++) + { + spriteId = CreateSprite(&sprTemplate, 226, (i * 20) + 8, 0); + if (spriteId != MAX_SPRITES) + { + structPtr->unk1806[i] = spriteId; + gSprites[spriteId].data[0] = i; + gSprites[spriteId].callback = sub_81CE964; + } + else + { + structPtr->unk1806[i] = 0xFF; + } + } + + sprTemplate.tileTag = 0x67; + sprTemplate.callback = SpriteCallbackDummy; + for (; i < 6; i++) + { + spriteId = CreateSprite(&sprTemplate, 230, (i * 20) + 8, 0); + if (spriteId != MAX_SPRITES) + { + structPtr->unk1806[i] = spriteId; + gSprites[spriteId].oam.size = 0; + } + else + { + structPtr->unk1806[i] = 0xFF; + } + } + + sprTemplate.tileTag = 0x66; + sprTemplate.callback = sub_81CE990; + spriteId = CreateSprite(&sprTemplate, 222, (i * 20) + 8, 0); + if (spriteId != MAX_SPRITES) + { + structPtr->unk1806[i] = spriteId; + gSprites[spriteId].oam.shape = 1; + gSprites[spriteId].oam.size = 2; + } + else + { + structPtr->unk1806[i] = 0xFF; + } + } + + sub_81D32B0(&sprSheet, &sprPals[0]); + LoadSpriteSheet(&sprSheet); + sprPals[1].data = NULL; + Pokenav_AllocAndLoadPalettes(sprPals); +} + +void sub_81CEBF4(struct Pokenav7Struct *structPtr) +{ + u8 i; + + if (sub_81CDD5C() == TRUE) + { + DestroySprite(structPtr->unk28dc); + FreeSpriteTilesByTag(0x6A); + FreeSpriteTilesByTag(0x69); + FreeSpritePaletteByTag(0x6A); + FreeSpritePaletteByTag(0x69); + } + else + { + for (i = 0; i < 7; i++) + DestroySprite(&gSprites[structPtr->unk1806[i]]); + + FreeSpriteTilesByTag(0x65); + FreeSpriteTilesByTag(0x66); + FreeSpriteTilesByTag(0x67); + FreeSpritePaletteByTag(0x65); + FreeSpritePaletteByTag(0x66); + } + + if (structPtr->unk1816 != 0xFF) + { + DestroySprite(&gSprites[structPtr->unk1816]); + FreeSpriteTilesByTag(0x64); + FreeSpritePaletteByTag(0x64); + } +} + +void sub_81CECA0(void) +{ + struct Pokenav7Struct *structPtr = GetSubstructPtr(0xC); + + RemoveWindow(structPtr->unk1820); + if (sub_81CDD5C() == TRUE) + { + RemoveWindow(structPtr->unk1821); + RemoveWindow(structPtr->unk1822); + RemoveWindow(structPtr->unk1823); + } + else + { + sub_81C7FDC(); + } + + SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_BG0_ON | DISPCNT_OBJ_1D_MAP); + sub_81CEBF4(structPtr); + sub_81CEE68(); + FreePokenavSubstruct(0xC); +} + +void sub_81CED10(struct Sprite *sprite) +{ + struct Pokenav7Struct *structPtr = GetSubstructPtr(0xC); + sprite->pos1.x = structPtr->unk1814 + 38; +} + +void sub_81CED30(u8 var) +{ + struct SpriteTemplate sprTemplate; + struct SpriteSheet sprSheet; + struct SpritePalette sprPal; + u8 spriteId; + struct Pokenav7Struct *structPtr = GetSubstructPtr(0xC); + + if (structPtr->unk1816 == 0xFF) + { + sub_81D31D0(&sprSheet, &sprTemplate, &sprPal); + sprSheet.data = sub_81CDCB4(var); + sprPal.data = sub_81CDCD4(var); + structPtr->unk1818 = LoadSpritePalette(&sprPal); + structPtr->unk181A = LoadSpriteSheet(&sprSheet); + spriteId = CreateSprite(&sprTemplate, 38, 104, 0); + structPtr->unk1816 = spriteId; + if (spriteId == MAX_SPRITES) + { + FreeSpriteTilesByTag(0x64); + FreeSpritePaletteByTag(0x64); + structPtr->unk1816 = 0xFF; + } + else + { + structPtr->unk1816 = spriteId; + gSprites[structPtr->unk1816].callback = sub_81CED10; + structPtr->unk181C = (void*)(VRAM) + 0x10000 + (structPtr->unk181A * 32); + structPtr->unk1818 = (structPtr->unk1818 * 16) + 0x100; + } + } + else + { + DmaCopy16Defvars(3, sub_81CDCB4(var), structPtr->unk181C, 0x800); + LoadPalette(sub_81CDCD4(var), structPtr->unk1818, 0x20); + } +} + +void sub_81CEE44(void) +{ + struct UnknownStruct_81D1ED4 *unk = sub_81CDC70(); + LoadOam(); + ProcessSpriteCopyRequests(); + TransferPlttBuffer(); + sub_81D2108(unk); + ScanlineEffect_InitHBlankDmaTransfer(); +} + +void sub_81CEE68(void) +{ + SetPokenavVBlankCallback(); +} + +void sub_81CEE74(bool8 showBg) +{ + if (showBg) + ShowBg(2); + else + HideBg(2); +} + +void sub_81CEE90(void) +{ + struct UnknownStruct_81D1ED4 *unk = sub_81CDC70(); + u8 id = sub_81CDC84(); + + gUnknown_030012BC = id; + sub_81D1F84(unk, unk->unk14[3], unk->unk14[id]); + sub_81D2074(unk); +} + +void sub_81CEEC8(void) +{ + struct UnknownStruct_81D1ED4 *unk = sub_81CDC70(); + + if (sub_81CDD5C() || sub_81CDC60() != sub_81CDC50() - 1) + sub_81D1F84(unk, unk->unk14[sub_81CDC84()], unk->unk14[3]); +} + +u8 sub_81CEF14(void) +{ + struct Pokenav7Struct *structPtr = GetSubstructPtr(0xC); + + if (sub_81CDD5C() == 1) + return structPtr->monMarks.markings; + else + return 0; +} diff --git a/src/pokenav_unk_8.c b/src/pokenav_unk_8.c new file mode 100644 index 000000000..bcafc14d0 --- /dev/null +++ b/src/pokenav_unk_8.c @@ -0,0 +1,189 @@ +#include "global.h" +#include "pokenav.h" +#include "bg.h" +#include "window.h" + +u32 sub_81CF134(void); +u32 sub_81CF1C4(void); +u32 sub_81CF1D8(void); +u32 sub_81CF278(void); +u32 sub_81CF578(s32); +u32 sub_81CF5F0(s32); +u32 sub_81CF668(s32); +u32 sub_81CF6E0(s32); +u32 sub_81CF758(s32); +u32 sub_81CF798(s32); + +const u32 gUnknown_086233A0[] = {0x16, 0x17, 0x18, 0x21, 0x2F}; + +u32 (*const gUnknown_086233B4[])(void) = +{ + sub_81CF134, + sub_81CF1C4, + sub_81CF1D8, + sub_81CF278 +}; + +const u16 gUnknown_086233C4[] = INCBIN_U16("graphics/pokenav/condition_search2.gbapal"); +const u32 gUnknown_086233E4[] = INCBIN_U32("graphics/pokenav/condition_search2.4bpp.lz"); +const u32 gUnknown_086234AC[] = INCBIN_U32("graphics/pokenav/condition_search2.bin.lz"); +const u16 gUnknown_08623570[] = INCBIN_U16("graphics/pokenav/8623570.gbapal"); + +const struct BgTemplate gUnknown_08623590 = +{ + .bg = 1, + .charBaseIndex = 1, + .mapBaseIndex = 0x06, + .screenSize = 0, + .paletteMode = 0, + .priority = 2, + .baseTile = 0 +}; + +const struct BgTemplate gUnknown_08623594 = +{ + .bg = 2, + .charBaseIndex = 2, + .mapBaseIndex = 0x07, + .screenSize = 0, + .paletteMode = 0, + .priority = 3, + .baseTile = 0 +}; + +const LoopedTask gUnknown_08623598[] = +{ + NULL, + sub_81CF578, + sub_81CF5F0, + sub_81CF668, + sub_81CF6E0, + sub_81CF758, + sub_81CF798 +}; + +const struct WindowTemplate gUnknown_086235B4 = +{ + .bg = 1, + .tilemapLeft = 1, + .tilemapTop = 6, + .width = 7, + .height = 2, + .paletteNum = 1, + .baseBlock = 20 +}; + +const u8 gUnknown_086235BC[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_RED}{WHITE}{GREEN}♂{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}"); +const u8 gUnknown_086235C8[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_GREEN}{WHITE}{BLUE}♀{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}"); +const u8 gUnknown_086235D4[] = _("{UNK_SPACER}"); + +struct PokenavSub7 +{ + u32 (*unk0)(struct PokenavSub7 *); + u32 loopedTaskId; + u8 fill1[12]; + u32 unk14; + u32 unk18; + u32 unk1C; + struct PokenavSub18 *unkPtr; +}; + +u32 sub_81CF010(struct PokenavSub7 *structPtr); +u32 sub_81CF030(struct PokenavSub7 *structPtr); +u32 sub_81CF0B8(struct PokenavSub7 *structPtr); +u32 sub_81CF0B0(struct PokenavSub7 *structPtr); +u32 sub_81CF11C(s32 state); + +bool32 sub_81CEF3C(void) +{ + struct PokenavSub7 *structPtr = AllocSubstruct(7, sizeof(struct PokenavSub7)); + if (structPtr == NULL) + return FALSE; + + structPtr->unkPtr = AllocSubstruct(18, sizeof(struct PokenavSub18)); + if (structPtr->unkPtr == NULL) + return FALSE; + + structPtr->unk0 = sub_81CF010; + structPtr->loopedTaskId = CreateLoopedTask(sub_81CF11C, 1); + structPtr->unk18 = 0; + structPtr->unk14 = gUnknown_086233A0[sub_81C76AC()]; + return TRUE; +} + +bool32 sub_81CEF98(void) +{ + struct PokenavSub7 *structPtr = AllocSubstruct(7, sizeof(struct PokenavSub7)); + if (structPtr == NULL) + return FALSE; + + structPtr->unkPtr = GetSubstructPtr(18); + structPtr->unk0 = sub_81CF030; + structPtr->unk18 = 1; + structPtr->unk14 = gUnknown_086233A0[sub_81C76AC()]; + return TRUE; +} + +u32 sub_81CEFDC(void) +{ + struct PokenavSub7 *structPtr = GetSubstructPtr(7); + return structPtr->unk0(structPtr); +} + +void sub_81CEFF0(void) +{ + struct PokenavSub7 *structPtr = GetSubstructPtr(7); + if (structPtr->unk1C == 0) + FreePokenavSubstruct(18); + FreePokenavSubstruct(7); +} + +bool32 sub_81CF010(struct PokenavSub7 *structPtr) +{ + if (!IsLoopedTaskActive(structPtr->loopedTaskId)) + structPtr->unk0 = sub_81CF030; + return FALSE; +} + +u32 sub_81CF030(struct PokenavSub7 *structPtr) +{ + if (gMain.newAndRepeatedKeys & DPAD_UP) + return 1; + else if (gMain.newAndRepeatedKeys & DPAD_DOWN) + return 2; + else if (gMain.newKeys & DPAD_LEFT) + return 3; + else if (gMain.newKeys & DPAD_RIGHT) + return 4; + else if (gMain.newKeys & B_BUTTON) + { + structPtr->unk1C = 0; + structPtr->unk0 = sub_81CF0B0; + return 5; + } + else if (gMain.newKeys & A_BUTTON) + { + structPtr->unkPtr->unk2 = GetSelectedMatchCall(); + structPtr->unk1C = 1; + structPtr->unk0 = sub_81CF0B8; + return 6; + } + else + return 0; +} + +u32 sub_81CF0B0(struct PokenavSub7 *structPtr) +{ + return 0x186A3; +} + +u32 sub_81CF0B8(struct PokenavSub7 *structPtr) +{ + return 0x186A9; +} + +u32 sub_81CF0C0(void) +{ + struct PokenavSub7 *structPtr = GetSubstructPtr(7); + return structPtr->unk18; +} diff --git a/src/pokenav_unk_9.c b/src/pokenav_unk_9.c new file mode 100644 index 000000000..2927d7211 --- /dev/null +++ b/src/pokenav_unk_9.c @@ -0,0 +1,74 @@ +#include "global.h" +#include "pokenav.h" +#include "bg.h" +#include "window.h" + +u32 sub_81CFB8C(void); +u32 sub_81CFC2C(void); +u32 sub_81CFC40(void); +u32 sub_81CFFFC(s32); +u32 sub_81D0074(s32); +u32 sub_81D00EC(s32); +u32 sub_81D0164(s32); +u32 sub_81D01DC(s32); +u32 sub_81D021C(s32); + +u32 (*const gUnknown_086235D8[])(void) = +{ + sub_81CFB8C, + sub_81CFC2C, + sub_81CFC40 +}; + +const u16 gUnknown_086235E4[] = INCBIN_U16("graphics/pokenav/ui_ribbons.gbapal"); +const u32 gUnknown_08623604[] = INCBIN_U32("graphics/pokenav/ui_ribbons.4bpp.lz"); +const u32 gUnknown_086236CC[] = INCBIN_U32("graphics/pokenav/ui_ribbons.bin.lz"); +const u16 gUnknown_08623790[] = INCBIN_U16("graphics/pokenav/8623790.gbapal"); + +const struct BgTemplate gUnknown_086237B0 = +{ + .bg = 1, + .charBaseIndex = 1, + .mapBaseIndex = 0x06, + .screenSize = 0, + .paletteMode = 0, + .priority = 2, + .baseTile = 0 +}; + +const struct BgTemplate gUnknown_086237B4 = +{ + .bg = 2, + .charBaseIndex = 2, + .mapBaseIndex = 0x07, + .screenSize = 0, + .paletteMode = 0, + .priority = 3, + .baseTile = 0 +}; + +const LoopedTask gUnknown_086237B8[] = +{ + NULL, + sub_81CFFFC, + sub_81D0074, + sub_81D00EC, + sub_81D0164, + sub_81D01DC, + sub_81D021C +}; + +const struct WindowTemplate gUnknown_086237D4 = +{ + .bg = 1, + .tilemapLeft = 1, + .tilemapTop = 6, + .width = 7, + .height = 2, + .paletteNum = 1, + .baseBlock = 20 +}; + +const u8 gUnknown_086237DC[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_RED}{WHITE}{GREEN}♂{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}"); +const u8 gUnknown_086237E8[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_GREEN}{WHITE}{BLUE}♀{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}"); +const u8 gUnknown_086237F4[] = _("{UNK_SPACER}"); diff --git a/src/random.c b/src/random.c index f0b2d9e5f..b570a7bc3 100644 --- a/src/random.c +++ b/src/random.c @@ -8,8 +8,8 @@ EWRAM_DATA static u8 sUnknown = 0; EWRAM_DATA static u32 sRandCount = 0; // IWRAM common -IWRAM_DATA u32 gRngValue; -IWRAM_DATA u32 gRng2Value; +u32 gRngValue; +u32 gRng2Value; u16 Random(void) { diff --git a/src/record_mixing.c b/src/record_mixing.c index 85b52e478..6cb145c80 100644 --- a/src/record_mixing.c +++ b/src/record_mixing.c @@ -82,21 +82,21 @@ union PlayerRecords // Static RAM declarations -static IWRAM_DATA bool8 gUnknown_03001130; -static IWRAM_DATA struct SecretBase *sSecretBasesSave; -static IWRAM_DATA TVShow *sTvShowsSave; -static IWRAM_DATA PokeNews *sPokeNewsSave; -static IWRAM_DATA OldMan *sOldManSave; -static IWRAM_DATA struct EasyChatPair *sEasyChatPairsSave; -static IWRAM_DATA struct RecordMixingDayCareMail *gUnknown_03001148; -static IWRAM_DATA void *sBattleTowerSave; -static IWRAM_DATA LilycoveLady *sLilycoveLadySave; -static IWRAM_DATA void *sApprenticesSave; -static IWRAM_DATA void *sBattleTowerSave_Duplicate; -static IWRAM_DATA u32 sRecordStructSize; -static IWRAM_DATA u8 gUnknown_03001160; -static IWRAM_DATA u32 filler_03001164; -static IWRAM_DATA struct PlayerHallRecords *gUnknown_03001168[3]; +static bool8 gUnknown_03001130; +static struct SecretBase *sSecretBasesSave; +static TVShow *sTvShowsSave; +static PokeNews *sPokeNewsSave; +static OldMan *sOldManSave; +static struct EasyChatPair *sEasyChatPairsSave; +static struct RecordMixingDayCareMail *gUnknown_03001148; +static void *sBattleTowerSave; +static LilycoveLady *sLilycoveLadySave; +static void *sApprenticesSave; +static void *sBattleTowerSave_Duplicate; +static u32 sRecordStructSize; +static u8 gUnknown_03001160; +static u32 filler_03001164; +static struct PlayerHallRecords *gUnknown_03001168[3]; static EWRAM_DATA struct RecordMixingDayCareMail gUnknown_02039F9C = {0}; static EWRAM_DATA union PlayerRecords *sReceivedRecords = NULL; diff --git a/src/recorded_battle.c b/src/recorded_battle.c index ac97dfcd6..9e03d57f6 100644 --- a/src/recorded_battle.c +++ b/src/recorded_battle.c @@ -100,8 +100,8 @@ EWRAM_DATA static u8 sApprenticeId = 0; EWRAM_DATA static u16 sEasyChatSpeech[6] = {0}; EWRAM_DATA static u8 sBattleOutcome = 0; -IWRAM_DATA static u8 sRecordMixFriendLanguage; -IWRAM_DATA static u8 sApprenticeLanguage; +static u8 sRecordMixFriendLanguage; +static u8 sApprenticeLanguage; // this file's functions static u8 sub_8185278(u8 *arg0, u8 *arg1, u8 *arg2); diff --git a/src/reset_rtc_screen.c b/src/reset_rtc_screen.c index d675c49d1..1fe9f2279 100644 --- a/src/reset_rtc_screen.c +++ b/src/reset_rtc_screen.c @@ -142,7 +142,7 @@ static const union AnimCmd sSpriteAnim_85104CC[] = static const union AnimCmd sSpriteAnim_85104D4[] = { - ANIMCMD_FRAME(0, 158, .vFlip = TRUE), + ANIMCMD_FRAME(0, 30, .vFlip = TRUE), ANIMCMD_JUMP(0), }; diff --git a/src/reset_save_heap.c b/src/reset_save_heap.c index 95d63a323..beba742f5 100644 --- a/src/reset_save_heap.c +++ b/src/reset_save_heap.c @@ -14,7 +14,7 @@ void sub_81700F8(void) imeBackup = REG_IME; REG_IME = 0; - RegisterRamReset(0x00000001); + RegisterRamReset(RESET_EWRAM); ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_FORCED_BLANK); REG_IME = imeBackup; gMain.inBattle = FALSE; diff --git a/src/rom_8034C54.c b/src/rom_8034C54.c index a3707017e..42817fc2b 100644 --- a/src/rom_8034C54.c +++ b/src/rom_8034C54.c @@ -43,9 +43,9 @@ static bool32 SharesPalWithAnyActive(u32 id); static void sub_8035648(void); // iwram -static IWRAM_DATA s32 gUnknown_03000DD4; -static IWRAM_DATA s32 gUnknown_03000DD8; -static IWRAM_DATA s32 gUnknown_03000DDC; +static s32 gUnknown_03000DD4; +static s32 gUnknown_03000DD8; +static s32 gUnknown_03000DDC; // ewram static EWRAM_DATA struct UnkStruct1 *gUnknown_02022E10 = {0}; diff --git a/src/roulette.c b/src/roulette.c index 25c079cda..662522aae 100644 --- a/src/roulette.c +++ b/src/roulette.c @@ -3994,8 +3994,8 @@ static void sub_8144514(struct Sprite *sprite) if (gUnknown_0203AB88->var94 > 40.f) return; - gUnknown_0203AB88->var98 = -(4.0f / (float)gUnknown_0203AB88->var86); - gUnknown_0203AB88->var90 = -(gUnknown_0203AB88->var8C / (float)gUnknown_0203AB88->var86); + gUnknown_0203AB88->var98 = -(4.0f / (float)(gUnknown_0203AB88->var86)); + gUnknown_0203AB88->var90 = -(gUnknown_0203AB88->var8C / (float)(gUnknown_0203AB88->var86)); sprite->animNum = 2; sprite->animBeginning = TRUE; sprite->animEnded = FALSE; @@ -4010,8 +4010,8 @@ static void sub_81445D8(struct Sprite *sprite) return; m4aSongNumStartOrChange(SE_TAMAKORO_E); - gUnknown_0203AB88->var98 = -(20.0f / (float)gUnknown_0203AB88->var84); - gUnknown_0203AB88->var90 = ((1.0f - gUnknown_0203AB88->var8C) / (float)gUnknown_0203AB88->var84); + gUnknown_0203AB88->var98 = -(20.0f / (float)(gUnknown_0203AB88->var84)); + gUnknown_0203AB88->var90 = ((1.0f - gUnknown_0203AB88->var8C) / (float)(gUnknown_0203AB88->var84)); sprite->animNum = 1; sprite->animBeginning = TRUE; sprite->animEnded = FALSE; diff --git a/src/roulette_util.c b/src/roulette_util.c index 9531302d9..f1f04a73a 100755 --- a/src/roulette_util.c +++ b/src/roulette_util.c @@ -408,7 +408,8 @@ void UpdatePulseBlend(struct PulseBlend *pulseBlend) } } break; - case 2: // Flip back and forth + case (MODERN ? -2 : 2): // Flip back and forth + // This code is never reached in vanilla if (pulseBlendPalette->fadeDirection) pulseBlendPalette->blendCoeff = 0; else @@ -4,10 +4,10 @@ #include "text.h" // iwram bss -IWRAM_DATA static u16 sErrorStatus; -IWRAM_DATA static struct SiiRtcInfo sRtc; -IWRAM_DATA static u8 sProbeResult; -IWRAM_DATA static u16 sSavedIme; +static u16 sErrorStatus; +static struct SiiRtcInfo sRtc; +static u8 sProbeResult; +static u16 sSavedIme; // iwram common struct Time gLocalTime; diff --git a/src/save.c b/src/save.c index 45a75b5dc..cdfd2ae1d 100644 --- a/src/save.c +++ b/src/save.c @@ -626,7 +626,10 @@ static u16 CalculateChecksum(void *data, u16 size) u32 checksum = 0; for (i = 0; i < (size / 4); i++) - checksum += *((u32 *)data)++; + { + checksum += *((u32 *)data); + data += sizeof(u32); + } return ((checksum >> 16) + checksum); } diff --git a/src/scrcmd.c b/src/scrcmd.c index 8d597b887..57cd3edbe 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -62,7 +62,7 @@ static EWRAM_DATA u16 sMovingNpcMapBank = 0; static EWRAM_DATA u16 sMovingNpcMapId = 0; static EWRAM_DATA u16 sFieldEffectScriptId = 0; -IWRAM_DATA u8 gUnknown_03000F30; +static u8 gUnknown_03000F30; extern const SpecialFunc gSpecials[]; extern const u8 *gStdScripts[]; diff --git a/src/script.c b/src/script.c index 27476dba3..34484561c 100644 --- a/src/script.c +++ b/src/script.c @@ -10,12 +10,12 @@ extern const u8* gUnknown_020375C0; // ewram bss -IWRAM_DATA static u8 sScriptContext1Status; -IWRAM_DATA static u32 sUnusedVariable1; -IWRAM_DATA static struct ScriptContext sScriptContext1; -IWRAM_DATA static u32 sUnusedVariable2; -IWRAM_DATA static struct ScriptContext sScriptContext2; -IWRAM_DATA static bool8 sScriptContext2Enabled; +static u8 sScriptContext1Status; +static u32 sUnusedVariable1; +static struct ScriptContext sScriptContext1; +static u32 sUnusedVariable2; +static struct ScriptContext sScriptContext2; +static bool8 sScriptContext2Enabled; extern ScrCmdFunc gScriptCmdTable[]; extern ScrCmdFunc gScriptCmdTableEnd[]; diff --git a/src/script_menu.c b/src/script_menu.c index 082253e35..b17d3df38 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -1017,8 +1017,8 @@ const u8 *const gUnknown_0858BBEC[] = EWRAM_DATA u8 gUnknown_02039F90 = 0; -IWRAM_DATA u8 gUnknown_03001124[7]; -IWRAM_DATA u32 filler_0300112c; +static u8 gUnknown_03001124[7]; +static u32 filler_0300112c; static void Task_HandleMultichoiceInput(u8); static void Task_HandleYesNoInput(u8); diff --git a/src/secret_base.c b/src/secret_base.c index ac35a090a..12cb8cd61 100644 --- a/src/secret_base.c +++ b/src/secret_base.c @@ -71,7 +71,7 @@ static EWRAM_DATA struct SecretBaseRegistryMenu *sRegistryMenu = NULL; static void Task_ShowSecretBaseRegistryMenu(u8 taskId); static void BuildRegistryMenuItems(u8 taskId); -static void RegistryMenu_OnCursorMove(int unused, bool8 flag, struct ListMenu *menu); +static void RegistryMenu_OnCursorMove(s32 unused, bool8 flag, struct ListMenu *menu); static void FinalizeRegistryMenu(u8 taskId); static void AddRegistryMenuScrollArrows(u8 taskId); static void HandleRegistryMenuInput(u8 taskId); @@ -932,7 +932,7 @@ static void BuildRegistryMenuItems(u8 taskId) gMultiuseListMenuTemplate.maxShowed = data[3]; } -static void RegistryMenu_OnCursorMove(int unused, bool8 flag, struct ListMenu *menu) +static void RegistryMenu_OnCursorMove(s32 unused, bool8 flag, struct ListMenu *menu) { if (flag != TRUE) PlaySE(SE_SELECT); diff --git a/src/shop.c b/src/shop.c index 1c6d7cf2e..bf15568fb 100755 --- a/src/shop.c +++ b/src/shop.c @@ -87,8 +87,8 @@ static void Task_ReturnToItemListAfterItemPurchase(u8 taskId); static void Task_ReturnToItemListAfterDecorationPurchase(u8 taskId); static void Task_HandleShopMenuBuy(u8 taskId); static void Task_HandleShopMenuSell(u8 taskId); -static void BuyMenuPrintItemDescriptionAndShowItemIcon(int item, bool8 onInit, struct ListMenu *list); -static void BuyMenuPrintPriceInList(u8 windowId, int item, u8 y); +static void BuyMenuPrintItemDescriptionAndShowItemIcon(s32 item, bool8 onInit, struct ListMenu *list); +static void BuyMenuPrintPriceInList(u8 windowId, s32 item, u8 y); static const struct YesNoFuncTable sShopPurchaseYesNoFuncs = { @@ -521,7 +521,7 @@ static void BuyMenuSetListEntry(struct ListMenuItem *menuItem, u16 item, u8 *nam menuItem->id = item; } -static void BuyMenuPrintItemDescriptionAndShowItemIcon(int item, bool8 onInit, struct ListMenu *list) +static void BuyMenuPrintItemDescriptionAndShowItemIcon(s32 item, bool8 onInit, struct ListMenu *list) { const u8 *description; if (onInit != TRUE) @@ -550,7 +550,7 @@ static void BuyMenuPrintItemDescriptionAndShowItemIcon(int item, bool8 onInit, s BuyMenuPrint(2, description, 3, 1, 0, 0); } -static void BuyMenuPrintPriceInList(u8 windowId, int item, u8 y) +static void BuyMenuPrintPriceInList(u8 windowId, s32 item, u8 y) { u8 x; @@ -1230,4 +1230,4 @@ void CreateDecorationShop2Menu(const u16 *itemsForSale) CreateShopMenu(MART_TYPE_DECOR2); SetShopItemsForSale(itemsForSale); SetShopMenuCallback(EnableBothScriptContexts); -}
\ No newline at end of file +} diff --git a/src/slot_machine.c b/src/slot_machine.c index b853daa39..003ac3327 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -350,7 +350,7 @@ static EWRAM_DATA struct SpriteSheet *sUnknown_0203AB30 = NULL; static EWRAM_DATA struct SlotMachineEwramStruct *sSlotMachine = NULL; // IWRAM bss -static IWRAM_DATA struct SpriteFrameImage *gUnknown_03001188[26]; +static struct SpriteFrameImage *gUnknown_03001188[26]; // Const rom data. extern const struct UnkStruct1 *const gUnknown_083ED048[]; diff --git a/src/sound.c b/src/sound.c index 16f024858..dba4354df 100644 --- a/src/sound.c +++ b/src/sound.c @@ -19,11 +19,11 @@ EWRAM_DATA struct MusicPlayerInfo* gMPlay_PokemonCry = NULL; EWRAM_DATA u8 gPokemonCryBGMDuckingCounter = 0; // iwram bss -IWRAM_DATA static u16 sCurrentMapMusic; -IWRAM_DATA static u16 sNextMapMusic; -IWRAM_DATA static u8 sMapMusicState; -IWRAM_DATA static u8 sMapMusicFadeInSpeed; -IWRAM_DATA static u16 sFanfareCounter; +static u16 sCurrentMapMusic; +static u16 sNextMapMusic; +static u8 sMapMusicState; +static u8 sMapMusicFadeInSpeed; +static u16 sFanfareCounter; // iwram common bool8 gDisableMusic; diff --git a/src/sprite.c b/src/sprite.c index d2ea7889c..e25eac62e 100644 --- a/src/sprite.c +++ b/src/sprite.c @@ -285,10 +285,10 @@ static const struct OamDimensions sOamDimensions[3][4] = }; // iwram bss -IWRAM_DATA static u16 sSpriteTileRangeTags[MAX_SPRITES]; -IWRAM_DATA static u16 sSpriteTileRanges[MAX_SPRITES * 2]; -IWRAM_DATA static struct AffineAnimState sAffineAnimStates[OAM_MATRIX_COUNT]; -IWRAM_DATA static u16 sSpritePaletteTags[16]; +static u16 sSpriteTileRangeTags[MAX_SPRITES]; +static u16 sSpriteTileRanges[MAX_SPRITES * 2]; +static struct AffineAnimState sAffineAnimStates[OAM_MATRIX_COUNT]; +static u16 sSpritePaletteTags[16]; // iwram common u32 gOamMatrixAllocBitmap; diff --git a/src/starter_choose.c b/src/starter_choose.c index 886daa45a..5524d407b 100644 --- a/src/starter_choose.c +++ b/src/starter_choose.c @@ -51,7 +51,7 @@ void sub_81346DC(struct Sprite *sprite); void sub_813473C(struct Sprite *sprite); void StarterPokemonSpriteCallback(struct Sprite *sprite); -static IWRAM_DATA u16 sStarterChooseWindowId; +static u16 sStarterChooseWindowId; // .rodata const u16 gBirchBagGrassPal[][16] = diff --git a/src/strings.c b/src/strings.c index 793256edb..8463cfacb 100644 --- a/src/strings.c +++ b/src/strings.c @@ -424,45 +424,45 @@ const u8 gText_PkmnGotOverInfatuation[] = _("{STR_VAR_1} got over its\ninfatuati const u8 gText_ThrowAwayItem[] = _("Throw away this\n{STR_VAR_1}?"); const u8 gText_ItemThrownAway[] = _("The {STR_VAR_1}\nwas thrown away.{PAUSE_UNTIL_PRESS}"); const u8 gUnknown_085E9E2E[] = _("Teach which POKéMON?"); -const u8 gUnknown_085E9E43[] = _("Choose a POKéMON."); -const u8 gUnknown_085E9E55[] = _("Move to where?"); -const u8 gUnknown_085E9E64[] = _("Teach which POKéMON?"); -const u8 gUnknown_085E9E79[] = _("Use on which POKéMON?"); -const u8 gUnknown_085E9E8F[] = _("Give to which POKéMON?"); -const u8 gUnknown_085E9EA6[] = _("Do what with this {PKMN}?"); -const u8 gUnknown_085E9EBC[] = _("There's nothing to CUT."); -const u8 gUnknown_085E9ED4[] = _("You can't SURF here."); -const u8 gUnknown_085E9EE9[] = _("You're already SURFING."); -const u8 gUnknown_085E9F01[] = _("Can't use that here."); -const u8 gUnknown_085E9F16[] = _("Restore which move?"); -const u8 gUnknown_085E9F2A[] = _("Boost PP of which move?"); -const u8 gUnknown_085E9F42[] = _("Do what with an item?"); -const u8 gUnknown_085E9F58[] = _("No POKéMON for battle!"); -const u8 gUnknown_085E9F6F[] = _("Choose a POKéMON."); -const u8 gUnknown_085E9F81[] = _("Not enough HP…"); -const u8 gUnknown_085E9F90[] = _("{STR_VAR_1} POKéMON are needed."); -const u8 gUnknown_085E9FA7[] = _("POKéMON can't be the same."); -const u8 gUnknown_085E9FC2[] = _("No identical hold items."); -const u8 gUnknown_085E9FDB[] = _("The current is much too fast!"); -const u8 gUnknown_085E9FF9[] = _("Do what with the MAIL?"); -const u8 gUnknown_085EA010[] = _("Choose POKéMON or CANCEL."); -const u8 gUnknown_085EA02A[] = _("Choose POKéMON and confirm."); -const u8 gUnknown_085EA046[] = _("Let's enjoy cycling!"); -const u8 gUnknown_085EA05B[] = _("This is in use already."); -const u8 gUnknown_085EA073[] = _("{STR_VAR_1} is already holding\none {STR_VAR_2}."); -const u8 gUnknown_085EA091[] = _("No use."); -const u8 gUnknown_085EA099[] = _("ABLE"); -const u8 gUnknown_085EA09E[] = _("FIRST"); -const u8 gUnknown_085EA0A4[] = _("SECOND"); -const u8 gUnknown_085EA0AB[] = _("THIRD"); -const u8 gUnknown_085EA0B1[] = _("ABLE"); -const u8 gUnknown_085EA0B6[] = _("NOT ABLE"); -const u8 gUnknown_085EA0BF[] = _("ABLE!"); -const u8 gUnknown_085EA0C5[] = _("NOT ABLE!"); -const u8 gUnknown_085EA0CF[] = _("LEARNED"); -const u8 gUnknown_085EA0D7[] = _("HAVE"); -const u8 gUnknown_085EA0DC[] = _("DON'T HAVE"); -const u8 gUnknown_085EA0E7[] = _("FOURTH"); +const u8 gText_ChoosePokemon[] = _("Choose a POKéMON."); +const u8 gText_MoveToWhere[] = _("Move to where?"); +const u8 gText_TeachWhichPokemon[] = _("Teach which POKéMON?"); +const u8 gText_UseOnWhichPokemon[] = _("Use on which POKéMON?"); +const u8 gText_GiveToWhichPokemon[] = _("Give to which POKéMON?"); +const u8 gText_DoWhatWithPokemon[] = _("Do what with this {PKMN}?"); +const u8 gText_NothingToCut[] = _("There's nothing to CUT."); +const u8 gText_CantSurfHere[] = _("You can't SURF here."); +const u8 gText_AlreadySurfing[] = _("You're already SURFING."); +const u8 gText_CantUseHere[] = _("Can't use that here."); +const u8 gText_RestoreWhichMove[] = _("Restore which move?"); +const u8 gText_BoostPp[] = _("Boost PP of which move?"); +const u8 gText_DoWhatWithItem[] = _("Do what with an item?"); +const u8 gText_NoPokemonForBattle[] = _("No POKéMON for battle!"); +const u8 gText_ChoosePokemon2[] = _("Choose a POKéMON."); +const u8 gText_NotEnoughHp[] = _("Not enough HP…"); +const u8 gText_PokemonAreNeeded[] = _("{STR_VAR_1} POKéMON are needed."); +const u8 gText_PokemonCantBeSame[] = _("POKéMON can't be the same."); +const u8 gText_NoIdenticalHoldItems[] = _("No identical hold items."); +const u8 gText_CurrentIsTooFast[] = _("The current is much too fast!"); +const u8 gText_DoWhatWithMail[] = _("Do what with the MAIL?"); +const u8 gText_ChoosePokemonCancel[] = _("Choose POKéMON or CANCEL."); +const u8 gText_ChoosePokemonConfirm[] = _("Choose POKéMON and confirm."); +const u8 gText_EnjoyCycling[] = _("Let's enjoy cycling!"); +const u8 gText_InUseAlready_PM[] = _("This is in use already."); +const u8 gText_AlreadyHoldingOne[] = _("{STR_VAR_1} is already holding\none {STR_VAR_2}."); +const u8 gText_NoUse[] = _("No use."); +const u8 gText_Able[] = _("ABLE"); +const u8 gText_First_PM[] = _("FIRST"); +const u8 gText_Second_PM[] = _("SECOND"); +const u8 gText_Third_PM[] = _("THIRD"); +const u8 gText_Able2[] = _("ABLE"); +const u8 gText_NotAble[] = _("NOT ABLE"); +const u8 gText_Able3[] = _("ABLE!"); +const u8 gText_NotAble2[] = _("NOT ABLE!"); +const u8 gText_Learned[] = _("LEARNED"); +const u8 gText_Have[] = _("HAVE"); +const u8 gText_DontHave[] = _("DON'T HAVE"); +const u8 gText_Fourth[] = _("FOURTH"); const u8 gText_PkmnCantParticipate[] = _("That POKéMON can't participate.{PAUSE_UNTIL_PRESS}"); const u8 gText_CancelParticipation[] = _("Cancel participation?"); const u8 gText_CancelBattle[] = _("Cancel the battle?"); diff --git a/src/text.c b/src/text.c index 43834eab4..7e4fa7104 100644 --- a/src/text.c +++ b/src/text.c @@ -197,7 +197,7 @@ bool16 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u8 speed, voi gTempTextPrinter.textSpeed = 0; for (j = 0; j < 0x400; ++j) { - if ((u32)RenderFont(&gTempTextPrinter) == 1) + if (RenderFont(&gTempTextPrinter) == 1) break; } @@ -462,6 +462,108 @@ u8 GetLastTextColor(u8 colorType) } } +#ifdef NONMATCHING + +#define GLYPH_COPY(fromY_, toY_, fromX_, toX_, unk) \ +{ \ + u32 i, j, *ptr, toY, fromX, toX, r5, toOrr, bits; \ + u8 *dst; \ + \ + j = fromX_; \ + i = fromY_; \ + ptr = unk; \ + toX = toX_; \ + toY = toY_; \ + fromX = fromX_; \ + \ + for (; i < toY; i++) \ + { \ + r5 = *(ptr++); \ + for (j = fromX; j < toX; j++) \ + { \ + toOrr = r5 & 0xF; \ + if (toOrr) \ + { \ + dst = windowTiles + ((j / 8) * 32) + ((j & 7) / 2) + ((i / 8) * widthOffset) + ((i & 7) * 4); \ + bits = ((j & 1) << 2); \ + *dst = ((toOrr << bits) | (*dst & (0xF0 >> bits))); \ + } \ + r5 >>= 4; \ + } \ + } \ +} + +void CopyGlyphToWindow(struct TextPrinter *textPrinter) +{ + struct Window *win; + struct WindowTemplate *winTempl; + struct Struct_03002F90 *unkStruct; + u32 currX, widthOffset, currY; + s32 r4, r0; + u8 *windowTiles; + + win = &gWindows[textPrinter->printerTemplate.windowId]; + winTempl = &win->window; + + r4 = (winTempl->width * 8) - textPrinter->printerTemplate.currentX; + if (r4 > gUnknown_03002F90.unk80) + r4 = gUnknown_03002F90.unk80; + + r0 = (winTempl->height * 8) - textPrinter->printerTemplate.currentY; + if (r0 > gUnknown_03002F90.unk81) + r0 = gUnknown_03002F90.unk81; + + currX = textPrinter->printerTemplate.currentX; + currY = textPrinter->printerTemplate.currentY; + unkStruct = &gUnknown_03002F90; + windowTiles = win->tileData; + widthOffset = winTempl->width * 32; + + if (r4 <= 8) + { + if (r0 <= 8) + { + GLYPH_COPY(currY, currY + r0, currX, currX + r4, unkStruct->unk0); + } + 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); + } + } + else + { + if (r0 <= 8) + { + u32 temp; + GLYPH_COPY(currY, currY + r0, currX, currX + 8, unkStruct->unk0); + + temp = currX + 8; + GLYPH_COPY(currY, currY + r0, temp, (temp - 8) + r4, unkStruct->unk20); + } + else + { + u32 temp; + 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); + } + } + } +} +#else NAKED void CopyGlyphToWindow(struct TextPrinter *x) { @@ -1164,6 +1266,7 @@ _080052AA:\n\ bx r0\n\ .pool"); } +#endif // NONMATCHING void ClearTextSpan(struct TextPrinter *textPrinter, u32 width) { diff --git a/src/trade.c b/src/trade.c index d97325174..94accc43c 100644 --- a/src/trade.c +++ b/src/trade.c @@ -158,6 +158,9 @@ static EWRAM_DATA struct { /*0xFE*/ u8 unk_FE; } *gUnknown_020322A0 = {NULL}; +#if !defined(NONMATCHING) && MODERN +#define static +#endif static bool32 sub_8077260(void); static void sub_80773D0(void); static void sub_807811C(void); @@ -2779,7 +2782,7 @@ static void sub_8079398(void) } } -static void DisplayMessageAndContinueTask(void) +static void Wait2SecondsAndCreateYesNoMenu(void) { gUnknown_0203229C->unk_A8++; @@ -2918,7 +2921,7 @@ static void sub_80795AC(void) sub_80781C8(); break; case 14: - DisplayMessageAndContinueTask(); + Wait2SecondsAndCreateYesNoMenu(); break; case 15: sub_8079034(); @@ -5840,7 +5843,7 @@ static void _CreateInGameTradePokemon(u8 whichPlayerMon, u8 whichInGameTrade) SetMonData(pokemon, MON_DATA_NICKNAME, inGameTrade->name); SetMonData(pokemon, MON_DATA_OT_NAME, inGameTrade->otName); SetMonData(pokemon, MON_DATA_OT_GENDER, &inGameTrade->otGender); - SetMonData(pokemon, MON_DATA_ALT_ABILITY, &inGameTrade->secondAbility); + SetMonData(pokemon, MON_DATA_ABILITY_NUM, &inGameTrade->secondAbility); SetMonData(pokemon, MON_DATA_BEAUTY, &inGameTrade->stats[1]); SetMonData(pokemon, MON_DATA_CUTE, &inGameTrade->stats[2]); SetMonData(pokemon, MON_DATA_COOL, &inGameTrade->stats[0]); diff --git a/src/trainer_card.c b/src/trainer_card.c index 52a060ae9..9c4816c42 100755 --- a/src/trainer_card.c +++ b/src/trainer_card.c @@ -106,7 +106,7 @@ static void sub_80C438C(u8); static void sub_80C4FF0(void); static void sub_80C4550(u16*); static void sub_80C45C0(u16*); -static void sub_80C4630(void); +static void TrainerCard_PrintStarsAndBadgesOnCard(void); static void PrintTimeOnCard(void); static void sub_80C4918(void); static bool8 sub_80C4940(void); @@ -117,7 +117,7 @@ static bool8 HasAllFrontierSymbols(void); static u8 GetRubyTrainerStars(struct TrainerCard*); static u16 GetCaughtMonsCount(void); static void SetPlayerCardData(struct TrainerCard*, u8); -static void sub_80C3020(struct TrainerCard*); +static void TrainerCard_GenerateCardForLinkPlayer(struct TrainerCard*); static u8 VersionToCardType(u8); static void SetDataFromTrainerCard(void); static void HandleGpuRegs(void); @@ -141,7 +141,7 @@ static void PrintBerryCrushStringOnCard(void); static void PrintPokeblockStringOnCard(void); static void PrintUnionStringOnCard(void); static void PrintContestStringOnCard(void); -static void sub_80C4140(void); +static void TrainerCard_PrintPokemonIconsOnCard(void); static void PrintBattleFacilityStringOnCard(void); static void sub_80C42A4(void); static void PrintAllVariableNumsOnCardPage2(void); @@ -179,17 +179,17 @@ static const u16 gEmeraldTrainerCard3Star_Pal[] = INCBIN_U16("graphics/trainer_c static const u16 gFireRedTrainerCard3Star_Pal[] = INCBIN_U16("graphics/trainer_card/three_stars_fr.gbapal"); static const u16 gEmeraldTrainerCard4Star_Pal[] = INCBIN_U16("graphics/trainer_card/four_stars.gbapal"); static const u16 gFireRedTrainerCard4Star_Pal[] = INCBIN_U16("graphics/trainer_card/four_stars_fr.gbapal"); -static const u16 gUnknown_0856F4AC[] = INCBIN_U16("graphics/trainer_card/female_bg.gbapal"); -static const u16 gUnknown_0856F4CC[] = INCBIN_U16("graphics/trainer_card/female_bg_fr.gbapal"); -static const u16 gUnknown_0856F4EC[] = INCBIN_U16("graphics/trainer_card/badges.gbapal"); -static const u16 gUnknown_0856F50C[] = INCBIN_U16("graphics/trainer_card/badges_fr.gbapal"); +static const u16 sEmeraldTrainerCardFemaleBackground_Pal[] = INCBIN_U16("graphics/trainer_card/female_bg.gbapal"); +static const u16 sFireRedTrainerCardFemaleBackground_Pal[] = INCBIN_U16("graphics/trainer_card/female_bg_fr.gbapal"); +static const u16 sEmeraldTrainerCardBadges_Pal[] = INCBIN_U16("graphics/trainer_card/badges.gbapal"); +static const u16 sFireRedTrainerCardBadges_Pal[] = INCBIN_U16("graphics/trainer_card/badges_fr.gbapal"); static const u16 gUnknown_0856F52C[] = INCBIN_U16("graphics/trainer_card/gold.gbapal"); static const u16 gUnknown_0856F54C[] = INCBIN_U16("graphics/trainer_card/stickers_fr1.gbapal"); static const u16 gUnknown_0856F56C[] = INCBIN_U16("graphics/trainer_card/stickers_fr2.gbapal"); static const u16 gUnknown_0856F58C[] = INCBIN_U16("graphics/trainer_card/stickers_fr3.gbapal"); static const u16 gUnknown_0856F5AC[] = INCBIN_U16("graphics/trainer_card/stickers_fr4.gbapal"); -static const u32 gUnknown_0856F5CC[] = INCBIN_U32("graphics/trainer_card/badges.4bpp.lz"); -static const u32 gUnknown_0856F814[] = INCBIN_U32("graphics/trainer_card/badges_fr.4bpp.lz"); +static const u32 sEmeraldTrainerCardBadges_Tile[] = INCBIN_U32("graphics/trainer_card/badges.4bpp.lz"); +static const u32 sFireRedTrainerCardBadges_Tile[] = INCBIN_U32("graphics/trainer_card/badges_fr.4bpp.lz"); static const struct BgTemplate gUnknown_0856FAB4[4] = { @@ -376,7 +376,7 @@ static void sub_80C2760(u8 taskId) sData->var_0++; break; case 6: - sub_80C4630(); + TrainerCard_PrintStarsAndBadgesOnCard(); sData->var_0++; break; case 7: @@ -528,9 +528,9 @@ static bool8 LoadCardGfx(void) break; case 3: if (sData->cardType != CARD_TYPE_FRLG) - LZ77UnCompWram(gUnknown_0856F5CC, sData->var_13A8); + LZ77UnCompWram(sEmeraldTrainerCardBadges_Tile, sData->var_13A8); else - LZ77UnCompWram(gUnknown_0856F814, sData->var_13A8); + LZ77UnCompWram(sFireRedTrainerCardBadges_Tile, sData->var_13A8); break; case 4: if (sData->cardType != CARD_TYPE_FRLG) @@ -722,7 +722,7 @@ static void SetPlayerCardData(struct TrainerCard *trainerCard, u8 cardType) } } -static void sub_80C3020(struct TrainerCard *trainerCard) +static void TrainerCard_GenerateCardForLinkPlayer(struct TrainerCard *trainerCard) { memset(trainerCard, 0, sizeof(struct TrainerCard)); trainerCard->version = GAME_VERSION; @@ -733,9 +733,9 @@ static void sub_80C3020(struct TrainerCard *trainerCard) trainerCard->stars++; if (trainerCard->gender == FEMALE) - trainerCard->var_4F = gUnknown_08329D54[(trainerCard->trainerId % 8) + 8]; + trainerCard->var_4F = gLinkPlayerFacilityClasses[(trainerCard->trainerId % 8) + 8]; else - trainerCard->var_4F = gUnknown_08329D54[trainerCard->trainerId % 8]; + trainerCard->var_4F = gLinkPlayerFacilityClasses[trainerCard->trainerId % 8]; } void TrainerCard_GenerateCardForPlayer(struct TrainerCard *trainerCard) @@ -749,9 +749,9 @@ void TrainerCard_GenerateCardForPlayer(struct TrainerCard *trainerCard) trainerCard->stars++; if (trainerCard->gender == FEMALE) - trainerCard->var_4F = gUnknown_08329D54[(trainerCard->trainerId % 8) + 8]; + trainerCard->var_4F = gLinkPlayerFacilityClasses[(trainerCard->trainerId % 8) + 8]; else - trainerCard->var_4F = gUnknown_08329D54[trainerCard->trainerId % 8]; + trainerCard->var_4F = gLinkPlayerFacilityClasses[trainerCard->trainerId % 8]; } void CopyTrainerCardData(struct TrainerCard *dst, u16 *src, u8 gameVersion) @@ -938,7 +938,7 @@ static bool8 PrintStringsOnCardPage2(void) PrintContestStringOnCard(); break; case 6: - sub_80C4140(); + TrainerCard_PrintPokemonIconsOnCard(); PrintBattleFacilityStringOnCard(); break; case 7: @@ -1300,7 +1300,7 @@ static void PrintBattleFacilityStringOnCard(void) } } -static void sub_80C4140(void) +static void TrainerCard_PrintPokemonIconsOnCard(void) { u8 i; u8 buffer[] = {0x05, 0x06, 0x07, 0x08, 0x09, 0x0a}; @@ -1312,7 +1312,7 @@ static void sub_80C4140(void) { if (sData->trainerCard.monSpecies[i]) { - u8 monSpecies = sub_80D30A0(sData->trainerCard.monSpecies[i]); + u8 monSpecies = GetMonIconPaletteIndexFromSpecies(sData->trainerCard.monSpecies[i]); WriteSequenceToBgTilemapBuffer(3, 16 * i + 224, buffer2[i] + 3, 15, 4, 4, buffer[monSpecies], 1); } } @@ -1392,16 +1392,16 @@ static u8 SetCardBgsAndPals(void) if (sData->cardType != CARD_TYPE_FRLG) { LoadPalette(gEmeraldTrainerCardStarPals[sData->trainerCard.stars], 0, 96); - LoadPalette(gUnknown_0856F4EC, 48, 32); + LoadPalette(sEmeraldTrainerCardBadges_Pal, 48, 32); if (sData->trainerCard.gender) - LoadPalette(gUnknown_0856F4AC, 16, 32); + LoadPalette(sEmeraldTrainerCardFemaleBackground_Pal, 16, 32); } else { LoadPalette(gFireRedTrainerCardStarPals[sData->trainerCard.stars], 0, 96); - LoadPalette(gUnknown_0856F50C, 48, 32); + LoadPalette(sFireRedTrainerCardBadges_Pal, 48, 32); if (sData->trainerCard.gender) - LoadPalette(gUnknown_0856F4CC, 16, 32); + LoadPalette(sFireRedTrainerCardFemaleBackground_Pal, 16, 32); } LoadPalette(gUnknown_0856F52C, 64, 32); break; @@ -1458,7 +1458,7 @@ static void sub_80C45C0(u16* ptr) static const u8 gUnknown_0856FB78[] = {7, 7}; -static void sub_80C4630(void) +static void TrainerCard_PrintStarsAndBadgesOnCard(void) { s16 i, x; u16 tileNum = 192; @@ -1684,7 +1684,7 @@ static bool8 sub_80C4C1C(struct Task* task) sub_80C438C(2); sub_80C4550(sData->var_EF8); sub_80C45C0(sData->var_598); - sub_80C4630(); + TrainerCard_PrintStarsAndBadgesOnCard(); } sub_80C438C(1); sData->var_8 ^= 1; @@ -1764,7 +1764,7 @@ void ShowPlayerTrainerCard(void (*callback)(void)) sData->isLink = FALSE; sData->language = GAME_LANGUAGE; - sub_80C3020(&sData->trainerCard); + TrainerCard_GenerateCardForLinkPlayer(&sData->trainerCard); SetMainCallback2(CB2_InitTrainerCard); } diff --git a/src/trainer_pokemon_sprites.c b/src/trainer_pokemon_sprites.c index 6824e8747..047783a85 100644 --- a/src/trainer_pokemon_sprites.c +++ b/src/trainer_pokemon_sprites.c @@ -104,7 +104,7 @@ static void LoadPicPaletteByTagOrSlot(u16 species, u32 otId, u32 personality, u8 if (paletteTag == 0xFFFF) { sCreatingSpriteTemplate.paletteTag = 0xFFFF; - LoadCompressedPalette(GetFrontSpritePalFromSpeciesAndPersonality(species, otId, personality), 0x100 + paletteSlot * 0x10, 0x20); + LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, otId, personality), 0x100 + paletteSlot * 0x10, 0x20); } else { @@ -130,7 +130,7 @@ static void LoadPicPaletteByTagOrSlot(u16 species, u32 otId, u32 personality, u8 static void LoadPicPaletteBySlot(u16 species, u32 otId, u32 personality, u8 paletteSlot, bool8 isTrainer) { if (!isTrainer) - LoadCompressedPalette(GetFrontSpritePalFromSpeciesAndPersonality(species, otId, personality), paletteSlot * 0x10, 0x20); + LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, otId, personality), paletteSlot * 0x10, 0x20); else LoadCompressedPalette(gTrainerFrontPicPaletteTable[species].data, paletteSlot * 0x10, 0x20); } @@ -56,9 +56,9 @@ struct { u16 move; } sTV_SecretBaseVisitMonsTemp[10]; -IWRAM_DATA u8 sTVShowMixingNumPlayers; -IWRAM_DATA u8 sTVShowNewsMixingNumPlayers; -IWRAM_DATA s8 sTVShowMixingCurSlot; +static u8 sTVShowMixingNumPlayers; +static u8 sTVShowNewsMixingNumPlayers; +static s8 sTVShowMixingCurSlot; EWRAM_DATA u16 sPokemonAnglerSpecies = 0; EWRAM_DATA u16 sPokemonAnglerAttemptCounters = 0; @@ -69,10 +69,9 @@ EWRAM_DATA ALIGNED(4) u8 sTVShowState = 0; EWRAM_DATA u8 sTVSecretBaseSecretsRandomValues[3] = {}; // Static ROM declarations - -extern const u8 *const sTVBravoTrainerTextGroup[]; -extern const u8 *const sTVBravoTrainerBattleTowerTextGroup[]; - +#if !defined(NONMATCHING) && MODERN +#define static +#endif void ClearPokemonNews(void); u8 GetTVChannelByShowType(u8 kind); u8 FindFirstActiveTVShowThatIsNotAMassOutbreak(void); @@ -3434,7 +3433,7 @@ bool8 TV_IsScriptShowKindAlreadyInQueue(void) return FALSE; } -bool8 TV_PutNameRaterShowOnTheAirIfNicnkameChanged(void) +bool8 TV_PutNameRaterShowOnTheAirIfNicknameChanged(void) { GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_NICKNAME, gStringVar1); if (!StringCompare(gStringVar3, gStringVar1)) diff --git a/src/union_room.c b/src/union_room.c index 6e7c0965d..01288c8cc 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -1,53 +1,54 @@ #include "global.h" -#include "window.h" +#include "alloc.h" +#include "battle.h" +#include "berry_crush.h" #include "bg.h" -#include "random.h" -#include "string_util.h" -#include "task.h" +#include "cable_club.h" +#include "data.h" +#include "decompress.h" +#include "dodrio_berry_picking.h" +#include "dynamic_placeholder_text_util.h" +#include "easy_chat.h" #include "event_data.h" +#include "event_obj_lock.h" +#include "field_control_avatar.h" +#include "field_player_avatar.h" +#include "field_screen_effect.h" +#include "field_weather.h" +#include "international_string_util.h" +#include "librfu.h" #include "link.h" #include "link_rfu.h" -#include "librfu.h" -#include "alloc.h" -#include "menu.h" #include "list_menu.h" +#include "load_save.h" +#include "menu.h" #include "menu_helpers.h" -#include "script.h" -#include "sound.h" -#include "constants/songs.h" -#include "constants/game_stat.h" -#include "constants/maps.h" -#include "constants/species.h" -#include "constants/rgb.h" -#include "constants/battle_frontier.h" -#include "trade.h" -#include "trainer_card.h" +#include "mevent.h" +#include "mystery_gift.h" #include "overworld.h" -#include "battle.h" -#include "load_save.h" -#include "cable_club.h" -#include "field_control_avatar.h" -#include "party_menu.h" -#include "field_weather.h" #include "palette.h" -#include "decompress.h" -#include "start_menu.h" -#include "data.h" -#include "field_screen_effect.h" +#include "party_menu.h" +#include "pokemon_jump.h" +#include "random.h" +#include "script.h" #include "script_pokemon_util_80F87D8.h" -#include "international_string_util.h" -#include "field_player_avatar.h" +#include "sound.h" +#include "start_menu.h" +#include "string_util.h" #include "strings.h" -#include "mevent.h" -#include "dynamic_placeholder_text_util.h" +#include "task.h" +#include "trade.h" +#include "trainer_card.h" #include "union_room.h" -#include "easy_chat.h" -#include "event_obj_lock.h" #include "union_room_chat.h" -#include "berry_crush.h" -#include "mystery_gift.h" #include "union_room_player_avatar.h" -#include "pokemon_jump.h" +#include "window.h" +#include "constants/battle_frontier.h" +#include "constants/game_stat.h" +#include "constants/maps.h" +#include "constants/rgb.h" +#include "constants/songs.h" +#include "constants/species.h" EWRAM_DATA u8 gUnknown_02022C20[12] = {}; EWRAM_DATA u8 gUnknown_02022C2C = 0; @@ -60,9 +61,9 @@ EWRAM_DATA u8 gUnknown_02022C3E = 0; EWRAM_DATA struct TradeUnkStruct gUnknown_02022C40 = {}; // IWRAM vars -IWRAM_DATA struct UnkStruct_Leader *gUnknown_03000DA0; -IWRAM_DATA struct UnkStruct_Group *gUnknown_03000DA4; -IWRAM_DATA struct UnkStruct_URoom *gUnknown_03000DA8; +static struct UnkStruct_Leader *gUnknown_03000DA0; +static struct UnkStruct_Group *gUnknown_03000DA4; +static struct UnkStruct_URoom *gUnknown_03000DA8; // this file's functions void sub_80173E0(u8 windowId, u8 arg1, const u8 *str, u8 arg3, u8 arg4, u8 arg5); @@ -98,7 +99,6 @@ bool32 sub_8017678(struct UnkStruct_Shared *arg0, struct UnkStruct_Shared *arg1) u32 sub_8018120(struct TradeUnkStruct *arg0, u8 multiplayerId); void sub_801807C(struct TradeUnkStruct *arg0); void sub_801AC54(void); -void sub_802493C(u8 monId, MainCallback callback); void sub_80149D8(void); void MG_DrawTextBorder(u8 windowId); s8 mevent_message_print_and_prompt_yes_no(u8 *textState, u8 *arg1, u8 arg2, const u8 *str); diff --git a/src/union_room_battle.c b/src/union_room_battle.c index 9d9f9dcf3..79d12291d 100644 --- a/src/union_room_battle.c +++ b/src/union_room_battle.c @@ -40,8 +40,7 @@ struct UnkStruct_2022C6C s16 a0; }; -IWRAM_DATA struct UnkStruct_3000DAC * gUnknown_03000DAC; -IWRAM_DATA bool32 gUnknown_03000DB0; +static struct UnkStruct_3000DAC * gUnknown_03000DAC; EWRAM_DATA struct UnkStruct_2022C6C * gUnknown_02022C6C = NULL; diff --git a/src/union_room_player_avatar.c b/src/union_room_player_avatar.c index 4c302c5eb..0b7324366 100644 --- a/src/union_room_player_avatar.c +++ b/src/union_room_player_avatar.c @@ -1,13 +1,14 @@ #include "global.h" -#include "constants/flags.h" -#include "constants/event_object_movement_constants.h" #include "event_data.h" #include "event_object_movement.h" -#include "script.h" #include "field_player_avatar.h" #include "fieldmap.h" -#include "union_room.h" +#include "script.h" #include "task.h" +#include "union_room.h" +#include "constants/event_objects.h" +#include "constants/event_object_movement_constants.h" +#include "constants/flags.h" EWRAM_DATA struct UnkStruct_8019BA8 * gUnknown_02022C64 = NULL; EWRAM_DATA u32 gUnknown_02022C68 = 0; @@ -390,7 +391,7 @@ void sub_8019E70(u8 * sp8, s32 r9) for (r7 = 0; r7 < 5; r7++) { s32 r5 = 5 * r9 + r7; - sp8[r5] = sprite_new(0x41, r5 - 0x38, gUnknown_082F0740[r9][0] + gUnknown_082F0760[r7][0], gUnknown_082F0740[r9][1] + gUnknown_082F0760[r7][1], 3, 1); + sp8[r5] = sprite_new(EVENT_OBJ_GFX_MAN_4, r5 - 0x38, gUnknown_082F0740[r9][0] + gUnknown_082F0760[r7][0], gUnknown_082F0740[r9][1] + gUnknown_082F0760[r7][1], 3, 1); sub_8097C44(r5 - 0x38, TRUE); } } diff --git a/src/use_pokeblock.c b/src/use_pokeblock.c index f28b651cc..655f38def 100644 --- a/src/use_pokeblock.c +++ b/src/use_pokeblock.c @@ -85,6 +85,10 @@ struct UsePokeblockStruct /*0x7FD0*/ struct UsePokeblockSubStruct info; }; +#define TAG_TILE_CONDITION_UP_DOWN 0 +#define TAG_PAL_CONDITION_UP_DOWN 0 +#define TAG_PAL_POKEBLOCK_CONDITION 1 + extern void sub_81D21DC(u8); // this file's functions @@ -130,26 +134,12 @@ static u8 sub_8168048(void); void sub_8168180(struct Sprite *sprite); void sub_81681B4(struct Sprite *sprite); void sub_8168168(struct Sprite *sprite); +void sub_8168374(struct Sprite *sprite); -extern const struct BgTemplate gUnknown_085DFCCC[4]; -extern const struct WindowTemplate gUnknown_085DFCDC[]; -extern const struct WindowTemplate sUsePokeblockYesNoWinTemplate[]; -extern const u8* sContestStatNames[]; -extern const u32 gUnknown_085DFCB0[]; -extern const u8 gUnknown_085DFCC4[]; -extern const struct SpriteSheet gSpriteSheet_ConditionUpDown; -extern const struct SpritePalette gSpritePalette_ConditionUpDown; -extern const struct SpriteTemplate gSpriteTemplate_085DFD5C; -extern const s16 gUnknown_085DFD28[][2]; -extern const u32 gUnknown_085DFB60[]; -extern const u32 gUnknown_085DFA80[]; -extern const u32 gUnknown_085DFA60[]; -extern const u32 gUnknown_085DFC0C[]; extern const u16 gUnknown_086231E8[]; extern const u16 gUnknown_08623208[]; -extern const u8 gUnknown_085DFCC9[]; -extern const struct SpritePalette gUnknown_085DFDB8; -extern const struct SpriteTemplate gUnknown_085DFDA0; +extern const struct SpritePalette gSpritePalette_085DFDB8; +extern const struct SpriteTemplate gSpriteTemplate_085DFDA0; // ram variables EWRAM_DATA struct UsePokeblockSubStruct *gUnknown_0203BC90 = NULL; @@ -165,6 +155,245 @@ EWRAM_DATA struct UsePokeblockStruct *gUnknown_0203BCAC = NULL; // const rom data // todo: make it static once the file is decompiled +const u32 gUnknown_085DFA60[] = INCBIN_U32("graphics/interface/85DFA60.bin"); +const u32 gUnknown_085DFA80[] = INCBIN_U32("graphics/interface/85DFA80.4bpp"); +const u32 gUnknown_085DFB60[] = INCBIN_U32("graphics/interface/85DFB60.bin"); +const u32 gUnknown_085DFC0C[] = INCBIN_U32("graphics/interface/85DFC0C.bin"); + +const u32 gUnknown_085DFCB0[] = +{ + MON_DATA_COOL, + MON_DATA_TOUGH, + MON_DATA_SMART, + MON_DATA_CUTE, + MON_DATA_BEAUTY +}; + +const u8 gUnknown_085DFCC4[] = +{ + 0, // Spicy/Cool + 4, // Dry/Beauty + 3, // Sweet/Cute + 2, // Bitter/Smart + 1 // Sour/Tough +}; + +const u8 gUnknown_085DFCC9[] = +{ + 0, + 8, + 1 +}; + +const struct BgTemplate gUnknown_085DFCCC[4] = +{ + { + .bg = 0, + .charBaseIndex = 2, + .mapBaseIndex = 0x1F, + .screenSize = 0, + .paletteMode = 0, + .priority = 0, + .baseTile = 0 + }, + { + .bg = 1, + .charBaseIndex = 0, + .mapBaseIndex = 0x1E, + .screenSize = 0, + .paletteMode = 0, + .priority = 3, + .baseTile = 0 + }, + { + .bg = 3, + .charBaseIndex = 3, + .mapBaseIndex = 0x1D, + .screenSize = 0, + .paletteMode = 0, + .priority = 2, + .baseTile = 0x100 + }, + { + .bg = 2, + .charBaseIndex = 0, + .mapBaseIndex = 0x17, + .screenSize = 0, + .paletteMode = 0, + .priority = 1, + .baseTile = 0 + } +}; + +const struct WindowTemplate gUnknown_085DFCDC[] = +{ + { + .bg = 0, + .tilemapLeft = 0xD, + .tilemapTop = 1, + .width = 0xD, + .height = 4, + .paletteNum = 0xF, + .baseBlock = 1 + }, + { + .bg = 0, + .tilemapLeft = 0, + .tilemapTop = 0xE, + .width = 0xB, + .height = 2, + .paletteNum = 0xF, + .baseBlock = 0x35 + }, + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 0x11, + .width = 0x1C, + .height = 2, + .paletteNum = 0xF, + .baseBlock = 0x4B + }, + DUMMY_WIN_TEMPLATE +}; + +const struct WindowTemplate sUsePokeblockYesNoWinTemplate = +{ + .bg = 0, + .tilemapLeft = 0x18, + .tilemapTop = 0xB, + .width = 5, + .height = 4, + .paletteNum = 0xF, + .baseBlock = 0x83 +}; + +const u8 *const sContestStatNames[] = +{ + gText_Coolness, + gText_Toughness, + gText_Smartness, + gText_Cuteness, + gText_Beauty3 +}; + +const struct SpriteSheet gSpriteSheet_ConditionUpDown = +{ + gUsePokeblockUpDown_Gfx, 0x200, TAG_TILE_CONDITION_UP_DOWN +}; + +const struct SpritePalette gSpritePalette_ConditionUpDown = +{ + gUsePokeblockUpDown_Pal, TAG_PAL_CONDITION_UP_DOWN +}; + +const s16 gUnknown_085DFD28[][2] = +{ + {0x9C, 0x24}, + {0x75, 0x3B}, + {0x75, 0x76}, + {0xC5, 0x76}, + {0xC5, 0x3B} +}; + +const struct OamData gOamData_085DFD3C = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .bpp = 0, + .shape = SPRITE_SHAPE(32x16), + .x = 0, + .size = SPRITE_SIZE(32x16), + .tileNum = 0, + .priority = 1, + .paletteNum = 0, +}; + +const union AnimCmd gSpriteAnim_085DFD44[] = +{ + ANIMCMD_FRAME(0, 5), + ANIMCMD_END +}; + +const union AnimCmd gSpriteAnim_085DFD4C[] = +{ + ANIMCMD_FRAME(8, 5), + ANIMCMD_END +}; + +const union AnimCmd *const gSpriteAnimTable_085DFD54[] = +{ + gSpriteAnim_085DFD44, + gSpriteAnim_085DFD4C +}; + +const struct SpriteTemplate gSpriteTemplate_085DFD5C = +{ + .tileTag = 0, + .paletteTag = 0, + .oam = &gOamData_085DFD3C, + .anims = gSpriteAnimTable_085DFD54, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy, +}; + +const struct OamData gOamData_085DFD74 = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .bpp = 0, + .shape = SPRITE_SHAPE(64x32), + .x = 0, + .size = SPRITE_SIZE(64x32), + .tileNum = 0, + .priority = 1, + .paletteNum = 0, +}; + +const union AnimCmd gSpriteAnim_085DFD7C[] = +{ + ANIMCMD_FRAME(0, 5), + ANIMCMD_END +}; + +const union AnimCmd gSpriteAnim_085DFD84[] = +{ + ANIMCMD_FRAME(32, 5), + ANIMCMD_END +}; + +const union AnimCmd gSpriteAnim_085DFD8C[] = +{ + ANIMCMD_FRAME(64, 5), + ANIMCMD_END +}; + +const union AnimCmd *const gSpriteAnimTable_085DFD94[] = +{ + gSpriteAnim_085DFD7C, + gSpriteAnim_085DFD84, + gSpriteAnim_085DFD8C +}; + +const struct SpriteTemplate gSpriteTemplate_085DFDA0 = +{ + .tileTag = 1, + .paletteTag = 1, + .oam = &gOamData_085DFD74, + .anims = gSpriteAnimTable_085DFD94, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_8168374, +}; + +const struct SpritePalette gSpritePalette_085DFDB8 = +{ + gUsePokeblockCondition_Pal, TAG_PAL_POKEBLOCK_CONDITION +}; + // code void ChooseMonToGivePokeblock(struct Pokeblock *pokeblock, void (*callback)(void)) { @@ -618,7 +847,7 @@ void sub_8166D44(void) AddTextPrinterParameterized(2, 1, gStringVar4, 0, 1, 0, NULL); PutWindowTilemap(2); CopyWindowToVram(2, 3); - CreateYesNoMenu(sUsePokeblockYesNoWinTemplate, 151, 14, 0); + CreateYesNoMenu(&sUsePokeblockYesNoWinTemplate, 151, 14, 0); } s8 sub_8166DE4(void) @@ -1373,7 +1602,7 @@ static void sub_8168248(void) struct CompressedSpriteSheet spriteSheet; struct SpritePalette spritePalette; - spritePalette = gUnknown_085DFDB8; + spritePalette = gSpritePalette_085DFDB8; spriteSheet.data = gUsePokeblockCondition_Gfx; spriteSheet.size = 0x800; spriteSheet.tag = 1; @@ -1388,7 +1617,7 @@ static void sub_8168294(void) int yStart = 17; int var = 8; struct Sprite **sprites = gUnknown_0203BCAC->field_7B44; - const struct SpriteTemplate *template = &gUnknown_085DFDA0; + const struct SpriteTemplate *template = &gSpriteTemplate_085DFDA0; for (i = 0, xDiff = 64, xStart = -96; i < 2; i++) { diff --git a/src/wild_encounter.c b/src/wild_encounter.c index e42bf8a23..84275526e 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -42,6 +42,16 @@ EWRAM_DATA static u32 sFeebasRngValue = 0; #include "data/wild_encounters.h" +//Special Feebas-related data. +const struct WildPokemon gWildFeebasRoute119Data = {20, 25, SPECIES_FEEBAS}; + +const u16 gRoute119WaterTileData[] = +{ + 0, 0x2D, 0, + 0x2E, 0x5B, 0x83, + 0x5C, 0x8B, 0x12A, +}; + // code void DisableWildEncounters(bool8 disabled) { diff --git a/sym_bss.txt b/sym_bss.txt index 4d21151ef..4c974c3f6 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -9,6 +9,7 @@ .include "src/link_rfu.o" .include "src/union_room.o" .include "src/union_room_battle.o" + .include "src/dodrio_berry_picking.o" .include "src/rtc.o" .include "src/main_menu.o" .include "src/rom_8034C54.o" @@ -46,17 +47,8 @@ .include "src/multiboot.o" .include "src/mirage_tower.o" .include "src/berry_fix_program.o" - - @ pokenav -gUnknown_030012BC: @ 30012BC - .space 0x4 - -gUnknown_030012C0: @ 30012C0 - .space 0x4 - -gUnknown_030012C4: @ 30012C4 - .space 0x4 - + .include "src/pokenav_unk_7.o" + .include "src/pokenav_unk_10.o" .include "src/ereader_helpers.o" .include "src/faraway_island.o" .include "asm/m4a_1.o" diff --git a/sym_common.txt b/sym_common.txt index 17dbf5c41..f277ed0f2 100644 --- a/sym_common.txt +++ b/sym_common.txt @@ -45,29 +45,8 @@ .space 0x44 -gUnknown_03006370: @ 3006370 - .space 0x10 - + .include "ereader_screen.o" .include "m4a.o" .include "agb_flash.o" - -gRfuState: @ 3007868 - .space 0x8 - -gUnknown_03007870: @ 3007870 - .space 0x10 - -gUnknown_03007880: @ 3007880 - .space 0x10 - -gUnknown_03007890: @ 3007890 - .space 0x4 - -gUnknown_03007894: @ 3007894 - .space 0x4 - -gUnknown_03007898: @ 3007898 - .space 0x8 - -gUnknown_030078A0: @ 30078A0 - .space 0xC + .include "librfu_stwi.o" + .include "librfu.o" diff --git a/sym_ewram.txt b/sym_ewram.txt index acb0863c3..3de0c45cb 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -17,37 +17,8 @@ .include "src/union_room_chat.o" .include "src/berry_crush.o" .include "src/berry_powder.o" - - .align 2 - @ dodrio_berry_picking -gUnknown_02022C98: @ 2022C98 - .space 0x4 - -gUnknown_02022C9C: @ 2022C9C - .space 0x14 - -gUnknown_02022CB0: @ 2022CB0 - .space 0x8 - -gUnknown_02022CB8: @ 2022CB8 - .space 0x2C - -gUnknown_02022CE4: @ 2022CE4 - .space 0x10 - -gUnknown_02022CF4: @ 2022CF4 - .space 0x4 - -gUnknown_02022CF8: @ 2022CF8 - .space 0x4 - - @ pokemon_jump -gUnknown_02022CFC: @ 2022CFC - .space 0x4 - -gUnknown_02022D00: @ 2022D00 - .space 0x4 - + .include "src/dodrio_berry_picking.o" + .include "src/pokemon_jump.o" .include "src/main_menu.o" .include "src/battle_controllers.o" .include "src/rom_8034C54.o" diff --git a/tools/aif2pcm/Makefile b/tools/aif2pcm/Makefile index e5cb6ad31..af7d19fe9 100644 --- a/tools/aif2pcm/Makefile +++ b/tools/aif2pcm/Makefile @@ -6,7 +6,10 @@ LIBS = -lm SRCS = main.c extended.c -.PHONY: clean +.PHONY: all clean + +all: aif2pcm + @: aif2pcm: $(SRCS) $(CC) $(CFLAGS) $(SRCS) -o $@ $(LDFLAGS) $(LIBS) diff --git a/tools/bin2c/Makefile b/tools/bin2c/Makefile index 73f78980e..ab11e1b61 100644 --- a/tools/bin2c/Makefile +++ b/tools/bin2c/Makefile @@ -2,10 +2,13 @@ CC = gcc CFLAGS = -Wall -Wextra -Werror -std=c11 -O2 -.PHONY: clean +.PHONY: all clean SRCS = bin2c.c +all: bin2c + @: + bin2c: $(SRCS) $(CC) $(CFLAGS) $(SRCS) -o $@ $(LDFLAGS) diff --git a/tools/gbafix/Makefile b/tools/gbafix/Makefile index f12c8cc4f..5b410da08 100644 --- a/tools/gbafix/Makefile +++ b/tools/gbafix/Makefile @@ -1,8 +1,11 @@ CC = gcc -.PHONY: clean +.PHONY: all clean SRCS = gbafix.c +all: gbafix + @: + gbafix: $(SRCS) $(CC) $(SRCS) -o $@ $(LDFLAGS) diff --git a/tools/gbafix/elf.h b/tools/gbafix/elf.h new file mode 100644 index 000000000..79d3b974b --- /dev/null +++ b/tools/gbafix/elf.h @@ -0,0 +1,3147 @@ +/* +From musl include/elf.h + +Copyright © 2005-2014 Rich Felker, et al. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef _ELF_H +#define _ELF_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include <stdint.h> + +typedef uint16_t Elf32_Half; +typedef uint16_t Elf64_Half; + +typedef uint32_t Elf32_Word; +typedef int32_t Elf32_Sword; +typedef uint32_t Elf64_Word; +typedef int32_t Elf64_Sword; + +typedef uint64_t Elf32_Xword; +typedef int64_t Elf32_Sxword; +typedef uint64_t Elf64_Xword; +typedef int64_t Elf64_Sxword; + +typedef uint32_t Elf32_Addr; +typedef uint64_t Elf64_Addr; + +typedef uint32_t Elf32_Off; +typedef uint64_t Elf64_Off; + +typedef uint16_t Elf32_Section; +typedef uint16_t Elf64_Section; + +typedef Elf32_Half Elf32_Versym; +typedef Elf64_Half Elf64_Versym; + +#define EI_NIDENT (16) + +typedef struct { + unsigned char e_ident[EI_NIDENT]; + Elf32_Half e_type; + Elf32_Half e_machine; + Elf32_Word e_version; + Elf32_Addr e_entry; + Elf32_Off e_phoff; + Elf32_Off e_shoff; + Elf32_Word e_flags; + Elf32_Half e_ehsize; + Elf32_Half e_phentsize; + Elf32_Half e_phnum; + Elf32_Half e_shentsize; + Elf32_Half e_shnum; + Elf32_Half e_shstrndx; +} Elf32_Ehdr; + +typedef struct { + unsigned char e_ident[EI_NIDENT]; + Elf64_Half e_type; + Elf64_Half e_machine; + Elf64_Word e_version; + Elf64_Addr e_entry; + Elf64_Off e_phoff; + Elf64_Off e_shoff; + Elf64_Word e_flags; + Elf64_Half e_ehsize; + Elf64_Half e_phentsize; + Elf64_Half e_phnum; + Elf64_Half e_shentsize; + Elf64_Half e_shnum; + Elf64_Half e_shstrndx; +} Elf64_Ehdr; + +#define EI_MAG0 0 +#define ELFMAG0 0x7f + +#define EI_MAG1 1 +#define ELFMAG1 'E' + +#define EI_MAG2 2 +#define ELFMAG2 'L' + +#define EI_MAG3 3 +#define ELFMAG3 'F' + + +#define ELFMAG "\177ELF" +#define SELFMAG 4 + +#define EI_CLASS 4 +#define ELFCLASSNONE 0 +#define ELFCLASS32 1 +#define ELFCLASS64 2 +#define ELFCLASSNUM 3 + +#define EI_DATA 5 +#define ELFDATANONE 0 +#define ELFDATA2LSB 1 +#define ELFDATA2MSB 2 +#define ELFDATANUM 3 + +#define EI_VERSION 6 + + +#define EI_OSABI 7 +#define ELFOSABI_NONE 0 +#define ELFOSABI_SYSV 0 +#define ELFOSABI_HPUX 1 +#define ELFOSABI_NETBSD 2 +#define ELFOSABI_LINUX 3 +#define ELFOSABI_GNU 3 +#define ELFOSABI_SOLARIS 6 +#define ELFOSABI_AIX 7 +#define ELFOSABI_IRIX 8 +#define ELFOSABI_FREEBSD 9 +#define ELFOSABI_TRU64 10 +#define ELFOSABI_MODESTO 11 +#define ELFOSABI_OPENBSD 12 +#define ELFOSABI_ARM 97 +#define ELFOSABI_STANDALONE 255 + +#define EI_ABIVERSION 8 + +#define EI_PAD 9 + + + +#define ET_NONE 0 +#define ET_REL 1 +#define ET_EXEC 2 +#define ET_DYN 3 +#define ET_CORE 4 +#define ET_NUM 5 +#define ET_LOOS 0xfe00 +#define ET_HIOS 0xfeff +#define ET_LOPROC 0xff00 +#define ET_HIPROC 0xffff + + + +#define EM_NONE 0 +#define EM_M32 1 +#define EM_SPARC 2 +#define EM_386 3 +#define EM_68K 4 +#define EM_88K 5 +#define EM_860 7 +#define EM_MIPS 8 +#define EM_S370 9 +#define EM_MIPS_RS3_LE 10 + +#define EM_PARISC 15 +#define EM_VPP500 17 +#define EM_SPARC32PLUS 18 +#define EM_960 19 +#define EM_PPC 20 +#define EM_PPC64 21 +#define EM_S390 22 + +#define EM_V800 36 +#define EM_FR20 37 +#define EM_RH32 38 +#define EM_RCE 39 +#define EM_ARM 40 +#define EM_FAKE_ALPHA 41 +#define EM_SH 42 +#define EM_SPARCV9 43 +#define EM_TRICORE 44 +#define EM_ARC 45 +#define EM_H8_300 46 +#define EM_H8_300H 47 +#define EM_H8S 48 +#define EM_H8_500 49 +#define EM_IA_64 50 +#define EM_MIPS_X 51 +#define EM_COLDFIRE 52 +#define EM_68HC12 53 +#define EM_MMA 54 +#define EM_PCP 55 +#define EM_NCPU 56 +#define EM_NDR1 57 +#define EM_STARCORE 58 +#define EM_ME16 59 +#define EM_ST100 60 +#define EM_TINYJ 61 +#define EM_X86_64 62 +#define EM_PDSP 63 + +#define EM_FX66 66 +#define EM_ST9PLUS 67 +#define EM_ST7 68 +#define EM_68HC16 69 +#define EM_68HC11 70 +#define EM_68HC08 71 +#define EM_68HC05 72 +#define EM_SVX 73 +#define EM_ST19 74 +#define EM_VAX 75 +#define EM_CRIS 76 +#define EM_JAVELIN 77 +#define EM_FIREPATH 78 +#define EM_ZSP 79 +#define EM_MMIX 80 +#define EM_HUANY 81 +#define EM_PRISM 82 +#define EM_AVR 83 +#define EM_FR30 84 +#define EM_D10V 85 +#define EM_D30V 86 +#define EM_V850 87 +#define EM_M32R 88 +#define EM_MN10300 89 +#define EM_MN10200 90 +#define EM_PJ 91 +#define EM_OR1K 92 +#define EM_OPENRISC 92 +#define EM_ARC_A5 93 +#define EM_ARC_COMPACT 93 +#define EM_XTENSA 94 +#define EM_VIDEOCORE 95 +#define EM_TMM_GPP 96 +#define EM_NS32K 97 +#define EM_TPC 98 +#define EM_SNP1K 99 +#define EM_ST200 100 +#define EM_IP2K 101 +#define EM_MAX 102 +#define EM_CR 103 +#define EM_F2MC16 104 +#define EM_MSP430 105 +#define EM_BLACKFIN 106 +#define EM_SE_C33 107 +#define EM_SEP 108 +#define EM_ARCA 109 +#define EM_UNICORE 110 +#define EM_EXCESS 111 +#define EM_DXP 112 +#define EM_ALTERA_NIOS2 113 +#define EM_CRX 114 +#define EM_XGATE 115 +#define EM_C166 116 +#define EM_M16C 117 +#define EM_DSPIC30F 118 +#define EM_CE 119 +#define EM_M32C 120 +#define EM_TSK3000 131 +#define EM_RS08 132 +#define EM_SHARC 133 +#define EM_ECOG2 134 +#define EM_SCORE7 135 +#define EM_DSP24 136 +#define EM_VIDEOCORE3 137 +#define EM_LATTICEMICO32 138 +#define EM_SE_C17 139 +#define EM_TI_C6000 140 +#define EM_TI_C2000 141 +#define EM_TI_C5500 142 +#define EM_TI_ARP32 143 +#define EM_TI_PRU 144 +#define EM_MMDSP_PLUS 160 +#define EM_CYPRESS_M8C 161 +#define EM_R32C 162 +#define EM_TRIMEDIA 163 +#define EM_QDSP6 164 +#define EM_8051 165 +#define EM_STXP7X 166 +#define EM_NDS32 167 +#define EM_ECOG1X 168 +#define EM_MAXQ30 169 +#define EM_XIMO16 170 +#define EM_MANIK 171 +#define EM_CRAYNV2 172 +#define EM_RX 173 +#define EM_METAG 174 +#define EM_MCST_ELBRUS 175 +#define EM_ECOG16 176 +#define EM_CR16 177 +#define EM_ETPU 178 +#define EM_SLE9X 179 +#define EM_L10M 180 +#define EM_K10M 181 +#define EM_AARCH64 183 +#define EM_AVR32 185 +#define EM_STM8 186 +#define EM_TILE64 187 +#define EM_TILEPRO 188 +#define EM_MICROBLAZE 189 +#define EM_CUDA 190 +#define EM_TILEGX 191 +#define EM_CLOUDSHIELD 192 +#define EM_COREA_1ST 193 +#define EM_COREA_2ND 194 +#define EM_ARC_COMPACT2 195 +#define EM_OPEN8 196 +#define EM_RL78 197 +#define EM_VIDEOCORE5 198 +#define EM_78KOR 199 +#define EM_56800EX 200 +#define EM_BA1 201 +#define EM_BA2 202 +#define EM_XCORE 203 +#define EM_MCHP_PIC 204 +#define EM_KM32 210 +#define EM_KMX32 211 +#define EM_EMX16 212 +#define EM_EMX8 213 +#define EM_KVARC 214 +#define EM_CDP 215 +#define EM_COGE 216 +#define EM_COOL 217 +#define EM_NORC 218 +#define EM_CSR_KALIMBA 219 +#define EM_Z80 220 +#define EM_VISIUM 221 +#define EM_FT32 222 +#define EM_MOXIE 223 +#define EM_AMDGPU 224 +#define EM_RISCV 243 +#define EM_BPF 247 +#define EM_NUM 248 + +#define EM_ALPHA 0x9026 + +#define EV_NONE 0 +#define EV_CURRENT 1 +#define EV_NUM 2 + +typedef struct { + Elf32_Word sh_name; + Elf32_Word sh_type; + Elf32_Word sh_flags; + Elf32_Addr sh_addr; + Elf32_Off sh_offset; + Elf32_Word sh_size; + Elf32_Word sh_link; + Elf32_Word sh_info; + Elf32_Word sh_addralign; + Elf32_Word sh_entsize; +} Elf32_Shdr; + +typedef struct { + Elf64_Word sh_name; + Elf64_Word sh_type; + Elf64_Xword sh_flags; + Elf64_Addr sh_addr; + Elf64_Off sh_offset; + Elf64_Xword sh_size; + Elf64_Word sh_link; + Elf64_Word sh_info; + Elf64_Xword sh_addralign; + Elf64_Xword sh_entsize; +} Elf64_Shdr; + + + +#define SHN_UNDEF 0 +#define SHN_LORESERVE 0xff00 +#define SHN_LOPROC 0xff00 +#define SHN_BEFORE 0xff00 + +#define SHN_AFTER 0xff01 + +#define SHN_HIPROC 0xff1f +#define SHN_LOOS 0xff20 +#define SHN_HIOS 0xff3f +#define SHN_ABS 0xfff1 +#define SHN_COMMON 0xfff2 +#define SHN_XINDEX 0xffff +#define SHN_HIRESERVE 0xffff + + + +#define SHT_NULL 0 +#define SHT_PROGBITS 1 +#define SHT_SYMTAB 2 +#define SHT_STRTAB 3 +#define SHT_RELA 4 +#define SHT_HASH 5 +#define SHT_DYNAMIC 6 +#define SHT_NOTE 7 +#define SHT_NOBITS 8 +#define SHT_REL 9 +#define SHT_SHLIB 10 +#define SHT_DYNSYM 11 +#define SHT_INIT_ARRAY 14 +#define SHT_FINI_ARRAY 15 +#define SHT_PREINIT_ARRAY 16 +#define SHT_GROUP 17 +#define SHT_SYMTAB_SHNDX 18 +#define SHT_NUM 19 +#define SHT_LOOS 0x60000000 +#define SHT_GNU_ATTRIBUTES 0x6ffffff5 +#define SHT_GNU_HASH 0x6ffffff6 +#define SHT_GNU_LIBLIST 0x6ffffff7 +#define SHT_CHECKSUM 0x6ffffff8 +#define SHT_LOSUNW 0x6ffffffa +#define SHT_SUNW_move 0x6ffffffa +#define SHT_SUNW_COMDAT 0x6ffffffb +#define SHT_SUNW_syminfo 0x6ffffffc +#define SHT_GNU_verdef 0x6ffffffd +#define SHT_GNU_verneed 0x6ffffffe +#define SHT_GNU_versym 0x6fffffff +#define SHT_HISUNW 0x6fffffff +#define SHT_HIOS 0x6fffffff +#define SHT_LOPROC 0x70000000 +#define SHT_HIPROC 0x7fffffff +#define SHT_LOUSER 0x80000000 +#define SHT_HIUSER 0x8fffffff + +#define SHF_WRITE (1 << 0) +#define SHF_ALLOC (1 << 1) +#define SHF_EXECINSTR (1 << 2) +#define SHF_MERGE (1 << 4) +#define SHF_STRINGS (1 << 5) +#define SHF_INFO_LINK (1 << 6) +#define SHF_LINK_ORDER (1 << 7) +#define SHF_OS_NONCONFORMING (1 << 8) + +#define SHF_GROUP (1 << 9) +#define SHF_TLS (1 << 10) +#define SHF_COMPRESSED (1 << 11) +#define SHF_MASKOS 0x0ff00000 +#define SHF_MASKPROC 0xf0000000 +#define SHF_ORDERED (1 << 30) +#define SHF_EXCLUDE (1U << 31) + +typedef struct { + Elf32_Word ch_type; + Elf32_Word ch_size; + Elf32_Word ch_addralign; +} Elf32_Chdr; + +typedef struct { + Elf64_Word ch_type; + Elf64_Word ch_reserved; + Elf64_Xword ch_size; + Elf64_Xword ch_addralign; +} Elf64_Chdr; + +#define ELFCOMPRESS_ZLIB 1 +#define ELFCOMPRESS_LOOS 0x60000000 +#define ELFCOMPRESS_HIOS 0x6fffffff +#define ELFCOMPRESS_LOPROC 0x70000000 +#define ELFCOMPRESS_HIPROC 0x7fffffff + + +#define GRP_COMDAT 0x1 + +typedef struct { + Elf32_Word st_name; + Elf32_Addr st_value; + Elf32_Word st_size; + unsigned char st_info; + unsigned char st_other; + Elf32_Section st_shndx; +} Elf32_Sym; + +typedef struct { + Elf64_Word st_name; + unsigned char st_info; + unsigned char st_other; + Elf64_Section st_shndx; + Elf64_Addr st_value; + Elf64_Xword st_size; +} Elf64_Sym; + +typedef struct { + Elf32_Half si_boundto; + Elf32_Half si_flags; +} Elf32_Syminfo; + +typedef struct { + Elf64_Half si_boundto; + Elf64_Half si_flags; +} Elf64_Syminfo; + +#define SYMINFO_BT_SELF 0xffff +#define SYMINFO_BT_PARENT 0xfffe +#define SYMINFO_BT_LOWRESERVE 0xff00 + +#define SYMINFO_FLG_DIRECT 0x0001 +#define SYMINFO_FLG_PASSTHRU 0x0002 +#define SYMINFO_FLG_COPY 0x0004 +#define SYMINFO_FLG_LAZYLOAD 0x0008 + +#define SYMINFO_NONE 0 +#define SYMINFO_CURRENT 1 +#define SYMINFO_NUM 2 + +#define ELF32_ST_BIND(val) (((unsigned char) (val)) >> 4) +#define ELF32_ST_TYPE(val) ((val) & 0xf) +#define ELF32_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf)) + +#define ELF64_ST_BIND(val) ELF32_ST_BIND (val) +#define ELF64_ST_TYPE(val) ELF32_ST_TYPE (val) +#define ELF64_ST_INFO(bind, type) ELF32_ST_INFO ((bind), (type)) + +#define STB_LOCAL 0 +#define STB_GLOBAL 1 +#define STB_WEAK 2 +#define STB_NUM 3 +#define STB_LOOS 10 +#define STB_GNU_UNIQUE 10 +#define STB_HIOS 12 +#define STB_LOPROC 13 +#define STB_HIPROC 15 + +#define STT_NOTYPE 0 +#define STT_OBJECT 1 +#define STT_FUNC 2 +#define STT_SECTION 3 +#define STT_FILE 4 +#define STT_COMMON 5 +#define STT_TLS 6 +#define STT_NUM 7 +#define STT_LOOS 10 +#define STT_GNU_IFUNC 10 +#define STT_HIOS 12 +#define STT_LOPROC 13 +#define STT_HIPROC 15 + +#define STN_UNDEF 0 + +#define ELF32_ST_VISIBILITY(o) ((o) & 0x03) +#define ELF64_ST_VISIBILITY(o) ELF32_ST_VISIBILITY (o) + +#define STV_DEFAULT 0 +#define STV_INTERNAL 1 +#define STV_HIDDEN 2 +#define STV_PROTECTED 3 + + + + +typedef struct { + Elf32_Addr r_offset; + Elf32_Word r_info; +} Elf32_Rel; + +typedef struct { + Elf64_Addr r_offset; + Elf64_Xword r_info; +} Elf64_Rel; + + + +typedef struct { + Elf32_Addr r_offset; + Elf32_Word r_info; + Elf32_Sword r_addend; +} Elf32_Rela; + +typedef struct { + Elf64_Addr r_offset; + Elf64_Xword r_info; + Elf64_Sxword r_addend; +} Elf64_Rela; + + + +#define ELF32_R_SYM(val) ((val) >> 8) +#define ELF32_R_TYPE(val) ((val) & 0xff) +#define ELF32_R_INFO(sym, type) (((sym) << 8) + ((type) & 0xff)) + +#define ELF64_R_SYM(i) ((i) >> 32) +#define ELF64_R_TYPE(i) ((i) & 0xffffffff) +#define ELF64_R_INFO(sym,type) ((((Elf64_Xword) (sym)) << 32) + (type)) + + + +typedef struct { + Elf32_Word p_type; + Elf32_Off p_offset; + Elf32_Addr p_vaddr; + Elf32_Addr p_paddr; + Elf32_Word p_filesz; + Elf32_Word p_memsz; + Elf32_Word p_flags; + Elf32_Word p_align; +} Elf32_Phdr; + +typedef struct { + Elf64_Word p_type; + Elf64_Word p_flags; + Elf64_Off p_offset; + Elf64_Addr p_vaddr; + Elf64_Addr p_paddr; + Elf64_Xword p_filesz; + Elf64_Xword p_memsz; + Elf64_Xword p_align; +} Elf64_Phdr; + + + +#define PT_NULL 0 +#define PT_LOAD 1 +#define PT_DYNAMIC 2 +#define PT_INTERP 3 +#define PT_NOTE 4 +#define PT_SHLIB 5 +#define PT_PHDR 6 +#define PT_TLS 7 +#define PT_NUM 8 +#define PT_LOOS 0x60000000 +#define PT_GNU_EH_FRAME 0x6474e550 +#define PT_GNU_STACK 0x6474e551 +#define PT_GNU_RELRO 0x6474e552 +#define PT_LOSUNW 0x6ffffffa +#define PT_SUNWBSS 0x6ffffffa +#define PT_SUNWSTACK 0x6ffffffb +#define PT_HISUNW 0x6fffffff +#define PT_HIOS 0x6fffffff +#define PT_LOPROC 0x70000000 +#define PT_HIPROC 0x7fffffff + + +#define PN_XNUM 0xffff + + +#define PF_X (1 << 0) +#define PF_W (1 << 1) +#define PF_R (1 << 2) +#define PF_MASKOS 0x0ff00000 +#define PF_MASKPROC 0xf0000000 + + + +#define NT_PRSTATUS 1 +#define NT_FPREGSET 2 +#define NT_PRPSINFO 3 +#define NT_PRXREG 4 +#define NT_TASKSTRUCT 4 +#define NT_PLATFORM 5 +#define NT_AUXV 6 +#define NT_GWINDOWS 7 +#define NT_ASRS 8 +#define NT_PSTATUS 10 +#define NT_PSINFO 13 +#define NT_PRCRED 14 +#define NT_UTSNAME 15 +#define NT_LWPSTATUS 16 +#define NT_LWPSINFO 17 +#define NT_PRFPXREG 20 +#define NT_SIGINFO 0x53494749 +#define NT_FILE 0x46494c45 +#define NT_PRXFPREG 0x46e62b7f +#define NT_PPC_VMX 0x100 +#define NT_PPC_SPE 0x101 +#define NT_PPC_VSX 0x102 +#define NT_386_TLS 0x200 +#define NT_386_IOPERM 0x201 +#define NT_X86_XSTATE 0x202 +#define NT_S390_HIGH_GPRS 0x300 +#define NT_S390_TIMER 0x301 +#define NT_S390_TODCMP 0x302 +#define NT_S390_TODPREG 0x303 +#define NT_S390_CTRS 0x304 +#define NT_S390_PREFIX 0x305 +#define NT_S390_LAST_BREAK 0x306 +#define NT_S390_SYSTEM_CALL 0x307 +#define NT_S390_TDB 0x308 +#define NT_ARM_VFP 0x400 +#define NT_ARM_TLS 0x401 +#define NT_ARM_HW_BREAK 0x402 +#define NT_ARM_HW_WATCH 0x403 +#define NT_ARM_SYSTEM_CALL 0x404 +#define NT_ARM_SVE 0x405 +#define NT_METAG_CBUF 0x500 +#define NT_METAG_RPIPE 0x501 +#define NT_METAG_TLS 0x502 +#define NT_VERSION 1 + + + + +typedef struct { + Elf32_Sword d_tag; + union { + Elf32_Word d_val; + Elf32_Addr d_ptr; + } d_un; +} Elf32_Dyn; + +typedef struct { + Elf64_Sxword d_tag; + union { + Elf64_Xword d_val; + Elf64_Addr d_ptr; + } d_un; +} Elf64_Dyn; + + + +#define DT_NULL 0 +#define DT_NEEDED 1 +#define DT_PLTRELSZ 2 +#define DT_PLTGOT 3 +#define DT_HASH 4 +#define DT_STRTAB 5 +#define DT_SYMTAB 6 +#define DT_RELA 7 +#define DT_RELASZ 8 +#define DT_RELAENT 9 +#define DT_STRSZ 10 +#define DT_SYMENT 11 +#define DT_INIT 12 +#define DT_FINI 13 +#define DT_SONAME 14 +#define DT_RPATH 15 +#define DT_SYMBOLIC 16 +#define DT_REL 17 +#define DT_RELSZ 18 +#define DT_RELENT 19 +#define DT_PLTREL 20 +#define DT_DEBUG 21 +#define DT_TEXTREL 22 +#define DT_JMPREL 23 +#define DT_BIND_NOW 24 +#define DT_INIT_ARRAY 25 +#define DT_FINI_ARRAY 26 +#define DT_INIT_ARRAYSZ 27 +#define DT_FINI_ARRAYSZ 28 +#define DT_RUNPATH 29 +#define DT_FLAGS 30 +#define DT_ENCODING 32 +#define DT_PREINIT_ARRAY 32 +#define DT_PREINIT_ARRAYSZ 33 +#define DT_NUM 34 +#define DT_LOOS 0x6000000d +#define DT_HIOS 0x6ffff000 +#define DT_LOPROC 0x70000000 +#define DT_HIPROC 0x7fffffff +#define DT_PROCNUM DT_MIPS_NUM + +#define DT_VALRNGLO 0x6ffffd00 +#define DT_GNU_PRELINKED 0x6ffffdf5 +#define DT_GNU_CONFLICTSZ 0x6ffffdf6 +#define DT_GNU_LIBLISTSZ 0x6ffffdf7 +#define DT_CHECKSUM 0x6ffffdf8 +#define DT_PLTPADSZ 0x6ffffdf9 +#define DT_MOVEENT 0x6ffffdfa +#define DT_MOVESZ 0x6ffffdfb +#define DT_FEATURE_1 0x6ffffdfc +#define DT_POSFLAG_1 0x6ffffdfd + +#define DT_SYMINSZ 0x6ffffdfe +#define DT_SYMINENT 0x6ffffdff +#define DT_VALRNGHI 0x6ffffdff +#define DT_VALTAGIDX(tag) (DT_VALRNGHI - (tag)) +#define DT_VALNUM 12 + +#define DT_ADDRRNGLO 0x6ffffe00 +#define DT_GNU_HASH 0x6ffffef5 +#define DT_TLSDESC_PLT 0x6ffffef6 +#define DT_TLSDESC_GOT 0x6ffffef7 +#define DT_GNU_CONFLICT 0x6ffffef8 +#define DT_GNU_LIBLIST 0x6ffffef9 +#define DT_CONFIG 0x6ffffefa +#define DT_DEPAUDIT 0x6ffffefb +#define DT_AUDIT 0x6ffffefc +#define DT_PLTPAD 0x6ffffefd +#define DT_MOVETAB 0x6ffffefe +#define DT_SYMINFO 0x6ffffeff +#define DT_ADDRRNGHI 0x6ffffeff +#define DT_ADDRTAGIDX(tag) (DT_ADDRRNGHI - (tag)) +#define DT_ADDRNUM 11 + + + +#define DT_VERSYM 0x6ffffff0 + +#define DT_RELACOUNT 0x6ffffff9 +#define DT_RELCOUNT 0x6ffffffa + + +#define DT_FLAGS_1 0x6ffffffb +#define DT_VERDEF 0x6ffffffc + +#define DT_VERDEFNUM 0x6ffffffd +#define DT_VERNEED 0x6ffffffe + +#define DT_VERNEEDNUM 0x6fffffff +#define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) +#define DT_VERSIONTAGNUM 16 + + + +#define DT_AUXILIARY 0x7ffffffd +#define DT_FILTER 0x7fffffff +#define DT_EXTRATAGIDX(tag) ((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1) +#define DT_EXTRANUM 3 + + +#define DF_ORIGIN 0x00000001 +#define DF_SYMBOLIC 0x00000002 +#define DF_TEXTREL 0x00000004 +#define DF_BIND_NOW 0x00000008 +#define DF_STATIC_TLS 0x00000010 + + + +#define DF_1_NOW 0x00000001 +#define DF_1_GLOBAL 0x00000002 +#define DF_1_GROUP 0x00000004 +#define DF_1_NODELETE 0x00000008 +#define DF_1_LOADFLTR 0x00000010 +#define DF_1_INITFIRST 0x00000020 +#define DF_1_NOOPEN 0x00000040 +#define DF_1_ORIGIN 0x00000080 +#define DF_1_DIRECT 0x00000100 +#define DF_1_TRANS 0x00000200 +#define DF_1_INTERPOSE 0x00000400 +#define DF_1_NODEFLIB 0x00000800 +#define DF_1_NODUMP 0x00001000 +#define DF_1_CONFALT 0x00002000 +#define DF_1_ENDFILTEE 0x00004000 +#define DF_1_DISPRELDNE 0x00008000 +#define DF_1_DISPRELPND 0x00010000 +#define DF_1_NODIRECT 0x00020000 +#define DF_1_IGNMULDEF 0x00040000 +#define DF_1_NOKSYMS 0x00080000 +#define DF_1_NOHDR 0x00100000 +#define DF_1_EDITED 0x00200000 +#define DF_1_NORELOC 0x00400000 +#define DF_1_SYMINTPOSE 0x00800000 +#define DF_1_GLOBAUDIT 0x01000000 +#define DF_1_SINGLETON 0x02000000 + +#define DTF_1_PARINIT 0x00000001 +#define DTF_1_CONFEXP 0x00000002 + + +#define DF_P1_LAZYLOAD 0x00000001 +#define DF_P1_GROUPPERM 0x00000002 + + + + +typedef struct { + Elf32_Half vd_version; + Elf32_Half vd_flags; + Elf32_Half vd_ndx; + Elf32_Half vd_cnt; + Elf32_Word vd_hash; + Elf32_Word vd_aux; + Elf32_Word vd_next; +} Elf32_Verdef; + +typedef struct { + Elf64_Half vd_version; + Elf64_Half vd_flags; + Elf64_Half vd_ndx; + Elf64_Half vd_cnt; + Elf64_Word vd_hash; + Elf64_Word vd_aux; + Elf64_Word vd_next; +} Elf64_Verdef; + + + +#define VER_DEF_NONE 0 +#define VER_DEF_CURRENT 1 +#define VER_DEF_NUM 2 + + +#define VER_FLG_BASE 0x1 +#define VER_FLG_WEAK 0x2 + + +#define VER_NDX_LOCAL 0 +#define VER_NDX_GLOBAL 1 +#define VER_NDX_LORESERVE 0xff00 +#define VER_NDX_ELIMINATE 0xff01 + + + +typedef struct { + Elf32_Word vda_name; + Elf32_Word vda_next; +} Elf32_Verdaux; + +typedef struct { + Elf64_Word vda_name; + Elf64_Word vda_next; +} Elf64_Verdaux; + + + + +typedef struct { + Elf32_Half vn_version; + Elf32_Half vn_cnt; + Elf32_Word vn_file; + Elf32_Word vn_aux; + Elf32_Word vn_next; +} Elf32_Verneed; + +typedef struct { + Elf64_Half vn_version; + Elf64_Half vn_cnt; + Elf64_Word vn_file; + Elf64_Word vn_aux; + Elf64_Word vn_next; +} Elf64_Verneed; + + + +#define VER_NEED_NONE 0 +#define VER_NEED_CURRENT 1 +#define VER_NEED_NUM 2 + + + +typedef struct { + Elf32_Word vna_hash; + Elf32_Half vna_flags; + Elf32_Half vna_other; + Elf32_Word vna_name; + Elf32_Word vna_next; +} Elf32_Vernaux; + +typedef struct { + Elf64_Word vna_hash; + Elf64_Half vna_flags; + Elf64_Half vna_other; + Elf64_Word vna_name; + Elf64_Word vna_next; +} Elf64_Vernaux; + + + +#define VER_FLG_WEAK 0x2 + + + +typedef struct { + uint32_t a_type; + union { + uint32_t a_val; + } a_un; +} Elf32_auxv_t; + +typedef struct { + uint64_t a_type; + union { + uint64_t a_val; + } a_un; +} Elf64_auxv_t; + + + +#define AT_NULL 0 +#define AT_IGNORE 1 +#define AT_EXECFD 2 +#define AT_PHDR 3 +#define AT_PHENT 4 +#define AT_PHNUM 5 +#define AT_PAGESZ 6 +#define AT_BASE 7 +#define AT_FLAGS 8 +#define AT_ENTRY 9 +#define AT_NOTELF 10 +#define AT_UID 11 +#define AT_EUID 12 +#define AT_GID 13 +#define AT_EGID 14 +#define AT_CLKTCK 17 + + +#define AT_PLATFORM 15 +#define AT_HWCAP 16 + + + + +#define AT_FPUCW 18 + + +#define AT_DCACHEBSIZE 19 +#define AT_ICACHEBSIZE 20 +#define AT_UCACHEBSIZE 21 + + + +#define AT_IGNOREPPC 22 + +#define AT_SECURE 23 + +#define AT_BASE_PLATFORM 24 + +#define AT_RANDOM 25 + +#define AT_HWCAP2 26 + +#define AT_EXECFN 31 + + + +#define AT_SYSINFO 32 +#define AT_SYSINFO_EHDR 33 + + + +#define AT_L1I_CACHESHAPE 34 +#define AT_L1D_CACHESHAPE 35 +#define AT_L2_CACHESHAPE 36 +#define AT_L3_CACHESHAPE 37 + + + + +typedef struct { + Elf32_Word n_namesz; + Elf32_Word n_descsz; + Elf32_Word n_type; +} Elf32_Nhdr; + +typedef struct { + Elf64_Word n_namesz; + Elf64_Word n_descsz; + Elf64_Word n_type; +} Elf64_Nhdr; + + + + +#define ELF_NOTE_SOLARIS "SUNW Solaris" + + +#define ELF_NOTE_GNU "GNU" + + + + + +#define ELF_NOTE_PAGESIZE_HINT 1 + + +#define NT_GNU_ABI_TAG 1 +#define ELF_NOTE_ABI NT_GNU_ABI_TAG + + + +#define ELF_NOTE_OS_LINUX 0 +#define ELF_NOTE_OS_GNU 1 +#define ELF_NOTE_OS_SOLARIS2 2 +#define ELF_NOTE_OS_FREEBSD 3 + +#define NT_GNU_BUILD_ID 3 +#define NT_GNU_GOLD_VERSION 4 + + + +typedef struct { + Elf32_Xword m_value; + Elf32_Word m_info; + Elf32_Word m_poffset; + Elf32_Half m_repeat; + Elf32_Half m_stride; +} Elf32_Move; + +typedef struct { + Elf64_Xword m_value; + Elf64_Xword m_info; + Elf64_Xword m_poffset; + Elf64_Half m_repeat; + Elf64_Half m_stride; +} Elf64_Move; + + +#define ELF32_M_SYM(info) ((info) >> 8) +#define ELF32_M_SIZE(info) ((unsigned char) (info)) +#define ELF32_M_INFO(sym, size) (((sym) << 8) + (unsigned char) (size)) + +#define ELF64_M_SYM(info) ELF32_M_SYM (info) +#define ELF64_M_SIZE(info) ELF32_M_SIZE (info) +#define ELF64_M_INFO(sym, size) ELF32_M_INFO (sym, size) + +#define EF_CPU32 0x00810000 + +#define R_68K_NONE 0 +#define R_68K_32 1 +#define R_68K_16 2 +#define R_68K_8 3 +#define R_68K_PC32 4 +#define R_68K_PC16 5 +#define R_68K_PC8 6 +#define R_68K_GOT32 7 +#define R_68K_GOT16 8 +#define R_68K_GOT8 9 +#define R_68K_GOT32O 10 +#define R_68K_GOT16O 11 +#define R_68K_GOT8O 12 +#define R_68K_PLT32 13 +#define R_68K_PLT16 14 +#define R_68K_PLT8 15 +#define R_68K_PLT32O 16 +#define R_68K_PLT16O 17 +#define R_68K_PLT8O 18 +#define R_68K_COPY 19 +#define R_68K_GLOB_DAT 20 +#define R_68K_JMP_SLOT 21 +#define R_68K_RELATIVE 22 +#define R_68K_NUM 23 + +#define R_386_NONE 0 +#define R_386_32 1 +#define R_386_PC32 2 +#define R_386_GOT32 3 +#define R_386_PLT32 4 +#define R_386_COPY 5 +#define R_386_GLOB_DAT 6 +#define R_386_JMP_SLOT 7 +#define R_386_RELATIVE 8 +#define R_386_GOTOFF 9 +#define R_386_GOTPC 10 +#define R_386_32PLT 11 +#define R_386_TLS_TPOFF 14 +#define R_386_TLS_IE 15 +#define R_386_TLS_GOTIE 16 +#define R_386_TLS_LE 17 +#define R_386_TLS_GD 18 +#define R_386_TLS_LDM 19 +#define R_386_16 20 +#define R_386_PC16 21 +#define R_386_8 22 +#define R_386_PC8 23 +#define R_386_TLS_GD_32 24 +#define R_386_TLS_GD_PUSH 25 +#define R_386_TLS_GD_CALL 26 +#define R_386_TLS_GD_POP 27 +#define R_386_TLS_LDM_32 28 +#define R_386_TLS_LDM_PUSH 29 +#define R_386_TLS_LDM_CALL 30 +#define R_386_TLS_LDM_POP 31 +#define R_386_TLS_LDO_32 32 +#define R_386_TLS_IE_32 33 +#define R_386_TLS_LE_32 34 +#define R_386_TLS_DTPMOD32 35 +#define R_386_TLS_DTPOFF32 36 +#define R_386_TLS_TPOFF32 37 +#define R_386_SIZE32 38 +#define R_386_TLS_GOTDESC 39 +#define R_386_TLS_DESC_CALL 40 +#define R_386_TLS_DESC 41 +#define R_386_IRELATIVE 42 +#define R_386_GOT32X 43 +#define R_386_NUM 44 + + + + + +#define STT_SPARC_REGISTER 13 + + + +#define EF_SPARCV9_MM 3 +#define EF_SPARCV9_TSO 0 +#define EF_SPARCV9_PSO 1 +#define EF_SPARCV9_RMO 2 +#define EF_SPARC_LEDATA 0x800000 +#define EF_SPARC_EXT_MASK 0xFFFF00 +#define EF_SPARC_32PLUS 0x000100 +#define EF_SPARC_SUN_US1 0x000200 +#define EF_SPARC_HAL_R1 0x000400 +#define EF_SPARC_SUN_US3 0x000800 + + + +#define R_SPARC_NONE 0 +#define R_SPARC_8 1 +#define R_SPARC_16 2 +#define R_SPARC_32 3 +#define R_SPARC_DISP8 4 +#define R_SPARC_DISP16 5 +#define R_SPARC_DISP32 6 +#define R_SPARC_WDISP30 7 +#define R_SPARC_WDISP22 8 +#define R_SPARC_HI22 9 +#define R_SPARC_22 10 +#define R_SPARC_13 11 +#define R_SPARC_LO10 12 +#define R_SPARC_GOT10 13 +#define R_SPARC_GOT13 14 +#define R_SPARC_GOT22 15 +#define R_SPARC_PC10 16 +#define R_SPARC_PC22 17 +#define R_SPARC_WPLT30 18 +#define R_SPARC_COPY 19 +#define R_SPARC_GLOB_DAT 20 +#define R_SPARC_JMP_SLOT 21 +#define R_SPARC_RELATIVE 22 +#define R_SPARC_UA32 23 + + + +#define R_SPARC_PLT32 24 +#define R_SPARC_HIPLT22 25 +#define R_SPARC_LOPLT10 26 +#define R_SPARC_PCPLT32 27 +#define R_SPARC_PCPLT22 28 +#define R_SPARC_PCPLT10 29 +#define R_SPARC_10 30 +#define R_SPARC_11 31 +#define R_SPARC_64 32 +#define R_SPARC_OLO10 33 +#define R_SPARC_HH22 34 +#define R_SPARC_HM10 35 +#define R_SPARC_LM22 36 +#define R_SPARC_PC_HH22 37 +#define R_SPARC_PC_HM10 38 +#define R_SPARC_PC_LM22 39 +#define R_SPARC_WDISP16 40 +#define R_SPARC_WDISP19 41 +#define R_SPARC_GLOB_JMP 42 +#define R_SPARC_7 43 +#define R_SPARC_5 44 +#define R_SPARC_6 45 +#define R_SPARC_DISP64 46 +#define R_SPARC_PLT64 47 +#define R_SPARC_HIX22 48 +#define R_SPARC_LOX10 49 +#define R_SPARC_H44 50 +#define R_SPARC_M44 51 +#define R_SPARC_L44 52 +#define R_SPARC_REGISTER 53 +#define R_SPARC_UA64 54 +#define R_SPARC_UA16 55 +#define R_SPARC_TLS_GD_HI22 56 +#define R_SPARC_TLS_GD_LO10 57 +#define R_SPARC_TLS_GD_ADD 58 +#define R_SPARC_TLS_GD_CALL 59 +#define R_SPARC_TLS_LDM_HI22 60 +#define R_SPARC_TLS_LDM_LO10 61 +#define R_SPARC_TLS_LDM_ADD 62 +#define R_SPARC_TLS_LDM_CALL 63 +#define R_SPARC_TLS_LDO_HIX22 64 +#define R_SPARC_TLS_LDO_LOX10 65 +#define R_SPARC_TLS_LDO_ADD 66 +#define R_SPARC_TLS_IE_HI22 67 +#define R_SPARC_TLS_IE_LO10 68 +#define R_SPARC_TLS_IE_LD 69 +#define R_SPARC_TLS_IE_LDX 70 +#define R_SPARC_TLS_IE_ADD 71 +#define R_SPARC_TLS_LE_HIX22 72 +#define R_SPARC_TLS_LE_LOX10 73 +#define R_SPARC_TLS_DTPMOD32 74 +#define R_SPARC_TLS_DTPMOD64 75 +#define R_SPARC_TLS_DTPOFF32 76 +#define R_SPARC_TLS_DTPOFF64 77 +#define R_SPARC_TLS_TPOFF32 78 +#define R_SPARC_TLS_TPOFF64 79 +#define R_SPARC_GOTDATA_HIX22 80 +#define R_SPARC_GOTDATA_LOX10 81 +#define R_SPARC_GOTDATA_OP_HIX22 82 +#define R_SPARC_GOTDATA_OP_LOX10 83 +#define R_SPARC_GOTDATA_OP 84 +#define R_SPARC_H34 85 +#define R_SPARC_SIZE32 86 +#define R_SPARC_SIZE64 87 +#define R_SPARC_GNU_VTINHERIT 250 +#define R_SPARC_GNU_VTENTRY 251 +#define R_SPARC_REV32 252 + +#define R_SPARC_NUM 253 + + + +#define DT_SPARC_REGISTER 0x70000001 +#define DT_SPARC_NUM 2 + + +#define EF_MIPS_NOREORDER 1 +#define EF_MIPS_PIC 2 +#define EF_MIPS_CPIC 4 +#define EF_MIPS_XGOT 8 +#define EF_MIPS_64BIT_WHIRL 16 +#define EF_MIPS_ABI2 32 +#define EF_MIPS_ABI_ON32 64 +#define EF_MIPS_FP64 512 +#define EF_MIPS_NAN2008 1024 +#define EF_MIPS_ARCH 0xf0000000 + + + +#define EF_MIPS_ARCH_1 0x00000000 +#define EF_MIPS_ARCH_2 0x10000000 +#define EF_MIPS_ARCH_3 0x20000000 +#define EF_MIPS_ARCH_4 0x30000000 +#define EF_MIPS_ARCH_5 0x40000000 +#define EF_MIPS_ARCH_32 0x50000000 +#define EF_MIPS_ARCH_64 0x60000000 +#define EF_MIPS_ARCH_32R2 0x70000000 +#define EF_MIPS_ARCH_64R2 0x80000000 + + +#define E_MIPS_ARCH_1 0x00000000 +#define E_MIPS_ARCH_2 0x10000000 +#define E_MIPS_ARCH_3 0x20000000 +#define E_MIPS_ARCH_4 0x30000000 +#define E_MIPS_ARCH_5 0x40000000 +#define E_MIPS_ARCH_32 0x50000000 +#define E_MIPS_ARCH_64 0x60000000 + + + +#define SHN_MIPS_ACOMMON 0xff00 +#define SHN_MIPS_TEXT 0xff01 +#define SHN_MIPS_DATA 0xff02 +#define SHN_MIPS_SCOMMON 0xff03 +#define SHN_MIPS_SUNDEFINED 0xff04 + + + +#define SHT_MIPS_LIBLIST 0x70000000 +#define SHT_MIPS_MSYM 0x70000001 +#define SHT_MIPS_CONFLICT 0x70000002 +#define SHT_MIPS_GPTAB 0x70000003 +#define SHT_MIPS_UCODE 0x70000004 +#define SHT_MIPS_DEBUG 0x70000005 +#define SHT_MIPS_REGINFO 0x70000006 +#define SHT_MIPS_PACKAGE 0x70000007 +#define SHT_MIPS_PACKSYM 0x70000008 +#define SHT_MIPS_RELD 0x70000009 +#define SHT_MIPS_IFACE 0x7000000b +#define SHT_MIPS_CONTENT 0x7000000c +#define SHT_MIPS_OPTIONS 0x7000000d +#define SHT_MIPS_SHDR 0x70000010 +#define SHT_MIPS_FDESC 0x70000011 +#define SHT_MIPS_EXTSYM 0x70000012 +#define SHT_MIPS_DENSE 0x70000013 +#define SHT_MIPS_PDESC 0x70000014 +#define SHT_MIPS_LOCSYM 0x70000015 +#define SHT_MIPS_AUXSYM 0x70000016 +#define SHT_MIPS_OPTSYM 0x70000017 +#define SHT_MIPS_LOCSTR 0x70000018 +#define SHT_MIPS_LINE 0x70000019 +#define SHT_MIPS_RFDESC 0x7000001a +#define SHT_MIPS_DELTASYM 0x7000001b +#define SHT_MIPS_DELTAINST 0x7000001c +#define SHT_MIPS_DELTACLASS 0x7000001d +#define SHT_MIPS_DWARF 0x7000001e +#define SHT_MIPS_DELTADECL 0x7000001f +#define SHT_MIPS_SYMBOL_LIB 0x70000020 +#define SHT_MIPS_EVENTS 0x70000021 +#define SHT_MIPS_TRANSLATE 0x70000022 +#define SHT_MIPS_PIXIE 0x70000023 +#define SHT_MIPS_XLATE 0x70000024 +#define SHT_MIPS_XLATE_DEBUG 0x70000025 +#define SHT_MIPS_WHIRL 0x70000026 +#define SHT_MIPS_EH_REGION 0x70000027 +#define SHT_MIPS_XLATE_OLD 0x70000028 +#define SHT_MIPS_PDR_EXCEPTION 0x70000029 + + + +#define SHF_MIPS_GPREL 0x10000000 +#define SHF_MIPS_MERGE 0x20000000 +#define SHF_MIPS_ADDR 0x40000000 +#define SHF_MIPS_STRINGS 0x80000000 +#define SHF_MIPS_NOSTRIP 0x08000000 +#define SHF_MIPS_LOCAL 0x04000000 +#define SHF_MIPS_NAMES 0x02000000 +#define SHF_MIPS_NODUPE 0x01000000 + + + + + +#define STO_MIPS_DEFAULT 0x0 +#define STO_MIPS_INTERNAL 0x1 +#define STO_MIPS_HIDDEN 0x2 +#define STO_MIPS_PROTECTED 0x3 +#define STO_MIPS_PLT 0x8 +#define STO_MIPS_SC_ALIGN_UNUSED 0xff + + +#define STB_MIPS_SPLIT_COMMON 13 + + + +typedef union { + struct { + Elf32_Word gt_current_g_value; + Elf32_Word gt_unused; + } gt_header; + struct { + Elf32_Word gt_g_value; + Elf32_Word gt_bytes; + } gt_entry; +} Elf32_gptab; + + + +typedef struct { + Elf32_Word ri_gprmask; + Elf32_Word ri_cprmask[4]; + Elf32_Sword ri_gp_value; +} Elf32_RegInfo; + + + +typedef struct { + unsigned char kind; + + unsigned char size; + Elf32_Section section; + + Elf32_Word info; +} Elf_Options; + + + +#define ODK_NULL 0 +#define ODK_REGINFO 1 +#define ODK_EXCEPTIONS 2 +#define ODK_PAD 3 +#define ODK_HWPATCH 4 +#define ODK_FILL 5 +#define ODK_TAGS 6 +#define ODK_HWAND 7 +#define ODK_HWOR 8 + + + +#define OEX_FPU_MIN 0x1f +#define OEX_FPU_MAX 0x1f00 +#define OEX_PAGE0 0x10000 +#define OEX_SMM 0x20000 +#define OEX_FPDBUG 0x40000 +#define OEX_PRECISEFP OEX_FPDBUG +#define OEX_DISMISS 0x80000 + +#define OEX_FPU_INVAL 0x10 +#define OEX_FPU_DIV0 0x08 +#define OEX_FPU_OFLO 0x04 +#define OEX_FPU_UFLO 0x02 +#define OEX_FPU_INEX 0x01 + + + +#define OHW_R4KEOP 0x1 +#define OHW_R8KPFETCH 0x2 +#define OHW_R5KEOP 0x4 +#define OHW_R5KCVTL 0x8 + +#define OPAD_PREFIX 0x1 +#define OPAD_POSTFIX 0x2 +#define OPAD_SYMBOL 0x4 + + + +typedef struct { + Elf32_Word hwp_flags1; + Elf32_Word hwp_flags2; +} Elf_Options_Hw; + + + +#define OHWA0_R4KEOP_CHECKED 0x00000001 +#define OHWA1_R4KEOP_CLEAN 0x00000002 + + + +#define R_MIPS_NONE 0 +#define R_MIPS_16 1 +#define R_MIPS_32 2 +#define R_MIPS_REL32 3 +#define R_MIPS_26 4 +#define R_MIPS_HI16 5 +#define R_MIPS_LO16 6 +#define R_MIPS_GPREL16 7 +#define R_MIPS_LITERAL 8 +#define R_MIPS_GOT16 9 +#define R_MIPS_PC16 10 +#define R_MIPS_CALL16 11 +#define R_MIPS_GPREL32 12 + +#define R_MIPS_SHIFT5 16 +#define R_MIPS_SHIFT6 17 +#define R_MIPS_64 18 +#define R_MIPS_GOT_DISP 19 +#define R_MIPS_GOT_PAGE 20 +#define R_MIPS_GOT_OFST 21 +#define R_MIPS_GOT_HI16 22 +#define R_MIPS_GOT_LO16 23 +#define R_MIPS_SUB 24 +#define R_MIPS_INSERT_A 25 +#define R_MIPS_INSERT_B 26 +#define R_MIPS_DELETE 27 +#define R_MIPS_HIGHER 28 +#define R_MIPS_HIGHEST 29 +#define R_MIPS_CALL_HI16 30 +#define R_MIPS_CALL_LO16 31 +#define R_MIPS_SCN_DISP 32 +#define R_MIPS_REL16 33 +#define R_MIPS_ADD_IMMEDIATE 34 +#define R_MIPS_PJUMP 35 +#define R_MIPS_RELGOT 36 +#define R_MIPS_JALR 37 +#define R_MIPS_TLS_DTPMOD32 38 +#define R_MIPS_TLS_DTPREL32 39 +#define R_MIPS_TLS_DTPMOD64 40 +#define R_MIPS_TLS_DTPREL64 41 +#define R_MIPS_TLS_GD 42 +#define R_MIPS_TLS_LDM 43 +#define R_MIPS_TLS_DTPREL_HI16 44 +#define R_MIPS_TLS_DTPREL_LO16 45 +#define R_MIPS_TLS_GOTTPREL 46 +#define R_MIPS_TLS_TPREL32 47 +#define R_MIPS_TLS_TPREL64 48 +#define R_MIPS_TLS_TPREL_HI16 49 +#define R_MIPS_TLS_TPREL_LO16 50 +#define R_MIPS_GLOB_DAT 51 +#define R_MIPS_COPY 126 +#define R_MIPS_JUMP_SLOT 127 + +#define R_MIPS_NUM 128 + + + +#define PT_MIPS_REGINFO 0x70000000 +#define PT_MIPS_RTPROC 0x70000001 +#define PT_MIPS_OPTIONS 0x70000002 +#define PT_MIPS_ABIFLAGS 0x70000003 + + + +#define PF_MIPS_LOCAL 0x10000000 + + + +#define DT_MIPS_RLD_VERSION 0x70000001 +#define DT_MIPS_TIME_STAMP 0x70000002 +#define DT_MIPS_ICHECKSUM 0x70000003 +#define DT_MIPS_IVERSION 0x70000004 +#define DT_MIPS_FLAGS 0x70000005 +#define DT_MIPS_BASE_ADDRESS 0x70000006 +#define DT_MIPS_MSYM 0x70000007 +#define DT_MIPS_CONFLICT 0x70000008 +#define DT_MIPS_LIBLIST 0x70000009 +#define DT_MIPS_LOCAL_GOTNO 0x7000000a +#define DT_MIPS_CONFLICTNO 0x7000000b +#define DT_MIPS_LIBLISTNO 0x70000010 +#define DT_MIPS_SYMTABNO 0x70000011 +#define DT_MIPS_UNREFEXTNO 0x70000012 +#define DT_MIPS_GOTSYM 0x70000013 +#define DT_MIPS_HIPAGENO 0x70000014 +#define DT_MIPS_RLD_MAP 0x70000016 +#define DT_MIPS_DELTA_CLASS 0x70000017 +#define DT_MIPS_DELTA_CLASS_NO 0x70000018 + +#define DT_MIPS_DELTA_INSTANCE 0x70000019 +#define DT_MIPS_DELTA_INSTANCE_NO 0x7000001a + +#define DT_MIPS_DELTA_RELOC 0x7000001b +#define DT_MIPS_DELTA_RELOC_NO 0x7000001c + +#define DT_MIPS_DELTA_SYM 0x7000001d + +#define DT_MIPS_DELTA_SYM_NO 0x7000001e + +#define DT_MIPS_DELTA_CLASSSYM 0x70000020 + +#define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021 + +#define DT_MIPS_CXX_FLAGS 0x70000022 +#define DT_MIPS_PIXIE_INIT 0x70000023 +#define DT_MIPS_SYMBOL_LIB 0x70000024 +#define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025 +#define DT_MIPS_LOCAL_GOTIDX 0x70000026 +#define DT_MIPS_HIDDEN_GOTIDX 0x70000027 +#define DT_MIPS_PROTECTED_GOTIDX 0x70000028 +#define DT_MIPS_OPTIONS 0x70000029 +#define DT_MIPS_INTERFACE 0x7000002a +#define DT_MIPS_DYNSTR_ALIGN 0x7000002b +#define DT_MIPS_INTERFACE_SIZE 0x7000002c +#define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002d + +#define DT_MIPS_PERF_SUFFIX 0x7000002e + +#define DT_MIPS_COMPACT_SIZE 0x7000002f +#define DT_MIPS_GP_VALUE 0x70000030 +#define DT_MIPS_AUX_DYNAMIC 0x70000031 + +#define DT_MIPS_PLTGOT 0x70000032 + +#define DT_MIPS_RWPLT 0x70000034 +#define DT_MIPS_RLD_MAP_REL 0x70000035 +#define DT_MIPS_NUM 0x36 + + + +#define RHF_NONE 0 +#define RHF_QUICKSTART (1 << 0) +#define RHF_NOTPOT (1 << 1) +#define RHF_NO_LIBRARY_REPLACEMENT (1 << 2) +#define RHF_NO_MOVE (1 << 3) +#define RHF_SGI_ONLY (1 << 4) +#define RHF_GUARANTEE_INIT (1 << 5) +#define RHF_DELTA_C_PLUS_PLUS (1 << 6) +#define RHF_GUARANTEE_START_INIT (1 << 7) +#define RHF_PIXIE (1 << 8) +#define RHF_DEFAULT_DELAY_LOAD (1 << 9) +#define RHF_REQUICKSTART (1 << 10) +#define RHF_REQUICKSTARTED (1 << 11) +#define RHF_CORD (1 << 12) +#define RHF_NO_UNRES_UNDEF (1 << 13) +#define RHF_RLD_ORDER_SAFE (1 << 14) + + + +typedef struct { + Elf32_Word l_name; + Elf32_Word l_time_stamp; + Elf32_Word l_checksum; + Elf32_Word l_version; + Elf32_Word l_flags; +} Elf32_Lib; + +typedef struct { + Elf64_Word l_name; + Elf64_Word l_time_stamp; + Elf64_Word l_checksum; + Elf64_Word l_version; + Elf64_Word l_flags; +} Elf64_Lib; + + + + +#define LL_NONE 0 +#define LL_EXACT_MATCH (1 << 0) +#define LL_IGNORE_INT_VER (1 << 1) +#define LL_REQUIRE_MINOR (1 << 2) +#define LL_EXPORTS (1 << 3) +#define LL_DELAY_LOAD (1 << 4) +#define LL_DELTA (1 << 5) + + + +typedef Elf32_Addr Elf32_Conflict; + +typedef struct { + Elf32_Half version; + unsigned char isa_level; + unsigned char isa_rev; + unsigned char gpr_size; + unsigned char cpr1_size; + unsigned char cpr2_size; + unsigned char fp_abi; + Elf32_Word isa_ext; + Elf32_Word ases; + Elf32_Word flags1; + Elf32_Word flags2; +} Elf_MIPS_ABIFlags_v0; + +#define MIPS_AFL_REG_NONE 0x00 +#define MIPS_AFL_REG_32 0x01 +#define MIPS_AFL_REG_64 0x02 +#define MIPS_AFL_REG_128 0x03 + +#define MIPS_AFL_ASE_DSP 0x00000001 +#define MIPS_AFL_ASE_DSPR2 0x00000002 +#define MIPS_AFL_ASE_EVA 0x00000004 +#define MIPS_AFL_ASE_MCU 0x00000008 +#define MIPS_AFL_ASE_MDMX 0x00000010 +#define MIPS_AFL_ASE_MIPS3D 0x00000020 +#define MIPS_AFL_ASE_MT 0x00000040 +#define MIPS_AFL_ASE_SMARTMIPS 0x00000080 +#define MIPS_AFL_ASE_VIRT 0x00000100 +#define MIPS_AFL_ASE_MSA 0x00000200 +#define MIPS_AFL_ASE_MIPS16 0x00000400 +#define MIPS_AFL_ASE_MICROMIPS 0x00000800 +#define MIPS_AFL_ASE_XPA 0x00001000 +#define MIPS_AFL_ASE_MASK 0x00001fff + +#define MIPS_AFL_EXT_XLR 1 +#define MIPS_AFL_EXT_OCTEON2 2 +#define MIPS_AFL_EXT_OCTEONP 3 +#define MIPS_AFL_EXT_LOONGSON_3A 4 +#define MIPS_AFL_EXT_OCTEON 5 +#define MIPS_AFL_EXT_5900 6 +#define MIPS_AFL_EXT_4650 7 +#define MIPS_AFL_EXT_4010 8 +#define MIPS_AFL_EXT_4100 9 +#define MIPS_AFL_EXT_3900 10 +#define MIPS_AFL_EXT_10000 11 +#define MIPS_AFL_EXT_SB1 12 +#define MIPS_AFL_EXT_4111 13 +#define MIPS_AFL_EXT_4120 14 +#define MIPS_AFL_EXT_5400 15 +#define MIPS_AFL_EXT_5500 16 +#define MIPS_AFL_EXT_LOONGSON_2E 17 +#define MIPS_AFL_EXT_LOONGSON_2F 18 + +#define MIPS_AFL_FLAGS1_ODDSPREG 1 + +enum +{ + Val_GNU_MIPS_ABI_FP_ANY = 0, + Val_GNU_MIPS_ABI_FP_DOUBLE = 1, + Val_GNU_MIPS_ABI_FP_SINGLE = 2, + Val_GNU_MIPS_ABI_FP_SOFT = 3, + Val_GNU_MIPS_ABI_FP_OLD_64 = 4, + Val_GNU_MIPS_ABI_FP_XX = 5, + Val_GNU_MIPS_ABI_FP_64 = 6, + Val_GNU_MIPS_ABI_FP_64A = 7, + Val_GNU_MIPS_ABI_FP_MAX = 7 +}; + + + + +#define EF_PARISC_TRAPNIL 0x00010000 +#define EF_PARISC_EXT 0x00020000 +#define EF_PARISC_LSB 0x00040000 +#define EF_PARISC_WIDE 0x00080000 +#define EF_PARISC_NO_KABP 0x00100000 + +#define EF_PARISC_LAZYSWAP 0x00400000 +#define EF_PARISC_ARCH 0x0000ffff + + + +#define EFA_PARISC_1_0 0x020b +#define EFA_PARISC_1_1 0x0210 +#define EFA_PARISC_2_0 0x0214 + + + +#define SHN_PARISC_ANSI_COMMON 0xff00 + +#define SHN_PARISC_HUGE_COMMON 0xff01 + + + +#define SHT_PARISC_EXT 0x70000000 +#define SHT_PARISC_UNWIND 0x70000001 +#define SHT_PARISC_DOC 0x70000002 + + + +#define SHF_PARISC_SHORT 0x20000000 +#define SHF_PARISC_HUGE 0x40000000 +#define SHF_PARISC_SBP 0x80000000 + + + +#define STT_PARISC_MILLICODE 13 + +#define STT_HP_OPAQUE (STT_LOOS + 0x1) +#define STT_HP_STUB (STT_LOOS + 0x2) + + + +#define R_PARISC_NONE 0 +#define R_PARISC_DIR32 1 +#define R_PARISC_DIR21L 2 +#define R_PARISC_DIR17R 3 +#define R_PARISC_DIR17F 4 +#define R_PARISC_DIR14R 6 +#define R_PARISC_PCREL32 9 +#define R_PARISC_PCREL21L 10 +#define R_PARISC_PCREL17R 11 +#define R_PARISC_PCREL17F 12 +#define R_PARISC_PCREL14R 14 +#define R_PARISC_DPREL21L 18 +#define R_PARISC_DPREL14R 22 +#define R_PARISC_GPREL21L 26 +#define R_PARISC_GPREL14R 30 +#define R_PARISC_LTOFF21L 34 +#define R_PARISC_LTOFF14R 38 +#define R_PARISC_SECREL32 41 +#define R_PARISC_SEGBASE 48 +#define R_PARISC_SEGREL32 49 +#define R_PARISC_PLTOFF21L 50 +#define R_PARISC_PLTOFF14R 54 +#define R_PARISC_LTOFF_FPTR32 57 +#define R_PARISC_LTOFF_FPTR21L 58 +#define R_PARISC_LTOFF_FPTR14R 62 +#define R_PARISC_FPTR64 64 +#define R_PARISC_PLABEL32 65 +#define R_PARISC_PLABEL21L 66 +#define R_PARISC_PLABEL14R 70 +#define R_PARISC_PCREL64 72 +#define R_PARISC_PCREL22F 74 +#define R_PARISC_PCREL14WR 75 +#define R_PARISC_PCREL14DR 76 +#define R_PARISC_PCREL16F 77 +#define R_PARISC_PCREL16WF 78 +#define R_PARISC_PCREL16DF 79 +#define R_PARISC_DIR64 80 +#define R_PARISC_DIR14WR 83 +#define R_PARISC_DIR14DR 84 +#define R_PARISC_DIR16F 85 +#define R_PARISC_DIR16WF 86 +#define R_PARISC_DIR16DF 87 +#define R_PARISC_GPREL64 88 +#define R_PARISC_GPREL14WR 91 +#define R_PARISC_GPREL14DR 92 +#define R_PARISC_GPREL16F 93 +#define R_PARISC_GPREL16WF 94 +#define R_PARISC_GPREL16DF 95 +#define R_PARISC_LTOFF64 96 +#define R_PARISC_LTOFF14WR 99 +#define R_PARISC_LTOFF14DR 100 +#define R_PARISC_LTOFF16F 101 +#define R_PARISC_LTOFF16WF 102 +#define R_PARISC_LTOFF16DF 103 +#define R_PARISC_SECREL64 104 +#define R_PARISC_SEGREL64 112 +#define R_PARISC_PLTOFF14WR 115 +#define R_PARISC_PLTOFF14DR 116 +#define R_PARISC_PLTOFF16F 117 +#define R_PARISC_PLTOFF16WF 118 +#define R_PARISC_PLTOFF16DF 119 +#define R_PARISC_LTOFF_FPTR64 120 +#define R_PARISC_LTOFF_FPTR14WR 123 +#define R_PARISC_LTOFF_FPTR14DR 124 +#define R_PARISC_LTOFF_FPTR16F 125 +#define R_PARISC_LTOFF_FPTR16WF 126 +#define R_PARISC_LTOFF_FPTR16DF 127 +#define R_PARISC_LORESERVE 128 +#define R_PARISC_COPY 128 +#define R_PARISC_IPLT 129 +#define R_PARISC_EPLT 130 +#define R_PARISC_TPREL32 153 +#define R_PARISC_TPREL21L 154 +#define R_PARISC_TPREL14R 158 +#define R_PARISC_LTOFF_TP21L 162 +#define R_PARISC_LTOFF_TP14R 166 +#define R_PARISC_LTOFF_TP14F 167 +#define R_PARISC_TPREL64 216 +#define R_PARISC_TPREL14WR 219 +#define R_PARISC_TPREL14DR 220 +#define R_PARISC_TPREL16F 221 +#define R_PARISC_TPREL16WF 222 +#define R_PARISC_TPREL16DF 223 +#define R_PARISC_LTOFF_TP64 224 +#define R_PARISC_LTOFF_TP14WR 227 +#define R_PARISC_LTOFF_TP14DR 228 +#define R_PARISC_LTOFF_TP16F 229 +#define R_PARISC_LTOFF_TP16WF 230 +#define R_PARISC_LTOFF_TP16DF 231 +#define R_PARISC_GNU_VTENTRY 232 +#define R_PARISC_GNU_VTINHERIT 233 +#define R_PARISC_TLS_GD21L 234 +#define R_PARISC_TLS_GD14R 235 +#define R_PARISC_TLS_GDCALL 236 +#define R_PARISC_TLS_LDM21L 237 +#define R_PARISC_TLS_LDM14R 238 +#define R_PARISC_TLS_LDMCALL 239 +#define R_PARISC_TLS_LDO21L 240 +#define R_PARISC_TLS_LDO14R 241 +#define R_PARISC_TLS_DTPMOD32 242 +#define R_PARISC_TLS_DTPMOD64 243 +#define R_PARISC_TLS_DTPOFF32 244 +#define R_PARISC_TLS_DTPOFF64 245 +#define R_PARISC_TLS_LE21L R_PARISC_TPREL21L +#define R_PARISC_TLS_LE14R R_PARISC_TPREL14R +#define R_PARISC_TLS_IE21L R_PARISC_LTOFF_TP21L +#define R_PARISC_TLS_IE14R R_PARISC_LTOFF_TP14R +#define R_PARISC_TLS_TPREL32 R_PARISC_TPREL32 +#define R_PARISC_TLS_TPREL64 R_PARISC_TPREL64 +#define R_PARISC_HIRESERVE 255 + + + +#define PT_HP_TLS (PT_LOOS + 0x0) +#define PT_HP_CORE_NONE (PT_LOOS + 0x1) +#define PT_HP_CORE_VERSION (PT_LOOS + 0x2) +#define PT_HP_CORE_KERNEL (PT_LOOS + 0x3) +#define PT_HP_CORE_COMM (PT_LOOS + 0x4) +#define PT_HP_CORE_PROC (PT_LOOS + 0x5) +#define PT_HP_CORE_LOADABLE (PT_LOOS + 0x6) +#define PT_HP_CORE_STACK (PT_LOOS + 0x7) +#define PT_HP_CORE_SHM (PT_LOOS + 0x8) +#define PT_HP_CORE_MMF (PT_LOOS + 0x9) +#define PT_HP_PARALLEL (PT_LOOS + 0x10) +#define PT_HP_FASTBIND (PT_LOOS + 0x11) +#define PT_HP_OPT_ANNOT (PT_LOOS + 0x12) +#define PT_HP_HSL_ANNOT (PT_LOOS + 0x13) +#define PT_HP_STACK (PT_LOOS + 0x14) + +#define PT_PARISC_ARCHEXT 0x70000000 +#define PT_PARISC_UNWIND 0x70000001 + + + +#define PF_PARISC_SBP 0x08000000 + +#define PF_HP_PAGE_SIZE 0x00100000 +#define PF_HP_FAR_SHARED 0x00200000 +#define PF_HP_NEAR_SHARED 0x00400000 +#define PF_HP_CODE 0x01000000 +#define PF_HP_MODIFY 0x02000000 +#define PF_HP_LAZYSWAP 0x04000000 +#define PF_HP_SBP 0x08000000 + + + + + + +#define EF_ALPHA_32BIT 1 +#define EF_ALPHA_CANRELAX 2 + + + + +#define SHT_ALPHA_DEBUG 0x70000001 +#define SHT_ALPHA_REGINFO 0x70000002 + + + +#define SHF_ALPHA_GPREL 0x10000000 + + +#define STO_ALPHA_NOPV 0x80 +#define STO_ALPHA_STD_GPLOAD 0x88 + + + +#define R_ALPHA_NONE 0 +#define R_ALPHA_REFLONG 1 +#define R_ALPHA_REFQUAD 2 +#define R_ALPHA_GPREL32 3 +#define R_ALPHA_LITERAL 4 +#define R_ALPHA_LITUSE 5 +#define R_ALPHA_GPDISP 6 +#define R_ALPHA_BRADDR 7 +#define R_ALPHA_HINT 8 +#define R_ALPHA_SREL16 9 +#define R_ALPHA_SREL32 10 +#define R_ALPHA_SREL64 11 +#define R_ALPHA_GPRELHIGH 17 +#define R_ALPHA_GPRELLOW 18 +#define R_ALPHA_GPREL16 19 +#define R_ALPHA_COPY 24 +#define R_ALPHA_GLOB_DAT 25 +#define R_ALPHA_JMP_SLOT 26 +#define R_ALPHA_RELATIVE 27 +#define R_ALPHA_TLS_GD_HI 28 +#define R_ALPHA_TLSGD 29 +#define R_ALPHA_TLS_LDM 30 +#define R_ALPHA_DTPMOD64 31 +#define R_ALPHA_GOTDTPREL 32 +#define R_ALPHA_DTPREL64 33 +#define R_ALPHA_DTPRELHI 34 +#define R_ALPHA_DTPRELLO 35 +#define R_ALPHA_DTPREL16 36 +#define R_ALPHA_GOTTPREL 37 +#define R_ALPHA_TPREL64 38 +#define R_ALPHA_TPRELHI 39 +#define R_ALPHA_TPRELLO 40 +#define R_ALPHA_TPREL16 41 + +#define R_ALPHA_NUM 46 + + +#define LITUSE_ALPHA_ADDR 0 +#define LITUSE_ALPHA_BASE 1 +#define LITUSE_ALPHA_BYTOFF 2 +#define LITUSE_ALPHA_JSR 3 +#define LITUSE_ALPHA_TLS_GD 4 +#define LITUSE_ALPHA_TLS_LDM 5 + + +#define DT_ALPHA_PLTRO (DT_LOPROC + 0) +#define DT_ALPHA_NUM 1 + + + + +#define EF_PPC_EMB 0x80000000 + + +#define EF_PPC_RELOCATABLE 0x00010000 +#define EF_PPC_RELOCATABLE_LIB 0x00008000 + + + +#define R_PPC_NONE 0 +#define R_PPC_ADDR32 1 +#define R_PPC_ADDR24 2 +#define R_PPC_ADDR16 3 +#define R_PPC_ADDR16_LO 4 +#define R_PPC_ADDR16_HI 5 +#define R_PPC_ADDR16_HA 6 +#define R_PPC_ADDR14 7 +#define R_PPC_ADDR14_BRTAKEN 8 +#define R_PPC_ADDR14_BRNTAKEN 9 +#define R_PPC_REL24 10 +#define R_PPC_REL14 11 +#define R_PPC_REL14_BRTAKEN 12 +#define R_PPC_REL14_BRNTAKEN 13 +#define R_PPC_GOT16 14 +#define R_PPC_GOT16_LO 15 +#define R_PPC_GOT16_HI 16 +#define R_PPC_GOT16_HA 17 +#define R_PPC_PLTREL24 18 +#define R_PPC_COPY 19 +#define R_PPC_GLOB_DAT 20 +#define R_PPC_JMP_SLOT 21 +#define R_PPC_RELATIVE 22 +#define R_PPC_LOCAL24PC 23 +#define R_PPC_UADDR32 24 +#define R_PPC_UADDR16 25 +#define R_PPC_REL32 26 +#define R_PPC_PLT32 27 +#define R_PPC_PLTREL32 28 +#define R_PPC_PLT16_LO 29 +#define R_PPC_PLT16_HI 30 +#define R_PPC_PLT16_HA 31 +#define R_PPC_SDAREL16 32 +#define R_PPC_SECTOFF 33 +#define R_PPC_SECTOFF_LO 34 +#define R_PPC_SECTOFF_HI 35 +#define R_PPC_SECTOFF_HA 36 + + +#define R_PPC_TLS 67 +#define R_PPC_DTPMOD32 68 +#define R_PPC_TPREL16 69 +#define R_PPC_TPREL16_LO 70 +#define R_PPC_TPREL16_HI 71 +#define R_PPC_TPREL16_HA 72 +#define R_PPC_TPREL32 73 +#define R_PPC_DTPREL16 74 +#define R_PPC_DTPREL16_LO 75 +#define R_PPC_DTPREL16_HI 76 +#define R_PPC_DTPREL16_HA 77 +#define R_PPC_DTPREL32 78 +#define R_PPC_GOT_TLSGD16 79 +#define R_PPC_GOT_TLSGD16_LO 80 +#define R_PPC_GOT_TLSGD16_HI 81 +#define R_PPC_GOT_TLSGD16_HA 82 +#define R_PPC_GOT_TLSLD16 83 +#define R_PPC_GOT_TLSLD16_LO 84 +#define R_PPC_GOT_TLSLD16_HI 85 +#define R_PPC_GOT_TLSLD16_HA 86 +#define R_PPC_GOT_TPREL16 87 +#define R_PPC_GOT_TPREL16_LO 88 +#define R_PPC_GOT_TPREL16_HI 89 +#define R_PPC_GOT_TPREL16_HA 90 +#define R_PPC_GOT_DTPREL16 91 +#define R_PPC_GOT_DTPREL16_LO 92 +#define R_PPC_GOT_DTPREL16_HI 93 +#define R_PPC_GOT_DTPREL16_HA 94 +#define R_PPC_TLSGD 95 +#define R_PPC_TLSLD 96 + + +#define R_PPC_EMB_NADDR32 101 +#define R_PPC_EMB_NADDR16 102 +#define R_PPC_EMB_NADDR16_LO 103 +#define R_PPC_EMB_NADDR16_HI 104 +#define R_PPC_EMB_NADDR16_HA 105 +#define R_PPC_EMB_SDAI16 106 +#define R_PPC_EMB_SDA2I16 107 +#define R_PPC_EMB_SDA2REL 108 +#define R_PPC_EMB_SDA21 109 +#define R_PPC_EMB_MRKREF 110 +#define R_PPC_EMB_RELSEC16 111 +#define R_PPC_EMB_RELST_LO 112 +#define R_PPC_EMB_RELST_HI 113 +#define R_PPC_EMB_RELST_HA 114 +#define R_PPC_EMB_BIT_FLD 115 +#define R_PPC_EMB_RELSDA 116 + + +#define R_PPC_DIAB_SDA21_LO 180 +#define R_PPC_DIAB_SDA21_HI 181 +#define R_PPC_DIAB_SDA21_HA 182 +#define R_PPC_DIAB_RELSDA_LO 183 +#define R_PPC_DIAB_RELSDA_HI 184 +#define R_PPC_DIAB_RELSDA_HA 185 + + +#define R_PPC_IRELATIVE 248 + + +#define R_PPC_REL16 249 +#define R_PPC_REL16_LO 250 +#define R_PPC_REL16_HI 251 +#define R_PPC_REL16_HA 252 + + + +#define R_PPC_TOC16 255 + + +#define DT_PPC_GOT (DT_LOPROC + 0) +#define DT_PPC_OPT (DT_LOPROC + 1) +#define DT_PPC_NUM 2 + +#define PPC_OPT_TLS 1 + + +#define R_PPC64_NONE R_PPC_NONE +#define R_PPC64_ADDR32 R_PPC_ADDR32 +#define R_PPC64_ADDR24 R_PPC_ADDR24 +#define R_PPC64_ADDR16 R_PPC_ADDR16 +#define R_PPC64_ADDR16_LO R_PPC_ADDR16_LO +#define R_PPC64_ADDR16_HI R_PPC_ADDR16_HI +#define R_PPC64_ADDR16_HA R_PPC_ADDR16_HA +#define R_PPC64_ADDR14 R_PPC_ADDR14 +#define R_PPC64_ADDR14_BRTAKEN R_PPC_ADDR14_BRTAKEN +#define R_PPC64_ADDR14_BRNTAKEN R_PPC_ADDR14_BRNTAKEN +#define R_PPC64_REL24 R_PPC_REL24 +#define R_PPC64_REL14 R_PPC_REL14 +#define R_PPC64_REL14_BRTAKEN R_PPC_REL14_BRTAKEN +#define R_PPC64_REL14_BRNTAKEN R_PPC_REL14_BRNTAKEN +#define R_PPC64_GOT16 R_PPC_GOT16 +#define R_PPC64_GOT16_LO R_PPC_GOT16_LO +#define R_PPC64_GOT16_HI R_PPC_GOT16_HI +#define R_PPC64_GOT16_HA R_PPC_GOT16_HA + +#define R_PPC64_COPY R_PPC_COPY +#define R_PPC64_GLOB_DAT R_PPC_GLOB_DAT +#define R_PPC64_JMP_SLOT R_PPC_JMP_SLOT +#define R_PPC64_RELATIVE R_PPC_RELATIVE + +#define R_PPC64_UADDR32 R_PPC_UADDR32 +#define R_PPC64_UADDR16 R_PPC_UADDR16 +#define R_PPC64_REL32 R_PPC_REL32 +#define R_PPC64_PLT32 R_PPC_PLT32 +#define R_PPC64_PLTREL32 R_PPC_PLTREL32 +#define R_PPC64_PLT16_LO R_PPC_PLT16_LO +#define R_PPC64_PLT16_HI R_PPC_PLT16_HI +#define R_PPC64_PLT16_HA R_PPC_PLT16_HA + +#define R_PPC64_SECTOFF R_PPC_SECTOFF +#define R_PPC64_SECTOFF_LO R_PPC_SECTOFF_LO +#define R_PPC64_SECTOFF_HI R_PPC_SECTOFF_HI +#define R_PPC64_SECTOFF_HA R_PPC_SECTOFF_HA +#define R_PPC64_ADDR30 37 +#define R_PPC64_ADDR64 38 +#define R_PPC64_ADDR16_HIGHER 39 +#define R_PPC64_ADDR16_HIGHERA 40 +#define R_PPC64_ADDR16_HIGHEST 41 +#define R_PPC64_ADDR16_HIGHESTA 42 +#define R_PPC64_UADDR64 43 +#define R_PPC64_REL64 44 +#define R_PPC64_PLT64 45 +#define R_PPC64_PLTREL64 46 +#define R_PPC64_TOC16 47 +#define R_PPC64_TOC16_LO 48 +#define R_PPC64_TOC16_HI 49 +#define R_PPC64_TOC16_HA 50 +#define R_PPC64_TOC 51 +#define R_PPC64_PLTGOT16 52 +#define R_PPC64_PLTGOT16_LO 53 +#define R_PPC64_PLTGOT16_HI 54 +#define R_PPC64_PLTGOT16_HA 55 + +#define R_PPC64_ADDR16_DS 56 +#define R_PPC64_ADDR16_LO_DS 57 +#define R_PPC64_GOT16_DS 58 +#define R_PPC64_GOT16_LO_DS 59 +#define R_PPC64_PLT16_LO_DS 60 +#define R_PPC64_SECTOFF_DS 61 +#define R_PPC64_SECTOFF_LO_DS 62 +#define R_PPC64_TOC16_DS 63 +#define R_PPC64_TOC16_LO_DS 64 +#define R_PPC64_PLTGOT16_DS 65 +#define R_PPC64_PLTGOT16_LO_DS 66 + + +#define R_PPC64_TLS 67 +#define R_PPC64_DTPMOD64 68 +#define R_PPC64_TPREL16 69 +#define R_PPC64_TPREL16_LO 70 +#define R_PPC64_TPREL16_HI 71 +#define R_PPC64_TPREL16_HA 72 +#define R_PPC64_TPREL64 73 +#define R_PPC64_DTPREL16 74 +#define R_PPC64_DTPREL16_LO 75 +#define R_PPC64_DTPREL16_HI 76 +#define R_PPC64_DTPREL16_HA 77 +#define R_PPC64_DTPREL64 78 +#define R_PPC64_GOT_TLSGD16 79 +#define R_PPC64_GOT_TLSGD16_LO 80 +#define R_PPC64_GOT_TLSGD16_HI 81 +#define R_PPC64_GOT_TLSGD16_HA 82 +#define R_PPC64_GOT_TLSLD16 83 +#define R_PPC64_GOT_TLSLD16_LO 84 +#define R_PPC64_GOT_TLSLD16_HI 85 +#define R_PPC64_GOT_TLSLD16_HA 86 +#define R_PPC64_GOT_TPREL16_DS 87 +#define R_PPC64_GOT_TPREL16_LO_DS 88 +#define R_PPC64_GOT_TPREL16_HI 89 +#define R_PPC64_GOT_TPREL16_HA 90 +#define R_PPC64_GOT_DTPREL16_DS 91 +#define R_PPC64_GOT_DTPREL16_LO_DS 92 +#define R_PPC64_GOT_DTPREL16_HI 93 +#define R_PPC64_GOT_DTPREL16_HA 94 +#define R_PPC64_TPREL16_DS 95 +#define R_PPC64_TPREL16_LO_DS 96 +#define R_PPC64_TPREL16_HIGHER 97 +#define R_PPC64_TPREL16_HIGHERA 98 +#define R_PPC64_TPREL16_HIGHEST 99 +#define R_PPC64_TPREL16_HIGHESTA 100 +#define R_PPC64_DTPREL16_DS 101 +#define R_PPC64_DTPREL16_LO_DS 102 +#define R_PPC64_DTPREL16_HIGHER 103 +#define R_PPC64_DTPREL16_HIGHERA 104 +#define R_PPC64_DTPREL16_HIGHEST 105 +#define R_PPC64_DTPREL16_HIGHESTA 106 +#define R_PPC64_TLSGD 107 +#define R_PPC64_TLSLD 108 +#define R_PPC64_TOCSAVE 109 +#define R_PPC64_ADDR16_HIGH 110 +#define R_PPC64_ADDR16_HIGHA 111 +#define R_PPC64_TPREL16_HIGH 112 +#define R_PPC64_TPREL16_HIGHA 113 +#define R_PPC64_DTPREL16_HIGH 114 +#define R_PPC64_DTPREL16_HIGHA 115 + + +#define R_PPC64_JMP_IREL 247 +#define R_PPC64_IRELATIVE 248 +#define R_PPC64_REL16 249 +#define R_PPC64_REL16_LO 250 +#define R_PPC64_REL16_HI 251 +#define R_PPC64_REL16_HA 252 + +#define EF_PPC64_ABI 3 + +#define DT_PPC64_GLINK (DT_LOPROC + 0) +#define DT_PPC64_OPD (DT_LOPROC + 1) +#define DT_PPC64_OPDSZ (DT_LOPROC + 2) +#define DT_PPC64_OPT (DT_LOPROC + 3) +#define DT_PPC64_NUM 4 + +#define PPC64_OPT_TLS 1 +#define PPC64_OPT_MULTI_TOC 2 + +#define STO_PPC64_LOCAL_BIT 5 +#define STO_PPC64_LOCAL_MASK 0xe0 +#define PPC64_LOCAL_ENTRY_OFFSET(x) (1 << (((x)&0xe0)>>5) & 0xfc) + + +#define EF_ARM_RELEXEC 0x01 +#define EF_ARM_HASENTRY 0x02 +#define EF_ARM_INTERWORK 0x04 +#define EF_ARM_APCS_26 0x08 +#define EF_ARM_APCS_FLOAT 0x10 +#define EF_ARM_PIC 0x20 +#define EF_ARM_ALIGN8 0x40 +#define EF_ARM_NEW_ABI 0x80 +#define EF_ARM_OLD_ABI 0x100 +#define EF_ARM_SOFT_FLOAT 0x200 +#define EF_ARM_VFP_FLOAT 0x400 +#define EF_ARM_MAVERICK_FLOAT 0x800 + +#define EF_ARM_ABI_FLOAT_SOFT 0x200 +#define EF_ARM_ABI_FLOAT_HARD 0x400 + + +#define EF_ARM_SYMSARESORTED 0x04 +#define EF_ARM_DYNSYMSUSESEGIDX 0x08 +#define EF_ARM_MAPSYMSFIRST 0x10 +#define EF_ARM_EABIMASK 0XFF000000 + + +#define EF_ARM_BE8 0x00800000 +#define EF_ARM_LE8 0x00400000 + +#define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK) +#define EF_ARM_EABI_UNKNOWN 0x00000000 +#define EF_ARM_EABI_VER1 0x01000000 +#define EF_ARM_EABI_VER2 0x02000000 +#define EF_ARM_EABI_VER3 0x03000000 +#define EF_ARM_EABI_VER4 0x04000000 +#define EF_ARM_EABI_VER5 0x05000000 + + +#define STT_ARM_TFUNC STT_LOPROC +#define STT_ARM_16BIT STT_HIPROC + + +#define SHF_ARM_ENTRYSECT 0x10000000 +#define SHF_ARM_COMDEF 0x80000000 + + + +#define PF_ARM_SB 0x10000000 + +#define PF_ARM_PI 0x20000000 +#define PF_ARM_ABS 0x40000000 + + +#define PT_ARM_EXIDX (PT_LOPROC + 1) + + +#define SHT_ARM_EXIDX (SHT_LOPROC + 1) +#define SHT_ARM_PREEMPTMAP (SHT_LOPROC + 2) +#define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3) + +#define R_AARCH64_NONE 0 +#define R_AARCH64_P32_ABS32 1 +#define R_AARCH64_P32_COPY 180 +#define R_AARCH64_P32_GLOB_DAT 181 +#define R_AARCH64_P32_JUMP_SLOT 182 +#define R_AARCH64_P32_RELATIVE 183 +#define R_AARCH64_P32_TLS_DTPMOD 184 +#define R_AARCH64_P32_TLS_DTPREL 185 +#define R_AARCH64_P32_TLS_TPREL 186 +#define R_AARCH64_P32_TLSDESC 187 +#define R_AARCH64_P32_IRELATIVE 188 +#define R_AARCH64_ABS64 257 +#define R_AARCH64_ABS32 258 +#define R_AARCH64_ABS16 259 +#define R_AARCH64_PREL64 260 +#define R_AARCH64_PREL32 261 +#define R_AARCH64_PREL16 262 +#define R_AARCH64_MOVW_UABS_G0 263 +#define R_AARCH64_MOVW_UABS_G0_NC 264 +#define R_AARCH64_MOVW_UABS_G1 265 +#define R_AARCH64_MOVW_UABS_G1_NC 266 +#define R_AARCH64_MOVW_UABS_G2 267 +#define R_AARCH64_MOVW_UABS_G2_NC 268 +#define R_AARCH64_MOVW_UABS_G3 269 +#define R_AARCH64_MOVW_SABS_G0 270 +#define R_AARCH64_MOVW_SABS_G1 271 +#define R_AARCH64_MOVW_SABS_G2 272 +#define R_AARCH64_LD_PREL_LO19 273 +#define R_AARCH64_ADR_PREL_LO21 274 +#define R_AARCH64_ADR_PREL_PG_HI21 275 +#define R_AARCH64_ADR_PREL_PG_HI21_NC 276 +#define R_AARCH64_ADD_ABS_LO12_NC 277 +#define R_AARCH64_LDST8_ABS_LO12_NC 278 +#define R_AARCH64_TSTBR14 279 +#define R_AARCH64_CONDBR19 280 +#define R_AARCH64_JUMP26 282 +#define R_AARCH64_CALL26 283 +#define R_AARCH64_LDST16_ABS_LO12_NC 284 +#define R_AARCH64_LDST32_ABS_LO12_NC 285 +#define R_AARCH64_LDST64_ABS_LO12_NC 286 +#define R_AARCH64_MOVW_PREL_G0 287 +#define R_AARCH64_MOVW_PREL_G0_NC 288 +#define R_AARCH64_MOVW_PREL_G1 289 +#define R_AARCH64_MOVW_PREL_G1_NC 290 +#define R_AARCH64_MOVW_PREL_G2 291 +#define R_AARCH64_MOVW_PREL_G2_NC 292 +#define R_AARCH64_MOVW_PREL_G3 293 +#define R_AARCH64_LDST128_ABS_LO12_NC 299 +#define R_AARCH64_MOVW_GOTOFF_G0 300 +#define R_AARCH64_MOVW_GOTOFF_G0_NC 301 +#define R_AARCH64_MOVW_GOTOFF_G1 302 +#define R_AARCH64_MOVW_GOTOFF_G1_NC 303 +#define R_AARCH64_MOVW_GOTOFF_G2 304 +#define R_AARCH64_MOVW_GOTOFF_G2_NC 305 +#define R_AARCH64_MOVW_GOTOFF_G3 306 +#define R_AARCH64_GOTREL64 307 +#define R_AARCH64_GOTREL32 308 +#define R_AARCH64_GOT_LD_PREL19 309 +#define R_AARCH64_LD64_GOTOFF_LO15 310 +#define R_AARCH64_ADR_GOT_PAGE 311 +#define R_AARCH64_LD64_GOT_LO12_NC 312 +#define R_AARCH64_LD64_GOTPAGE_LO15 313 +#define R_AARCH64_TLSGD_ADR_PREL21 512 +#define R_AARCH64_TLSGD_ADR_PAGE21 513 +#define R_AARCH64_TLSGD_ADD_LO12_NC 514 +#define R_AARCH64_TLSGD_MOVW_G1 515 +#define R_AARCH64_TLSGD_MOVW_G0_NC 516 +#define R_AARCH64_TLSLD_ADR_PREL21 517 +#define R_AARCH64_TLSLD_ADR_PAGE21 518 +#define R_AARCH64_TLSLD_ADD_LO12_NC 519 +#define R_AARCH64_TLSLD_MOVW_G1 520 +#define R_AARCH64_TLSLD_MOVW_G0_NC 521 +#define R_AARCH64_TLSLD_LD_PREL19 522 +#define R_AARCH64_TLSLD_MOVW_DTPREL_G2 523 +#define R_AARCH64_TLSLD_MOVW_DTPREL_G1 524 +#define R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC 525 +#define R_AARCH64_TLSLD_MOVW_DTPREL_G0 526 +#define R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC 527 +#define R_AARCH64_TLSLD_ADD_DTPREL_HI12 528 +#define R_AARCH64_TLSLD_ADD_DTPREL_LO12 529 +#define R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC 530 +#define R_AARCH64_TLSLD_LDST8_DTPREL_LO12 531 +#define R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC 532 +#define R_AARCH64_TLSLD_LDST16_DTPREL_LO12 533 +#define R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC 534 +#define R_AARCH64_TLSLD_LDST32_DTPREL_LO12 535 +#define R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC 536 +#define R_AARCH64_TLSLD_LDST64_DTPREL_LO12 537 +#define R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC 538 +#define R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 539 +#define R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC 540 +#define R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 541 +#define R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC 542 +#define R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 543 +#define R_AARCH64_TLSLE_MOVW_TPREL_G2 544 +#define R_AARCH64_TLSLE_MOVW_TPREL_G1 545 +#define R_AARCH64_TLSLE_MOVW_TPREL_G1_NC 546 +#define R_AARCH64_TLSLE_MOVW_TPREL_G0 547 +#define R_AARCH64_TLSLE_MOVW_TPREL_G0_NC 548 +#define R_AARCH64_TLSLE_ADD_TPREL_HI12 549 +#define R_AARCH64_TLSLE_ADD_TPREL_LO12 550 +#define R_AARCH64_TLSLE_ADD_TPREL_LO12_NC 551 +#define R_AARCH64_TLSLE_LDST8_TPREL_LO12 552 +#define R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC 553 +#define R_AARCH64_TLSLE_LDST16_TPREL_LO12 554 +#define R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC 555 +#define R_AARCH64_TLSLE_LDST32_TPREL_LO12 556 +#define R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC 557 +#define R_AARCH64_TLSLE_LDST64_TPREL_LO12 558 +#define R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC 559 +#define R_AARCH64_TLSDESC_LD_PREL19 560 +#define R_AARCH64_TLSDESC_ADR_PREL21 561 +#define R_AARCH64_TLSDESC_ADR_PAGE21 562 +#define R_AARCH64_TLSDESC_LD64_LO12 563 +#define R_AARCH64_TLSDESC_ADD_LO12 564 +#define R_AARCH64_TLSDESC_OFF_G1 565 +#define R_AARCH64_TLSDESC_OFF_G0_NC 566 +#define R_AARCH64_TLSDESC_LDR 567 +#define R_AARCH64_TLSDESC_ADD 568 +#define R_AARCH64_TLSDESC_CALL 569 +#define R_AARCH64_TLSLE_LDST128_TPREL_LO12 570 +#define R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC 571 +#define R_AARCH64_TLSLD_LDST128_DTPREL_LO12 572 +#define R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC 573 +#define R_AARCH64_COPY 1024 +#define R_AARCH64_GLOB_DAT 1025 +#define R_AARCH64_JUMP_SLOT 1026 +#define R_AARCH64_RELATIVE 1027 +#define R_AARCH64_TLS_DTPMOD 1028 +#define R_AARCH64_TLS_DTPMOD64 1028 +#define R_AARCH64_TLS_DTPREL 1029 +#define R_AARCH64_TLS_DTPREL64 1029 +#define R_AARCH64_TLS_TPREL 1030 +#define R_AARCH64_TLS_TPREL64 1030 +#define R_AARCH64_TLSDESC 1031 + + +#define R_ARM_NONE 0 +#define R_ARM_PC24 1 +#define R_ARM_ABS32 2 +#define R_ARM_REL32 3 +#define R_ARM_PC13 4 +#define R_ARM_ABS16 5 +#define R_ARM_ABS12 6 +#define R_ARM_THM_ABS5 7 +#define R_ARM_ABS8 8 +#define R_ARM_SBREL32 9 +#define R_ARM_THM_PC22 10 +#define R_ARM_THM_PC8 11 +#define R_ARM_AMP_VCALL9 12 +#define R_ARM_TLS_DESC 13 +#define R_ARM_THM_SWI8 14 +#define R_ARM_XPC25 15 +#define R_ARM_THM_XPC22 16 +#define R_ARM_TLS_DTPMOD32 17 +#define R_ARM_TLS_DTPOFF32 18 +#define R_ARM_TLS_TPOFF32 19 +#define R_ARM_COPY 20 +#define R_ARM_GLOB_DAT 21 +#define R_ARM_JUMP_SLOT 22 +#define R_ARM_RELATIVE 23 +#define R_ARM_GOTOFF 24 +#define R_ARM_GOTPC 25 +#define R_ARM_GOT32 26 +#define R_ARM_PLT32 27 +#define R_ARM_CALL 28 +#define R_ARM_JUMP24 29 +#define R_ARM_THM_JUMP24 30 +#define R_ARM_BASE_ABS 31 +#define R_ARM_ALU_PCREL_7_0 32 +#define R_ARM_ALU_PCREL_15_8 33 +#define R_ARM_ALU_PCREL_23_15 34 +#define R_ARM_LDR_SBREL_11_0 35 +#define R_ARM_ALU_SBREL_19_12 36 +#define R_ARM_ALU_SBREL_27_20 37 +#define R_ARM_TARGET1 38 +#define R_ARM_SBREL31 39 +#define R_ARM_V4BX 40 +#define R_ARM_TARGET2 41 +#define R_ARM_PREL31 42 +#define R_ARM_MOVW_ABS_NC 43 +#define R_ARM_MOVT_ABS 44 +#define R_ARM_MOVW_PREL_NC 45 +#define R_ARM_MOVT_PREL 46 +#define R_ARM_THM_MOVW_ABS_NC 47 +#define R_ARM_THM_MOVT_ABS 48 +#define R_ARM_THM_MOVW_PREL_NC 49 +#define R_ARM_THM_MOVT_PREL 50 +#define R_ARM_THM_JUMP19 51 +#define R_ARM_THM_JUMP6 52 +#define R_ARM_THM_ALU_PREL_11_0 53 +#define R_ARM_THM_PC12 54 +#define R_ARM_ABS32_NOI 55 +#define R_ARM_REL32_NOI 56 +#define R_ARM_ALU_PC_G0_NC 57 +#define R_ARM_ALU_PC_G0 58 +#define R_ARM_ALU_PC_G1_NC 59 +#define R_ARM_ALU_PC_G1 60 +#define R_ARM_ALU_PC_G2 61 +#define R_ARM_LDR_PC_G1 62 +#define R_ARM_LDR_PC_G2 63 +#define R_ARM_LDRS_PC_G0 64 +#define R_ARM_LDRS_PC_G1 65 +#define R_ARM_LDRS_PC_G2 66 +#define R_ARM_LDC_PC_G0 67 +#define R_ARM_LDC_PC_G1 68 +#define R_ARM_LDC_PC_G2 69 +#define R_ARM_ALU_SB_G0_NC 70 +#define R_ARM_ALU_SB_G0 71 +#define R_ARM_ALU_SB_G1_NC 72 +#define R_ARM_ALU_SB_G1 73 +#define R_ARM_ALU_SB_G2 74 +#define R_ARM_LDR_SB_G0 75 +#define R_ARM_LDR_SB_G1 76 +#define R_ARM_LDR_SB_G2 77 +#define R_ARM_LDRS_SB_G0 78 +#define R_ARM_LDRS_SB_G1 79 +#define R_ARM_LDRS_SB_G2 80 +#define R_ARM_LDC_SB_G0 81 +#define R_ARM_LDC_SB_G1 82 +#define R_ARM_LDC_SB_G2 83 +#define R_ARM_MOVW_BREL_NC 84 +#define R_ARM_MOVT_BREL 85 +#define R_ARM_MOVW_BREL 86 +#define R_ARM_THM_MOVW_BREL_NC 87 +#define R_ARM_THM_MOVT_BREL 88 +#define R_ARM_THM_MOVW_BREL 89 +#define R_ARM_TLS_GOTDESC 90 +#define R_ARM_TLS_CALL 91 +#define R_ARM_TLS_DESCSEQ 92 +#define R_ARM_THM_TLS_CALL 93 +#define R_ARM_PLT32_ABS 94 +#define R_ARM_GOT_ABS 95 +#define R_ARM_GOT_PREL 96 +#define R_ARM_GOT_BREL12 97 +#define R_ARM_GOTOFF12 98 +#define R_ARM_GOTRELAX 99 +#define R_ARM_GNU_VTENTRY 100 +#define R_ARM_GNU_VTINHERIT 101 +#define R_ARM_THM_PC11 102 +#define R_ARM_THM_PC9 103 +#define R_ARM_TLS_GD32 104 + +#define R_ARM_TLS_LDM32 105 + +#define R_ARM_TLS_LDO32 106 + +#define R_ARM_TLS_IE32 107 + +#define R_ARM_TLS_LE32 108 +#define R_ARM_TLS_LDO12 109 +#define R_ARM_TLS_LE12 110 +#define R_ARM_TLS_IE12GP 111 +#define R_ARM_ME_TOO 128 +#define R_ARM_THM_TLS_DESCSEQ 129 +#define R_ARM_THM_TLS_DESCSEQ16 129 +#define R_ARM_THM_TLS_DESCSEQ32 130 +#define R_ARM_THM_GOT_BREL12 131 +#define R_ARM_IRELATIVE 160 +#define R_ARM_RXPC25 249 +#define R_ARM_RSBREL32 250 +#define R_ARM_THM_RPC22 251 +#define R_ARM_RREL32 252 +#define R_ARM_RABS22 253 +#define R_ARM_RPC24 254 +#define R_ARM_RBASE 255 + +#define R_ARM_NUM 256 + + + + +#define EF_IA_64_MASKOS 0x0000000f +#define EF_IA_64_ABI64 0x00000010 +#define EF_IA_64_ARCH 0xff000000 + + +#define PT_IA_64_ARCHEXT (PT_LOPROC + 0) +#define PT_IA_64_UNWIND (PT_LOPROC + 1) +#define PT_IA_64_HP_OPT_ANOT (PT_LOOS + 0x12) +#define PT_IA_64_HP_HSL_ANOT (PT_LOOS + 0x13) +#define PT_IA_64_HP_STACK (PT_LOOS + 0x14) + + +#define PF_IA_64_NORECOV 0x80000000 + + +#define SHT_IA_64_EXT (SHT_LOPROC + 0) +#define SHT_IA_64_UNWIND (SHT_LOPROC + 1) + + +#define SHF_IA_64_SHORT 0x10000000 +#define SHF_IA_64_NORECOV 0x20000000 + + +#define DT_IA_64_PLT_RESERVE (DT_LOPROC + 0) +#define DT_IA_64_NUM 1 + + +#define R_IA64_NONE 0x00 +#define R_IA64_IMM14 0x21 +#define R_IA64_IMM22 0x22 +#define R_IA64_IMM64 0x23 +#define R_IA64_DIR32MSB 0x24 +#define R_IA64_DIR32LSB 0x25 +#define R_IA64_DIR64MSB 0x26 +#define R_IA64_DIR64LSB 0x27 +#define R_IA64_GPREL22 0x2a +#define R_IA64_GPREL64I 0x2b +#define R_IA64_GPREL32MSB 0x2c +#define R_IA64_GPREL32LSB 0x2d +#define R_IA64_GPREL64MSB 0x2e +#define R_IA64_GPREL64LSB 0x2f +#define R_IA64_LTOFF22 0x32 +#define R_IA64_LTOFF64I 0x33 +#define R_IA64_PLTOFF22 0x3a +#define R_IA64_PLTOFF64I 0x3b +#define R_IA64_PLTOFF64MSB 0x3e +#define R_IA64_PLTOFF64LSB 0x3f +#define R_IA64_FPTR64I 0x43 +#define R_IA64_FPTR32MSB 0x44 +#define R_IA64_FPTR32LSB 0x45 +#define R_IA64_FPTR64MSB 0x46 +#define R_IA64_FPTR64LSB 0x47 +#define R_IA64_PCREL60B 0x48 +#define R_IA64_PCREL21B 0x49 +#define R_IA64_PCREL21M 0x4a +#define R_IA64_PCREL21F 0x4b +#define R_IA64_PCREL32MSB 0x4c +#define R_IA64_PCREL32LSB 0x4d +#define R_IA64_PCREL64MSB 0x4e +#define R_IA64_PCREL64LSB 0x4f +#define R_IA64_LTOFF_FPTR22 0x52 +#define R_IA64_LTOFF_FPTR64I 0x53 +#define R_IA64_LTOFF_FPTR32MSB 0x54 +#define R_IA64_LTOFF_FPTR32LSB 0x55 +#define R_IA64_LTOFF_FPTR64MSB 0x56 +#define R_IA64_LTOFF_FPTR64LSB 0x57 +#define R_IA64_SEGREL32MSB 0x5c +#define R_IA64_SEGREL32LSB 0x5d +#define R_IA64_SEGREL64MSB 0x5e +#define R_IA64_SEGREL64LSB 0x5f +#define R_IA64_SECREL32MSB 0x64 +#define R_IA64_SECREL32LSB 0x65 +#define R_IA64_SECREL64MSB 0x66 +#define R_IA64_SECREL64LSB 0x67 +#define R_IA64_REL32MSB 0x6c +#define R_IA64_REL32LSB 0x6d +#define R_IA64_REL64MSB 0x6e +#define R_IA64_REL64LSB 0x6f +#define R_IA64_LTV32MSB 0x74 +#define R_IA64_LTV32LSB 0x75 +#define R_IA64_LTV64MSB 0x76 +#define R_IA64_LTV64LSB 0x77 +#define R_IA64_PCREL21BI 0x79 +#define R_IA64_PCREL22 0x7a +#define R_IA64_PCREL64I 0x7b +#define R_IA64_IPLTMSB 0x80 +#define R_IA64_IPLTLSB 0x81 +#define R_IA64_COPY 0x84 +#define R_IA64_SUB 0x85 +#define R_IA64_LTOFF22X 0x86 +#define R_IA64_LDXMOV 0x87 +#define R_IA64_TPREL14 0x91 +#define R_IA64_TPREL22 0x92 +#define R_IA64_TPREL64I 0x93 +#define R_IA64_TPREL64MSB 0x96 +#define R_IA64_TPREL64LSB 0x97 +#define R_IA64_LTOFF_TPREL22 0x9a +#define R_IA64_DTPMOD64MSB 0xa6 +#define R_IA64_DTPMOD64LSB 0xa7 +#define R_IA64_LTOFF_DTPMOD22 0xaa +#define R_IA64_DTPREL14 0xb1 +#define R_IA64_DTPREL22 0xb2 +#define R_IA64_DTPREL64I 0xb3 +#define R_IA64_DTPREL32MSB 0xb4 +#define R_IA64_DTPREL32LSB 0xb5 +#define R_IA64_DTPREL64MSB 0xb6 +#define R_IA64_DTPREL64LSB 0xb7 +#define R_IA64_LTOFF_DTPREL22 0xba + + +#define EF_SH_MACH_MASK 0x1f +#define EF_SH_UNKNOWN 0x0 +#define EF_SH1 0x1 +#define EF_SH2 0x2 +#define EF_SH3 0x3 +#define EF_SH_DSP 0x4 +#define EF_SH3_DSP 0x5 +#define EF_SH4AL_DSP 0x6 +#define EF_SH3E 0x8 +#define EF_SH4 0x9 +#define EF_SH2E 0xb +#define EF_SH4A 0xc +#define EF_SH2A 0xd +#define EF_SH4_NOFPU 0x10 +#define EF_SH4A_NOFPU 0x11 +#define EF_SH4_NOMMU_NOFPU 0x12 +#define EF_SH2A_NOFPU 0x13 +#define EF_SH3_NOMMU 0x14 +#define EF_SH2A_SH4_NOFPU 0x15 +#define EF_SH2A_SH3_NOFPU 0x16 +#define EF_SH2A_SH4 0x17 +#define EF_SH2A_SH3E 0x18 + +#define R_SH_NONE 0 +#define R_SH_DIR32 1 +#define R_SH_REL32 2 +#define R_SH_DIR8WPN 3 +#define R_SH_IND12W 4 +#define R_SH_DIR8WPL 5 +#define R_SH_DIR8WPZ 6 +#define R_SH_DIR8BP 7 +#define R_SH_DIR8W 8 +#define R_SH_DIR8L 9 +#define R_SH_SWITCH16 25 +#define R_SH_SWITCH32 26 +#define R_SH_USES 27 +#define R_SH_COUNT 28 +#define R_SH_ALIGN 29 +#define R_SH_CODE 30 +#define R_SH_DATA 31 +#define R_SH_LABEL 32 +#define R_SH_SWITCH8 33 +#define R_SH_GNU_VTINHERIT 34 +#define R_SH_GNU_VTENTRY 35 +#define R_SH_TLS_GD_32 144 +#define R_SH_TLS_LD_32 145 +#define R_SH_TLS_LDO_32 146 +#define R_SH_TLS_IE_32 147 +#define R_SH_TLS_LE_32 148 +#define R_SH_TLS_DTPMOD32 149 +#define R_SH_TLS_DTPOFF32 150 +#define R_SH_TLS_TPOFF32 151 +#define R_SH_GOT32 160 +#define R_SH_PLT32 161 +#define R_SH_COPY 162 +#define R_SH_GLOB_DAT 163 +#define R_SH_JMP_SLOT 164 +#define R_SH_RELATIVE 165 +#define R_SH_GOTOFF 166 +#define R_SH_GOTPC 167 +#define R_SH_GOT20 201 +#define R_SH_GOTOFF20 202 +#define R_SH_GOTFUNCDESC 203 +#define R_SH_GOTFUNCDEST20 204 +#define R_SH_GOTOFFFUNCDESC 205 +#define R_SH_GOTOFFFUNCDEST20 206 +#define R_SH_FUNCDESC 207 +#define R_SH_FUNCDESC_VALUE 208 + +#define R_SH_NUM 256 + + + +#define R_390_NONE 0 +#define R_390_8 1 +#define R_390_12 2 +#define R_390_16 3 +#define R_390_32 4 +#define R_390_PC32 5 +#define R_390_GOT12 6 +#define R_390_GOT32 7 +#define R_390_PLT32 8 +#define R_390_COPY 9 +#define R_390_GLOB_DAT 10 +#define R_390_JMP_SLOT 11 +#define R_390_RELATIVE 12 +#define R_390_GOTOFF32 13 +#define R_390_GOTPC 14 +#define R_390_GOT16 15 +#define R_390_PC16 16 +#define R_390_PC16DBL 17 +#define R_390_PLT16DBL 18 +#define R_390_PC32DBL 19 +#define R_390_PLT32DBL 20 +#define R_390_GOTPCDBL 21 +#define R_390_64 22 +#define R_390_PC64 23 +#define R_390_GOT64 24 +#define R_390_PLT64 25 +#define R_390_GOTENT 26 +#define R_390_GOTOFF16 27 +#define R_390_GOTOFF64 28 +#define R_390_GOTPLT12 29 +#define R_390_GOTPLT16 30 +#define R_390_GOTPLT32 31 +#define R_390_GOTPLT64 32 +#define R_390_GOTPLTENT 33 +#define R_390_PLTOFF16 34 +#define R_390_PLTOFF32 35 +#define R_390_PLTOFF64 36 +#define R_390_TLS_LOAD 37 +#define R_390_TLS_GDCALL 38 + +#define R_390_TLS_LDCALL 39 + +#define R_390_TLS_GD32 40 + +#define R_390_TLS_GD64 41 + +#define R_390_TLS_GOTIE12 42 + +#define R_390_TLS_GOTIE32 43 + +#define R_390_TLS_GOTIE64 44 + +#define R_390_TLS_LDM32 45 + +#define R_390_TLS_LDM64 46 + +#define R_390_TLS_IE32 47 + +#define R_390_TLS_IE64 48 + +#define R_390_TLS_IEENT 49 + +#define R_390_TLS_LE32 50 + +#define R_390_TLS_LE64 51 + +#define R_390_TLS_LDO32 52 + +#define R_390_TLS_LDO64 53 + +#define R_390_TLS_DTPMOD 54 +#define R_390_TLS_DTPOFF 55 +#define R_390_TLS_TPOFF 56 + +#define R_390_20 57 +#define R_390_GOT20 58 +#define R_390_GOTPLT20 59 +#define R_390_TLS_GOTIE20 60 + + +#define R_390_NUM 61 + + + +#define R_CRIS_NONE 0 +#define R_CRIS_8 1 +#define R_CRIS_16 2 +#define R_CRIS_32 3 +#define R_CRIS_8_PCREL 4 +#define R_CRIS_16_PCREL 5 +#define R_CRIS_32_PCREL 6 +#define R_CRIS_GNU_VTINHERIT 7 +#define R_CRIS_GNU_VTENTRY 8 +#define R_CRIS_COPY 9 +#define R_CRIS_GLOB_DAT 10 +#define R_CRIS_JUMP_SLOT 11 +#define R_CRIS_RELATIVE 12 +#define R_CRIS_16_GOT 13 +#define R_CRIS_32_GOT 14 +#define R_CRIS_16_GOTPLT 15 +#define R_CRIS_32_GOTPLT 16 +#define R_CRIS_32_GOTREL 17 +#define R_CRIS_32_PLT_GOTREL 18 +#define R_CRIS_32_PLT_PCREL 19 + +#define R_CRIS_NUM 20 + + + +#define R_X86_64_NONE 0 +#define R_X86_64_64 1 +#define R_X86_64_PC32 2 +#define R_X86_64_GOT32 3 +#define R_X86_64_PLT32 4 +#define R_X86_64_COPY 5 +#define R_X86_64_GLOB_DAT 6 +#define R_X86_64_JUMP_SLOT 7 +#define R_X86_64_RELATIVE 8 +#define R_X86_64_GOTPCREL 9 + +#define R_X86_64_32 10 +#define R_X86_64_32S 11 +#define R_X86_64_16 12 +#define R_X86_64_PC16 13 +#define R_X86_64_8 14 +#define R_X86_64_PC8 15 +#define R_X86_64_DTPMOD64 16 +#define R_X86_64_DTPOFF64 17 +#define R_X86_64_TPOFF64 18 +#define R_X86_64_TLSGD 19 + +#define R_X86_64_TLSLD 20 + +#define R_X86_64_DTPOFF32 21 +#define R_X86_64_GOTTPOFF 22 + +#define R_X86_64_TPOFF32 23 +#define R_X86_64_PC64 24 +#define R_X86_64_GOTOFF64 25 +#define R_X86_64_GOTPC32 26 +#define R_X86_64_GOT64 27 +#define R_X86_64_GOTPCREL64 28 +#define R_X86_64_GOTPC64 29 +#define R_X86_64_GOTPLT64 30 +#define R_X86_64_PLTOFF64 31 +#define R_X86_64_SIZE32 32 +#define R_X86_64_SIZE64 33 + +#define R_X86_64_GOTPC32_TLSDESC 34 +#define R_X86_64_TLSDESC_CALL 35 + +#define R_X86_64_TLSDESC 36 +#define R_X86_64_IRELATIVE 37 +#define R_X86_64_RELATIVE64 38 +#define R_X86_64_GOTPCRELX 41 +#define R_X86_64_REX_GOTPCRELX 42 +#define R_X86_64_NUM 43 + + + +#define R_MN10300_NONE 0 +#define R_MN10300_32 1 +#define R_MN10300_16 2 +#define R_MN10300_8 3 +#define R_MN10300_PCREL32 4 +#define R_MN10300_PCREL16 5 +#define R_MN10300_PCREL8 6 +#define R_MN10300_GNU_VTINHERIT 7 +#define R_MN10300_GNU_VTENTRY 8 +#define R_MN10300_24 9 +#define R_MN10300_GOTPC32 10 +#define R_MN10300_GOTPC16 11 +#define R_MN10300_GOTOFF32 12 +#define R_MN10300_GOTOFF24 13 +#define R_MN10300_GOTOFF16 14 +#define R_MN10300_PLT32 15 +#define R_MN10300_PLT16 16 +#define R_MN10300_GOT32 17 +#define R_MN10300_GOT24 18 +#define R_MN10300_GOT16 19 +#define R_MN10300_COPY 20 +#define R_MN10300_GLOB_DAT 21 +#define R_MN10300_JMP_SLOT 22 +#define R_MN10300_RELATIVE 23 + +#define R_MN10300_NUM 24 + + + +#define R_M32R_NONE 0 +#define R_M32R_16 1 +#define R_M32R_32 2 +#define R_M32R_24 3 +#define R_M32R_10_PCREL 4 +#define R_M32R_18_PCREL 5 +#define R_M32R_26_PCREL 6 +#define R_M32R_HI16_ULO 7 +#define R_M32R_HI16_SLO 8 +#define R_M32R_LO16 9 +#define R_M32R_SDA16 10 +#define R_M32R_GNU_VTINHERIT 11 +#define R_M32R_GNU_VTENTRY 12 + +#define R_M32R_16_RELA 33 +#define R_M32R_32_RELA 34 +#define R_M32R_24_RELA 35 +#define R_M32R_10_PCREL_RELA 36 +#define R_M32R_18_PCREL_RELA 37 +#define R_M32R_26_PCREL_RELA 38 +#define R_M32R_HI16_ULO_RELA 39 +#define R_M32R_HI16_SLO_RELA 40 +#define R_M32R_LO16_RELA 41 +#define R_M32R_SDA16_RELA 42 +#define R_M32R_RELA_GNU_VTINHERIT 43 +#define R_M32R_RELA_GNU_VTENTRY 44 +#define R_M32R_REL32 45 + +#define R_M32R_GOT24 48 +#define R_M32R_26_PLTREL 49 +#define R_M32R_COPY 50 +#define R_M32R_GLOB_DAT 51 +#define R_M32R_JMP_SLOT 52 +#define R_M32R_RELATIVE 53 +#define R_M32R_GOTOFF 54 +#define R_M32R_GOTPC24 55 +#define R_M32R_GOT16_HI_ULO 56 + +#define R_M32R_GOT16_HI_SLO 57 + +#define R_M32R_GOT16_LO 58 +#define R_M32R_GOTPC_HI_ULO 59 + +#define R_M32R_GOTPC_HI_SLO 60 + +#define R_M32R_GOTPC_LO 61 + +#define R_M32R_GOTOFF_HI_ULO 62 + +#define R_M32R_GOTOFF_HI_SLO 63 + +#define R_M32R_GOTOFF_LO 64 +#define R_M32R_NUM 256 + +#define R_MICROBLAZE_NONE 0 +#define R_MICROBLAZE_32 1 +#define R_MICROBLAZE_32_PCREL 2 +#define R_MICROBLAZE_64_PCREL 3 +#define R_MICROBLAZE_32_PCREL_LO 4 +#define R_MICROBLAZE_64 5 +#define R_MICROBLAZE_32_LO 6 +#define R_MICROBLAZE_SRO32 7 +#define R_MICROBLAZE_SRW32 8 +#define R_MICROBLAZE_64_NONE 9 +#define R_MICROBLAZE_32_SYM_OP_SYM 10 +#define R_MICROBLAZE_GNU_VTINHERIT 11 +#define R_MICROBLAZE_GNU_VTENTRY 12 +#define R_MICROBLAZE_GOTPC_64 13 +#define R_MICROBLAZE_GOT_64 14 +#define R_MICROBLAZE_PLT_64 15 +#define R_MICROBLAZE_REL 16 +#define R_MICROBLAZE_JUMP_SLOT 17 +#define R_MICROBLAZE_GLOB_DAT 18 +#define R_MICROBLAZE_GOTOFF_64 19 +#define R_MICROBLAZE_GOTOFF_32 20 +#define R_MICROBLAZE_COPY 21 +#define R_MICROBLAZE_TLS 22 +#define R_MICROBLAZE_TLSGD 23 +#define R_MICROBLAZE_TLSLD 24 +#define R_MICROBLAZE_TLSDTPMOD32 25 +#define R_MICROBLAZE_TLSDTPREL32 26 +#define R_MICROBLAZE_TLSDTPREL64 27 +#define R_MICROBLAZE_TLSGOTTPREL32 28 +#define R_MICROBLAZE_TLSTPREL32 29 + +#define DT_NIOS2_GP 0x70000002 + +#define R_NIOS2_NONE 0 +#define R_NIOS2_S16 1 +#define R_NIOS2_U16 2 +#define R_NIOS2_PCREL16 3 +#define R_NIOS2_CALL26 4 +#define R_NIOS2_IMM5 5 +#define R_NIOS2_CACHE_OPX 6 +#define R_NIOS2_IMM6 7 +#define R_NIOS2_IMM8 8 +#define R_NIOS2_HI16 9 +#define R_NIOS2_LO16 10 +#define R_NIOS2_HIADJ16 11 +#define R_NIOS2_BFD_RELOC_32 12 +#define R_NIOS2_BFD_RELOC_16 13 +#define R_NIOS2_BFD_RELOC_8 14 +#define R_NIOS2_GPREL 15 +#define R_NIOS2_GNU_VTINHERIT 16 +#define R_NIOS2_GNU_VTENTRY 17 +#define R_NIOS2_UJMP 18 +#define R_NIOS2_CJMP 19 +#define R_NIOS2_CALLR 20 +#define R_NIOS2_ALIGN 21 +#define R_NIOS2_GOT16 22 +#define R_NIOS2_CALL16 23 +#define R_NIOS2_GOTOFF_LO 24 +#define R_NIOS2_GOTOFF_HA 25 +#define R_NIOS2_PCREL_LO 26 +#define R_NIOS2_PCREL_HA 27 +#define R_NIOS2_TLS_GD16 28 +#define R_NIOS2_TLS_LDM16 29 +#define R_NIOS2_TLS_LDO16 30 +#define R_NIOS2_TLS_IE16 31 +#define R_NIOS2_TLS_LE16 32 +#define R_NIOS2_TLS_DTPMOD 33 +#define R_NIOS2_TLS_DTPREL 34 +#define R_NIOS2_TLS_TPREL 35 +#define R_NIOS2_COPY 36 +#define R_NIOS2_GLOB_DAT 37 +#define R_NIOS2_JUMP_SLOT 38 +#define R_NIOS2_RELATIVE 39 +#define R_NIOS2_GOTOFF 40 +#define R_NIOS2_CALL26_NOAT 41 +#define R_NIOS2_GOT_LO 42 +#define R_NIOS2_GOT_HA 43 +#define R_NIOS2_CALL_LO 44 +#define R_NIOS2_CALL_HA 45 + +#define R_OR1K_NONE 0 +#define R_OR1K_32 1 +#define R_OR1K_16 2 +#define R_OR1K_8 3 +#define R_OR1K_LO_16_IN_INSN 4 +#define R_OR1K_HI_16_IN_INSN 5 +#define R_OR1K_INSN_REL_26 6 +#define R_OR1K_GNU_VTENTRY 7 +#define R_OR1K_GNU_VTINHERIT 8 +#define R_OR1K_32_PCREL 9 +#define R_OR1K_16_PCREL 10 +#define R_OR1K_8_PCREL 11 +#define R_OR1K_GOTPC_HI16 12 +#define R_OR1K_GOTPC_LO16 13 +#define R_OR1K_GOT16 14 +#define R_OR1K_PLT26 15 +#define R_OR1K_GOTOFF_HI16 16 +#define R_OR1K_GOTOFF_LO16 17 +#define R_OR1K_COPY 18 +#define R_OR1K_GLOB_DAT 19 +#define R_OR1K_JMP_SLOT 20 +#define R_OR1K_RELATIVE 21 +#define R_OR1K_TLS_GD_HI16 22 +#define R_OR1K_TLS_GD_LO16 23 +#define R_OR1K_TLS_LDM_HI16 24 +#define R_OR1K_TLS_LDM_LO16 25 +#define R_OR1K_TLS_LDO_HI16 26 +#define R_OR1K_TLS_LDO_LO16 27 +#define R_OR1K_TLS_IE_HI16 28 +#define R_OR1K_TLS_IE_LO16 29 +#define R_OR1K_TLS_LE_HI16 30 +#define R_OR1K_TLS_LE_LO16 31 +#define R_OR1K_TLS_TPOFF 32 +#define R_OR1K_TLS_DTPOFF 33 +#define R_OR1K_TLS_DTPMOD 34 + +#define R_BPF_NONE 0 +#define R_BPF_MAP_FD 1 + +#ifdef __cplusplus +} +#endif + + +#endif diff --git a/tools/gbafix/gbafix.c b/tools/gbafix/gbafix.c index 81c8c04c0..9088cdc5f 100644 --- a/tools/gbafix/gbafix.c +++ b/tools/gbafix/gbafix.c @@ -1,45 +1,46 @@ /* - "$Id: gbafix.c,v 1.2 2008-07-30 17:12:51 wntrmute Exp $" + "$Id: gbafix.c,v 1.2 2008-07-30 17:12:51 wntrmute Exp $" - DevkitPro GBA ROM fix utility + DevkitPro GBA ROM fix utility - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - USA. + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. - Please report all bugs and problems through the bug tracker at - "http://sourceforge.net/tracker/?group_id=114505&atid=668551". + Please report all bugs and problems through the bug tracker at + "http://sourceforge.net/tracker/?group_id=114505&atid=668551". - "$Header: /lvm/shared/ds/ds/cvs/devkitpro-cvsbackup/tools/gba/gbatools/gbafix.c,v 1.2 2008-07-30 17:12:51 wntrmute Exp $" + "$Header: /lvm/shared/ds/ds/cvs/devkitpro-cvsbackup/tools/gba/gbatools/gbafix.c,v 1.2 2008-07-30 17:12:51 wntrmute Exp $" */ //--------------------------------------------------------------------------------- // gbafix.c //--------------------------------------------------------------------------------- /* - Gameboy Advance ROM fixer (by Dark Fader / BlackThunder / WinterMute / Diegoisawesome) - Validates header of GBA roms. - - History - ------- - v1.06 - added output silencing, (Diegoisawesome) - v1.05 - added debug offset argument, (Diegoisawesome) - v1.04 - converted to plain C, (WinterMute) - v1.03 - header.fixed, header.device_type - v1.02 - redefined the options (rgbfix style), checksum=0 - v1.01 - fix in parameters - v1.00 - logo, complement + Gameboy Advance ROM fixer (by Dark Fader / BlackThunder / WinterMute / Diegoisawesome) + Validates header of GBA roms. + + History + ------- + v1.07 - added support for ELF input, (PikalaxALT) + v1.06 - added output silencing, (Diegoisawesome) + v1.05 - added debug offset argument, (Diegoisawesome) + v1.04 - converted to plain C, (WinterMute) + v1.03 - header.fixed, header.device_type + v1.02 - redefined the options (rgbfix style), checksum=0 + v1.01 - fix in parameters + v1.00 - logo, complement */ #pragma pack(1) @@ -48,26 +49,27 @@ #include <stdlib.h> #include <string.h> #include <stdint.h> +#include "elf.h" -#define VER "1.06" -#define ARGV argv[arg] -#define VALUE (ARGV+2) -#define NUMBER strtoul(VALUE, NULL, 0) +#define VER "1.07" +#define ARGV argv[arg] +#define VALUE (ARGV+2) +#define NUMBER strtoul(VALUE, NULL, 0) typedef struct { - uint32_t start_code; // B instruction - uint8_t logo[0xA0-0x04]; // logo data - uint8_t title[0xC]; // game title name - uint32_t game_code; // - uint16_t maker_code; // - uint8_t fixed; // 0x96 - uint8_t unit_code; // 0x00 - uint8_t device_type; // 0x00 - uint8_t unused[7]; // - uint8_t game_version; // 0x00 - uint8_t complement; // 800000A0..800000BC - uint16_t checksum; // 0x0000 + uint32_t start_code; // B instruction + uint8_t logo[0xA0-0x04]; // logo data + uint8_t title[0xC]; // game title name + uint32_t game_code; // + uint16_t maker_code; // + uint8_t fixed; // 0x96 + uint8_t unit_code; // 0x00 + uint8_t device_type; // 0x00 + uint8_t unused[7]; // + uint8_t game_version; // 0x00 + uint8_t complement; // 800000A0..800000BC + uint16_t checksum; // 0x0000 } Header; @@ -77,55 +79,55 @@ unsigned short checksum_without_header = 0; const Header good_header = { - // start_code - 0xEA00002E, - // logo - { 0x24,0xFF,0xAE,0x51,0x69,0x9A,0xA2,0x21,0x3D,0x84,0x82,0x0A,0x84,0xE4,0x09,0xAD, - 0x11,0x24,0x8B,0x98,0xC0,0x81,0x7F,0x21,0xA3,0x52,0xBE,0x19,0x93,0x09,0xCE,0x20, - 0x10,0x46,0x4A,0x4A,0xF8,0x27,0x31,0xEC,0x58,0xC7,0xE8,0x33,0x82,0xE3,0xCE,0xBF, - 0x85,0xF4,0xDF,0x94,0xCE,0x4B,0x09,0xC1,0x94,0x56,0x8A,0xC0,0x13,0x72,0xA7,0xFC, - 0x9F,0x84,0x4D,0x73,0xA3,0xCA,0x9A,0x61,0x58,0x97,0xA3,0x27,0xFC,0x03,0x98,0x76, - 0x23,0x1D,0xC7,0x61,0x03,0x04,0xAE,0x56,0xBF,0x38,0x84,0x00,0x40,0xA7,0x0E,0xFD, - 0xFF,0x52,0xFE,0x03,0x6F,0x95,0x30,0xF1,0x97,0xFB,0xC0,0x85,0x60,0xD6,0x80,0x25, - 0xA9,0x63,0xBE,0x03,0x01,0x4E,0x38,0xE2,0xF9,0xA2,0x34,0xFF,0xBB,0x3E,0x03,0x44, - 0x78,0x00,0x90,0xCB,0x88,0x11,0x3A,0x94,0x65,0xC0,0x7C,0x63,0x87,0xF0,0x3C,0xAF, - 0xD6,0x25,0xE4,0x8B,0x38,0x0A,0xAC,0x72,0x21,0xD4,0xF8,0x07 } , - // title - { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, - // game code - 0x00000000, - // maker code - 0x3130, - // fixed - 0x96, - // unit_code - 0x00, - // device type - 0x00, - // unused - { 0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, - // game version - 0x00, - // complement - 0x00, - // checksum - 0x0000 + // start_code + 0xEA00002E, + // logo + { 0x24,0xFF,0xAE,0x51,0x69,0x9A,0xA2,0x21,0x3D,0x84,0x82,0x0A,0x84,0xE4,0x09,0xAD, + 0x11,0x24,0x8B,0x98,0xC0,0x81,0x7F,0x21,0xA3,0x52,0xBE,0x19,0x93,0x09,0xCE,0x20, + 0x10,0x46,0x4A,0x4A,0xF8,0x27,0x31,0xEC,0x58,0xC7,0xE8,0x33,0x82,0xE3,0xCE,0xBF, + 0x85,0xF4,0xDF,0x94,0xCE,0x4B,0x09,0xC1,0x94,0x56,0x8A,0xC0,0x13,0x72,0xA7,0xFC, + 0x9F,0x84,0x4D,0x73,0xA3,0xCA,0x9A,0x61,0x58,0x97,0xA3,0x27,0xFC,0x03,0x98,0x76, + 0x23,0x1D,0xC7,0x61,0x03,0x04,0xAE,0x56,0xBF,0x38,0x84,0x00,0x40,0xA7,0x0E,0xFD, + 0xFF,0x52,0xFE,0x03,0x6F,0x95,0x30,0xF1,0x97,0xFB,0xC0,0x85,0x60,0xD6,0x80,0x25, + 0xA9,0x63,0xBE,0x03,0x01,0x4E,0x38,0xE2,0xF9,0xA2,0x34,0xFF,0xBB,0x3E,0x03,0x44, + 0x78,0x00,0x90,0xCB,0x88,0x11,0x3A,0x94,0x65,0xC0,0x7C,0x63,0x87,0xF0,0x3C,0xAF, + 0xD6,0x25,0xE4,0x8B,0x38,0x0A,0xAC,0x72,0x21,0xD4,0xF8,0x07 } , + // title + { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, + // game code + 0x00000000, + // maker code + 0x3130, + // fixed + 0x96, + // unit_code + 0x00, + // device type + 0x00, + // unused + { 0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, + // game version + 0x00, + // complement + 0x00, + // checksum + 0x0000 }; //--------------------------------------------------------------------------------- char HeaderComplement() /*--------------------------------------------------------------------------------- - Calculate Header complement check + Calculate Header complement check ---------------------------------------------------------------------------------*/ { - int n; - char c = 0; - char *p = (char *)&header + 0xA0; - for (n=0; n<0xBD-0xA0; n++) - { - c += *p++; - } - return -(0x19+c); + int n; + char c = 0; + char *p = (char *)&header + 0xA0; + for (n=0; n<0xBD-0xA0; n++) + { + c += *p++; + } + return -(0x19+c); } @@ -133,157 +135,183 @@ char HeaderComplement() int main(int argc, char *argv[]) //--------------------------------------------------------------------------------- { - int arg; - char *argfile = 0; - FILE *infile; - int silent = 0; - - int size,bit; - - // show syntax - if (argc <= 1) - { - printf("GBA ROM fixer v"VER" by Dark Fader / BlackThunder / WinterMute / Diegoisawesome \n"); - printf("Syntax: gbafix <rom.gba> [-p] [-t[title]] [-c<game_code>] [-m<maker_code>] [-r<version>] [-d<debug>] [--silent]\n"); - printf("\n"); - printf("parameters:\n"); - printf(" -p Pad to next exact power of 2. No minimum size!\n"); - printf(" -t[<title>] Patch title. Stripped filename if none given.\n"); - printf(" -c<game_code> Patch game code (four characters)\n"); - printf(" -m<maker_code> Patch maker code (two characters)\n"); - printf(" -r<version> Patch game version (number)\n"); - printf(" -d<debug> Enable debugging handler and set debug entry point (0 or 1)\n"); - printf(" --silent Silence non-error output\n"); - return -1; - } - - // get filename - for (arg=1; arg<argc; arg++) - { - if (ARGV[0] != '-') { argfile=ARGV; } - if (strncmp("--silent", &ARGV[0], 7) == 0) { silent = 1; } - } - - // check filename - if (!argfile) - { - fprintf(stderr, "Filename needed!\n"); - return -1; - } - - // read file - infile = fopen(argfile, "r+b"); - if (!infile) { fprintf(stderr, "Error opening input file!\n"); return -1; } - fseek(infile, 0, SEEK_SET); - fread(&header, sizeof(header), 1, infile); - - // fix some data - memcpy(header.logo, good_header.logo, sizeof(header.logo)); - memcpy(&header.fixed, &good_header.fixed, sizeof(header.fixed)); - memcpy(&header.device_type, &good_header.device_type, sizeof(header.device_type)); - - // parse command line - for (arg=1; arg<argc; arg++) - { - if ((ARGV[0] == '-')) - { - switch (ARGV[1]) - { - case 'p': // pad - { - fseek(infile, 0, SEEK_END); - size = ftell(infile); - for (bit=31; bit>=0; bit--) if (size & (1<<bit)) break; - if (size != (1<<bit)) - { - int todo = (1<<(bit+1)) - size; - while (todo--) fputc(0xFF, infile); - } - fseek(infile, 0, SEEK_SET); - break; - } - - case 't': // title - { - char title[256]; - memset(title, 0, sizeof(title)); - if (VALUE[0]) - { - strncpy(title, VALUE, sizeof(header.title)); - } - else - { - // use filename - char s[256], *begin=s, *t; strcpy(s, argfile); - t = strrchr(s, '\\'); if (t) begin = t+1; - t = strrchr(s, '/'); if (t) begin = t+1; - t = strrchr(s, '.'); if (t) *t = 0; - strncpy(title, begin, sizeof(header.title)); - if (!silent) printf("%s\n",begin); - } - memcpy(header.title, title, sizeof(header.title)); // copy - break; - } - - case 'c': // game code - { - //if (!VALUE[0]) { fprintf(stderr, "Need value for %s\n", ARGV); break; } - //header.game_code = NUMBER; - header.game_code = VALUE[0] | VALUE[1]<<8 | VALUE[2]<<16 | VALUE[3]<<24; - break; - } - - case 'm': // maker code - { - //if (!VALUE[0]) { fprintf(stderr, "Need value for %s\n", ARGV); break; } - //header.maker_code = (unsigned short)NUMBER; - header.maker_code = VALUE[0] | VALUE[1]<<8; - break; - } - - case 'v': // ignored, compatability with other gbafix - { - break; - } - - case 'r': // version - { - if (!VALUE[0]) { fprintf(stderr, "Need value for %s\n", ARGV); break; } - header.game_version = (unsigned char)NUMBER; - break; - } - - case 'd': // debug - { - if (!VALUE[0]) { fprintf(stderr, "Need value for %s\n", ARGV); break; } - header.logo[0x9C-0x04] = 0xA5; // debug enable - header.device_type = (unsigned char)((NUMBER & 1) << 7); // debug handler entry point - break; - } - case '-': // long arguments - { - if (strncmp("silent", &ARGV[2], 6) == 0) { continue; } - break; - } - default: - { - printf("Invalid option: %s\n", ARGV); - } - } - } - } - - // update complement check & total checksum - header.complement = 0; - header.checksum = 0; // must be 0 - header.complement = HeaderComplement(); - //header.checksum = checksum_without_header + HeaderChecksum(); - - fseek(infile, 0, SEEK_SET); - fwrite(&header, sizeof(header), 1, infile); - fclose(infile); - - if (!silent) printf("ROM fixed!\n"); - - return 0; + int arg; + char *argfile = 0; + FILE *infile; + int silent = 0; + int schedule_pad = 0; + + int size,bit; + + // show syntax + if (argc <= 1) + { + printf("GBA ROM fixer v"VER" by Dark Fader / BlackThunder / WinterMute / Diegoisawesome \n"); + printf("Syntax: gbafix <rom.gba> [-p] [-t[title]] [-c<game_code>] [-m<maker_code>] [-r<version>] [-d<debug>] [--silent]\n"); + printf("\n"); + printf("parameters:\n"); + printf(" -p Pad to next exact power of 2. No minimum size!\n"); + printf(" -t[<title>] Patch title. Stripped filename if none given.\n"); + printf(" -c<game_code> Patch game code (four characters)\n"); + printf(" -m<maker_code> Patch maker code (two characters)\n"); + printf(" -r<version> Patch game version (number)\n"); + printf(" -d<debug> Enable debugging handler and set debug entry point (0 or 1)\n"); + printf(" --silent Silence non-error output\n"); + return -1; + } + + // get filename + for (arg=1; arg<argc; arg++) + { + if (ARGV[0] != '-') { argfile=ARGV; } + if (strncmp("--silent", &ARGV[0], 7) == 0) { silent = 1; } + } + + // check filename + if (!argfile) + { + fprintf(stderr, "Filename needed!\n"); + return -1; + } + + uint32_t sh_offset = 0; + + // read file + infile = fopen(argfile, "r+b"); + if (!infile) { fprintf(stderr, "Error opening input file!\n"); return -1; } + fseek(infile, sh_offset, SEEK_SET); + fread(&header, sizeof(header), 1, infile); + + // elf check + Elf32_Shdr secHeader; + if (memcmp(&header, ELFMAG, 4) == 0) { + Elf32_Ehdr *elfHeader = (Elf32_Ehdr *)&header; + fseek(infile, elfHeader->e_shoff, SEEK_SET); + int i; + for (i = 0; i < elfHeader->e_shnum; i++) { + fread(&secHeader, sizeof(Elf32_Shdr), 1, infile); + if (secHeader.sh_type == SHT_PROGBITS && secHeader.sh_addr == elfHeader->e_entry) break; + } + if (i == elfHeader->e_shnum) { fprintf(stderr, "Error finding entry point!\n"); return 1; } + fseek(infile, secHeader.sh_offset, SEEK_SET); + sh_offset = secHeader.sh_offset; + fread(&header, sizeof(header), 1, infile); + } + + // fix some data + memcpy(header.logo, good_header.logo, sizeof(header.logo)); + memcpy(&header.fixed, &good_header.fixed, sizeof(header.fixed)); + memcpy(&header.device_type, &good_header.device_type, sizeof(header.device_type)); + + // parse command line + for (arg=1; arg<argc; arg++) + { + if ((ARGV[0] == '-')) + { + switch (ARGV[1]) + { + case 'p': // pad + { + schedule_pad = 1; + break; + } + + case 't': // title + { + char title[256]; + memset(title, 0, sizeof(title)); + if (VALUE[0]) + { + strncpy(title, VALUE, sizeof(header.title)); + } + else + { + // use filename + char s[256], *begin=s, *t; strcpy(s, argfile); + t = strrchr(s, '\\'); if (t) begin = t+1; + t = strrchr(s, '/'); if (t) begin = t+1; + t = strrchr(s, '.'); if (t) *t = 0; + strncpy(title, begin, sizeof(header.title)); + if (!silent) printf("%s\n",begin); + } + memcpy(header.title, title, sizeof(header.title)); // copy + break; + } + + case 'c': // game code + { + //if (!VALUE[0]) { fprintf(stderr, "Need value for %s\n", ARGV); break; } + //header.game_code = NUMBER; + header.game_code = VALUE[0] | VALUE[1]<<8 | VALUE[2]<<16 | VALUE[3]<<24; + break; + } + + case 'm': // maker code + { + //if (!VALUE[0]) { fprintf(stderr, "Need value for %s\n", ARGV); break; } + //header.maker_code = (unsigned short)NUMBER; + header.maker_code = VALUE[0] | VALUE[1]<<8; + break; + } + + case 'v': // ignored, compatability with other gbafix + { + break; + } + + case 'r': // version + { + if (!VALUE[0]) { fprintf(stderr, "Need value for %s\n", ARGV); break; } + header.game_version = (unsigned char)NUMBER; + break; + } + + case 'd': // debug + { + if (!VALUE[0]) { fprintf(stderr, "Need value for %s\n", ARGV); break; } + header.logo[0x9C-0x04] = 0xA5; // debug enable + header.device_type = (unsigned char)((NUMBER & 1) << 7); // debug handler entry point + break; + } + case '-': // long arguments + { + if (strncmp("silent", &ARGV[2], 6) == 0) { continue; } + break; + } + default: + { + printf("Invalid option: %s\n", ARGV); + } + } + } + } + + // update complement check & total checksum + header.complement = 0; + header.checksum = 0; // must be 0 + header.complement = HeaderComplement(); + //header.checksum = checksum_without_header + HeaderChecksum(); + + if (schedule_pad) { + if (sh_offset != 0) { + fprintf(stderr, "Warning: Cannot safely pad an ELF\n"); + } else { + fseek(infile, 0, SEEK_END); + size = ftell(infile); + for (bit=31; bit>=0; bit--) if (size & (1<<bit)) break; + if (size != (1<<bit)) + { + int todo = (1<<(bit+1)) - size; + while (todo--) fputc(0xFF, infile); + } + } + } + + fseek(infile, sh_offset, SEEK_SET); + fwrite(&header, sizeof(header), 1, infile); + fclose(infile); + + if (!silent) printf("ROM fixed!\n"); + + return 0; } diff --git a/tools/jsonproc/.gitignore b/tools/jsonproc/.gitignore new file mode 100755 index 000000000..a613cf2d7 --- /dev/null +++ b/tools/jsonproc/.gitignore @@ -0,0 +1 @@ +jsonproc diff --git a/tools/jsonproc/Makefile b/tools/jsonproc/Makefile new file mode 100755 index 000000000..721da1025 --- /dev/null +++ b/tools/jsonproc/Makefile @@ -0,0 +1,20 @@ +CXX := g++ + +CXXFLAGS := -Wall -std=c++11 -O2 + +INCLUDES := -I . + +SRCS := jsonproc.cpp + +HEADERS := jsonproc.h inja.hpp nlohmann/json.hpp + +.PHONY: all clean + +all: jsonproc + @: + +jsonproc: $(SRCS) $(HEADERS) + $(CXX) $(CXXFLAGS) $(INCLUDES) $(SRCS) -o $@ $(LDFLAGS) + +clean: + $(RM) jsonproc jsonproc.exe diff --git a/tools/jsonproc/inja.hpp b/tools/jsonproc/inja.hpp new file mode 100755 index 000000000..3b7263546 --- /dev/null +++ b/tools/jsonproc/inja.hpp @@ -0,0 +1,3396 @@ +// MIT License + +// Copyright (c) 2018 lbersch + +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: + +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + + +// --- + + +// Copyright (c) 2009-2018 FIRST +// All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of the FIRST nor the +// names of its contributors may be used to endorse or promote products +// derived from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY FIRST AND CONTRIBUTORS``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef PANTOR_INJA_HPP +#define PANTOR_INJA_HPP + +#include <functional> +#include <iostream> +#include <map> +#include <memory> +#include <sstream> +#include <string> +#include <vector> + +#include <nlohmann/json.hpp> + +// #include "environment.hpp" +#ifndef PANTOR_INJA_ENVIRONMENT_HPP +#define PANTOR_INJA_ENVIRONMENT_HPP + +#include <memory> +#include <fstream> +#include <sstream> +#include <string> + +#include <nlohmann/json.hpp> + +// #include "config.hpp" +#ifndef PANTOR_INJA_CONFIG_HPP +#define PANTOR_INJA_CONFIG_HPP + +#include <functional> +#include <string> + +// #include "string_view.hpp" +// Copyright 2017-2019 by Martin Moene +// +// string-view lite, a C++17-like string_view for C++98 and later. +// For more information see https://github.com/martinmoene/string-view-lite +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + + +#ifndef NONSTD_SV_LITE_H_INCLUDED +#define NONSTD_SV_LITE_H_INCLUDED + +#define string_view_lite_MAJOR 1 +#define string_view_lite_MINOR 1 +#define string_view_lite_PATCH 0 + +#define string_view_lite_VERSION nssv_STRINGIFY(string_view_lite_MAJOR) "." nssv_STRINGIFY(string_view_lite_MINOR) "." nssv_STRINGIFY(string_view_lite_PATCH) + +#define nssv_STRINGIFY( x ) nssv_STRINGIFY_( x ) +#define nssv_STRINGIFY_( x ) #x + +// string-view lite configuration: + +#define nssv_STRING_VIEW_DEFAULT 0 +#define nssv_STRING_VIEW_NONSTD 1 +#define nssv_STRING_VIEW_STD 2 + +#if !defined( nssv_CONFIG_SELECT_STRING_VIEW ) +# define nssv_CONFIG_SELECT_STRING_VIEW ( nssv_HAVE_STD_STRING_VIEW ? nssv_STRING_VIEW_STD : nssv_STRING_VIEW_NONSTD ) +#endif + +#if defined( nssv_CONFIG_SELECT_STD_STRING_VIEW ) || defined( nssv_CONFIG_SELECT_NONSTD_STRING_VIEW ) +# error nssv_CONFIG_SELECT_STD_STRING_VIEW and nssv_CONFIG_SELECT_NONSTD_STRING_VIEW are deprecated and removed, please use nssv_CONFIG_SELECT_STRING_VIEW=nssv_STRING_VIEW_... +#endif + +#ifndef nssv_CONFIG_STD_SV_OPERATOR +# define nssv_CONFIG_STD_SV_OPERATOR 0 +#endif + +#ifndef nssv_CONFIG_USR_SV_OPERATOR +# define nssv_CONFIG_USR_SV_OPERATOR 1 +#endif + +#ifdef nssv_CONFIG_CONVERSION_STD_STRING +# define nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS nssv_CONFIG_CONVERSION_STD_STRING +# define nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS nssv_CONFIG_CONVERSION_STD_STRING +#endif + +#ifndef nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS +# define nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS 1 +#endif + +#ifndef nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS +# define nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS 1 +#endif + +// Control presence of exception handling (try and auto discover): + +#ifndef nssv_CONFIG_NO_EXCEPTIONS +# if defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND) +# define nssv_CONFIG_NO_EXCEPTIONS 0 +# else +# define nssv_CONFIG_NO_EXCEPTIONS 1 +# endif +#endif + +// C++ language version detection (C++20 is speculative): +// Note: VC14.0/1900 (VS2015) lacks too much from C++14. + +#ifndef nssv_CPLUSPLUS +# if defined(_MSVC_LANG ) && !defined(__clang__) +# define nssv_CPLUSPLUS (_MSC_VER == 1900 ? 201103L : _MSVC_LANG ) +# else +# define nssv_CPLUSPLUS __cplusplus +# endif +#endif + +#define nssv_CPP98_OR_GREATER ( nssv_CPLUSPLUS >= 199711L ) +#define nssv_CPP11_OR_GREATER ( nssv_CPLUSPLUS >= 201103L ) +#define nssv_CPP11_OR_GREATER_ ( nssv_CPLUSPLUS >= 201103L ) +#define nssv_CPP14_OR_GREATER ( nssv_CPLUSPLUS >= 201402L ) +#define nssv_CPP17_OR_GREATER ( nssv_CPLUSPLUS >= 201703L ) +#define nssv_CPP20_OR_GREATER ( nssv_CPLUSPLUS >= 202000L ) + +// use C++17 std::string_view if available and requested: + +#if nssv_CPP17_OR_GREATER && defined(__has_include ) +# if __has_include( <string_view> ) +# define nssv_HAVE_STD_STRING_VIEW 1 +# else +# define nssv_HAVE_STD_STRING_VIEW 0 +# endif +#else +# define nssv_HAVE_STD_STRING_VIEW 0 +#endif + +#define nssv_USES_STD_STRING_VIEW ( (nssv_CONFIG_SELECT_STRING_VIEW == nssv_STRING_VIEW_STD) || ((nssv_CONFIG_SELECT_STRING_VIEW == nssv_STRING_VIEW_DEFAULT) && nssv_HAVE_STD_STRING_VIEW) ) + +#define nssv_HAVE_STARTS_WITH ( nssv_CPP20_OR_GREATER || !nssv_USES_STD_STRING_VIEW ) +#define nssv_HAVE_ENDS_WITH nssv_HAVE_STARTS_WITH + +// +// Use C++17 std::string_view: +// + +#if nssv_USES_STD_STRING_VIEW + +#include <string_view> + +// Extensions for std::string: + +#if nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS + +namespace nonstd { + +template< class CharT, class Traits, class Allocator = std::allocator<CharT> > +std::basic_string<CharT, Traits, Allocator> +to_string( std::basic_string_view<CharT, Traits> v, Allocator const & a = Allocator() ) +{ + return std::basic_string<CharT,Traits, Allocator>( v.begin(), v.end(), a ); +} + +template< class CharT, class Traits, class Allocator > +std::basic_string_view<CharT, Traits> +to_string_view( std::basic_string<CharT, Traits, Allocator> const & s ) +{ + return std::basic_string_view<CharT, Traits>( s.data(), s.size() ); +} + +// Literal operators sv and _sv: + +#if nssv_CONFIG_STD_SV_OPERATOR + +using namespace std::literals::string_view_literals; + +#endif + +#if nssv_CONFIG_USR_SV_OPERATOR + +inline namespace literals { +inline namespace string_view_literals { + + +constexpr std::string_view operator "" _sv( const char* str, size_t len ) noexcept // (1) +{ + return std::string_view{ str, len }; +} + +constexpr std::u16string_view operator "" _sv( const char16_t* str, size_t len ) noexcept // (2) +{ + return std::u16string_view{ str, len }; +} + +constexpr std::u32string_view operator "" _sv( const char32_t* str, size_t len ) noexcept // (3) +{ + return std::u32string_view{ str, len }; +} + +constexpr std::wstring_view operator "" _sv( const wchar_t* str, size_t len ) noexcept // (4) +{ + return std::wstring_view{ str, len }; +} + +}} // namespace literals::string_view_literals + +#endif // nssv_CONFIG_USR_SV_OPERATOR + +} // namespace nonstd + +#endif // nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS + +namespace nonstd { + +using std::string_view; +using std::wstring_view; +using std::u16string_view; +using std::u32string_view; +using std::basic_string_view; + +// literal "sv" and "_sv", see above + +using std::operator==; +using std::operator!=; +using std::operator<; +using std::operator<=; +using std::operator>; +using std::operator>=; + +using std::operator<<; + +} // namespace nonstd + +#else // nssv_HAVE_STD_STRING_VIEW + +// +// Before C++17: use string_view lite: +// + +// Compiler versions: +// +// MSVC++ 6.0 _MSC_VER == 1200 (Visual Studio 6.0) +// MSVC++ 7.0 _MSC_VER == 1300 (Visual Studio .NET 2002) +// MSVC++ 7.1 _MSC_VER == 1310 (Visual Studio .NET 2003) +// MSVC++ 8.0 _MSC_VER == 1400 (Visual Studio 2005) +// MSVC++ 9.0 _MSC_VER == 1500 (Visual Studio 2008) +// MSVC++ 10.0 _MSC_VER == 1600 (Visual Studio 2010) +// MSVC++ 11.0 _MSC_VER == 1700 (Visual Studio 2012) +// MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013) +// MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015) +// MSVC++ 14.1 _MSC_VER >= 1910 (Visual Studio 2017) + +#if defined(_MSC_VER ) && !defined(__clang__) +# define nssv_COMPILER_MSVC_VER (_MSC_VER ) +# define nssv_COMPILER_MSVC_VERSION (_MSC_VER / 10 - 10 * ( 5 + (_MSC_VER < 1900 ) ) ) +#else +# define nssv_COMPILER_MSVC_VER 0 +# define nssv_COMPILER_MSVC_VERSION 0 +#endif + +#define nssv_COMPILER_VERSION( major, minor, patch ) (10 * ( 10 * major + minor) + patch) + +#if defined(__clang__) +# define nssv_COMPILER_CLANG_VERSION nssv_COMPILER_VERSION(__clang_major__, __clang_minor__, __clang_patchlevel__) +#else +# define nssv_COMPILER_CLANG_VERSION 0 +#endif + +#if defined(__GNUC__) && !defined(__clang__) +# define nssv_COMPILER_GNUC_VERSION nssv_COMPILER_VERSION(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) +#else +# define nssv_COMPILER_GNUC_VERSION 0 +#endif + +// half-open range [lo..hi): +#define nssv_BETWEEN( v, lo, hi ) ( (lo) <= (v) && (v) < (hi) ) + +// Presence of language and library features: + +#ifdef _HAS_CPP0X +# define nssv_HAS_CPP0X _HAS_CPP0X +#else +# define nssv_HAS_CPP0X 0 +#endif + +// Unless defined otherwise below, consider VC14 as C++11 for variant-lite: + +#if nssv_COMPILER_MSVC_VER >= 1900 +# undef nssv_CPP11_OR_GREATER +# define nssv_CPP11_OR_GREATER 1 +#endif + +#define nssv_CPP11_90 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1500) +#define nssv_CPP11_100 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1600) +#define nssv_CPP11_110 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1700) +#define nssv_CPP11_120 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1800) +#define nssv_CPP11_140 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1900) +#define nssv_CPP11_141 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1910) + +#define nssv_CPP14_000 (nssv_CPP14_OR_GREATER) +#define nssv_CPP17_000 (nssv_CPP17_OR_GREATER) + +// Presence of C++11 language features: + +#define nssv_HAVE_CONSTEXPR_11 nssv_CPP11_140 +#define nssv_HAVE_EXPLICIT_CONVERSION nssv_CPP11_140 +#define nssv_HAVE_INLINE_NAMESPACE nssv_CPP11_140 +#define nssv_HAVE_NOEXCEPT nssv_CPP11_140 +#define nssv_HAVE_NULLPTR nssv_CPP11_100 +#define nssv_HAVE_REF_QUALIFIER nssv_CPP11_140 +#define nssv_HAVE_UNICODE_LITERALS nssv_CPP11_140 +#define nssv_HAVE_USER_DEFINED_LITERALS nssv_CPP11_140 +#define nssv_HAVE_WCHAR16_T nssv_CPP11_100 +#define nssv_HAVE_WCHAR32_T nssv_CPP11_100 + +#if ! ( ( nssv_CPP11 && nssv_COMPILER_CLANG_VERSION ) || nssv_BETWEEN( nssv_COMPILER_CLANG_VERSION, 300, 400 ) ) +# define nssv_HAVE_STD_DEFINED_LITERALS nssv_CPP11_140 +#endif + +// Presence of C++14 language features: + +#define nssv_HAVE_CONSTEXPR_14 nssv_CPP14_000 + +// Presence of C++17 language features: + +#define nssv_HAVE_NODISCARD nssv_CPP17_000 + +// Presence of C++ library features: + +#define nssv_HAVE_STD_HASH nssv_CPP11_120 + +// C++ feature usage: + +#if nssv_HAVE_CONSTEXPR_11 +# define nssv_constexpr constexpr +#else +# define nssv_constexpr /*constexpr*/ +#endif + +#if nssv_HAVE_CONSTEXPR_14 +# define nssv_constexpr14 constexpr +#else +# define nssv_constexpr14 /*constexpr*/ +#endif + +#if nssv_HAVE_EXPLICIT_CONVERSION +# define nssv_explicit explicit +#else +# define nssv_explicit /*explicit*/ +#endif + +#if nssv_HAVE_INLINE_NAMESPACE +# define nssv_inline_ns inline +#else +# define nssv_inline_ns /*inline*/ +#endif + +#if nssv_HAVE_NOEXCEPT +# define nssv_noexcept noexcept +#else +# define nssv_noexcept /*noexcept*/ +#endif + +//#if nssv_HAVE_REF_QUALIFIER +//# define nssv_ref_qual & +//# define nssv_refref_qual && +//#else +//# define nssv_ref_qual /*&*/ +//# define nssv_refref_qual /*&&*/ +//#endif + +#if nssv_HAVE_NULLPTR +# define nssv_nullptr nullptr +#else +# define nssv_nullptr NULL +#endif + +#if nssv_HAVE_NODISCARD +# define nssv_nodiscard [[nodiscard]] +#else +# define nssv_nodiscard /*[[nodiscard]]*/ +#endif + +// Additional includes: + +#include <algorithm> +#include <cassert> +#include <iterator> +#include <limits> +#include <ostream> +#include <string> // std::char_traits<> + +#if ! nssv_CONFIG_NO_EXCEPTIONS +# include <stdexcept> +#endif + +#if nssv_CPP11_OR_GREATER +# include <type_traits> +#endif + +// Clang, GNUC, MSVC warning suppression macros: + +#if defined(__clang__) +# pragma clang diagnostic ignored "-Wreserved-user-defined-literal" +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wuser-defined-literals" +#elif defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wliteral-suffix" +#endif // __clang__ + +#if nssv_COMPILER_MSVC_VERSION >= 140 +# define nssv_SUPPRESS_MSGSL_WARNING(expr) [[gsl::suppress(expr)]] +# define nssv_SUPPRESS_MSVC_WARNING(code, descr) __pragma(warning(suppress: code) ) +# define nssv_DISABLE_MSVC_WARNINGS(codes) __pragma(warning(push)) __pragma(warning(disable: codes)) +#else +# define nssv_SUPPRESS_MSGSL_WARNING(expr) +# define nssv_SUPPRESS_MSVC_WARNING(code, descr) +# define nssv_DISABLE_MSVC_WARNINGS(codes) +#endif + +#if defined(__clang__) +# define nssv_RESTORE_WARNINGS() _Pragma("clang diagnostic pop") +#elif defined(__GNUC__) +# define nssv_RESTORE_WARNINGS() _Pragma("GCC diagnostic pop") +#elif nssv_COMPILER_MSVC_VERSION >= 140 +# define nssv_RESTORE_WARNINGS() __pragma(warning(pop )) +#else +# define nssv_RESTORE_WARNINGS() +#endif + +// Suppress the following MSVC (GSL) warnings: +// - C4455, non-gsl : 'operator ""sv': literal suffix identifiers that do not +// start with an underscore are reserved +// - C26472, gsl::t.1 : don't use a static_cast for arithmetic conversions; +// use brace initialization, gsl::narrow_cast or gsl::narow +// - C26481: gsl::b.1 : don't use pointer arithmetic. Use span instead + +nssv_DISABLE_MSVC_WARNINGS( 4455 26481 26472 ) +//nssv_DISABLE_CLANG_WARNINGS( "-Wuser-defined-literals" ) +//nssv_DISABLE_GNUC_WARNINGS( -Wliteral-suffix ) + +namespace nonstd { namespace sv_lite { + +template +< + class CharT, + class Traits = std::char_traits<CharT> +> +class basic_string_view; + +// +// basic_string_view: +// + +template +< + class CharT, + class Traits /* = std::char_traits<CharT> */ +> +class basic_string_view +{ +public: + // Member types: + + typedef Traits traits_type; + typedef CharT value_type; + + typedef CharT * pointer; + typedef CharT const * const_pointer; + typedef CharT & reference; + typedef CharT const & const_reference; + + typedef const_pointer iterator; + typedef const_pointer const_iterator; + typedef std::reverse_iterator< const_iterator > reverse_iterator; + typedef std::reverse_iterator< const_iterator > const_reverse_iterator; + + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + + // 24.4.2.1 Construction and assignment: + + nssv_constexpr basic_string_view() nssv_noexcept + : data_( nssv_nullptr ) + , size_( 0 ) + {} + +#if nssv_CPP11_OR_GREATER + nssv_constexpr basic_string_view( basic_string_view const & other ) nssv_noexcept = default; +#else + nssv_constexpr basic_string_view( basic_string_view const & other ) nssv_noexcept + : data_( other.data_) + , size_( other.size_) + {} +#endif + + nssv_constexpr basic_string_view( CharT const * s, size_type count ) + : data_( s ) + , size_( count ) + {} + + nssv_constexpr basic_string_view( CharT const * s) + : data_( s ) + , size_( Traits::length(s) ) + {} + + // Assignment: + +#if nssv_CPP11_OR_GREATER + nssv_constexpr14 basic_string_view & operator=( basic_string_view const & other ) nssv_noexcept = default; +#else + nssv_constexpr14 basic_string_view & operator=( basic_string_view const & other ) nssv_noexcept + { + data_ = other.data_; + size_ = other.size_; + return *this; + } +#endif + + // 24.4.2.2 Iterator support: + + nssv_constexpr const_iterator begin() const nssv_noexcept { return data_; } + nssv_constexpr const_iterator end() const nssv_noexcept { return data_ + size_; } + + nssv_constexpr const_iterator cbegin() const nssv_noexcept { return begin(); } + nssv_constexpr const_iterator cend() const nssv_noexcept { return end(); } + + nssv_constexpr const_reverse_iterator rbegin() const nssv_noexcept { return const_reverse_iterator( end() ); } + nssv_constexpr const_reverse_iterator rend() const nssv_noexcept { return const_reverse_iterator( begin() ); } + + nssv_constexpr const_reverse_iterator crbegin() const nssv_noexcept { return rbegin(); } + nssv_constexpr const_reverse_iterator crend() const nssv_noexcept { return rend(); } + + // 24.4.2.3 Capacity: + + nssv_constexpr size_type size() const nssv_noexcept { return size_; } + nssv_constexpr size_type length() const nssv_noexcept { return size_; } + nssv_constexpr size_type max_size() const nssv_noexcept { return (std::numeric_limits< size_type >::max)(); } + + // since C++20 + nssv_nodiscard nssv_constexpr bool empty() const nssv_noexcept + { + return 0 == size_; + } + + // 24.4.2.4 Element access: + + nssv_constexpr const_reference operator[]( size_type pos ) const + { + return data_at( pos ); + } + + nssv_constexpr14 const_reference at( size_type pos ) const + { +#if nssv_CONFIG_NO_EXCEPTIONS + assert( pos < size() ); +#else + if ( pos >= size() ) + { + throw std::out_of_range("nonst::string_view::at()"); + } +#endif + return data_at( pos ); + } + + nssv_constexpr const_reference front() const { return data_at( 0 ); } + nssv_constexpr const_reference back() const { return data_at( size() - 1 ); } + + nssv_constexpr const_pointer data() const nssv_noexcept { return data_; } + + // 24.4.2.5 Modifiers: + + nssv_constexpr14 void remove_prefix( size_type n ) + { + assert( n <= size() ); + data_ += n; + size_ -= n; + } + + nssv_constexpr14 void remove_suffix( size_type n ) + { + assert( n <= size() ); + size_ -= n; + } + + nssv_constexpr14 void swap( basic_string_view & other ) nssv_noexcept + { + using std::swap; + swap( data_, other.data_ ); + swap( size_, other.size_ ); + } + + // 24.4.2.6 String operations: + + size_type copy( CharT * dest, size_type n, size_type pos = 0 ) const + { +#if nssv_CONFIG_NO_EXCEPTIONS + assert( pos <= size() ); +#else + if ( pos > size() ) + { + throw std::out_of_range("nonst::string_view::copy()"); + } +#endif + const size_type rlen = (std::min)( n, size() - pos ); + + (void) Traits::copy( dest, data() + pos, rlen ); + + return rlen; + } + + nssv_constexpr14 basic_string_view substr( size_type pos = 0, size_type n = npos ) const + { +#if nssv_CONFIG_NO_EXCEPTIONS + assert( pos <= size() ); +#else + if ( pos > size() ) + { + throw std::out_of_range("nonst::string_view::substr()"); + } +#endif + return basic_string_view( data() + pos, (std::min)( n, size() - pos ) ); + } + + // compare(), 6x: + + nssv_constexpr14 int compare( basic_string_view other ) const nssv_noexcept // (1) + { + if ( const int result = Traits::compare( data(), other.data(), (std::min)( size(), other.size() ) ) ) + return result; + + return size() == other.size() ? 0 : size() < other.size() ? -1 : 1; + } + + nssv_constexpr int compare( size_type pos1, size_type n1, basic_string_view other ) const // (2) + { + return substr( pos1, n1 ).compare( other ); + } + + nssv_constexpr int compare( size_type pos1, size_type n1, basic_string_view other, size_type pos2, size_type n2 ) const // (3) + { + return substr( pos1, n1 ).compare( other.substr( pos2, n2 ) ); + } + + nssv_constexpr int compare( CharT const * s ) const // (4) + { + return compare( basic_string_view( s ) ); + } + + nssv_constexpr int compare( size_type pos1, size_type n1, CharT const * s ) const // (5) + { + return substr( pos1, n1 ).compare( basic_string_view( s ) ); + } + + nssv_constexpr int compare( size_type pos1, size_type n1, CharT const * s, size_type n2 ) const // (6) + { + return substr( pos1, n1 ).compare( basic_string_view( s, n2 ) ); + } + + // 24.4.2.7 Searching: + + // starts_with(), 3x, since C++20: + + nssv_constexpr bool starts_with( basic_string_view v ) const nssv_noexcept // (1) + { + return size() >= v.size() && compare( 0, v.size(), v ) == 0; + } + + nssv_constexpr bool starts_with( CharT c ) const nssv_noexcept // (2) + { + return starts_with( basic_string_view( &c, 1 ) ); + } + + nssv_constexpr bool starts_with( CharT const * s ) const // (3) + { + return starts_with( basic_string_view( s ) ); + } + + // ends_with(), 3x, since C++20: + + nssv_constexpr bool ends_with( basic_string_view v ) const nssv_noexcept // (1) + { + return size() >= v.size() && compare( size() - v.size(), npos, v ) == 0; + } + + nssv_constexpr bool ends_with( CharT c ) const nssv_noexcept // (2) + { + return ends_with( basic_string_view( &c, 1 ) ); + } + + nssv_constexpr bool ends_with( CharT const * s ) const // (3) + { + return ends_with( basic_string_view( s ) ); + } + + // find(), 4x: + + nssv_constexpr14 size_type find( basic_string_view v, size_type pos = 0 ) const nssv_noexcept // (1) + { + return assert( v.size() == 0 || v.data() != nssv_nullptr ) + , pos >= size() + ? npos + : to_pos( std::search( cbegin() + pos, cend(), v.cbegin(), v.cend(), Traits::eq ) ); + } + + nssv_constexpr14 size_type find( CharT c, size_type pos = 0 ) const nssv_noexcept // (2) + { + return find( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr14 size_type find( CharT const * s, size_type pos, size_type n ) const // (3) + { + return find( basic_string_view( s, n ), pos ); + } + + nssv_constexpr14 size_type find( CharT const * s, size_type pos = 0 ) const // (4) + { + return find( basic_string_view( s ), pos ); + } + + // rfind(), 4x: + + nssv_constexpr14 size_type rfind( basic_string_view v, size_type pos = npos ) const nssv_noexcept // (1) + { + if ( size() < v.size() ) + return npos; + + if ( v.empty() ) + return (std::min)( size(), pos ); + + const_iterator last = cbegin() + (std::min)( size() - v.size(), pos ) + v.size(); + const_iterator result = std::find_end( cbegin(), last, v.cbegin(), v.cend(), Traits::eq ); + + return result != last ? size_type( result - cbegin() ) : npos; + } + + nssv_constexpr14 size_type rfind( CharT c, size_type pos = npos ) const nssv_noexcept // (2) + { + return rfind( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr14 size_type rfind( CharT const * s, size_type pos, size_type n ) const // (3) + { + return rfind( basic_string_view( s, n ), pos ); + } + + nssv_constexpr14 size_type rfind( CharT const * s, size_type pos = npos ) const // (4) + { + return rfind( basic_string_view( s ), pos ); + } + + // find_first_of(), 4x: + + nssv_constexpr size_type find_first_of( basic_string_view v, size_type pos = 0 ) const nssv_noexcept // (1) + { + return pos >= size() + ? npos + : to_pos( std::find_first_of( cbegin() + pos, cend(), v.cbegin(), v.cend(), Traits::eq ) ); + } + + nssv_constexpr size_type find_first_of( CharT c, size_type pos = 0 ) const nssv_noexcept // (2) + { + return find_first_of( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr size_type find_first_of( CharT const * s, size_type pos, size_type n ) const // (3) + { + return find_first_of( basic_string_view( s, n ), pos ); + } + + nssv_constexpr size_type find_first_of( CharT const * s, size_type pos = 0 ) const // (4) + { + return find_first_of( basic_string_view( s ), pos ); + } + + // find_last_of(), 4x: + + nssv_constexpr size_type find_last_of( basic_string_view v, size_type pos = npos ) const nssv_noexcept // (1) + { + return empty() + ? npos + : pos >= size() + ? find_last_of( v, size() - 1 ) + : to_pos( std::find_first_of( const_reverse_iterator( cbegin() + pos + 1 ), crend(), v.cbegin(), v.cend(), Traits::eq ) ); + } + + nssv_constexpr size_type find_last_of( CharT c, size_type pos = npos ) const nssv_noexcept // (2) + { + return find_last_of( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr size_type find_last_of( CharT const * s, size_type pos, size_type count ) const // (3) + { + return find_last_of( basic_string_view( s, count ), pos ); + } + + nssv_constexpr size_type find_last_of( CharT const * s, size_type pos = npos ) const // (4) + { + return find_last_of( basic_string_view( s ), pos ); + } + + // find_first_not_of(), 4x: + + nssv_constexpr size_type find_first_not_of( basic_string_view v, size_type pos = 0 ) const nssv_noexcept // (1) + { + return pos >= size() + ? npos + : to_pos( std::find_if( cbegin() + pos, cend(), not_in_view( v ) ) ); + } + + nssv_constexpr size_type find_first_not_of( CharT c, size_type pos = 0 ) const nssv_noexcept // (2) + { + return find_first_not_of( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr size_type find_first_not_of( CharT const * s, size_type pos, size_type count ) const // (3) + { + return find_first_not_of( basic_string_view( s, count ), pos ); + } + + nssv_constexpr size_type find_first_not_of( CharT const * s, size_type pos = 0 ) const // (4) + { + return find_first_not_of( basic_string_view( s ), pos ); + } + + // find_last_not_of(), 4x: + + nssv_constexpr size_type find_last_not_of( basic_string_view v, size_type pos = npos ) const nssv_noexcept // (1) + { + return empty() + ? npos + : pos >= size() + ? find_last_not_of( v, size() - 1 ) + : to_pos( std::find_if( const_reverse_iterator( cbegin() + pos + 1 ), crend(), not_in_view( v ) ) ); + } + + nssv_constexpr size_type find_last_not_of( CharT c, size_type pos = npos ) const nssv_noexcept // (2) + { + return find_last_not_of( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr size_type find_last_not_of( CharT const * s, size_type pos, size_type count ) const // (3) + { + return find_last_not_of( basic_string_view( s, count ), pos ); + } + + nssv_constexpr size_type find_last_not_of( CharT const * s, size_type pos = npos ) const // (4) + { + return find_last_not_of( basic_string_view( s ), pos ); + } + + // Constants: + +#if nssv_CPP17_OR_GREATER + static nssv_constexpr size_type npos = size_type(-1); +#elif nssv_CPP11_OR_GREATER + enum : size_type { npos = size_type(-1) }; +#else + enum { npos = size_type(-1) }; +#endif + +private: + struct not_in_view + { + const basic_string_view v; + + nssv_constexpr not_in_view( basic_string_view v ) : v( v ) {} + + nssv_constexpr bool operator()( CharT c ) const + { + return npos == v.find_first_of( c ); + } + }; + + nssv_constexpr size_type to_pos( const_iterator it ) const + { + return it == cend() ? npos : size_type( it - cbegin() ); + } + + nssv_constexpr size_type to_pos( const_reverse_iterator it ) const + { + return it == crend() ? npos : size_type( crend() - it - 1 ); + } + + nssv_constexpr const_reference data_at( size_type pos ) const + { +#if nssv_BETWEEN( nssv_COMPILER_GNUC_VERSION, 1, 500 ) + return data_[pos]; +#else + return assert( pos < size() ), data_[pos]; +#endif + } + +private: + const_pointer data_; + size_type size_; + +public: +#if nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS + + template< class Allocator > + basic_string_view( std::basic_string<CharT, Traits, Allocator> const & s ) nssv_noexcept + : data_( s.data() ) + , size_( s.size() ) + {} + +#if nssv_HAVE_EXPLICIT_CONVERSION + + template< class Allocator > + explicit operator std::basic_string<CharT, Traits, Allocator>() const + { + return to_string( Allocator() ); + } + +#endif // nssv_HAVE_EXPLICIT_CONVERSION + +#if nssv_CPP11_OR_GREATER + + template< class Allocator = std::allocator<CharT> > + std::basic_string<CharT, Traits, Allocator> + to_string( Allocator const & a = Allocator() ) const + { + return std::basic_string<CharT, Traits, Allocator>( begin(), end(), a ); + } + +#else + + std::basic_string<CharT, Traits> + to_string() const + { + return std::basic_string<CharT, Traits>( begin(), end() ); + } + + template< class Allocator > + std::basic_string<CharT, Traits, Allocator> + to_string( Allocator const & a ) const + { + return std::basic_string<CharT, Traits, Allocator>( begin(), end(), a ); + } + +#endif // nssv_CPP11_OR_GREATER + +#endif // nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS +}; + +// +// Non-member functions: +// + +// 24.4.3 Non-member comparison functions: +// lexicographically compare two string views (function template): + +template< class CharT, class Traits > +nssv_constexpr bool operator== ( + basic_string_view <CharT, Traits> lhs, + basic_string_view <CharT, Traits> rhs ) nssv_noexcept +{ return lhs.compare( rhs ) == 0 ; } + +template< class CharT, class Traits > +nssv_constexpr bool operator!= ( + basic_string_view <CharT, Traits> lhs, + basic_string_view <CharT, Traits> rhs ) nssv_noexcept +{ return lhs.compare( rhs ) != 0 ; } + +template< class CharT, class Traits > +nssv_constexpr bool operator< ( + basic_string_view <CharT, Traits> lhs, + basic_string_view <CharT, Traits> rhs ) nssv_noexcept +{ return lhs.compare( rhs ) < 0 ; } + +template< class CharT, class Traits > +nssv_constexpr bool operator<= ( + basic_string_view <CharT, Traits> lhs, + basic_string_view <CharT, Traits> rhs ) nssv_noexcept +{ return lhs.compare( rhs ) <= 0 ; } + +template< class CharT, class Traits > +nssv_constexpr bool operator> ( + basic_string_view <CharT, Traits> lhs, + basic_string_view <CharT, Traits> rhs ) nssv_noexcept +{ return lhs.compare( rhs ) > 0 ; } + +template< class CharT, class Traits > +nssv_constexpr bool operator>= ( + basic_string_view <CharT, Traits> lhs, + basic_string_view <CharT, Traits> rhs ) nssv_noexcept +{ return lhs.compare( rhs ) >= 0 ; } + +// Let S be basic_string_view<CharT, Traits>, and sv be an instance of S. +// Implementations shall provide sufficient additional overloads marked +// constexpr and noexcept so that an object t with an implicit conversion +// to S can be compared according to Table 67. + +#if nssv_CPP11_OR_GREATER && ! nssv_BETWEEN( nssv_COMPILER_MSVC_VERSION, 100, 141 ) + +#define nssv_BASIC_STRING_VIEW_I(T,U) typename std::decay< basic_string_view<T,U> >::type + +#if nssv_BETWEEN( nssv_COMPILER_MSVC_VERSION, 140, 150 ) +# define nssv_MSVC_ORDER(x) , int=x +#else +# define nssv_MSVC_ORDER(x) /*, int=x*/ +#endif + +// == + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator==( + basic_string_view <CharT, Traits> lhs, + nssv_BASIC_STRING_VIEW_I(CharT, Traits) rhs ) nssv_noexcept +{ return lhs.compare( rhs ) == 0; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator==( + nssv_BASIC_STRING_VIEW_I(CharT, Traits) lhs, + basic_string_view <CharT, Traits> rhs ) nssv_noexcept +{ return lhs.size() == rhs.size() && lhs.compare( rhs ) == 0; } + +// != + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator!= ( + basic_string_view < CharT, Traits > lhs, + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) rhs ) nssv_noexcept +{ return lhs.size() != rhs.size() || lhs.compare( rhs ) != 0 ; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator!= ( + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) lhs, + basic_string_view < CharT, Traits > rhs ) nssv_noexcept +{ return lhs.compare( rhs ) != 0 ; } + +// < + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator< ( + basic_string_view < CharT, Traits > lhs, + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) rhs ) nssv_noexcept +{ return lhs.compare( rhs ) < 0 ; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator< ( + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) lhs, + basic_string_view < CharT, Traits > rhs ) nssv_noexcept +{ return lhs.compare( rhs ) < 0 ; } + +// <= + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator<= ( + basic_string_view < CharT, Traits > lhs, + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) rhs ) nssv_noexcept +{ return lhs.compare( rhs ) <= 0 ; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator<= ( + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) lhs, + basic_string_view < CharT, Traits > rhs ) nssv_noexcept +{ return lhs.compare( rhs ) <= 0 ; } + +// > + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator> ( + basic_string_view < CharT, Traits > lhs, + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) rhs ) nssv_noexcept +{ return lhs.compare( rhs ) > 0 ; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator> ( + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) lhs, + basic_string_view < CharT, Traits > rhs ) nssv_noexcept +{ return lhs.compare( rhs ) > 0 ; } + +// >= + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator>= ( + basic_string_view < CharT, Traits > lhs, + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) rhs ) nssv_noexcept +{ return lhs.compare( rhs ) >= 0 ; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator>= ( + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) lhs, + basic_string_view < CharT, Traits > rhs ) nssv_noexcept +{ return lhs.compare( rhs ) >= 0 ; } + +#undef nssv_MSVC_ORDER +#undef nssv_BASIC_STRING_VIEW_I + +#endif // nssv_CPP11_OR_GREATER + +// 24.4.4 Inserters and extractors: + +namespace detail { + +template< class Stream > +void write_padding( Stream & os, std::streamsize n ) +{ + for ( std::streamsize i = 0; i < n; ++i ) + os.rdbuf()->sputc( os.fill() ); +} + +template< class Stream, class View > +Stream & write_to_stream( Stream & os, View const & sv ) +{ + typename Stream::sentry sentry( os ); + + if ( !os ) + return os; + + const std::streamsize length = static_cast<std::streamsize>( sv.length() ); + + // Whether, and how, to pad: + const bool pad = ( length < os.width() ); + const bool left_pad = pad && ( os.flags() & std::ios_base::adjustfield ) == std::ios_base::right; + + if ( left_pad ) + write_padding( os, os.width() - length ); + + // Write span characters: + os.rdbuf()->sputn( sv.begin(), length ); + + if ( pad && !left_pad ) + write_padding( os, os.width() - length ); + + // Reset output stream width: + os.width( 0 ); + + return os; +} + +} // namespace detail + +template< class CharT, class Traits > +std::basic_ostream<CharT, Traits> & +operator<<( + std::basic_ostream<CharT, Traits>& os, + basic_string_view <CharT, Traits> sv ) +{ + return detail::write_to_stream( os, sv ); +} + +// Several typedefs for common character types are provided: + +typedef basic_string_view<char> string_view; +typedef basic_string_view<wchar_t> wstring_view; +#if nssv_HAVE_WCHAR16_T +typedef basic_string_view<char16_t> u16string_view; +typedef basic_string_view<char32_t> u32string_view; +#endif + +}} // namespace nonstd::sv_lite + +// +// 24.4.6 Suffix for basic_string_view literals: +// + +#if nssv_HAVE_USER_DEFINED_LITERALS + +namespace nonstd { +nssv_inline_ns namespace literals { +nssv_inline_ns namespace string_view_literals { + +#if nssv_CONFIG_STD_SV_OPERATOR && nssv_HAVE_STD_DEFINED_LITERALS + +nssv_constexpr nonstd::sv_lite::string_view operator "" sv( const char* str, size_t len ) nssv_noexcept // (1) +{ + return nonstd::sv_lite::string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::u16string_view operator "" sv( const char16_t* str, size_t len ) nssv_noexcept // (2) +{ + return nonstd::sv_lite::u16string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::u32string_view operator "" sv( const char32_t* str, size_t len ) nssv_noexcept // (3) +{ + return nonstd::sv_lite::u32string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::wstring_view operator "" sv( const wchar_t* str, size_t len ) nssv_noexcept // (4) +{ + return nonstd::sv_lite::wstring_view{ str, len }; +} + +#endif // nssv_CONFIG_STD_SV_OPERATOR && nssv_HAVE_STD_DEFINED_LITERALS + +#if nssv_CONFIG_USR_SV_OPERATOR + +nssv_constexpr nonstd::sv_lite::string_view operator "" _sv( const char* str, size_t len ) nssv_noexcept // (1) +{ + return nonstd::sv_lite::string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::u16string_view operator "" _sv( const char16_t* str, size_t len ) nssv_noexcept // (2) +{ + return nonstd::sv_lite::u16string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::u32string_view operator "" _sv( const char32_t* str, size_t len ) nssv_noexcept // (3) +{ + return nonstd::sv_lite::u32string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::wstring_view operator "" _sv( const wchar_t* str, size_t len ) nssv_noexcept // (4) +{ + return nonstd::sv_lite::wstring_view{ str, len }; +} + +#endif // nssv_CONFIG_USR_SV_OPERATOR + +}}} // namespace nonstd::literals::string_view_literals + +#endif + +// +// Extensions for std::string: +// + +#if nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS + +namespace nonstd { +namespace sv_lite { + +// Exclude MSVC 14 (19.00): it yields ambiguous to_string(): + +#if nssv_CPP11_OR_GREATER && nssv_COMPILER_MSVC_VERSION != 140 + +template< class CharT, class Traits, class Allocator = std::allocator<CharT> > +std::basic_string<CharT, Traits, Allocator> +to_string( basic_string_view<CharT, Traits> v, Allocator const & a = Allocator() ) +{ + return std::basic_string<CharT,Traits, Allocator>( v.begin(), v.end(), a ); +} + +#else + +template< class CharT, class Traits > +std::basic_string<CharT, Traits> +to_string( basic_string_view<CharT, Traits> v ) +{ + return std::basic_string<CharT, Traits>( v.begin(), v.end() ); +} + +template< class CharT, class Traits, class Allocator > +std::basic_string<CharT, Traits, Allocator> +to_string( basic_string_view<CharT, Traits> v, Allocator const & a ) +{ + return std::basic_string<CharT, Traits, Allocator>( v.begin(), v.end(), a ); +} + +#endif // nssv_CPP11_OR_GREATER + +template< class CharT, class Traits, class Allocator > +basic_string_view<CharT, Traits> +to_string_view( std::basic_string<CharT, Traits, Allocator> const & s ) +{ + return basic_string_view<CharT, Traits>( s.data(), s.size() ); +} + +}} // namespace nonstd::sv_lite + +#endif // nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS + +// +// make types and algorithms available in namespace nonstd: +// + +namespace nonstd { + +using sv_lite::basic_string_view; +using sv_lite::string_view; +using sv_lite::wstring_view; + +#if nssv_HAVE_WCHAR16_T +using sv_lite::u16string_view; +#endif +#if nssv_HAVE_WCHAR32_T +using sv_lite::u32string_view; +#endif + +// literal "sv" + +using sv_lite::operator==; +using sv_lite::operator!=; +using sv_lite::operator<; +using sv_lite::operator<=; +using sv_lite::operator>; +using sv_lite::operator>=; + +using sv_lite::operator<<; + +#if nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS +using sv_lite::to_string; +using sv_lite::to_string_view; +#endif + +} // namespace nonstd + +// 24.4.5 Hash support (C++11): + +// Note: The hash value of a string view object is equal to the hash value of +// the corresponding string object. + +#if nssv_HAVE_STD_HASH + +#include <functional> + +namespace std { + +template<> +struct hash< nonstd::string_view > +{ +public: + std::size_t operator()( nonstd::string_view v ) const nssv_noexcept + { + return std::hash<std::string>()( std::string( v.data(), v.size() ) ); + } +}; + +template<> +struct hash< nonstd::wstring_view > +{ +public: + std::size_t operator()( nonstd::wstring_view v ) const nssv_noexcept + { + return std::hash<std::wstring>()( std::wstring( v.data(), v.size() ) ); + } +}; + +template<> +struct hash< nonstd::u16string_view > +{ +public: + std::size_t operator()( nonstd::u16string_view v ) const nssv_noexcept + { + return std::hash<std::u16string>()( std::u16string( v.data(), v.size() ) ); + } +}; + +template<> +struct hash< nonstd::u32string_view > +{ +public: + std::size_t operator()( nonstd::u32string_view v ) const nssv_noexcept + { + return std::hash<std::u32string>()( std::u32string( v.data(), v.size() ) ); + } +}; + +} // namespace std + +#endif // nssv_HAVE_STD_HASH + +nssv_RESTORE_WARNINGS() + +#endif // nssv_HAVE_STD_STRING_VIEW +#endif // NONSTD_SV_LITE_H_INCLUDED + + + +namespace inja { + +enum class ElementNotation { + Dot, + Pointer +}; + +struct LexerConfig { + std::string statement_open {"{%"}; + std::string statement_close {"%}"}; + std::string line_statement {"##"}; + std::string expression_open {"{{"}; + std::string expression_close {"}}"}; + std::string comment_open {"{#"}; + std::string comment_close {"#}"}; + std::string open_chars {"#{"}; + + void update_open_chars() { + open_chars = ""; + if (open_chars.find(line_statement[0]) == std::string::npos) { + open_chars += line_statement[0]; + } + if (open_chars.find(statement_open[0]) == std::string::npos) { + open_chars += statement_open[0]; + } + if (open_chars.find(expression_open[0]) == std::string::npos) { + open_chars += expression_open[0]; + } + if (open_chars.find(comment_open[0]) == std::string::npos) { + open_chars += comment_open[0]; + } + } +}; + +struct ParserConfig { + ElementNotation notation {ElementNotation::Dot}; +}; + +} + +#endif // PANTOR_INJA_CONFIG_HPP + +// #include "function_storage.hpp" +#ifndef PANTOR_INJA_FUNCTION_STORAGE_HPP +#define PANTOR_INJA_FUNCTION_STORAGE_HPP + +// #include "bytecode.hpp" +#ifndef PANTOR_INJA_BYTECODE_HPP +#define PANTOR_INJA_BYTECODE_HPP + +#include <utility> + +#include <nlohmann/json.hpp> + +// #include "string_view.hpp" + + + +namespace inja { + +using namespace nlohmann; + + +struct Bytecode { + enum class Op : uint8_t { + Nop, + // print StringRef (always immediate) + PrintText, + // print value + PrintValue, + // push value onto stack (always immediate) + Push, + + // builtin functions + // result is pushed to stack + // args specify number of arguments + // all functions can take their "last" argument either immediate + // or popped off stack (e.g. if immediate, it's like the immediate was + // just pushed to the stack) + Not, + And, + Or, + In, + Equal, + Greater, + GreaterEqual, + Less, + LessEqual, + Different, + DivisibleBy, + Even, + First, + Float, + Int, + Last, + Length, + Lower, + Max, + Min, + Odd, + Range, + Result, + Round, + Sort, + Upper, + Exists, + ExistsInObject, + IsBoolean, + IsNumber, + IsInteger, + IsFloat, + IsObject, + IsArray, + IsString, + Default, + + // include another template + // value is the template name + Include, + + // callback function + // str is the function name (this means it cannot be a lookup) + // args specify number of arguments + // as with builtin functions, "last" argument can be immediate + Callback, + + // unconditional jump + // args is the index of the bytecode to jump to. + Jump, + + // conditional jump + // value popped off stack is checked for truthyness + // if false, args is the index of the bytecode to jump to. + // if true, no action is taken (falls through) + ConditionalJump, + + // start loop + // value popped off stack is what is iterated over + // args is index of bytecode after end loop (jumped to if iterable is + // empty) + // immediate value is key name (for maps) + // str is value name + StartLoop, + + // end a loop + // args is index of the first bytecode in the loop body + EndLoop, + }; + + enum Flag { + // location of value for value-taking ops (mask) + ValueMask = 0x03, + // pop value off stack + ValuePop = 0x00, + // value is immediate rather than on stack + ValueImmediate = 0x01, + // lookup immediate str (dot notation) + ValueLookupDot = 0x02, + // lookup immediate str (json pointer notation) + ValueLookupPointer = 0x03, + }; + + Op op {Op::Nop}; + uint32_t args: 30; + uint32_t flags: 2; + + json value; + std::string str; + + Bytecode(): args(0), flags(0) {} + explicit Bytecode(Op op, unsigned int args = 0): op(op), args(args), flags(0) {} + explicit Bytecode(Op op, nonstd::string_view str, unsigned int flags): op(op), args(0), flags(flags), str(str) {} + explicit Bytecode(Op op, json&& value, unsigned int flags): op(op), args(0), flags(flags), value(std::move(value)) {} +}; + +} // namespace inja + +#endif // PANTOR_INJA_BYTECODE_HPP + +// #include "string_view.hpp" + + + +namespace inja { + +using namespace nlohmann; + +using Arguments = std::vector<const json*>; +using CallbackFunction = std::function<json(Arguments& args)>; + +class FunctionStorage { + public: + void add_builtin(nonstd::string_view name, unsigned int num_args, Bytecode::Op op) { + auto& data = get_or_new(name, num_args); + data.op = op; + } + + void add_callback(nonstd::string_view name, unsigned int num_args, const CallbackFunction& function) { + auto& data = get_or_new(name, num_args); + data.function = function; + } + + Bytecode::Op find_builtin(nonstd::string_view name, unsigned int num_args) const { + if (auto ptr = get(name, num_args)) { + return ptr->op; + } + return Bytecode::Op::Nop; + } + + CallbackFunction find_callback(nonstd::string_view name, unsigned int num_args) const { + if (auto ptr = get(name, num_args)) { + return ptr->function; + } + return nullptr; + } + + private: + struct FunctionData { + unsigned int num_args {0}; + Bytecode::Op op {Bytecode::Op::Nop}; // for builtins + CallbackFunction function; // for callbacks + }; + + FunctionData& get_or_new(nonstd::string_view name, unsigned int num_args) { + auto &vec = m_map[static_cast<std::string>(name)]; + for (auto &i: vec) { + if (i.num_args == num_args) return i; + } + vec.emplace_back(); + vec.back().num_args = num_args; + return vec.back(); + } + + const FunctionData* get(nonstd::string_view name, unsigned int num_args) const { + auto it = m_map.find(static_cast<std::string>(name)); + if (it == m_map.end()) return nullptr; + for (auto &&i: it->second) { + if (i.num_args == num_args) return &i; + } + return nullptr; + } + + std::map<std::string, std::vector<FunctionData>> m_map; +}; + +} + +#endif // PANTOR_INJA_FUNCTION_STORAGE_HPP + +// #include "parser.hpp" +#ifndef PANTOR_INJA_PARSER_HPP +#define PANTOR_INJA_PARSER_HPP + +#include <limits> + +// #include "bytecode.hpp" + +// #include "config.hpp" + +// #include "function_storage.hpp" + +// #include "lexer.hpp" +#ifndef PANTOR_INJA_LEXER_HPP +#define PANTOR_INJA_LEXER_HPP + +#include <cctype> +#include <locale> + +// #include "config.hpp" + +// #include "token.hpp" +#ifndef PANTOR_INJA_TOKEN_HPP +#define PANTOR_INJA_TOKEN_HPP + +// #include "string_view.hpp" + + + +namespace inja { + +struct Token { + enum class Kind { + Text, + ExpressionOpen, // {{ + ExpressionClose, // }} + LineStatementOpen, // ## + LineStatementClose, // \n + StatementOpen, // {% + StatementClose, // %} + CommentOpen, // {# + CommentClose, // #} + Id, // this, this.foo + Number, // 1, 2, -1, 5.2, -5.3 + String, // "this" + Comma, // , + Colon, // : + LeftParen, // ( + RightParen, // ) + LeftBracket, // [ + RightBracket, // ] + LeftBrace, // { + RightBrace, // } + Equal, // == + GreaterThan, // > + GreaterEqual, // >= + LessThan, // < + LessEqual, // <= + NotEqual, // != + Unknown, + Eof + } kind {Kind::Unknown}; + + nonstd::string_view text; + + constexpr Token() = default; + constexpr Token(Kind kind, nonstd::string_view text): kind(kind), text(text) {} + + std::string describe() const { + switch (kind) { + case Kind::Text: + return "<text>"; + case Kind::LineStatementClose: + return "<eol>"; + case Kind::Eof: + return "<eof>"; + default: + return static_cast<std::string>(text); + } + } +}; + +} + +#endif // PANTOR_INJA_TOKEN_HPP + +// #include "utils.hpp" +#ifndef PANTOR_INJA_UTILS_HPP +#define PANTOR_INJA_UTILS_HPP + +#include <stdexcept> + +// #include "string_view.hpp" + + + +namespace inja { + +inline void inja_throw(const std::string& type, const std::string& message) { + throw std::runtime_error("[inja.exception." + type + "] " + message); +} + +namespace string_view { + inline nonstd::string_view slice(nonstd::string_view view, size_t start, size_t end) { + start = std::min(start, view.size()); + end = std::min(std::max(start, end), view.size()); + return view.substr(start, end - start); // StringRef(Data + Start, End - Start); + } + + inline std::pair<nonstd::string_view, nonstd::string_view> split(nonstd::string_view view, char Separator) { + size_t idx = view.find(Separator); + if (idx == nonstd::string_view::npos) { + return std::make_pair(view, nonstd::string_view()); + } + return std::make_pair(slice(view, 0, idx), slice(view, idx + 1, nonstd::string_view::npos)); + } + + inline bool starts_with(nonstd::string_view view, nonstd::string_view prefix) { + return (view.size() >= prefix.size() && view.compare(0, prefix.size(), prefix) == 0); + } +} // namespace string + +} // namespace inja + +#endif // PANTOR_INJA_UTILS_HPP + + + +namespace inja { + +class Lexer { + enum class State { + Text, + ExpressionStart, + ExpressionBody, + LineStart, + LineBody, + StatementStart, + StatementBody, + CommentStart, + CommentBody + } m_state; + + const LexerConfig& m_config; + nonstd::string_view m_in; + size_t m_tok_start; + size_t m_pos; + + public: + explicit Lexer(const LexerConfig& config) : m_config(config) {} + + void start(nonstd::string_view in) { + m_in = in; + m_tok_start = 0; + m_pos = 0; + m_state = State::Text; + } + + Token scan() { + m_tok_start = m_pos; + + again: + if (m_tok_start >= m_in.size()) return make_token(Token::Kind::Eof); + + switch (m_state) { + default: + case State::Text: { + // fast-scan to first open character + size_t open_start = m_in.substr(m_pos).find_first_of(m_config.open_chars); + if (open_start == nonstd::string_view::npos) { + // didn't find open, return remaining text as text token + m_pos = m_in.size(); + return make_token(Token::Kind::Text); + } + m_pos += open_start; + + // try to match one of the opening sequences, and get the close + nonstd::string_view open_str = m_in.substr(m_pos); + if (inja::string_view::starts_with(open_str, m_config.expression_open)) { + m_state = State::ExpressionStart; + } else if (inja::string_view::starts_with(open_str, m_config.statement_open)) { + m_state = State::StatementStart; + } else if (inja::string_view::starts_with(open_str, m_config.comment_open)) { + m_state = State::CommentStart; + } else if ((m_pos == 0 || m_in[m_pos - 1] == '\n') && + inja::string_view::starts_with(open_str, m_config.line_statement)) { + m_state = State::LineStart; + } else { + m_pos += 1; // wasn't actually an opening sequence + goto again; + } + if (m_pos == m_tok_start) goto again; // don't generate empty token + return make_token(Token::Kind::Text); + } + case State::ExpressionStart: { + m_state = State::ExpressionBody; + m_pos += m_config.expression_open.size(); + return make_token(Token::Kind::ExpressionOpen); + } + case State::LineStart: { + m_state = State::LineBody; + m_pos += m_config.line_statement.size(); + return make_token(Token::Kind::LineStatementOpen); + } + case State::StatementStart: { + m_state = State::StatementBody; + m_pos += m_config.statement_open.size(); + return make_token(Token::Kind::StatementOpen); + } + case State::CommentStart: { + m_state = State::CommentBody; + m_pos += m_config.comment_open.size(); + return make_token(Token::Kind::CommentOpen); + } + case State::ExpressionBody: + return scan_body(m_config.expression_close, Token::Kind::ExpressionClose); + case State::LineBody: + return scan_body("\n", Token::Kind::LineStatementClose); + case State::StatementBody: + return scan_body(m_config.statement_close, Token::Kind::StatementClose); + case State::CommentBody: { + // fast-scan to comment close + size_t end = m_in.substr(m_pos).find(m_config.comment_close); + if (end == nonstd::string_view::npos) { + m_pos = m_in.size(); + return make_token(Token::Kind::Eof); + } + // return the entire comment in the close token + m_state = State::Text; + m_pos += end + m_config.comment_close.size(); + return make_token(Token::Kind::CommentClose); + } + } + } + + const LexerConfig& get_config() const { return m_config; } + + private: + Token scan_body(nonstd::string_view close, Token::Kind closeKind) { + again: + // skip whitespace (except for \n as it might be a close) + if (m_tok_start >= m_in.size()) return make_token(Token::Kind::Eof); + char ch = m_in[m_tok_start]; + if (ch == ' ' || ch == '\t' || ch == '\r') { + m_tok_start += 1; + goto again; + } + + // check for close + if (inja::string_view::starts_with(m_in.substr(m_tok_start), close)) { + m_state = State::Text; + m_pos = m_tok_start + close.size(); + return make_token(closeKind); + } + + // skip \n + if (ch == '\n') { + m_tok_start += 1; + goto again; + } + + m_pos = m_tok_start + 1; + if (std::isalpha(ch)) return scan_id(); + switch (ch) { + case ',': + return make_token(Token::Kind::Comma); + case ':': + return make_token(Token::Kind::Colon); + case '(': + return make_token(Token::Kind::LeftParen); + case ')': + return make_token(Token::Kind::RightParen); + case '[': + return make_token(Token::Kind::LeftBracket); + case ']': + return make_token(Token::Kind::RightBracket); + case '{': + return make_token(Token::Kind::LeftBrace); + case '}': + return make_token(Token::Kind::RightBrace); + case '>': + if (m_pos < m_in.size() && m_in[m_pos] == '=') { + m_pos += 1; + return make_token(Token::Kind::GreaterEqual); + } + return make_token(Token::Kind::GreaterThan); + case '<': + if (m_pos < m_in.size() && m_in[m_pos] == '=') { + m_pos += 1; + return make_token(Token::Kind::LessEqual); + } + return make_token(Token::Kind::LessThan); + case '=': + if (m_pos < m_in.size() && m_in[m_pos] == '=') { + m_pos += 1; + return make_token(Token::Kind::Equal); + } + return make_token(Token::Kind::Unknown); + case '!': + if (m_pos < m_in.size() && m_in[m_pos] == '=') { + m_pos += 1; + return make_token(Token::Kind::NotEqual); + } + return make_token(Token::Kind::Unknown); + case '\"': + return scan_string(); + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case '-': + return scan_number(); + case '_': + return scan_id(); + default: + return make_token(Token::Kind::Unknown); + } + } + + Token scan_id() { + for (;;) { + if (m_pos >= m_in.size()) { + break; + } + char ch = m_in[m_pos]; + if (!std::isalnum(ch) && ch != '.' && ch != '/' && ch != '_' && ch != '-') { + break; + } + m_pos += 1; + } + return make_token(Token::Kind::Id); + } + + Token scan_number() { + for (;;) { + if (m_pos >= m_in.size()) { + break; + } + char ch = m_in[m_pos]; + // be very permissive in lexer (we'll catch errors when conversion happens) + if (!std::isdigit(ch) && ch != '.' && ch != 'e' && ch != 'E' && ch != '+' && ch != '-') { + break; + } + m_pos += 1; + } + return make_token(Token::Kind::Number); + } + + Token scan_string() { + bool escape {false}; + for (;;) { + if (m_pos >= m_in.size()) break; + char ch = m_in[m_pos++]; + if (ch == '\\') { + escape = true; + } else if (!escape && ch == m_in[m_tok_start]) { + break; + } else { + escape = false; + } + } + return make_token(Token::Kind::String); + } + + Token make_token(Token::Kind kind) const { + return Token(kind, string_view::slice(m_in, m_tok_start, m_pos)); + } +}; + +} + +#endif // PANTOR_INJA_LEXER_HPP + +// #include "template.hpp" +#ifndef PANTOR_INJA_TEMPLATE_HPP +#define PANTOR_INJA_TEMPLATE_HPP + +#include <string> +#include <vector> + +// #include "bytecode.hpp" + + + +namespace inja { + +struct Template { + std::vector<Bytecode> bytecodes; + std::string content; +}; + +using TemplateStorage = std::map<std::string, Template>; + +} + +#endif // PANTOR_INJA_TEMPLATE_HPP + +// #include "token.hpp" + +// #include "utils.hpp" + + +#include <nlohmann/json.hpp> + + +namespace inja { + +class ParserStatic { + ParserStatic() { + functions.add_builtin("default", 2, Bytecode::Op::Default); + functions.add_builtin("divisibleBy", 2, Bytecode::Op::DivisibleBy); + functions.add_builtin("even", 1, Bytecode::Op::Even); + functions.add_builtin("first", 1, Bytecode::Op::First); + functions.add_builtin("float", 1, Bytecode::Op::Float); + functions.add_builtin("int", 1, Bytecode::Op::Int); + functions.add_builtin("last", 1, Bytecode::Op::Last); + functions.add_builtin("length", 1, Bytecode::Op::Length); + functions.add_builtin("lower", 1, Bytecode::Op::Lower); + functions.add_builtin("max", 1, Bytecode::Op::Max); + functions.add_builtin("min", 1, Bytecode::Op::Min); + functions.add_builtin("odd", 1, Bytecode::Op::Odd); + functions.add_builtin("range", 1, Bytecode::Op::Range); + functions.add_builtin("round", 2, Bytecode::Op::Round); + functions.add_builtin("sort", 1, Bytecode::Op::Sort); + functions.add_builtin("upper", 1, Bytecode::Op::Upper); + functions.add_builtin("exists", 1, Bytecode::Op::Exists); + functions.add_builtin("existsIn", 2, Bytecode::Op::ExistsInObject); + functions.add_builtin("isBoolean", 1, Bytecode::Op::IsBoolean); + functions.add_builtin("isNumber", 1, Bytecode::Op::IsNumber); + functions.add_builtin("isInteger", 1, Bytecode::Op::IsInteger); + functions.add_builtin("isFloat", 1, Bytecode::Op::IsFloat); + functions.add_builtin("isObject", 1, Bytecode::Op::IsObject); + functions.add_builtin("isArray", 1, Bytecode::Op::IsArray); + functions.add_builtin("isString", 1, Bytecode::Op::IsString); + } + + public: + ParserStatic(const ParserStatic&) = delete; + ParserStatic& operator=(const ParserStatic&) = delete; + + static const ParserStatic& get_instance() { + static ParserStatic inst; + return inst; + } + + FunctionStorage functions; +}; + +class Parser { + public: + explicit Parser(const ParserConfig& parser_config, const LexerConfig& lexer_config, TemplateStorage& included_templates): m_config(parser_config), m_lexer(lexer_config), m_included_templates(included_templates), m_static(ParserStatic::get_instance()) { } + + bool parse_expression(Template& tmpl) { + if (!parse_expression_and(tmpl)) return false; + if (m_tok.kind != Token::Kind::Id || m_tok.text != "or") return true; + get_next_token(); + if (!parse_expression_and(tmpl)) return false; + append_function(tmpl, Bytecode::Op::Or, 2); + return true; + } + + bool parse_expression_and(Template& tmpl) { + if (!parse_expression_not(tmpl)) return false; + if (m_tok.kind != Token::Kind::Id || m_tok.text != "and") return true; + get_next_token(); + if (!parse_expression_not(tmpl)) return false; + append_function(tmpl, Bytecode::Op::And, 2); + return true; + } + + bool parse_expression_not(Template& tmpl) { + if (m_tok.kind == Token::Kind::Id && m_tok.text == "not") { + get_next_token(); + if (!parse_expression_not(tmpl)) return false; + append_function(tmpl, Bytecode::Op::Not, 1); + return true; + } else { + return parse_expression_comparison(tmpl); + } + } + + bool parse_expression_comparison(Template& tmpl) { + if (!parse_expression_datum(tmpl)) return false; + Bytecode::Op op; + switch (m_tok.kind) { + case Token::Kind::Id: + if (m_tok.text == "in") + op = Bytecode::Op::In; + else + return true; + break; + case Token::Kind::Equal: + op = Bytecode::Op::Equal; + break; + case Token::Kind::GreaterThan: + op = Bytecode::Op::Greater; + break; + case Token::Kind::LessThan: + op = Bytecode::Op::Less; + break; + case Token::Kind::LessEqual: + op = Bytecode::Op::LessEqual; + break; + case Token::Kind::GreaterEqual: + op = Bytecode::Op::GreaterEqual; + break; + case Token::Kind::NotEqual: + op = Bytecode::Op::Different; + break; + default: + return true; + } + get_next_token(); + if (!parse_expression_datum(tmpl)) return false; + append_function(tmpl, op, 2); + return true; + } + + bool parse_expression_datum(Template& tmpl) { + nonstd::string_view json_first; + size_t bracket_level = 0; + size_t brace_level = 0; + + for (;;) { + switch (m_tok.kind) { + case Token::Kind::LeftParen: { + get_next_token(); + if (!parse_expression(tmpl)) return false; + if (m_tok.kind != Token::Kind::RightParen) { + inja_throw("parser_error", "unmatched '('"); + } + get_next_token(); + return true; + } + case Token::Kind::Id: + get_peek_token(); + if (m_peek_tok.kind == Token::Kind::LeftParen) { + // function call, parse arguments + Token func_token = m_tok; + get_next_token(); // id + get_next_token(); // leftParen + unsigned int num_args = 0; + if (m_tok.kind == Token::Kind::RightParen) { + // no args + get_next_token(); + } else { + for (;;) { + if (!parse_expression(tmpl)) { + inja_throw("parser_error", "expected expression, got '" + m_tok.describe() + "'"); + } + num_args += 1; + if (m_tok.kind == Token::Kind::RightParen) { + get_next_token(); + break; + } + if (m_tok.kind != Token::Kind::Comma) { + inja_throw("parser_error", "expected ')' or ',', got '" + m_tok.describe() + "'"); + } + get_next_token(); + } + } + + auto op = m_static.functions.find_builtin(func_token.text, num_args); + + if (op != Bytecode::Op::Nop) { + // swap arguments for default(); see comment in RenderTo() + if (op == Bytecode::Op::Default) + std::swap(tmpl.bytecodes.back(), *(tmpl.bytecodes.rbegin() + 1)); + append_function(tmpl, op, num_args); + return true; + } else { + append_callback(tmpl, func_token.text, num_args); + return true; + } + } else if (m_tok.text == "true" || m_tok.text == "false" || m_tok.text == "null") { + // true, false, null are json literals + if (brace_level == 0 && bracket_level == 0) { + json_first = m_tok.text; + goto returnJson; + } + break; + } else { + // normal literal (json read) + tmpl.bytecodes.emplace_back( + Bytecode::Op::Push, m_tok.text, + m_config.notation == ElementNotation::Pointer ? Bytecode::Flag::ValueLookupPointer : Bytecode::Flag::ValueLookupDot); + get_next_token(); + return true; + } + // json passthrough + case Token::Kind::Number: + case Token::Kind::String: + if (brace_level == 0 && bracket_level == 0) { + json_first = m_tok.text; + goto returnJson; + } + break; + case Token::Kind::Comma: + case Token::Kind::Colon: + if (brace_level == 0 && bracket_level == 0) { + inja_throw("parser_error", "unexpected token '" + m_tok.describe() + "'"); + } + break; + case Token::Kind::LeftBracket: + if (brace_level == 0 && bracket_level == 0) { + json_first = m_tok.text; + } + bracket_level += 1; + break; + case Token::Kind::LeftBrace: + if (brace_level == 0 && bracket_level == 0) { + json_first = m_tok.text; + } + brace_level += 1; + break; + case Token::Kind::RightBracket: + if (bracket_level == 0) { + inja_throw("parser_error", "unexpected ']'"); + } + --bracket_level; + if (brace_level == 0 && bracket_level == 0) goto returnJson; + break; + case Token::Kind::RightBrace: + if (brace_level == 0) { + inja_throw("parser_error", "unexpected '}'"); + } + --brace_level; + if (brace_level == 0 && bracket_level == 0) goto returnJson; + break; + default: + if (brace_level != 0) { + inja_throw("parser_error", "unmatched '{'"); + } + if (bracket_level != 0) { + inja_throw("parser_error", "unmatched '['"); + } + return false; + } + + get_next_token(); + } + + returnJson: + // bridge across all intermediate tokens + nonstd::string_view json_text(json_first.data(), m_tok.text.data() - json_first.data() + m_tok.text.size()); + tmpl.bytecodes.emplace_back(Bytecode::Op::Push, json::parse(json_text), Bytecode::Flag::ValueImmediate); + get_next_token(); + return true; + } + + bool parse_statement(Template& tmpl, nonstd::string_view path) { + if (m_tok.kind != Token::Kind::Id) return false; + + if (m_tok.text == "if") { + get_next_token(); + + // evaluate expression + if (!parse_expression(tmpl)) return false; + + // start a new if block on if stack + m_if_stack.emplace_back(tmpl.bytecodes.size()); + + // conditional jump; destination will be filled in by else or endif + tmpl.bytecodes.emplace_back(Bytecode::Op::ConditionalJump); + } else if (m_tok.text == "endif") { + if (m_if_stack.empty()) { + inja_throw("parser_error", "endif without matching if"); + } + auto& if_data = m_if_stack.back(); + get_next_token(); + + // previous conditional jump jumps here + if (if_data.prev_cond_jump != std::numeric_limits<unsigned int>::max()) { + tmpl.bytecodes[if_data.prev_cond_jump].args = tmpl.bytecodes.size(); + } + + // update all previous unconditional jumps to here + for (unsigned int i: if_data.uncond_jumps) { + tmpl.bytecodes[i].args = tmpl.bytecodes.size(); + } + + // pop if stack + m_if_stack.pop_back(); + } else if (m_tok.text == "else") { + if (m_if_stack.empty()) + inja_throw("parser_error", "else without matching if"); + auto& if_data = m_if_stack.back(); + get_next_token(); + + // end previous block with unconditional jump to endif; destination will be + // filled in by endif + if_data.uncond_jumps.push_back(tmpl.bytecodes.size()); + tmpl.bytecodes.emplace_back(Bytecode::Op::Jump); + + // previous conditional jump jumps here + tmpl.bytecodes[if_data.prev_cond_jump].args = tmpl.bytecodes.size(); + if_data.prev_cond_jump = std::numeric_limits<unsigned int>::max(); + + // chained else if + if (m_tok.kind == Token::Kind::Id && m_tok.text == "if") { + get_next_token(); + + // evaluate expression + if (!parse_expression(tmpl)) return false; + + // update "previous jump" + if_data.prev_cond_jump = tmpl.bytecodes.size(); + + // conditional jump; destination will be filled in by else or endif + tmpl.bytecodes.emplace_back(Bytecode::Op::ConditionalJump); + } + } else if (m_tok.text == "for") { + get_next_token(); + + // options: for a in arr; for a, b in obj + if (m_tok.kind != Token::Kind::Id) + inja_throw("parser_error", "expected id, got '" + m_tok.describe() + "'"); + Token value_token = m_tok; + get_next_token(); + + Token key_token; + if (m_tok.kind == Token::Kind::Comma) { + get_next_token(); + if (m_tok.kind != Token::Kind::Id) + inja_throw("parser_error", "expected id, got '" + m_tok.describe() + "'"); + key_token = std::move(value_token); + value_token = m_tok; + get_next_token(); + } + + if (m_tok.kind != Token::Kind::Id || m_tok.text != "in") + inja_throw("parser_error", + "expected 'in', got '" + m_tok.describe() + "'"); + get_next_token(); + + if (!parse_expression(tmpl)) return false; + + m_loop_stack.push_back(tmpl.bytecodes.size()); + + tmpl.bytecodes.emplace_back(Bytecode::Op::StartLoop); + if (!key_token.text.empty()) { + tmpl.bytecodes.back().value = key_token.text; + } + tmpl.bytecodes.back().str = static_cast<std::string>(value_token.text); + } else if (m_tok.text == "endfor") { + get_next_token(); + if (m_loop_stack.empty()) { + inja_throw("parser_error", "endfor without matching for"); + } + + // update loop with EndLoop index (for empty case) + tmpl.bytecodes[m_loop_stack.back()].args = tmpl.bytecodes.size(); + + tmpl.bytecodes.emplace_back(Bytecode::Op::EndLoop); + tmpl.bytecodes.back().args = m_loop_stack.back() + 1; // loop body + m_loop_stack.pop_back(); + } else if (m_tok.text == "include") { + get_next_token(); + + if (m_tok.kind != Token::Kind::String) { + inja_throw("parser_error", "expected string, got '" + m_tok.describe() + "'"); + } + + // build the relative path + json json_name = json::parse(m_tok.text); + std::string pathname = static_cast<std::string>(path); + pathname += json_name.get_ref<const std::string&>(); + if (pathname.compare(0, 2, "./") == 0) { + pathname.erase(0, 2); + } + // sys::path::remove_dots(pathname, true, sys::path::Style::posix); + + Template include_template = parse_template(pathname); + m_included_templates.emplace(pathname, include_template); + + // generate a reference bytecode + tmpl.bytecodes.emplace_back(Bytecode::Op::Include, json(pathname), Bytecode::Flag::ValueImmediate); + + get_next_token(); + } else { + return false; + } + return true; + } + + void append_function(Template& tmpl, Bytecode::Op op, unsigned int num_args) { + // we can merge with back-to-back push + if (!tmpl.bytecodes.empty()) { + Bytecode& last = tmpl.bytecodes.back(); + if (last.op == Bytecode::Op::Push) { + last.op = op; + last.args = num_args; + return; + } + } + + // otherwise just add it to the end + tmpl.bytecodes.emplace_back(op, num_args); + } + + void append_callback(Template& tmpl, nonstd::string_view name, unsigned int num_args) { + // we can merge with back-to-back push value (not lookup) + if (!tmpl.bytecodes.empty()) { + Bytecode& last = tmpl.bytecodes.back(); + if (last.op == Bytecode::Op::Push && + (last.flags & Bytecode::Flag::ValueMask) == Bytecode::Flag::ValueImmediate) { + last.op = Bytecode::Op::Callback; + last.args = num_args; + last.str = static_cast<std::string>(name); + return; + } + } + + // otherwise just add it to the end + tmpl.bytecodes.emplace_back(Bytecode::Op::Callback, num_args); + tmpl.bytecodes.back().str = static_cast<std::string>(name); + } + + void parse_into(Template& tmpl, nonstd::string_view path) { + m_lexer.start(tmpl.content); + + for (;;) { + get_next_token(); + switch (m_tok.kind) { + case Token::Kind::Eof: + if (!m_if_stack.empty()) inja_throw("parser_error", "unmatched if"); + if (!m_loop_stack.empty()) inja_throw("parser_error", "unmatched for"); + return; + case Token::Kind::Text: + tmpl.bytecodes.emplace_back(Bytecode::Op::PrintText, m_tok.text, 0u); + break; + case Token::Kind::StatementOpen: + get_next_token(); + if (!parse_statement(tmpl, path)) { + inja_throw("parser_error", "expected statement, got '" + m_tok.describe() + "'"); + } + if (m_tok.kind != Token::Kind::StatementClose) { + inja_throw("parser_error", "expected statement close, got '" + m_tok.describe() + "'"); + } + break; + case Token::Kind::LineStatementOpen: + get_next_token(); + parse_statement(tmpl, path); + if (m_tok.kind != Token::Kind::LineStatementClose && + m_tok.kind != Token::Kind::Eof) { + inja_throw("parser_error", "expected line statement close, got '" + m_tok.describe() + "'"); + } + break; + case Token::Kind::ExpressionOpen: + get_next_token(); + if (!parse_expression(tmpl)) { + inja_throw("parser_error", "expected expression, got '" + m_tok.describe() + "'"); + } + append_function(tmpl, Bytecode::Op::PrintValue, 1); + if (m_tok.kind != Token::Kind::ExpressionClose) { + inja_throw("parser_error", "expected expression close, got '" + m_tok.describe() + "'"); + } + break; + case Token::Kind::CommentOpen: + get_next_token(); + if (m_tok.kind != Token::Kind::CommentClose) { + inja_throw("parser_error", "expected comment close, got '" + m_tok.describe() + "'"); + } + break; + default: + inja_throw("parser_error", "unexpected token '" + m_tok.describe() + "'"); + break; + } + } + } + + Template parse(nonstd::string_view input, nonstd::string_view path) { + Template result; + result.content = static_cast<std::string>(input); + parse_into(result, path); + return result; + } + + Template parse(nonstd::string_view input) { + return parse(input, "./"); + } + + Template parse_template(nonstd::string_view filename) { + Template result; + result.content = load_file(filename); + + nonstd::string_view path = filename.substr(0, filename.find_last_of("/\\") + 1); + // StringRef path = sys::path::parent_path(filename); + Parser(m_config, m_lexer.get_config(), m_included_templates).parse_into(result, path); + return result; + } + + std::string load_file(nonstd::string_view filename) { + std::ifstream file(static_cast<std::string>(filename)); + std::string text((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>()); + return text; + } + + private: + const ParserConfig& m_config; + Lexer m_lexer; + Token m_tok; + Token m_peek_tok; + bool m_have_peek_tok {false}; + TemplateStorage& m_included_templates; + const ParserStatic& m_static; + + struct IfData { + unsigned int prev_cond_jump; + std::vector<unsigned int> uncond_jumps; + + explicit IfData(unsigned int condJump): prev_cond_jump(condJump) {} + }; + + std::vector<IfData> m_if_stack; + std::vector<unsigned int> m_loop_stack; + + void get_next_token() { + if (m_have_peek_tok) { + m_tok = m_peek_tok; + m_have_peek_tok = false; + } else { + m_tok = m_lexer.scan(); + } + } + + void get_peek_token() { + if (!m_have_peek_tok) { + m_peek_tok = m_lexer.scan(); + m_have_peek_tok = true; + } + } +}; + +} // namespace inja + +#endif // PANTOR_INJA_PARSER_HPP + +// #include "polyfill.hpp" +#ifndef PANTOR_INJA_POLYFILL_HPP +#define PANTOR_INJA_POLYFILL_HPP + + +#if __cplusplus < 201402L + +#include <cstddef> +#include <type_traits> +#include <utility> + + +namespace stdinja { + template<class T> struct _Unique_if { + typedef std::unique_ptr<T> _Single_object; + }; + + template<class T> struct _Unique_if<T[]> { + typedef std::unique_ptr<T[]> _Unknown_bound; + }; + + template<class T, size_t N> struct _Unique_if<T[N]> { + typedef void _Known_bound; + }; + + template<class T, class... Args> + typename _Unique_if<T>::_Single_object + make_unique(Args&&... args) { + return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); + } + + template<class T> + typename _Unique_if<T>::_Unknown_bound + make_unique(size_t n) { + typedef typename std::remove_extent<T>::type U; + return std::unique_ptr<T>(new U[n]()); + } + + template<class T, class... Args> + typename _Unique_if<T>::_Known_bound + make_unique(Args&&...) = delete; +} + +#else + +namespace stdinja = std; + +#endif // memory */ + + +#endif // PANTOR_INJA_POLYFILL_HPP + +// #include "renderer.hpp" +#ifndef PANTOR_INJA_RENDERER_HPP +#define PANTOR_INJA_RENDERER_HPP + +#include <algorithm> +#include <numeric> + +#include <nlohmann/json.hpp> + +// #include "bytecode.hpp" + +// #include "template.hpp" + +// #include "utils.hpp" + + + +namespace inja { + +inline nonstd::string_view convert_dot_to_json_pointer(nonstd::string_view dot, std::string& out) { + out.clear(); + do { + nonstd::string_view part; + std::tie(part, dot) = string_view::split(dot, '.'); + out.push_back('/'); + out.append(part.begin(), part.end()); + } while (!dot.empty()); + return nonstd::string_view(out.data(), out.size()); +} + +class Renderer { + std::vector<const json*>& get_args(const Bytecode& bc) { + m_tmp_args.clear(); + + bool has_imm = ((bc.flags & Bytecode::Flag::ValueMask) != Bytecode::Flag::ValuePop); + + // get args from stack + unsigned int pop_args = bc.args; + if (has_imm) { + pop_args -= 1; + } + + for (auto i = std::prev(m_stack.end(), pop_args); i != m_stack.end(); i++) { + m_tmp_args.push_back(&(*i)); + } + + // get immediate arg + if (has_imm) { + m_tmp_args.push_back(get_imm(bc)); + } + + return m_tmp_args; + } + + void pop_args(const Bytecode& bc) { + unsigned int popArgs = bc.args; + if ((bc.flags & Bytecode::Flag::ValueMask) != Bytecode::Flag::ValuePop) { + popArgs -= 1; + } + for (unsigned int i = 0; i < popArgs; ++i) { + m_stack.pop_back(); + } + } + + const json* get_imm(const Bytecode& bc) { + std::string ptr_buffer; + nonstd::string_view ptr; + switch (bc.flags & Bytecode::Flag::ValueMask) { + case Bytecode::Flag::ValuePop: + return nullptr; + case Bytecode::Flag::ValueImmediate: + return &bc.value; + case Bytecode::Flag::ValueLookupDot: + ptr = convert_dot_to_json_pointer(bc.str, ptr_buffer); + break; + case Bytecode::Flag::ValueLookupPointer: + ptr_buffer += '/'; + ptr_buffer += bc.str; + ptr = ptr_buffer; + break; + } + try { + return &m_data->at(json::json_pointer(ptr.data())); + } catch (std::exception&) { + // try to evaluate as a no-argument callback + if (auto callback = m_callbacks.find_callback(bc.str, 0)) { + std::vector<const json*> arguments {}; + m_tmp_val = callback(arguments); + return &m_tmp_val; + } + inja_throw("render_error", "variable '" + static_cast<std::string>(bc.str) + "' not found"); + return nullptr; + } + } + + bool truthy(const json& var) const { + if (var.empty()) { + return false; + } else if (var.is_number()) { + return (var != 0); + } else if (var.is_string()) { + return !var.empty(); + } + + try { + return var.get<bool>(); + } catch (json::type_error& e) { + inja_throw("json_error", e.what()); + throw; + } + } + + void update_loop_data() { + LoopLevel& level = m_loop_stack.back(); + + if (level.loop_type == LoopLevel::Type::Array) { + level.data[static_cast<std::string>(level.value_name)] = level.values.at(level.index); // *level.it; + auto& loopData = level.data["loop"]; + loopData["index"] = level.index; + loopData["index1"] = level.index + 1; + loopData["is_first"] = (level.index == 0); + loopData["is_last"] = (level.index == level.size - 1); + } else { + level.data[static_cast<std::string>(level.key_name)] = level.map_it->first; + level.data[static_cast<std::string>(level.value_name)] = *level.map_it->second; + } + } + + const TemplateStorage& m_included_templates; + const FunctionStorage& m_callbacks; + + std::vector<json> m_stack; + + + struct LoopLevel { + enum class Type { Map, Array }; + + Type loop_type; + nonstd::string_view key_name; // variable name for keys + nonstd::string_view value_name; // variable name for values + json data; // data with loop info added + + json values; // values to iterate over + + // loop over list + size_t index; // current list index + size_t size; // length of list + + // loop over map + using KeyValue = std::pair<nonstd::string_view, json*>; + using MapValues = std::vector<KeyValue>; + MapValues map_values; // values to iterate over + MapValues::iterator map_it; // iterator over values + + }; + + std::vector<LoopLevel> m_loop_stack; + const json* m_data; + + std::vector<const json*> m_tmp_args; + json m_tmp_val; + + + public: + Renderer(const TemplateStorage& included_templates, const FunctionStorage& callbacks): m_included_templates(included_templates), m_callbacks(callbacks) { + m_stack.reserve(16); + m_tmp_args.reserve(4); + m_loop_stack.reserve(16); + } + + void render_to(std::ostream& os, const Template& tmpl, const json& data) { + m_data = &data; + + for (size_t i = 0; i < tmpl.bytecodes.size(); ++i) { + const auto& bc = tmpl.bytecodes[i]; + + switch (bc.op) { + case Bytecode::Op::Nop: { + break; + } + case Bytecode::Op::PrintText: { + os << bc.str; + break; + } + case Bytecode::Op::PrintValue: { + const json& val = *get_args(bc)[0]; + if (val.is_string()) + os << val.get_ref<const std::string&>(); + else + os << val.dump(); + // val.dump(os); + pop_args(bc); + break; + } + case Bytecode::Op::Push: { + m_stack.emplace_back(*get_imm(bc)); + break; + } + case Bytecode::Op::Upper: { + auto result = get_args(bc)[0]->get<std::string>(); + std::transform(result.begin(), result.end(), result.begin(), ::toupper); + pop_args(bc); + m_stack.emplace_back(std::move(result)); + break; + } + case Bytecode::Op::Lower: { + auto result = get_args(bc)[0]->get<std::string>(); + std::transform(result.begin(), result.end(), result.begin(), ::tolower); + pop_args(bc); + m_stack.emplace_back(std::move(result)); + break; + } + case Bytecode::Op::Range: { + int number = get_args(bc)[0]->get<int>(); + std::vector<int> result(number); + std::iota(std::begin(result), std::end(result), 0); + pop_args(bc); + m_stack.emplace_back(std::move(result)); + break; + } + case Bytecode::Op::Length: { + auto result = get_args(bc)[0]->size(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Sort: { + auto result = get_args(bc)[0]->get<std::vector<json>>(); + std::sort(result.begin(), result.end()); + pop_args(bc); + m_stack.emplace_back(std::move(result)); + break; + } + case Bytecode::Op::First: { + auto result = get_args(bc)[0]->front(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Last: { + auto result = get_args(bc)[0]->back(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Round: { + auto args = get_args(bc); + double number = args[0]->get<double>(); + int precision = args[1]->get<int>(); + pop_args(bc); + m_stack.emplace_back(std::round(number * std::pow(10.0, precision)) / std::pow(10.0, precision)); + break; + } + case Bytecode::Op::DivisibleBy: { + auto args = get_args(bc); + int number = args[0]->get<int>(); + int divisor = args[1]->get<int>(); + pop_args(bc); + m_stack.emplace_back((divisor != 0) && (number % divisor == 0)); + break; + } + case Bytecode::Op::Odd: { + int number = get_args(bc)[0]->get<int>(); + pop_args(bc); + m_stack.emplace_back(number % 2 != 0); + break; + } + case Bytecode::Op::Even: { + int number = get_args(bc)[0]->get<int>(); + pop_args(bc); + m_stack.emplace_back(number % 2 == 0); + break; + } + case Bytecode::Op::Max: { + auto args = get_args(bc); + auto result = *std::max_element(args[0]->begin(), args[0]->end()); + pop_args(bc); + m_stack.emplace_back(std::move(result)); + break; + } + case Bytecode::Op::Min: { + auto args = get_args(bc); + auto result = *std::min_element(args[0]->begin(), args[0]->end()); + pop_args(bc); + m_stack.emplace_back(std::move(result)); + break; + } + case Bytecode::Op::Not: { + bool result = !truthy(*get_args(bc)[0]); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::And: { + auto args = get_args(bc); + bool result = truthy(*args[0]) && truthy(*args[1]); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Or: { + auto args = get_args(bc); + bool result = truthy(*args[0]) || truthy(*args[1]); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::In: { + auto args = get_args(bc); + bool result = std::find(args[1]->begin(), args[1]->end(), *args[0]) != + args[1]->end(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Equal: { + auto args = get_args(bc); + bool result = (*args[0] == *args[1]); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Greater: { + auto args = get_args(bc); + bool result = (*args[0] > *args[1]); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Less: { + auto args = get_args(bc); + bool result = (*args[0] < *args[1]); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::GreaterEqual: { + auto args = get_args(bc); + bool result = (*args[0] >= *args[1]); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::LessEqual: { + auto args = get_args(bc); + bool result = (*args[0] <= *args[1]); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Different: { + auto args = get_args(bc); + bool result = (*args[0] != *args[1]); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Float: { + double result = + std::stod(get_args(bc)[0]->get_ref<const std::string&>()); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Int: { + int result = std::stoi(get_args(bc)[0]->get_ref<const std::string&>()); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Exists: { + auto&& name = get_args(bc)[0]->get_ref<const std::string&>(); + bool result = (data.find(name) != data.end()); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::ExistsInObject: { + auto args = get_args(bc); + auto&& name = args[1]->get_ref<const std::string&>(); + bool result = (args[0]->find(name) != args[0]->end()); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::IsBoolean: { + bool result = get_args(bc)[0]->is_boolean(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::IsNumber: { + bool result = get_args(bc)[0]->is_number(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::IsInteger: { + bool result = get_args(bc)[0]->is_number_integer(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::IsFloat: { + bool result = get_args(bc)[0]->is_number_float(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::IsObject: { + bool result = get_args(bc)[0]->is_object(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::IsArray: { + bool result = get_args(bc)[0]->is_array(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::IsString: { + bool result = get_args(bc)[0]->is_string(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Default: { + // default needs to be a bit "magic"; we can't evaluate the first + // argument during the push operation, so we swap the arguments during + // the parse phase so the second argument is pushed on the stack and + // the first argument is in the immediate + try { + const json* imm = get_imm(bc); + // if no exception was raised, replace the stack value with it + m_stack.back() = *imm; + } catch (std::exception&) { + // couldn't read immediate, just leave the stack as is + } + break; + } + case Bytecode::Op::Include: + Renderer(m_included_templates, m_callbacks).render_to(os, m_included_templates.find(get_imm(bc)->get_ref<const std::string&>())->second, data); + break; + case Bytecode::Op::Callback: { + auto callback = m_callbacks.find_callback(bc.str, bc.args); + if (!callback) { + inja_throw("render_error", "function '" + static_cast<std::string>(bc.str) + "' (" + std::to_string(static_cast<unsigned int>(bc.args)) + ") not found"); + } + json result = callback(get_args(bc)); + pop_args(bc); + m_stack.emplace_back(std::move(result)); + break; + } + case Bytecode::Op::Jump: { + i = bc.args - 1; // -1 due to ++i in loop + break; + } + case Bytecode::Op::ConditionalJump: { + if (!truthy(m_stack.back())) { + i = bc.args - 1; // -1 due to ++i in loop + } + m_stack.pop_back(); + break; + } + case Bytecode::Op::StartLoop: { + // jump past loop body if empty + if (m_stack.back().empty()) { + m_stack.pop_back(); + i = bc.args; // ++i in loop will take it past EndLoop + break; + } + + m_loop_stack.emplace_back(); + LoopLevel& level = m_loop_stack.back(); + level.value_name = bc.str; + level.values = std::move(m_stack.back()); + level.data = (*m_data); + m_stack.pop_back(); + + if (bc.value.is_string()) { + // map iterator + if (!level.values.is_object()) { + m_loop_stack.pop_back(); + inja_throw("render_error", "for key, value requires object"); + } + level.loop_type = LoopLevel::Type::Map; + level.key_name = bc.value.get_ref<const std::string&>(); + + // sort by key + for (auto it = level.values.begin(), end = level.values.end(); it != end; ++it) { + level.map_values.emplace_back(it.key(), &it.value()); + } + std::sort(level.map_values.begin(), level.map_values.end(), [](const LoopLevel::KeyValue& a, const LoopLevel::KeyValue& b) { return a.first < b.first; }); + level.map_it = level.map_values.begin(); + } else { + if (!level.values.is_array()) { + m_loop_stack.pop_back(); + inja_throw("render_error", "type must be array"); + } + + // list iterator + level.loop_type = LoopLevel::Type::Array; + level.index = 0; + level.size = level.values.size(); + } + + // provide parent access in nested loop + auto parent_loop_it = level.data.find("loop"); + if (parent_loop_it != level.data.end()) { + json loop_copy = *parent_loop_it; + (*parent_loop_it)["parent"] = std::move(loop_copy); + } + + // set "current" data to loop data + m_data = &level.data; + update_loop_data(); + break; + } + case Bytecode::Op::EndLoop: { + if (m_loop_stack.empty()) { + inja_throw("render_error", "unexpected state in renderer"); + } + LoopLevel& level = m_loop_stack.back(); + + bool done; + if (level.loop_type == LoopLevel::Type::Array) { + level.index += 1; + done = (level.index == level.values.size()); + } else { + level.map_it += 1; + done = (level.map_it == level.map_values.end()); + } + + if (done) { + m_loop_stack.pop_back(); + // set "current" data to outer loop data or main data as appropriate + if (!m_loop_stack.empty()) { + m_data = &m_loop_stack.back().data; + } else { + m_data = &data; + } + break; + } + + update_loop_data(); + + // jump back to start of loop + i = bc.args - 1; // -1 due to ++i in loop + break; + } + default: { + inja_throw("render_error", "unknown op in renderer: " + std::to_string(static_cast<unsigned int>(bc.op))); + } + } + } + } +}; + +} // namespace inja + +#endif // PANTOR_INJA_RENDERER_HPP + +// #include "string_view.hpp" + +// #include "template.hpp" + + + +namespace inja { + +using namespace nlohmann; + +class Environment { + class Impl { + public: + std::string input_path; + std::string output_path; + + LexerConfig lexer_config; + ParserConfig parser_config; + + FunctionStorage callbacks; + TemplateStorage included_templates; + }; + + std::unique_ptr<Impl> m_impl; + + public: + Environment(): Environment("./") { } + + explicit Environment(const std::string& global_path): m_impl(stdinja::make_unique<Impl>()) { + m_impl->input_path = global_path; + m_impl->output_path = global_path; + } + + explicit Environment(const std::string& input_path, const std::string& output_path): m_impl(stdinja::make_unique<Impl>()) { + m_impl->input_path = input_path; + m_impl->output_path = output_path; + } + + /// Sets the opener and closer for template statements + void set_statement(const std::string& open, const std::string& close) { + m_impl->lexer_config.statement_open = open; + m_impl->lexer_config.statement_close = close; + m_impl->lexer_config.update_open_chars(); + } + + /// Sets the opener for template line statements + void set_line_statement(const std::string& open) { + m_impl->lexer_config.line_statement = open; + m_impl->lexer_config.update_open_chars(); + } + + /// Sets the opener and closer for template expressions + void set_expression(const std::string& open, const std::string& close) { + m_impl->lexer_config.expression_open = open; + m_impl->lexer_config.expression_close = close; + m_impl->lexer_config.update_open_chars(); + } + + /// Sets the opener and closer for template comments + void set_comment(const std::string& open, const std::string& close) { + m_impl->lexer_config.comment_open = open; + m_impl->lexer_config.comment_close = close; + m_impl->lexer_config.update_open_chars(); + } + + /// Sets the element notation syntax + void set_element_notation(ElementNotation notation) { + m_impl->parser_config.notation = notation; + } + + + Template parse(nonstd::string_view input) { + Parser parser(m_impl->parser_config, m_impl->lexer_config, m_impl->included_templates); + return parser.parse(input); + } + + Template parse_template(const std::string& filename) { + Parser parser(m_impl->parser_config, m_impl->lexer_config, m_impl->included_templates); + return parser.parse_template(m_impl->input_path + static_cast<std::string>(filename)); + } + + std::string render(nonstd::string_view input, const json& data) { + return render(parse(input), data); + } + + std::string render(const Template& tmpl, const json& data) { + std::stringstream os; + render_to(os, tmpl, data); + return os.str(); + } + + std::string render_file(const std::string& filename, const json& data) { + return render(parse_template(filename), data); + } + + std::string render_file_with_json_file(const std::string& filename, const std::string& filename_data) { + const json data = load_json(filename_data); + return render_file(filename, data); + } + + void write(const std::string& filename, const json& data, const std::string& filename_out) { + std::ofstream file(m_impl->output_path + filename_out); + file << render_file(filename, data); + file.close(); + } + + void write(const Template& temp, const json& data, const std::string& filename_out) { + std::ofstream file(m_impl->output_path + filename_out); + file << render(temp, data); + file.close(); + } + + void write_with_json_file(const std::string& filename, const std::string& filename_data, const std::string& filename_out) { + const json data = load_json(filename_data); + write(filename, data, filename_out); + } + + void write_with_json_file(const Template& temp, const std::string& filename_data, const std::string& filename_out) { + const json data = load_json(filename_data); + write(temp, data, filename_out); + } + + std::ostream& render_to(std::ostream& os, const Template& tmpl, const json& data) { + Renderer(m_impl->included_templates, m_impl->callbacks).render_to(os, tmpl, data); + return os; + } + + std::string load_file(const std::string& filename) { + Parser parser(m_impl->parser_config, m_impl->lexer_config, m_impl->included_templates); + return parser.load_file(m_impl->input_path + filename); + } + + json load_json(const std::string& filename) { + std::ifstream file(m_impl->input_path + filename); + json j; + file >> j; + return j; + } + + void add_callback(const std::string& name, unsigned int numArgs, const CallbackFunction& callback) { + m_impl->callbacks.add_callback(name, numArgs, callback); + } + + /** Includes a template with a given name into the environment. + * Then, a template can be rendered in another template using the + * include "<name>" syntax. + */ + void include_template(const std::string& name, const Template& tmpl) { + m_impl->included_templates[name] = tmpl; + } +}; + +/*! +@brief render with default settings to a string +*/ +inline std::string render(nonstd::string_view input, const json& data) { + return Environment().render(input, data); +} + +/*! +@brief render with default settings to the given output stream +*/ +inline void render_to(std::ostream& os, nonstd::string_view input, const json& data) { + Environment env; + env.render_to(os, env.parse(input), data); +} + +} + +#endif // PANTOR_INJA_ENVIRONMENT_HPP + +// #include "string_view.hpp" + +// #include "template.hpp" + +// #include "parser.hpp" + +// #include "renderer.hpp" + + + +#endif // PANTOR_INJA_HPP diff --git a/tools/jsonproc/jsonproc.cpp b/tools/jsonproc/jsonproc.cpp new file mode 100755 index 000000000..efe48f39f --- /dev/null +++ b/tools/jsonproc/jsonproc.cpp @@ -0,0 +1,91 @@ +// jsonproc.cpp + +#include "jsonproc.h" + +#include <map> + +#include <string> +using std::string; + +#include <inja.hpp> +using namespace inja; +using json = nlohmann::json; + +std::map<string, string> customVars; + +void set_custom_var(string key, string value) +{ + customVars[key] = value; +} + +string get_custom_var(string key) +{ + return customVars[key]; +} + +int main(int argc, char *argv[]) +{ + if (argc != 4) + FATAL_ERROR("USAGE: jsonproc <json-filepath> <template-filepath> <output-filepath>\n"); + + string jsonfilepath = argv[1]; + string templateFilepath = argv[2]; + string outputFilepath = argv[3]; + + Environment env; + + // Add custom command callbacks. + env.add_callback("doNotModifyHeader", 0, [jsonfilepath, templateFilepath](Arguments& args) { + return "//\n// DO NOT MODIFY THIS FILE! IT IS AUTO-GENERATED FROM " + jsonfilepath +" and Inja template " + templateFilepath + "\n//\n"; + }); + + env.add_callback("setVar", 2, [=](Arguments& args) { + string key = args.at(0)->get<string>(); + string value = args.at(1)->get<string>(); + set_custom_var(key, value); + return ""; + }); + + env.add_callback("getVar", 1, [=](Arguments& args) { + string key = args.at(0)->get<string>(); + return get_custom_var(key); + }); + + env.add_callback("concat", 2, [](Arguments& args) { + string first = args.at(0)->get<string>(); + string second = args.at(1)->get<string>(); + return first + second; + }); + + env.add_callback("removePrefix", 2, [](Arguments& args) { + string rawValue = args.at(0)->get<string>(); + string prefix = args.at(1)->get<string>(); + string::size_type i = rawValue.find(prefix); + if (i != 0) + return rawValue; + + return rawValue.erase(0, prefix.length()); + }); + + // Add custom command callbacks. + env.add_callback("removeSuffix", 2, [](Arguments& args) { + string rawValue = args.at(0)->get<string>(); + string suffix = args.at(1)->get<string>(); + string::size_type i = rawValue.rfind(suffix); + if (i == string::npos) + return rawValue; + + return rawValue.substr(0, i); + }); + + try + { + env.write_with_json_file(templateFilepath, jsonfilepath, outputFilepath); + } + catch (const std::exception& e) + { + FATAL_ERROR("JSONPROC_ERROR: %s\n", e.what()); + } + + return 0; +} diff --git a/tools/jsonproc/jsonproc.h b/tools/jsonproc/jsonproc.h new file mode 100755 index 000000000..575fb3756 --- /dev/null +++ b/tools/jsonproc/jsonproc.h @@ -0,0 +1,32 @@ +// jsonproc.h + +#ifndef JSONPROC_H +#define JSONPROC_H + +#include <cstdlib> +#include <cstdio> +using std::fprintf; using std::exit; + +#include <cstdlib> + +#ifdef _MSC_VER + +#define FATAL_ERROR(format, ...) \ +do \ +{ \ + fprintf(stderr, format, __VA_ARGS__); \ + exit(1); \ +} while (0) + +#else + +#define FATAL_ERROR(format, ...) \ +do \ +{ \ + fprintf(stderr, format, ##__VA_ARGS__); \ + exit(1); \ +} while (0) + +#endif // _MSC_VER + +#endif // JSONPROC_H diff --git a/tools/jsonproc/nlohmann/json.hpp b/tools/jsonproc/nlohmann/json.hpp new file mode 100755 index 000000000..5003a4fa2 --- /dev/null +++ b/tools/jsonproc/nlohmann/json.hpp @@ -0,0 +1,20842 @@ +/* + __ _____ _____ _____ + __| | __| | | | JSON for Modern C++ +| | |__ | | | | | | version 3.6.1 +|_____|_____|_____|_|___| https://github.com/nlohmann/json + +Licensed under the MIT License <http://opensource.org/licenses/MIT>. +SPDX-License-Identifier: MIT +Copyright (c) 2013-2019 Niels Lohmann <http://nlohmann.me>. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +#ifndef INCLUDE_NLOHMANN_JSON_HPP_ +#define INCLUDE_NLOHMANN_JSON_HPP_ + +#define NLOHMANN_JSON_VERSION_MAJOR 3 +#define NLOHMANN_JSON_VERSION_MINOR 6 +#define NLOHMANN_JSON_VERSION_PATCH 1 + +#include <algorithm> // all_of, find, for_each +#include <cassert> // assert +#include <ciso646> // and, not, or +#include <cstddef> // nullptr_t, ptrdiff_t, size_t +#include <functional> // hash, less +#include <initializer_list> // initializer_list +#include <iosfwd> // istream, ostream +#include <iterator> // random_access_iterator_tag +#include <memory> // unique_ptr +#include <numeric> // accumulate +#include <string> // string, stoi, to_string +#include <utility> // declval, forward, move, pair, swap +#include <vector> // vector + +// #include <nlohmann/adl_serializer.hpp> + + +#include <utility> + +// #include <nlohmann/detail/conversions/from_json.hpp> + + +#include <algorithm> // transform +#include <array> // array +#include <ciso646> // and, not +#include <forward_list> // forward_list +#include <iterator> // inserter, front_inserter, end +#include <map> // map +#include <string> // string +#include <tuple> // tuple, make_tuple +#include <type_traits> // is_arithmetic, is_same, is_enum, underlying_type, is_convertible +#include <unordered_map> // unordered_map +#include <utility> // pair, declval +#include <valarray> // valarray + +// #include <nlohmann/detail/exceptions.hpp> + + +#include <exception> // exception +#include <stdexcept> // runtime_error +#include <string> // to_string + +// #include <nlohmann/detail/input/position_t.hpp> + + +#include <cstddef> // size_t + +namespace nlohmann +{ +namespace detail +{ +/// struct to capture the start position of the current token +struct position_t +{ + /// the total number of characters read + std::size_t chars_read_total = 0; + /// the number of characters read in the current line + std::size_t chars_read_current_line = 0; + /// the number of lines read + std::size_t lines_read = 0; + + /// conversion to size_t to preserve SAX interface + constexpr operator size_t() const + { + return chars_read_total; + } +}; + +} // namespace detail +} // namespace nlohmann + + +namespace nlohmann +{ +namespace detail +{ +//////////////// +// exceptions // +//////////////// + +/*! +@brief general exception of the @ref basic_json class + +This class is an extension of `std::exception` objects with a member @a id for +exception ids. It is used as the base class for all exceptions thrown by the +@ref basic_json class. This class can hence be used as "wildcard" to catch +exceptions. + +Subclasses: +- @ref parse_error for exceptions indicating a parse error +- @ref invalid_iterator for exceptions indicating errors with iterators +- @ref type_error for exceptions indicating executing a member function with + a wrong type +- @ref out_of_range for exceptions indicating access out of the defined range +- @ref other_error for exceptions indicating other library errors + +@internal +@note To have nothrow-copy-constructible exceptions, we internally use + `std::runtime_error` which can cope with arbitrary-length error messages. + Intermediate strings are built with static functions and then passed to + the actual constructor. +@endinternal + +@liveexample{The following code shows how arbitrary library exceptions can be +caught.,exception} + +@since version 3.0.0 +*/ +class exception : public std::exception +{ + public: + /// returns the explanatory string + const char* what() const noexcept override + { + return m.what(); + } + + /// the id of the exception + const int id; + + protected: + exception(int id_, const char* what_arg) : id(id_), m(what_arg) {} + + static std::string name(const std::string& ename, int id_) + { + return "[json.exception." + ename + "." + std::to_string(id_) + "] "; + } + + private: + /// an exception object as storage for error messages + std::runtime_error m; +}; + +/*! +@brief exception indicating a parse error + +This exception is thrown by the library when a parse error occurs. Parse errors +can occur during the deserialization of JSON text, CBOR, MessagePack, as well +as when using JSON Patch. + +Member @a byte holds the byte index of the last read character in the input +file. + +Exceptions have ids 1xx. + +name / id | example message | description +------------------------------ | --------------- | ------------------------- +json.exception.parse_error.101 | parse error at 2: unexpected end of input; expected string literal | This error indicates a syntax error while deserializing a JSON text. The error message describes that an unexpected token (character) was encountered, and the member @a byte indicates the error position. +json.exception.parse_error.102 | parse error at 14: missing or wrong low surrogate | JSON uses the `\uxxxx` format to describe Unicode characters. Code points above above 0xFFFF are split into two `\uxxxx` entries ("surrogate pairs"). This error indicates that the surrogate pair is incomplete or contains an invalid code point. +json.exception.parse_error.103 | parse error: code points above 0x10FFFF are invalid | Unicode supports code points up to 0x10FFFF. Code points above 0x10FFFF are invalid. +json.exception.parse_error.104 | parse error: JSON patch must be an array of objects | [RFC 6902](https://tools.ietf.org/html/rfc6902) requires a JSON Patch document to be a JSON document that represents an array of objects. +json.exception.parse_error.105 | parse error: operation must have string member 'op' | An operation of a JSON Patch document must contain exactly one "op" member, whose value indicates the operation to perform. Its value must be one of "add", "remove", "replace", "move", "copy", or "test"; other values are errors. +json.exception.parse_error.106 | parse error: array index '01' must not begin with '0' | An array index in a JSON Pointer ([RFC 6901](https://tools.ietf.org/html/rfc6901)) may be `0` or any number without a leading `0`. +json.exception.parse_error.107 | parse error: JSON pointer must be empty or begin with '/' - was: 'foo' | A JSON Pointer must be a Unicode string containing a sequence of zero or more reference tokens, each prefixed by a `/` character. +json.exception.parse_error.108 | parse error: escape character '~' must be followed with '0' or '1' | In a JSON Pointer, only `~0` and `~1` are valid escape sequences. +json.exception.parse_error.109 | parse error: array index 'one' is not a number | A JSON Pointer array index must be a number. +json.exception.parse_error.110 | parse error at 1: cannot read 2 bytes from vector | When parsing CBOR or MessagePack, the byte vector ends before the complete value has been read. +json.exception.parse_error.112 | parse error at 1: error reading CBOR; last byte: 0xF8 | Not all types of CBOR or MessagePack are supported. This exception occurs if an unsupported byte was read. +json.exception.parse_error.113 | parse error at 2: expected a CBOR string; last byte: 0x98 | While parsing a map key, a value that is not a string has been read. +json.exception.parse_error.114 | parse error: Unsupported BSON record type 0x0F | The parsing of the corresponding BSON record type is not implemented (yet). + +@note For an input with n bytes, 1 is the index of the first character and n+1 + is the index of the terminating null byte or the end of file. This also + holds true when reading a byte vector (CBOR or MessagePack). + +@liveexample{The following code shows how a `parse_error` exception can be +caught.,parse_error} + +@sa - @ref exception for the base class of the library exceptions +@sa - @ref invalid_iterator for exceptions indicating errors with iterators +@sa - @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa - @ref out_of_range for exceptions indicating access out of the defined range +@sa - @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class parse_error : public exception +{ + public: + /*! + @brief create a parse error exception + @param[in] id_ the id of the exception + @param[in] pos the position where the error occurred (or with + chars_read_total=0 if the position cannot be + determined) + @param[in] what_arg the explanatory string + @return parse_error object + */ + static parse_error create(int id_, const position_t& pos, const std::string& what_arg) + { + std::string w = exception::name("parse_error", id_) + "parse error" + + position_string(pos) + ": " + what_arg; + return parse_error(id_, pos.chars_read_total, w.c_str()); + } + + static parse_error create(int id_, std::size_t byte_, const std::string& what_arg) + { + std::string w = exception::name("parse_error", id_) + "parse error" + + (byte_ != 0 ? (" at byte " + std::to_string(byte_)) : "") + + ": " + what_arg; + return parse_error(id_, byte_, w.c_str()); + } + + /*! + @brief byte index of the parse error + + The byte index of the last read character in the input file. + + @note For an input with n bytes, 1 is the index of the first character and + n+1 is the index of the terminating null byte or the end of file. + This also holds true when reading a byte vector (CBOR or MessagePack). + */ + const std::size_t byte; + + private: + parse_error(int id_, std::size_t byte_, const char* what_arg) + : exception(id_, what_arg), byte(byte_) {} + + static std::string position_string(const position_t& pos) + { + return " at line " + std::to_string(pos.lines_read + 1) + + ", column " + std::to_string(pos.chars_read_current_line); + } +}; + +/*! +@brief exception indicating errors with iterators + +This exception is thrown if iterators passed to a library function do not match +the expected semantics. + +Exceptions have ids 2xx. + +name / id | example message | description +----------------------------------- | --------------- | ------------------------- +json.exception.invalid_iterator.201 | iterators are not compatible | The iterators passed to constructor @ref basic_json(InputIT first, InputIT last) are not compatible, meaning they do not belong to the same container. Therefore, the range (@a first, @a last) is invalid. +json.exception.invalid_iterator.202 | iterator does not fit current value | In an erase or insert function, the passed iterator @a pos does not belong to the JSON value for which the function was called. It hence does not define a valid position for the deletion/insertion. +json.exception.invalid_iterator.203 | iterators do not fit current value | Either iterator passed to function @ref erase(IteratorType first, IteratorType last) does not belong to the JSON value from which values shall be erased. It hence does not define a valid range to delete values from. +json.exception.invalid_iterator.204 | iterators out of range | When an iterator range for a primitive type (number, boolean, or string) is passed to a constructor or an erase function, this range has to be exactly (@ref begin(), @ref end()), because this is the only way the single stored value is expressed. All other ranges are invalid. +json.exception.invalid_iterator.205 | iterator out of range | When an iterator for a primitive type (number, boolean, or string) is passed to an erase function, the iterator has to be the @ref begin() iterator, because it is the only way to address the stored value. All other iterators are invalid. +json.exception.invalid_iterator.206 | cannot construct with iterators from null | The iterators passed to constructor @ref basic_json(InputIT first, InputIT last) belong to a JSON null value and hence to not define a valid range. +json.exception.invalid_iterator.207 | cannot use key() for non-object iterators | The key() member function can only be used on iterators belonging to a JSON object, because other types do not have a concept of a key. +json.exception.invalid_iterator.208 | cannot use operator[] for object iterators | The operator[] to specify a concrete offset cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. +json.exception.invalid_iterator.209 | cannot use offsets with object iterators | The offset operators (+, -, +=, -=) cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. +json.exception.invalid_iterator.210 | iterators do not fit | The iterator range passed to the insert function are not compatible, meaning they do not belong to the same container. Therefore, the range (@a first, @a last) is invalid. +json.exception.invalid_iterator.211 | passed iterators may not belong to container | The iterator range passed to the insert function must not be a subrange of the container to insert to. +json.exception.invalid_iterator.212 | cannot compare iterators of different containers | When two iterators are compared, they must belong to the same container. +json.exception.invalid_iterator.213 | cannot compare order of object iterators | The order of object iterators cannot be compared, because JSON objects are unordered. +json.exception.invalid_iterator.214 | cannot get value | Cannot get value for iterator: Either the iterator belongs to a null value or it is an iterator to a primitive type (number, boolean, or string), but the iterator is different to @ref begin(). + +@liveexample{The following code shows how an `invalid_iterator` exception can be +caught.,invalid_iterator} + +@sa - @ref exception for the base class of the library exceptions +@sa - @ref parse_error for exceptions indicating a parse error +@sa - @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa - @ref out_of_range for exceptions indicating access out of the defined range +@sa - @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class invalid_iterator : public exception +{ + public: + static invalid_iterator create(int id_, const std::string& what_arg) + { + std::string w = exception::name("invalid_iterator", id_) + what_arg; + return invalid_iterator(id_, w.c_str()); + } + + private: + invalid_iterator(int id_, const char* what_arg) + : exception(id_, what_arg) {} +}; + +/*! +@brief exception indicating executing a member function with a wrong type + +This exception is thrown in case of a type error; that is, a library function is +executed on a JSON value whose type does not match the expected semantics. + +Exceptions have ids 3xx. + +name / id | example message | description +----------------------------- | --------------- | ------------------------- +json.exception.type_error.301 | cannot create object from initializer list | To create an object from an initializer list, the initializer list must consist only of a list of pairs whose first element is a string. When this constraint is violated, an array is created instead. +json.exception.type_error.302 | type must be object, but is array | During implicit or explicit value conversion, the JSON type must be compatible to the target type. For instance, a JSON string can only be converted into string types, but not into numbers or boolean types. +json.exception.type_error.303 | incompatible ReferenceType for get_ref, actual type is object | To retrieve a reference to a value stored in a @ref basic_json object with @ref get_ref, the type of the reference must match the value type. For instance, for a JSON array, the @a ReferenceType must be @ref array_t &. +json.exception.type_error.304 | cannot use at() with string | The @ref at() member functions can only be executed for certain JSON types. +json.exception.type_error.305 | cannot use operator[] with string | The @ref operator[] member functions can only be executed for certain JSON types. +json.exception.type_error.306 | cannot use value() with string | The @ref value() member functions can only be executed for certain JSON types. +json.exception.type_error.307 | cannot use erase() with string | The @ref erase() member functions can only be executed for certain JSON types. +json.exception.type_error.308 | cannot use push_back() with string | The @ref push_back() and @ref operator+= member functions can only be executed for certain JSON types. +json.exception.type_error.309 | cannot use insert() with | The @ref insert() member functions can only be executed for certain JSON types. +json.exception.type_error.310 | cannot use swap() with number | The @ref swap() member functions can only be executed for certain JSON types. +json.exception.type_error.311 | cannot use emplace_back() with string | The @ref emplace_back() member function can only be executed for certain JSON types. +json.exception.type_error.312 | cannot use update() with string | The @ref update() member functions can only be executed for certain JSON types. +json.exception.type_error.313 | invalid value to unflatten | The @ref unflatten function converts an object whose keys are JSON Pointers back into an arbitrary nested JSON value. The JSON Pointers must not overlap, because then the resulting value would not be well defined. +json.exception.type_error.314 | only objects can be unflattened | The @ref unflatten function only works for an object whose keys are JSON Pointers. +json.exception.type_error.315 | values in object must be primitive | The @ref unflatten function only works for an object whose keys are JSON Pointers and whose values are primitive. +json.exception.type_error.316 | invalid UTF-8 byte at index 10: 0x7E | The @ref dump function only works with UTF-8 encoded strings; that is, if you assign a `std::string` to a JSON value, make sure it is UTF-8 encoded. | +json.exception.type_error.317 | JSON value cannot be serialized to requested format | The dynamic type of the object cannot be represented in the requested serialization format (e.g. a raw `true` or `null` JSON object cannot be serialized to BSON) | + +@liveexample{The following code shows how a `type_error` exception can be +caught.,type_error} + +@sa - @ref exception for the base class of the library exceptions +@sa - @ref parse_error for exceptions indicating a parse error +@sa - @ref invalid_iterator for exceptions indicating errors with iterators +@sa - @ref out_of_range for exceptions indicating access out of the defined range +@sa - @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class type_error : public exception +{ + public: + static type_error create(int id_, const std::string& what_arg) + { + std::string w = exception::name("type_error", id_) + what_arg; + return type_error(id_, w.c_str()); + } + + private: + type_error(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +/*! +@brief exception indicating access out of the defined range + +This exception is thrown in case a library function is called on an input +parameter that exceeds the expected range, for instance in case of array +indices or nonexisting object keys. + +Exceptions have ids 4xx. + +name / id | example message | description +------------------------------- | --------------- | ------------------------- +json.exception.out_of_range.401 | array index 3 is out of range | The provided array index @a i is larger than @a size-1. +json.exception.out_of_range.402 | array index '-' (3) is out of range | The special array index `-` in a JSON Pointer never describes a valid element of the array, but the index past the end. That is, it can only be used to add elements at this position, but not to read it. +json.exception.out_of_range.403 | key 'foo' not found | The provided key was not found in the JSON object. +json.exception.out_of_range.404 | unresolved reference token 'foo' | A reference token in a JSON Pointer could not be resolved. +json.exception.out_of_range.405 | JSON pointer has no parent | The JSON Patch operations 'remove' and 'add' can not be applied to the root element of the JSON value. +json.exception.out_of_range.406 | number overflow parsing '10E1000' | A parsed number could not be stored as without changing it to NaN or INF. +json.exception.out_of_range.407 | number overflow serializing '9223372036854775808' | UBJSON and BSON only support integer numbers up to 9223372036854775807. | +json.exception.out_of_range.408 | excessive array size: 8658170730974374167 | The size (following `#`) of an UBJSON array or object exceeds the maximal capacity. | +json.exception.out_of_range.409 | BSON key cannot contain code point U+0000 (at byte 2) | Key identifiers to be serialized to BSON cannot contain code point U+0000, since the key is stored as zero-terminated c-string | + +@liveexample{The following code shows how an `out_of_range` exception can be +caught.,out_of_range} + +@sa - @ref exception for the base class of the library exceptions +@sa - @ref parse_error for exceptions indicating a parse error +@sa - @ref invalid_iterator for exceptions indicating errors with iterators +@sa - @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa - @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class out_of_range : public exception +{ + public: + static out_of_range create(int id_, const std::string& what_arg) + { + std::string w = exception::name("out_of_range", id_) + what_arg; + return out_of_range(id_, w.c_str()); + } + + private: + out_of_range(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +/*! +@brief exception indicating other library errors + +This exception is thrown in case of errors that cannot be classified with the +other exception types. + +Exceptions have ids 5xx. + +name / id | example message | description +------------------------------ | --------------- | ------------------------- +json.exception.other_error.501 | unsuccessful: {"op":"test","path":"/baz", "value":"bar"} | A JSON Patch operation 'test' failed. The unsuccessful operation is also printed. + +@sa - @ref exception for the base class of the library exceptions +@sa - @ref parse_error for exceptions indicating a parse error +@sa - @ref invalid_iterator for exceptions indicating errors with iterators +@sa - @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa - @ref out_of_range for exceptions indicating access out of the defined range + +@liveexample{The following code shows how an `other_error` exception can be +caught.,other_error} + +@since version 3.0.0 +*/ +class other_error : public exception +{ + public: + static other_error create(int id_, const std::string& what_arg) + { + std::string w = exception::name("other_error", id_) + what_arg; + return other_error(id_, w.c_str()); + } + + private: + other_error(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; +} // namespace detail +} // namespace nlohmann + +// #include <nlohmann/detail/macro_scope.hpp> + + +#include <utility> // pair + +// This file contains all internal macro definitions +// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them + +// exclude unsupported compilers +#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK) + #if defined(__clang__) + #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 + #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) + #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800 + #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #endif +#endif + +// disable float-equal warnings on GCC/clang +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + +// disable documentation warnings on clang +#if defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wdocumentation" +#endif + +// allow for portable deprecation warnings +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #define JSON_DEPRECATED __attribute__((deprecated)) +#elif defined(_MSC_VER) + #define JSON_DEPRECATED __declspec(deprecated) +#else + #define JSON_DEPRECATED +#endif + +// allow for portable nodiscard warnings +#if defined(__has_cpp_attribute) + #if __has_cpp_attribute(nodiscard) + #define JSON_NODISCARD [[nodiscard]] + #elif __has_cpp_attribute(gnu::warn_unused_result) + #define JSON_NODISCARD [[gnu::warn_unused_result]] + #else + #define JSON_NODISCARD + #endif +#else + #define JSON_NODISCARD +#endif + +// allow to disable exceptions +#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(JSON_NOEXCEPTION) + #define JSON_THROW(exception) throw exception + #define JSON_TRY try + #define JSON_CATCH(exception) catch(exception) + #define JSON_INTERNAL_CATCH(exception) catch(exception) +#else + #include <cstdlib> + #define JSON_THROW(exception) std::abort() + #define JSON_TRY if(true) + #define JSON_CATCH(exception) if(false) + #define JSON_INTERNAL_CATCH(exception) if(false) +#endif + +// override exception macros +#if defined(JSON_THROW_USER) + #undef JSON_THROW + #define JSON_THROW JSON_THROW_USER +#endif +#if defined(JSON_TRY_USER) + #undef JSON_TRY + #define JSON_TRY JSON_TRY_USER +#endif +#if defined(JSON_CATCH_USER) + #undef JSON_CATCH + #define JSON_CATCH JSON_CATCH_USER + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_CATCH_USER +#endif +#if defined(JSON_INTERNAL_CATCH_USER) + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_INTERNAL_CATCH_USER +#endif + +// manual branch prediction +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #define JSON_LIKELY(x) __builtin_expect(x, 1) + #define JSON_UNLIKELY(x) __builtin_expect(x, 0) +#else + #define JSON_LIKELY(x) x + #define JSON_UNLIKELY(x) x +#endif + +// C++ language standard detection +#if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 +#elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) + #define JSON_HAS_CPP_14 +#endif + +/*! +@brief macro to briefly define a mapping between an enum and JSON +@def NLOHMANN_JSON_SERIALIZE_ENUM +@since version 3.4.0 +*/ +#define NLOHMANN_JSON_SERIALIZE_ENUM(ENUM_TYPE, ...) \ + template<typename BasicJsonType> \ + inline void to_json(BasicJsonType& j, const ENUM_TYPE& e) \ + { \ + static_assert(std::is_enum<ENUM_TYPE>::value, #ENUM_TYPE " must be an enum!"); \ + static const std::pair<ENUM_TYPE, BasicJsonType> m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [e](const std::pair<ENUM_TYPE, BasicJsonType>& ej_pair) -> bool \ + { \ + return ej_pair.first == e; \ + }); \ + j = ((it != std::end(m)) ? it : std::begin(m))->second; \ + } \ + template<typename BasicJsonType> \ + inline void from_json(const BasicJsonType& j, ENUM_TYPE& e) \ + { \ + static_assert(std::is_enum<ENUM_TYPE>::value, #ENUM_TYPE " must be an enum!"); \ + static const std::pair<ENUM_TYPE, BasicJsonType> m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [j](const std::pair<ENUM_TYPE, BasicJsonType>& ej_pair) -> bool \ + { \ + return ej_pair.second == j; \ + }); \ + e = ((it != std::end(m)) ? it : std::begin(m))->first; \ + } + +// Ugly macros to avoid uglier copy-paste when specializing basic_json. They +// may be removed in the future once the class is split. + +#define NLOHMANN_BASIC_JSON_TPL_DECLARATION \ + template<template<typename, typename, typename...> class ObjectType, \ + template<typename, typename...> class ArrayType, \ + class StringType, class BooleanType, class NumberIntegerType, \ + class NumberUnsignedType, class NumberFloatType, \ + template<typename> class AllocatorType, \ + template<typename, typename = void> class JSONSerializer> + +#define NLOHMANN_BASIC_JSON_TPL \ + basic_json<ObjectType, ArrayType, StringType, BooleanType, \ + NumberIntegerType, NumberUnsignedType, NumberFloatType, \ + AllocatorType, JSONSerializer> + +// #include <nlohmann/detail/meta/cpp_future.hpp> + + +#include <ciso646> // not +#include <cstddef> // size_t +#include <type_traits> // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type + +namespace nlohmann +{ +namespace detail +{ +// alias templates to reduce boilerplate +template<bool B, typename T = void> +using enable_if_t = typename std::enable_if<B, T>::type; + +template<typename T> +using uncvref_t = typename std::remove_cv<typename std::remove_reference<T>::type>::type; + +// implementation of C++14 index_sequence and affiliates +// source: https://stackoverflow.com/a/32223343 +template<std::size_t... Ints> +struct index_sequence +{ + using type = index_sequence; + using value_type = std::size_t; + static constexpr std::size_t size() noexcept + { + return sizeof...(Ints); + } +}; + +template<class Sequence1, class Sequence2> +struct merge_and_renumber; + +template<std::size_t... I1, std::size_t... I2> +struct merge_and_renumber<index_sequence<I1...>, index_sequence<I2...>> + : index_sequence < I1..., (sizeof...(I1) + I2)... > {}; + +template<std::size_t N> +struct make_index_sequence + : merge_and_renumber < typename make_index_sequence < N / 2 >::type, + typename make_index_sequence < N - N / 2 >::type > {}; + +template<> struct make_index_sequence<0> : index_sequence<> {}; +template<> struct make_index_sequence<1> : index_sequence<0> {}; + +template<typename... Ts> +using index_sequence_for = make_index_sequence<sizeof...(Ts)>; + +// dispatch utility (taken from ranges-v3) +template<unsigned N> struct priority_tag : priority_tag < N - 1 > {}; +template<> struct priority_tag<0> {}; + +// taken from ranges-v3 +template<typename T> +struct static_const +{ + static constexpr T value{}; +}; + +template<typename T> +constexpr T static_const<T>::value; +} // namespace detail +} // namespace nlohmann + +// #include <nlohmann/detail/meta/type_traits.hpp> + + +#include <ciso646> // not +#include <limits> // numeric_limits +#include <type_traits> // false_type, is_constructible, is_integral, is_same, true_type +#include <utility> // declval + +// #include <nlohmann/detail/iterators/iterator_traits.hpp> + + +#include <iterator> // random_access_iterator_tag + +// #include <nlohmann/detail/meta/void_t.hpp> + + +namespace nlohmann +{ +namespace detail +{ +template <typename ...Ts> struct make_void +{ + using type = void; +}; +template <typename ...Ts> using void_t = typename make_void<Ts...>::type; +} // namespace detail +} // namespace nlohmann + +// #include <nlohmann/detail/meta/cpp_future.hpp> + + +namespace nlohmann +{ +namespace detail +{ +template <typename It, typename = void> +struct iterator_types {}; + +template <typename It> +struct iterator_types < + It, + void_t<typename It::difference_type, typename It::value_type, typename It::pointer, + typename It::reference, typename It::iterator_category >> +{ + using difference_type = typename It::difference_type; + using value_type = typename It::value_type; + using pointer = typename It::pointer; + using reference = typename It::reference; + using iterator_category = typename It::iterator_category; +}; + +// This is required as some compilers implement std::iterator_traits in a way that +// doesn't work with SFINAE. See https://github.com/nlohmann/json/issues/1341. +template <typename T, typename = void> +struct iterator_traits +{ +}; + +template <typename T> +struct iterator_traits < T, enable_if_t < !std::is_pointer<T>::value >> + : iterator_types<T> +{ +}; + +template <typename T> +struct iterator_traits<T*, enable_if_t<std::is_object<T>::value>> +{ + using iterator_category = std::random_access_iterator_tag; + using value_type = T; + using difference_type = ptrdiff_t; + using pointer = T*; + using reference = T&; +}; +} // namespace detail +} // namespace nlohmann + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/meta/cpp_future.hpp> + +// #include <nlohmann/detail/meta/detected.hpp> + + +#include <type_traits> + +// #include <nlohmann/detail/meta/void_t.hpp> + + +// http://en.cppreference.com/w/cpp/experimental/is_detected +namespace nlohmann +{ +namespace detail +{ +struct nonesuch +{ + nonesuch() = delete; + ~nonesuch() = delete; + nonesuch(nonesuch const&) = delete; + nonesuch(nonesuch const&&) = delete; + void operator=(nonesuch const&) = delete; + void operator=(nonesuch&&) = delete; +}; + +template <class Default, + class AlwaysVoid, + template <class...> class Op, + class... Args> +struct detector +{ + using value_t = std::false_type; + using type = Default; +}; + +template <class Default, template <class...> class Op, class... Args> +struct detector<Default, void_t<Op<Args...>>, Op, Args...> +{ + using value_t = std::true_type; + using type = Op<Args...>; +}; + +template <template <class...> class Op, class... Args> +using is_detected = typename detector<nonesuch, void, Op, Args...>::value_t; + +template <template <class...> class Op, class... Args> +using detected_t = typename detector<nonesuch, void, Op, Args...>::type; + +template <class Default, template <class...> class Op, class... Args> +using detected_or = detector<Default, void, Op, Args...>; + +template <class Default, template <class...> class Op, class... Args> +using detected_or_t = typename detected_or<Default, Op, Args...>::type; + +template <class Expected, template <class...> class Op, class... Args> +using is_detected_exact = std::is_same<Expected, detected_t<Op, Args...>>; + +template <class To, template <class...> class Op, class... Args> +using is_detected_convertible = + std::is_convertible<detected_t<Op, Args...>, To>; +} // namespace detail +} // namespace nlohmann + +// #include <nlohmann/json_fwd.hpp> +#ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_ +#define INCLUDE_NLOHMANN_JSON_FWD_HPP_ + +#include <cstdint> // int64_t, uint64_t +#include <map> // map +#include <memory> // allocator +#include <string> // string +#include <vector> // vector + +/*! +@brief namespace for Niels Lohmann +@see https://github.com/nlohmann +@since version 1.0.0 +*/ +namespace nlohmann +{ +/*! +@brief default JSONSerializer template argument + +This serializer ignores the template arguments and uses ADL +([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl)) +for serialization. +*/ +template<typename T = void, typename SFINAE = void> +struct adl_serializer; + +template<template<typename U, typename V, typename... Args> class ObjectType = + std::map, + template<typename U, typename... Args> class ArrayType = std::vector, + class StringType = std::string, class BooleanType = bool, + class NumberIntegerType = std::int64_t, + class NumberUnsignedType = std::uint64_t, + class NumberFloatType = double, + template<typename U> class AllocatorType = std::allocator, + template<typename T, typename SFINAE = void> class JSONSerializer = + adl_serializer> +class basic_json; + +/*! +@brief JSON Pointer + +A JSON pointer defines a string syntax for identifying a specific value +within a JSON document. It can be used with functions `at` and +`operator[]`. Furthermore, JSON pointers are the base for JSON patches. + +@sa [RFC 6901](https://tools.ietf.org/html/rfc6901) + +@since version 2.0.0 +*/ +template<typename BasicJsonType> +class json_pointer; + +/*! +@brief default JSON class + +This type is the default specialization of the @ref basic_json class which +uses the standard template types. + +@since version 1.0.0 +*/ +using json = basic_json<>; +} // namespace nlohmann + +#endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_ + + +namespace nlohmann +{ +/*! +@brief detail namespace with internal helper functions + +This namespace collects functions that should not be exposed, +implementations of some @ref basic_json methods, and meta-programming helpers. + +@since version 2.1.0 +*/ +namespace detail +{ +///////////// +// helpers // +///////////// + +// Note to maintainers: +// +// Every trait in this file expects a non CV-qualified type. +// The only exceptions are in the 'aliases for detected' section +// (i.e. those of the form: decltype(T::member_function(std::declval<T>()))) +// +// In this case, T has to be properly CV-qualified to constraint the function arguments +// (e.g. to_json(BasicJsonType&, const T&)) + +template<typename> struct is_basic_json : std::false_type {}; + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +struct is_basic_json<NLOHMANN_BASIC_JSON_TPL> : std::true_type {}; + +////////////////////////// +// aliases for detected // +////////////////////////// + +template <typename T> +using mapped_type_t = typename T::mapped_type; + +template <typename T> +using key_type_t = typename T::key_type; + +template <typename T> +using value_type_t = typename T::value_type; + +template <typename T> +using difference_type_t = typename T::difference_type; + +template <typename T> +using pointer_t = typename T::pointer; + +template <typename T> +using reference_t = typename T::reference; + +template <typename T> +using iterator_category_t = typename T::iterator_category; + +template <typename T> +using iterator_t = typename T::iterator; + +template <typename T, typename... Args> +using to_json_function = decltype(T::to_json(std::declval<Args>()...)); + +template <typename T, typename... Args> +using from_json_function = decltype(T::from_json(std::declval<Args>()...)); + +template <typename T, typename U> +using get_template_function = decltype(std::declval<T>().template get<U>()); + +// trait checking if JSONSerializer<T>::from_json(json const&, udt&) exists +template <typename BasicJsonType, typename T, typename = void> +struct has_from_json : std::false_type {}; + +template <typename BasicJsonType, typename T> +struct has_from_json<BasicJsonType, T, + enable_if_t<not is_basic_json<T>::value>> +{ + using serializer = typename BasicJsonType::template json_serializer<T, void>; + + static constexpr bool value = + is_detected_exact<void, from_json_function, serializer, + const BasicJsonType&, T&>::value; +}; + +// This trait checks if JSONSerializer<T>::from_json(json const&) exists +// this overload is used for non-default-constructible user-defined-types +template <typename BasicJsonType, typename T, typename = void> +struct has_non_default_from_json : std::false_type {}; + +template<typename BasicJsonType, typename T> +struct has_non_default_from_json<BasicJsonType, T, enable_if_t<not is_basic_json<T>::value>> +{ + using serializer = typename BasicJsonType::template json_serializer<T, void>; + + static constexpr bool value = + is_detected_exact<T, from_json_function, serializer, + const BasicJsonType&>::value; +}; + +// This trait checks if BasicJsonType::json_serializer<T>::to_json exists +// Do not evaluate the trait when T is a basic_json type, to avoid template instantiation infinite recursion. +template <typename BasicJsonType, typename T, typename = void> +struct has_to_json : std::false_type {}; + +template <typename BasicJsonType, typename T> +struct has_to_json<BasicJsonType, T, enable_if_t<not is_basic_json<T>::value>> +{ + using serializer = typename BasicJsonType::template json_serializer<T, void>; + + static constexpr bool value = + is_detected_exact<void, to_json_function, serializer, BasicJsonType&, + T>::value; +}; + + +/////////////////// +// is_ functions // +/////////////////// + +template <typename T, typename = void> +struct is_iterator_traits : std::false_type {}; + +template <typename T> +struct is_iterator_traits<iterator_traits<T>> +{ + private: + using traits = iterator_traits<T>; + + public: + static constexpr auto value = + is_detected<value_type_t, traits>::value && + is_detected<difference_type_t, traits>::value && + is_detected<pointer_t, traits>::value && + is_detected<iterator_category_t, traits>::value && + is_detected<reference_t, traits>::value; +}; + +// source: https://stackoverflow.com/a/37193089/4116453 + +template <typename T, typename = void> +struct is_complete_type : std::false_type {}; + +template <typename T> +struct is_complete_type<T, decltype(void(sizeof(T)))> : std::true_type {}; + +template <typename BasicJsonType, typename CompatibleObjectType, + typename = void> +struct is_compatible_object_type_impl : std::false_type {}; + +template <typename BasicJsonType, typename CompatibleObjectType> +struct is_compatible_object_type_impl < + BasicJsonType, CompatibleObjectType, + enable_if_t<is_detected<mapped_type_t, CompatibleObjectType>::value and + is_detected<key_type_t, CompatibleObjectType>::value >> +{ + + using object_t = typename BasicJsonType::object_t; + + // macOS's is_constructible does not play well with nonesuch... + static constexpr bool value = + std::is_constructible<typename object_t::key_type, + typename CompatibleObjectType::key_type>::value and + std::is_constructible<typename object_t::mapped_type, + typename CompatibleObjectType::mapped_type>::value; +}; + +template <typename BasicJsonType, typename CompatibleObjectType> +struct is_compatible_object_type + : is_compatible_object_type_impl<BasicJsonType, CompatibleObjectType> {}; + +template <typename BasicJsonType, typename ConstructibleObjectType, + typename = void> +struct is_constructible_object_type_impl : std::false_type {}; + +template <typename BasicJsonType, typename ConstructibleObjectType> +struct is_constructible_object_type_impl < + BasicJsonType, ConstructibleObjectType, + enable_if_t<is_detected<mapped_type_t, ConstructibleObjectType>::value and + is_detected<key_type_t, ConstructibleObjectType>::value >> +{ + using object_t = typename BasicJsonType::object_t; + + static constexpr bool value = + (std::is_constructible<typename ConstructibleObjectType::key_type, typename object_t::key_type>::value and + std::is_same<typename object_t::mapped_type, typename ConstructibleObjectType::mapped_type>::value) or + (has_from_json<BasicJsonType, typename ConstructibleObjectType::mapped_type>::value or + has_non_default_from_json<BasicJsonType, typename ConstructibleObjectType::mapped_type >::value); +}; + +template <typename BasicJsonType, typename ConstructibleObjectType> +struct is_constructible_object_type + : is_constructible_object_type_impl<BasicJsonType, + ConstructibleObjectType> {}; + +template <typename BasicJsonType, typename CompatibleStringType, + typename = void> +struct is_compatible_string_type_impl : std::false_type {}; + +template <typename BasicJsonType, typename CompatibleStringType> +struct is_compatible_string_type_impl < + BasicJsonType, CompatibleStringType, + enable_if_t<is_detected_exact<typename BasicJsonType::string_t::value_type, + value_type_t, CompatibleStringType>::value >> +{ + static constexpr auto value = + std::is_constructible<typename BasicJsonType::string_t, CompatibleStringType>::value; +}; + +template <typename BasicJsonType, typename ConstructibleStringType> +struct is_compatible_string_type + : is_compatible_string_type_impl<BasicJsonType, ConstructibleStringType> {}; + +template <typename BasicJsonType, typename ConstructibleStringType, + typename = void> +struct is_constructible_string_type_impl : std::false_type {}; + +template <typename BasicJsonType, typename ConstructibleStringType> +struct is_constructible_string_type_impl < + BasicJsonType, ConstructibleStringType, + enable_if_t<is_detected_exact<typename BasicJsonType::string_t::value_type, + value_type_t, ConstructibleStringType>::value >> +{ + static constexpr auto value = + std::is_constructible<ConstructibleStringType, + typename BasicJsonType::string_t>::value; +}; + +template <typename BasicJsonType, typename ConstructibleStringType> +struct is_constructible_string_type + : is_constructible_string_type_impl<BasicJsonType, ConstructibleStringType> {}; + +template <typename BasicJsonType, typename CompatibleArrayType, typename = void> +struct is_compatible_array_type_impl : std::false_type {}; + +template <typename BasicJsonType, typename CompatibleArrayType> +struct is_compatible_array_type_impl < + BasicJsonType, CompatibleArrayType, + enable_if_t<is_detected<value_type_t, CompatibleArrayType>::value and + is_detected<iterator_t, CompatibleArrayType>::value and +// This is needed because json_reverse_iterator has a ::iterator type... +// Therefore it is detected as a CompatibleArrayType. +// The real fix would be to have an Iterable concept. + not is_iterator_traits< + iterator_traits<CompatibleArrayType>>::value >> +{ + static constexpr bool value = + std::is_constructible<BasicJsonType, + typename CompatibleArrayType::value_type>::value; +}; + +template <typename BasicJsonType, typename CompatibleArrayType> +struct is_compatible_array_type + : is_compatible_array_type_impl<BasicJsonType, CompatibleArrayType> {}; + +template <typename BasicJsonType, typename ConstructibleArrayType, typename = void> +struct is_constructible_array_type_impl : std::false_type {}; + +template <typename BasicJsonType, typename ConstructibleArrayType> +struct is_constructible_array_type_impl < + BasicJsonType, ConstructibleArrayType, + enable_if_t<std::is_same<ConstructibleArrayType, + typename BasicJsonType::value_type>::value >> + : std::true_type {}; + +template <typename BasicJsonType, typename ConstructibleArrayType> +struct is_constructible_array_type_impl < + BasicJsonType, ConstructibleArrayType, + enable_if_t<not std::is_same<ConstructibleArrayType, + typename BasicJsonType::value_type>::value and + is_detected<value_type_t, ConstructibleArrayType>::value and + is_detected<iterator_t, ConstructibleArrayType>::value and + is_complete_type< + detected_t<value_type_t, ConstructibleArrayType>>::value >> +{ + static constexpr bool value = + // This is needed because json_reverse_iterator has a ::iterator type, + // furthermore, std::back_insert_iterator (and other iterators) have a base class `iterator`... + // Therefore it is detected as a ConstructibleArrayType. + // The real fix would be to have an Iterable concept. + not is_iterator_traits < + iterator_traits<ConstructibleArrayType >>::value and + + (std::is_same<typename ConstructibleArrayType::value_type, typename BasicJsonType::array_t::value_type>::value or + has_from_json<BasicJsonType, + typename ConstructibleArrayType::value_type>::value or + has_non_default_from_json < + BasicJsonType, typename ConstructibleArrayType::value_type >::value); +}; + +template <typename BasicJsonType, typename ConstructibleArrayType> +struct is_constructible_array_type + : is_constructible_array_type_impl<BasicJsonType, ConstructibleArrayType> {}; + +template <typename RealIntegerType, typename CompatibleNumberIntegerType, + typename = void> +struct is_compatible_integer_type_impl : std::false_type {}; + +template <typename RealIntegerType, typename CompatibleNumberIntegerType> +struct is_compatible_integer_type_impl < + RealIntegerType, CompatibleNumberIntegerType, + enable_if_t<std::is_integral<RealIntegerType>::value and + std::is_integral<CompatibleNumberIntegerType>::value and + not std::is_same<bool, CompatibleNumberIntegerType>::value >> +{ + // is there an assert somewhere on overflows? + using RealLimits = std::numeric_limits<RealIntegerType>; + using CompatibleLimits = std::numeric_limits<CompatibleNumberIntegerType>; + + static constexpr auto value = + std::is_constructible<RealIntegerType, + CompatibleNumberIntegerType>::value and + CompatibleLimits::is_integer and + RealLimits::is_signed == CompatibleLimits::is_signed; +}; + +template <typename RealIntegerType, typename CompatibleNumberIntegerType> +struct is_compatible_integer_type + : is_compatible_integer_type_impl<RealIntegerType, + CompatibleNumberIntegerType> {}; + +template <typename BasicJsonType, typename CompatibleType, typename = void> +struct is_compatible_type_impl: std::false_type {}; + +template <typename BasicJsonType, typename CompatibleType> +struct is_compatible_type_impl < + BasicJsonType, CompatibleType, + enable_if_t<is_complete_type<CompatibleType>::value >> +{ + static constexpr bool value = + has_to_json<BasicJsonType, CompatibleType>::value; +}; + +template <typename BasicJsonType, typename CompatibleType> +struct is_compatible_type + : is_compatible_type_impl<BasicJsonType, CompatibleType> {}; +} // namespace detail +} // namespace nlohmann + +// #include <nlohmann/detail/value_t.hpp> + + +#include <array> // array +#include <ciso646> // and +#include <cstddef> // size_t +#include <cstdint> // uint8_t +#include <string> // string + +namespace nlohmann +{ +namespace detail +{ +/////////////////////////// +// JSON type enumeration // +/////////////////////////// + +/*! +@brief the JSON type enumeration + +This enumeration collects the different JSON types. It is internally used to +distinguish the stored values, and the functions @ref basic_json::is_null(), +@ref basic_json::is_object(), @ref basic_json::is_array(), +@ref basic_json::is_string(), @ref basic_json::is_boolean(), +@ref basic_json::is_number() (with @ref basic_json::is_number_integer(), +@ref basic_json::is_number_unsigned(), and @ref basic_json::is_number_float()), +@ref basic_json::is_discarded(), @ref basic_json::is_primitive(), and +@ref basic_json::is_structured() rely on it. + +@note There are three enumeration entries (number_integer, number_unsigned, and +number_float), because the library distinguishes these three types for numbers: +@ref basic_json::number_unsigned_t is used for unsigned integers, +@ref basic_json::number_integer_t is used for signed integers, and +@ref basic_json::number_float_t is used for floating-point numbers or to +approximate integers which do not fit in the limits of their respective type. + +@sa @ref basic_json::basic_json(const value_t value_type) -- create a JSON +value with the default value for a given type + +@since version 1.0.0 +*/ +enum class value_t : std::uint8_t +{ + null, ///< null value + object, ///< object (unordered set of name/value pairs) + array, ///< array (ordered collection of values) + string, ///< string value + boolean, ///< boolean value + number_integer, ///< number value (signed integer) + number_unsigned, ///< number value (unsigned integer) + number_float, ///< number value (floating-point) + discarded ///< discarded by the the parser callback function +}; + +/*! +@brief comparison operator for JSON types + +Returns an ordering that is similar to Python: +- order: null < boolean < number < object < array < string +- furthermore, each type is not smaller than itself +- discarded values are not comparable + +@since version 1.0.0 +*/ +inline bool operator<(const value_t lhs, const value_t rhs) noexcept +{ + static constexpr std::array<std::uint8_t, 8> order = {{ + 0 /* null */, 3 /* object */, 4 /* array */, 5 /* string */, + 1 /* boolean */, 2 /* integer */, 2 /* unsigned */, 2 /* float */ + } + }; + + const auto l_index = static_cast<std::size_t>(lhs); + const auto r_index = static_cast<std::size_t>(rhs); + return l_index < order.size() and r_index < order.size() and order[l_index] < order[r_index]; +} +} // namespace detail +} // namespace nlohmann + + +namespace nlohmann +{ +namespace detail +{ +template<typename BasicJsonType> +void from_json(const BasicJsonType& j, typename std::nullptr_t& n) +{ + if (JSON_UNLIKELY(not j.is_null())) + { + JSON_THROW(type_error::create(302, "type must be null, but is " + std::string(j.type_name()))); + } + n = nullptr; +} + +// overloads for basic_json template parameters +template<typename BasicJsonType, typename ArithmeticType, + enable_if_t<std::is_arithmetic<ArithmeticType>::value and + not std::is_same<ArithmeticType, typename BasicJsonType::boolean_t>::value, + int> = 0> +void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val) +{ + switch (static_cast<value_t>(j)) + { + case value_t::number_unsigned: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>()); + break; + } + case value_t::number_integer: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>()); + break; + } + case value_t::number_float: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>()); + break; + } + + default: + JSON_THROW(type_error::create(302, "type must be number, but is " + std::string(j.type_name()))); + } +} + +template<typename BasicJsonType> +void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b) +{ + if (JSON_UNLIKELY(not j.is_boolean())) + { + JSON_THROW(type_error::create(302, "type must be boolean, but is " + std::string(j.type_name()))); + } + b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>(); +} + +template<typename BasicJsonType> +void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s) +{ + if (JSON_UNLIKELY(not j.is_string())) + { + JSON_THROW(type_error::create(302, "type must be string, but is " + std::string(j.type_name()))); + } + s = *j.template get_ptr<const typename BasicJsonType::string_t*>(); +} + +template < + typename BasicJsonType, typename ConstructibleStringType, + enable_if_t < + is_constructible_string_type<BasicJsonType, ConstructibleStringType>::value and + not std::is_same<typename BasicJsonType::string_t, + ConstructibleStringType>::value, + int > = 0 > +void from_json(const BasicJsonType& j, ConstructibleStringType& s) +{ + if (JSON_UNLIKELY(not j.is_string())) + { + JSON_THROW(type_error::create(302, "type must be string, but is " + std::string(j.type_name()))); + } + + s = *j.template get_ptr<const typename BasicJsonType::string_t*>(); +} + +template<typename BasicJsonType> +void from_json(const BasicJsonType& j, typename BasicJsonType::number_float_t& val) +{ + get_arithmetic_value(j, val); +} + +template<typename BasicJsonType> +void from_json(const BasicJsonType& j, typename BasicJsonType::number_unsigned_t& val) +{ + get_arithmetic_value(j, val); +} + +template<typename BasicJsonType> +void from_json(const BasicJsonType& j, typename BasicJsonType::number_integer_t& val) +{ + get_arithmetic_value(j, val); +} + +template<typename BasicJsonType, typename EnumType, + enable_if_t<std::is_enum<EnumType>::value, int> = 0> +void from_json(const BasicJsonType& j, EnumType& e) +{ + typename std::underlying_type<EnumType>::type val; + get_arithmetic_value(j, val); + e = static_cast<EnumType>(val); +} + +// forward_list doesn't have an insert method +template<typename BasicJsonType, typename T, typename Allocator, + enable_if_t<std::is_convertible<BasicJsonType, T>::value, int> = 0> +void from_json(const BasicJsonType& j, std::forward_list<T, Allocator>& l) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()))); + } + std::transform(j.rbegin(), j.rend(), + std::front_inserter(l), [](const BasicJsonType & i) + { + return i.template get<T>(); + }); +} + +// valarray doesn't have an insert method +template<typename BasicJsonType, typename T, + enable_if_t<std::is_convertible<BasicJsonType, T>::value, int> = 0> +void from_json(const BasicJsonType& j, std::valarray<T>& l) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()))); + } + l.resize(j.size()); + std::copy(j.m_value.array->begin(), j.m_value.array->end(), std::begin(l)); +} + +template<typename BasicJsonType> +void from_json_array_impl(const BasicJsonType& j, typename BasicJsonType::array_t& arr, priority_tag<3> /*unused*/) +{ + arr = *j.template get_ptr<const typename BasicJsonType::array_t*>(); +} + +template <typename BasicJsonType, typename T, std::size_t N> +auto from_json_array_impl(const BasicJsonType& j, std::array<T, N>& arr, + priority_tag<2> /*unused*/) +-> decltype(j.template get<T>(), void()) +{ + for (std::size_t i = 0; i < N; ++i) + { + arr[i] = j.at(i).template get<T>(); + } +} + +template<typename BasicJsonType, typename ConstructibleArrayType> +auto from_json_array_impl(const BasicJsonType& j, ConstructibleArrayType& arr, priority_tag<1> /*unused*/) +-> decltype( + arr.reserve(std::declval<typename ConstructibleArrayType::size_type>()), + j.template get<typename ConstructibleArrayType::value_type>(), + void()) +{ + using std::end; + + arr.reserve(j.size()); + std::transform(j.begin(), j.end(), + std::inserter(arr, end(arr)), [](const BasicJsonType & i) + { + // get<BasicJsonType>() returns *this, this won't call a from_json + // method when value_type is BasicJsonType + return i.template get<typename ConstructibleArrayType::value_type>(); + }); +} + +template <typename BasicJsonType, typename ConstructibleArrayType> +void from_json_array_impl(const BasicJsonType& j, ConstructibleArrayType& arr, + priority_tag<0> /*unused*/) +{ + using std::end; + + std::transform( + j.begin(), j.end(), std::inserter(arr, end(arr)), + [](const BasicJsonType & i) + { + // get<BasicJsonType>() returns *this, this won't call a from_json + // method when value_type is BasicJsonType + return i.template get<typename ConstructibleArrayType::value_type>(); + }); +} + +template <typename BasicJsonType, typename ConstructibleArrayType, + enable_if_t < + is_constructible_array_type<BasicJsonType, ConstructibleArrayType>::value and + not is_constructible_object_type<BasicJsonType, ConstructibleArrayType>::value and + not is_constructible_string_type<BasicJsonType, ConstructibleArrayType>::value and + not is_basic_json<ConstructibleArrayType>::value, + int > = 0 > + +auto from_json(const BasicJsonType& j, ConstructibleArrayType& arr) +-> decltype(from_json_array_impl(j, arr, priority_tag<3> {}), +j.template get<typename ConstructibleArrayType::value_type>(), +void()) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + + std::string(j.type_name()))); + } + + from_json_array_impl(j, arr, priority_tag<3> {}); +} + +template<typename BasicJsonType, typename ConstructibleObjectType, + enable_if_t<is_constructible_object_type<BasicJsonType, ConstructibleObjectType>::value, int> = 0> +void from_json(const BasicJsonType& j, ConstructibleObjectType& obj) +{ + if (JSON_UNLIKELY(not j.is_object())) + { + JSON_THROW(type_error::create(302, "type must be object, but is " + std::string(j.type_name()))); + } + + auto inner_object = j.template get_ptr<const typename BasicJsonType::object_t*>(); + using value_type = typename ConstructibleObjectType::value_type; + std::transform( + inner_object->begin(), inner_object->end(), + std::inserter(obj, obj.begin()), + [](typename BasicJsonType::object_t::value_type const & p) + { + return value_type(p.first, p.second.template get<typename ConstructibleObjectType::mapped_type>()); + }); +} + +// overload for arithmetic types, not chosen for basic_json template arguments +// (BooleanType, etc..); note: Is it really necessary to provide explicit +// overloads for boolean_t etc. in case of a custom BooleanType which is not +// an arithmetic type? +template<typename BasicJsonType, typename ArithmeticType, + enable_if_t < + std::is_arithmetic<ArithmeticType>::value and + not std::is_same<ArithmeticType, typename BasicJsonType::number_unsigned_t>::value and + not std::is_same<ArithmeticType, typename BasicJsonType::number_integer_t>::value and + not std::is_same<ArithmeticType, typename BasicJsonType::number_float_t>::value and + not std::is_same<ArithmeticType, typename BasicJsonType::boolean_t>::value, + int> = 0> +void from_json(const BasicJsonType& j, ArithmeticType& val) +{ + switch (static_cast<value_t>(j)) + { + case value_t::number_unsigned: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>()); + break; + } + case value_t::number_integer: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>()); + break; + } + case value_t::number_float: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>()); + break; + } + case value_t::boolean: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>()); + break; + } + + default: + JSON_THROW(type_error::create(302, "type must be number, but is " + std::string(j.type_name()))); + } +} + +template<typename BasicJsonType, typename A1, typename A2> +void from_json(const BasicJsonType& j, std::pair<A1, A2>& p) +{ + p = {j.at(0).template get<A1>(), j.at(1).template get<A2>()}; +} + +template<typename BasicJsonType, typename Tuple, std::size_t... Idx> +void from_json_tuple_impl(const BasicJsonType& j, Tuple& t, index_sequence<Idx...> /*unused*/) +{ + t = std::make_tuple(j.at(Idx).template get<typename std::tuple_element<Idx, Tuple>::type>()...); +} + +template<typename BasicJsonType, typename... Args> +void from_json(const BasicJsonType& j, std::tuple<Args...>& t) +{ + from_json_tuple_impl(j, t, index_sequence_for<Args...> {}); +} + +template <typename BasicJsonType, typename Key, typename Value, typename Compare, typename Allocator, + typename = enable_if_t<not std::is_constructible< + typename BasicJsonType::string_t, Key>::value>> +void from_json(const BasicJsonType& j, std::map<Key, Value, Compare, Allocator>& m) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()))); + } + for (const auto& p : j) + { + if (JSON_UNLIKELY(not p.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(p.type_name()))); + } + m.emplace(p.at(0).template get<Key>(), p.at(1).template get<Value>()); + } +} + +template <typename BasicJsonType, typename Key, typename Value, typename Hash, typename KeyEqual, typename Allocator, + typename = enable_if_t<not std::is_constructible< + typename BasicJsonType::string_t, Key>::value>> +void from_json(const BasicJsonType& j, std::unordered_map<Key, Value, Hash, KeyEqual, Allocator>& m) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()))); + } + for (const auto& p : j) + { + if (JSON_UNLIKELY(not p.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(p.type_name()))); + } + m.emplace(p.at(0).template get<Key>(), p.at(1).template get<Value>()); + } +} + +struct from_json_fn +{ + template<typename BasicJsonType, typename T> + auto operator()(const BasicJsonType& j, T& val) const + noexcept(noexcept(from_json(j, val))) + -> decltype(from_json(j, val), void()) + { + return from_json(j, val); + } +}; +} // namespace detail + +/// namespace to hold default `from_json` function +/// to see why this is required: +/// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4381.html +namespace +{ +constexpr const auto& from_json = detail::static_const<detail::from_json_fn>::value; +} // namespace +} // namespace nlohmann + +// #include <nlohmann/detail/conversions/to_json.hpp> + + +#include <algorithm> // copy +#include <ciso646> // or, and, not +#include <iterator> // begin, end +#include <string> // string +#include <tuple> // tuple, get +#include <type_traits> // is_same, is_constructible, is_floating_point, is_enum, underlying_type +#include <utility> // move, forward, declval, pair +#include <valarray> // valarray +#include <vector> // vector + +// #include <nlohmann/detail/iterators/iteration_proxy.hpp> + + +#include <cstddef> // size_t +#include <iterator> // input_iterator_tag +#include <string> // string, to_string +#include <tuple> // tuple_size, get, tuple_element + +// #include <nlohmann/detail/meta/type_traits.hpp> + +// #include <nlohmann/detail/value_t.hpp> + + +namespace nlohmann +{ +namespace detail +{ +template <typename IteratorType> class iteration_proxy_value +{ + public: + using difference_type = std::ptrdiff_t; + using value_type = iteration_proxy_value; + using pointer = value_type * ; + using reference = value_type & ; + using iterator_category = std::input_iterator_tag; + + private: + /// the iterator + IteratorType anchor; + /// an index for arrays (used to create key names) + std::size_t array_index = 0; + /// last stringified array index + mutable std::size_t array_index_last = 0; + /// a string representation of the array index + mutable std::string array_index_str = "0"; + /// an empty string (to return a reference for primitive values) + const std::string empty_str = ""; + + public: + explicit iteration_proxy_value(IteratorType it) noexcept : anchor(it) {} + + /// dereference operator (needed for range-based for) + iteration_proxy_value& operator*() + { + return *this; + } + + /// increment operator (needed for range-based for) + iteration_proxy_value& operator++() + { + ++anchor; + ++array_index; + + return *this; + } + + /// equality operator (needed for InputIterator) + bool operator==(const iteration_proxy_value& o) const + { + return anchor == o.anchor; + } + + /// inequality operator (needed for range-based for) + bool operator!=(const iteration_proxy_value& o) const + { + return anchor != o.anchor; + } + + /// return key of the iterator + const std::string& key() const + { + assert(anchor.m_object != nullptr); + + switch (anchor.m_object->type()) + { + // use integer array index as key + case value_t::array: + { + if (array_index != array_index_last) + { + array_index_str = std::to_string(array_index); + array_index_last = array_index; + } + return array_index_str; + } + + // use key from the object + case value_t::object: + return anchor.key(); + + // use an empty key for all primitive types + default: + return empty_str; + } + } + + /// return value of the iterator + typename IteratorType::reference value() const + { + return anchor.value(); + } +}; + +/// proxy class for the items() function +template<typename IteratorType> class iteration_proxy +{ + private: + /// the container to iterate + typename IteratorType::reference container; + + public: + /// construct iteration proxy from a container + explicit iteration_proxy(typename IteratorType::reference cont) noexcept + : container(cont) {} + + /// return iterator begin (needed for range-based for) + iteration_proxy_value<IteratorType> begin() noexcept + { + return iteration_proxy_value<IteratorType>(container.begin()); + } + + /// return iterator end (needed for range-based for) + iteration_proxy_value<IteratorType> end() noexcept + { + return iteration_proxy_value<IteratorType>(container.end()); + } +}; +// Structured Bindings Support +// For further reference see https://blog.tartanllama.xyz/structured-bindings/ +// And see https://github.com/nlohmann/json/pull/1391 +template <std::size_t N, typename IteratorType, enable_if_t<N == 0, int> = 0> +auto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decltype(i.key()) +{ + return i.key(); +} +// Structured Bindings Support +// For further reference see https://blog.tartanllama.xyz/structured-bindings/ +// And see https://github.com/nlohmann/json/pull/1391 +template <std::size_t N, typename IteratorType, enable_if_t<N == 1, int> = 0> +auto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decltype(i.value()) +{ + return i.value(); +} +} // namespace detail +} // namespace nlohmann + +// The Addition to the STD Namespace is required to add +// Structured Bindings Support to the iteration_proxy_value class +// For further reference see https://blog.tartanllama.xyz/structured-bindings/ +// And see https://github.com/nlohmann/json/pull/1391 +namespace std +{ +#if defined(__clang__) + // Fix: https://github.com/nlohmann/json/issues/1401 + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wmismatched-tags" +#endif +template <typename IteratorType> +class tuple_size<::nlohmann::detail::iteration_proxy_value<IteratorType>> + : public std::integral_constant<std::size_t, 2> {}; + +template <std::size_t N, typename IteratorType> +class tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >> +{ + public: + using type = decltype( + get<N>(std::declval < + ::nlohmann::detail::iteration_proxy_value<IteratorType >> ())); +}; +#if defined(__clang__) + #pragma clang diagnostic pop +#endif +} // namespace std + +// #include <nlohmann/detail/meta/cpp_future.hpp> + +// #include <nlohmann/detail/meta/type_traits.hpp> + +// #include <nlohmann/detail/value_t.hpp> + + +namespace nlohmann +{ +namespace detail +{ +////////////////// +// constructors // +////////////////// + +template<value_t> struct external_constructor; + +template<> +struct external_constructor<value_t::boolean> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::boolean_t b) noexcept + { + j.m_type = value_t::boolean; + j.m_value = b; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::string> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, const typename BasicJsonType::string_t& s) + { + j.m_type = value_t::string; + j.m_value = s; + j.assert_invariant(); + } + + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::string_t&& s) + { + j.m_type = value_t::string; + j.m_value = std::move(s); + j.assert_invariant(); + } + + template<typename BasicJsonType, typename CompatibleStringType, + enable_if_t<not std::is_same<CompatibleStringType, typename BasicJsonType::string_t>::value, + int> = 0> + static void construct(BasicJsonType& j, const CompatibleStringType& str) + { + j.m_type = value_t::string; + j.m_value.string = j.template create<typename BasicJsonType::string_t>(str); + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::number_float> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::number_float_t val) noexcept + { + j.m_type = value_t::number_float; + j.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::number_unsigned> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::number_unsigned_t val) noexcept + { + j.m_type = value_t::number_unsigned; + j.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::number_integer> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::number_integer_t val) noexcept + { + j.m_type = value_t::number_integer; + j.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::array> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, const typename BasicJsonType::array_t& arr) + { + j.m_type = value_t::array; + j.m_value = arr; + j.assert_invariant(); + } + + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::array_t&& arr) + { + j.m_type = value_t::array; + j.m_value = std::move(arr); + j.assert_invariant(); + } + + template<typename BasicJsonType, typename CompatibleArrayType, + enable_if_t<not std::is_same<CompatibleArrayType, typename BasicJsonType::array_t>::value, + int> = 0> + static void construct(BasicJsonType& j, const CompatibleArrayType& arr) + { + using std::begin; + using std::end; + j.m_type = value_t::array; + j.m_value.array = j.template create<typename BasicJsonType::array_t>(begin(arr), end(arr)); + j.assert_invariant(); + } + + template<typename BasicJsonType> + static void construct(BasicJsonType& j, const std::vector<bool>& arr) + { + j.m_type = value_t::array; + j.m_value = value_t::array; + j.m_value.array->reserve(arr.size()); + for (const bool x : arr) + { + j.m_value.array->push_back(x); + } + j.assert_invariant(); + } + + template<typename BasicJsonType, typename T, + enable_if_t<std::is_convertible<T, BasicJsonType>::value, int> = 0> + static void construct(BasicJsonType& j, const std::valarray<T>& arr) + { + j.m_type = value_t::array; + j.m_value = value_t::array; + j.m_value.array->resize(arr.size()); + std::copy(std::begin(arr), std::end(arr), j.m_value.array->begin()); + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::object> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, const typename BasicJsonType::object_t& obj) + { + j.m_type = value_t::object; + j.m_value = obj; + j.assert_invariant(); + } + + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::object_t&& obj) + { + j.m_type = value_t::object; + j.m_value = std::move(obj); + j.assert_invariant(); + } + + template<typename BasicJsonType, typename CompatibleObjectType, + enable_if_t<not std::is_same<CompatibleObjectType, typename BasicJsonType::object_t>::value, int> = 0> + static void construct(BasicJsonType& j, const CompatibleObjectType& obj) + { + using std::begin; + using std::end; + + j.m_type = value_t::object; + j.m_value.object = j.template create<typename BasicJsonType::object_t>(begin(obj), end(obj)); + j.assert_invariant(); + } +}; + +///////////// +// to_json // +///////////// + +template<typename BasicJsonType, typename T, + enable_if_t<std::is_same<T, typename BasicJsonType::boolean_t>::value, int> = 0> +void to_json(BasicJsonType& j, T b) noexcept +{ + external_constructor<value_t::boolean>::construct(j, b); +} + +template<typename BasicJsonType, typename CompatibleString, + enable_if_t<std::is_constructible<typename BasicJsonType::string_t, CompatibleString>::value, int> = 0> +void to_json(BasicJsonType& j, const CompatibleString& s) +{ + external_constructor<value_t::string>::construct(j, s); +} + +template<typename BasicJsonType> +void to_json(BasicJsonType& j, typename BasicJsonType::string_t&& s) +{ + external_constructor<value_t::string>::construct(j, std::move(s)); +} + +template<typename BasicJsonType, typename FloatType, + enable_if_t<std::is_floating_point<FloatType>::value, int> = 0> +void to_json(BasicJsonType& j, FloatType val) noexcept +{ + external_constructor<value_t::number_float>::construct(j, static_cast<typename BasicJsonType::number_float_t>(val)); +} + +template<typename BasicJsonType, typename CompatibleNumberUnsignedType, + enable_if_t<is_compatible_integer_type<typename BasicJsonType::number_unsigned_t, CompatibleNumberUnsignedType>::value, int> = 0> +void to_json(BasicJsonType& j, CompatibleNumberUnsignedType val) noexcept +{ + external_constructor<value_t::number_unsigned>::construct(j, static_cast<typename BasicJsonType::number_unsigned_t>(val)); +} + +template<typename BasicJsonType, typename CompatibleNumberIntegerType, + enable_if_t<is_compatible_integer_type<typename BasicJsonType::number_integer_t, CompatibleNumberIntegerType>::value, int> = 0> +void to_json(BasicJsonType& j, CompatibleNumberIntegerType val) noexcept +{ + external_constructor<value_t::number_integer>::construct(j, static_cast<typename BasicJsonType::number_integer_t>(val)); +} + +template<typename BasicJsonType, typename EnumType, + enable_if_t<std::is_enum<EnumType>::value, int> = 0> +void to_json(BasicJsonType& j, EnumType e) noexcept +{ + using underlying_type = typename std::underlying_type<EnumType>::type; + external_constructor<value_t::number_integer>::construct(j, static_cast<underlying_type>(e)); +} + +template<typename BasicJsonType> +void to_json(BasicJsonType& j, const std::vector<bool>& e) +{ + external_constructor<value_t::array>::construct(j, e); +} + +template <typename BasicJsonType, typename CompatibleArrayType, + enable_if_t<is_compatible_array_type<BasicJsonType, + CompatibleArrayType>::value and + not is_compatible_object_type< + BasicJsonType, CompatibleArrayType>::value and + not is_compatible_string_type<BasicJsonType, CompatibleArrayType>::value and + not is_basic_json<CompatibleArrayType>::value, + int> = 0> +void to_json(BasicJsonType& j, const CompatibleArrayType& arr) +{ + external_constructor<value_t::array>::construct(j, arr); +} + +template<typename BasicJsonType, typename T, + enable_if_t<std::is_convertible<T, BasicJsonType>::value, int> = 0> +void to_json(BasicJsonType& j, const std::valarray<T>& arr) +{ + external_constructor<value_t::array>::construct(j, std::move(arr)); +} + +template<typename BasicJsonType> +void to_json(BasicJsonType& j, typename BasicJsonType::array_t&& arr) +{ + external_constructor<value_t::array>::construct(j, std::move(arr)); +} + +template<typename BasicJsonType, typename CompatibleObjectType, + enable_if_t<is_compatible_object_type<BasicJsonType, CompatibleObjectType>::value and not is_basic_json<CompatibleObjectType>::value, int> = 0> +void to_json(BasicJsonType& j, const CompatibleObjectType& obj) +{ + external_constructor<value_t::object>::construct(j, obj); +} + +template<typename BasicJsonType> +void to_json(BasicJsonType& j, typename BasicJsonType::object_t&& obj) +{ + external_constructor<value_t::object>::construct(j, std::move(obj)); +} + +template < + typename BasicJsonType, typename T, std::size_t N, + enable_if_t<not std::is_constructible<typename BasicJsonType::string_t, + const T(&)[N]>::value, + int> = 0 > +void to_json(BasicJsonType& j, const T(&arr)[N]) +{ + external_constructor<value_t::array>::construct(j, arr); +} + +template<typename BasicJsonType, typename... Args> +void to_json(BasicJsonType& j, const std::pair<Args...>& p) +{ + j = { p.first, p.second }; +} + +// for https://github.com/nlohmann/json/pull/1134 +template < typename BasicJsonType, typename T, + enable_if_t<std::is_same<T, iteration_proxy_value<typename BasicJsonType::iterator>>::value, int> = 0> +void to_json(BasicJsonType& j, const T& b) +{ + j = { {b.key(), b.value()} }; +} + +template<typename BasicJsonType, typename Tuple, std::size_t... Idx> +void to_json_tuple_impl(BasicJsonType& j, const Tuple& t, index_sequence<Idx...> /*unused*/) +{ + j = { std::get<Idx>(t)... }; +} + +template<typename BasicJsonType, typename... Args> +void to_json(BasicJsonType& j, const std::tuple<Args...>& t) +{ + to_json_tuple_impl(j, t, index_sequence_for<Args...> {}); +} + +struct to_json_fn +{ + template<typename BasicJsonType, typename T> + auto operator()(BasicJsonType& j, T&& val) const noexcept(noexcept(to_json(j, std::forward<T>(val)))) + -> decltype(to_json(j, std::forward<T>(val)), void()) + { + return to_json(j, std::forward<T>(val)); + } +}; +} // namespace detail + +/// namespace to hold default `to_json` function +namespace +{ +constexpr const auto& to_json = detail::static_const<detail::to_json_fn>::value; +} // namespace +} // namespace nlohmann + + +namespace nlohmann +{ + +template<typename, typename> +struct adl_serializer +{ + /*! + @brief convert a JSON value to any value type + + This function is usually called by the `get()` function of the + @ref basic_json class (either explicit or via conversion operators). + + @param[in] j JSON value to read from + @param[in,out] val value to write to + */ + template<typename BasicJsonType, typename ValueType> + static auto from_json(BasicJsonType&& j, ValueType& val) noexcept( + noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), val))) + -> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), val), void()) + { + ::nlohmann::from_json(std::forward<BasicJsonType>(j), val); + } + + /*! + @brief convert any value type to a JSON value + + This function is usually called by the constructors of the @ref basic_json + class. + + @param[in,out] j JSON value to write to + @param[in] val value to read from + */ + template <typename BasicJsonType, typename ValueType> + static auto to_json(BasicJsonType& j, ValueType&& val) noexcept( + noexcept(::nlohmann::to_json(j, std::forward<ValueType>(val)))) + -> decltype(::nlohmann::to_json(j, std::forward<ValueType>(val)), void()) + { + ::nlohmann::to_json(j, std::forward<ValueType>(val)); + } +}; + +} // namespace nlohmann + +// #include <nlohmann/detail/conversions/from_json.hpp> + +// #include <nlohmann/detail/conversions/to_json.hpp> + +// #include <nlohmann/detail/exceptions.hpp> + +// #include <nlohmann/detail/input/binary_reader.hpp> + + +#include <algorithm> // generate_n +#include <array> // array +#include <cassert> // assert +#include <cmath> // ldexp +#include <cstddef> // size_t +#include <cstdint> // uint8_t, uint16_t, uint32_t, uint64_t +#include <cstdio> // snprintf +#include <cstring> // memcpy +#include <iterator> // back_inserter +#include <limits> // numeric_limits +#include <string> // char_traits, string +#include <utility> // make_pair, move + +// #include <nlohmann/detail/exceptions.hpp> + +// #include <nlohmann/detail/input/input_adapters.hpp> + + +#include <array> // array +#include <cassert> // assert +#include <cstddef> // size_t +#include <cstdio> //FILE * +#include <cstring> // strlen +#include <istream> // istream +#include <iterator> // begin, end, iterator_traits, random_access_iterator_tag, distance, next +#include <memory> // shared_ptr, make_shared, addressof +#include <numeric> // accumulate +#include <string> // string, char_traits +#include <type_traits> // enable_if, is_base_of, is_pointer, is_integral, remove_pointer +#include <utility> // pair, declval + +// #include <nlohmann/detail/iterators/iterator_traits.hpp> + +// #include <nlohmann/detail/macro_scope.hpp> + + +namespace nlohmann +{ +namespace detail +{ +/// the supported input formats +enum class input_format_t { json, cbor, msgpack, ubjson, bson }; + +//////////////////// +// input adapters // +//////////////////// + +/*! +@brief abstract input adapter interface + +Produces a stream of std::char_traits<char>::int_type characters from a +std::istream, a buffer, or some other input type. Accepts the return of +exactly one non-EOF character for future input. The int_type characters +returned consist of all valid char values as positive values (typically +unsigned char), plus an EOF value outside that range, specified by the value +of the function std::char_traits<char>::eof(). This value is typically -1, but +could be any arbitrary value which is not a valid char value. +*/ +struct input_adapter_protocol +{ + /// get a character [0,255] or std::char_traits<char>::eof(). + virtual std::char_traits<char>::int_type get_character() = 0; + virtual ~input_adapter_protocol() = default; +}; + +/// a type to simplify interfaces +using input_adapter_t = std::shared_ptr<input_adapter_protocol>; + +/*! +Input adapter for stdio file access. This adapter read only 1 byte and do not use any + buffer. This adapter is a very low level adapter. +*/ +class file_input_adapter : public input_adapter_protocol +{ + public: + explicit file_input_adapter(std::FILE* f) noexcept + : m_file(f) + {} + + // make class move-only + file_input_adapter(const file_input_adapter&) = delete; + file_input_adapter(file_input_adapter&&) = default; + file_input_adapter& operator=(const file_input_adapter&) = delete; + file_input_adapter& operator=(file_input_adapter&&) = default; + ~file_input_adapter() override = default; + + std::char_traits<char>::int_type get_character() noexcept override + { + return std::fgetc(m_file); + } + + private: + /// the file pointer to read from + std::FILE* m_file; +}; + + +/*! +Input adapter for a (caching) istream. Ignores a UFT Byte Order Mark at +beginning of input. Does not support changing the underlying std::streambuf +in mid-input. Maintains underlying std::istream and std::streambuf to support +subsequent use of standard std::istream operations to process any input +characters following those used in parsing the JSON input. Clears the +std::istream flags; any input errors (e.g., EOF) will be detected by the first +subsequent call for input from the std::istream. +*/ +class input_stream_adapter : public input_adapter_protocol +{ + public: + ~input_stream_adapter() override + { + // clear stream flags; we use underlying streambuf I/O, do not + // maintain ifstream flags, except eof + is.clear(is.rdstate() & std::ios::eofbit); + } + + explicit input_stream_adapter(std::istream& i) + : is(i), sb(*i.rdbuf()) + {} + + // delete because of pointer members + input_stream_adapter(const input_stream_adapter&) = delete; + input_stream_adapter& operator=(input_stream_adapter&) = delete; + input_stream_adapter(input_stream_adapter&&) = delete; + input_stream_adapter& operator=(input_stream_adapter&&) = delete; + + // std::istream/std::streambuf use std::char_traits<char>::to_int_type, to + // ensure that std::char_traits<char>::eof() and the character 0xFF do not + // end up as the same value, eg. 0xFFFFFFFF. + std::char_traits<char>::int_type get_character() override + { + auto res = sb.sbumpc(); + // set eof manually, as we don't use the istream interface. + if (res == EOF) + { + is.clear(is.rdstate() | std::ios::eofbit); + } + return res; + } + + private: + /// the associated input stream + std::istream& is; + std::streambuf& sb; +}; + +/// input adapter for buffer input +class input_buffer_adapter : public input_adapter_protocol +{ + public: + input_buffer_adapter(const char* b, const std::size_t l) noexcept + : cursor(b), limit(b + l) + {} + + // delete because of pointer members + input_buffer_adapter(const input_buffer_adapter&) = delete; + input_buffer_adapter& operator=(input_buffer_adapter&) = delete; + input_buffer_adapter(input_buffer_adapter&&) = delete; + input_buffer_adapter& operator=(input_buffer_adapter&&) = delete; + ~input_buffer_adapter() override = default; + + std::char_traits<char>::int_type get_character() noexcept override + { + if (JSON_LIKELY(cursor < limit)) + { + return std::char_traits<char>::to_int_type(*(cursor++)); + } + + return std::char_traits<char>::eof(); + } + + private: + /// pointer to the current character + const char* cursor; + /// pointer past the last character + const char* const limit; +}; + +template<typename WideStringType, size_t T> +struct wide_string_input_helper +{ + // UTF-32 + static void fill_buffer(const WideStringType& str, + size_t& current_wchar, + std::array<std::char_traits<char>::int_type, 4>& utf8_bytes, + size_t& utf8_bytes_index, + size_t& utf8_bytes_filled) + { + utf8_bytes_index = 0; + + if (current_wchar == str.size()) + { + utf8_bytes[0] = std::char_traits<char>::eof(); + utf8_bytes_filled = 1; + } + else + { + // get the current character + const auto wc = static_cast<unsigned int>(str[current_wchar++]); + + // UTF-32 to UTF-8 encoding + if (wc < 0x80) + { + utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(wc); + utf8_bytes_filled = 1; + } + else if (wc <= 0x7FF) + { + utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xC0u | ((wc >> 6u) & 0x1Fu)); + utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | (wc & 0x3Fu)); + utf8_bytes_filled = 2; + } + else if (wc <= 0xFFFF) + { + utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xE0u | ((wc >> 12u) & 0x0Fu)); + utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | ((wc >> 6u) & 0x3Fu)); + utf8_bytes[2] = static_cast<std::char_traits<char>::int_type>(0x80u | (wc & 0x3Fu)); + utf8_bytes_filled = 3; + } + else if (wc <= 0x10FFFF) + { + utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xF0u | ((wc >> 18u) & 0x07u)); + utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | ((wc >> 12u) & 0x3Fu)); + utf8_bytes[2] = static_cast<std::char_traits<char>::int_type>(0x80u | ((wc >> 6u) & 0x3Fu)); + utf8_bytes[3] = static_cast<std::char_traits<char>::int_type>(0x80u | (wc & 0x3Fu)); + utf8_bytes_filled = 4; + } + else + { + // unknown character + utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(wc); + utf8_bytes_filled = 1; + } + } + } +}; + +template<typename WideStringType> +struct wide_string_input_helper<WideStringType, 2> +{ + // UTF-16 + static void fill_buffer(const WideStringType& str, + size_t& current_wchar, + std::array<std::char_traits<char>::int_type, 4>& utf8_bytes, + size_t& utf8_bytes_index, + size_t& utf8_bytes_filled) + { + utf8_bytes_index = 0; + + if (current_wchar == str.size()) + { + utf8_bytes[0] = std::char_traits<char>::eof(); + utf8_bytes_filled = 1; + } + else + { + // get the current character + const auto wc = static_cast<unsigned int>(str[current_wchar++]); + + // UTF-16 to UTF-8 encoding + if (wc < 0x80) + { + utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(wc); + utf8_bytes_filled = 1; + } + else if (wc <= 0x7FF) + { + utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xC0u | ((wc >> 6u))); + utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | (wc & 0x3Fu)); + utf8_bytes_filled = 2; + } + else if (0xD800 > wc or wc >= 0xE000) + { + utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xE0u | ((wc >> 12u))); + utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | ((wc >> 6u) & 0x3Fu)); + utf8_bytes[2] = static_cast<std::char_traits<char>::int_type>(0x80u | (wc & 0x3Fu)); + utf8_bytes_filled = 3; + } + else + { + if (current_wchar < str.size()) + { + const auto wc2 = static_cast<unsigned int>(str[current_wchar++]); + const auto charcode = 0x10000u + (((wc & 0x3FFu) << 10u) | (wc2 & 0x3FFu)); + utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xF0u | (charcode >> 18u)); + utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | ((charcode >> 12u) & 0x3Fu)); + utf8_bytes[2] = static_cast<std::char_traits<char>::int_type>(0x80u | ((charcode >> 6u) & 0x3Fu)); + utf8_bytes[3] = static_cast<std::char_traits<char>::int_type>(0x80u | (charcode & 0x3Fu)); + utf8_bytes_filled = 4; + } + else + { + // unknown character + ++current_wchar; + utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(wc); + utf8_bytes_filled = 1; + } + } + } + } +}; + +template<typename WideStringType> +class wide_string_input_adapter : public input_adapter_protocol +{ + public: + explicit wide_string_input_adapter(const WideStringType& w) noexcept + : str(w) + {} + + std::char_traits<char>::int_type get_character() noexcept override + { + // check if buffer needs to be filled + if (utf8_bytes_index == utf8_bytes_filled) + { + fill_buffer<sizeof(typename WideStringType::value_type)>(); + + assert(utf8_bytes_filled > 0); + assert(utf8_bytes_index == 0); + } + + // use buffer + assert(utf8_bytes_filled > 0); + assert(utf8_bytes_index < utf8_bytes_filled); + return utf8_bytes[utf8_bytes_index++]; + } + + private: + template<size_t T> + void fill_buffer() + { + wide_string_input_helper<WideStringType, T>::fill_buffer(str, current_wchar, utf8_bytes, utf8_bytes_index, utf8_bytes_filled); + } + + /// the wstring to process + const WideStringType& str; + + /// index of the current wchar in str + std::size_t current_wchar = 0; + + /// a buffer for UTF-8 bytes + std::array<std::char_traits<char>::int_type, 4> utf8_bytes = {{0, 0, 0, 0}}; + + /// index to the utf8_codes array for the next valid byte + std::size_t utf8_bytes_index = 0; + /// number of valid bytes in the utf8_codes array + std::size_t utf8_bytes_filled = 0; +}; + +class input_adapter +{ + public: + // native support + input_adapter(std::FILE* file) + : ia(std::make_shared<file_input_adapter>(file)) {} + /// input adapter for input stream + input_adapter(std::istream& i) + : ia(std::make_shared<input_stream_adapter>(i)) {} + + /// input adapter for input stream + input_adapter(std::istream&& i) + : ia(std::make_shared<input_stream_adapter>(i)) {} + + input_adapter(const std::wstring& ws) + : ia(std::make_shared<wide_string_input_adapter<std::wstring>>(ws)) {} + + input_adapter(const std::u16string& ws) + : ia(std::make_shared<wide_string_input_adapter<std::u16string>>(ws)) {} + + input_adapter(const std::u32string& ws) + : ia(std::make_shared<wide_string_input_adapter<std::u32string>>(ws)) {} + + /// input adapter for buffer + template<typename CharT, + typename std::enable_if< + std::is_pointer<CharT>::value and + std::is_integral<typename std::remove_pointer<CharT>::type>::value and + sizeof(typename std::remove_pointer<CharT>::type) == 1, + int>::type = 0> + input_adapter(CharT b, std::size_t l) + : ia(std::make_shared<input_buffer_adapter>(reinterpret_cast<const char*>(b), l)) {} + + // derived support + + /// input adapter for string literal + template<typename CharT, + typename std::enable_if< + std::is_pointer<CharT>::value and + std::is_integral<typename std::remove_pointer<CharT>::type>::value and + sizeof(typename std::remove_pointer<CharT>::type) == 1, + int>::type = 0> + input_adapter(CharT b) + : input_adapter(reinterpret_cast<const char*>(b), + std::strlen(reinterpret_cast<const char*>(b))) {} + + /// input adapter for iterator range with contiguous storage + template<class IteratorType, + typename std::enable_if< + std::is_same<typename iterator_traits<IteratorType>::iterator_category, std::random_access_iterator_tag>::value, + int>::type = 0> + input_adapter(IteratorType first, IteratorType last) + { +#ifndef NDEBUG + // assertion to check that the iterator range is indeed contiguous, + // see http://stackoverflow.com/a/35008842/266378 for more discussion + const auto is_contiguous = std::accumulate( + first, last, std::pair<bool, int>(true, 0), + [&first](std::pair<bool, int> res, decltype(*first) val) + { + res.first &= (val == *(std::next(std::addressof(*first), res.second++))); + return res; + }).first; + assert(is_contiguous); +#endif + + // assertion to check that each element is 1 byte long + static_assert( + sizeof(typename iterator_traits<IteratorType>::value_type) == 1, + "each element in the iterator range must have the size of 1 byte"); + + const auto len = static_cast<size_t>(std::distance(first, last)); + if (JSON_LIKELY(len > 0)) + { + // there is at least one element: use the address of first + ia = std::make_shared<input_buffer_adapter>(reinterpret_cast<const char*>(&(*first)), len); + } + else + { + // the address of first cannot be used: use nullptr + ia = std::make_shared<input_buffer_adapter>(nullptr, len); + } + } + + /// input adapter for array + template<class T, std::size_t N> + input_adapter(T (&array)[N]) + : input_adapter(std::begin(array), std::end(array)) {} + + /// input adapter for contiguous container + template<class ContiguousContainer, typename + std::enable_if<not std::is_pointer<ContiguousContainer>::value and + std::is_base_of<std::random_access_iterator_tag, typename iterator_traits<decltype(std::begin(std::declval<ContiguousContainer const>()))>::iterator_category>::value, + int>::type = 0> + input_adapter(const ContiguousContainer& c) + : input_adapter(std::begin(c), std::end(c)) {} + + operator input_adapter_t() + { + return ia; + } + + private: + /// the actual adapter + input_adapter_t ia = nullptr; +}; +} // namespace detail +} // namespace nlohmann + +// #include <nlohmann/detail/input/json_sax.hpp> + + +#include <cassert> // assert +#include <cstddef> +#include <string> // string +#include <utility> // move +#include <vector> // vector + +// #include <nlohmann/detail/exceptions.hpp> + +// #include <nlohmann/detail/macro_scope.hpp> + + +namespace nlohmann +{ + +/*! +@brief SAX interface + +This class describes the SAX interface used by @ref nlohmann::json::sax_parse. +Each function is called in different situations while the input is parsed. The +boolean return value informs the parser whether to continue processing the +input. +*/ +template<typename BasicJsonType> +struct json_sax +{ + /// type for (signed) integers + using number_integer_t = typename BasicJsonType::number_integer_t; + /// type for unsigned integers + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + /// type for floating-point numbers + using number_float_t = typename BasicJsonType::number_float_t; + /// type for strings + using string_t = typename BasicJsonType::string_t; + + /*! + @brief a null value was read + @return whether parsing should proceed + */ + virtual bool null() = 0; + + /*! + @brief a boolean value was read + @param[in] val boolean value + @return whether parsing should proceed + */ + virtual bool boolean(bool val) = 0; + + /*! + @brief an integer number was read + @param[in] val integer value + @return whether parsing should proceed + */ + virtual bool number_integer(number_integer_t val) = 0; + + /*! + @brief an unsigned integer number was read + @param[in] val unsigned integer value + @return whether parsing should proceed + */ + virtual bool number_unsigned(number_unsigned_t val) = 0; + + /*! + @brief an floating-point number was read + @param[in] val floating-point value + @param[in] s raw token value + @return whether parsing should proceed + */ + virtual bool number_float(number_float_t val, const string_t& s) = 0; + + /*! + @brief a string was read + @param[in] val string value + @return whether parsing should proceed + @note It is safe to move the passed string. + */ + virtual bool string(string_t& val) = 0; + + /*! + @brief the beginning of an object was read + @param[in] elements number of object elements or -1 if unknown + @return whether parsing should proceed + @note binary formats may report the number of elements + */ + virtual bool start_object(std::size_t elements) = 0; + + /*! + @brief an object key was read + @param[in] val object key + @return whether parsing should proceed + @note It is safe to move the passed string. + */ + virtual bool key(string_t& val) = 0; + + /*! + @brief the end of an object was read + @return whether parsing should proceed + */ + virtual bool end_object() = 0; + + /*! + @brief the beginning of an array was read + @param[in] elements number of array elements or -1 if unknown + @return whether parsing should proceed + @note binary formats may report the number of elements + */ + virtual bool start_array(std::size_t elements) = 0; + + /*! + @brief the end of an array was read + @return whether parsing should proceed + */ + virtual bool end_array() = 0; + + /*! + @brief a parse error occurred + @param[in] position the position in the input where the error occurs + @param[in] last_token the last read token + @param[in] ex an exception object describing the error + @return whether parsing should proceed (must return false) + */ + virtual bool parse_error(std::size_t position, + const std::string& last_token, + const detail::exception& ex) = 0; + + virtual ~json_sax() = default; +}; + + +namespace detail +{ +/*! +@brief SAX implementation to create a JSON value from SAX events + +This class implements the @ref json_sax interface and processes the SAX events +to create a JSON value which makes it basically a DOM parser. The structure or +hierarchy of the JSON value is managed by the stack `ref_stack` which contains +a pointer to the respective array or object for each recursion depth. + +After successful parsing, the value that is passed by reference to the +constructor contains the parsed value. + +@tparam BasicJsonType the JSON type +*/ +template<typename BasicJsonType> +class json_sax_dom_parser +{ + public: + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + + /*! + @param[in, out] r reference to a JSON value that is manipulated while + parsing + @param[in] allow_exceptions_ whether parse errors yield exceptions + */ + explicit json_sax_dom_parser(BasicJsonType& r, const bool allow_exceptions_ = true) + : root(r), allow_exceptions(allow_exceptions_) + {} + + // make class move-only + json_sax_dom_parser(const json_sax_dom_parser&) = delete; + json_sax_dom_parser(json_sax_dom_parser&&) = default; + json_sax_dom_parser& operator=(const json_sax_dom_parser&) = delete; + json_sax_dom_parser& operator=(json_sax_dom_parser&&) = default; + ~json_sax_dom_parser() = default; + + bool null() + { + handle_value(nullptr); + return true; + } + + bool boolean(bool val) + { + handle_value(val); + return true; + } + + bool number_integer(number_integer_t val) + { + handle_value(val); + return true; + } + + bool number_unsigned(number_unsigned_t val) + { + handle_value(val); + return true; + } + + bool number_float(number_float_t val, const string_t& /*unused*/) + { + handle_value(val); + return true; + } + + bool string(string_t& val) + { + handle_value(val); + return true; + } + + bool start_object(std::size_t len) + { + ref_stack.push_back(handle_value(BasicJsonType::value_t::object)); + + if (JSON_UNLIKELY(len != std::size_t(-1) and len > ref_stack.back()->max_size())) + { + JSON_THROW(out_of_range::create(408, + "excessive object size: " + std::to_string(len))); + } + + return true; + } + + bool key(string_t& val) + { + // add null at given key and store the reference for later + object_element = &(ref_stack.back()->m_value.object->operator[](val)); + return true; + } + + bool end_object() + { + ref_stack.pop_back(); + return true; + } + + bool start_array(std::size_t len) + { + ref_stack.push_back(handle_value(BasicJsonType::value_t::array)); + + if (JSON_UNLIKELY(len != std::size_t(-1) and len > ref_stack.back()->max_size())) + { + JSON_THROW(out_of_range::create(408, + "excessive array size: " + std::to_string(len))); + } + + return true; + } + + bool end_array() + { + ref_stack.pop_back(); + return true; + } + + bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, + const detail::exception& ex) + { + errored = true; + if (allow_exceptions) + { + // determine the proper exception type from the id + switch ((ex.id / 100) % 100) + { + case 1: + JSON_THROW(*static_cast<const detail::parse_error*>(&ex)); + case 4: + JSON_THROW(*static_cast<const detail::out_of_range*>(&ex)); + // LCOV_EXCL_START + case 2: + JSON_THROW(*static_cast<const detail::invalid_iterator*>(&ex)); + case 3: + JSON_THROW(*static_cast<const detail::type_error*>(&ex)); + case 5: + JSON_THROW(*static_cast<const detail::other_error*>(&ex)); + default: + assert(false); + // LCOV_EXCL_STOP + } + } + return false; + } + + constexpr bool is_errored() const + { + return errored; + } + + private: + /*! + @invariant If the ref stack is empty, then the passed value will be the new + root. + @invariant If the ref stack contains a value, then it is an array or an + object to which we can add elements + */ + template<typename Value> + BasicJsonType* handle_value(Value&& v) + { + if (ref_stack.empty()) + { + root = BasicJsonType(std::forward<Value>(v)); + return &root; + } + + assert(ref_stack.back()->is_array() or ref_stack.back()->is_object()); + + if (ref_stack.back()->is_array()) + { + ref_stack.back()->m_value.array->emplace_back(std::forward<Value>(v)); + return &(ref_stack.back()->m_value.array->back()); + } + + assert(ref_stack.back()->is_object()); + assert(object_element); + *object_element = BasicJsonType(std::forward<Value>(v)); + return object_element; + } + + /// the parsed JSON value + BasicJsonType& root; + /// stack to model hierarchy of values + std::vector<BasicJsonType*> ref_stack {}; + /// helper to hold the reference for the next object element + BasicJsonType* object_element = nullptr; + /// whether a syntax error occurred + bool errored = false; + /// whether to throw exceptions in case of errors + const bool allow_exceptions = true; +}; + +template<typename BasicJsonType> +class json_sax_dom_callback_parser +{ + public: + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using parser_callback_t = typename BasicJsonType::parser_callback_t; + using parse_event_t = typename BasicJsonType::parse_event_t; + + json_sax_dom_callback_parser(BasicJsonType& r, + const parser_callback_t cb, + const bool allow_exceptions_ = true) + : root(r), callback(cb), allow_exceptions(allow_exceptions_) + { + keep_stack.push_back(true); + } + + // make class move-only + json_sax_dom_callback_parser(const json_sax_dom_callback_parser&) = delete; + json_sax_dom_callback_parser(json_sax_dom_callback_parser&&) = default; + json_sax_dom_callback_parser& operator=(const json_sax_dom_callback_parser&) = delete; + json_sax_dom_callback_parser& operator=(json_sax_dom_callback_parser&&) = default; + ~json_sax_dom_callback_parser() = default; + + bool null() + { + handle_value(nullptr); + return true; + } + + bool boolean(bool val) + { + handle_value(val); + return true; + } + + bool number_integer(number_integer_t val) + { + handle_value(val); + return true; + } + + bool number_unsigned(number_unsigned_t val) + { + handle_value(val); + return true; + } + + bool number_float(number_float_t val, const string_t& /*unused*/) + { + handle_value(val); + return true; + } + + bool string(string_t& val) + { + handle_value(val); + return true; + } + + bool start_object(std::size_t len) + { + // check callback for object start + const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::object_start, discarded); + keep_stack.push_back(keep); + + auto val = handle_value(BasicJsonType::value_t::object, true); + ref_stack.push_back(val.second); + + // check object limit + if (ref_stack.back() and JSON_UNLIKELY(len != std::size_t(-1) and len > ref_stack.back()->max_size())) + { + JSON_THROW(out_of_range::create(408, "excessive object size: " + std::to_string(len))); + } + + return true; + } + + bool key(string_t& val) + { + BasicJsonType k = BasicJsonType(val); + + // check callback for key + const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::key, k); + key_keep_stack.push_back(keep); + + // add discarded value at given key and store the reference for later + if (keep and ref_stack.back()) + { + object_element = &(ref_stack.back()->m_value.object->operator[](val) = discarded); + } + + return true; + } + + bool end_object() + { + if (ref_stack.back() and not callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::object_end, *ref_stack.back())) + { + // discard object + *ref_stack.back() = discarded; + } + + assert(not ref_stack.empty()); + assert(not keep_stack.empty()); + ref_stack.pop_back(); + keep_stack.pop_back(); + + if (not ref_stack.empty() and ref_stack.back() and ref_stack.back()->is_object()) + { + // remove discarded value + for (auto it = ref_stack.back()->begin(); it != ref_stack.back()->end(); ++it) + { + if (it->is_discarded()) + { + ref_stack.back()->erase(it); + break; + } + } + } + + return true; + } + + bool start_array(std::size_t len) + { + const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::array_start, discarded); + keep_stack.push_back(keep); + + auto val = handle_value(BasicJsonType::value_t::array, true); + ref_stack.push_back(val.second); + + // check array limit + if (ref_stack.back() and JSON_UNLIKELY(len != std::size_t(-1) and len > ref_stack.back()->max_size())) + { + JSON_THROW(out_of_range::create(408, "excessive array size: " + std::to_string(len))); + } + + return true; + } + + bool end_array() + { + bool keep = true; + + if (ref_stack.back()) + { + keep = callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::array_end, *ref_stack.back()); + if (not keep) + { + // discard array + *ref_stack.back() = discarded; + } + } + + assert(not ref_stack.empty()); + assert(not keep_stack.empty()); + ref_stack.pop_back(); + keep_stack.pop_back(); + + // remove discarded value + if (not keep and not ref_stack.empty() and ref_stack.back()->is_array()) + { + ref_stack.back()->m_value.array->pop_back(); + } + + return true; + } + + bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, + const detail::exception& ex) + { + errored = true; + if (allow_exceptions) + { + // determine the proper exception type from the id + switch ((ex.id / 100) % 100) + { + case 1: + JSON_THROW(*static_cast<const detail::parse_error*>(&ex)); + case 4: + JSON_THROW(*static_cast<const detail::out_of_range*>(&ex)); + // LCOV_EXCL_START + case 2: + JSON_THROW(*static_cast<const detail::invalid_iterator*>(&ex)); + case 3: + JSON_THROW(*static_cast<const detail::type_error*>(&ex)); + case 5: + JSON_THROW(*static_cast<const detail::other_error*>(&ex)); + default: + assert(false); + // LCOV_EXCL_STOP + } + } + return false; + } + + constexpr bool is_errored() const + { + return errored; + } + + private: + /*! + @param[in] v value to add to the JSON value we build during parsing + @param[in] skip_callback whether we should skip calling the callback + function; this is required after start_array() and + start_object() SAX events, because otherwise we would call the + callback function with an empty array or object, respectively. + + @invariant If the ref stack is empty, then the passed value will be the new + root. + @invariant If the ref stack contains a value, then it is an array or an + object to which we can add elements + + @return pair of boolean (whether value should be kept) and pointer (to the + passed value in the ref_stack hierarchy; nullptr if not kept) + */ + template<typename Value> + std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false) + { + assert(not keep_stack.empty()); + + // do not handle this value if we know it would be added to a discarded + // container + if (not keep_stack.back()) + { + return {false, nullptr}; + } + + // create value + auto value = BasicJsonType(std::forward<Value>(v)); + + // check callback + const bool keep = skip_callback or callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value); + + // do not handle this value if we just learnt it shall be discarded + if (not keep) + { + return {false, nullptr}; + } + + if (ref_stack.empty()) + { + root = std::move(value); + return {true, &root}; + } + + // skip this value if we already decided to skip the parent + // (https://github.com/nlohmann/json/issues/971#issuecomment-413678360) + if (not ref_stack.back()) + { + return {false, nullptr}; + } + + // we now only expect arrays and objects + assert(ref_stack.back()->is_array() or ref_stack.back()->is_object()); + + // array + if (ref_stack.back()->is_array()) + { + ref_stack.back()->m_value.array->push_back(std::move(value)); + return {true, &(ref_stack.back()->m_value.array->back())}; + } + + // object + assert(ref_stack.back()->is_object()); + // check if we should store an element for the current key + assert(not key_keep_stack.empty()); + const bool store_element = key_keep_stack.back(); + key_keep_stack.pop_back(); + + if (not store_element) + { + return {false, nullptr}; + } + + assert(object_element); + *object_element = std::move(value); + return {true, object_element}; + } + + /// the parsed JSON value + BasicJsonType& root; + /// stack to model hierarchy of values + std::vector<BasicJsonType*> ref_stack {}; + /// stack to manage which values to keep + std::vector<bool> keep_stack {}; + /// stack to manage which object keys to keep + std::vector<bool> key_keep_stack {}; + /// helper to hold the reference for the next object element + BasicJsonType* object_element = nullptr; + /// whether a syntax error occurred + bool errored = false; + /// callback function + const parser_callback_t callback = nullptr; + /// whether to throw exceptions in case of errors + const bool allow_exceptions = true; + /// a discarded value for the callback + BasicJsonType discarded = BasicJsonType::value_t::discarded; +}; + +template<typename BasicJsonType> +class json_sax_acceptor +{ + public: + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + + bool null() + { + return true; + } + + bool boolean(bool /*unused*/) + { + return true; + } + + bool number_integer(number_integer_t /*unused*/) + { + return true; + } + + bool number_unsigned(number_unsigned_t /*unused*/) + { + return true; + } + + bool number_float(number_float_t /*unused*/, const string_t& /*unused*/) + { + return true; + } + + bool string(string_t& /*unused*/) + { + return true; + } + + bool start_object(std::size_t /*unused*/ = std::size_t(-1)) + { + return true; + } + + bool key(string_t& /*unused*/) + { + return true; + } + + bool end_object() + { + return true; + } + + bool start_array(std::size_t /*unused*/ = std::size_t(-1)) + { + return true; + } + + bool end_array() + { + return true; + } + + bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, const detail::exception& /*unused*/) + { + return false; + } +}; +} // namespace detail + +} // namespace nlohmann + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/meta/is_sax.hpp> + + +#include <cstdint> // size_t +#include <utility> // declval +#include <string> // string + +// #include <nlohmann/detail/meta/detected.hpp> + +// #include <nlohmann/detail/meta/type_traits.hpp> + + +namespace nlohmann +{ +namespace detail +{ +template <typename T> +using null_function_t = decltype(std::declval<T&>().null()); + +template <typename T> +using boolean_function_t = + decltype(std::declval<T&>().boolean(std::declval<bool>())); + +template <typename T, typename Integer> +using number_integer_function_t = + decltype(std::declval<T&>().number_integer(std::declval<Integer>())); + +template <typename T, typename Unsigned> +using number_unsigned_function_t = + decltype(std::declval<T&>().number_unsigned(std::declval<Unsigned>())); + +template <typename T, typename Float, typename String> +using number_float_function_t = decltype(std::declval<T&>().number_float( + std::declval<Float>(), std::declval<const String&>())); + +template <typename T, typename String> +using string_function_t = + decltype(std::declval<T&>().string(std::declval<String&>())); + +template <typename T> +using start_object_function_t = + decltype(std::declval<T&>().start_object(std::declval<std::size_t>())); + +template <typename T, typename String> +using key_function_t = + decltype(std::declval<T&>().key(std::declval<String&>())); + +template <typename T> +using end_object_function_t = decltype(std::declval<T&>().end_object()); + +template <typename T> +using start_array_function_t = + decltype(std::declval<T&>().start_array(std::declval<std::size_t>())); + +template <typename T> +using end_array_function_t = decltype(std::declval<T&>().end_array()); + +template <typename T, typename Exception> +using parse_error_function_t = decltype(std::declval<T&>().parse_error( + std::declval<std::size_t>(), std::declval<const std::string&>(), + std::declval<const Exception&>())); + +template <typename SAX, typename BasicJsonType> +struct is_sax +{ + private: + static_assert(is_basic_json<BasicJsonType>::value, + "BasicJsonType must be of type basic_json<...>"); + + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using exception_t = typename BasicJsonType::exception; + + public: + static constexpr bool value = + is_detected_exact<bool, null_function_t, SAX>::value && + is_detected_exact<bool, boolean_function_t, SAX>::value && + is_detected_exact<bool, number_integer_function_t, SAX, + number_integer_t>::value && + is_detected_exact<bool, number_unsigned_function_t, SAX, + number_unsigned_t>::value && + is_detected_exact<bool, number_float_function_t, SAX, number_float_t, + string_t>::value && + is_detected_exact<bool, string_function_t, SAX, string_t>::value && + is_detected_exact<bool, start_object_function_t, SAX>::value && + is_detected_exact<bool, key_function_t, SAX, string_t>::value && + is_detected_exact<bool, end_object_function_t, SAX>::value && + is_detected_exact<bool, start_array_function_t, SAX>::value && + is_detected_exact<bool, end_array_function_t, SAX>::value && + is_detected_exact<bool, parse_error_function_t, SAX, exception_t>::value; +}; + +template <typename SAX, typename BasicJsonType> +struct is_sax_static_asserts +{ + private: + static_assert(is_basic_json<BasicJsonType>::value, + "BasicJsonType must be of type basic_json<...>"); + + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using exception_t = typename BasicJsonType::exception; + + public: + static_assert(is_detected_exact<bool, null_function_t, SAX>::value, + "Missing/invalid function: bool null()"); + static_assert(is_detected_exact<bool, boolean_function_t, SAX>::value, + "Missing/invalid function: bool boolean(bool)"); + static_assert(is_detected_exact<bool, boolean_function_t, SAX>::value, + "Missing/invalid function: bool boolean(bool)"); + static_assert( + is_detected_exact<bool, number_integer_function_t, SAX, + number_integer_t>::value, + "Missing/invalid function: bool number_integer(number_integer_t)"); + static_assert( + is_detected_exact<bool, number_unsigned_function_t, SAX, + number_unsigned_t>::value, + "Missing/invalid function: bool number_unsigned(number_unsigned_t)"); + static_assert(is_detected_exact<bool, number_float_function_t, SAX, + number_float_t, string_t>::value, + "Missing/invalid function: bool number_float(number_float_t, const string_t&)"); + static_assert( + is_detected_exact<bool, string_function_t, SAX, string_t>::value, + "Missing/invalid function: bool string(string_t&)"); + static_assert(is_detected_exact<bool, start_object_function_t, SAX>::value, + "Missing/invalid function: bool start_object(std::size_t)"); + static_assert(is_detected_exact<bool, key_function_t, SAX, string_t>::value, + "Missing/invalid function: bool key(string_t&)"); + static_assert(is_detected_exact<bool, end_object_function_t, SAX>::value, + "Missing/invalid function: bool end_object()"); + static_assert(is_detected_exact<bool, start_array_function_t, SAX>::value, + "Missing/invalid function: bool start_array(std::size_t)"); + static_assert(is_detected_exact<bool, end_array_function_t, SAX>::value, + "Missing/invalid function: bool end_array()"); + static_assert( + is_detected_exact<bool, parse_error_function_t, SAX, exception_t>::value, + "Missing/invalid function: bool parse_error(std::size_t, const " + "std::string&, const exception&)"); +}; +} // namespace detail +} // namespace nlohmann + +// #include <nlohmann/detail/value_t.hpp> + + +namespace nlohmann +{ +namespace detail +{ +/////////////////// +// binary reader // +/////////////////// + +/*! +@brief deserialization of CBOR, MessagePack, and UBJSON values +*/ +template<typename BasicJsonType, typename SAX = json_sax_dom_parser<BasicJsonType>> +class binary_reader +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using json_sax_t = SAX; + + public: + /*! + @brief create a binary reader + + @param[in] adapter input adapter to read from + */ + explicit binary_reader(input_adapter_t adapter) : ia(std::move(adapter)) + { + (void)detail::is_sax_static_asserts<SAX, BasicJsonType> {}; + assert(ia); + } + + // make class move-only + binary_reader(const binary_reader&) = delete; + binary_reader(binary_reader&&) = default; + binary_reader& operator=(const binary_reader&) = delete; + binary_reader& operator=(binary_reader&&) = default; + ~binary_reader() = default; + + /*! + @param[in] format the binary format to parse + @param[in] sax_ a SAX event processor + @param[in] strict whether to expect the input to be consumed completed + + @return + */ + bool sax_parse(const input_format_t format, + json_sax_t* sax_, + const bool strict = true) + { + sax = sax_; + bool result = false; + + switch (format) + { + case input_format_t::bson: + result = parse_bson_internal(); + break; + + case input_format_t::cbor: + result = parse_cbor_internal(); + break; + + case input_format_t::msgpack: + result = parse_msgpack_internal(); + break; + + case input_format_t::ubjson: + result = parse_ubjson_internal(); + break; + + default: // LCOV_EXCL_LINE + assert(false); // LCOV_EXCL_LINE + } + + // strict mode: next byte must be EOF + if (result and strict) + { + if (format == input_format_t::ubjson) + { + get_ignore_noop(); + } + else + { + get(); + } + + if (JSON_UNLIKELY(current != std::char_traits<char>::eof())) + { + return sax->parse_error(chars_read, get_token_string(), + parse_error::create(110, chars_read, exception_message(format, "expected end of input; last byte: 0x" + get_token_string(), "value"))); + } + } + + return result; + } + + /*! + @brief determine system byte order + + @return true if and only if system's byte order is little endian + + @note from http://stackoverflow.com/a/1001328/266378 + */ + static constexpr bool little_endianess(int num = 1) noexcept + { + return *reinterpret_cast<char*>(&num) == 1; + } + + private: + ////////// + // BSON // + ////////// + + /*! + @brief Reads in a BSON-object and passes it to the SAX-parser. + @return whether a valid BSON-value was passed to the SAX parser + */ + bool parse_bson_internal() + { + std::int32_t document_size; + get_number<std::int32_t, true>(input_format_t::bson, document_size); + + if (JSON_UNLIKELY(not sax->start_object(std::size_t(-1)))) + { + return false; + } + + if (JSON_UNLIKELY(not parse_bson_element_list(/*is_array*/false))) + { + return false; + } + + return sax->end_object(); + } + + /*! + @brief Parses a C-style string from the BSON input. + @param[in, out] result A reference to the string variable where the read + string is to be stored. + @return `true` if the \x00-byte indicating the end of the string was + encountered before the EOF; false` indicates an unexpected EOF. + */ + bool get_bson_cstr(string_t& result) + { + auto out = std::back_inserter(result); + while (true) + { + get(); + if (JSON_UNLIKELY(not unexpect_eof(input_format_t::bson, "cstring"))) + { + return false; + } + if (current == 0x00) + { + return true; + } + *out++ = static_cast<char>(current); + } + + return true; + } + + /*! + @brief Parses a zero-terminated string of length @a len from the BSON + input. + @param[in] len The length (including the zero-byte at the end) of the + string to be read. + @param[in, out] result A reference to the string variable where the read + string is to be stored. + @tparam NumberType The type of the length @a len + @pre len >= 1 + @return `true` if the string was successfully parsed + */ + template<typename NumberType> + bool get_bson_string(const NumberType len, string_t& result) + { + if (JSON_UNLIKELY(len < 1)) + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::bson, "string length must be at least 1, is " + std::to_string(len), "string"))); + } + + return get_string(input_format_t::bson, len - static_cast<NumberType>(1), result) and get() != std::char_traits<char>::eof(); + } + + /*! + @brief Read a BSON document element of the given @a element_type. + @param[in] element_type The BSON element type, c.f. http://bsonspec.org/spec.html + @param[in] element_type_parse_position The position in the input stream, + where the `element_type` was read. + @warning Not all BSON element types are supported yet. An unsupported + @a element_type will give rise to a parse_error.114: + Unsupported BSON record type 0x... + @return whether a valid BSON-object/array was passed to the SAX parser + */ + bool parse_bson_element_internal(const int element_type, + const std::size_t element_type_parse_position) + { + switch (element_type) + { + case 0x01: // double + { + double number; + return get_number<double, true>(input_format_t::bson, number) and sax->number_float(static_cast<number_float_t>(number), ""); + } + + case 0x02: // string + { + std::int32_t len; + string_t value; + return get_number<std::int32_t, true>(input_format_t::bson, len) and get_bson_string(len, value) and sax->string(value); + } + + case 0x03: // object + { + return parse_bson_internal(); + } + + case 0x04: // array + { + return parse_bson_array(); + } + + case 0x08: // boolean + { + return sax->boolean(get() != 0); + } + + case 0x0A: // null + { + return sax->null(); + } + + case 0x10: // int32 + { + std::int32_t value; + return get_number<std::int32_t, true>(input_format_t::bson, value) and sax->number_integer(value); + } + + case 0x12: // int64 + { + std::int64_t value; + return get_number<std::int64_t, true>(input_format_t::bson, value) and sax->number_integer(value); + } + + default: // anything else not supported (yet) + { + std::array<char, 3> cr{{}}; + (std::snprintf)(cr.data(), cr.size(), "%.2hhX", static_cast<unsigned char>(element_type)); + return sax->parse_error(element_type_parse_position, std::string(cr.data()), parse_error::create(114, element_type_parse_position, "Unsupported BSON record type 0x" + std::string(cr.data()))); + } + } + } + + /*! + @brief Read a BSON element list (as specified in the BSON-spec) + + The same binary layout is used for objects and arrays, hence it must be + indicated with the argument @a is_array which one is expected + (true --> array, false --> object). + + @param[in] is_array Determines if the element list being read is to be + treated as an object (@a is_array == false), or as an + array (@a is_array == true). + @return whether a valid BSON-object/array was passed to the SAX parser + */ + bool parse_bson_element_list(const bool is_array) + { + string_t key; + while (int element_type = get()) + { + if (JSON_UNLIKELY(not unexpect_eof(input_format_t::bson, "element list"))) + { + return false; + } + + const std::size_t element_type_parse_position = chars_read; + if (JSON_UNLIKELY(not get_bson_cstr(key))) + { + return false; + } + + if (not is_array and not sax->key(key)) + { + return false; + } + + if (JSON_UNLIKELY(not parse_bson_element_internal(element_type, element_type_parse_position))) + { + return false; + } + + // get_bson_cstr only appends + key.clear(); + } + + return true; + } + + /*! + @brief Reads an array from the BSON input and passes it to the SAX-parser. + @return whether a valid BSON-array was passed to the SAX parser + */ + bool parse_bson_array() + { + std::int32_t document_size; + get_number<std::int32_t, true>(input_format_t::bson, document_size); + + if (JSON_UNLIKELY(not sax->start_array(std::size_t(-1)))) + { + return false; + } + + if (JSON_UNLIKELY(not parse_bson_element_list(/*is_array*/true))) + { + return false; + } + + return sax->end_array(); + } + + ////////// + // CBOR // + ////////// + + /*! + @param[in] get_char whether a new character should be retrieved from the + input (true, default) or whether the last read + character should be considered instead + + @return whether a valid CBOR value was passed to the SAX parser + */ + bool parse_cbor_internal(const bool get_char = true) + { + switch (get_char ? get() : current) + { + // EOF + case std::char_traits<char>::eof(): + return unexpect_eof(input_format_t::cbor, "value"); + + // Integer 0x00..0x17 (0..23) + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x08: + case 0x09: + case 0x0A: + case 0x0B: + case 0x0C: + case 0x0D: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + return sax->number_unsigned(static_cast<number_unsigned_t>(current)); + + case 0x18: // Unsigned integer (one-byte uint8_t follows) + { + std::uint8_t number; + return get_number(input_format_t::cbor, number) and sax->number_unsigned(number); + } + + case 0x19: // Unsigned integer (two-byte uint16_t follows) + { + std::uint16_t number; + return get_number(input_format_t::cbor, number) and sax->number_unsigned(number); + } + + case 0x1A: // Unsigned integer (four-byte uint32_t follows) + { + std::uint32_t number; + return get_number(input_format_t::cbor, number) and sax->number_unsigned(number); + } + + case 0x1B: // Unsigned integer (eight-byte uint64_t follows) + { + std::uint64_t number; + return get_number(input_format_t::cbor, number) and sax->number_unsigned(number); + } + + // Negative integer -1-0x00..-1-0x17 (-1..-24) + case 0x20: + case 0x21: + case 0x22: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + return sax->number_integer(static_cast<std::int8_t>(0x20 - 1 - current)); + + case 0x38: // Negative integer (one-byte uint8_t follows) + { + std::uint8_t number; + return get_number(input_format_t::cbor, number) and sax->number_integer(static_cast<number_integer_t>(-1) - number); + } + + case 0x39: // Negative integer -1-n (two-byte uint16_t follows) + { + std::uint16_t number; + return get_number(input_format_t::cbor, number) and sax->number_integer(static_cast<number_integer_t>(-1) - number); + } + + case 0x3A: // Negative integer -1-n (four-byte uint32_t follows) + { + std::uint32_t number; + return get_number(input_format_t::cbor, number) and sax->number_integer(static_cast<number_integer_t>(-1) - number); + } + + case 0x3B: // Negative integer -1-n (eight-byte uint64_t follows) + { + std::uint64_t number; + return get_number(input_format_t::cbor, number) and sax->number_integer(static_cast<number_integer_t>(-1) + - static_cast<number_integer_t>(number)); + } + + // UTF-8 string (0x00..0x17 bytes follow) + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: // UTF-8 string (one-byte uint8_t for n follows) + case 0x79: // UTF-8 string (two-byte uint16_t for n follow) + case 0x7A: // UTF-8 string (four-byte uint32_t for n follow) + case 0x7B: // UTF-8 string (eight-byte uint64_t for n follow) + case 0x7F: // UTF-8 string (indefinite length) + { + string_t s; + return get_cbor_string(s) and sax->string(s); + } + + // array (0x00..0x17 data items follow) + case 0x80: + case 0x81: + case 0x82: + case 0x83: + case 0x84: + case 0x85: + case 0x86: + case 0x87: + case 0x88: + case 0x89: + case 0x8A: + case 0x8B: + case 0x8C: + case 0x8D: + case 0x8E: + case 0x8F: + case 0x90: + case 0x91: + case 0x92: + case 0x93: + case 0x94: + case 0x95: + case 0x96: + case 0x97: + return get_cbor_array(static_cast<std::size_t>(static_cast<unsigned int>(current) & 0x1Fu)); + + case 0x98: // array (one-byte uint8_t for n follows) + { + std::uint8_t len; + return get_number(input_format_t::cbor, len) and get_cbor_array(static_cast<std::size_t>(len)); + } + + case 0x99: // array (two-byte uint16_t for n follow) + { + std::uint16_t len; + return get_number(input_format_t::cbor, len) and get_cbor_array(static_cast<std::size_t>(len)); + } + + case 0x9A: // array (four-byte uint32_t for n follow) + { + std::uint32_t len; + return get_number(input_format_t::cbor, len) and get_cbor_array(static_cast<std::size_t>(len)); + } + + case 0x9B: // array (eight-byte uint64_t for n follow) + { + std::uint64_t len; + return get_number(input_format_t::cbor, len) and get_cbor_array(static_cast<std::size_t>(len)); + } + + case 0x9F: // array (indefinite length) + return get_cbor_array(std::size_t(-1)); + + // map (0x00..0x17 pairs of data items follow) + case 0xA0: + case 0xA1: + case 0xA2: + case 0xA3: + case 0xA4: + case 0xA5: + case 0xA6: + case 0xA7: + case 0xA8: + case 0xA9: + case 0xAA: + case 0xAB: + case 0xAC: + case 0xAD: + case 0xAE: + case 0xAF: + case 0xB0: + case 0xB1: + case 0xB2: + case 0xB3: + case 0xB4: + case 0xB5: + case 0xB6: + case 0xB7: + return get_cbor_object(static_cast<std::size_t>(static_cast<unsigned int>(current) & 0x1Fu)); + + case 0xB8: // map (one-byte uint8_t for n follows) + { + std::uint8_t len; + return get_number(input_format_t::cbor, len) and get_cbor_object(static_cast<std::size_t>(len)); + } + + case 0xB9: // map (two-byte uint16_t for n follow) + { + std::uint16_t len; + return get_number(input_format_t::cbor, len) and get_cbor_object(static_cast<std::size_t>(len)); + } + + case 0xBA: // map (four-byte uint32_t for n follow) + { + std::uint32_t len; + return get_number(input_format_t::cbor, len) and get_cbor_object(static_cast<std::size_t>(len)); + } + + case 0xBB: // map (eight-byte uint64_t for n follow) + { + std::uint64_t len; + return get_number(input_format_t::cbor, len) and get_cbor_object(static_cast<std::size_t>(len)); + } + + case 0xBF: // map (indefinite length) + return get_cbor_object(std::size_t(-1)); + + case 0xF4: // false + return sax->boolean(false); + + case 0xF5: // true + return sax->boolean(true); + + case 0xF6: // null + return sax->null(); + + case 0xF9: // Half-Precision Float (two-byte IEEE 754) + { + const int byte1_raw = get(); + if (JSON_UNLIKELY(not unexpect_eof(input_format_t::cbor, "number"))) + { + return false; + } + const int byte2_raw = get(); + if (JSON_UNLIKELY(not unexpect_eof(input_format_t::cbor, "number"))) + { + return false; + } + + const auto byte1 = static_cast<unsigned char>(byte1_raw); + const auto byte2 = static_cast<unsigned char>(byte2_raw); + + // code from RFC 7049, Appendix D, Figure 3: + // As half-precision floating-point numbers were only added + // to IEEE 754 in 2008, today's programming platforms often + // still only have limited support for them. It is very + // easy to include at least decoding support for them even + // without such support. An example of a small decoder for + // half-precision floating-point numbers in the C language + // is shown in Fig. 3. + const auto half = static_cast<unsigned int>((byte1 << 8u) + byte2); + const double val = [&half] + { + const int exp = (half >> 10u) & 0x1Fu; + const unsigned int mant = half & 0x3FFu; + assert(0 <= exp and exp <= 32); + assert(0 <= mant and mant <= 1024); + switch (exp) + { + case 0: + return std::ldexp(mant, -24); + case 31: + return (mant == 0) + ? std::numeric_limits<double>::infinity() + : std::numeric_limits<double>::quiet_NaN(); + default: + return std::ldexp(mant + 1024, exp - 25); + } + }(); + return sax->number_float((half & 0x8000u) != 0 + ? static_cast<number_float_t>(-val) + : static_cast<number_float_t>(val), ""); + } + + case 0xFA: // Single-Precision Float (four-byte IEEE 754) + { + float number; + return get_number(input_format_t::cbor, number) and sax->number_float(static_cast<number_float_t>(number), ""); + } + + case 0xFB: // Double-Precision Float (eight-byte IEEE 754) + { + double number; + return get_number(input_format_t::cbor, number) and sax->number_float(static_cast<number_float_t>(number), ""); + } + + default: // anything else (0xFF is handled inside the other types) + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::cbor, "invalid byte: 0x" + last_token, "value"))); + } + } + } + + /*! + @brief reads a CBOR string + + This function first reads starting bytes to determine the expected + string length and then copies this number of bytes into a string. + Additionally, CBOR's strings with indefinite lengths are supported. + + @param[out] result created string + + @return whether string creation completed + */ + bool get_cbor_string(string_t& result) + { + if (JSON_UNLIKELY(not unexpect_eof(input_format_t::cbor, "string"))) + { + return false; + } + + switch (current) + { + // UTF-8 string (0x00..0x17 bytes follow) + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + { + return get_string(input_format_t::cbor, static_cast<unsigned int>(current) & 0x1Fu, result); + } + + case 0x78: // UTF-8 string (one-byte uint8_t for n follows) + { + std::uint8_t len; + return get_number(input_format_t::cbor, len) and get_string(input_format_t::cbor, len, result); + } + + case 0x79: // UTF-8 string (two-byte uint16_t for n follow) + { + std::uint16_t len; + return get_number(input_format_t::cbor, len) and get_string(input_format_t::cbor, len, result); + } + + case 0x7A: // UTF-8 string (four-byte uint32_t for n follow) + { + std::uint32_t len; + return get_number(input_format_t::cbor, len) and get_string(input_format_t::cbor, len, result); + } + + case 0x7B: // UTF-8 string (eight-byte uint64_t for n follow) + { + std::uint64_t len; + return get_number(input_format_t::cbor, len) and get_string(input_format_t::cbor, len, result); + } + + case 0x7F: // UTF-8 string (indefinite length) + { + while (get() != 0xFF) + { + string_t chunk; + if (not get_cbor_string(chunk)) + { + return false; + } + result.append(chunk); + } + return true; + } + + default: + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::cbor, "expected length specification (0x60-0x7B) or indefinite string type (0x7F); last byte: 0x" + last_token, "string"))); + } + } + } + + /*! + @param[in] len the length of the array or std::size_t(-1) for an + array of indefinite size + @return whether array creation completed + */ + bool get_cbor_array(const std::size_t len) + { + if (JSON_UNLIKELY(not sax->start_array(len))) + { + return false; + } + + if (len != std::size_t(-1)) + { + for (std::size_t i = 0; i < len; ++i) + { + if (JSON_UNLIKELY(not parse_cbor_internal())) + { + return false; + } + } + } + else + { + while (get() != 0xFF) + { + if (JSON_UNLIKELY(not parse_cbor_internal(false))) + { + return false; + } + } + } + + return sax->end_array(); + } + + /*! + @param[in] len the length of the object or std::size_t(-1) for an + object of indefinite size + @return whether object creation completed + */ + bool get_cbor_object(const std::size_t len) + { + if (JSON_UNLIKELY(not sax->start_object(len))) + { + return false; + } + + string_t key; + if (len != std::size_t(-1)) + { + for (std::size_t i = 0; i < len; ++i) + { + get(); + if (JSON_UNLIKELY(not get_cbor_string(key) or not sax->key(key))) + { + return false; + } + + if (JSON_UNLIKELY(not parse_cbor_internal())) + { + return false; + } + key.clear(); + } + } + else + { + while (get() != 0xFF) + { + if (JSON_UNLIKELY(not get_cbor_string(key) or not sax->key(key))) + { + return false; + } + + if (JSON_UNLIKELY(not parse_cbor_internal())) + { + return false; + } + key.clear(); + } + } + + return sax->end_object(); + } + + ///////////// + // MsgPack // + ///////////// + + /*! + @return whether a valid MessagePack value was passed to the SAX parser + */ + bool parse_msgpack_internal() + { + switch (get()) + { + // EOF + case std::char_traits<char>::eof(): + return unexpect_eof(input_format_t::msgpack, "value"); + + // positive fixint + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x08: + case 0x09: + case 0x0A: + case 0x0B: + case 0x0C: + case 0x0D: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + case 0x18: + case 0x19: + case 0x1A: + case 0x1B: + case 0x1C: + case 0x1D: + case 0x1E: + case 0x1F: + case 0x20: + case 0x21: + case 0x22: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x38: + case 0x39: + case 0x3A: + case 0x3B: + case 0x3C: + case 0x3D: + case 0x3E: + case 0x3F: + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + case 0x58: + case 0x59: + case 0x5A: + case 0x5B: + case 0x5C: + case 0x5D: + case 0x5E: + case 0x5F: + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: + case 0x79: + case 0x7A: + case 0x7B: + case 0x7C: + case 0x7D: + case 0x7E: + case 0x7F: + return sax->number_unsigned(static_cast<number_unsigned_t>(current)); + + // fixmap + case 0x80: + case 0x81: + case 0x82: + case 0x83: + case 0x84: + case 0x85: + case 0x86: + case 0x87: + case 0x88: + case 0x89: + case 0x8A: + case 0x8B: + case 0x8C: + case 0x8D: + case 0x8E: + case 0x8F: + return get_msgpack_object(static_cast<std::size_t>(static_cast<unsigned int>(current) & 0x0Fu)); + + // fixarray + case 0x90: + case 0x91: + case 0x92: + case 0x93: + case 0x94: + case 0x95: + case 0x96: + case 0x97: + case 0x98: + case 0x99: + case 0x9A: + case 0x9B: + case 0x9C: + case 0x9D: + case 0x9E: + case 0x9F: + return get_msgpack_array(static_cast<std::size_t>(static_cast<unsigned int>(current) & 0x0Fu)); + + // fixstr + case 0xA0: + case 0xA1: + case 0xA2: + case 0xA3: + case 0xA4: + case 0xA5: + case 0xA6: + case 0xA7: + case 0xA8: + case 0xA9: + case 0xAA: + case 0xAB: + case 0xAC: + case 0xAD: + case 0xAE: + case 0xAF: + case 0xB0: + case 0xB1: + case 0xB2: + case 0xB3: + case 0xB4: + case 0xB5: + case 0xB6: + case 0xB7: + case 0xB8: + case 0xB9: + case 0xBA: + case 0xBB: + case 0xBC: + case 0xBD: + case 0xBE: + case 0xBF: + { + string_t s; + return get_msgpack_string(s) and sax->string(s); + } + + case 0xC0: // nil + return sax->null(); + + case 0xC2: // false + return sax->boolean(false); + + case 0xC3: // true + return sax->boolean(true); + + case 0xCA: // float 32 + { + float number; + return get_number(input_format_t::msgpack, number) and sax->number_float(static_cast<number_float_t>(number), ""); + } + + case 0xCB: // float 64 + { + double number; + return get_number(input_format_t::msgpack, number) and sax->number_float(static_cast<number_float_t>(number), ""); + } + + case 0xCC: // uint 8 + { + std::uint8_t number; + return get_number(input_format_t::msgpack, number) and sax->number_unsigned(number); + } + + case 0xCD: // uint 16 + { + std::uint16_t number; + return get_number(input_format_t::msgpack, number) and sax->number_unsigned(number); + } + + case 0xCE: // uint 32 + { + std::uint32_t number; + return get_number(input_format_t::msgpack, number) and sax->number_unsigned(number); + } + + case 0xCF: // uint 64 + { + std::uint64_t number; + return get_number(input_format_t::msgpack, number) and sax->number_unsigned(number); + } + + case 0xD0: // int 8 + { + std::int8_t number; + return get_number(input_format_t::msgpack, number) and sax->number_integer(number); + } + + case 0xD1: // int 16 + { + std::int16_t number; + return get_number(input_format_t::msgpack, number) and sax->number_integer(number); + } + + case 0xD2: // int 32 + { + std::int32_t number; + return get_number(input_format_t::msgpack, number) and sax->number_integer(number); + } + + case 0xD3: // int 64 + { + std::int64_t number; + return get_number(input_format_t::msgpack, number) and sax->number_integer(number); + } + + case 0xD9: // str 8 + case 0xDA: // str 16 + case 0xDB: // str 32 + { + string_t s; + return get_msgpack_string(s) and sax->string(s); + } + + case 0xDC: // array 16 + { + std::uint16_t len; + return get_number(input_format_t::msgpack, len) and get_msgpack_array(static_cast<std::size_t>(len)); + } + + case 0xDD: // array 32 + { + std::uint32_t len; + return get_number(input_format_t::msgpack, len) and get_msgpack_array(static_cast<std::size_t>(len)); + } + + case 0xDE: // map 16 + { + std::uint16_t len; + return get_number(input_format_t::msgpack, len) and get_msgpack_object(static_cast<std::size_t>(len)); + } + + case 0xDF: // map 32 + { + std::uint32_t len; + return get_number(input_format_t::msgpack, len) and get_msgpack_object(static_cast<std::size_t>(len)); + } + + // negative fixint + case 0xE0: + case 0xE1: + case 0xE2: + case 0xE3: + case 0xE4: + case 0xE5: + case 0xE6: + case 0xE7: + case 0xE8: + case 0xE9: + case 0xEA: + case 0xEB: + case 0xEC: + case 0xED: + case 0xEE: + case 0xEF: + case 0xF0: + case 0xF1: + case 0xF2: + case 0xF3: + case 0xF4: + case 0xF5: + case 0xF6: + case 0xF7: + case 0xF8: + case 0xF9: + case 0xFA: + case 0xFB: + case 0xFC: + case 0xFD: + case 0xFE: + case 0xFF: + return sax->number_integer(static_cast<std::int8_t>(current)); + + default: // anything else + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::msgpack, "invalid byte: 0x" + last_token, "value"))); + } + } + } + + /*! + @brief reads a MessagePack string + + This function first reads starting bytes to determine the expected + string length and then copies this number of bytes into a string. + + @param[out] result created string + + @return whether string creation completed + */ + bool get_msgpack_string(string_t& result) + { + if (JSON_UNLIKELY(not unexpect_eof(input_format_t::msgpack, "string"))) + { + return false; + } + + switch (current) + { + // fixstr + case 0xA0: + case 0xA1: + case 0xA2: + case 0xA3: + case 0xA4: + case 0xA5: + case 0xA6: + case 0xA7: + case 0xA8: + case 0xA9: + case 0xAA: + case 0xAB: + case 0xAC: + case 0xAD: + case 0xAE: + case 0xAF: + case 0xB0: + case 0xB1: + case 0xB2: + case 0xB3: + case 0xB4: + case 0xB5: + case 0xB6: + case 0xB7: + case 0xB8: + case 0xB9: + case 0xBA: + case 0xBB: + case 0xBC: + case 0xBD: + case 0xBE: + case 0xBF: + { + return get_string(input_format_t::msgpack, static_cast<unsigned int>(current) & 0x1Fu, result); + } + + case 0xD9: // str 8 + { + std::uint8_t len; + return get_number(input_format_t::msgpack, len) and get_string(input_format_t::msgpack, len, result); + } + + case 0xDA: // str 16 + { + std::uint16_t len; + return get_number(input_format_t::msgpack, len) and get_string(input_format_t::msgpack, len, result); + } + + case 0xDB: // str 32 + { + std::uint32_t len; + return get_number(input_format_t::msgpack, len) and get_string(input_format_t::msgpack, len, result); + } + + default: + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::msgpack, "expected length specification (0xA0-0xBF, 0xD9-0xDB); last byte: 0x" + last_token, "string"))); + } + } + } + + /*! + @param[in] len the length of the array + @return whether array creation completed + */ + bool get_msgpack_array(const std::size_t len) + { + if (JSON_UNLIKELY(not sax->start_array(len))) + { + return false; + } + + for (std::size_t i = 0; i < len; ++i) + { + if (JSON_UNLIKELY(not parse_msgpack_internal())) + { + return false; + } + } + + return sax->end_array(); + } + + /*! + @param[in] len the length of the object + @return whether object creation completed + */ + bool get_msgpack_object(const std::size_t len) + { + if (JSON_UNLIKELY(not sax->start_object(len))) + { + return false; + } + + string_t key; + for (std::size_t i = 0; i < len; ++i) + { + get(); + if (JSON_UNLIKELY(not get_msgpack_string(key) or not sax->key(key))) + { + return false; + } + + if (JSON_UNLIKELY(not parse_msgpack_internal())) + { + return false; + } + key.clear(); + } + + return sax->end_object(); + } + + //////////// + // UBJSON // + //////////// + + /*! + @param[in] get_char whether a new character should be retrieved from the + input (true, default) or whether the last read + character should be considered instead + + @return whether a valid UBJSON value was passed to the SAX parser + */ + bool parse_ubjson_internal(const bool get_char = true) + { + return get_ubjson_value(get_char ? get_ignore_noop() : current); + } + + /*! + @brief reads a UBJSON string + + This function is either called after reading the 'S' byte explicitly + indicating a string, or in case of an object key where the 'S' byte can be + left out. + + @param[out] result created string + @param[in] get_char whether a new character should be retrieved from the + input (true, default) or whether the last read + character should be considered instead + + @return whether string creation completed + */ + bool get_ubjson_string(string_t& result, const bool get_char = true) + { + if (get_char) + { + get(); // TODO(niels): may we ignore N here? + } + + if (JSON_UNLIKELY(not unexpect_eof(input_format_t::ubjson, "value"))) + { + return false; + } + + switch (current) + { + case 'U': + { + std::uint8_t len; + return get_number(input_format_t::ubjson, len) and get_string(input_format_t::ubjson, len, result); + } + + case 'i': + { + std::int8_t len; + return get_number(input_format_t::ubjson, len) and get_string(input_format_t::ubjson, len, result); + } + + case 'I': + { + std::int16_t len; + return get_number(input_format_t::ubjson, len) and get_string(input_format_t::ubjson, len, result); + } + + case 'l': + { + std::int32_t len; + return get_number(input_format_t::ubjson, len) and get_string(input_format_t::ubjson, len, result); + } + + case 'L': + { + std::int64_t len; + return get_number(input_format_t::ubjson, len) and get_string(input_format_t::ubjson, len, result); + } + + default: + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::ubjson, "expected length type specification (U, i, I, l, L); last byte: 0x" + last_token, "string"))); + } + } + + /*! + @param[out] result determined size + @return whether size determination completed + */ + bool get_ubjson_size_value(std::size_t& result) + { + switch (get_ignore_noop()) + { + case 'U': + { + std::uint8_t number; + if (JSON_UNLIKELY(not get_number(input_format_t::ubjson, number))) + { + return false; + } + result = static_cast<std::size_t>(number); + return true; + } + + case 'i': + { + std::int8_t number; + if (JSON_UNLIKELY(not get_number(input_format_t::ubjson, number))) + { + return false; + } + result = static_cast<std::size_t>(number); + return true; + } + + case 'I': + { + std::int16_t number; + if (JSON_UNLIKELY(not get_number(input_format_t::ubjson, number))) + { + return false; + } + result = static_cast<std::size_t>(number); + return true; + } + + case 'l': + { + std::int32_t number; + if (JSON_UNLIKELY(not get_number(input_format_t::ubjson, number))) + { + return false; + } + result = static_cast<std::size_t>(number); + return true; + } + + case 'L': + { + std::int64_t number; + if (JSON_UNLIKELY(not get_number(input_format_t::ubjson, number))) + { + return false; + } + result = static_cast<std::size_t>(number); + return true; + } + + default: + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::ubjson, "expected length type specification (U, i, I, l, L) after '#'; last byte: 0x" + last_token, "size"))); + } + } + } + + /*! + @brief determine the type and size for a container + + In the optimized UBJSON format, a type and a size can be provided to allow + for a more compact representation. + + @param[out] result pair of the size and the type + + @return whether pair creation completed + */ + bool get_ubjson_size_type(std::pair<std::size_t, int>& result) + { + result.first = string_t::npos; // size + result.second = 0; // type + + get_ignore_noop(); + + if (current == '$') + { + result.second = get(); // must not ignore 'N', because 'N' maybe the type + if (JSON_UNLIKELY(not unexpect_eof(input_format_t::ubjson, "type"))) + { + return false; + } + + get_ignore_noop(); + if (JSON_UNLIKELY(current != '#')) + { + if (JSON_UNLIKELY(not unexpect_eof(input_format_t::ubjson, "value"))) + { + return false; + } + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::ubjson, "expected '#' after type information; last byte: 0x" + last_token, "size"))); + } + + return get_ubjson_size_value(result.first); + } + + if (current == '#') + { + return get_ubjson_size_value(result.first); + } + + return true; + } + + /*! + @param prefix the previously read or set type prefix + @return whether value creation completed + */ + bool get_ubjson_value(const int prefix) + { + switch (prefix) + { + case std::char_traits<char>::eof(): // EOF + return unexpect_eof(input_format_t::ubjson, "value"); + + case 'T': // true + return sax->boolean(true); + case 'F': // false + return sax->boolean(false); + + case 'Z': // null + return sax->null(); + + case 'U': + { + std::uint8_t number; + return get_number(input_format_t::ubjson, number) and sax->number_unsigned(number); + } + + case 'i': + { + std::int8_t number; + return get_number(input_format_t::ubjson, number) and sax->number_integer(number); + } + + case 'I': + { + std::int16_t number; + return get_number(input_format_t::ubjson, number) and sax->number_integer(number); + } + + case 'l': + { + std::int32_t number; + return get_number(input_format_t::ubjson, number) and sax->number_integer(number); + } + + case 'L': + { + std::int64_t number; + return get_number(input_format_t::ubjson, number) and sax->number_integer(number); + } + + case 'd': + { + float number; + return get_number(input_format_t::ubjson, number) and sax->number_float(static_cast<number_float_t>(number), ""); + } + + case 'D': + { + double number; + return get_number(input_format_t::ubjson, number) and sax->number_float(static_cast<number_float_t>(number), ""); + } + + case 'C': // char + { + get(); + if (JSON_UNLIKELY(not unexpect_eof(input_format_t::ubjson, "char"))) + { + return false; + } + if (JSON_UNLIKELY(current > 127)) + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::ubjson, "byte after 'C' must be in range 0x00..0x7F; last byte: 0x" + last_token, "char"))); + } + string_t s(1, static_cast<char>(current)); + return sax->string(s); + } + + case 'S': // string + { + string_t s; + return get_ubjson_string(s) and sax->string(s); + } + + case '[': // array + return get_ubjson_array(); + + case '{': // object + return get_ubjson_object(); + + default: // anything else + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::ubjson, "invalid byte: 0x" + last_token, "value"))); + } + } + } + + /*! + @return whether array creation completed + */ + bool get_ubjson_array() + { + std::pair<std::size_t, int> size_and_type; + if (JSON_UNLIKELY(not get_ubjson_size_type(size_and_type))) + { + return false; + } + + if (size_and_type.first != string_t::npos) + { + if (JSON_UNLIKELY(not sax->start_array(size_and_type.first))) + { + return false; + } + + if (size_and_type.second != 0) + { + if (size_and_type.second != 'N') + { + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_UNLIKELY(not get_ubjson_value(size_and_type.second))) + { + return false; + } + } + } + } + else + { + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_UNLIKELY(not parse_ubjson_internal())) + { + return false; + } + } + } + } + else + { + if (JSON_UNLIKELY(not sax->start_array(std::size_t(-1)))) + { + return false; + } + + while (current != ']') + { + if (JSON_UNLIKELY(not parse_ubjson_internal(false))) + { + return false; + } + get_ignore_noop(); + } + } + + return sax->end_array(); + } + + /*! + @return whether object creation completed + */ + bool get_ubjson_object() + { + std::pair<std::size_t, int> size_and_type; + if (JSON_UNLIKELY(not get_ubjson_size_type(size_and_type))) + { + return false; + } + + string_t key; + if (size_and_type.first != string_t::npos) + { + if (JSON_UNLIKELY(not sax->start_object(size_and_type.first))) + { + return false; + } + + if (size_and_type.second != 0) + { + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_UNLIKELY(not get_ubjson_string(key) or not sax->key(key))) + { + return false; + } + if (JSON_UNLIKELY(not get_ubjson_value(size_and_type.second))) + { + return false; + } + key.clear(); + } + } + else + { + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_UNLIKELY(not get_ubjson_string(key) or not sax->key(key))) + { + return false; + } + if (JSON_UNLIKELY(not parse_ubjson_internal())) + { + return false; + } + key.clear(); + } + } + } + else + { + if (JSON_UNLIKELY(not sax->start_object(std::size_t(-1)))) + { + return false; + } + + while (current != '}') + { + if (JSON_UNLIKELY(not get_ubjson_string(key, false) or not sax->key(key))) + { + return false; + } + if (JSON_UNLIKELY(not parse_ubjson_internal())) + { + return false; + } + get_ignore_noop(); + key.clear(); + } + } + + return sax->end_object(); + } + + /////////////////////// + // Utility functions // + /////////////////////// + + /*! + @brief get next character from the input + + This function provides the interface to the used input adapter. It does + not throw in case the input reached EOF, but returns a -'ve valued + `std::char_traits<char>::eof()` in that case. + + @return character read from the input + */ + int get() + { + ++chars_read; + return current = ia->get_character(); + } + + /*! + @return character read from the input after ignoring all 'N' entries + */ + int get_ignore_noop() + { + do + { + get(); + } + while (current == 'N'); + + return current; + } + + /* + @brief read a number from the input + + @tparam NumberType the type of the number + @param[in] format the current format (for diagnostics) + @param[out] result number of type @a NumberType + + @return whether conversion completed + + @note This function needs to respect the system's endianess, because + bytes in CBOR, MessagePack, and UBJSON are stored in network order + (big endian) and therefore need reordering on little endian systems. + */ + template<typename NumberType, bool InputIsLittleEndian = false> + bool get_number(const input_format_t format, NumberType& result) + { + // step 1: read input into array with system's byte order + std::array<std::uint8_t, sizeof(NumberType)> vec; + for (std::size_t i = 0; i < sizeof(NumberType); ++i) + { + get(); + if (JSON_UNLIKELY(not unexpect_eof(format, "number"))) + { + return false; + } + + // reverse byte order prior to conversion if necessary + if (is_little_endian != InputIsLittleEndian) + { + vec[sizeof(NumberType) - i - 1] = static_cast<std::uint8_t>(current); + } + else + { + vec[i] = static_cast<std::uint8_t>(current); // LCOV_EXCL_LINE + } + } + + // step 2: convert array into number of type T and return + std::memcpy(&result, vec.data(), sizeof(NumberType)); + return true; + } + + /*! + @brief create a string by reading characters from the input + + @tparam NumberType the type of the number + @param[in] format the current format (for diagnostics) + @param[in] len number of characters to read + @param[out] result string created by reading @a len bytes + + @return whether string creation completed + + @note We can not reserve @a len bytes for the result, because @a len + may be too large. Usually, @ref unexpect_eof() detects the end of + the input before we run out of string memory. + */ + template<typename NumberType> + bool get_string(const input_format_t format, + const NumberType len, + string_t& result) + { + bool success = true; + std::generate_n(std::back_inserter(result), len, [this, &success, &format]() + { + get(); + if (JSON_UNLIKELY(not unexpect_eof(format, "string"))) + { + success = false; + } + return static_cast<char>(current); + }); + return success; + } + + /*! + @param[in] format the current format (for diagnostics) + @param[in] context further context information (for diagnostics) + @return whether the last read character is not EOF + */ + bool unexpect_eof(const input_format_t format, const char* context) const + { + if (JSON_UNLIKELY(current == std::char_traits<char>::eof())) + { + return sax->parse_error(chars_read, "<end of file>", + parse_error::create(110, chars_read, exception_message(format, "unexpected end of input", context))); + } + return true; + } + + /*! + @return a string representation of the last read byte + */ + std::string get_token_string() const + { + std::array<char, 3> cr{{}}; + (std::snprintf)(cr.data(), cr.size(), "%.2hhX", static_cast<unsigned char>(current)); + return std::string{cr.data()}; + } + + /*! + @param[in] format the current format + @param[in] detail a detailed error message + @param[in] context further contect information + @return a message string to use in the parse_error exceptions + */ + std::string exception_message(const input_format_t format, + const std::string& detail, + const std::string& context) const + { + std::string error_msg = "syntax error while parsing "; + + switch (format) + { + case input_format_t::cbor: + error_msg += "CBOR"; + break; + + case input_format_t::msgpack: + error_msg += "MessagePack"; + break; + + case input_format_t::ubjson: + error_msg += "UBJSON"; + break; + + case input_format_t::bson: + error_msg += "BSON"; + break; + + default: // LCOV_EXCL_LINE + assert(false); // LCOV_EXCL_LINE + } + + return error_msg + " " + context + ": " + detail; + } + + private: + /// input adapter + input_adapter_t ia = nullptr; + + /// the current character + int current = std::char_traits<char>::eof(); + + /// the number of characters read + std::size_t chars_read = 0; + + /// whether we can assume little endianess + const bool is_little_endian = little_endianess(); + + /// the SAX parser + json_sax_t* sax = nullptr; +}; +} // namespace detail +} // namespace nlohmann + +// #include <nlohmann/detail/input/input_adapters.hpp> + +// #include <nlohmann/detail/input/lexer.hpp> + + +#include <array> // array +#include <clocale> // localeconv +#include <cstddef> // size_t +#include <cstdio> // snprintf +#include <cstdlib> // strtof, strtod, strtold, strtoll, strtoull +#include <initializer_list> // initializer_list +#include <string> // char_traits, string +#include <utility> // move +#include <vector> // vector + +// #include <nlohmann/detail/input/input_adapters.hpp> + +// #include <nlohmann/detail/input/position_t.hpp> + +// #include <nlohmann/detail/macro_scope.hpp> + + +namespace nlohmann +{ +namespace detail +{ +/////////// +// lexer // +/////////// + +/*! +@brief lexical analysis + +This class organizes the lexical analysis during JSON deserialization. +*/ +template<typename BasicJsonType> +class lexer +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + + public: + /// token types for the parser + enum class token_type + { + uninitialized, ///< indicating the scanner is uninitialized + literal_true, ///< the `true` literal + literal_false, ///< the `false` literal + literal_null, ///< the `null` literal + value_string, ///< a string -- use get_string() for actual value + value_unsigned, ///< an unsigned integer -- use get_number_unsigned() for actual value + value_integer, ///< a signed integer -- use get_number_integer() for actual value + value_float, ///< an floating point number -- use get_number_float() for actual value + begin_array, ///< the character for array begin `[` + begin_object, ///< the character for object begin `{` + end_array, ///< the character for array end `]` + end_object, ///< the character for object end `}` + name_separator, ///< the name separator `:` + value_separator, ///< the value separator `,` + parse_error, ///< indicating a parse error + end_of_input, ///< indicating the end of the input buffer + literal_or_value ///< a literal or the begin of a value (only for diagnostics) + }; + + /// return name of values of type token_type (only used for errors) + static const char* token_type_name(const token_type t) noexcept + { + switch (t) + { + case token_type::uninitialized: + return "<uninitialized>"; + case token_type::literal_true: + return "true literal"; + case token_type::literal_false: + return "false literal"; + case token_type::literal_null: + return "null literal"; + case token_type::value_string: + return "string literal"; + case lexer::token_type::value_unsigned: + case lexer::token_type::value_integer: + case lexer::token_type::value_float: + return "number literal"; + case token_type::begin_array: + return "'['"; + case token_type::begin_object: + return "'{'"; + case token_type::end_array: + return "']'"; + case token_type::end_object: + return "'}'"; + case token_type::name_separator: + return "':'"; + case token_type::value_separator: + return "','"; + case token_type::parse_error: + return "<parse error>"; + case token_type::end_of_input: + return "end of input"; + case token_type::literal_or_value: + return "'[', '{', or a literal"; + // LCOV_EXCL_START + default: // catch non-enum values + return "unknown token"; + // LCOV_EXCL_STOP + } + } + + explicit lexer(detail::input_adapter_t&& adapter) + : ia(std::move(adapter)), decimal_point_char(get_decimal_point()) {} + + // delete because of pointer members + lexer(const lexer&) = delete; + lexer(lexer&&) = delete; + lexer& operator=(lexer&) = delete; + lexer& operator=(lexer&&) = delete; + ~lexer() = default; + + private: + ///////////////////// + // locales + ///////////////////// + + /// return the locale-dependent decimal point + static char get_decimal_point() noexcept + { + const auto loc = localeconv(); + assert(loc != nullptr); + return (loc->decimal_point == nullptr) ? '.' : *(loc->decimal_point); + } + + ///////////////////// + // scan functions + ///////////////////// + + /*! + @brief get codepoint from 4 hex characters following `\u` + + For input "\u c1 c2 c3 c4" the codepoint is: + (c1 * 0x1000) + (c2 * 0x0100) + (c3 * 0x0010) + c4 + = (c1 << 12) + (c2 << 8) + (c3 << 4) + (c4 << 0) + + Furthermore, the possible characters '0'..'9', 'A'..'F', and 'a'..'f' + must be converted to the integers 0x0..0x9, 0xA..0xF, 0xA..0xF, resp. The + conversion is done by subtracting the offset (0x30, 0x37, and 0x57) + between the ASCII value of the character and the desired integer value. + + @return codepoint (0x0000..0xFFFF) or -1 in case of an error (e.g. EOF or + non-hex character) + */ + int get_codepoint() + { + // this function only makes sense after reading `\u` + assert(current == 'u'); + int codepoint = 0; + + const auto factors = { 12u, 8u, 4u, 0u }; + for (const auto factor : factors) + { + get(); + + if (current >= '0' and current <= '9') + { + codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor); + } + else if (current >= 'A' and current <= 'F') + { + codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor); + } + else if (current >= 'a' and current <= 'f') + { + codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor); + } + else + { + return -1; + } + } + + assert(0x0000 <= codepoint and codepoint <= 0xFFFF); + return codepoint; + } + + /*! + @brief check if the next byte(s) are inside a given range + + Adds the current byte and, for each passed range, reads a new byte and + checks if it is inside the range. If a violation was detected, set up an + error message and return false. Otherwise, return true. + + @param[in] ranges list of integers; interpreted as list of pairs of + inclusive lower and upper bound, respectively + + @pre The passed list @a ranges must have 2, 4, or 6 elements; that is, + 1, 2, or 3 pairs. This precondition is enforced by an assertion. + + @return true if and only if no range violation was detected + */ + bool next_byte_in_range(std::initializer_list<int> ranges) + { + assert(ranges.size() == 2 or ranges.size() == 4 or ranges.size() == 6); + add(current); + + for (auto range = ranges.begin(); range != ranges.end(); ++range) + { + get(); + if (JSON_LIKELY(*range <= current and current <= *(++range))) + { + add(current); + } + else + { + error_message = "invalid string: ill-formed UTF-8 byte"; + return false; + } + } + + return true; + } + + /*! + @brief scan a string literal + + This function scans a string according to Sect. 7 of RFC 7159. While + scanning, bytes are escaped and copied into buffer token_buffer. Then the + function returns successfully, token_buffer is *not* null-terminated (as it + may contain \0 bytes), and token_buffer.size() is the number of bytes in the + string. + + @return token_type::value_string if string could be successfully scanned, + token_type::parse_error otherwise + + @note In case of errors, variable error_message contains a textual + description. + */ + token_type scan_string() + { + // reset token_buffer (ignore opening quote) + reset(); + + // we entered the function by reading an open quote + assert(current == '\"'); + + while (true) + { + // get next character + switch (get()) + { + // end of file while parsing string + case std::char_traits<char>::eof(): + { + error_message = "invalid string: missing closing quote"; + return token_type::parse_error; + } + + // closing quote + case '\"': + { + return token_type::value_string; + } + + // escapes + case '\\': + { + switch (get()) + { + // quotation mark + case '\"': + add('\"'); + break; + // reverse solidus + case '\\': + add('\\'); + break; + // solidus + case '/': + add('/'); + break; + // backspace + case 'b': + add('\b'); + break; + // form feed + case 'f': + add('\f'); + break; + // line feed + case 'n': + add('\n'); + break; + // carriage return + case 'r': + add('\r'); + break; + // tab + case 't': + add('\t'); + break; + + // unicode escapes + case 'u': + { + const int codepoint1 = get_codepoint(); + int codepoint = codepoint1; // start with codepoint1 + + if (JSON_UNLIKELY(codepoint1 == -1)) + { + error_message = "invalid string: '\\u' must be followed by 4 hex digits"; + return token_type::parse_error; + } + + // check if code point is a high surrogate + if (0xD800 <= codepoint1 and codepoint1 <= 0xDBFF) + { + // expect next \uxxxx entry + if (JSON_LIKELY(get() == '\\' and get() == 'u')) + { + const int codepoint2 = get_codepoint(); + + if (JSON_UNLIKELY(codepoint2 == -1)) + { + error_message = "invalid string: '\\u' must be followed by 4 hex digits"; + return token_type::parse_error; + } + + // check if codepoint2 is a low surrogate + if (JSON_LIKELY(0xDC00 <= codepoint2 and codepoint2 <= 0xDFFF)) + { + // overwrite codepoint + codepoint = static_cast<int>( + // high surrogate occupies the most significant 22 bits + (static_cast<unsigned int>(codepoint1) << 10u) + // low surrogate occupies the least significant 15 bits + + static_cast<unsigned int>(codepoint2) + // there is still the 0xD800, 0xDC00 and 0x10000 noise + // in the result so we have to subtract with: + // (0xD800 << 10) + DC00 - 0x10000 = 0x35FDC00 + - 0x35FDC00u); + } + else + { + error_message = "invalid string: surrogate U+DC00..U+DFFF must be followed by U+DC00..U+DFFF"; + return token_type::parse_error; + } + } + else + { + error_message = "invalid string: surrogate U+DC00..U+DFFF must be followed by U+DC00..U+DFFF"; + return token_type::parse_error; + } + } + else + { + if (JSON_UNLIKELY(0xDC00 <= codepoint1 and codepoint1 <= 0xDFFF)) + { + error_message = "invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF"; + return token_type::parse_error; + } + } + + // result of the above calculation yields a proper codepoint + assert(0x00 <= codepoint and codepoint <= 0x10FFFF); + + // translate codepoint into bytes + if (codepoint < 0x80) + { + // 1-byte characters: 0xxxxxxx (ASCII) + add(codepoint); + } + else if (codepoint <= 0x7FF) + { + // 2-byte characters: 110xxxxx 10xxxxxx + add(static_cast<int>(0xC0u | (static_cast<unsigned int>(codepoint) >> 6u))); + add(static_cast<int>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu))); + } + else if (codepoint <= 0xFFFF) + { + // 3-byte characters: 1110xxxx 10xxxxxx 10xxxxxx + add(static_cast<int>(0xE0u | (static_cast<unsigned int>(codepoint) >> 12u))); + add(static_cast<int>(0x80u | ((static_cast<unsigned int>(codepoint) >> 6u) & 0x3Fu))); + add(static_cast<int>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu))); + } + else + { + // 4-byte characters: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + add(static_cast<int>(0xF0u | (static_cast<unsigned int>(codepoint) >> 18u))); + add(static_cast<int>(0x80u | ((static_cast<unsigned int>(codepoint) >> 12u) & 0x3Fu))); + add(static_cast<int>(0x80u | ((static_cast<unsigned int>(codepoint) >> 6u) & 0x3Fu))); + add(static_cast<int>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu))); + } + + break; + } + + // other characters after escape + default: + error_message = "invalid string: forbidden character after backslash"; + return token_type::parse_error; + } + + break; + } + + // invalid control characters + case 0x00: + { + error_message = "invalid string: control character U+0000 (NUL) must be escaped to \\u0000"; + return token_type::parse_error; + } + + case 0x01: + { + error_message = "invalid string: control character U+0001 (SOH) must be escaped to \\u0001"; + return token_type::parse_error; + } + + case 0x02: + { + error_message = "invalid string: control character U+0002 (STX) must be escaped to \\u0002"; + return token_type::parse_error; + } + + case 0x03: + { + error_message = "invalid string: control character U+0003 (ETX) must be escaped to \\u0003"; + return token_type::parse_error; + } + + case 0x04: + { + error_message = "invalid string: control character U+0004 (EOT) must be escaped to \\u0004"; + return token_type::parse_error; + } + + case 0x05: + { + error_message = "invalid string: control character U+0005 (ENQ) must be escaped to \\u0005"; + return token_type::parse_error; + } + + case 0x06: + { + error_message = "invalid string: control character U+0006 (ACK) must be escaped to \\u0006"; + return token_type::parse_error; + } + + case 0x07: + { + error_message = "invalid string: control character U+0007 (BEL) must be escaped to \\u0007"; + return token_type::parse_error; + } + + case 0x08: + { + error_message = "invalid string: control character U+0008 (BS) must be escaped to \\u0008 or \\b"; + return token_type::parse_error; + } + + case 0x09: + { + error_message = "invalid string: control character U+0009 (HT) must be escaped to \\u0009 or \\t"; + return token_type::parse_error; + } + + case 0x0A: + { + error_message = "invalid string: control character U+000A (LF) must be escaped to \\u000A or \\n"; + return token_type::parse_error; + } + + case 0x0B: + { + error_message = "invalid string: control character U+000B (VT) must be escaped to \\u000B"; + return token_type::parse_error; + } + + case 0x0C: + { + error_message = "invalid string: control character U+000C (FF) must be escaped to \\u000C or \\f"; + return token_type::parse_error; + } + + case 0x0D: + { + error_message = "invalid string: control character U+000D (CR) must be escaped to \\u000D or \\r"; + return token_type::parse_error; + } + + case 0x0E: + { + error_message = "invalid string: control character U+000E (SO) must be escaped to \\u000E"; + return token_type::parse_error; + } + + case 0x0F: + { + error_message = "invalid string: control character U+000F (SI) must be escaped to \\u000F"; + return token_type::parse_error; + } + + case 0x10: + { + error_message = "invalid string: control character U+0010 (DLE) must be escaped to \\u0010"; + return token_type::parse_error; + } + + case 0x11: + { + error_message = "invalid string: control character U+0011 (DC1) must be escaped to \\u0011"; + return token_type::parse_error; + } + + case 0x12: + { + error_message = "invalid string: control character U+0012 (DC2) must be escaped to \\u0012"; + return token_type::parse_error; + } + + case 0x13: + { + error_message = "invalid string: control character U+0013 (DC3) must be escaped to \\u0013"; + return token_type::parse_error; + } + + case 0x14: + { + error_message = "invalid string: control character U+0014 (DC4) must be escaped to \\u0014"; + return token_type::parse_error; + } + + case 0x15: + { + error_message = "invalid string: control character U+0015 (NAK) must be escaped to \\u0015"; + return token_type::parse_error; + } + + case 0x16: + { + error_message = "invalid string: control character U+0016 (SYN) must be escaped to \\u0016"; + return token_type::parse_error; + } + + case 0x17: + { + error_message = "invalid string: control character U+0017 (ETB) must be escaped to \\u0017"; + return token_type::parse_error; + } + + case 0x18: + { + error_message = "invalid string: control character U+0018 (CAN) must be escaped to \\u0018"; + return token_type::parse_error; + } + + case 0x19: + { + error_message = "invalid string: control character U+0019 (EM) must be escaped to \\u0019"; + return token_type::parse_error; + } + + case 0x1A: + { + error_message = "invalid string: control character U+001A (SUB) must be escaped to \\u001A"; + return token_type::parse_error; + } + + case 0x1B: + { + error_message = "invalid string: control character U+001B (ESC) must be escaped to \\u001B"; + return token_type::parse_error; + } + + case 0x1C: + { + error_message = "invalid string: control character U+001C (FS) must be escaped to \\u001C"; + return token_type::parse_error; + } + + case 0x1D: + { + error_message = "invalid string: control character U+001D (GS) must be escaped to \\u001D"; + return token_type::parse_error; + } + + case 0x1E: + { + error_message = "invalid string: control character U+001E (RS) must be escaped to \\u001E"; + return token_type::parse_error; + } + + case 0x1F: + { + error_message = "invalid string: control character U+001F (US) must be escaped to \\u001F"; + return token_type::parse_error; + } + + // U+0020..U+007F (except U+0022 (quote) and U+005C (backspace)) + case 0x20: + case 0x21: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x38: + case 0x39: + case 0x3A: + case 0x3B: + case 0x3C: + case 0x3D: + case 0x3E: + case 0x3F: + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + case 0x58: + case 0x59: + case 0x5A: + case 0x5B: + case 0x5D: + case 0x5E: + case 0x5F: + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: + case 0x79: + case 0x7A: + case 0x7B: + case 0x7C: + case 0x7D: + case 0x7E: + case 0x7F: + { + add(current); + break; + } + + // U+0080..U+07FF: bytes C2..DF 80..BF + case 0xC2: + case 0xC3: + case 0xC4: + case 0xC5: + case 0xC6: + case 0xC7: + case 0xC8: + case 0xC9: + case 0xCA: + case 0xCB: + case 0xCC: + case 0xCD: + case 0xCE: + case 0xCF: + case 0xD0: + case 0xD1: + case 0xD2: + case 0xD3: + case 0xD4: + case 0xD5: + case 0xD6: + case 0xD7: + case 0xD8: + case 0xD9: + case 0xDA: + case 0xDB: + case 0xDC: + case 0xDD: + case 0xDE: + case 0xDF: + { + if (JSON_UNLIKELY(not next_byte_in_range({0x80, 0xBF}))) + { + return token_type::parse_error; + } + break; + } + + // U+0800..U+0FFF: bytes E0 A0..BF 80..BF + case 0xE0: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0xA0, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+1000..U+CFFF: bytes E1..EC 80..BF 80..BF + // U+E000..U+FFFF: bytes EE..EF 80..BF 80..BF + case 0xE1: + case 0xE2: + case 0xE3: + case 0xE4: + case 0xE5: + case 0xE6: + case 0xE7: + case 0xE8: + case 0xE9: + case 0xEA: + case 0xEB: + case 0xEC: + case 0xEE: + case 0xEF: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+D000..U+D7FF: bytes ED 80..9F 80..BF + case 0xED: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x80, 0x9F, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+10000..U+3FFFF F0 90..BF 80..BF 80..BF + case 0xF0: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x90, 0xBF, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+40000..U+FFFFF F1..F3 80..BF 80..BF 80..BF + case 0xF1: + case 0xF2: + case 0xF3: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+100000..U+10FFFF F4 80..8F 80..BF 80..BF + case 0xF4: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x80, 0x8F, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // remaining bytes (80..C1 and F5..FF) are ill-formed + default: + { + error_message = "invalid string: ill-formed UTF-8 byte"; + return token_type::parse_error; + } + } + } + } + + static void strtof(float& f, const char* str, char** endptr) noexcept + { + f = std::strtof(str, endptr); + } + + static void strtof(double& f, const char* str, char** endptr) noexcept + { + f = std::strtod(str, endptr); + } + + static void strtof(long double& f, const char* str, char** endptr) noexcept + { + f = std::strtold(str, endptr); + } + + /*! + @brief scan a number literal + + This function scans a string according to Sect. 6 of RFC 7159. + + The function is realized with a deterministic finite state machine derived + from the grammar described in RFC 7159. Starting in state "init", the + input is read and used to determined the next state. Only state "done" + accepts the number. State "error" is a trap state to model errors. In the + table below, "anything" means any character but the ones listed before. + + state | 0 | 1-9 | e E | + | - | . | anything + ---------|----------|----------|----------|---------|---------|----------|----------- + init | zero | any1 | [error] | [error] | minus | [error] | [error] + minus | zero | any1 | [error] | [error] | [error] | [error] | [error] + zero | done | done | exponent | done | done | decimal1 | done + any1 | any1 | any1 | exponent | done | done | decimal1 | done + decimal1 | decimal2 | [error] | [error] | [error] | [error] | [error] | [error] + decimal2 | decimal2 | decimal2 | exponent | done | done | done | done + exponent | any2 | any2 | [error] | sign | sign | [error] | [error] + sign | any2 | any2 | [error] | [error] | [error] | [error] | [error] + any2 | any2 | any2 | done | done | done | done | done + + The state machine is realized with one label per state (prefixed with + "scan_number_") and `goto` statements between them. The state machine + contains cycles, but any cycle can be left when EOF is read. Therefore, + the function is guaranteed to terminate. + + During scanning, the read bytes are stored in token_buffer. This string is + then converted to a signed integer, an unsigned integer, or a + floating-point number. + + @return token_type::value_unsigned, token_type::value_integer, or + token_type::value_float if number could be successfully scanned, + token_type::parse_error otherwise + + @note The scanner is independent of the current locale. Internally, the + locale's decimal point is used instead of `.` to work with the + locale-dependent converters. + */ + token_type scan_number() // lgtm [cpp/use-of-goto] + { + // reset token_buffer to store the number's bytes + reset(); + + // the type of the parsed number; initially set to unsigned; will be + // changed if minus sign, decimal point or exponent is read + token_type number_type = token_type::value_unsigned; + + // state (init): we just found out we need to scan a number + switch (current) + { + case '-': + { + add(current); + goto scan_number_minus; + } + + case '0': + { + add(current); + goto scan_number_zero; + } + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + // all other characters are rejected outside scan_number() + default: // LCOV_EXCL_LINE + assert(false); // LCOV_EXCL_LINE + } + +scan_number_minus: + // state: we just parsed a leading minus sign + number_type = token_type::value_integer; + switch (get()) + { + case '0': + { + add(current); + goto scan_number_zero; + } + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + default: + { + error_message = "invalid number; expected digit after '-'"; + return token_type::parse_error; + } + } + +scan_number_zero: + // state: we just parse a zero (maybe with a leading minus sign) + switch (get()) + { + case '.': + { + add(decimal_point_char); + goto scan_number_decimal1; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_any1: + // state: we just parsed a number 0-9 (maybe with a leading minus sign) + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + case '.': + { + add(decimal_point_char); + goto scan_number_decimal1; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_decimal1: + // state: we just parsed a decimal point + number_type = token_type::value_float; + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_decimal2; + } + + default: + { + error_message = "invalid number; expected digit after '.'"; + return token_type::parse_error; + } + } + +scan_number_decimal2: + // we just parsed at least one number after a decimal point + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_decimal2; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_exponent: + // we just parsed an exponent + number_type = token_type::value_float; + switch (get()) + { + case '+': + case '-': + { + add(current); + goto scan_number_sign; + } + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + { + error_message = + "invalid number; expected '+', '-', or digit after exponent"; + return token_type::parse_error; + } + } + +scan_number_sign: + // we just parsed an exponent sign + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + { + error_message = "invalid number; expected digit after exponent sign"; + return token_type::parse_error; + } + } + +scan_number_any2: + // we just parsed a number after the exponent or exponent sign + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + goto scan_number_done; + } + +scan_number_done: + // unget the character after the number (we only read it to know that + // we are done scanning a number) + unget(); + + char* endptr = nullptr; + errno = 0; + + // try to parse integers first and fall back to floats + if (number_type == token_type::value_unsigned) + { + const auto x = std::strtoull(token_buffer.data(), &endptr, 10); + + // we checked the number format before + assert(endptr == token_buffer.data() + token_buffer.size()); + + if (errno == 0) + { + value_unsigned = static_cast<number_unsigned_t>(x); + if (value_unsigned == x) + { + return token_type::value_unsigned; + } + } + } + else if (number_type == token_type::value_integer) + { + const auto x = std::strtoll(token_buffer.data(), &endptr, 10); + + // we checked the number format before + assert(endptr == token_buffer.data() + token_buffer.size()); + + if (errno == 0) + { + value_integer = static_cast<number_integer_t>(x); + if (value_integer == x) + { + return token_type::value_integer; + } + } + } + + // this code is reached if we parse a floating-point number or if an + // integer conversion above failed + strtof(value_float, token_buffer.data(), &endptr); + + // we checked the number format before + assert(endptr == token_buffer.data() + token_buffer.size()); + + return token_type::value_float; + } + + /*! + @param[in] literal_text the literal text to expect + @param[in] length the length of the passed literal text + @param[in] return_type the token type to return on success + */ + token_type scan_literal(const char* literal_text, const std::size_t length, + token_type return_type) + { + assert(current == literal_text[0]); + for (std::size_t i = 1; i < length; ++i) + { + if (JSON_UNLIKELY(get() != literal_text[i])) + { + error_message = "invalid literal"; + return token_type::parse_error; + } + } + return return_type; + } + + ///////////////////// + // input management + ///////////////////// + + /// reset token_buffer; current character is beginning of token + void reset() noexcept + { + token_buffer.clear(); + token_string.clear(); + token_string.push_back(std::char_traits<char>::to_char_type(current)); + } + + /* + @brief get next character from the input + + This function provides the interface to the used input adapter. It does + not throw in case the input reached EOF, but returns a + `std::char_traits<char>::eof()` in that case. Stores the scanned characters + for use in error messages. + + @return character read from the input + */ + std::char_traits<char>::int_type get() + { + ++position.chars_read_total; + ++position.chars_read_current_line; + + if (next_unget) + { + // just reset the next_unget variable and work with current + next_unget = false; + } + else + { + current = ia->get_character(); + } + + if (JSON_LIKELY(current != std::char_traits<char>::eof())) + { + token_string.push_back(std::char_traits<char>::to_char_type(current)); + } + + if (current == '\n') + { + ++position.lines_read; + position.chars_read_current_line = 0; + } + + return current; + } + + /*! + @brief unget current character (read it again on next get) + + We implement unget by setting variable next_unget to true. The input is not + changed - we just simulate ungetting by modifying chars_read_total, + chars_read_current_line, and token_string. The next call to get() will + behave as if the unget character is read again. + */ + void unget() + { + next_unget = true; + + --position.chars_read_total; + + // in case we "unget" a newline, we have to also decrement the lines_read + if (position.chars_read_current_line == 0) + { + if (position.lines_read > 0) + { + --position.lines_read; + } + } + else + { + --position.chars_read_current_line; + } + + if (JSON_LIKELY(current != std::char_traits<char>::eof())) + { + assert(not token_string.empty()); + token_string.pop_back(); + } + } + + /// add a character to token_buffer + void add(int c) + { + token_buffer.push_back(std::char_traits<char>::to_char_type(c)); + } + + public: + ///////////////////// + // value getters + ///////////////////// + + /// return integer value + constexpr number_integer_t get_number_integer() const noexcept + { + return value_integer; + } + + /// return unsigned integer value + constexpr number_unsigned_t get_number_unsigned() const noexcept + { + return value_unsigned; + } + + /// return floating-point value + constexpr number_float_t get_number_float() const noexcept + { + return value_float; + } + + /// return current string value (implicitly resets the token; useful only once) + string_t& get_string() + { + return token_buffer; + } + + ///////////////////// + // diagnostics + ///////////////////// + + /// return position of last read token + constexpr position_t get_position() const noexcept + { + return position; + } + + /// return the last read token (for errors only). Will never contain EOF + /// (an arbitrary value that is not a valid char value, often -1), because + /// 255 may legitimately occur. May contain NUL, which should be escaped. + std::string get_token_string() const + { + // escape control characters + std::string result; + for (const auto c : token_string) + { + if ('\x00' <= c and c <= '\x1F') + { + // escape control characters + std::array<char, 9> cs{{}}; + (std::snprintf)(cs.data(), cs.size(), "<U+%.4X>", static_cast<unsigned char>(c)); + result += cs.data(); + } + else + { + // add character as is + result.push_back(c); + } + } + + return result; + } + + /// return syntax error message + constexpr const char* get_error_message() const noexcept + { + return error_message; + } + + ///////////////////// + // actual scanner + ///////////////////// + + /*! + @brief skip the UTF-8 byte order mark + @return true iff there is no BOM or the correct BOM has been skipped + */ + bool skip_bom() + { + if (get() == 0xEF) + { + // check if we completely parse the BOM + return get() == 0xBB and get() == 0xBF; + } + + // the first character is not the beginning of the BOM; unget it to + // process is later + unget(); + return true; + } + + token_type scan() + { + // initially, skip the BOM + if (position.chars_read_total == 0 and not skip_bom()) + { + error_message = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; + return token_type::parse_error; + } + + // read next character and ignore whitespace + do + { + get(); + } + while (current == ' ' or current == '\t' or current == '\n' or current == '\r'); + + switch (current) + { + // structural characters + case '[': + return token_type::begin_array; + case ']': + return token_type::end_array; + case '{': + return token_type::begin_object; + case '}': + return token_type::end_object; + case ':': + return token_type::name_separator; + case ',': + return token_type::value_separator; + + // literals + case 't': + return scan_literal("true", 4, token_type::literal_true); + case 'f': + return scan_literal("false", 5, token_type::literal_false); + case 'n': + return scan_literal("null", 4, token_type::literal_null); + + // string + case '\"': + return scan_string(); + + // number + case '-': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + return scan_number(); + + // end of input (the null byte is needed when parsing from + // string literals) + case '\0': + case std::char_traits<char>::eof(): + return token_type::end_of_input; + + // error + default: + error_message = "invalid literal"; + return token_type::parse_error; + } + } + + private: + /// input adapter + detail::input_adapter_t ia = nullptr; + + /// the current character + std::char_traits<char>::int_type current = std::char_traits<char>::eof(); + + /// whether the next get() call should just return current + bool next_unget = false; + + /// the start position of the current token + position_t position {}; + + /// raw input token string (for error messages) + std::vector<char> token_string {}; + + /// buffer for variable-length tokens (numbers, strings) + string_t token_buffer {}; + + /// a description of occurred lexer errors + const char* error_message = ""; + + // number values + number_integer_t value_integer = 0; + number_unsigned_t value_unsigned = 0; + number_float_t value_float = 0; + + /// the decimal point + const char decimal_point_char = '.'; +}; +} // namespace detail +} // namespace nlohmann + +// #include <nlohmann/detail/input/parser.hpp> + + +#include <cassert> // assert +#include <cmath> // isfinite +#include <cstdint> // uint8_t +#include <functional> // function +#include <string> // string +#include <utility> // move +#include <vector> // vector + +// #include <nlohmann/detail/exceptions.hpp> + +// #include <nlohmann/detail/input/input_adapters.hpp> + +// #include <nlohmann/detail/input/json_sax.hpp> + +// #include <nlohmann/detail/input/lexer.hpp> + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/meta/is_sax.hpp> + +// #include <nlohmann/detail/value_t.hpp> + + +namespace nlohmann +{ +namespace detail +{ +//////////// +// parser // +//////////// + +/*! +@brief syntax analysis + +This class implements a recursive decent parser. +*/ +template<typename BasicJsonType> +class parser +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using lexer_t = lexer<BasicJsonType>; + using token_type = typename lexer_t::token_type; + + public: + enum class parse_event_t : uint8_t + { + /// the parser read `{` and started to process a JSON object + object_start, + /// the parser read `}` and finished processing a JSON object + object_end, + /// the parser read `[` and started to process a JSON array + array_start, + /// the parser read `]` and finished processing a JSON array + array_end, + /// the parser read a key of a value in an object + key, + /// the parser finished reading a JSON value + value + }; + + using parser_callback_t = + std::function<bool(int depth, parse_event_t event, BasicJsonType& parsed)>; + + /// a parser reading from an input adapter + explicit parser(detail::input_adapter_t&& adapter, + const parser_callback_t cb = nullptr, + const bool allow_exceptions_ = true) + : callback(cb), m_lexer(std::move(adapter)), allow_exceptions(allow_exceptions_) + { + // read first token + get_token(); + } + + /*! + @brief public parser interface + + @param[in] strict whether to expect the last token to be EOF + @param[in,out] result parsed JSON value + + @throw parse_error.101 in case of an unexpected token + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + */ + void parse(const bool strict, BasicJsonType& result) + { + if (callback) + { + json_sax_dom_callback_parser<BasicJsonType> sdp(result, callback, allow_exceptions); + sax_parse_internal(&sdp); + result.assert_invariant(); + + // in strict mode, input must be completely read + if (strict and (get_token() != token_type::end_of_input)) + { + sdp.parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), + exception_message(token_type::end_of_input, "value"))); + } + + // in case of an error, return discarded value + if (sdp.is_errored()) + { + result = value_t::discarded; + return; + } + + // set top-level value to null if it was discarded by the callback + // function + if (result.is_discarded()) + { + result = nullptr; + } + } + else + { + json_sax_dom_parser<BasicJsonType> sdp(result, allow_exceptions); + sax_parse_internal(&sdp); + result.assert_invariant(); + + // in strict mode, input must be completely read + if (strict and (get_token() != token_type::end_of_input)) + { + sdp.parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), + exception_message(token_type::end_of_input, "value"))); + } + + // in case of an error, return discarded value + if (sdp.is_errored()) + { + result = value_t::discarded; + return; + } + } + } + + /*! + @brief public accept interface + + @param[in] strict whether to expect the last token to be EOF + @return whether the input is a proper JSON text + */ + bool accept(const bool strict = true) + { + json_sax_acceptor<BasicJsonType> sax_acceptor; + return sax_parse(&sax_acceptor, strict); + } + + template <typename SAX> + bool sax_parse(SAX* sax, const bool strict = true) + { + (void)detail::is_sax_static_asserts<SAX, BasicJsonType> {}; + const bool result = sax_parse_internal(sax); + + // strict mode: next byte must be EOF + if (result and strict and (get_token() != token_type::end_of_input)) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), + exception_message(token_type::end_of_input, "value"))); + } + + return result; + } + + private: + template <typename SAX> + bool sax_parse_internal(SAX* sax) + { + // stack to remember the hierarchy of structured values we are parsing + // true = array; false = object + std::vector<bool> states; + // value to avoid a goto (see comment where set to true) + bool skip_to_state_evaluation = false; + + while (true) + { + if (not skip_to_state_evaluation) + { + // invariant: get_token() was called before each iteration + switch (last_token) + { + case token_type::begin_object: + { + if (JSON_UNLIKELY(not sax->start_object(std::size_t(-1)))) + { + return false; + } + + // closing } -> we are done + if (get_token() == token_type::end_object) + { + if (JSON_UNLIKELY(not sax->end_object())) + { + return false; + } + break; + } + + // parse key + if (JSON_UNLIKELY(last_token != token_type::value_string)) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), + exception_message(token_type::value_string, "object key"))); + } + if (JSON_UNLIKELY(not sax->key(m_lexer.get_string()))) + { + return false; + } + + // parse separator (:) + if (JSON_UNLIKELY(get_token() != token_type::name_separator)) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), + exception_message(token_type::name_separator, "object separator"))); + } + + // remember we are now inside an object + states.push_back(false); + + // parse values + get_token(); + continue; + } + + case token_type::begin_array: + { + if (JSON_UNLIKELY(not sax->start_array(std::size_t(-1)))) + { + return false; + } + + // closing ] -> we are done + if (get_token() == token_type::end_array) + { + if (JSON_UNLIKELY(not sax->end_array())) + { + return false; + } + break; + } + + // remember we are now inside an array + states.push_back(true); + + // parse values (no need to call get_token) + continue; + } + + case token_type::value_float: + { + const auto res = m_lexer.get_number_float(); + + if (JSON_UNLIKELY(not std::isfinite(res))) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + out_of_range::create(406, "number overflow parsing '" + m_lexer.get_token_string() + "'")); + } + + if (JSON_UNLIKELY(not sax->number_float(res, m_lexer.get_string()))) + { + return false; + } + + break; + } + + case token_type::literal_false: + { + if (JSON_UNLIKELY(not sax->boolean(false))) + { + return false; + } + break; + } + + case token_type::literal_null: + { + if (JSON_UNLIKELY(not sax->null())) + { + return false; + } + break; + } + + case token_type::literal_true: + { + if (JSON_UNLIKELY(not sax->boolean(true))) + { + return false; + } + break; + } + + case token_type::value_integer: + { + if (JSON_UNLIKELY(not sax->number_integer(m_lexer.get_number_integer()))) + { + return false; + } + break; + } + + case token_type::value_string: + { + if (JSON_UNLIKELY(not sax->string(m_lexer.get_string()))) + { + return false; + } + break; + } + + case token_type::value_unsigned: + { + if (JSON_UNLIKELY(not sax->number_unsigned(m_lexer.get_number_unsigned()))) + { + return false; + } + break; + } + + case token_type::parse_error: + { + // using "uninitialized" to avoid "expected" message + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), + exception_message(token_type::uninitialized, "value"))); + } + + default: // the last token was unexpected + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), + exception_message(token_type::literal_or_value, "value"))); + } + } + } + else + { + skip_to_state_evaluation = false; + } + + // we reached this line after we successfully parsed a value + if (states.empty()) + { + // empty stack: we reached the end of the hierarchy: done + return true; + } + + if (states.back()) // array + { + // comma -> next value + if (get_token() == token_type::value_separator) + { + // parse a new value + get_token(); + continue; + } + + // closing ] + if (JSON_LIKELY(last_token == token_type::end_array)) + { + if (JSON_UNLIKELY(not sax->end_array())) + { + return false; + } + + // We are done with this array. Before we can parse a + // new value, we need to evaluate the new state first. + // By setting skip_to_state_evaluation to false, we + // are effectively jumping to the beginning of this if. + assert(not states.empty()); + states.pop_back(); + skip_to_state_evaluation = true; + continue; + } + + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), + exception_message(token_type::end_array, "array"))); + } + else // object + { + // comma -> next value + if (get_token() == token_type::value_separator) + { + // parse key + if (JSON_UNLIKELY(get_token() != token_type::value_string)) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), + exception_message(token_type::value_string, "object key"))); + } + + if (JSON_UNLIKELY(not sax->key(m_lexer.get_string()))) + { + return false; + } + + // parse separator (:) + if (JSON_UNLIKELY(get_token() != token_type::name_separator)) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), + exception_message(token_type::name_separator, "object separator"))); + } + + // parse values + get_token(); + continue; + } + + // closing } + if (JSON_LIKELY(last_token == token_type::end_object)) + { + if (JSON_UNLIKELY(not sax->end_object())) + { + return false; + } + + // We are done with this object. Before we can parse a + // new value, we need to evaluate the new state first. + // By setting skip_to_state_evaluation to false, we + // are effectively jumping to the beginning of this if. + assert(not states.empty()); + states.pop_back(); + skip_to_state_evaluation = true; + continue; + } + + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), + exception_message(token_type::end_object, "object"))); + } + } + } + + /// get next token from lexer + token_type get_token() + { + return last_token = m_lexer.scan(); + } + + std::string exception_message(const token_type expected, const std::string& context) + { + std::string error_msg = "syntax error "; + + if (not context.empty()) + { + error_msg += "while parsing " + context + " "; + } + + error_msg += "- "; + + if (last_token == token_type::parse_error) + { + error_msg += std::string(m_lexer.get_error_message()) + "; last read: '" + + m_lexer.get_token_string() + "'"; + } + else + { + error_msg += "unexpected " + std::string(lexer_t::token_type_name(last_token)); + } + + if (expected != token_type::uninitialized) + { + error_msg += "; expected " + std::string(lexer_t::token_type_name(expected)); + } + + return error_msg; + } + + private: + /// callback function + const parser_callback_t callback = nullptr; + /// the type of the last read token + token_type last_token = token_type::uninitialized; + /// the lexer + lexer_t m_lexer; + /// whether to throw exceptions in case of errors + const bool allow_exceptions = true; +}; +} // namespace detail +} // namespace nlohmann + +// #include <nlohmann/detail/iterators/internal_iterator.hpp> + + +// #include <nlohmann/detail/iterators/primitive_iterator.hpp> + + +#include <cstddef> // ptrdiff_t +#include <limits> // numeric_limits + +namespace nlohmann +{ +namespace detail +{ +/* +@brief an iterator for primitive JSON types + +This class models an iterator for primitive JSON types (boolean, number, +string). It's only purpose is to allow the iterator/const_iterator classes +to "iterate" over primitive values. Internally, the iterator is modeled by +a `difference_type` variable. Value begin_value (`0`) models the begin, +end_value (`1`) models past the end. +*/ +class primitive_iterator_t +{ + private: + using difference_type = std::ptrdiff_t; + static constexpr difference_type begin_value = 0; + static constexpr difference_type end_value = begin_value + 1; + + /// iterator as signed integer type + difference_type m_it = (std::numeric_limits<std::ptrdiff_t>::min)(); + + public: + constexpr difference_type get_value() const noexcept + { + return m_it; + } + + /// set iterator to a defined beginning + void set_begin() noexcept + { + m_it = begin_value; + } + + /// set iterator to a defined past the end + void set_end() noexcept + { + m_it = end_value; + } + + /// return whether the iterator can be dereferenced + constexpr bool is_begin() const noexcept + { + return m_it == begin_value; + } + + /// return whether the iterator is at end + constexpr bool is_end() const noexcept + { + return m_it == end_value; + } + + friend constexpr bool operator==(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept + { + return lhs.m_it == rhs.m_it; + } + + friend constexpr bool operator<(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept + { + return lhs.m_it < rhs.m_it; + } + + primitive_iterator_t operator+(difference_type n) noexcept + { + auto result = *this; + result += n; + return result; + } + + friend constexpr difference_type operator-(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept + { + return lhs.m_it - rhs.m_it; + } + + primitive_iterator_t& operator++() noexcept + { + ++m_it; + return *this; + } + + primitive_iterator_t const operator++(int) noexcept + { + auto result = *this; + ++m_it; + return result; + } + + primitive_iterator_t& operator--() noexcept + { + --m_it; + return *this; + } + + primitive_iterator_t const operator--(int) noexcept + { + auto result = *this; + --m_it; + return result; + } + + primitive_iterator_t& operator+=(difference_type n) noexcept + { + m_it += n; + return *this; + } + + primitive_iterator_t& operator-=(difference_type n) noexcept + { + m_it -= n; + return *this; + } +}; +} // namespace detail +} // namespace nlohmann + + +namespace nlohmann +{ +namespace detail +{ +/*! +@brief an iterator value + +@note This structure could easily be a union, but MSVC currently does not allow +unions members with complex constructors, see https://github.com/nlohmann/json/pull/105. +*/ +template<typename BasicJsonType> struct internal_iterator +{ + /// iterator for JSON objects + typename BasicJsonType::object_t::iterator object_iterator {}; + /// iterator for JSON arrays + typename BasicJsonType::array_t::iterator array_iterator {}; + /// generic iterator for all other types + primitive_iterator_t primitive_iterator {}; +}; +} // namespace detail +} // namespace nlohmann + +// #include <nlohmann/detail/iterators/iter_impl.hpp> + + +#include <ciso646> // not +#include <iterator> // iterator, random_access_iterator_tag, bidirectional_iterator_tag, advance, next +#include <type_traits> // conditional, is_const, remove_const + +// #include <nlohmann/detail/exceptions.hpp> + +// #include <nlohmann/detail/iterators/internal_iterator.hpp> + +// #include <nlohmann/detail/iterators/primitive_iterator.hpp> + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/meta/cpp_future.hpp> + +// #include <nlohmann/detail/meta/type_traits.hpp> + +// #include <nlohmann/detail/value_t.hpp> + + +namespace nlohmann +{ +namespace detail +{ +// forward declare, to be able to friend it later on +template<typename IteratorType> class iteration_proxy; +template<typename IteratorType> class iteration_proxy_value; + +/*! +@brief a template for a bidirectional iterator for the @ref basic_json class +This class implements a both iterators (iterator and const_iterator) for the +@ref basic_json class. +@note An iterator is called *initialized* when a pointer to a JSON value has + been set (e.g., by a constructor or a copy assignment). If the iterator is + default-constructed, it is *uninitialized* and most methods are undefined. + **The library uses assertions to detect calls on uninitialized iterators.** +@requirement The class satisfies the following concept requirements: +- +[BidirectionalIterator](https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator): + The iterator that can be moved can be moved in both directions (i.e. + incremented and decremented). +@since version 1.0.0, simplified in version 2.0.9, change to bidirectional + iterators in version 3.0.0 (see https://github.com/nlohmann/json/issues/593) +*/ +template<typename BasicJsonType> +class iter_impl +{ + /// allow basic_json to access private members + friend iter_impl<typename std::conditional<std::is_const<BasicJsonType>::value, typename std::remove_const<BasicJsonType>::type, const BasicJsonType>::type>; + friend BasicJsonType; + friend iteration_proxy<iter_impl>; + friend iteration_proxy_value<iter_impl>; + + using object_t = typename BasicJsonType::object_t; + using array_t = typename BasicJsonType::array_t; + // make sure BasicJsonType is basic_json or const basic_json + static_assert(is_basic_json<typename std::remove_const<BasicJsonType>::type>::value, + "iter_impl only accepts (const) basic_json"); + + public: + + /// The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. + /// The C++ Standard has never required user-defined iterators to derive from std::iterator. + /// A user-defined iterator should provide publicly accessible typedefs named + /// iterator_category, value_type, difference_type, pointer, and reference. + /// Note that value_type is required to be non-const, even for constant iterators. + using iterator_category = std::bidirectional_iterator_tag; + + /// the type of the values when the iterator is dereferenced + using value_type = typename BasicJsonType::value_type; + /// a type to represent differences between iterators + using difference_type = typename BasicJsonType::difference_type; + /// defines a pointer to the type iterated over (value_type) + using pointer = typename std::conditional<std::is_const<BasicJsonType>::value, + typename BasicJsonType::const_pointer, + typename BasicJsonType::pointer>::type; + /// defines a reference to the type iterated over (value_type) + using reference = + typename std::conditional<std::is_const<BasicJsonType>::value, + typename BasicJsonType::const_reference, + typename BasicJsonType::reference>::type; + + /// default constructor + iter_impl() = default; + + /*! + @brief constructor for a given JSON instance + @param[in] object pointer to a JSON object for this iterator + @pre object != nullptr + @post The iterator is initialized; i.e. `m_object != nullptr`. + */ + explicit iter_impl(pointer object) noexcept : m_object(object) + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + m_it.object_iterator = typename object_t::iterator(); + break; + } + + case value_t::array: + { + m_it.array_iterator = typename array_t::iterator(); + break; + } + + default: + { + m_it.primitive_iterator = primitive_iterator_t(); + break; + } + } + } + + /*! + @note The conventional copy constructor and copy assignment are implicitly + defined. Combined with the following converting constructor and + assignment, they support: (1) copy from iterator to iterator, (2) + copy from const iterator to const iterator, and (3) conversion from + iterator to const iterator. However conversion from const iterator + to iterator is not defined. + */ + + /*! + @brief converting constructor + @param[in] other non-const iterator to copy from + @note It is not checked whether @a other is initialized. + */ + iter_impl(const iter_impl<typename std::remove_const<BasicJsonType>::type>& other) noexcept + : m_object(other.m_object), m_it(other.m_it) {} + + /*! + @brief converting assignment + @param[in,out] other non-const iterator to copy from + @return const/non-const iterator + @note It is not checked whether @a other is initialized. + */ + iter_impl& operator=(const iter_impl<typename std::remove_const<BasicJsonType>::type>& other) noexcept + { + m_object = other.m_object; + m_it = other.m_it; + return *this; + } + + private: + /*! + @brief set the iterator to the first value + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + void set_begin() noexcept + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + m_it.object_iterator = m_object->m_value.object->begin(); + break; + } + + case value_t::array: + { + m_it.array_iterator = m_object->m_value.array->begin(); + break; + } + + case value_t::null: + { + // set to end so begin()==end() is true: null is empty + m_it.primitive_iterator.set_end(); + break; + } + + default: + { + m_it.primitive_iterator.set_begin(); + break; + } + } + } + + /*! + @brief set the iterator past the last value + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + void set_end() noexcept + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + m_it.object_iterator = m_object->m_value.object->end(); + break; + } + + case value_t::array: + { + m_it.array_iterator = m_object->m_value.array->end(); + break; + } + + default: + { + m_it.primitive_iterator.set_end(); + break; + } + } + } + + public: + /*! + @brief return a reference to the value pointed to by the iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + reference operator*() const + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + assert(m_it.object_iterator != m_object->m_value.object->end()); + return m_it.object_iterator->second; + } + + case value_t::array: + { + assert(m_it.array_iterator != m_object->m_value.array->end()); + return *m_it.array_iterator; + } + + case value_t::null: + JSON_THROW(invalid_iterator::create(214, "cannot get value")); + + default: + { + if (JSON_LIKELY(m_it.primitive_iterator.is_begin())) + { + return *m_object; + } + + JSON_THROW(invalid_iterator::create(214, "cannot get value")); + } + } + } + + /*! + @brief dereference the iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + pointer operator->() const + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + assert(m_it.object_iterator != m_object->m_value.object->end()); + return &(m_it.object_iterator->second); + } + + case value_t::array: + { + assert(m_it.array_iterator != m_object->m_value.array->end()); + return &*m_it.array_iterator; + } + + default: + { + if (JSON_LIKELY(m_it.primitive_iterator.is_begin())) + { + return m_object; + } + + JSON_THROW(invalid_iterator::create(214, "cannot get value")); + } + } + } + + /*! + @brief post-increment (it++) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl const operator++(int) + { + auto result = *this; + ++(*this); + return result; + } + + /*! + @brief pre-increment (++it) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator++() + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + std::advance(m_it.object_iterator, 1); + break; + } + + case value_t::array: + { + std::advance(m_it.array_iterator, 1); + break; + } + + default: + { + ++m_it.primitive_iterator; + break; + } + } + + return *this; + } + + /*! + @brief post-decrement (it--) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl const operator--(int) + { + auto result = *this; + --(*this); + return result; + } + + /*! + @brief pre-decrement (--it) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator--() + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + std::advance(m_it.object_iterator, -1); + break; + } + + case value_t::array: + { + std::advance(m_it.array_iterator, -1); + break; + } + + default: + { + --m_it.primitive_iterator; + break; + } + } + + return *this; + } + + /*! + @brief comparison: equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator==(const iter_impl& other) const + { + // if objects are not the same, the comparison is undefined + if (JSON_UNLIKELY(m_object != other.m_object)) + { + JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers")); + } + + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + return (m_it.object_iterator == other.m_it.object_iterator); + + case value_t::array: + return (m_it.array_iterator == other.m_it.array_iterator); + + default: + return (m_it.primitive_iterator == other.m_it.primitive_iterator); + } + } + + /*! + @brief comparison: not equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator!=(const iter_impl& other) const + { + return not operator==(other); + } + + /*! + @brief comparison: smaller + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator<(const iter_impl& other) const + { + // if objects are not the same, the comparison is undefined + if (JSON_UNLIKELY(m_object != other.m_object)) + { + JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers")); + } + + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(213, "cannot compare order of object iterators")); + + case value_t::array: + return (m_it.array_iterator < other.m_it.array_iterator); + + default: + return (m_it.primitive_iterator < other.m_it.primitive_iterator); + } + } + + /*! + @brief comparison: less than or equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator<=(const iter_impl& other) const + { + return not other.operator < (*this); + } + + /*! + @brief comparison: greater than + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator>(const iter_impl& other) const + { + return not operator<=(other); + } + + /*! + @brief comparison: greater than or equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator>=(const iter_impl& other) const + { + return not operator<(other); + } + + /*! + @brief add to iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator+=(difference_type i) + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(209, "cannot use offsets with object iterators")); + + case value_t::array: + { + std::advance(m_it.array_iterator, i); + break; + } + + default: + { + m_it.primitive_iterator += i; + break; + } + } + + return *this; + } + + /*! + @brief subtract from iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator-=(difference_type i) + { + return operator+=(-i); + } + + /*! + @brief add to iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl operator+(difference_type i) const + { + auto result = *this; + result += i; + return result; + } + + /*! + @brief addition of distance and iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + friend iter_impl operator+(difference_type i, const iter_impl& it) + { + auto result = it; + result += i; + return result; + } + + /*! + @brief subtract from iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl operator-(difference_type i) const + { + auto result = *this; + result -= i; + return result; + } + + /*! + @brief return difference + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + difference_type operator-(const iter_impl& other) const + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(209, "cannot use offsets with object iterators")); + + case value_t::array: + return m_it.array_iterator - other.m_it.array_iterator; + + default: + return m_it.primitive_iterator - other.m_it.primitive_iterator; + } + } + + /*! + @brief access to successor + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + reference operator[](difference_type n) const + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(208, "cannot use operator[] for object iterators")); + + case value_t::array: + return *std::next(m_it.array_iterator, n); + + case value_t::null: + JSON_THROW(invalid_iterator::create(214, "cannot get value")); + + default: + { + if (JSON_LIKELY(m_it.primitive_iterator.get_value() == -n)) + { + return *m_object; + } + + JSON_THROW(invalid_iterator::create(214, "cannot get value")); + } + } + } + + /*! + @brief return the key of an object iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + const typename object_t::key_type& key() const + { + assert(m_object != nullptr); + + if (JSON_LIKELY(m_object->is_object())) + { + return m_it.object_iterator->first; + } + + JSON_THROW(invalid_iterator::create(207, "cannot use key() for non-object iterators")); + } + + /*! + @brief return the value of an iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + reference value() const + { + return operator*(); + } + + private: + /// associated JSON instance + pointer m_object = nullptr; + /// the actual iterator of the associated instance + internal_iterator<typename std::remove_const<BasicJsonType>::type> m_it {}; +}; +} // namespace detail +} // namespace nlohmann + +// #include <nlohmann/detail/iterators/iteration_proxy.hpp> + +// #include <nlohmann/detail/iterators/json_reverse_iterator.hpp> + + +#include <cstddef> // ptrdiff_t +#include <iterator> // reverse_iterator +#include <utility> // declval + +namespace nlohmann +{ +namespace detail +{ +////////////////////// +// reverse_iterator // +////////////////////// + +/*! +@brief a template for a reverse iterator class + +@tparam Base the base iterator type to reverse. Valid types are @ref +iterator (to create @ref reverse_iterator) and @ref const_iterator (to +create @ref const_reverse_iterator). + +@requirement The class satisfies the following concept requirements: +- +[BidirectionalIterator](https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator): + The iterator that can be moved can be moved in both directions (i.e. + incremented and decremented). +- [OutputIterator](https://en.cppreference.com/w/cpp/named_req/OutputIterator): + It is possible to write to the pointed-to element (only if @a Base is + @ref iterator). + +@since version 1.0.0 +*/ +template<typename Base> +class json_reverse_iterator : public std::reverse_iterator<Base> +{ + public: + using difference_type = std::ptrdiff_t; + /// shortcut to the reverse iterator adapter + using base_iterator = std::reverse_iterator<Base>; + /// the reference type for the pointed-to element + using reference = typename Base::reference; + + /// create reverse iterator from iterator + explicit json_reverse_iterator(const typename base_iterator::iterator_type& it) noexcept + : base_iterator(it) {} + + /// create reverse iterator from base class + explicit json_reverse_iterator(const base_iterator& it) noexcept : base_iterator(it) {} + + /// post-increment (it++) + json_reverse_iterator const operator++(int) + { + return static_cast<json_reverse_iterator>(base_iterator::operator++(1)); + } + + /// pre-increment (++it) + json_reverse_iterator& operator++() + { + return static_cast<json_reverse_iterator&>(base_iterator::operator++()); + } + + /// post-decrement (it--) + json_reverse_iterator const operator--(int) + { + return static_cast<json_reverse_iterator>(base_iterator::operator--(1)); + } + + /// pre-decrement (--it) + json_reverse_iterator& operator--() + { + return static_cast<json_reverse_iterator&>(base_iterator::operator--()); + } + + /// add to iterator + json_reverse_iterator& operator+=(difference_type i) + { + return static_cast<json_reverse_iterator&>(base_iterator::operator+=(i)); + } + + /// add to iterator + json_reverse_iterator operator+(difference_type i) const + { + return static_cast<json_reverse_iterator>(base_iterator::operator+(i)); + } + + /// subtract from iterator + json_reverse_iterator operator-(difference_type i) const + { + return static_cast<json_reverse_iterator>(base_iterator::operator-(i)); + } + + /// return difference + difference_type operator-(const json_reverse_iterator& other) const + { + return base_iterator(*this) - base_iterator(other); + } + + /// access to successor + reference operator[](difference_type n) const + { + return *(this->operator+(n)); + } + + /// return the key of an object iterator + auto key() const -> decltype(std::declval<Base>().key()) + { + auto it = --this->base(); + return it.key(); + } + + /// return the value of an iterator + reference value() const + { + auto it = --this->base(); + return it.operator * (); + } +}; +} // namespace detail +} // namespace nlohmann + +// #include <nlohmann/detail/iterators/primitive_iterator.hpp> + +// #include <nlohmann/detail/json_pointer.hpp> + + +#include <algorithm> // all_of +#include <cassert> // assert +#include <numeric> // accumulate +#include <string> // string +#include <utility> // move +#include <vector> // vector + +// #include <nlohmann/detail/exceptions.hpp> + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/value_t.hpp> + + +namespace nlohmann +{ +template<typename BasicJsonType> +class json_pointer +{ + // allow basic_json to access private members + NLOHMANN_BASIC_JSON_TPL_DECLARATION + friend class basic_json; + + public: + /*! + @brief create JSON pointer + + Create a JSON pointer according to the syntax described in + [Section 3 of RFC6901](https://tools.ietf.org/html/rfc6901#section-3). + + @param[in] s string representing the JSON pointer; if omitted, the empty + string is assumed which references the whole JSON value + + @throw parse_error.107 if the given JSON pointer @a s is nonempty and does + not begin with a slash (`/`); see example below + + @throw parse_error.108 if a tilde (`~`) in the given JSON pointer @a s is + not followed by `0` (representing `~`) or `1` (representing `/`); see + example below + + @liveexample{The example shows the construction several valid JSON pointers + as well as the exceptional behavior.,json_pointer} + + @since version 2.0.0 + */ + explicit json_pointer(const std::string& s = "") + : reference_tokens(split(s)) + {} + + /*! + @brief return a string representation of the JSON pointer + + @invariant For each JSON pointer `ptr`, it holds: + @code {.cpp} + ptr == json_pointer(ptr.to_string()); + @endcode + + @return a string representation of the JSON pointer + + @liveexample{The example shows the result of `to_string`.,json_pointer__to_string} + + @since version 2.0.0 + */ + std::string to_string() const + { + return std::accumulate(reference_tokens.begin(), reference_tokens.end(), + std::string{}, + [](const std::string & a, const std::string & b) + { + return a + "/" + escape(b); + }); + } + + /// @copydoc to_string() + operator std::string() const + { + return to_string(); + } + + /*! + @brief append another JSON pointer at the end of this JSON pointer + + @param[in] ptr JSON pointer to append + @return JSON pointer with @a ptr appended + + @liveexample{The example shows the usage of `operator/=`.,json_pointer__operator_add} + + @complexity Linear in the length of @a ptr. + + @sa @ref operator/=(std::string) to append a reference token + @sa @ref operator/=(std::size_t) to append an array index + @sa @ref operator/(const json_pointer&, const json_pointer&) for a binary operator + + @since version 3.6.0 + */ + json_pointer& operator/=(const json_pointer& ptr) + { + reference_tokens.insert(reference_tokens.end(), + ptr.reference_tokens.begin(), + ptr.reference_tokens.end()); + return *this; + } + + /*! + @brief append an unescaped reference token at the end of this JSON pointer + + @param[in] token reference token to append + @return JSON pointer with @a token appended without escaping @a token + + @liveexample{The example shows the usage of `operator/=`.,json_pointer__operator_add} + + @complexity Amortized constant. + + @sa @ref operator/=(const json_pointer&) to append a JSON pointer + @sa @ref operator/=(std::size_t) to append an array index + @sa @ref operator/(const json_pointer&, std::size_t) for a binary operator + + @since version 3.6.0 + */ + json_pointer& operator/=(std::string token) + { + push_back(std::move(token)); + return *this; + } + + /*! + @brief append an array index at the end of this JSON pointer + + @param[in] array_index array index ot append + @return JSON pointer with @a array_index appended + + @liveexample{The example shows the usage of `operator/=`.,json_pointer__operator_add} + + @complexity Amortized constant. + + @sa @ref operator/=(const json_pointer&) to append a JSON pointer + @sa @ref operator/=(std::string) to append a reference token + @sa @ref operator/(const json_pointer&, std::string) for a binary operator + + @since version 3.6.0 + */ + json_pointer& operator/=(std::size_t array_index) + { + return *this /= std::to_string(array_index); + } + + /*! + @brief create a new JSON pointer by appending the right JSON pointer at the end of the left JSON pointer + + @param[in] lhs JSON pointer + @param[in] rhs JSON pointer + @return a new JSON pointer with @a rhs appended to @a lhs + + @liveexample{The example shows the usage of `operator/`.,json_pointer__operator_add_binary} + + @complexity Linear in the length of @a lhs and @a rhs. + + @sa @ref operator/=(const json_pointer&) to append a JSON pointer + + @since version 3.6.0 + */ + friend json_pointer operator/(const json_pointer& lhs, + const json_pointer& rhs) + { + return json_pointer(lhs) /= rhs; + } + + /*! + @brief create a new JSON pointer by appending the unescaped token at the end of the JSON pointer + + @param[in] ptr JSON pointer + @param[in] token reference token + @return a new JSON pointer with unescaped @a token appended to @a ptr + + @liveexample{The example shows the usage of `operator/`.,json_pointer__operator_add_binary} + + @complexity Linear in the length of @a ptr. + + @sa @ref operator/=(std::string) to append a reference token + + @since version 3.6.0 + */ + friend json_pointer operator/(const json_pointer& ptr, std::string token) + { + return json_pointer(ptr) /= std::move(token); + } + + /*! + @brief create a new JSON pointer by appending the array-index-token at the end of the JSON pointer + + @param[in] ptr JSON pointer + @param[in] array_index array index + @return a new JSON pointer with @a array_index appended to @a ptr + + @liveexample{The example shows the usage of `operator/`.,json_pointer__operator_add_binary} + + @complexity Linear in the length of @a ptr. + + @sa @ref operator/=(std::size_t) to append an array index + + @since version 3.6.0 + */ + friend json_pointer operator/(const json_pointer& ptr, std::size_t array_index) + { + return json_pointer(ptr) /= array_index; + } + + /*! + @brief returns the parent of this JSON pointer + + @return parent of this JSON pointer; in case this JSON pointer is the root, + the root itself is returned + + @complexity Linear in the length of the JSON pointer. + + @liveexample{The example shows the result of `parent_pointer` for different + JSON Pointers.,json_pointer__parent_pointer} + + @since version 3.6.0 + */ + json_pointer parent_pointer() const + { + if (empty()) + { + return *this; + } + + json_pointer res = *this; + res.pop_back(); + return res; + } + + /*! + @brief remove last reference token + + @pre not `empty()` + + @liveexample{The example shows the usage of `pop_back`.,json_pointer__pop_back} + + @complexity Constant. + + @throw out_of_range.405 if JSON pointer has no parent + + @since version 3.6.0 + */ + void pop_back() + { + if (JSON_UNLIKELY(empty())) + { + JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent")); + } + + reference_tokens.pop_back(); + } + + /*! + @brief return last reference token + + @pre not `empty()` + @return last reference token + + @liveexample{The example shows the usage of `back`.,json_pointer__back} + + @complexity Constant. + + @throw out_of_range.405 if JSON pointer has no parent + + @since version 3.6.0 + */ + const std::string& back() + { + if (JSON_UNLIKELY(empty())) + { + JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent")); + } + + return reference_tokens.back(); + } + + /*! + @brief append an unescaped token at the end of the reference pointer + + @param[in] token token to add + + @complexity Amortized constant. + + @liveexample{The example shows the result of `push_back` for different + JSON Pointers.,json_pointer__push_back} + + @since version 3.6.0 + */ + void push_back(const std::string& token) + { + reference_tokens.push_back(token); + } + + /// @copydoc push_back(const std::string&) + void push_back(std::string&& token) + { + reference_tokens.push_back(std::move(token)); + } + + /*! + @brief return whether pointer points to the root document + + @return true iff the JSON pointer points to the root document + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @liveexample{The example shows the result of `empty` for different JSON + Pointers.,json_pointer__empty} + + @since version 3.6.0 + */ + bool empty() const noexcept + { + return reference_tokens.empty(); + } + + private: + /*! + @param[in] s reference token to be converted into an array index + + @return integer representation of @a s + + @throw out_of_range.404 if string @a s could not be converted to an integer + */ + static int array_index(const std::string& s) + { + std::size_t processed_chars = 0; + const int res = std::stoi(s, &processed_chars); + + // check if the string was completely read + if (JSON_UNLIKELY(processed_chars != s.size())) + { + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + s + "'")); + } + + return res; + } + + json_pointer top() const + { + if (JSON_UNLIKELY(empty())) + { + JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent")); + } + + json_pointer result = *this; + result.reference_tokens = {reference_tokens[0]}; + return result; + } + + /*! + @brief create and return a reference to the pointed to value + + @complexity Linear in the number of reference tokens. + + @throw parse_error.109 if array index is not a number + @throw type_error.313 if value cannot be unflattened + */ + BasicJsonType& get_and_create(BasicJsonType& j) const + { + using size_type = typename BasicJsonType::size_type; + auto result = &j; + + // in case no reference tokens exist, return a reference to the JSON value + // j which will be overwritten by a primitive value + for (const auto& reference_token : reference_tokens) + { + switch (result->m_type) + { + case detail::value_t::null: + { + if (reference_token == "0") + { + // start a new array if reference token is 0 + result = &result->operator[](0); + } + else + { + // start a new object otherwise + result = &result->operator[](reference_token); + } + break; + } + + case detail::value_t::object: + { + // create an entry in the object + result = &result->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + // create an entry in the array + JSON_TRY + { + result = &result->operator[](static_cast<size_type>(array_index(reference_token))); + } + JSON_CATCH(std::invalid_argument&) + { + JSON_THROW(detail::parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); + } + break; + } + + /* + The following code is only reached if there exists a reference + token _and_ the current value is primitive. In this case, we have + an error situation, because primitive values may only occur as + single value; that is, with an empty list of reference tokens. + */ + default: + JSON_THROW(detail::type_error::create(313, "invalid value to unflatten")); + } + } + + return *result; + } + + /*! + @brief return a reference to the pointed to value + + @note This version does not throw if a value is not present, but tries to + create nested values instead. For instance, calling this function + with pointer `"/this/that"` on a null value is equivalent to calling + `operator[]("this").operator[]("that")` on that value, effectively + changing the null value to an object. + + @param[in] ptr a JSON value + + @return reference to the JSON value pointed to by the JSON pointer + + @complexity Linear in the length of the JSON pointer. + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + BasicJsonType& get_unchecked(BasicJsonType* ptr) const + { + using size_type = typename BasicJsonType::size_type; + for (const auto& reference_token : reference_tokens) + { + // convert null values to arrays or objects before continuing + if (ptr->m_type == detail::value_t::null) + { + // check if reference token is a number + const bool nums = + std::all_of(reference_token.begin(), reference_token.end(), + [](const char x) + { + return x >= '0' and x <= '9'; + }); + + // change value to array for numbers or "-" or to object otherwise + *ptr = (nums or reference_token == "-") + ? detail::value_t::array + : detail::value_t::object; + } + + switch (ptr->m_type) + { + case detail::value_t::object: + { + // use unchecked object access + ptr = &ptr->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0')) + { + JSON_THROW(detail::parse_error::create(106, 0, + "array index '" + reference_token + + "' must not begin with '0'")); + } + + if (reference_token == "-") + { + // explicitly treat "-" as index beyond the end + ptr = &ptr->operator[](ptr->m_value.array->size()); + } + else + { + // convert array index to number; unchecked access + JSON_TRY + { + ptr = &ptr->operator[]( + static_cast<size_type>(array_index(reference_token))); + } + JSON_CATCH(std::invalid_argument&) + { + JSON_THROW(detail::parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); + } + } + break; + } + + default: + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + reference_token + "'")); + } + } + + return *ptr; + } + + /*! + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + BasicJsonType& get_checked(BasicJsonType* ptr) const + { + using size_type = typename BasicJsonType::size_type; + for (const auto& reference_token : reference_tokens) + { + switch (ptr->m_type) + { + case detail::value_t::object: + { + // note: at performs range check + ptr = &ptr->at(reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_UNLIKELY(reference_token == "-")) + { + // "-" always fails the range check + JSON_THROW(detail::out_of_range::create(402, + "array index '-' (" + std::to_string(ptr->m_value.array->size()) + + ") is out of range")); + } + + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0')) + { + JSON_THROW(detail::parse_error::create(106, 0, + "array index '" + reference_token + + "' must not begin with '0'")); + } + + // note: at performs range check + JSON_TRY + { + ptr = &ptr->at(static_cast<size_type>(array_index(reference_token))); + } + JSON_CATCH(std::invalid_argument&) + { + JSON_THROW(detail::parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); + } + break; + } + + default: + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + reference_token + "'")); + } + } + + return *ptr; + } + + /*! + @brief return a const reference to the pointed to value + + @param[in] ptr a JSON value + + @return const reference to the JSON value pointed to by the JSON + pointer + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + const BasicJsonType& get_unchecked(const BasicJsonType* ptr) const + { + using size_type = typename BasicJsonType::size_type; + for (const auto& reference_token : reference_tokens) + { + switch (ptr->m_type) + { + case detail::value_t::object: + { + // use unchecked object access + ptr = &ptr->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_UNLIKELY(reference_token == "-")) + { + // "-" cannot be used for const access + JSON_THROW(detail::out_of_range::create(402, + "array index '-' (" + std::to_string(ptr->m_value.array->size()) + + ") is out of range")); + } + + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0')) + { + JSON_THROW(detail::parse_error::create(106, 0, + "array index '" + reference_token + + "' must not begin with '0'")); + } + + // use unchecked array access + JSON_TRY + { + ptr = &ptr->operator[]( + static_cast<size_type>(array_index(reference_token))); + } + JSON_CATCH(std::invalid_argument&) + { + JSON_THROW(detail::parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); + } + break; + } + + default: + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + reference_token + "'")); + } + } + + return *ptr; + } + + /*! + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + const BasicJsonType& get_checked(const BasicJsonType* ptr) const + { + using size_type = typename BasicJsonType::size_type; + for (const auto& reference_token : reference_tokens) + { + switch (ptr->m_type) + { + case detail::value_t::object: + { + // note: at performs range check + ptr = &ptr->at(reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_UNLIKELY(reference_token == "-")) + { + // "-" always fails the range check + JSON_THROW(detail::out_of_range::create(402, + "array index '-' (" + std::to_string(ptr->m_value.array->size()) + + ") is out of range")); + } + + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0')) + { + JSON_THROW(detail::parse_error::create(106, 0, + "array index '" + reference_token + + "' must not begin with '0'")); + } + + // note: at performs range check + JSON_TRY + { + ptr = &ptr->at(static_cast<size_type>(array_index(reference_token))); + } + JSON_CATCH(std::invalid_argument&) + { + JSON_THROW(detail::parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); + } + break; + } + + default: + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + reference_token + "'")); + } + } + + return *ptr; + } + + /*! + @brief split the string input to reference tokens + + @note This function is only called by the json_pointer constructor. + All exceptions below are documented there. + + @throw parse_error.107 if the pointer is not empty or begins with '/' + @throw parse_error.108 if character '~' is not followed by '0' or '1' + */ + static std::vector<std::string> split(const std::string& reference_string) + { + std::vector<std::string> result; + + // special case: empty reference string -> no reference tokens + if (reference_string.empty()) + { + return result; + } + + // check if nonempty reference string begins with slash + if (JSON_UNLIKELY(reference_string[0] != '/')) + { + JSON_THROW(detail::parse_error::create(107, 1, + "JSON pointer must be empty or begin with '/' - was: '" + + reference_string + "'")); + } + + // extract the reference tokens: + // - slash: position of the last read slash (or end of string) + // - start: position after the previous slash + for ( + // search for the first slash after the first character + std::size_t slash = reference_string.find_first_of('/', 1), + // set the beginning of the first reference token + start = 1; + // we can stop if start == 0 (if slash == std::string::npos) + start != 0; + // set the beginning of the next reference token + // (will eventually be 0 if slash == std::string::npos) + start = (slash == std::string::npos) ? 0 : slash + 1, + // find next slash + slash = reference_string.find_first_of('/', start)) + { + // use the text between the beginning of the reference token + // (start) and the last slash (slash). + auto reference_token = reference_string.substr(start, slash - start); + + // check reference tokens are properly escaped + for (std::size_t pos = reference_token.find_first_of('~'); + pos != std::string::npos; + pos = reference_token.find_first_of('~', pos + 1)) + { + assert(reference_token[pos] == '~'); + + // ~ must be followed by 0 or 1 + if (JSON_UNLIKELY(pos == reference_token.size() - 1 or + (reference_token[pos + 1] != '0' and + reference_token[pos + 1] != '1'))) + { + JSON_THROW(detail::parse_error::create(108, 0, "escape character '~' must be followed with '0' or '1'")); + } + } + + // finally, store the reference token + unescape(reference_token); + result.push_back(reference_token); + } + + return result; + } + + /*! + @brief replace all occurrences of a substring by another string + + @param[in,out] s the string to manipulate; changed so that all + occurrences of @a f are replaced with @a t + @param[in] f the substring to replace with @a t + @param[in] t the string to replace @a f + + @pre The search string @a f must not be empty. **This precondition is + enforced with an assertion.** + + @since version 2.0.0 + */ + static void replace_substring(std::string& s, const std::string& f, + const std::string& t) + { + assert(not f.empty()); + for (auto pos = s.find(f); // find first occurrence of f + pos != std::string::npos; // make sure f was found + s.replace(pos, f.size(), t), // replace with t, and + pos = s.find(f, pos + t.size())) // find next occurrence of f + {} + } + + /// escape "~" to "~0" and "/" to "~1" + static std::string escape(std::string s) + { + replace_substring(s, "~", "~0"); + replace_substring(s, "/", "~1"); + return s; + } + + /// unescape "~1" to tilde and "~0" to slash (order is important!) + static void unescape(std::string& s) + { + replace_substring(s, "~1", "/"); + replace_substring(s, "~0", "~"); + } + + /*! + @param[in] reference_string the reference string to the current value + @param[in] value the value to consider + @param[in,out] result the result object to insert values to + + @note Empty objects or arrays are flattened to `null`. + */ + static void flatten(const std::string& reference_string, + const BasicJsonType& value, + BasicJsonType& result) + { + switch (value.m_type) + { + case detail::value_t::array: + { + if (value.m_value.array->empty()) + { + // flatten empty array as null + result[reference_string] = nullptr; + } + else + { + // iterate array and use index as reference string + for (std::size_t i = 0; i < value.m_value.array->size(); ++i) + { + flatten(reference_string + "/" + std::to_string(i), + value.m_value.array->operator[](i), result); + } + } + break; + } + + case detail::value_t::object: + { + if (value.m_value.object->empty()) + { + // flatten empty object as null + result[reference_string] = nullptr; + } + else + { + // iterate object and use keys as reference string + for (const auto& element : *value.m_value.object) + { + flatten(reference_string + "/" + escape(element.first), element.second, result); + } + } + break; + } + + default: + { + // add primitive value with its reference string + result[reference_string] = value; + break; + } + } + } + + /*! + @param[in] value flattened JSON + + @return unflattened JSON + + @throw parse_error.109 if array index is not a number + @throw type_error.314 if value is not an object + @throw type_error.315 if object values are not primitive + @throw type_error.313 if value cannot be unflattened + */ + static BasicJsonType + unflatten(const BasicJsonType& value) + { + if (JSON_UNLIKELY(not value.is_object())) + { + JSON_THROW(detail::type_error::create(314, "only objects can be unflattened")); + } + + BasicJsonType result; + + // iterate the JSON object values + for (const auto& element : *value.m_value.object) + { + if (JSON_UNLIKELY(not element.second.is_primitive())) + { + JSON_THROW(detail::type_error::create(315, "values in object must be primitive")); + } + + // assign value to reference pointed to by JSON pointer; Note that if + // the JSON pointer is "" (i.e., points to the whole value), function + // get_and_create returns a reference to result itself. An assignment + // will then create a primitive value. + json_pointer(element.first).get_and_create(result) = element.second; + } + + return result; + } + + /*! + @brief compares two JSON pointers for equality + + @param[in] lhs JSON pointer to compare + @param[in] rhs JSON pointer to compare + @return whether @a lhs is equal to @a rhs + + @complexity Linear in the length of the JSON pointer + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + */ + friend bool operator==(json_pointer const& lhs, + json_pointer const& rhs) noexcept + { + return lhs.reference_tokens == rhs.reference_tokens; + } + + /*! + @brief compares two JSON pointers for inequality + + @param[in] lhs JSON pointer to compare + @param[in] rhs JSON pointer to compare + @return whether @a lhs is not equal @a rhs + + @complexity Linear in the length of the JSON pointer + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + */ + friend bool operator!=(json_pointer const& lhs, + json_pointer const& rhs) noexcept + { + return not (lhs == rhs); + } + + /// the reference tokens + std::vector<std::string> reference_tokens; +}; +} // namespace nlohmann + +// #include <nlohmann/detail/json_ref.hpp> + + +#include <initializer_list> +#include <utility> + +// #include <nlohmann/detail/meta/type_traits.hpp> + + +namespace nlohmann +{ +namespace detail +{ +template<typename BasicJsonType> +class json_ref +{ + public: + using value_type = BasicJsonType; + + json_ref(value_type&& value) + : owned_value(std::move(value)), value_ref(&owned_value), is_rvalue(true) + {} + + json_ref(const value_type& value) + : value_ref(const_cast<value_type*>(&value)), is_rvalue(false) + {} + + json_ref(std::initializer_list<json_ref> init) + : owned_value(init), value_ref(&owned_value), is_rvalue(true) + {} + + template < + class... Args, + enable_if_t<std::is_constructible<value_type, Args...>::value, int> = 0 > + json_ref(Args && ... args) + : owned_value(std::forward<Args>(args)...), value_ref(&owned_value), + is_rvalue(true) {} + + // class should be movable only + json_ref(json_ref&&) = default; + json_ref(const json_ref&) = delete; + json_ref& operator=(const json_ref&) = delete; + json_ref& operator=(json_ref&&) = delete; + ~json_ref() = default; + + value_type moved_or_copied() const + { + if (is_rvalue) + { + return std::move(*value_ref); + } + return *value_ref; + } + + value_type const& operator*() const + { + return *static_cast<value_type const*>(value_ref); + } + + value_type const* operator->() const + { + return static_cast<value_type const*>(value_ref); + } + + private: + mutable value_type owned_value = nullptr; + value_type* value_ref = nullptr; + const bool is_rvalue; +}; +} // namespace detail +} // namespace nlohmann + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/meta/cpp_future.hpp> + +// #include <nlohmann/detail/meta/type_traits.hpp> + +// #include <nlohmann/detail/output/binary_writer.hpp> + + +#include <algorithm> // reverse +#include <array> // array +#include <cstdint> // uint8_t, uint16_t, uint32_t, uint64_t +#include <cstring> // memcpy +#include <limits> // numeric_limits +#include <string> // string + +// #include <nlohmann/detail/input/binary_reader.hpp> + +// #include <nlohmann/detail/output/output_adapters.hpp> + + +#include <algorithm> // copy +#include <cstddef> // size_t +#include <ios> // streamsize +#include <iterator> // back_inserter +#include <memory> // shared_ptr, make_shared +#include <ostream> // basic_ostream +#include <string> // basic_string +#include <vector> // vector + +namespace nlohmann +{ +namespace detail +{ +/// abstract output adapter interface +template<typename CharType> struct output_adapter_protocol +{ + virtual void write_character(CharType c) = 0; + virtual void write_characters(const CharType* s, std::size_t length) = 0; + virtual ~output_adapter_protocol() = default; +}; + +/// a type to simplify interfaces +template<typename CharType> +using output_adapter_t = std::shared_ptr<output_adapter_protocol<CharType>>; + +/// output adapter for byte vectors +template<typename CharType> +class output_vector_adapter : public output_adapter_protocol<CharType> +{ + public: + explicit output_vector_adapter(std::vector<CharType>& vec) noexcept + : v(vec) + {} + + void write_character(CharType c) override + { + v.push_back(c); + } + + void write_characters(const CharType* s, std::size_t length) override + { + std::copy(s, s + length, std::back_inserter(v)); + } + + private: + std::vector<CharType>& v; +}; + +/// output adapter for output streams +template<typename CharType> +class output_stream_adapter : public output_adapter_protocol<CharType> +{ + public: + explicit output_stream_adapter(std::basic_ostream<CharType>& s) noexcept + : stream(s) + {} + + void write_character(CharType c) override + { + stream.put(c); + } + + void write_characters(const CharType* s, std::size_t length) override + { + stream.write(s, static_cast<std::streamsize>(length)); + } + + private: + std::basic_ostream<CharType>& stream; +}; + +/// output adapter for basic_string +template<typename CharType, typename StringType = std::basic_string<CharType>> +class output_string_adapter : public output_adapter_protocol<CharType> +{ + public: + explicit output_string_adapter(StringType& s) noexcept + : str(s) + {} + + void write_character(CharType c) override + { + str.push_back(c); + } + + void write_characters(const CharType* s, std::size_t length) override + { + str.append(s, length); + } + + private: + StringType& str; +}; + +template<typename CharType, typename StringType = std::basic_string<CharType>> +class output_adapter +{ + public: + output_adapter(std::vector<CharType>& vec) + : oa(std::make_shared<output_vector_adapter<CharType>>(vec)) {} + + output_adapter(std::basic_ostream<CharType>& s) + : oa(std::make_shared<output_stream_adapter<CharType>>(s)) {} + + output_adapter(StringType& s) + : oa(std::make_shared<output_string_adapter<CharType, StringType>>(s)) {} + + operator output_adapter_t<CharType>() + { + return oa; + } + + private: + output_adapter_t<CharType> oa = nullptr; +}; +} // namespace detail +} // namespace nlohmann + + +namespace nlohmann +{ +namespace detail +{ +/////////////////// +// binary writer // +/////////////////// + +/*! +@brief serialization to CBOR and MessagePack values +*/ +template<typename BasicJsonType, typename CharType> +class binary_writer +{ + using string_t = typename BasicJsonType::string_t; + + public: + /*! + @brief create a binary writer + + @param[in] adapter output adapter to write to + */ + explicit binary_writer(output_adapter_t<CharType> adapter) : oa(adapter) + { + assert(oa); + } + + /*! + @param[in] j JSON value to serialize + @pre j.type() == value_t::object + */ + void write_bson(const BasicJsonType& j) + { + switch (j.type()) + { + case value_t::object: + { + write_bson_object(*j.m_value.object); + break; + } + + default: + { + JSON_THROW(type_error::create(317, "to serialize to BSON, top-level type must be object, but is " + std::string(j.type_name()))); + } + } + } + + /*! + @param[in] j JSON value to serialize + */ + void write_cbor(const BasicJsonType& j) + { + switch (j.type()) + { + case value_t::null: + { + oa->write_character(to_char_type(0xF6)); + break; + } + + case value_t::boolean: + { + oa->write_character(j.m_value.boolean + ? to_char_type(0xF5) + : to_char_type(0xF4)); + break; + } + + case value_t::number_integer: + { + if (j.m_value.number_integer >= 0) + { + // CBOR does not differentiate between positive signed + // integers and unsigned integers. Therefore, we used the + // code from the value_t::number_unsigned case here. + if (j.m_value.number_integer <= 0x17) + { + write_number(static_cast<std::uint8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_integer <= (std::numeric_limits<std::uint8_t>::max)()) + { + oa->write_character(to_char_type(0x18)); + write_number(static_cast<std::uint8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_integer <= (std::numeric_limits<std::uint16_t>::max)()) + { + oa->write_character(to_char_type(0x19)); + write_number(static_cast<std::uint16_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_integer <= (std::numeric_limits<std::uint32_t>::max)()) + { + oa->write_character(to_char_type(0x1A)); + write_number(static_cast<std::uint32_t>(j.m_value.number_integer)); + } + else + { + oa->write_character(to_char_type(0x1B)); + write_number(static_cast<std::uint64_t>(j.m_value.number_integer)); + } + } + else + { + // The conversions below encode the sign in the first + // byte, and the value is converted to a positive number. + const auto positive_number = -1 - j.m_value.number_integer; + if (j.m_value.number_integer >= -24) + { + write_number(static_cast<std::uint8_t>(0x20 + positive_number)); + } + else if (positive_number <= (std::numeric_limits<std::uint8_t>::max)()) + { + oa->write_character(to_char_type(0x38)); + write_number(static_cast<std::uint8_t>(positive_number)); + } + else if (positive_number <= (std::numeric_limits<std::uint16_t>::max)()) + { + oa->write_character(to_char_type(0x39)); + write_number(static_cast<std::uint16_t>(positive_number)); + } + else if (positive_number <= (std::numeric_limits<std::uint32_t>::max)()) + { + oa->write_character(to_char_type(0x3A)); + write_number(static_cast<std::uint32_t>(positive_number)); + } + else + { + oa->write_character(to_char_type(0x3B)); + write_number(static_cast<std::uint64_t>(positive_number)); + } + } + break; + } + + case value_t::number_unsigned: + { + if (j.m_value.number_unsigned <= 0x17) + { + write_number(static_cast<std::uint8_t>(j.m_value.number_unsigned)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint8_t>::max)()) + { + oa->write_character(to_char_type(0x18)); + write_number(static_cast<std::uint8_t>(j.m_value.number_unsigned)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint16_t>::max)()) + { + oa->write_character(to_char_type(0x19)); + write_number(static_cast<std::uint16_t>(j.m_value.number_unsigned)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint32_t>::max)()) + { + oa->write_character(to_char_type(0x1A)); + write_number(static_cast<std::uint32_t>(j.m_value.number_unsigned)); + } + else + { + oa->write_character(to_char_type(0x1B)); + write_number(static_cast<std::uint64_t>(j.m_value.number_unsigned)); + } + break; + } + + case value_t::number_float: + { + oa->write_character(get_cbor_float_prefix(j.m_value.number_float)); + write_number(j.m_value.number_float); + break; + } + + case value_t::string: + { + // step 1: write control byte and the string length + const auto N = j.m_value.string->size(); + if (N <= 0x17) + { + write_number(static_cast<std::uint8_t>(0x60 + N)); + } + else if (N <= (std::numeric_limits<std::uint8_t>::max)()) + { + oa->write_character(to_char_type(0x78)); + write_number(static_cast<std::uint8_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint16_t>::max)()) + { + oa->write_character(to_char_type(0x79)); + write_number(static_cast<std::uint16_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint32_t>::max)()) + { + oa->write_character(to_char_type(0x7A)); + write_number(static_cast<std::uint32_t>(N)); + } + // LCOV_EXCL_START + else if (N <= (std::numeric_limits<std::uint64_t>::max)()) + { + oa->write_character(to_char_type(0x7B)); + write_number(static_cast<std::uint64_t>(N)); + } + // LCOV_EXCL_STOP + + // step 2: write the string + oa->write_characters( + reinterpret_cast<const CharType*>(j.m_value.string->c_str()), + j.m_value.string->size()); + break; + } + + case value_t::array: + { + // step 1: write control byte and the array size + const auto N = j.m_value.array->size(); + if (N <= 0x17) + { + write_number(static_cast<std::uint8_t>(0x80 + N)); + } + else if (N <= (std::numeric_limits<std::uint8_t>::max)()) + { + oa->write_character(to_char_type(0x98)); + write_number(static_cast<std::uint8_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint16_t>::max)()) + { + oa->write_character(to_char_type(0x99)); + write_number(static_cast<std::uint16_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint32_t>::max)()) + { + oa->write_character(to_char_type(0x9A)); + write_number(static_cast<std::uint32_t>(N)); + } + // LCOV_EXCL_START + else if (N <= (std::numeric_limits<std::uint64_t>::max)()) + { + oa->write_character(to_char_type(0x9B)); + write_number(static_cast<std::uint64_t>(N)); + } + // LCOV_EXCL_STOP + + // step 2: write each element + for (const auto& el : *j.m_value.array) + { + write_cbor(el); + } + break; + } + + case value_t::object: + { + // step 1: write control byte and the object size + const auto N = j.m_value.object->size(); + if (N <= 0x17) + { + write_number(static_cast<std::uint8_t>(0xA0 + N)); + } + else if (N <= (std::numeric_limits<std::uint8_t>::max)()) + { + oa->write_character(to_char_type(0xB8)); + write_number(static_cast<std::uint8_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint16_t>::max)()) + { + oa->write_character(to_char_type(0xB9)); + write_number(static_cast<std::uint16_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint32_t>::max)()) + { + oa->write_character(to_char_type(0xBA)); + write_number(static_cast<std::uint32_t>(N)); + } + // LCOV_EXCL_START + else if (N <= (std::numeric_limits<std::uint64_t>::max)()) + { + oa->write_character(to_char_type(0xBB)); + write_number(static_cast<std::uint64_t>(N)); + } + // LCOV_EXCL_STOP + + // step 2: write each element + for (const auto& el : *j.m_value.object) + { + write_cbor(el.first); + write_cbor(el.second); + } + break; + } + + default: + break; + } + } + + /*! + @param[in] j JSON value to serialize + */ + void write_msgpack(const BasicJsonType& j) + { + switch (j.type()) + { + case value_t::null: // nil + { + oa->write_character(to_char_type(0xC0)); + break; + } + + case value_t::boolean: // true and false + { + oa->write_character(j.m_value.boolean + ? to_char_type(0xC3) + : to_char_type(0xC2)); + break; + } + + case value_t::number_integer: + { + if (j.m_value.number_integer >= 0) + { + // MessagePack does not differentiate between positive + // signed integers and unsigned integers. Therefore, we used + // the code from the value_t::number_unsigned case here. + if (j.m_value.number_unsigned < 128) + { + // positive fixnum + write_number(static_cast<std::uint8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint8_t>::max)()) + { + // uint 8 + oa->write_character(to_char_type(0xCC)); + write_number(static_cast<std::uint8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint16_t>::max)()) + { + // uint 16 + oa->write_character(to_char_type(0xCD)); + write_number(static_cast<std::uint16_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint32_t>::max)()) + { + // uint 32 + oa->write_character(to_char_type(0xCE)); + write_number(static_cast<std::uint32_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint64_t>::max)()) + { + // uint 64 + oa->write_character(to_char_type(0xCF)); + write_number(static_cast<std::uint64_t>(j.m_value.number_integer)); + } + } + else + { + if (j.m_value.number_integer >= -32) + { + // negative fixnum + write_number(static_cast<std::int8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_integer >= (std::numeric_limits<std::int8_t>::min)() and + j.m_value.number_integer <= (std::numeric_limits<std::int8_t>::max)()) + { + // int 8 + oa->write_character(to_char_type(0xD0)); + write_number(static_cast<std::int8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_integer >= (std::numeric_limits<std::int16_t>::min)() and + j.m_value.number_integer <= (std::numeric_limits<std::int16_t>::max)()) + { + // int 16 + oa->write_character(to_char_type(0xD1)); + write_number(static_cast<std::int16_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_integer >= (std::numeric_limits<std::int32_t>::min)() and + j.m_value.number_integer <= (std::numeric_limits<std::int32_t>::max)()) + { + // int 32 + oa->write_character(to_char_type(0xD2)); + write_number(static_cast<std::int32_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_integer >= (std::numeric_limits<std::int64_t>::min)() and + j.m_value.number_integer <= (std::numeric_limits<std::int64_t>::max)()) + { + // int 64 + oa->write_character(to_char_type(0xD3)); + write_number(static_cast<std::int64_t>(j.m_value.number_integer)); + } + } + break; + } + + case value_t::number_unsigned: + { + if (j.m_value.number_unsigned < 128) + { + // positive fixnum + write_number(static_cast<std::uint8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint8_t>::max)()) + { + // uint 8 + oa->write_character(to_char_type(0xCC)); + write_number(static_cast<std::uint8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint16_t>::max)()) + { + // uint 16 + oa->write_character(to_char_type(0xCD)); + write_number(static_cast<std::uint16_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint32_t>::max)()) + { + // uint 32 + oa->write_character(to_char_type(0xCE)); + write_number(static_cast<std::uint32_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint64_t>::max)()) + { + // uint 64 + oa->write_character(to_char_type(0xCF)); + write_number(static_cast<std::uint64_t>(j.m_value.number_integer)); + } + break; + } + + case value_t::number_float: + { + oa->write_character(get_msgpack_float_prefix(j.m_value.number_float)); + write_number(j.m_value.number_float); + break; + } + + case value_t::string: + { + // step 1: write control byte and the string length + const auto N = j.m_value.string->size(); + if (N <= 31) + { + // fixstr + write_number(static_cast<std::uint8_t>(0xA0 | N)); + } + else if (N <= (std::numeric_limits<std::uint8_t>::max)()) + { + // str 8 + oa->write_character(to_char_type(0xD9)); + write_number(static_cast<std::uint8_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint16_t>::max)()) + { + // str 16 + oa->write_character(to_char_type(0xDA)); + write_number(static_cast<std::uint16_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint32_t>::max)()) + { + // str 32 + oa->write_character(to_char_type(0xDB)); + write_number(static_cast<std::uint32_t>(N)); + } + + // step 2: write the string + oa->write_characters( + reinterpret_cast<const CharType*>(j.m_value.string->c_str()), + j.m_value.string->size()); + break; + } + + case value_t::array: + { + // step 1: write control byte and the array size + const auto N = j.m_value.array->size(); + if (N <= 15) + { + // fixarray + write_number(static_cast<std::uint8_t>(0x90 | N)); + } + else if (N <= (std::numeric_limits<std::uint16_t>::max)()) + { + // array 16 + oa->write_character(to_char_type(0xDC)); + write_number(static_cast<std::uint16_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint32_t>::max)()) + { + // array 32 + oa->write_character(to_char_type(0xDD)); + write_number(static_cast<std::uint32_t>(N)); + } + + // step 2: write each element + for (const auto& el : *j.m_value.array) + { + write_msgpack(el); + } + break; + } + + case value_t::object: + { + // step 1: write control byte and the object size + const auto N = j.m_value.object->size(); + if (N <= 15) + { + // fixmap + write_number(static_cast<std::uint8_t>(0x80 | (N & 0xF))); + } + else if (N <= (std::numeric_limits<std::uint16_t>::max)()) + { + // map 16 + oa->write_character(to_char_type(0xDE)); + write_number(static_cast<std::uint16_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint32_t>::max)()) + { + // map 32 + oa->write_character(to_char_type(0xDF)); + write_number(static_cast<std::uint32_t>(N)); + } + + // step 2: write each element + for (const auto& el : *j.m_value.object) + { + write_msgpack(el.first); + write_msgpack(el.second); + } + break; + } + + default: + break; + } + } + + /*! + @param[in] j JSON value to serialize + @param[in] use_count whether to use '#' prefixes (optimized format) + @param[in] use_type whether to use '$' prefixes (optimized format) + @param[in] add_prefix whether prefixes need to be used for this value + */ + void write_ubjson(const BasicJsonType& j, const bool use_count, + const bool use_type, const bool add_prefix = true) + { + switch (j.type()) + { + case value_t::null: + { + if (add_prefix) + { + oa->write_character(to_char_type('Z')); + } + break; + } + + case value_t::boolean: + { + if (add_prefix) + { + oa->write_character(j.m_value.boolean + ? to_char_type('T') + : to_char_type('F')); + } + break; + } + + case value_t::number_integer: + { + write_number_with_ubjson_prefix(j.m_value.number_integer, add_prefix); + break; + } + + case value_t::number_unsigned: + { + write_number_with_ubjson_prefix(j.m_value.number_unsigned, add_prefix); + break; + } + + case value_t::number_float: + { + write_number_with_ubjson_prefix(j.m_value.number_float, add_prefix); + break; + } + + case value_t::string: + { + if (add_prefix) + { + oa->write_character(to_char_type('S')); + } + write_number_with_ubjson_prefix(j.m_value.string->size(), true); + oa->write_characters( + reinterpret_cast<const CharType*>(j.m_value.string->c_str()), + j.m_value.string->size()); + break; + } + + case value_t::array: + { + if (add_prefix) + { + oa->write_character(to_char_type('[')); + } + + bool prefix_required = true; + if (use_type and not j.m_value.array->empty()) + { + assert(use_count); + const CharType first_prefix = ubjson_prefix(j.front()); + const bool same_prefix = std::all_of(j.begin() + 1, j.end(), + [this, first_prefix](const BasicJsonType & v) + { + return ubjson_prefix(v) == first_prefix; + }); + + if (same_prefix) + { + prefix_required = false; + oa->write_character(to_char_type('$')); + oa->write_character(first_prefix); + } + } + + if (use_count) + { + oa->write_character(to_char_type('#')); + write_number_with_ubjson_prefix(j.m_value.array->size(), true); + } + + for (const auto& el : *j.m_value.array) + { + write_ubjson(el, use_count, use_type, prefix_required); + } + + if (not use_count) + { + oa->write_character(to_char_type(']')); + } + + break; + } + + case value_t::object: + { + if (add_prefix) + { + oa->write_character(to_char_type('{')); + } + + bool prefix_required = true; + if (use_type and not j.m_value.object->empty()) + { + assert(use_count); + const CharType first_prefix = ubjson_prefix(j.front()); + const bool same_prefix = std::all_of(j.begin(), j.end(), + [this, first_prefix](const BasicJsonType & v) + { + return ubjson_prefix(v) == first_prefix; + }); + + if (same_prefix) + { + prefix_required = false; + oa->write_character(to_char_type('$')); + oa->write_character(first_prefix); + } + } + + if (use_count) + { + oa->write_character(to_char_type('#')); + write_number_with_ubjson_prefix(j.m_value.object->size(), true); + } + + for (const auto& el : *j.m_value.object) + { + write_number_with_ubjson_prefix(el.first.size(), true); + oa->write_characters( + reinterpret_cast<const CharType*>(el.first.c_str()), + el.first.size()); + write_ubjson(el.second, use_count, use_type, prefix_required); + } + + if (not use_count) + { + oa->write_character(to_char_type('}')); + } + + break; + } + + default: + break; + } + } + + private: + ////////// + // BSON // + ////////// + + /*! + @return The size of a BSON document entry header, including the id marker + and the entry name size (and its null-terminator). + */ + static std::size_t calc_bson_entry_header_size(const string_t& name) + { + const auto it = name.find(static_cast<typename string_t::value_type>(0)); + if (JSON_UNLIKELY(it != BasicJsonType::string_t::npos)) + { + JSON_THROW(out_of_range::create(409, + "BSON key cannot contain code point U+0000 (at byte " + std::to_string(it) + ")")); + } + + return /*id*/ 1ul + name.size() + /*zero-terminator*/1u; + } + + /*! + @brief Writes the given @a element_type and @a name to the output adapter + */ + void write_bson_entry_header(const string_t& name, + const std::uint8_t element_type) + { + oa->write_character(to_char_type(element_type)); // boolean + oa->write_characters( + reinterpret_cast<const CharType*>(name.c_str()), + name.size() + 1u); + } + + /*! + @brief Writes a BSON element with key @a name and boolean value @a value + */ + void write_bson_boolean(const string_t& name, + const bool value) + { + write_bson_entry_header(name, 0x08); + oa->write_character(value ? to_char_type(0x01) : to_char_type(0x00)); + } + + /*! + @brief Writes a BSON element with key @a name and double value @a value + */ + void write_bson_double(const string_t& name, + const double value) + { + write_bson_entry_header(name, 0x01); + write_number<double, true>(value); + } + + /*! + @return The size of the BSON-encoded string in @a value + */ + static std::size_t calc_bson_string_size(const string_t& value) + { + return sizeof(std::int32_t) + value.size() + 1ul; + } + + /*! + @brief Writes a BSON element with key @a name and string value @a value + */ + void write_bson_string(const string_t& name, + const string_t& value) + { + write_bson_entry_header(name, 0x02); + + write_number<std::int32_t, true>(static_cast<std::int32_t>(value.size() + 1ul)); + oa->write_characters( + reinterpret_cast<const CharType*>(value.c_str()), + value.size() + 1); + } + + /*! + @brief Writes a BSON element with key @a name and null value + */ + void write_bson_null(const string_t& name) + { + write_bson_entry_header(name, 0x0A); + } + + /*! + @return The size of the BSON-encoded integer @a value + */ + static std::size_t calc_bson_integer_size(const std::int64_t value) + { + return (std::numeric_limits<std::int32_t>::min)() <= value and value <= (std::numeric_limits<std::int32_t>::max)() + ? sizeof(std::int32_t) + : sizeof(std::int64_t); + } + + /*! + @brief Writes a BSON element with key @a name and integer @a value + */ + void write_bson_integer(const string_t& name, + const std::int64_t value) + { + if ((std::numeric_limits<std::int32_t>::min)() <= value and value <= (std::numeric_limits<std::int32_t>::max)()) + { + write_bson_entry_header(name, 0x10); // int32 + write_number<std::int32_t, true>(static_cast<std::int32_t>(value)); + } + else + { + write_bson_entry_header(name, 0x12); // int64 + write_number<std::int64_t, true>(static_cast<std::int64_t>(value)); + } + } + + /*! + @return The size of the BSON-encoded unsigned integer in @a j + */ + static constexpr std::size_t calc_bson_unsigned_size(const std::uint64_t value) noexcept + { + return (value <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)())) + ? sizeof(std::int32_t) + : sizeof(std::int64_t); + } + + /*! + @brief Writes a BSON element with key @a name and unsigned @a value + */ + void write_bson_unsigned(const string_t& name, + const std::uint64_t value) + { + if (value <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)())) + { + write_bson_entry_header(name, 0x10 /* int32 */); + write_number<std::int32_t, true>(static_cast<std::int32_t>(value)); + } + else if (value <= static_cast<std::uint64_t>((std::numeric_limits<std::int64_t>::max)())) + { + write_bson_entry_header(name, 0x12 /* int64 */); + write_number<std::int64_t, true>(static_cast<std::int64_t>(value)); + } + else + { + JSON_THROW(out_of_range::create(407, "integer number " + std::to_string(value) + " cannot be represented by BSON as it does not fit int64")); + } + } + + /*! + @brief Writes a BSON element with key @a name and object @a value + */ + void write_bson_object_entry(const string_t& name, + const typename BasicJsonType::object_t& value) + { + write_bson_entry_header(name, 0x03); // object + write_bson_object(value); + } + + /*! + @return The size of the BSON-encoded array @a value + */ + static std::size_t calc_bson_array_size(const typename BasicJsonType::array_t& value) + { + std::size_t embedded_document_size = 0ul; + std::size_t array_index = 0ul; + + for (const auto& el : value) + { + embedded_document_size += calc_bson_element_size(std::to_string(array_index++), el); + } + + return sizeof(std::int32_t) + embedded_document_size + 1ul; + } + + /*! + @brief Writes a BSON element with key @a name and array @a value + */ + void write_bson_array(const string_t& name, + const typename BasicJsonType::array_t& value) + { + write_bson_entry_header(name, 0x04); // array + write_number<std::int32_t, true>(static_cast<std::int32_t>(calc_bson_array_size(value))); + + std::size_t array_index = 0ul; + + for (const auto& el : value) + { + write_bson_element(std::to_string(array_index++), el); + } + + oa->write_character(to_char_type(0x00)); + } + + /*! + @brief Calculates the size necessary to serialize the JSON value @a j with its @a name + @return The calculated size for the BSON document entry for @a j with the given @a name. + */ + static std::size_t calc_bson_element_size(const string_t& name, + const BasicJsonType& j) + { + const auto header_size = calc_bson_entry_header_size(name); + switch (j.type()) + { + case value_t::object: + return header_size + calc_bson_object_size(*j.m_value.object); + + case value_t::array: + return header_size + calc_bson_array_size(*j.m_value.array); + + case value_t::boolean: + return header_size + 1ul; + + case value_t::number_float: + return header_size + 8ul; + + case value_t::number_integer: + return header_size + calc_bson_integer_size(j.m_value.number_integer); + + case value_t::number_unsigned: + return header_size + calc_bson_unsigned_size(j.m_value.number_unsigned); + + case value_t::string: + return header_size + calc_bson_string_size(*j.m_value.string); + + case value_t::null: + return header_size + 0ul; + + // LCOV_EXCL_START + default: + assert(false); + return 0ul; + // LCOV_EXCL_STOP + } + } + + /*! + @brief Serializes the JSON value @a j to BSON and associates it with the + key @a name. + @param name The name to associate with the JSON entity @a j within the + current BSON document + @return The size of the BSON entry + */ + void write_bson_element(const string_t& name, + const BasicJsonType& j) + { + switch (j.type()) + { + case value_t::object: + return write_bson_object_entry(name, *j.m_value.object); + + case value_t::array: + return write_bson_array(name, *j.m_value.array); + + case value_t::boolean: + return write_bson_boolean(name, j.m_value.boolean); + + case value_t::number_float: + return write_bson_double(name, j.m_value.number_float); + + case value_t::number_integer: + return write_bson_integer(name, j.m_value.number_integer); + + case value_t::number_unsigned: + return write_bson_unsigned(name, j.m_value.number_unsigned); + + case value_t::string: + return write_bson_string(name, *j.m_value.string); + + case value_t::null: + return write_bson_null(name); + + // LCOV_EXCL_START + default: + assert(false); + return; + // LCOV_EXCL_STOP + } + } + + /*! + @brief Calculates the size of the BSON serialization of the given + JSON-object @a j. + @param[in] j JSON value to serialize + @pre j.type() == value_t::object + */ + static std::size_t calc_bson_object_size(const typename BasicJsonType::object_t& value) + { + std::size_t document_size = std::accumulate(value.begin(), value.end(), 0ul, + [](size_t result, const typename BasicJsonType::object_t::value_type & el) + { + return result += calc_bson_element_size(el.first, el.second); + }); + + return sizeof(std::int32_t) + document_size + 1ul; + } + + /*! + @param[in] j JSON value to serialize + @pre j.type() == value_t::object + */ + void write_bson_object(const typename BasicJsonType::object_t& value) + { + write_number<std::int32_t, true>(static_cast<std::int32_t>(calc_bson_object_size(value))); + + for (const auto& el : value) + { + write_bson_element(el.first, el.second); + } + + oa->write_character(to_char_type(0x00)); + } + + ////////// + // CBOR // + ////////// + + static constexpr CharType get_cbor_float_prefix(float /*unused*/) + { + return to_char_type(0xFA); // Single-Precision Float + } + + static constexpr CharType get_cbor_float_prefix(double /*unused*/) + { + return to_char_type(0xFB); // Double-Precision Float + } + + ///////////// + // MsgPack // + ///////////// + + static constexpr CharType get_msgpack_float_prefix(float /*unused*/) + { + return to_char_type(0xCA); // float 32 + } + + static constexpr CharType get_msgpack_float_prefix(double /*unused*/) + { + return to_char_type(0xCB); // float 64 + } + + //////////// + // UBJSON // + //////////// + + // UBJSON: write number (floating point) + template<typename NumberType, typename std::enable_if< + std::is_floating_point<NumberType>::value, int>::type = 0> + void write_number_with_ubjson_prefix(const NumberType n, + const bool add_prefix) + { + if (add_prefix) + { + oa->write_character(get_ubjson_float_prefix(n)); + } + write_number(n); + } + + // UBJSON: write number (unsigned integer) + template<typename NumberType, typename std::enable_if< + std::is_unsigned<NumberType>::value, int>::type = 0> + void write_number_with_ubjson_prefix(const NumberType n, + const bool add_prefix) + { + if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int8_t>::max)())) + { + if (add_prefix) + { + oa->write_character(to_char_type('i')); // int8 + } + write_number(static_cast<std::uint8_t>(n)); + } + else if (n <= (std::numeric_limits<std::uint8_t>::max)()) + { + if (add_prefix) + { + oa->write_character(to_char_type('U')); // uint8 + } + write_number(static_cast<std::uint8_t>(n)); + } + else if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int16_t>::max)())) + { + if (add_prefix) + { + oa->write_character(to_char_type('I')); // int16 + } + write_number(static_cast<std::int16_t>(n)); + } + else if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)())) + { + if (add_prefix) + { + oa->write_character(to_char_type('l')); // int32 + } + write_number(static_cast<std::int32_t>(n)); + } + else if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int64_t>::max)())) + { + if (add_prefix) + { + oa->write_character(to_char_type('L')); // int64 + } + write_number(static_cast<std::int64_t>(n)); + } + else + { + JSON_THROW(out_of_range::create(407, "integer number " + std::to_string(n) + " cannot be represented by UBJSON as it does not fit int64")); + } + } + + // UBJSON: write number (signed integer) + template<typename NumberType, typename std::enable_if< + std::is_signed<NumberType>::value and + not std::is_floating_point<NumberType>::value, int>::type = 0> + void write_number_with_ubjson_prefix(const NumberType n, + const bool add_prefix) + { + if ((std::numeric_limits<std::int8_t>::min)() <= n and n <= (std::numeric_limits<std::int8_t>::max)()) + { + if (add_prefix) + { + oa->write_character(to_char_type('i')); // int8 + } + write_number(static_cast<std::int8_t>(n)); + } + else if (static_cast<std::int64_t>((std::numeric_limits<std::uint8_t>::min)()) <= n and n <= static_cast<std::int64_t>((std::numeric_limits<std::uint8_t>::max)())) + { + if (add_prefix) + { + oa->write_character(to_char_type('U')); // uint8 + } + write_number(static_cast<std::uint8_t>(n)); + } + else if ((std::numeric_limits<std::int16_t>::min)() <= n and n <= (std::numeric_limits<std::int16_t>::max)()) + { + if (add_prefix) + { + oa->write_character(to_char_type('I')); // int16 + } + write_number(static_cast<std::int16_t>(n)); + } + else if ((std::numeric_limits<std::int32_t>::min)() <= n and n <= (std::numeric_limits<std::int32_t>::max)()) + { + if (add_prefix) + { + oa->write_character(to_char_type('l')); // int32 + } + write_number(static_cast<std::int32_t>(n)); + } + else if ((std::numeric_limits<std::int64_t>::min)() <= n and n <= (std::numeric_limits<std::int64_t>::max)()) + { + if (add_prefix) + { + oa->write_character(to_char_type('L')); // int64 + } + write_number(static_cast<std::int64_t>(n)); + } + // LCOV_EXCL_START + else + { + JSON_THROW(out_of_range::create(407, "integer number " + std::to_string(n) + " cannot be represented by UBJSON as it does not fit int64")); + } + // LCOV_EXCL_STOP + } + + /*! + @brief determine the type prefix of container values + + @note This function does not need to be 100% accurate when it comes to + integer limits. In case a number exceeds the limits of int64_t, + this will be detected by a later call to function + write_number_with_ubjson_prefix. Therefore, we return 'L' for any + value that does not fit the previous limits. + */ + CharType ubjson_prefix(const BasicJsonType& j) const noexcept + { + switch (j.type()) + { + case value_t::null: + return 'Z'; + + case value_t::boolean: + return j.m_value.boolean ? 'T' : 'F'; + + case value_t::number_integer: + { + if ((std::numeric_limits<std::int8_t>::min)() <= j.m_value.number_integer and j.m_value.number_integer <= (std::numeric_limits<std::int8_t>::max)()) + { + return 'i'; + } + if ((std::numeric_limits<std::uint8_t>::min)() <= j.m_value.number_integer and j.m_value.number_integer <= (std::numeric_limits<std::uint8_t>::max)()) + { + return 'U'; + } + if ((std::numeric_limits<std::int16_t>::min)() <= j.m_value.number_integer and j.m_value.number_integer <= (std::numeric_limits<std::int16_t>::max)()) + { + return 'I'; + } + if ((std::numeric_limits<std::int32_t>::min)() <= j.m_value.number_integer and j.m_value.number_integer <= (std::numeric_limits<std::int32_t>::max)()) + { + return 'l'; + } + // no check and assume int64_t (see note above) + return 'L'; + } + + case value_t::number_unsigned: + { + if (j.m_value.number_unsigned <= (std::numeric_limits<std::int8_t>::max)()) + { + return 'i'; + } + if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint8_t>::max)()) + { + return 'U'; + } + if (j.m_value.number_unsigned <= (std::numeric_limits<std::int16_t>::max)()) + { + return 'I'; + } + if (j.m_value.number_unsigned <= (std::numeric_limits<std::int32_t>::max)()) + { + return 'l'; + } + // no check and assume int64_t (see note above) + return 'L'; + } + + case value_t::number_float: + return get_ubjson_float_prefix(j.m_value.number_float); + + case value_t::string: + return 'S'; + + case value_t::array: + return '['; + + case value_t::object: + return '{'; + + default: // discarded values + return 'N'; + } + } + + static constexpr CharType get_ubjson_float_prefix(float /*unused*/) + { + return 'd'; // float 32 + } + + static constexpr CharType get_ubjson_float_prefix(double /*unused*/) + { + return 'D'; // float 64 + } + + /////////////////////// + // Utility functions // + /////////////////////// + + /* + @brief write a number to output input + @param[in] n number of type @a NumberType + @tparam NumberType the type of the number + @tparam OutputIsLittleEndian Set to true if output data is + required to be little endian + + @note This function needs to respect the system's endianess, because bytes + in CBOR, MessagePack, and UBJSON are stored in network order (big + endian) and therefore need reordering on little endian systems. + */ + template<typename NumberType, bool OutputIsLittleEndian = false> + void write_number(const NumberType n) + { + // step 1: write number to array of length NumberType + std::array<CharType, sizeof(NumberType)> vec; + std::memcpy(vec.data(), &n, sizeof(NumberType)); + + // step 2: write array to output (with possible reordering) + if (is_little_endian != OutputIsLittleEndian) + { + // reverse byte order prior to conversion if necessary + std::reverse(vec.begin(), vec.end()); + } + + oa->write_characters(vec.data(), sizeof(NumberType)); + } + + public: + // The following to_char_type functions are implement the conversion + // between uint8_t and CharType. In case CharType is not unsigned, + // such a conversion is required to allow values greater than 128. + // See <https://github.com/nlohmann/json/issues/1286> for a discussion. + template < typename C = CharType, + enable_if_t < std::is_signed<C>::value and std::is_signed<char>::value > * = nullptr > + static constexpr CharType to_char_type(std::uint8_t x) noexcept + { + return *reinterpret_cast<char*>(&x); + } + + template < typename C = CharType, + enable_if_t < std::is_signed<C>::value and std::is_unsigned<char>::value > * = nullptr > + static CharType to_char_type(std::uint8_t x) noexcept + { + static_assert(sizeof(std::uint8_t) == sizeof(CharType), "size of CharType must be equal to std::uint8_t"); + static_assert(std::is_pod<CharType>::value, "CharType must be POD"); + CharType result; + std::memcpy(&result, &x, sizeof(x)); + return result; + } + + template<typename C = CharType, + enable_if_t<std::is_unsigned<C>::value>* = nullptr> + static constexpr CharType to_char_type(std::uint8_t x) noexcept + { + return x; + } + + template < typename InputCharType, typename C = CharType, + enable_if_t < + std::is_signed<C>::value and + std::is_signed<char>::value and + std::is_same<char, typename std::remove_cv<InputCharType>::type>::value + > * = nullptr > + static constexpr CharType to_char_type(InputCharType x) noexcept + { + return x; + } + + private: + /// whether we can assume little endianess + const bool is_little_endian = binary_reader<BasicJsonType>::little_endianess(); + + /// the output + output_adapter_t<CharType> oa = nullptr; +}; +} // namespace detail +} // namespace nlohmann + +// #include <nlohmann/detail/output/output_adapters.hpp> + +// #include <nlohmann/detail/output/serializer.hpp> + + +#include <algorithm> // reverse, remove, fill, find, none_of +#include <array> // array +#include <cassert> // assert +#include <ciso646> // and, or +#include <clocale> // localeconv, lconv +#include <cmath> // labs, isfinite, isnan, signbit +#include <cstddef> // size_t, ptrdiff_t +#include <cstdint> // uint8_t +#include <cstdio> // snprintf +#include <limits> // numeric_limits +#include <string> // string +#include <type_traits> // is_same +#include <utility> // move + +// #include <nlohmann/detail/conversions/to_chars.hpp> + + +#include <array> // array +#include <cassert> // assert +#include <ciso646> // or, and, not +#include <cmath> // signbit, isfinite +#include <cstdint> // intN_t, uintN_t +#include <cstring> // memcpy, memmove +#include <limits> // numeric_limits +#include <type_traits> // conditional + +namespace nlohmann +{ +namespace detail +{ + +/*! +@brief implements the Grisu2 algorithm for binary to decimal floating-point +conversion. + +This implementation is a slightly modified version of the reference +implementation which may be obtained from +http://florian.loitsch.com/publications (bench.tar.gz). + +The code is distributed under the MIT license, Copyright (c) 2009 Florian Loitsch. + +For a detailed description of the algorithm see: + +[1] Loitsch, "Printing Floating-Point Numbers Quickly and Accurately with + Integers", Proceedings of the ACM SIGPLAN 2010 Conference on Programming + Language Design and Implementation, PLDI 2010 +[2] Burger, Dybvig, "Printing Floating-Point Numbers Quickly and Accurately", + Proceedings of the ACM SIGPLAN 1996 Conference on Programming Language + Design and Implementation, PLDI 1996 +*/ +namespace dtoa_impl +{ + +template <typename Target, typename Source> +Target reinterpret_bits(const Source source) +{ + static_assert(sizeof(Target) == sizeof(Source), "size mismatch"); + + Target target; + std::memcpy(&target, &source, sizeof(Source)); + return target; +} + +struct diyfp // f * 2^e +{ + static constexpr int kPrecision = 64; // = q + + std::uint64_t f = 0; + int e = 0; + + constexpr diyfp(std::uint64_t f_, int e_) noexcept : f(f_), e(e_) {} + + /*! + @brief returns x - y + @pre x.e == y.e and x.f >= y.f + */ + static diyfp sub(const diyfp& x, const diyfp& y) noexcept + { + assert(x.e == y.e); + assert(x.f >= y.f); + + return {x.f - y.f, x.e}; + } + + /*! + @brief returns x * y + @note The result is rounded. (Only the upper q bits are returned.) + */ + static diyfp mul(const diyfp& x, const diyfp& y) noexcept + { + static_assert(kPrecision == 64, "internal error"); + + // Computes: + // f = round((x.f * y.f) / 2^q) + // e = x.e + y.e + q + + // Emulate the 64-bit * 64-bit multiplication: + // + // p = u * v + // = (u_lo + 2^32 u_hi) (v_lo + 2^32 v_hi) + // = (u_lo v_lo ) + 2^32 ((u_lo v_hi ) + (u_hi v_lo )) + 2^64 (u_hi v_hi ) + // = (p0 ) + 2^32 ((p1 ) + (p2 )) + 2^64 (p3 ) + // = (p0_lo + 2^32 p0_hi) + 2^32 ((p1_lo + 2^32 p1_hi) + (p2_lo + 2^32 p2_hi)) + 2^64 (p3 ) + // = (p0_lo ) + 2^32 (p0_hi + p1_lo + p2_lo ) + 2^64 (p1_hi + p2_hi + p3) + // = (p0_lo ) + 2^32 (Q ) + 2^64 (H ) + // = (p0_lo ) + 2^32 (Q_lo + 2^32 Q_hi ) + 2^64 (H ) + // + // (Since Q might be larger than 2^32 - 1) + // + // = (p0_lo + 2^32 Q_lo) + 2^64 (Q_hi + H) + // + // (Q_hi + H does not overflow a 64-bit int) + // + // = p_lo + 2^64 p_hi + + const std::uint64_t u_lo = x.f & 0xFFFFFFFFu; + const std::uint64_t u_hi = x.f >> 32u; + const std::uint64_t v_lo = y.f & 0xFFFFFFFFu; + const std::uint64_t v_hi = y.f >> 32u; + + const std::uint64_t p0 = u_lo * v_lo; + const std::uint64_t p1 = u_lo * v_hi; + const std::uint64_t p2 = u_hi * v_lo; + const std::uint64_t p3 = u_hi * v_hi; + + const std::uint64_t p0_hi = p0 >> 32u; + const std::uint64_t p1_lo = p1 & 0xFFFFFFFFu; + const std::uint64_t p1_hi = p1 >> 32u; + const std::uint64_t p2_lo = p2 & 0xFFFFFFFFu; + const std::uint64_t p2_hi = p2 >> 32u; + + std::uint64_t Q = p0_hi + p1_lo + p2_lo; + + // The full product might now be computed as + // + // p_hi = p3 + p2_hi + p1_hi + (Q >> 32) + // p_lo = p0_lo + (Q << 32) + // + // But in this particular case here, the full p_lo is not required. + // Effectively we only need to add the highest bit in p_lo to p_hi (and + // Q_hi + 1 does not overflow). + + Q += std::uint64_t{1} << (64u - 32u - 1u); // round, ties up + + const std::uint64_t h = p3 + p2_hi + p1_hi + (Q >> 32u); + + return {h, x.e + y.e + 64}; + } + + /*! + @brief normalize x such that the significand is >= 2^(q-1) + @pre x.f != 0 + */ + static diyfp normalize(diyfp x) noexcept + { + assert(x.f != 0); + + while ((x.f >> 63u) == 0) + { + x.f <<= 1u; + x.e--; + } + + return x; + } + + /*! + @brief normalize x such that the result has the exponent E + @pre e >= x.e and the upper e - x.e bits of x.f must be zero. + */ + static diyfp normalize_to(const diyfp& x, const int target_exponent) noexcept + { + const int delta = x.e - target_exponent; + + assert(delta >= 0); + assert(((x.f << delta) >> delta) == x.f); + + return {x.f << delta, target_exponent}; + } +}; + +struct boundaries +{ + diyfp w; + diyfp minus; + diyfp plus; +}; + +/*! +Compute the (normalized) diyfp representing the input number 'value' and its +boundaries. + +@pre value must be finite and positive +*/ +template <typename FloatType> +boundaries compute_boundaries(FloatType value) +{ + assert(std::isfinite(value)); + assert(value > 0); + + // Convert the IEEE representation into a diyfp. + // + // If v is denormal: + // value = 0.F * 2^(1 - bias) = ( F) * 2^(1 - bias - (p-1)) + // If v is normalized: + // value = 1.F * 2^(E - bias) = (2^(p-1) + F) * 2^(E - bias - (p-1)) + + static_assert(std::numeric_limits<FloatType>::is_iec559, + "internal error: dtoa_short requires an IEEE-754 floating-point implementation"); + + constexpr int kPrecision = std::numeric_limits<FloatType>::digits; // = p (includes the hidden bit) + constexpr int kBias = std::numeric_limits<FloatType>::max_exponent - 1 + (kPrecision - 1); + constexpr int kMinExp = 1 - kBias; + constexpr std::uint64_t kHiddenBit = std::uint64_t{1} << (kPrecision - 1); // = 2^(p-1) + + using bits_type = typename std::conditional<kPrecision == 24, std::uint32_t, std::uint64_t >::type; + + const std::uint64_t bits = reinterpret_bits<bits_type>(value); + const std::uint64_t E = bits >> (kPrecision - 1); + const std::uint64_t F = bits & (kHiddenBit - 1); + + const bool is_denormal = E == 0; + const diyfp v = is_denormal + ? diyfp(F, kMinExp) + : diyfp(F + kHiddenBit, static_cast<int>(E) - kBias); + + // Compute the boundaries m- and m+ of the floating-point value + // v = f * 2^e. + // + // Determine v- and v+, the floating-point predecessor and successor if v, + // respectively. + // + // v- = v - 2^e if f != 2^(p-1) or e == e_min (A) + // = v - 2^(e-1) if f == 2^(p-1) and e > e_min (B) + // + // v+ = v + 2^e + // + // Let m- = (v- + v) / 2 and m+ = (v + v+) / 2. All real numbers _strictly_ + // between m- and m+ round to v, regardless of how the input rounding + // algorithm breaks ties. + // + // ---+-------------+-------------+-------------+-------------+--- (A) + // v- m- v m+ v+ + // + // -----------------+------+------+-------------+-------------+--- (B) + // v- m- v m+ v+ + + const bool lower_boundary_is_closer = F == 0 and E > 1; + const diyfp m_plus = diyfp(2 * v.f + 1, v.e - 1); + const diyfp m_minus = lower_boundary_is_closer + ? diyfp(4 * v.f - 1, v.e - 2) // (B) + : diyfp(2 * v.f - 1, v.e - 1); // (A) + + // Determine the normalized w+ = m+. + const diyfp w_plus = diyfp::normalize(m_plus); + + // Determine w- = m- such that e_(w-) = e_(w+). + const diyfp w_minus = diyfp::normalize_to(m_minus, w_plus.e); + + return {diyfp::normalize(v), w_minus, w_plus}; +} + +// Given normalized diyfp w, Grisu needs to find a (normalized) cached +// power-of-ten c, such that the exponent of the product c * w = f * 2^e lies +// within a certain range [alpha, gamma] (Definition 3.2 from [1]) +// +// alpha <= e = e_c + e_w + q <= gamma +// +// or +// +// f_c * f_w * 2^alpha <= f_c 2^(e_c) * f_w 2^(e_w) * 2^q +// <= f_c * f_w * 2^gamma +// +// Since c and w are normalized, i.e. 2^(q-1) <= f < 2^q, this implies +// +// 2^(q-1) * 2^(q-1) * 2^alpha <= c * w * 2^q < 2^q * 2^q * 2^gamma +// +// or +// +// 2^(q - 2 + alpha) <= c * w < 2^(q + gamma) +// +// The choice of (alpha,gamma) determines the size of the table and the form of +// the digit generation procedure. Using (alpha,gamma)=(-60,-32) works out well +// in practice: +// +// The idea is to cut the number c * w = f * 2^e into two parts, which can be +// processed independently: An integral part p1, and a fractional part p2: +// +// f * 2^e = ( (f div 2^-e) * 2^-e + (f mod 2^-e) ) * 2^e +// = (f div 2^-e) + (f mod 2^-e) * 2^e +// = p1 + p2 * 2^e +// +// The conversion of p1 into decimal form requires a series of divisions and +// modulos by (a power of) 10. These operations are faster for 32-bit than for +// 64-bit integers, so p1 should ideally fit into a 32-bit integer. This can be +// achieved by choosing +// +// -e >= 32 or e <= -32 := gamma +// +// In order to convert the fractional part +// +// p2 * 2^e = p2 / 2^-e = d[-1] / 10^1 + d[-2] / 10^2 + ... +// +// into decimal form, the fraction is repeatedly multiplied by 10 and the digits +// d[-i] are extracted in order: +// +// (10 * p2) div 2^-e = d[-1] +// (10 * p2) mod 2^-e = d[-2] / 10^1 + ... +// +// The multiplication by 10 must not overflow. It is sufficient to choose +// +// 10 * p2 < 16 * p2 = 2^4 * p2 <= 2^64. +// +// Since p2 = f mod 2^-e < 2^-e, +// +// -e <= 60 or e >= -60 := alpha + +constexpr int kAlpha = -60; +constexpr int kGamma = -32; + +struct cached_power // c = f * 2^e ~= 10^k +{ + std::uint64_t f; + int e; + int k; +}; + +/*! +For a normalized diyfp w = f * 2^e, this function returns a (normalized) cached +power-of-ten c = f_c * 2^e_c, such that the exponent of the product w * c +satisfies (Definition 3.2 from [1]) + + alpha <= e_c + e + q <= gamma. +*/ +inline cached_power get_cached_power_for_binary_exponent(int e) +{ + // Now + // + // alpha <= e_c + e + q <= gamma (1) + // ==> f_c * 2^alpha <= c * 2^e * 2^q + // + // and since the c's are normalized, 2^(q-1) <= f_c, + // + // ==> 2^(q - 1 + alpha) <= c * 2^(e + q) + // ==> 2^(alpha - e - 1) <= c + // + // If c were an exakt power of ten, i.e. c = 10^k, one may determine k as + // + // k = ceil( log_10( 2^(alpha - e - 1) ) ) + // = ceil( (alpha - e - 1) * log_10(2) ) + // + // From the paper: + // "In theory the result of the procedure could be wrong since c is rounded, + // and the computation itself is approximated [...]. In practice, however, + // this simple function is sufficient." + // + // For IEEE double precision floating-point numbers converted into + // normalized diyfp's w = f * 2^e, with q = 64, + // + // e >= -1022 (min IEEE exponent) + // -52 (p - 1) + // -52 (p - 1, possibly normalize denormal IEEE numbers) + // -11 (normalize the diyfp) + // = -1137 + // + // and + // + // e <= +1023 (max IEEE exponent) + // -52 (p - 1) + // -11 (normalize the diyfp) + // = 960 + // + // This binary exponent range [-1137,960] results in a decimal exponent + // range [-307,324]. One does not need to store a cached power for each + // k in this range. For each such k it suffices to find a cached power + // such that the exponent of the product lies in [alpha,gamma]. + // This implies that the difference of the decimal exponents of adjacent + // table entries must be less than or equal to + // + // floor( (gamma - alpha) * log_10(2) ) = 8. + // + // (A smaller distance gamma-alpha would require a larger table.) + + // NB: + // Actually this function returns c, such that -60 <= e_c + e + 64 <= -34. + + constexpr int kCachedPowersMinDecExp = -300; + constexpr int kCachedPowersDecStep = 8; + + static constexpr std::array<cached_power, 79> kCachedPowers = + { + { + { 0xAB70FE17C79AC6CA, -1060, -300 }, + { 0xFF77B1FCBEBCDC4F, -1034, -292 }, + { 0xBE5691EF416BD60C, -1007, -284 }, + { 0x8DD01FAD907FFC3C, -980, -276 }, + { 0xD3515C2831559A83, -954, -268 }, + { 0x9D71AC8FADA6C9B5, -927, -260 }, + { 0xEA9C227723EE8BCB, -901, -252 }, + { 0xAECC49914078536D, -874, -244 }, + { 0x823C12795DB6CE57, -847, -236 }, + { 0xC21094364DFB5637, -821, -228 }, + { 0x9096EA6F3848984F, -794, -220 }, + { 0xD77485CB25823AC7, -768, -212 }, + { 0xA086CFCD97BF97F4, -741, -204 }, + { 0xEF340A98172AACE5, -715, -196 }, + { 0xB23867FB2A35B28E, -688, -188 }, + { 0x84C8D4DFD2C63F3B, -661, -180 }, + { 0xC5DD44271AD3CDBA, -635, -172 }, + { 0x936B9FCEBB25C996, -608, -164 }, + { 0xDBAC6C247D62A584, -582, -156 }, + { 0xA3AB66580D5FDAF6, -555, -148 }, + { 0xF3E2F893DEC3F126, -529, -140 }, + { 0xB5B5ADA8AAFF80B8, -502, -132 }, + { 0x87625F056C7C4A8B, -475, -124 }, + { 0xC9BCFF6034C13053, -449, -116 }, + { 0x964E858C91BA2655, -422, -108 }, + { 0xDFF9772470297EBD, -396, -100 }, + { 0xA6DFBD9FB8E5B88F, -369, -92 }, + { 0xF8A95FCF88747D94, -343, -84 }, + { 0xB94470938FA89BCF, -316, -76 }, + { 0x8A08F0F8BF0F156B, -289, -68 }, + { 0xCDB02555653131B6, -263, -60 }, + { 0x993FE2C6D07B7FAC, -236, -52 }, + { 0xE45C10C42A2B3B06, -210, -44 }, + { 0xAA242499697392D3, -183, -36 }, + { 0xFD87B5F28300CA0E, -157, -28 }, + { 0xBCE5086492111AEB, -130, -20 }, + { 0x8CBCCC096F5088CC, -103, -12 }, + { 0xD1B71758E219652C, -77, -4 }, + { 0x9C40000000000000, -50, 4 }, + { 0xE8D4A51000000000, -24, 12 }, + { 0xAD78EBC5AC620000, 3, 20 }, + { 0x813F3978F8940984, 30, 28 }, + { 0xC097CE7BC90715B3, 56, 36 }, + { 0x8F7E32CE7BEA5C70, 83, 44 }, + { 0xD5D238A4ABE98068, 109, 52 }, + { 0x9F4F2726179A2245, 136, 60 }, + { 0xED63A231D4C4FB27, 162, 68 }, + { 0xB0DE65388CC8ADA8, 189, 76 }, + { 0x83C7088E1AAB65DB, 216, 84 }, + { 0xC45D1DF942711D9A, 242, 92 }, + { 0x924D692CA61BE758, 269, 100 }, + { 0xDA01EE641A708DEA, 295, 108 }, + { 0xA26DA3999AEF774A, 322, 116 }, + { 0xF209787BB47D6B85, 348, 124 }, + { 0xB454E4A179DD1877, 375, 132 }, + { 0x865B86925B9BC5C2, 402, 140 }, + { 0xC83553C5C8965D3D, 428, 148 }, + { 0x952AB45CFA97A0B3, 455, 156 }, + { 0xDE469FBD99A05FE3, 481, 164 }, + { 0xA59BC234DB398C25, 508, 172 }, + { 0xF6C69A72A3989F5C, 534, 180 }, + { 0xB7DCBF5354E9BECE, 561, 188 }, + { 0x88FCF317F22241E2, 588, 196 }, + { 0xCC20CE9BD35C78A5, 614, 204 }, + { 0x98165AF37B2153DF, 641, 212 }, + { 0xE2A0B5DC971F303A, 667, 220 }, + { 0xA8D9D1535CE3B396, 694, 228 }, + { 0xFB9B7CD9A4A7443C, 720, 236 }, + { 0xBB764C4CA7A44410, 747, 244 }, + { 0x8BAB8EEFB6409C1A, 774, 252 }, + { 0xD01FEF10A657842C, 800, 260 }, + { 0x9B10A4E5E9913129, 827, 268 }, + { 0xE7109BFBA19C0C9D, 853, 276 }, + { 0xAC2820D9623BF429, 880, 284 }, + { 0x80444B5E7AA7CF85, 907, 292 }, + { 0xBF21E44003ACDD2D, 933, 300 }, + { 0x8E679C2F5E44FF8F, 960, 308 }, + { 0xD433179D9C8CB841, 986, 316 }, + { 0x9E19DB92B4E31BA9, 1013, 324 }, + } + }; + + // This computation gives exactly the same results for k as + // k = ceil((kAlpha - e - 1) * 0.30102999566398114) + // for |e| <= 1500, but doesn't require floating-point operations. + // NB: log_10(2) ~= 78913 / 2^18 + assert(e >= -1500); + assert(e <= 1500); + const int f = kAlpha - e - 1; + const int k = (f * 78913) / (1 << 18) + static_cast<int>(f > 0); + + const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep; + assert(index >= 0); + assert(static_cast<std::size_t>(index) < kCachedPowers.size()); + + const cached_power cached = kCachedPowers[static_cast<std::size_t>(index)]; + assert(kAlpha <= cached.e + e + 64); + assert(kGamma >= cached.e + e + 64); + + return cached; +} + +/*! +For n != 0, returns k, such that pow10 := 10^(k-1) <= n < 10^k. +For n == 0, returns 1 and sets pow10 := 1. +*/ +inline int find_largest_pow10(const std::uint32_t n, std::uint32_t& pow10) +{ + // LCOV_EXCL_START + if (n >= 1000000000) + { + pow10 = 1000000000; + return 10; + } + // LCOV_EXCL_STOP + else if (n >= 100000000) + { + pow10 = 100000000; + return 9; + } + else if (n >= 10000000) + { + pow10 = 10000000; + return 8; + } + else if (n >= 1000000) + { + pow10 = 1000000; + return 7; + } + else if (n >= 100000) + { + pow10 = 100000; + return 6; + } + else if (n >= 10000) + { + pow10 = 10000; + return 5; + } + else if (n >= 1000) + { + pow10 = 1000; + return 4; + } + else if (n >= 100) + { + pow10 = 100; + return 3; + } + else if (n >= 10) + { + pow10 = 10; + return 2; + } + else + { + pow10 = 1; + return 1; + } +} + +inline void grisu2_round(char* buf, int len, std::uint64_t dist, std::uint64_t delta, + std::uint64_t rest, std::uint64_t ten_k) +{ + assert(len >= 1); + assert(dist <= delta); + assert(rest <= delta); + assert(ten_k > 0); + + // <--------------------------- delta ----> + // <---- dist ---------> + // --------------[------------------+-------------------]-------------- + // M- w M+ + // + // ten_k + // <------> + // <---- rest ----> + // --------------[------------------+----+--------------]-------------- + // w V + // = buf * 10^k + // + // ten_k represents a unit-in-the-last-place in the decimal representation + // stored in buf. + // Decrement buf by ten_k while this takes buf closer to w. + + // The tests are written in this order to avoid overflow in unsigned + // integer arithmetic. + + while (rest < dist + and delta - rest >= ten_k + and (rest + ten_k < dist or dist - rest > rest + ten_k - dist)) + { + assert(buf[len - 1] != '0'); + buf[len - 1]--; + rest += ten_k; + } +} + +/*! +Generates V = buffer * 10^decimal_exponent, such that M- <= V <= M+. +M- and M+ must be normalized and share the same exponent -60 <= e <= -32. +*/ +inline void grisu2_digit_gen(char* buffer, int& length, int& decimal_exponent, + diyfp M_minus, diyfp w, diyfp M_plus) +{ + static_assert(kAlpha >= -60, "internal error"); + static_assert(kGamma <= -32, "internal error"); + + // Generates the digits (and the exponent) of a decimal floating-point + // number V = buffer * 10^decimal_exponent in the range [M-, M+]. The diyfp's + // w, M- and M+ share the same exponent e, which satisfies alpha <= e <= gamma. + // + // <--------------------------- delta ----> + // <---- dist ---------> + // --------------[------------------+-------------------]-------------- + // M- w M+ + // + // Grisu2 generates the digits of M+ from left to right and stops as soon as + // V is in [M-,M+]. + + assert(M_plus.e >= kAlpha); + assert(M_plus.e <= kGamma); + + std::uint64_t delta = diyfp::sub(M_plus, M_minus).f; // (significand of (M+ - M-), implicit exponent is e) + std::uint64_t dist = diyfp::sub(M_plus, w ).f; // (significand of (M+ - w ), implicit exponent is e) + + // Split M+ = f * 2^e into two parts p1 and p2 (note: e < 0): + // + // M+ = f * 2^e + // = ((f div 2^-e) * 2^-e + (f mod 2^-e)) * 2^e + // = ((p1 ) * 2^-e + (p2 )) * 2^e + // = p1 + p2 * 2^e + + const diyfp one(std::uint64_t{1} << -M_plus.e, M_plus.e); + + auto p1 = static_cast<std::uint32_t>(M_plus.f >> -one.e); // p1 = f div 2^-e (Since -e >= 32, p1 fits into a 32-bit int.) + std::uint64_t p2 = M_plus.f & (one.f - 1); // p2 = f mod 2^-e + + // 1) + // + // Generate the digits of the integral part p1 = d[n-1]...d[1]d[0] + + assert(p1 > 0); + + std::uint32_t pow10; + const int k = find_largest_pow10(p1, pow10); + + // 10^(k-1) <= p1 < 10^k, pow10 = 10^(k-1) + // + // p1 = (p1 div 10^(k-1)) * 10^(k-1) + (p1 mod 10^(k-1)) + // = (d[k-1] ) * 10^(k-1) + (p1 mod 10^(k-1)) + // + // M+ = p1 + p2 * 2^e + // = d[k-1] * 10^(k-1) + (p1 mod 10^(k-1)) + p2 * 2^e + // = d[k-1] * 10^(k-1) + ((p1 mod 10^(k-1)) * 2^-e + p2) * 2^e + // = d[k-1] * 10^(k-1) + ( rest) * 2^e + // + // Now generate the digits d[n] of p1 from left to right (n = k-1,...,0) + // + // p1 = d[k-1]...d[n] * 10^n + d[n-1]...d[0] + // + // but stop as soon as + // + // rest * 2^e = (d[n-1]...d[0] * 2^-e + p2) * 2^e <= delta * 2^e + + int n = k; + while (n > 0) + { + // Invariants: + // M+ = buffer * 10^n + (p1 + p2 * 2^e) (buffer = 0 for n = k) + // pow10 = 10^(n-1) <= p1 < 10^n + // + const std::uint32_t d = p1 / pow10; // d = p1 div 10^(n-1) + const std::uint32_t r = p1 % pow10; // r = p1 mod 10^(n-1) + // + // M+ = buffer * 10^n + (d * 10^(n-1) + r) + p2 * 2^e + // = (buffer * 10 + d) * 10^(n-1) + (r + p2 * 2^e) + // + assert(d <= 9); + buffer[length++] = static_cast<char>('0' + d); // buffer := buffer * 10 + d + // + // M+ = buffer * 10^(n-1) + (r + p2 * 2^e) + // + p1 = r; + n--; + // + // M+ = buffer * 10^n + (p1 + p2 * 2^e) + // pow10 = 10^n + // + + // Now check if enough digits have been generated. + // Compute + // + // p1 + p2 * 2^e = (p1 * 2^-e + p2) * 2^e = rest * 2^e + // + // Note: + // Since rest and delta share the same exponent e, it suffices to + // compare the significands. + const std::uint64_t rest = (std::uint64_t{p1} << -one.e) + p2; + if (rest <= delta) + { + // V = buffer * 10^n, with M- <= V <= M+. + + decimal_exponent += n; + + // We may now just stop. But instead look if the buffer could be + // decremented to bring V closer to w. + // + // pow10 = 10^n is now 1 ulp in the decimal representation V. + // The rounding procedure works with diyfp's with an implicit + // exponent of e. + // + // 10^n = (10^n * 2^-e) * 2^e = ulp * 2^e + // + const std::uint64_t ten_n = std::uint64_t{pow10} << -one.e; + grisu2_round(buffer, length, dist, delta, rest, ten_n); + + return; + } + + pow10 /= 10; + // + // pow10 = 10^(n-1) <= p1 < 10^n + // Invariants restored. + } + + // 2) + // + // The digits of the integral part have been generated: + // + // M+ = d[k-1]...d[1]d[0] + p2 * 2^e + // = buffer + p2 * 2^e + // + // Now generate the digits of the fractional part p2 * 2^e. + // + // Note: + // No decimal point is generated: the exponent is adjusted instead. + // + // p2 actually represents the fraction + // + // p2 * 2^e + // = p2 / 2^-e + // = d[-1] / 10^1 + d[-2] / 10^2 + ... + // + // Now generate the digits d[-m] of p1 from left to right (m = 1,2,...) + // + // p2 * 2^e = d[-1]d[-2]...d[-m] * 10^-m + // + 10^-m * (d[-m-1] / 10^1 + d[-m-2] / 10^2 + ...) + // + // using + // + // 10^m * p2 = ((10^m * p2) div 2^-e) * 2^-e + ((10^m * p2) mod 2^-e) + // = ( d) * 2^-e + ( r) + // + // or + // 10^m * p2 * 2^e = d + r * 2^e + // + // i.e. + // + // M+ = buffer + p2 * 2^e + // = buffer + 10^-m * (d + r * 2^e) + // = (buffer * 10^m + d) * 10^-m + 10^-m * r * 2^e + // + // and stop as soon as 10^-m * r * 2^e <= delta * 2^e + + assert(p2 > delta); + + int m = 0; + for (;;) + { + // Invariant: + // M+ = buffer * 10^-m + 10^-m * (d[-m-1] / 10 + d[-m-2] / 10^2 + ...) * 2^e + // = buffer * 10^-m + 10^-m * (p2 ) * 2^e + // = buffer * 10^-m + 10^-m * (1/10 * (10 * p2) ) * 2^e + // = buffer * 10^-m + 10^-m * (1/10 * ((10*p2 div 2^-e) * 2^-e + (10*p2 mod 2^-e)) * 2^e + // + assert(p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10); + p2 *= 10; + const std::uint64_t d = p2 >> -one.e; // d = (10 * p2) div 2^-e + const std::uint64_t r = p2 & (one.f - 1); // r = (10 * p2) mod 2^-e + // + // M+ = buffer * 10^-m + 10^-m * (1/10 * (d * 2^-e + r) * 2^e + // = buffer * 10^-m + 10^-m * (1/10 * (d + r * 2^e)) + // = (buffer * 10 + d) * 10^(-m-1) + 10^(-m-1) * r * 2^e + // + assert(d <= 9); + buffer[length++] = static_cast<char>('0' + d); // buffer := buffer * 10 + d + // + // M+ = buffer * 10^(-m-1) + 10^(-m-1) * r * 2^e + // + p2 = r; + m++; + // + // M+ = buffer * 10^-m + 10^-m * p2 * 2^e + // Invariant restored. + + // Check if enough digits have been generated. + // + // 10^-m * p2 * 2^e <= delta * 2^e + // p2 * 2^e <= 10^m * delta * 2^e + // p2 <= 10^m * delta + delta *= 10; + dist *= 10; + if (p2 <= delta) + { + break; + } + } + + // V = buffer * 10^-m, with M- <= V <= M+. + + decimal_exponent -= m; + + // 1 ulp in the decimal representation is now 10^-m. + // Since delta and dist are now scaled by 10^m, we need to do the + // same with ulp in order to keep the units in sync. + // + // 10^m * 10^-m = 1 = 2^-e * 2^e = ten_m * 2^e + // + const std::uint64_t ten_m = one.f; + grisu2_round(buffer, length, dist, delta, p2, ten_m); + + // By construction this algorithm generates the shortest possible decimal + // number (Loitsch, Theorem 6.2) which rounds back to w. + // For an input number of precision p, at least + // + // N = 1 + ceil(p * log_10(2)) + // + // decimal digits are sufficient to identify all binary floating-point + // numbers (Matula, "In-and-Out conversions"). + // This implies that the algorithm does not produce more than N decimal + // digits. + // + // N = 17 for p = 53 (IEEE double precision) + // N = 9 for p = 24 (IEEE single precision) +} + +/*! +v = buf * 10^decimal_exponent +len is the length of the buffer (number of decimal digits) +The buffer must be large enough, i.e. >= max_digits10. +*/ +inline void grisu2(char* buf, int& len, int& decimal_exponent, + diyfp m_minus, diyfp v, diyfp m_plus) +{ + assert(m_plus.e == m_minus.e); + assert(m_plus.e == v.e); + + // --------(-----------------------+-----------------------)-------- (A) + // m- v m+ + // + // --------------------(-----------+-----------------------)-------- (B) + // m- v m+ + // + // First scale v (and m- and m+) such that the exponent is in the range + // [alpha, gamma]. + + const cached_power cached = get_cached_power_for_binary_exponent(m_plus.e); + + const diyfp c_minus_k(cached.f, cached.e); // = c ~= 10^-k + + // The exponent of the products is = v.e + c_minus_k.e + q and is in the range [alpha,gamma] + const diyfp w = diyfp::mul(v, c_minus_k); + const diyfp w_minus = diyfp::mul(m_minus, c_minus_k); + const diyfp w_plus = diyfp::mul(m_plus, c_minus_k); + + // ----(---+---)---------------(---+---)---------------(---+---)---- + // w- w w+ + // = c*m- = c*v = c*m+ + // + // diyfp::mul rounds its result and c_minus_k is approximated too. w, w- and + // w+ are now off by a small amount. + // In fact: + // + // w - v * 10^k < 1 ulp + // + // To account for this inaccuracy, add resp. subtract 1 ulp. + // + // --------+---[---------------(---+---)---------------]---+-------- + // w- M- w M+ w+ + // + // Now any number in [M-, M+] (bounds included) will round to w when input, + // regardless of how the input rounding algorithm breaks ties. + // + // And digit_gen generates the shortest possible such number in [M-, M+]. + // Note that this does not mean that Grisu2 always generates the shortest + // possible number in the interval (m-, m+). + const diyfp M_minus(w_minus.f + 1, w_minus.e); + const diyfp M_plus (w_plus.f - 1, w_plus.e ); + + decimal_exponent = -cached.k; // = -(-k) = k + + grisu2_digit_gen(buf, len, decimal_exponent, M_minus, w, M_plus); +} + +/*! +v = buf * 10^decimal_exponent +len is the length of the buffer (number of decimal digits) +The buffer must be large enough, i.e. >= max_digits10. +*/ +template <typename FloatType> +void grisu2(char* buf, int& len, int& decimal_exponent, FloatType value) +{ + static_assert(diyfp::kPrecision >= std::numeric_limits<FloatType>::digits + 3, + "internal error: not enough precision"); + + assert(std::isfinite(value)); + assert(value > 0); + + // If the neighbors (and boundaries) of 'value' are always computed for double-precision + // numbers, all float's can be recovered using strtod (and strtof). However, the resulting + // decimal representations are not exactly "short". + // + // The documentation for 'std::to_chars' (https://en.cppreference.com/w/cpp/utility/to_chars) + // says "value is converted to a string as if by std::sprintf in the default ("C") locale" + // and since sprintf promotes float's to double's, I think this is exactly what 'std::to_chars' + // does. + // On the other hand, the documentation for 'std::to_chars' requires that "parsing the + // representation using the corresponding std::from_chars function recovers value exactly". That + // indicates that single precision floating-point numbers should be recovered using + // 'std::strtof'. + // + // NB: If the neighbors are computed for single-precision numbers, there is a single float + // (7.0385307e-26f) which can't be recovered using strtod. The resulting double precision + // value is off by 1 ulp. +#if 0 + const boundaries w = compute_boundaries(static_cast<double>(value)); +#else + const boundaries w = compute_boundaries(value); +#endif + + grisu2(buf, len, decimal_exponent, w.minus, w.w, w.plus); +} + +/*! +@brief appends a decimal representation of e to buf +@return a pointer to the element following the exponent. +@pre -1000 < e < 1000 +*/ +inline char* append_exponent(char* buf, int e) +{ + assert(e > -1000); + assert(e < 1000); + + if (e < 0) + { + e = -e; + *buf++ = '-'; + } + else + { + *buf++ = '+'; + } + + auto k = static_cast<std::uint32_t>(e); + if (k < 10) + { + // Always print at least two digits in the exponent. + // This is for compatibility with printf("%g"). + *buf++ = '0'; + *buf++ = static_cast<char>('0' + k); + } + else if (k < 100) + { + *buf++ = static_cast<char>('0' + k / 10); + k %= 10; + *buf++ = static_cast<char>('0' + k); + } + else + { + *buf++ = static_cast<char>('0' + k / 100); + k %= 100; + *buf++ = static_cast<char>('0' + k / 10); + k %= 10; + *buf++ = static_cast<char>('0' + k); + } + + return buf; +} + +/*! +@brief prettify v = buf * 10^decimal_exponent + +If v is in the range [10^min_exp, 10^max_exp) it will be printed in fixed-point +notation. Otherwise it will be printed in exponential notation. + +@pre min_exp < 0 +@pre max_exp > 0 +*/ +inline char* format_buffer(char* buf, int len, int decimal_exponent, + int min_exp, int max_exp) +{ + assert(min_exp < 0); + assert(max_exp > 0); + + const int k = len; + const int n = len + decimal_exponent; + + // v = buf * 10^(n-k) + // k is the length of the buffer (number of decimal digits) + // n is the position of the decimal point relative to the start of the buffer. + + if (k <= n and n <= max_exp) + { + // digits[000] + // len <= max_exp + 2 + + std::memset(buf + k, '0', static_cast<size_t>(n - k)); + // Make it look like a floating-point number (#362, #378) + buf[n + 0] = '.'; + buf[n + 1] = '0'; + return buf + (n + 2); + } + + if (0 < n and n <= max_exp) + { + // dig.its + // len <= max_digits10 + 1 + + assert(k > n); + + std::memmove(buf + (n + 1), buf + n, static_cast<size_t>(k - n)); + buf[n] = '.'; + return buf + (k + 1); + } + + if (min_exp < n and n <= 0) + { + // 0.[000]digits + // len <= 2 + (-min_exp - 1) + max_digits10 + + std::memmove(buf + (2 + -n), buf, static_cast<size_t>(k)); + buf[0] = '0'; + buf[1] = '.'; + std::memset(buf + 2, '0', static_cast<size_t>(-n)); + return buf + (2 + (-n) + k); + } + + if (k == 1) + { + // dE+123 + // len <= 1 + 5 + + buf += 1; + } + else + { + // d.igitsE+123 + // len <= max_digits10 + 1 + 5 + + std::memmove(buf + 2, buf + 1, static_cast<size_t>(k - 1)); + buf[1] = '.'; + buf += 1 + k; + } + + *buf++ = 'e'; + return append_exponent(buf, n - 1); +} + +} // namespace dtoa_impl + +/*! +@brief generates a decimal representation of the floating-point number value in [first, last). + +The format of the resulting decimal representation is similar to printf's %g +format. Returns an iterator pointing past-the-end of the decimal representation. + +@note The input number must be finite, i.e. NaN's and Inf's are not supported. +@note The buffer must be large enough. +@note The result is NOT null-terminated. +*/ +template <typename FloatType> +char* to_chars(char* first, const char* last, FloatType value) +{ + static_cast<void>(last); // maybe unused - fix warning + assert(std::isfinite(value)); + + // Use signbit(value) instead of (value < 0) since signbit works for -0. + if (std::signbit(value)) + { + value = -value; + *first++ = '-'; + } + + if (value == 0) // +-0 + { + *first++ = '0'; + // Make it look like a floating-point number (#362, #378) + *first++ = '.'; + *first++ = '0'; + return first; + } + + assert(last - first >= std::numeric_limits<FloatType>::max_digits10); + + // Compute v = buffer * 10^decimal_exponent. + // The decimal digits are stored in the buffer, which needs to be interpreted + // as an unsigned decimal integer. + // len is the length of the buffer, i.e. the number of decimal digits. + int len = 0; + int decimal_exponent = 0; + dtoa_impl::grisu2(first, len, decimal_exponent, value); + + assert(len <= std::numeric_limits<FloatType>::max_digits10); + + // Format the buffer like printf("%.*g", prec, value) + constexpr int kMinExp = -4; + // Use digits10 here to increase compatibility with version 2. + constexpr int kMaxExp = std::numeric_limits<FloatType>::digits10; + + assert(last - first >= kMaxExp + 2); + assert(last - first >= 2 + (-kMinExp - 1) + std::numeric_limits<FloatType>::max_digits10); + assert(last - first >= std::numeric_limits<FloatType>::max_digits10 + 6); + + return dtoa_impl::format_buffer(first, len, decimal_exponent, kMinExp, kMaxExp); +} + +} // namespace detail +} // namespace nlohmann + +// #include <nlohmann/detail/exceptions.hpp> + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/meta/cpp_future.hpp> + +// #include <nlohmann/detail/output/binary_writer.hpp> + +// #include <nlohmann/detail/output/output_adapters.hpp> + +// #include <nlohmann/detail/value_t.hpp> + + +namespace nlohmann +{ +namespace detail +{ +/////////////////// +// serialization // +/////////////////// + +/// how to treat decoding errors +enum class error_handler_t +{ + strict, ///< throw a type_error exception in case of invalid UTF-8 + replace, ///< replace invalid UTF-8 sequences with U+FFFD + ignore ///< ignore invalid UTF-8 sequences +}; + +template<typename BasicJsonType> +class serializer +{ + using string_t = typename BasicJsonType::string_t; + using number_float_t = typename BasicJsonType::number_float_t; + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + static constexpr std::uint8_t UTF8_ACCEPT = 0; + static constexpr std::uint8_t UTF8_REJECT = 1; + + public: + /*! + @param[in] s output stream to serialize to + @param[in] ichar indentation character to use + @param[in] error_handler_ how to react on decoding errors + */ + serializer(output_adapter_t<char> s, const char ichar, + error_handler_t error_handler_ = error_handler_t::strict) + : o(std::move(s)) + , loc(std::localeconv()) + , thousands_sep(loc->thousands_sep == nullptr ? '\0' : * (loc->thousands_sep)) + , decimal_point(loc->decimal_point == nullptr ? '\0' : * (loc->decimal_point)) + , indent_char(ichar) + , indent_string(512, indent_char) + , error_handler(error_handler_) + {} + + // delete because of pointer members + serializer(const serializer&) = delete; + serializer& operator=(const serializer&) = delete; + serializer(serializer&&) = delete; + serializer& operator=(serializer&&) = delete; + ~serializer() = default; + + /*! + @brief internal implementation of the serialization function + + This function is called by the public member function dump and organizes + the serialization internally. The indentation level is propagated as + additional parameter. In case of arrays and objects, the function is + called recursively. + + - strings and object keys are escaped using `escape_string()` + - integer numbers are converted implicitly via `operator<<` + - floating-point numbers are converted to a string using `"%g"` format + + @param[in] val value to serialize + @param[in] pretty_print whether the output shall be pretty-printed + @param[in] indent_step the indent level + @param[in] current_indent the current indent level (only used internally) + */ + void dump(const BasicJsonType& val, const bool pretty_print, + const bool ensure_ascii, + const unsigned int indent_step, + const unsigned int current_indent = 0) + { + switch (val.m_type) + { + case value_t::object: + { + if (val.m_value.object->empty()) + { + o->write_characters("{}", 2); + return; + } + + if (pretty_print) + { + o->write_characters("{\n", 2); + + // variable to hold indentation for recursive calls + const auto new_indent = current_indent + indent_step; + if (JSON_UNLIKELY(indent_string.size() < new_indent)) + { + indent_string.resize(indent_string.size() * 2, ' '); + } + + // first n-1 elements + auto i = val.m_value.object->cbegin(); + for (std::size_t cnt = 0; cnt < val.m_value.object->size() - 1; ++cnt, ++i) + { + o->write_characters(indent_string.c_str(), new_indent); + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\": ", 3); + dump(i->second, true, ensure_ascii, indent_step, new_indent); + o->write_characters(",\n", 2); + } + + // last element + assert(i != val.m_value.object->cend()); + assert(std::next(i) == val.m_value.object->cend()); + o->write_characters(indent_string.c_str(), new_indent); + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\": ", 3); + dump(i->second, true, ensure_ascii, indent_step, new_indent); + + o->write_character('\n'); + o->write_characters(indent_string.c_str(), current_indent); + o->write_character('}'); + } + else + { + o->write_character('{'); + + // first n-1 elements + auto i = val.m_value.object->cbegin(); + for (std::size_t cnt = 0; cnt < val.m_value.object->size() - 1; ++cnt, ++i) + { + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\":", 2); + dump(i->second, false, ensure_ascii, indent_step, current_indent); + o->write_character(','); + } + + // last element + assert(i != val.m_value.object->cend()); + assert(std::next(i) == val.m_value.object->cend()); + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\":", 2); + dump(i->second, false, ensure_ascii, indent_step, current_indent); + + o->write_character('}'); + } + + return; + } + + case value_t::array: + { + if (val.m_value.array->empty()) + { + o->write_characters("[]", 2); + return; + } + + if (pretty_print) + { + o->write_characters("[\n", 2); + + // variable to hold indentation for recursive calls + const auto new_indent = current_indent + indent_step; + if (JSON_UNLIKELY(indent_string.size() < new_indent)) + { + indent_string.resize(indent_string.size() * 2, ' '); + } + + // first n-1 elements + for (auto i = val.m_value.array->cbegin(); + i != val.m_value.array->cend() - 1; ++i) + { + o->write_characters(indent_string.c_str(), new_indent); + dump(*i, true, ensure_ascii, indent_step, new_indent); + o->write_characters(",\n", 2); + } + + // last element + assert(not val.m_value.array->empty()); + o->write_characters(indent_string.c_str(), new_indent); + dump(val.m_value.array->back(), true, ensure_ascii, indent_step, new_indent); + + o->write_character('\n'); + o->write_characters(indent_string.c_str(), current_indent); + o->write_character(']'); + } + else + { + o->write_character('['); + + // first n-1 elements + for (auto i = val.m_value.array->cbegin(); + i != val.m_value.array->cend() - 1; ++i) + { + dump(*i, false, ensure_ascii, indent_step, current_indent); + o->write_character(','); + } + + // last element + assert(not val.m_value.array->empty()); + dump(val.m_value.array->back(), false, ensure_ascii, indent_step, current_indent); + + o->write_character(']'); + } + + return; + } + + case value_t::string: + { + o->write_character('\"'); + dump_escaped(*val.m_value.string, ensure_ascii); + o->write_character('\"'); + return; + } + + case value_t::boolean: + { + if (val.m_value.boolean) + { + o->write_characters("true", 4); + } + else + { + o->write_characters("false", 5); + } + return; + } + + case value_t::number_integer: + { + dump_integer(val.m_value.number_integer); + return; + } + + case value_t::number_unsigned: + { + dump_integer(val.m_value.number_unsigned); + return; + } + + case value_t::number_float: + { + dump_float(val.m_value.number_float); + return; + } + + case value_t::discarded: + { + o->write_characters("<discarded>", 11); + return; + } + + case value_t::null: + { + o->write_characters("null", 4); + return; + } + + default: // LCOV_EXCL_LINE + assert(false); // LCOV_EXCL_LINE + } + } + + private: + /*! + @brief dump escaped string + + Escape a string by replacing certain special characters by a sequence of an + escape character (backslash) and another character and other control + characters by a sequence of "\u" followed by a four-digit hex + representation. The escaped string is written to output stream @a o. + + @param[in] s the string to escape + @param[in] ensure_ascii whether to escape non-ASCII characters with + \uXXXX sequences + + @complexity Linear in the length of string @a s. + */ + void dump_escaped(const string_t& s, const bool ensure_ascii) + { + std::uint32_t codepoint; + std::uint8_t state = UTF8_ACCEPT; + std::size_t bytes = 0; // number of bytes written to string_buffer + + // number of bytes written at the point of the last valid byte + std::size_t bytes_after_last_accept = 0; + std::size_t undumped_chars = 0; + + for (std::size_t i = 0; i < s.size(); ++i) + { + const auto byte = static_cast<uint8_t>(s[i]); + + switch (decode(state, codepoint, byte)) + { + case UTF8_ACCEPT: // decode found a new code point + { + switch (codepoint) + { + case 0x08: // backspace + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = 'b'; + break; + } + + case 0x09: // horizontal tab + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = 't'; + break; + } + + case 0x0A: // newline + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = 'n'; + break; + } + + case 0x0C: // formfeed + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = 'f'; + break; + } + + case 0x0D: // carriage return + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = 'r'; + break; + } + + case 0x22: // quotation mark + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = '\"'; + break; + } + + case 0x5C: // reverse solidus + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = '\\'; + break; + } + + default: + { + // escape control characters (0x00..0x1F) or, if + // ensure_ascii parameter is used, non-ASCII characters + if ((codepoint <= 0x1F) or (ensure_ascii and (codepoint >= 0x7F))) + { + if (codepoint <= 0xFFFF) + { + (std::snprintf)(string_buffer.data() + bytes, 7, "\\u%04x", + static_cast<std::uint16_t>(codepoint)); + bytes += 6; + } + else + { + (std::snprintf)(string_buffer.data() + bytes, 13, "\\u%04x\\u%04x", + static_cast<std::uint16_t>(0xD7C0u + (codepoint >> 10u)), + static_cast<std::uint16_t>(0xDC00u + (codepoint & 0x3FFu))); + bytes += 12; + } + } + else + { + // copy byte to buffer (all previous bytes + // been copied have in default case above) + string_buffer[bytes++] = s[i]; + } + break; + } + } + + // write buffer and reset index; there must be 13 bytes + // left, as this is the maximal number of bytes to be + // written ("\uxxxx\uxxxx\0") for one code point + if (string_buffer.size() - bytes < 13) + { + o->write_characters(string_buffer.data(), bytes); + bytes = 0; + } + + // remember the byte position of this accept + bytes_after_last_accept = bytes; + undumped_chars = 0; + break; + } + + case UTF8_REJECT: // decode found invalid UTF-8 byte + { + switch (error_handler) + { + case error_handler_t::strict: + { + std::string sn(3, '\0'); + (std::snprintf)(&sn[0], sn.size(), "%.2X", byte); + JSON_THROW(type_error::create(316, "invalid UTF-8 byte at index " + std::to_string(i) + ": 0x" + sn)); + } + + case error_handler_t::ignore: + case error_handler_t::replace: + { + // in case we saw this character the first time, we + // would like to read it again, because the byte + // may be OK for itself, but just not OK for the + // previous sequence + if (undumped_chars > 0) + { + --i; + } + + // reset length buffer to the last accepted index; + // thus removing/ignoring the invalid characters + bytes = bytes_after_last_accept; + + if (error_handler == error_handler_t::replace) + { + // add a replacement character + if (ensure_ascii) + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = 'u'; + string_buffer[bytes++] = 'f'; + string_buffer[bytes++] = 'f'; + string_buffer[bytes++] = 'f'; + string_buffer[bytes++] = 'd'; + } + else + { + string_buffer[bytes++] = detail::binary_writer<BasicJsonType, char>::to_char_type('\xEF'); + string_buffer[bytes++] = detail::binary_writer<BasicJsonType, char>::to_char_type('\xBF'); + string_buffer[bytes++] = detail::binary_writer<BasicJsonType, char>::to_char_type('\xBD'); + } + + // write buffer and reset index; there must be 13 bytes + // left, as this is the maximal number of bytes to be + // written ("\uxxxx\uxxxx\0") for one code point + if (string_buffer.size() - bytes < 13) + { + o->write_characters(string_buffer.data(), bytes); + bytes = 0; + } + + bytes_after_last_accept = bytes; + } + + undumped_chars = 0; + + // continue processing the string + state = UTF8_ACCEPT; + break; + } + + default: // LCOV_EXCL_LINE + assert(false); // LCOV_EXCL_LINE + } + break; + } + + default: // decode found yet incomplete multi-byte code point + { + if (not ensure_ascii) + { + // code point will not be escaped - copy byte to buffer + string_buffer[bytes++] = s[i]; + } + ++undumped_chars; + break; + } + } + } + + // we finished processing the string + if (JSON_LIKELY(state == UTF8_ACCEPT)) + { + // write buffer + if (bytes > 0) + { + o->write_characters(string_buffer.data(), bytes); + } + } + else + { + // we finish reading, but do not accept: string was incomplete + switch (error_handler) + { + case error_handler_t::strict: + { + std::string sn(3, '\0'); + (std::snprintf)(&sn[0], sn.size(), "%.2X", static_cast<std::uint8_t>(s.back())); + JSON_THROW(type_error::create(316, "incomplete UTF-8 string; last byte: 0x" + sn)); + } + + case error_handler_t::ignore: + { + // write all accepted bytes + o->write_characters(string_buffer.data(), bytes_after_last_accept); + break; + } + + case error_handler_t::replace: + { + // write all accepted bytes + o->write_characters(string_buffer.data(), bytes_after_last_accept); + // add a replacement character + if (ensure_ascii) + { + o->write_characters("\\ufffd", 6); + } + else + { + o->write_characters("\xEF\xBF\xBD", 3); + } + break; + } + + default: // LCOV_EXCL_LINE + assert(false); // LCOV_EXCL_LINE + } + } + } + + /*! + @brief count digits + + Count the number of decimal (base 10) digits for an input unsigned integer. + + @param[in] x unsigned integer number to count its digits + @return number of decimal digits + */ + inline unsigned int count_digits(number_unsigned_t x) noexcept + { + unsigned int n_digits = 1; + for (;;) + { + if (x < 10) + { + return n_digits; + } + if (x < 100) + { + return n_digits + 1; + } + if (x < 1000) + { + return n_digits + 2; + } + if (x < 10000) + { + return n_digits + 3; + } + x = x / 10000u; + n_digits += 4; + } + } + + /*! + @brief dump an integer + + Dump a given integer to output stream @a o. Works internally with + @a number_buffer. + + @param[in] x integer number (signed or unsigned) to dump + @tparam NumberType either @a number_integer_t or @a number_unsigned_t + */ + template<typename NumberType, detail::enable_if_t< + std::is_same<NumberType, number_unsigned_t>::value or + std::is_same<NumberType, number_integer_t>::value, + int> = 0> + void dump_integer(NumberType x) + { + static constexpr std::array<std::array<char, 2>, 100> digits_to_99 + { + { + {{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0', '6'}}, {{'0', '7'}}, {{'0', '8'}}, {{'0', '9'}}, + {{'1', '0'}}, {{'1', '1'}}, {{'1', '2'}}, {{'1', '3'}}, {{'1', '4'}}, {{'1', '5'}}, {{'1', '6'}}, {{'1', '7'}}, {{'1', '8'}}, {{'1', '9'}}, + {{'2', '0'}}, {{'2', '1'}}, {{'2', '2'}}, {{'2', '3'}}, {{'2', '4'}}, {{'2', '5'}}, {{'2', '6'}}, {{'2', '7'}}, {{'2', '8'}}, {{'2', '9'}}, + {{'3', '0'}}, {{'3', '1'}}, {{'3', '2'}}, {{'3', '3'}}, {{'3', '4'}}, {{'3', '5'}}, {{'3', '6'}}, {{'3', '7'}}, {{'3', '8'}}, {{'3', '9'}}, + {{'4', '0'}}, {{'4', '1'}}, {{'4', '2'}}, {{'4', '3'}}, {{'4', '4'}}, {{'4', '5'}}, {{'4', '6'}}, {{'4', '7'}}, {{'4', '8'}}, {{'4', '9'}}, + {{'5', '0'}}, {{'5', '1'}}, {{'5', '2'}}, {{'5', '3'}}, {{'5', '4'}}, {{'5', '5'}}, {{'5', '6'}}, {{'5', '7'}}, {{'5', '8'}}, {{'5', '9'}}, + {{'6', '0'}}, {{'6', '1'}}, {{'6', '2'}}, {{'6', '3'}}, {{'6', '4'}}, {{'6', '5'}}, {{'6', '6'}}, {{'6', '7'}}, {{'6', '8'}}, {{'6', '9'}}, + {{'7', '0'}}, {{'7', '1'}}, {{'7', '2'}}, {{'7', '3'}}, {{'7', '4'}}, {{'7', '5'}}, {{'7', '6'}}, {{'7', '7'}}, {{'7', '8'}}, {{'7', '9'}}, + {{'8', '0'}}, {{'8', '1'}}, {{'8', '2'}}, {{'8', '3'}}, {{'8', '4'}}, {{'8', '5'}}, {{'8', '6'}}, {{'8', '7'}}, {{'8', '8'}}, {{'8', '9'}}, + {{'9', '0'}}, {{'9', '1'}}, {{'9', '2'}}, {{'9', '3'}}, {{'9', '4'}}, {{'9', '5'}}, {{'9', '6'}}, {{'9', '7'}}, {{'9', '8'}}, {{'9', '9'}}, + } + }; + + // special case for "0" + if (x == 0) + { + o->write_character('0'); + return; + } + + // use a pointer to fill the buffer + auto buffer_ptr = number_buffer.begin(); + + const bool is_negative = std::is_same<NumberType, number_integer_t>::value and not(x >= 0); // see issue #755 + number_unsigned_t abs_value; + + unsigned int n_chars; + + if (is_negative) + { + *buffer_ptr = '-'; + abs_value = static_cast<number_unsigned_t>(std::abs(static_cast<std::intmax_t>(x))); + + // account one more byte for the minus sign + n_chars = 1 + count_digits(abs_value); + } + else + { + abs_value = static_cast<number_unsigned_t>(x); + n_chars = count_digits(abs_value); + } + + // spare 1 byte for '\0' + assert(n_chars < number_buffer.size() - 1); + + // jump to the end to generate the string from backward + // so we later avoid reversing the result + buffer_ptr += n_chars; + + // Fast int2ascii implementation inspired by "Fastware" talk by Andrei Alexandrescu + // See: https://www.youtube.com/watch?v=o4-CwDo2zpg + while (abs_value >= 100) + { + const auto digits_index = static_cast<unsigned>((abs_value % 100)); + abs_value /= 100; + *(--buffer_ptr) = digits_to_99[digits_index][1]; + *(--buffer_ptr) = digits_to_99[digits_index][0]; + } + + if (abs_value >= 10) + { + const auto digits_index = static_cast<unsigned>(abs_value); + *(--buffer_ptr) = digits_to_99[digits_index][1]; + *(--buffer_ptr) = digits_to_99[digits_index][0]; + } + else + { + *(--buffer_ptr) = static_cast<char>('0' + abs_value); + } + + o->write_characters(number_buffer.data(), n_chars); + } + + /*! + @brief dump a floating-point number + + Dump a given floating-point number to output stream @a o. Works internally + with @a number_buffer. + + @param[in] x floating-point number to dump + */ + void dump_float(number_float_t x) + { + // NaN / inf + if (not std::isfinite(x)) + { + o->write_characters("null", 4); + return; + } + + // If number_float_t is an IEEE-754 single or double precision number, + // use the Grisu2 algorithm to produce short numbers which are + // guaranteed to round-trip, using strtof and strtod, resp. + // + // NB: The test below works if <long double> == <double>. + static constexpr bool is_ieee_single_or_double + = (std::numeric_limits<number_float_t>::is_iec559 and std::numeric_limits<number_float_t>::digits == 24 and std::numeric_limits<number_float_t>::max_exponent == 128) or + (std::numeric_limits<number_float_t>::is_iec559 and std::numeric_limits<number_float_t>::digits == 53 and std::numeric_limits<number_float_t>::max_exponent == 1024); + + dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>()); + } + + void dump_float(number_float_t x, std::true_type /*is_ieee_single_or_double*/) + { + char* begin = number_buffer.data(); + char* end = ::nlohmann::detail::to_chars(begin, begin + number_buffer.size(), x); + + o->write_characters(begin, static_cast<size_t>(end - begin)); + } + + void dump_float(number_float_t x, std::false_type /*is_ieee_single_or_double*/) + { + // get number of digits for a float -> text -> float round-trip + static constexpr auto d = std::numeric_limits<number_float_t>::max_digits10; + + // the actual conversion + std::ptrdiff_t len = (std::snprintf)(number_buffer.data(), number_buffer.size(), "%.*g", d, x); + + // negative value indicates an error + assert(len > 0); + // check if buffer was large enough + assert(static_cast<std::size_t>(len) < number_buffer.size()); + + // erase thousands separator + if (thousands_sep != '\0') + { + const auto end = std::remove(number_buffer.begin(), + number_buffer.begin() + len, thousands_sep); + std::fill(end, number_buffer.end(), '\0'); + assert((end - number_buffer.begin()) <= len); + len = (end - number_buffer.begin()); + } + + // convert decimal point to '.' + if (decimal_point != '\0' and decimal_point != '.') + { + const auto dec_pos = std::find(number_buffer.begin(), number_buffer.end(), decimal_point); + if (dec_pos != number_buffer.end()) + { + *dec_pos = '.'; + } + } + + o->write_characters(number_buffer.data(), static_cast<std::size_t>(len)); + + // determine if need to append ".0" + const bool value_is_int_like = + std::none_of(number_buffer.begin(), number_buffer.begin() + len + 1, + [](char c) + { + return c == '.' or c == 'e'; + }); + + if (value_is_int_like) + { + o->write_characters(".0", 2); + } + } + + /*! + @brief check whether a string is UTF-8 encoded + + The function checks each byte of a string whether it is UTF-8 encoded. The + result of the check is stored in the @a state parameter. The function must + be called initially with state 0 (accept). State 1 means the string must + be rejected, because the current byte is not allowed. If the string is + completely processed, but the state is non-zero, the string ended + prematurely; that is, the last byte indicated more bytes should have + followed. + + @param[in,out] state the state of the decoding + @param[in,out] codep codepoint (valid only if resulting state is UTF8_ACCEPT) + @param[in] byte next byte to decode + @return new state + + @note The function has been edited: a std::array is used. + + @copyright Copyright (c) 2008-2009 Bjoern Hoehrmann <bjoern@hoehrmann.de> + @sa http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ + */ + static std::uint8_t decode(std::uint8_t& state, std::uint32_t& codep, const std::uint8_t byte) noexcept + { + static const std::array<std::uint8_t, 400> utf8d = + { + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 00..1F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20..3F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 40..5F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 60..7F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, // 80..9F + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // A0..BF + 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // C0..DF + 0xA, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, // E0..EF + 0xB, 0x6, 0x6, 0x6, 0x5, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, // F0..FF + 0x0, 0x1, 0x2, 0x3, 0x5, 0x8, 0x7, 0x1, 0x1, 0x1, 0x4, 0x6, 0x1, 0x1, 0x1, 0x1, // s0..s0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, // s1..s2 + 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, // s3..s4 + 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, // s5..s6 + 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // s7..s8 + } + }; + + const std::uint8_t type = utf8d[byte]; + + codep = (state != UTF8_ACCEPT) + ? (byte & 0x3fu) | (codep << 6u) + : (0xFFu >> type) & (byte); + + state = utf8d[256u + state * 16u + type]; + return state; + } + + private: + /// the output of the serializer + output_adapter_t<char> o = nullptr; + + /// a (hopefully) large enough character buffer + std::array<char, 64> number_buffer{{}}; + + /// the locale + const std::lconv* loc = nullptr; + /// the locale's thousand separator character + const char thousands_sep = '\0'; + /// the locale's decimal point character + const char decimal_point = '\0'; + + /// string buffer + std::array<char, 512> string_buffer{{}}; + + /// the indentation character + const char indent_char; + /// the indentation string + string_t indent_string; + + /// error_handler how to react on decoding errors + const error_handler_t error_handler; +}; +} // namespace detail +} // namespace nlohmann + +// #include <nlohmann/detail/value_t.hpp> + +// #include <nlohmann/json_fwd.hpp> + + +/*! +@brief namespace for Niels Lohmann +@see https://github.com/nlohmann +@since version 1.0.0 +*/ +namespace nlohmann +{ + +/*! +@brief a class to store JSON values + +@tparam ObjectType type for JSON objects (`std::map` by default; will be used +in @ref object_t) +@tparam ArrayType type for JSON arrays (`std::vector` by default; will be used +in @ref array_t) +@tparam StringType type for JSON strings and object keys (`std::string` by +default; will be used in @ref string_t) +@tparam BooleanType type for JSON booleans (`bool` by default; will be used +in @ref boolean_t) +@tparam NumberIntegerType type for JSON integer numbers (`int64_t` by +default; will be used in @ref number_integer_t) +@tparam NumberUnsignedType type for JSON unsigned integer numbers (@c +`uint64_t` by default; will be used in @ref number_unsigned_t) +@tparam NumberFloatType type for JSON floating-point numbers (`double` by +default; will be used in @ref number_float_t) +@tparam AllocatorType type of the allocator to use (`std::allocator` by +default) +@tparam JSONSerializer the serializer to resolve internal calls to `to_json()` +and `from_json()` (@ref adl_serializer by default) + +@requirement The class satisfies the following concept requirements: +- Basic + - [DefaultConstructible](https://en.cppreference.com/w/cpp/named_req/DefaultConstructible): + JSON values can be default constructed. The result will be a JSON null + value. + - [MoveConstructible](https://en.cppreference.com/w/cpp/named_req/MoveConstructible): + A JSON value can be constructed from an rvalue argument. + - [CopyConstructible](https://en.cppreference.com/w/cpp/named_req/CopyConstructible): + A JSON value can be copy-constructed from an lvalue expression. + - [MoveAssignable](https://en.cppreference.com/w/cpp/named_req/MoveAssignable): + A JSON value van be assigned from an rvalue argument. + - [CopyAssignable](https://en.cppreference.com/w/cpp/named_req/CopyAssignable): + A JSON value can be copy-assigned from an lvalue expression. + - [Destructible](https://en.cppreference.com/w/cpp/named_req/Destructible): + JSON values can be destructed. +- Layout + - [StandardLayoutType](https://en.cppreference.com/w/cpp/named_req/StandardLayoutType): + JSON values have + [standard layout](https://en.cppreference.com/w/cpp/language/data_members#Standard_layout): + All non-static data members are private and standard layout types, the + class has no virtual functions or (virtual) base classes. +- Library-wide + - [EqualityComparable](https://en.cppreference.com/w/cpp/named_req/EqualityComparable): + JSON values can be compared with `==`, see @ref + operator==(const_reference,const_reference). + - [LessThanComparable](https://en.cppreference.com/w/cpp/named_req/LessThanComparable): + JSON values can be compared with `<`, see @ref + operator<(const_reference,const_reference). + - [Swappable](https://en.cppreference.com/w/cpp/named_req/Swappable): + Any JSON lvalue or rvalue of can be swapped with any lvalue or rvalue of + other compatible types, using unqualified function call @ref swap(). + - [NullablePointer](https://en.cppreference.com/w/cpp/named_req/NullablePointer): + JSON values can be compared against `std::nullptr_t` objects which are used + to model the `null` value. +- Container + - [Container](https://en.cppreference.com/w/cpp/named_req/Container): + JSON values can be used like STL containers and provide iterator access. + - [ReversibleContainer](https://en.cppreference.com/w/cpp/named_req/ReversibleContainer); + JSON values can be used like STL containers and provide reverse iterator + access. + +@invariant The member variables @a m_value and @a m_type have the following +relationship: +- If `m_type == value_t::object`, then `m_value.object != nullptr`. +- If `m_type == value_t::array`, then `m_value.array != nullptr`. +- If `m_type == value_t::string`, then `m_value.string != nullptr`. +The invariants are checked by member function assert_invariant(). + +@internal +@note ObjectType trick from http://stackoverflow.com/a/9860911 +@endinternal + +@see [RFC 7159: The JavaScript Object Notation (JSON) Data Interchange +Format](http://rfc7159.net/rfc7159) + +@since version 1.0.0 + +@nosubgrouping +*/ +NLOHMANN_BASIC_JSON_TPL_DECLARATION +class basic_json +{ + private: + template<detail::value_t> friend struct detail::external_constructor; + friend ::nlohmann::json_pointer<basic_json>; + friend ::nlohmann::detail::parser<basic_json>; + friend ::nlohmann::detail::serializer<basic_json>; + template<typename BasicJsonType> + friend class ::nlohmann::detail::iter_impl; + template<typename BasicJsonType, typename CharType> + friend class ::nlohmann::detail::binary_writer; + template<typename BasicJsonType, typename SAX> + friend class ::nlohmann::detail::binary_reader; + template<typename BasicJsonType> + friend class ::nlohmann::detail::json_sax_dom_parser; + template<typename BasicJsonType> + friend class ::nlohmann::detail::json_sax_dom_callback_parser; + + /// workaround type for MSVC + using basic_json_t = NLOHMANN_BASIC_JSON_TPL; + + // convenience aliases for types residing in namespace detail; + using lexer = ::nlohmann::detail::lexer<basic_json>; + using parser = ::nlohmann::detail::parser<basic_json>; + + using primitive_iterator_t = ::nlohmann::detail::primitive_iterator_t; + template<typename BasicJsonType> + using internal_iterator = ::nlohmann::detail::internal_iterator<BasicJsonType>; + template<typename BasicJsonType> + using iter_impl = ::nlohmann::detail::iter_impl<BasicJsonType>; + template<typename Iterator> + using iteration_proxy = ::nlohmann::detail::iteration_proxy<Iterator>; + template<typename Base> using json_reverse_iterator = ::nlohmann::detail::json_reverse_iterator<Base>; + + template<typename CharType> + using output_adapter_t = ::nlohmann::detail::output_adapter_t<CharType>; + + using binary_reader = ::nlohmann::detail::binary_reader<basic_json>; + template<typename CharType> using binary_writer = ::nlohmann::detail::binary_writer<basic_json, CharType>; + + using serializer = ::nlohmann::detail::serializer<basic_json>; + + public: + using value_t = detail::value_t; + /// JSON Pointer, see @ref nlohmann::json_pointer + using json_pointer = ::nlohmann::json_pointer<basic_json>; + template<typename T, typename SFINAE> + using json_serializer = JSONSerializer<T, SFINAE>; + /// how to treat decoding errors + using error_handler_t = detail::error_handler_t; + /// helper type for initializer lists of basic_json values + using initializer_list_t = std::initializer_list<detail::json_ref<basic_json>>; + + using input_format_t = detail::input_format_t; + /// SAX interface type, see @ref nlohmann::json_sax + using json_sax_t = json_sax<basic_json>; + + //////////////// + // exceptions // + //////////////// + + /// @name exceptions + /// Classes to implement user-defined exceptions. + /// @{ + + /// @copydoc detail::exception + using exception = detail::exception; + /// @copydoc detail::parse_error + using parse_error = detail::parse_error; + /// @copydoc detail::invalid_iterator + using invalid_iterator = detail::invalid_iterator; + /// @copydoc detail::type_error + using type_error = detail::type_error; + /// @copydoc detail::out_of_range + using out_of_range = detail::out_of_range; + /// @copydoc detail::other_error + using other_error = detail::other_error; + + /// @} + + + ///////////////////// + // container types // + ///////////////////// + + /// @name container types + /// The canonic container types to use @ref basic_json like any other STL + /// container. + /// @{ + + /// the type of elements in a basic_json container + using value_type = basic_json; + + /// the type of an element reference + using reference = value_type&; + /// the type of an element const reference + using const_reference = const value_type&; + + /// a type to represent differences between iterators + using difference_type = std::ptrdiff_t; + /// a type to represent container sizes + using size_type = std::size_t; + + /// the allocator type + using allocator_type = AllocatorType<basic_json>; + + /// the type of an element pointer + using pointer = typename std::allocator_traits<allocator_type>::pointer; + /// the type of an element const pointer + using const_pointer = typename std::allocator_traits<allocator_type>::const_pointer; + + /// an iterator for a basic_json container + using iterator = iter_impl<basic_json>; + /// a const iterator for a basic_json container + using const_iterator = iter_impl<const basic_json>; + /// a reverse iterator for a basic_json container + using reverse_iterator = json_reverse_iterator<typename basic_json::iterator>; + /// a const reverse iterator for a basic_json container + using const_reverse_iterator = json_reverse_iterator<typename basic_json::const_iterator>; + + /// @} + + + /*! + @brief returns the allocator associated with the container + */ + static allocator_type get_allocator() + { + return allocator_type(); + } + + /*! + @brief returns version information on the library + + This function returns a JSON object with information about the library, + including the version number and information on the platform and compiler. + + @return JSON object holding version information + key | description + ----------- | --------------- + `compiler` | Information on the used compiler. It is an object with the following keys: `c++` (the used C++ standard), `family` (the compiler family; possible values are `clang`, `icc`, `gcc`, `ilecpp`, `msvc`, `pgcpp`, `sunpro`, and `unknown`), and `version` (the compiler version). + `copyright` | The copyright line for the library as string. + `name` | The name of the library as string. + `platform` | The used platform as string. Possible values are `win32`, `linux`, `apple`, `unix`, and `unknown`. + `url` | The URL of the project as string. + `version` | The version of the library. It is an object with the following keys: `major`, `minor`, and `patch` as defined by [Semantic Versioning](http://semver.org), and `string` (the version string). + + @liveexample{The following code shows an example output of the `meta()` + function.,meta} + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @complexity Constant. + + @since 2.1.0 + */ + JSON_NODISCARD + static basic_json meta() + { + basic_json result; + + result["copyright"] = "(C) 2013-2017 Niels Lohmann"; + result["name"] = "JSON for Modern C++"; + result["url"] = "https://github.com/nlohmann/json"; + result["version"]["string"] = + std::to_string(NLOHMANN_JSON_VERSION_MAJOR) + "." + + std::to_string(NLOHMANN_JSON_VERSION_MINOR) + "." + + std::to_string(NLOHMANN_JSON_VERSION_PATCH); + result["version"]["major"] = NLOHMANN_JSON_VERSION_MAJOR; + result["version"]["minor"] = NLOHMANN_JSON_VERSION_MINOR; + result["version"]["patch"] = NLOHMANN_JSON_VERSION_PATCH; + +#ifdef _WIN32 + result["platform"] = "win32"; +#elif defined __linux__ + result["platform"] = "linux"; +#elif defined __APPLE__ + result["platform"] = "apple"; +#elif defined __unix__ + result["platform"] = "unix"; +#else + result["platform"] = "unknown"; +#endif + +#if defined(__ICC) || defined(__INTEL_COMPILER) + result["compiler"] = {{"family", "icc"}, {"version", __INTEL_COMPILER}}; +#elif defined(__clang__) + result["compiler"] = {{"family", "clang"}, {"version", __clang_version__}}; +#elif defined(__GNUC__) || defined(__GNUG__) + result["compiler"] = {{"family", "gcc"}, {"version", std::to_string(__GNUC__) + "." + std::to_string(__GNUC_MINOR__) + "." + std::to_string(__GNUC_PATCHLEVEL__)}}; +#elif defined(__HP_cc) || defined(__HP_aCC) + result["compiler"] = "hp" +#elif defined(__IBMCPP__) + result["compiler"] = {{"family", "ilecpp"}, {"version", __IBMCPP__}}; +#elif defined(_MSC_VER) + result["compiler"] = {{"family", "msvc"}, {"version", _MSC_VER}}; +#elif defined(__PGI) + result["compiler"] = {{"family", "pgcpp"}, {"version", __PGI}}; +#elif defined(__SUNPRO_CC) + result["compiler"] = {{"family", "sunpro"}, {"version", __SUNPRO_CC}}; +#else + result["compiler"] = {{"family", "unknown"}, {"version", "unknown"}}; +#endif + +#ifdef __cplusplus + result["compiler"]["c++"] = std::to_string(__cplusplus); +#else + result["compiler"]["c++"] = "unknown"; +#endif + return result; + } + + + /////////////////////////// + // JSON value data types // + /////////////////////////// + + /// @name JSON value data types + /// The data types to store a JSON value. These types are derived from + /// the template arguments passed to class @ref basic_json. + /// @{ + +#if defined(JSON_HAS_CPP_14) + // Use transparent comparator if possible, combined with perfect forwarding + // on find() and count() calls prevents unnecessary string construction. + using object_comparator_t = std::less<>; +#else + using object_comparator_t = std::less<StringType>; +#endif + + /*! + @brief a type for an object + + [RFC 7159](http://rfc7159.net/rfc7159) describes JSON objects as follows: + > An object is an unordered collection of zero or more name/value pairs, + > where a name is a string and a value is a string, number, boolean, null, + > object, or array. + + To store objects in C++, a type is defined by the template parameters + described below. + + @tparam ObjectType the container to store objects (e.g., `std::map` or + `std::unordered_map`) + @tparam StringType the type of the keys or names (e.g., `std::string`). + The comparison function `std::less<StringType>` is used to order elements + inside the container. + @tparam AllocatorType the allocator to use for objects (e.g., + `std::allocator`) + + #### Default type + + With the default values for @a ObjectType (`std::map`), @a StringType + (`std::string`), and @a AllocatorType (`std::allocator`), the default + value for @a object_t is: + + @code {.cpp} + std::map< + std::string, // key_type + basic_json, // value_type + std::less<std::string>, // key_compare + std::allocator<std::pair<const std::string, basic_json>> // allocator_type + > + @endcode + + #### Behavior + + The choice of @a object_t influences the behavior of the JSON class. With + the default type, objects have the following behavior: + + - When all names are unique, objects will be interoperable in the sense + that all software implementations receiving that object will agree on + the name-value mappings. + - When the names within an object are not unique, it is unspecified which + one of the values for a given key will be chosen. For instance, + `{"key": 2, "key": 1}` could be equal to either `{"key": 1}` or + `{"key": 2}`. + - Internally, name/value pairs are stored in lexicographical order of the + names. Objects will also be serialized (see @ref dump) in this order. + For instance, `{"b": 1, "a": 2}` and `{"a": 2, "b": 1}` will be stored + and serialized as `{"a": 2, "b": 1}`. + - When comparing objects, the order of the name/value pairs is irrelevant. + This makes objects interoperable in the sense that they will not be + affected by these differences. For instance, `{"b": 1, "a": 2}` and + `{"a": 2, "b": 1}` will be treated as equal. + + #### Limits + + [RFC 7159](http://rfc7159.net/rfc7159) specifies: + > An implementation may set limits on the maximum depth of nesting. + + In this class, the object's limit of nesting is not explicitly constrained. + However, a maximum depth of nesting may be introduced by the compiler or + runtime environment. A theoretical limit can be queried by calling the + @ref max_size function of a JSON object. + + #### Storage + + Objects are stored as pointers in a @ref basic_json type. That is, for any + access to object values, a pointer of type `object_t*` must be + dereferenced. + + @sa @ref array_t -- type for an array value + + @since version 1.0.0 + + @note The order name/value pairs are added to the object is *not* + preserved by the library. Therefore, iterating an object may return + name/value pairs in a different order than they were originally stored. In + fact, keys will be traversed in alphabetical order as `std::map` with + `std::less` is used by default. Please note this behavior conforms to [RFC + 7159](http://rfc7159.net/rfc7159), because any order implements the + specified "unordered" nature of JSON objects. + */ + using object_t = ObjectType<StringType, + basic_json, + object_comparator_t, + AllocatorType<std::pair<const StringType, + basic_json>>>; + + /*! + @brief a type for an array + + [RFC 7159](http://rfc7159.net/rfc7159) describes JSON arrays as follows: + > An array is an ordered sequence of zero or more values. + + To store objects in C++, a type is defined by the template parameters + explained below. + + @tparam ArrayType container type to store arrays (e.g., `std::vector` or + `std::list`) + @tparam AllocatorType allocator to use for arrays (e.g., `std::allocator`) + + #### Default type + + With the default values for @a ArrayType (`std::vector`) and @a + AllocatorType (`std::allocator`), the default value for @a array_t is: + + @code {.cpp} + std::vector< + basic_json, // value_type + std::allocator<basic_json> // allocator_type + > + @endcode + + #### Limits + + [RFC 7159](http://rfc7159.net/rfc7159) specifies: + > An implementation may set limits on the maximum depth of nesting. + + In this class, the array's limit of nesting is not explicitly constrained. + However, a maximum depth of nesting may be introduced by the compiler or + runtime environment. A theoretical limit can be queried by calling the + @ref max_size function of a JSON array. + + #### Storage + + Arrays are stored as pointers in a @ref basic_json type. That is, for any + access to array values, a pointer of type `array_t*` must be dereferenced. + + @sa @ref object_t -- type for an object value + + @since version 1.0.0 + */ + using array_t = ArrayType<basic_json, AllocatorType<basic_json>>; + + /*! + @brief a type for a string + + [RFC 7159](http://rfc7159.net/rfc7159) describes JSON strings as follows: + > A string is a sequence of zero or more Unicode characters. + + To store objects in C++, a type is defined by the template parameter + described below. Unicode values are split by the JSON class into + byte-sized characters during deserialization. + + @tparam StringType the container to store strings (e.g., `std::string`). + Note this container is used for keys/names in objects, see @ref object_t. + + #### Default type + + With the default values for @a StringType (`std::string`), the default + value for @a string_t is: + + @code {.cpp} + std::string + @endcode + + #### Encoding + + Strings are stored in UTF-8 encoding. Therefore, functions like + `std::string::size()` or `std::string::length()` return the number of + bytes in the string rather than the number of characters or glyphs. + + #### String comparison + + [RFC 7159](http://rfc7159.net/rfc7159) states: + > Software implementations are typically required to test names of object + > members for equality. Implementations that transform the textual + > representation into sequences of Unicode code units and then perform the + > comparison numerically, code unit by code unit, are interoperable in the + > sense that implementations will agree in all cases on equality or + > inequality of two strings. For example, implementations that compare + > strings with escaped characters unconverted may incorrectly find that + > `"a\\b"` and `"a\u005Cb"` are not equal. + + This implementation is interoperable as it does compare strings code unit + by code unit. + + #### Storage + + String values are stored as pointers in a @ref basic_json type. That is, + for any access to string values, a pointer of type `string_t*` must be + dereferenced. + + @since version 1.0.0 + */ + using string_t = StringType; + + /*! + @brief a type for a boolean + + [RFC 7159](http://rfc7159.net/rfc7159) implicitly describes a boolean as a + type which differentiates the two literals `true` and `false`. + + To store objects in C++, a type is defined by the template parameter @a + BooleanType which chooses the type to use. + + #### Default type + + With the default values for @a BooleanType (`bool`), the default value for + @a boolean_t is: + + @code {.cpp} + bool + @endcode + + #### Storage + + Boolean values are stored directly inside a @ref basic_json type. + + @since version 1.0.0 + */ + using boolean_t = BooleanType; + + /*! + @brief a type for a number (integer) + + [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: + > The representation of numbers is similar to that used in most + > programming languages. A number is represented in base 10 using decimal + > digits. It contains an integer component that may be prefixed with an + > optional minus sign, which may be followed by a fraction part and/or an + > exponent part. Leading zeros are not allowed. (...) Numeric values that + > cannot be represented in the grammar below (such as Infinity and NaN) + > are not permitted. + + This description includes both integer and floating-point numbers. + However, C++ allows more precise storage if it is known whether the number + is a signed integer, an unsigned integer or a floating-point number. + Therefore, three different types, @ref number_integer_t, @ref + number_unsigned_t and @ref number_float_t are used. + + To store integer numbers in C++, a type is defined by the template + parameter @a NumberIntegerType which chooses the type to use. + + #### Default type + + With the default values for @a NumberIntegerType (`int64_t`), the default + value for @a number_integer_t is: + + @code {.cpp} + int64_t + @endcode + + #### Default behavior + + - The restrictions about leading zeros is not enforced in C++. Instead, + leading zeros in integer literals lead to an interpretation as octal + number. Internally, the value will be stored as decimal number. For + instance, the C++ integer literal `010` will be serialized to `8`. + During deserialization, leading zeros yield an error. + - Not-a-number (NaN) values will be serialized to `null`. + + #### Limits + + [RFC 7159](http://rfc7159.net/rfc7159) specifies: + > An implementation may set limits on the range and precision of numbers. + + When the default type is used, the maximal integer number that can be + stored is `9223372036854775807` (INT64_MAX) and the minimal integer number + that can be stored is `-9223372036854775808` (INT64_MIN). Integer numbers + that are out of range will yield over/underflow when used in a + constructor. During deserialization, too large or small integer numbers + will be automatically be stored as @ref number_unsigned_t or @ref + number_float_t. + + [RFC 7159](http://rfc7159.net/rfc7159) further states: + > Note that when such software is used, numbers that are integers and are + > in the range \f$[-2^{53}+1, 2^{53}-1]\f$ are interoperable in the sense + > that implementations will agree exactly on their numeric values. + + As this range is a subrange of the exactly supported range [INT64_MIN, + INT64_MAX], this class's integer type is interoperable. + + #### Storage + + Integer number values are stored directly inside a @ref basic_json type. + + @sa @ref number_float_t -- type for number values (floating-point) + + @sa @ref number_unsigned_t -- type for number values (unsigned integer) + + @since version 1.0.0 + */ + using number_integer_t = NumberIntegerType; + + /*! + @brief a type for a number (unsigned) + + [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: + > The representation of numbers is similar to that used in most + > programming languages. A number is represented in base 10 using decimal + > digits. It contains an integer component that may be prefixed with an + > optional minus sign, which may be followed by a fraction part and/or an + > exponent part. Leading zeros are not allowed. (...) Numeric values that + > cannot be represented in the grammar below (such as Infinity and NaN) + > are not permitted. + + This description includes both integer and floating-point numbers. + However, C++ allows more precise storage if it is known whether the number + is a signed integer, an unsigned integer or a floating-point number. + Therefore, three different types, @ref number_integer_t, @ref + number_unsigned_t and @ref number_float_t are used. + + To store unsigned integer numbers in C++, a type is defined by the + template parameter @a NumberUnsignedType which chooses the type to use. + + #### Default type + + With the default values for @a NumberUnsignedType (`uint64_t`), the + default value for @a number_unsigned_t is: + + @code {.cpp} + uint64_t + @endcode + + #### Default behavior + + - The restrictions about leading zeros is not enforced in C++. Instead, + leading zeros in integer literals lead to an interpretation as octal + number. Internally, the value will be stored as decimal number. For + instance, the C++ integer literal `010` will be serialized to `8`. + During deserialization, leading zeros yield an error. + - Not-a-number (NaN) values will be serialized to `null`. + + #### Limits + + [RFC 7159](http://rfc7159.net/rfc7159) specifies: + > An implementation may set limits on the range and precision of numbers. + + When the default type is used, the maximal integer number that can be + stored is `18446744073709551615` (UINT64_MAX) and the minimal integer + number that can be stored is `0`. Integer numbers that are out of range + will yield over/underflow when used in a constructor. During + deserialization, too large or small integer numbers will be automatically + be stored as @ref number_integer_t or @ref number_float_t. + + [RFC 7159](http://rfc7159.net/rfc7159) further states: + > Note that when such software is used, numbers that are integers and are + > in the range \f$[-2^{53}+1, 2^{53}-1]\f$ are interoperable in the sense + > that implementations will agree exactly on their numeric values. + + As this range is a subrange (when considered in conjunction with the + number_integer_t type) of the exactly supported range [0, UINT64_MAX], + this class's integer type is interoperable. + + #### Storage + + Integer number values are stored directly inside a @ref basic_json type. + + @sa @ref number_float_t -- type for number values (floating-point) + @sa @ref number_integer_t -- type for number values (integer) + + @since version 2.0.0 + */ + using number_unsigned_t = NumberUnsignedType; + + /*! + @brief a type for a number (floating-point) + + [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: + > The representation of numbers is similar to that used in most + > programming languages. A number is represented in base 10 using decimal + > digits. It contains an integer component that may be prefixed with an + > optional minus sign, which may be followed by a fraction part and/or an + > exponent part. Leading zeros are not allowed. (...) Numeric values that + > cannot be represented in the grammar below (such as Infinity and NaN) + > are not permitted. + + This description includes both integer and floating-point numbers. + However, C++ allows more precise storage if it is known whether the number + is a signed integer, an unsigned integer or a floating-point number. + Therefore, three different types, @ref number_integer_t, @ref + number_unsigned_t and @ref number_float_t are used. + + To store floating-point numbers in C++, a type is defined by the template + parameter @a NumberFloatType which chooses the type to use. + + #### Default type + + With the default values for @a NumberFloatType (`double`), the default + value for @a number_float_t is: + + @code {.cpp} + double + @endcode + + #### Default behavior + + - The restrictions about leading zeros is not enforced in C++. Instead, + leading zeros in floating-point literals will be ignored. Internally, + the value will be stored as decimal number. For instance, the C++ + floating-point literal `01.2` will be serialized to `1.2`. During + deserialization, leading zeros yield an error. + - Not-a-number (NaN) values will be serialized to `null`. + + #### Limits + + [RFC 7159](http://rfc7159.net/rfc7159) states: + > This specification allows implementations to set limits on the range and + > precision of numbers accepted. Since software that implements IEEE + > 754-2008 binary64 (double precision) numbers is generally available and + > widely used, good interoperability can be achieved by implementations + > that expect no more precision or range than these provide, in the sense + > that implementations will approximate JSON numbers within the expected + > precision. + + This implementation does exactly follow this approach, as it uses double + precision floating-point numbers. Note values smaller than + `-1.79769313486232e+308` and values greater than `1.79769313486232e+308` + will be stored as NaN internally and be serialized to `null`. + + #### Storage + + Floating-point number values are stored directly inside a @ref basic_json + type. + + @sa @ref number_integer_t -- type for number values (integer) + + @sa @ref number_unsigned_t -- type for number values (unsigned integer) + + @since version 1.0.0 + */ + using number_float_t = NumberFloatType; + + /// @} + + private: + + /// helper for exception-safe object creation + template<typename T, typename... Args> + static T* create(Args&& ... args) + { + AllocatorType<T> alloc; + using AllocatorTraits = std::allocator_traits<AllocatorType<T>>; + + auto deleter = [&](T * object) + { + AllocatorTraits::deallocate(alloc, object, 1); + }; + std::unique_ptr<T, decltype(deleter)> object(AllocatorTraits::allocate(alloc, 1), deleter); + AllocatorTraits::construct(alloc, object.get(), std::forward<Args>(args)...); + assert(object != nullptr); + return object.release(); + } + + //////////////////////// + // JSON value storage // + //////////////////////// + + /*! + @brief a JSON value + + The actual storage for a JSON value of the @ref basic_json class. This + union combines the different storage types for the JSON value types + defined in @ref value_t. + + JSON type | value_t type | used type + --------- | --------------- | ------------------------ + object | object | pointer to @ref object_t + array | array | pointer to @ref array_t + string | string | pointer to @ref string_t + boolean | boolean | @ref boolean_t + number | number_integer | @ref number_integer_t + number | number_unsigned | @ref number_unsigned_t + number | number_float | @ref number_float_t + null | null | *no value is stored* + + @note Variable-length types (objects, arrays, and strings) are stored as + pointers. The size of the union should not exceed 64 bits if the default + value types are used. + + @since version 1.0.0 + */ + union json_value + { + /// object (stored with pointer to save storage) + object_t* object; + /// array (stored with pointer to save storage) + array_t* array; + /// string (stored with pointer to save storage) + string_t* string; + /// boolean + boolean_t boolean; + /// number (integer) + number_integer_t number_integer; + /// number (unsigned integer) + number_unsigned_t number_unsigned; + /// number (floating-point) + number_float_t number_float; + + /// default constructor (for null values) + json_value() = default; + /// constructor for booleans + json_value(boolean_t v) noexcept : boolean(v) {} + /// constructor for numbers (integer) + json_value(number_integer_t v) noexcept : number_integer(v) {} + /// constructor for numbers (unsigned) + json_value(number_unsigned_t v) noexcept : number_unsigned(v) {} + /// constructor for numbers (floating-point) + json_value(number_float_t v) noexcept : number_float(v) {} + /// constructor for empty values of a given type + json_value(value_t t) + { + switch (t) + { + case value_t::object: + { + object = create<object_t>(); + break; + } + + case value_t::array: + { + array = create<array_t>(); + break; + } + + case value_t::string: + { + string = create<string_t>(""); + break; + } + + case value_t::boolean: + { + boolean = boolean_t(false); + break; + } + + case value_t::number_integer: + { + number_integer = number_integer_t(0); + break; + } + + case value_t::number_unsigned: + { + number_unsigned = number_unsigned_t(0); + break; + } + + case value_t::number_float: + { + number_float = number_float_t(0.0); + break; + } + + case value_t::null: + { + object = nullptr; // silence warning, see #821 + break; + } + + default: + { + object = nullptr; // silence warning, see #821 + if (JSON_UNLIKELY(t == value_t::null)) + { + JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.6.1")); // LCOV_EXCL_LINE + } + break; + } + } + } + + /// constructor for strings + json_value(const string_t& value) + { + string = create<string_t>(value); + } + + /// constructor for rvalue strings + json_value(string_t&& value) + { + string = create<string_t>(std::move(value)); + } + + /// constructor for objects + json_value(const object_t& value) + { + object = create<object_t>(value); + } + + /// constructor for rvalue objects + json_value(object_t&& value) + { + object = create<object_t>(std::move(value)); + } + + /// constructor for arrays + json_value(const array_t& value) + { + array = create<array_t>(value); + } + + /// constructor for rvalue arrays + json_value(array_t&& value) + { + array = create<array_t>(std::move(value)); + } + + void destroy(value_t t) noexcept + { + switch (t) + { + case value_t::object: + { + AllocatorType<object_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, object); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, object, 1); + break; + } + + case value_t::array: + { + AllocatorType<array_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, array); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, array, 1); + break; + } + + case value_t::string: + { + AllocatorType<string_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, string); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, string, 1); + break; + } + + default: + { + break; + } + } + } + }; + + /*! + @brief checks the class invariants + + This function asserts the class invariants. It needs to be called at the + end of every constructor to make sure that created objects respect the + invariant. Furthermore, it has to be called each time the type of a JSON + value is changed, because the invariant expresses a relationship between + @a m_type and @a m_value. + */ + void assert_invariant() const noexcept + { + assert(m_type != value_t::object or m_value.object != nullptr); + assert(m_type != value_t::array or m_value.array != nullptr); + assert(m_type != value_t::string or m_value.string != nullptr); + } + + public: + ////////////////////////// + // JSON parser callback // + ////////////////////////// + + /*! + @brief parser event types + + The parser callback distinguishes the following events: + - `object_start`: the parser read `{` and started to process a JSON object + - `key`: the parser read a key of a value in an object + - `object_end`: the parser read `}` and finished processing a JSON object + - `array_start`: the parser read `[` and started to process a JSON array + - `array_end`: the parser read `]` and finished processing a JSON array + - `value`: the parser finished reading a JSON value + + @image html callback_events.png "Example when certain parse events are triggered" + + @sa @ref parser_callback_t for more information and examples + */ + using parse_event_t = typename parser::parse_event_t; + + /*! + @brief per-element parser callback type + + With a parser callback function, the result of parsing a JSON text can be + influenced. When passed to @ref parse, it is called on certain events + (passed as @ref parse_event_t via parameter @a event) with a set recursion + depth @a depth and context JSON value @a parsed. The return value of the + callback function is a boolean indicating whether the element that emitted + the callback shall be kept or not. + + We distinguish six scenarios (determined by the event type) in which the + callback function can be called. The following table describes the values + of the parameters @a depth, @a event, and @a parsed. + + parameter @a event | description | parameter @a depth | parameter @a parsed + ------------------ | ----------- | ------------------ | ------------------- + parse_event_t::object_start | the parser read `{` and started to process a JSON object | depth of the parent of the JSON object | a JSON value with type discarded + parse_event_t::key | the parser read a key of a value in an object | depth of the currently parsed JSON object | a JSON string containing the key + parse_event_t::object_end | the parser read `}` and finished processing a JSON object | depth of the parent of the JSON object | the parsed JSON object + parse_event_t::array_start | the parser read `[` and started to process a JSON array | depth of the parent of the JSON array | a JSON value with type discarded + parse_event_t::array_end | the parser read `]` and finished processing a JSON array | depth of the parent of the JSON array | the parsed JSON array + parse_event_t::value | the parser finished reading a JSON value | depth of the value | the parsed JSON value + + @image html callback_events.png "Example when certain parse events are triggered" + + Discarding a value (i.e., returning `false`) has different effects + depending on the context in which function was called: + + - Discarded values in structured types are skipped. That is, the parser + will behave as if the discarded value was never read. + - In case a value outside a structured type is skipped, it is replaced + with `null`. This case happens if the top-level element is skipped. + + @param[in] depth the depth of the recursion during parsing + + @param[in] event an event of type parse_event_t indicating the context in + the callback function has been called + + @param[in,out] parsed the current intermediate parse result; note that + writing to this value has no effect for parse_event_t::key events + + @return Whether the JSON value which called the function during parsing + should be kept (`true`) or not (`false`). In the latter case, it is either + skipped completely or replaced by an empty discarded object. + + @sa @ref parse for examples + + @since version 1.0.0 + */ + using parser_callback_t = typename parser::parser_callback_t; + + ////////////////// + // constructors // + ////////////////// + + /// @name constructors and destructors + /// Constructors of class @ref basic_json, copy/move constructor, copy + /// assignment, static functions creating objects, and the destructor. + /// @{ + + /*! + @brief create an empty value with a given type + + Create an empty JSON value with a given type. The value will be default + initialized with an empty value which depends on the type: + + Value type | initial value + ----------- | ------------- + null | `null` + boolean | `false` + string | `""` + number | `0` + object | `{}` + array | `[]` + + @param[in] v the type of the value to create + + @complexity Constant. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The following code shows the constructor for different @ref + value_t values,basic_json__value_t} + + @sa @ref clear() -- restores the postcondition of this constructor + + @since version 1.0.0 + */ + basic_json(const value_t v) + : m_type(v), m_value(v) + { + assert_invariant(); + } + + /*! + @brief create a null object + + Create a `null` JSON value. It either takes a null pointer as parameter + (explicitly creating `null`) or no parameter (implicitly creating `null`). + The passed null pointer itself is not read -- it is only used to choose + the right constructor. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this constructor never throws + exceptions. + + @liveexample{The following code shows the constructor with and without a + null pointer parameter.,basic_json__nullptr_t} + + @since version 1.0.0 + */ + basic_json(std::nullptr_t = nullptr) noexcept + : basic_json(value_t::null) + { + assert_invariant(); + } + + /*! + @brief create a JSON value + + This is a "catch all" constructor for all compatible JSON types; that is, + types for which a `to_json()` method exists. The constructor forwards the + parameter @a val to that method (to `json_serializer<U>::to_json` method + with `U = uncvref_t<CompatibleType>`, to be exact). + + Template type @a CompatibleType includes, but is not limited to, the + following types: + - **arrays**: @ref array_t and all kinds of compatible containers such as + `std::vector`, `std::deque`, `std::list`, `std::forward_list`, + `std::array`, `std::valarray`, `std::set`, `std::unordered_set`, + `std::multiset`, and `std::unordered_multiset` with a `value_type` from + which a @ref basic_json value can be constructed. + - **objects**: @ref object_t and all kinds of compatible associative + containers such as `std::map`, `std::unordered_map`, `std::multimap`, + and `std::unordered_multimap` with a `key_type` compatible to + @ref string_t and a `value_type` from which a @ref basic_json value can + be constructed. + - **strings**: @ref string_t, string literals, and all compatible string + containers can be used. + - **numbers**: @ref number_integer_t, @ref number_unsigned_t, + @ref number_float_t, and all convertible number types such as `int`, + `size_t`, `int64_t`, `float` or `double` can be used. + - **boolean**: @ref boolean_t / `bool` can be used. + + See the examples below. + + @tparam CompatibleType a type such that: + - @a CompatibleType is not derived from `std::istream`, + - @a CompatibleType is not @ref basic_json (to avoid hijacking copy/move + constructors), + - @a CompatibleType is not a different @ref basic_json type (i.e. with different template arguments) + - @a CompatibleType is not a @ref basic_json nested type (e.g., + @ref json_pointer, @ref iterator, etc ...) + - @ref @ref json_serializer<U> has a + `to_json(basic_json_t&, CompatibleType&&)` method + + @tparam U = `uncvref_t<CompatibleType>` + + @param[in] val the value to be forwarded to the respective constructor + + @complexity Usually linear in the size of the passed @a val, also + depending on the implementation of the called `to_json()` + method. + + @exceptionsafety Depends on the called constructor. For types directly + supported by the library (i.e., all types for which no `to_json()` function + was provided), strong guarantee holds: if an exception is thrown, there are + no changes to any JSON value. + + @liveexample{The following code shows the constructor with several + compatible types.,basic_json__CompatibleType} + + @since version 2.1.0 + */ + template <typename CompatibleType, + typename U = detail::uncvref_t<CompatibleType>, + detail::enable_if_t< + not detail::is_basic_json<U>::value and detail::is_compatible_type<basic_json_t, U>::value, int> = 0> + basic_json(CompatibleType && val) noexcept(noexcept( + JSONSerializer<U>::to_json(std::declval<basic_json_t&>(), + std::forward<CompatibleType>(val)))) + { + JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val)); + assert_invariant(); + } + + /*! + @brief create a JSON value from an existing one + + This is a constructor for existing @ref basic_json types. + It does not hijack copy/move constructors, since the parameter has different + template arguments than the current ones. + + The constructor tries to convert the internal @ref m_value of the parameter. + + @tparam BasicJsonType a type such that: + - @a BasicJsonType is a @ref basic_json type. + - @a BasicJsonType has different template arguments than @ref basic_json_t. + + @param[in] val the @ref basic_json value to be converted. + + @complexity Usually linear in the size of the passed @a val, also + depending on the implementation of the called `to_json()` + method. + + @exceptionsafety Depends on the called constructor. For types directly + supported by the library (i.e., all types for which no `to_json()` function + was provided), strong guarantee holds: if an exception is thrown, there are + no changes to any JSON value. + + @since version 3.2.0 + */ + template <typename BasicJsonType, + detail::enable_if_t< + detail::is_basic_json<BasicJsonType>::value and not std::is_same<basic_json, BasicJsonType>::value, int> = 0> + basic_json(const BasicJsonType& val) + { + using other_boolean_t = typename BasicJsonType::boolean_t; + using other_number_float_t = typename BasicJsonType::number_float_t; + using other_number_integer_t = typename BasicJsonType::number_integer_t; + using other_number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using other_string_t = typename BasicJsonType::string_t; + using other_object_t = typename BasicJsonType::object_t; + using other_array_t = typename BasicJsonType::array_t; + + switch (val.type()) + { + case value_t::boolean: + JSONSerializer<other_boolean_t>::to_json(*this, val.template get<other_boolean_t>()); + break; + case value_t::number_float: + JSONSerializer<other_number_float_t>::to_json(*this, val.template get<other_number_float_t>()); + break; + case value_t::number_integer: + JSONSerializer<other_number_integer_t>::to_json(*this, val.template get<other_number_integer_t>()); + break; + case value_t::number_unsigned: + JSONSerializer<other_number_unsigned_t>::to_json(*this, val.template get<other_number_unsigned_t>()); + break; + case value_t::string: + JSONSerializer<other_string_t>::to_json(*this, val.template get_ref<const other_string_t&>()); + break; + case value_t::object: + JSONSerializer<other_object_t>::to_json(*this, val.template get_ref<const other_object_t&>()); + break; + case value_t::array: + JSONSerializer<other_array_t>::to_json(*this, val.template get_ref<const other_array_t&>()); + break; + case value_t::null: + *this = nullptr; + break; + case value_t::discarded: + m_type = value_t::discarded; + break; + default: // LCOV_EXCL_LINE + assert(false); // LCOV_EXCL_LINE + } + assert_invariant(); + } + + /*! + @brief create a container (array or object) from an initializer list + + Creates a JSON value of type array or object from the passed initializer + list @a init. In case @a type_deduction is `true` (default), the type of + the JSON value to be created is deducted from the initializer list @a init + according to the following rules: + + 1. If the list is empty, an empty JSON object value `{}` is created. + 2. If the list consists of pairs whose first element is a string, a JSON + object value is created where the first elements of the pairs are + treated as keys and the second elements are as values. + 3. In all other cases, an array is created. + + The rules aim to create the best fit between a C++ initializer list and + JSON values. The rationale is as follows: + + 1. The empty initializer list is written as `{}` which is exactly an empty + JSON object. + 2. C++ has no way of describing mapped types other than to list a list of + pairs. As JSON requires that keys must be of type string, rule 2 is the + weakest constraint one can pose on initializer lists to interpret them + as an object. + 3. In all other cases, the initializer list could not be interpreted as + JSON object type, so interpreting it as JSON array type is safe. + + With the rules described above, the following JSON values cannot be + expressed by an initializer list: + + - the empty array (`[]`): use @ref array(initializer_list_t) + with an empty initializer list in this case + - arrays whose elements satisfy rule 2: use @ref + array(initializer_list_t) with the same initializer list + in this case + + @note When used without parentheses around an empty initializer list, @ref + basic_json() is called instead of this function, yielding the JSON null + value. + + @param[in] init initializer list with JSON values + + @param[in] type_deduction internal parameter; when set to `true`, the type + of the JSON value is deducted from the initializer list @a init; when set + to `false`, the type provided via @a manual_type is forced. This mode is + used by the functions @ref array(initializer_list_t) and + @ref object(initializer_list_t). + + @param[in] manual_type internal parameter; when @a type_deduction is set + to `false`, the created JSON value will use the provided type (only @ref + value_t::array and @ref value_t::object are valid); when @a type_deduction + is set to `true`, this parameter has no effect + + @throw type_error.301 if @a type_deduction is `false`, @a manual_type is + `value_t::object`, but @a init contains an element which is not a pair + whose first element is a string. In this case, the constructor could not + create an object. If @a type_deduction would have be `true`, an array + would have been created. See @ref object(initializer_list_t) + for an example. + + @complexity Linear in the size of the initializer list @a init. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The example below shows how JSON values are created from + initializer lists.,basic_json__list_init_t} + + @sa @ref array(initializer_list_t) -- create a JSON array + value from an initializer list + @sa @ref object(initializer_list_t) -- create a JSON object + value from an initializer list + + @since version 1.0.0 + */ + basic_json(initializer_list_t init, + bool type_deduction = true, + value_t manual_type = value_t::array) + { + // check if each element is an array with two elements whose first + // element is a string + bool is_an_object = std::all_of(init.begin(), init.end(), + [](const detail::json_ref<basic_json>& element_ref) + { + return element_ref->is_array() and element_ref->size() == 2 and (*element_ref)[0].is_string(); + }); + + // adjust type if type deduction is not wanted + if (not type_deduction) + { + // if array is wanted, do not create an object though possible + if (manual_type == value_t::array) + { + is_an_object = false; + } + + // if object is wanted but impossible, throw an exception + if (JSON_UNLIKELY(manual_type == value_t::object and not is_an_object)) + { + JSON_THROW(type_error::create(301, "cannot create object from initializer list")); + } + } + + if (is_an_object) + { + // the initializer list is a list of pairs -> create object + m_type = value_t::object; + m_value = value_t::object; + + std::for_each(init.begin(), init.end(), [this](const detail::json_ref<basic_json>& element_ref) + { + auto element = element_ref.moved_or_copied(); + m_value.object->emplace( + std::move(*((*element.m_value.array)[0].m_value.string)), + std::move((*element.m_value.array)[1])); + }); + } + else + { + // the initializer list describes an array -> create array + m_type = value_t::array; + m_value.array = create<array_t>(init.begin(), init.end()); + } + + assert_invariant(); + } + + /*! + @brief explicitly create an array from an initializer list + + Creates a JSON array value from a given initializer list. That is, given a + list of values `a, b, c`, creates the JSON value `[a, b, c]`. If the + initializer list is empty, the empty array `[]` is created. + + @note This function is only needed to express two edge cases that cannot + be realized with the initializer list constructor (@ref + basic_json(initializer_list_t, bool, value_t)). These cases + are: + 1. creating an array whose elements are all pairs whose first element is a + string -- in this case, the initializer list constructor would create an + object, taking the first elements as keys + 2. creating an empty array -- passing the empty initializer list to the + initializer list constructor yields an empty object + + @param[in] init initializer list with JSON values to create an array from + (optional) + + @return JSON array value + + @complexity Linear in the size of @a init. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The following code shows an example for the `array` + function.,array} + + @sa @ref basic_json(initializer_list_t, bool, value_t) -- + create a JSON value from an initializer list + @sa @ref object(initializer_list_t) -- create a JSON object + value from an initializer list + + @since version 1.0.0 + */ + JSON_NODISCARD + static basic_json array(initializer_list_t init = {}) + { + return basic_json(init, false, value_t::array); + } + + /*! + @brief explicitly create an object from an initializer list + + Creates a JSON object value from a given initializer list. The initializer + lists elements must be pairs, and their first elements must be strings. If + the initializer list is empty, the empty object `{}` is created. + + @note This function is only added for symmetry reasons. In contrast to the + related function @ref array(initializer_list_t), there are + no cases which can only be expressed by this function. That is, any + initializer list @a init can also be passed to the initializer list + constructor @ref basic_json(initializer_list_t, bool, value_t). + + @param[in] init initializer list to create an object from (optional) + + @return JSON object value + + @throw type_error.301 if @a init is not a list of pairs whose first + elements are strings. In this case, no object can be created. When such a + value is passed to @ref basic_json(initializer_list_t, bool, value_t), + an array would have been created from the passed initializer list @a init. + See example below. + + @complexity Linear in the size of @a init. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The following code shows an example for the `object` + function.,object} + + @sa @ref basic_json(initializer_list_t, bool, value_t) -- + create a JSON value from an initializer list + @sa @ref array(initializer_list_t) -- create a JSON array + value from an initializer list + + @since version 1.0.0 + */ + JSON_NODISCARD + static basic_json object(initializer_list_t init = {}) + { + return basic_json(init, false, value_t::object); + } + + /*! + @brief construct an array with count copies of given value + + Constructs a JSON array value by creating @a cnt copies of a passed value. + In case @a cnt is `0`, an empty array is created. + + @param[in] cnt the number of JSON copies of @a val to create + @param[in] val the JSON value to copy + + @post `std::distance(begin(),end()) == cnt` holds. + + @complexity Linear in @a cnt. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The following code shows examples for the @ref + basic_json(size_type\, const basic_json&) + constructor.,basic_json__size_type_basic_json} + + @since version 1.0.0 + */ + basic_json(size_type cnt, const basic_json& val) + : m_type(value_t::array) + { + m_value.array = create<array_t>(cnt, val); + assert_invariant(); + } + + /*! + @brief construct a JSON container given an iterator range + + Constructs the JSON value with the contents of the range `[first, last)`. + The semantics depends on the different types a JSON value can have: + - In case of a null type, invalid_iterator.206 is thrown. + - In case of other primitive types (number, boolean, or string), @a first + must be `begin()` and @a last must be `end()`. In this case, the value is + copied. Otherwise, invalid_iterator.204 is thrown. + - In case of structured types (array, object), the constructor behaves as + similar versions for `std::vector` or `std::map`; that is, a JSON array + or object is constructed from the values in the range. + + @tparam InputIT an input iterator type (@ref iterator or @ref + const_iterator) + + @param[in] first begin of the range to copy from (included) + @param[in] last end of the range to copy from (excluded) + + @pre Iterators @a first and @a last must be initialized. **This + precondition is enforced with an assertion (see warning).** If + assertions are switched off, a violation of this precondition yields + undefined behavior. + + @pre Range `[first, last)` is valid. Usually, this precondition cannot be + checked efficiently. Only certain edge cases are detected; see the + description of the exceptions below. A violation of this precondition + yields undefined behavior. + + @warning A precondition is enforced with a runtime assertion that will + result in calling `std::abort` if this precondition is not met. + Assertions can be disabled by defining `NDEBUG` at compile time. + See https://en.cppreference.com/w/cpp/error/assert for more + information. + + @throw invalid_iterator.201 if iterators @a first and @a last are not + compatible (i.e., do not belong to the same JSON value). In this case, + the range `[first, last)` is undefined. + @throw invalid_iterator.204 if iterators @a first and @a last belong to a + primitive type (number, boolean, or string), but @a first does not point + to the first element any more. In this case, the range `[first, last)` is + undefined. See example code below. + @throw invalid_iterator.206 if iterators @a first and @a last belong to a + null value. In this case, the range `[first, last)` is undefined. + + @complexity Linear in distance between @a first and @a last. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The example below shows several ways to create JSON values by + specifying a subrange with iterators.,basic_json__InputIt_InputIt} + + @since version 1.0.0 + */ + template<class InputIT, typename std::enable_if< + std::is_same<InputIT, typename basic_json_t::iterator>::value or + std::is_same<InputIT, typename basic_json_t::const_iterator>::value, int>::type = 0> + basic_json(InputIT first, InputIT last) + { + assert(first.m_object != nullptr); + assert(last.m_object != nullptr); + + // make sure iterator fits the current value + if (JSON_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(201, "iterators are not compatible")); + } + + // copy type from first iterator + m_type = first.m_object->m_type; + + // check if iterator range is complete for primitive values + switch (m_type) + { + case value_t::boolean: + case value_t::number_float: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::string: + { + if (JSON_UNLIKELY(not first.m_it.primitive_iterator.is_begin() + or not last.m_it.primitive_iterator.is_end())) + { + JSON_THROW(invalid_iterator::create(204, "iterators out of range")); + } + break; + } + + default: + break; + } + + switch (m_type) + { + case value_t::number_integer: + { + m_value.number_integer = first.m_object->m_value.number_integer; + break; + } + + case value_t::number_unsigned: + { + m_value.number_unsigned = first.m_object->m_value.number_unsigned; + break; + } + + case value_t::number_float: + { + m_value.number_float = first.m_object->m_value.number_float; + break; + } + + case value_t::boolean: + { + m_value.boolean = first.m_object->m_value.boolean; + break; + } + + case value_t::string: + { + m_value = *first.m_object->m_value.string; + break; + } + + case value_t::object: + { + m_value.object = create<object_t>(first.m_it.object_iterator, + last.m_it.object_iterator); + break; + } + + case value_t::array: + { + m_value.array = create<array_t>(first.m_it.array_iterator, + last.m_it.array_iterator); + break; + } + + default: + JSON_THROW(invalid_iterator::create(206, "cannot construct with iterators from " + + std::string(first.m_object->type_name()))); + } + + assert_invariant(); + } + + + /////////////////////////////////////// + // other constructors and destructor // + /////////////////////////////////////// + + /// @private + basic_json(const detail::json_ref<basic_json>& ref) + : basic_json(ref.moved_or_copied()) + {} + + /*! + @brief copy constructor + + Creates a copy of a given JSON value. + + @param[in] other the JSON value to copy + + @post `*this == other` + + @complexity Linear in the size of @a other. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @requirement This function helps `basic_json` satisfying the + [Container](https://en.cppreference.com/w/cpp/named_req/Container) + requirements: + - The complexity is linear. + - As postcondition, it holds: `other == basic_json(other)`. + + @liveexample{The following code shows an example for the copy + constructor.,basic_json__basic_json} + + @since version 1.0.0 + */ + basic_json(const basic_json& other) + : m_type(other.m_type) + { + // check of passed value is valid + other.assert_invariant(); + + switch (m_type) + { + case value_t::object: + { + m_value = *other.m_value.object; + break; + } + + case value_t::array: + { + m_value = *other.m_value.array; + break; + } + + case value_t::string: + { + m_value = *other.m_value.string; + break; + } + + case value_t::boolean: + { + m_value = other.m_value.boolean; + break; + } + + case value_t::number_integer: + { + m_value = other.m_value.number_integer; + break; + } + + case value_t::number_unsigned: + { + m_value = other.m_value.number_unsigned; + break; + } + + case value_t::number_float: + { + m_value = other.m_value.number_float; + break; + } + + default: + break; + } + + assert_invariant(); + } + + /*! + @brief move constructor + + Move constructor. Constructs a JSON value with the contents of the given + value @a other using move semantics. It "steals" the resources from @a + other and leaves it as JSON null value. + + @param[in,out] other value to move to this object + + @post `*this` has the same value as @a other before the call. + @post @a other is a JSON null value. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this constructor never throws + exceptions. + + @requirement This function helps `basic_json` satisfying the + [MoveConstructible](https://en.cppreference.com/w/cpp/named_req/MoveConstructible) + requirements. + + @liveexample{The code below shows the move constructor explicitly called + via std::move.,basic_json__moveconstructor} + + @since version 1.0.0 + */ + basic_json(basic_json&& other) noexcept + : m_type(std::move(other.m_type)), + m_value(std::move(other.m_value)) + { + // check that passed value is valid + other.assert_invariant(); + + // invalidate payload + other.m_type = value_t::null; + other.m_value = {}; + + assert_invariant(); + } + + /*! + @brief copy assignment + + Copy assignment operator. Copies a JSON value via the "copy and swap" + strategy: It is expressed in terms of the copy constructor, destructor, + and the `swap()` member function. + + @param[in] other value to copy from + + @complexity Linear. + + @requirement This function helps `basic_json` satisfying the + [Container](https://en.cppreference.com/w/cpp/named_req/Container) + requirements: + - The complexity is linear. + + @liveexample{The code below shows and example for the copy assignment. It + creates a copy of value `a` which is then swapped with `b`. Finally\, the + copy of `a` (which is the null value after the swap) is + destroyed.,basic_json__copyassignment} + + @since version 1.0.0 + */ + basic_json& operator=(basic_json other) noexcept ( + std::is_nothrow_move_constructible<value_t>::value and + std::is_nothrow_move_assignable<value_t>::value and + std::is_nothrow_move_constructible<json_value>::value and + std::is_nothrow_move_assignable<json_value>::value + ) + { + // check that passed value is valid + other.assert_invariant(); + + using std::swap; + swap(m_type, other.m_type); + swap(m_value, other.m_value); + + assert_invariant(); + return *this; + } + + /*! + @brief destructor + + Destroys the JSON value and frees all allocated memory. + + @complexity Linear. + + @requirement This function helps `basic_json` satisfying the + [Container](https://en.cppreference.com/w/cpp/named_req/Container) + requirements: + - The complexity is linear. + - All stored elements are destroyed and all memory is freed. + + @since version 1.0.0 + */ + ~basic_json() noexcept + { + assert_invariant(); + m_value.destroy(m_type); + } + + /// @} + + public: + /////////////////////// + // object inspection // + /////////////////////// + + /// @name object inspection + /// Functions to inspect the type of a JSON value. + /// @{ + + /*! + @brief serialization + + Serialization function for JSON values. The function tries to mimic + Python's `json.dumps()` function, and currently supports its @a indent + and @a ensure_ascii parameters. + + @param[in] indent If indent is nonnegative, then array elements and object + members will be pretty-printed with that indent level. An indent level of + `0` will only insert newlines. `-1` (the default) selects the most compact + representation. + @param[in] indent_char The character to use for indentation if @a indent is + greater than `0`. The default is ` ` (space). + @param[in] ensure_ascii If @a ensure_ascii is true, all non-ASCII characters + in the output are escaped with `\uXXXX` sequences, and the result consists + of ASCII characters only. + @param[in] error_handler how to react on decoding errors; there are three + possible values: `strict` (throws and exception in case a decoding error + occurs; default), `replace` (replace invalid UTF-8 sequences with U+FFFD), + and `ignore` (ignore invalid UTF-8 sequences during serialization). + + @return string containing the serialization of the JSON value + + @throw type_error.316 if a string stored inside the JSON value is not + UTF-8 encoded + + @complexity Linear. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @liveexample{The following example shows the effect of different @a indent\, + @a indent_char\, and @a ensure_ascii parameters to the result of the + serialization.,dump} + + @see https://docs.python.org/2/library/json.html#json.dump + + @since version 1.0.0; indentation character @a indent_char, option + @a ensure_ascii and exceptions added in version 3.0.0; error + handlers added in version 3.4.0. + */ + string_t dump(const int indent = -1, + const char indent_char = ' ', + const bool ensure_ascii = false, + const error_handler_t error_handler = error_handler_t::strict) const + { + string_t result; + serializer s(detail::output_adapter<char, string_t>(result), indent_char, error_handler); + + if (indent >= 0) + { + s.dump(*this, true, ensure_ascii, static_cast<unsigned int>(indent)); + } + else + { + s.dump(*this, false, ensure_ascii, 0); + } + + return result; + } + + /*! + @brief return the type of the JSON value (explicit) + + Return the type of the JSON value as a value from the @ref value_t + enumeration. + + @return the type of the JSON value + Value type | return value + ------------------------- | ------------------------- + null | value_t::null + boolean | value_t::boolean + string | value_t::string + number (integer) | value_t::number_integer + number (unsigned integer) | value_t::number_unsigned + number (floating-point) | value_t::number_float + object | value_t::object + array | value_t::array + discarded | value_t::discarded + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `type()` for all JSON + types.,type} + + @sa @ref operator value_t() -- return the type of the JSON value (implicit) + @sa @ref type_name() -- return the type as string + + @since version 1.0.0 + */ + constexpr value_t type() const noexcept + { + return m_type; + } + + /*! + @brief return whether type is primitive + + This function returns true if and only if the JSON type is primitive + (string, number, boolean, or null). + + @return `true` if type is primitive (string, number, boolean, or null), + `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_primitive()` for all JSON + types.,is_primitive} + + @sa @ref is_structured() -- returns whether JSON value is structured + @sa @ref is_null() -- returns whether JSON value is `null` + @sa @ref is_string() -- returns whether JSON value is a string + @sa @ref is_boolean() -- returns whether JSON value is a boolean + @sa @ref is_number() -- returns whether JSON value is a number + + @since version 1.0.0 + */ + constexpr bool is_primitive() const noexcept + { + return is_null() or is_string() or is_boolean() or is_number(); + } + + /*! + @brief return whether type is structured + + This function returns true if and only if the JSON type is structured + (array or object). + + @return `true` if type is structured (array or object), `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_structured()` for all JSON + types.,is_structured} + + @sa @ref is_primitive() -- returns whether value is primitive + @sa @ref is_array() -- returns whether value is an array + @sa @ref is_object() -- returns whether value is an object + + @since version 1.0.0 + */ + constexpr bool is_structured() const noexcept + { + return is_array() or is_object(); + } + + /*! + @brief return whether value is null + + This function returns true if and only if the JSON value is null. + + @return `true` if type is null, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_null()` for all JSON + types.,is_null} + + @since version 1.0.0 + */ + constexpr bool is_null() const noexcept + { + return m_type == value_t::null; + } + + /*! + @brief return whether value is a boolean + + This function returns true if and only if the JSON value is a boolean. + + @return `true` if type is boolean, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_boolean()` for all JSON + types.,is_boolean} + + @since version 1.0.0 + */ + constexpr bool is_boolean() const noexcept + { + return m_type == value_t::boolean; + } + + /*! + @brief return whether value is a number + + This function returns true if and only if the JSON value is a number. This + includes both integer (signed and unsigned) and floating-point values. + + @return `true` if type is number (regardless whether integer, unsigned + integer or floating-type), `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_number()` for all JSON + types.,is_number} + + @sa @ref is_number_integer() -- check if value is an integer or unsigned + integer number + @sa @ref is_number_unsigned() -- check if value is an unsigned integer + number + @sa @ref is_number_float() -- check if value is a floating-point number + + @since version 1.0.0 + */ + constexpr bool is_number() const noexcept + { + return is_number_integer() or is_number_float(); + } + + /*! + @brief return whether value is an integer number + + This function returns true if and only if the JSON value is a signed or + unsigned integer number. This excludes floating-point values. + + @return `true` if type is an integer or unsigned integer number, `false` + otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_number_integer()` for all + JSON types.,is_number_integer} + + @sa @ref is_number() -- check if value is a number + @sa @ref is_number_unsigned() -- check if value is an unsigned integer + number + @sa @ref is_number_float() -- check if value is a floating-point number + + @since version 1.0.0 + */ + constexpr bool is_number_integer() const noexcept + { + return m_type == value_t::number_integer or m_type == value_t::number_unsigned; + } + + /*! + @brief return whether value is an unsigned integer number + + This function returns true if and only if the JSON value is an unsigned + integer number. This excludes floating-point and signed integer values. + + @return `true` if type is an unsigned integer number, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_number_unsigned()` for all + JSON types.,is_number_unsigned} + + @sa @ref is_number() -- check if value is a number + @sa @ref is_number_integer() -- check if value is an integer or unsigned + integer number + @sa @ref is_number_float() -- check if value is a floating-point number + + @since version 2.0.0 + */ + constexpr bool is_number_unsigned() const noexcept + { + return m_type == value_t::number_unsigned; + } + + /*! + @brief return whether value is a floating-point number + + This function returns true if and only if the JSON value is a + floating-point number. This excludes signed and unsigned integer values. + + @return `true` if type is a floating-point number, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_number_float()` for all + JSON types.,is_number_float} + + @sa @ref is_number() -- check if value is number + @sa @ref is_number_integer() -- check if value is an integer number + @sa @ref is_number_unsigned() -- check if value is an unsigned integer + number + + @since version 1.0.0 + */ + constexpr bool is_number_float() const noexcept + { + return m_type == value_t::number_float; + } + + /*! + @brief return whether value is an object + + This function returns true if and only if the JSON value is an object. + + @return `true` if type is object, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_object()` for all JSON + types.,is_object} + + @since version 1.0.0 + */ + constexpr bool is_object() const noexcept + { + return m_type == value_t::object; + } + + /*! + @brief return whether value is an array + + This function returns true if and only if the JSON value is an array. + + @return `true` if type is array, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_array()` for all JSON + types.,is_array} + + @since version 1.0.0 + */ + constexpr bool is_array() const noexcept + { + return m_type == value_t::array; + } + + /*! + @brief return whether value is a string + + This function returns true if and only if the JSON value is a string. + + @return `true` if type is string, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_string()` for all JSON + types.,is_string} + + @since version 1.0.0 + */ + constexpr bool is_string() const noexcept + { + return m_type == value_t::string; + } + + /*! + @brief return whether value is discarded + + This function returns true if and only if the JSON value was discarded + during parsing with a callback function (see @ref parser_callback_t). + + @note This function will always be `false` for JSON values after parsing. + That is, discarded values can only occur during parsing, but will be + removed when inside a structured value or replaced by null in other cases. + + @return `true` if type is discarded, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_discarded()` for all JSON + types.,is_discarded} + + @since version 1.0.0 + */ + constexpr bool is_discarded() const noexcept + { + return m_type == value_t::discarded; + } + + /*! + @brief return the type of the JSON value (implicit) + + Implicitly return the type of the JSON value as a value from the @ref + value_t enumeration. + + @return the type of the JSON value + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies the @ref value_t operator for + all JSON types.,operator__value_t} + + @sa @ref type() -- return the type of the JSON value (explicit) + @sa @ref type_name() -- return the type as string + + @since version 1.0.0 + */ + constexpr operator value_t() const noexcept + { + return m_type; + } + + /// @} + + private: + ////////////////// + // value access // + ////////////////// + + /// get a boolean (explicit) + boolean_t get_impl(boolean_t* /*unused*/) const + { + if (JSON_LIKELY(is_boolean())) + { + return m_value.boolean; + } + + JSON_THROW(type_error::create(302, "type must be boolean, but is " + std::string(type_name()))); + } + + /// get a pointer to the value (object) + object_t* get_impl_ptr(object_t* /*unused*/) noexcept + { + return is_object() ? m_value.object : nullptr; + } + + /// get a pointer to the value (object) + constexpr const object_t* get_impl_ptr(const object_t* /*unused*/) const noexcept + { + return is_object() ? m_value.object : nullptr; + } + + /// get a pointer to the value (array) + array_t* get_impl_ptr(array_t* /*unused*/) noexcept + { + return is_array() ? m_value.array : nullptr; + } + + /// get a pointer to the value (array) + constexpr const array_t* get_impl_ptr(const array_t* /*unused*/) const noexcept + { + return is_array() ? m_value.array : nullptr; + } + + /// get a pointer to the value (string) + string_t* get_impl_ptr(string_t* /*unused*/) noexcept + { + return is_string() ? m_value.string : nullptr; + } + + /// get a pointer to the value (string) + constexpr const string_t* get_impl_ptr(const string_t* /*unused*/) const noexcept + { + return is_string() ? m_value.string : nullptr; + } + + /// get a pointer to the value (boolean) + boolean_t* get_impl_ptr(boolean_t* /*unused*/) noexcept + { + return is_boolean() ? &m_value.boolean : nullptr; + } + + /// get a pointer to the value (boolean) + constexpr const boolean_t* get_impl_ptr(const boolean_t* /*unused*/) const noexcept + { + return is_boolean() ? &m_value.boolean : nullptr; + } + + /// get a pointer to the value (integer number) + number_integer_t* get_impl_ptr(number_integer_t* /*unused*/) noexcept + { + return is_number_integer() ? &m_value.number_integer : nullptr; + } + + /// get a pointer to the value (integer number) + constexpr const number_integer_t* get_impl_ptr(const number_integer_t* /*unused*/) const noexcept + { + return is_number_integer() ? &m_value.number_integer : nullptr; + } + + /// get a pointer to the value (unsigned number) + number_unsigned_t* get_impl_ptr(number_unsigned_t* /*unused*/) noexcept + { + return is_number_unsigned() ? &m_value.number_unsigned : nullptr; + } + + /// get a pointer to the value (unsigned number) + constexpr const number_unsigned_t* get_impl_ptr(const number_unsigned_t* /*unused*/) const noexcept + { + return is_number_unsigned() ? &m_value.number_unsigned : nullptr; + } + + /// get a pointer to the value (floating-point number) + number_float_t* get_impl_ptr(number_float_t* /*unused*/) noexcept + { + return is_number_float() ? &m_value.number_float : nullptr; + } + + /// get a pointer to the value (floating-point number) + constexpr const number_float_t* get_impl_ptr(const number_float_t* /*unused*/) const noexcept + { + return is_number_float() ? &m_value.number_float : nullptr; + } + + /*! + @brief helper function to implement get_ref() + + This function helps to implement get_ref() without code duplication for + const and non-const overloads + + @tparam ThisType will be deduced as `basic_json` or `const basic_json` + + @throw type_error.303 if ReferenceType does not match underlying value + type of the current JSON + */ + template<typename ReferenceType, typename ThisType> + static ReferenceType get_ref_impl(ThisType& obj) + { + // delegate the call to get_ptr<>() + auto ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>(); + + if (JSON_LIKELY(ptr != nullptr)) + { + return *ptr; + } + + JSON_THROW(type_error::create(303, "incompatible ReferenceType for get_ref, actual type is " + std::string(obj.type_name()))); + } + + public: + /// @name value access + /// Direct access to the stored value of a JSON value. + /// @{ + + /*! + @brief get special-case overload + + This overloads avoids a lot of template boilerplate, it can be seen as the + identity method + + @tparam BasicJsonType == @ref basic_json + + @return a copy of *this + + @complexity Constant. + + @since version 2.1.0 + */ + template<typename BasicJsonType, detail::enable_if_t< + std::is_same<typename std::remove_const<BasicJsonType>::type, basic_json_t>::value, + int> = 0> + basic_json get() const + { + return *this; + } + + /*! + @brief get special-case overload + + This overloads converts the current @ref basic_json in a different + @ref basic_json type + + @tparam BasicJsonType == @ref basic_json + + @return a copy of *this, converted into @tparam BasicJsonType + + @complexity Depending on the implementation of the called `from_json()` + method. + + @since version 3.2.0 + */ + template<typename BasicJsonType, detail::enable_if_t< + not std::is_same<BasicJsonType, basic_json>::value and + detail::is_basic_json<BasicJsonType>::value, int> = 0> + BasicJsonType get() const + { + return *this; + } + + /*! + @brief get a value (explicit) + + Explicit type conversion between the JSON value and a compatible value + which is [CopyConstructible](https://en.cppreference.com/w/cpp/named_req/CopyConstructible) + and [DefaultConstructible](https://en.cppreference.com/w/cpp/named_req/DefaultConstructible). + The value is converted by calling the @ref json_serializer<ValueType> + `from_json()` method. + + The function is equivalent to executing + @code {.cpp} + ValueType ret; + JSONSerializer<ValueType>::from_json(*this, ret); + return ret; + @endcode + + This overloads is chosen if: + - @a ValueType is not @ref basic_json, + - @ref json_serializer<ValueType> has a `from_json()` method of the form + `void from_json(const basic_json&, ValueType&)`, and + - @ref json_serializer<ValueType> does not have a `from_json()` method of + the form `ValueType from_json(const basic_json&)` + + @tparam ValueTypeCV the provided value type + @tparam ValueType the returned value type + + @return copy of the JSON value, converted to @a ValueType + + @throw what @ref json_serializer<ValueType> `from_json()` method throws + + @liveexample{The example below shows several conversions from JSON values + to other types. There a few things to note: (1) Floating-point numbers can + be converted to integers\, (2) A JSON array can be converted to a standard + `std::vector<short>`\, (3) A JSON object can be converted to C++ + associative containers such as `std::unordered_map<std::string\, + json>`.,get__ValueType_const} + + @since version 2.1.0 + */ + template<typename ValueTypeCV, typename ValueType = detail::uncvref_t<ValueTypeCV>, + detail::enable_if_t < + not detail::is_basic_json<ValueType>::value and + detail::has_from_json<basic_json_t, ValueType>::value and + not detail::has_non_default_from_json<basic_json_t, ValueType>::value, + int> = 0> + ValueType get() const noexcept(noexcept( + JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), std::declval<ValueType&>()))) + { + // we cannot static_assert on ValueTypeCV being non-const, because + // there is support for get<const basic_json_t>(), which is why we + // still need the uncvref + static_assert(not std::is_reference<ValueTypeCV>::value, + "get() cannot be used with reference types, you might want to use get_ref()"); + static_assert(std::is_default_constructible<ValueType>::value, + "types must be DefaultConstructible when used with get()"); + + ValueType ret; + JSONSerializer<ValueType>::from_json(*this, ret); + return ret; + } + + /*! + @brief get a value (explicit); special case + + Explicit type conversion between the JSON value and a compatible value + which is **not** [CopyConstructible](https://en.cppreference.com/w/cpp/named_req/CopyConstructible) + and **not** [DefaultConstructible](https://en.cppreference.com/w/cpp/named_req/DefaultConstructible). + The value is converted by calling the @ref json_serializer<ValueType> + `from_json()` method. + + The function is equivalent to executing + @code {.cpp} + return JSONSerializer<ValueTypeCV>::from_json(*this); + @endcode + + This overloads is chosen if: + - @a ValueType is not @ref basic_json and + - @ref json_serializer<ValueType> has a `from_json()` method of the form + `ValueType from_json(const basic_json&)` + + @note If @ref json_serializer<ValueType> has both overloads of + `from_json()`, this one is chosen. + + @tparam ValueTypeCV the provided value type + @tparam ValueType the returned value type + + @return copy of the JSON value, converted to @a ValueType + + @throw what @ref json_serializer<ValueType> `from_json()` method throws + + @since version 2.1.0 + */ + template<typename ValueTypeCV, typename ValueType = detail::uncvref_t<ValueTypeCV>, + detail::enable_if_t<not std::is_same<basic_json_t, ValueType>::value and + detail::has_non_default_from_json<basic_json_t, ValueType>::value, + int> = 0> + ValueType get() const noexcept(noexcept( + JSONSerializer<ValueTypeCV>::from_json(std::declval<const basic_json_t&>()))) + { + static_assert(not std::is_reference<ValueTypeCV>::value, + "get() cannot be used with reference types, you might want to use get_ref()"); + return JSONSerializer<ValueTypeCV>::from_json(*this); + } + + /*! + @brief get a value (explicit) + + Explicit type conversion between the JSON value and a compatible value. + The value is filled into the input parameter by calling the @ref json_serializer<ValueType> + `from_json()` method. + + The function is equivalent to executing + @code {.cpp} + ValueType v; + JSONSerializer<ValueType>::from_json(*this, v); + @endcode + + This overloads is chosen if: + - @a ValueType is not @ref basic_json, + - @ref json_serializer<ValueType> has a `from_json()` method of the form + `void from_json(const basic_json&, ValueType&)`, and + + @tparam ValueType the input parameter type. + + @return the input parameter, allowing chaining calls. + + @throw what @ref json_serializer<ValueType> `from_json()` method throws + + @liveexample{The example below shows several conversions from JSON values + to other types. There a few things to note: (1) Floating-point numbers can + be converted to integers\, (2) A JSON array can be converted to a standard + `std::vector<short>`\, (3) A JSON object can be converted to C++ + associative containers such as `std::unordered_map<std::string\, + json>`.,get_to} + + @since version 3.3.0 + */ + template<typename ValueType, + detail::enable_if_t < + not detail::is_basic_json<ValueType>::value and + detail::has_from_json<basic_json_t, ValueType>::value, + int> = 0> + ValueType & get_to(ValueType& v) const noexcept(noexcept( + JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), v))) + { + JSONSerializer<ValueType>::from_json(*this, v); + return v; + } + + + /*! + @brief get a pointer value (implicit) + + Implicit pointer access to the internally stored JSON value. No copies are + made. + + @warning Writing data to the pointee of the result yields an undefined + state. + + @tparam PointerType pointer type; must be a pointer to @ref array_t, @ref + object_t, @ref string_t, @ref boolean_t, @ref number_integer_t, + @ref number_unsigned_t, or @ref number_float_t. Enforced by a static + assertion. + + @return pointer to the internally stored JSON value if the requested + pointer type @a PointerType fits to the JSON value; `nullptr` otherwise + + @complexity Constant. + + @liveexample{The example below shows how pointers to internal values of a + JSON value can be requested. Note that no type conversions are made and a + `nullptr` is returned if the value and the requested pointer type does not + match.,get_ptr} + + @since version 1.0.0 + */ + template<typename PointerType, typename std::enable_if< + std::is_pointer<PointerType>::value, int>::type = 0> + auto get_ptr() noexcept -> decltype(std::declval<basic_json_t&>().get_impl_ptr(std::declval<PointerType>())) + { + // delegate the call to get_impl_ptr<>() + return get_impl_ptr(static_cast<PointerType>(nullptr)); + } + + /*! + @brief get a pointer value (implicit) + @copydoc get_ptr() + */ + template<typename PointerType, typename std::enable_if< + std::is_pointer<PointerType>::value and + std::is_const<typename std::remove_pointer<PointerType>::type>::value, int>::type = 0> + constexpr auto get_ptr() const noexcept -> decltype(std::declval<const basic_json_t&>().get_impl_ptr(std::declval<PointerType>())) + { + // delegate the call to get_impl_ptr<>() const + return get_impl_ptr(static_cast<PointerType>(nullptr)); + } + + /*! + @brief get a pointer value (explicit) + + Explicit pointer access to the internally stored JSON value. No copies are + made. + + @warning The pointer becomes invalid if the underlying JSON object + changes. + + @tparam PointerType pointer type; must be a pointer to @ref array_t, @ref + object_t, @ref string_t, @ref boolean_t, @ref number_integer_t, + @ref number_unsigned_t, or @ref number_float_t. + + @return pointer to the internally stored JSON value if the requested + pointer type @a PointerType fits to the JSON value; `nullptr` otherwise + + @complexity Constant. + + @liveexample{The example below shows how pointers to internal values of a + JSON value can be requested. Note that no type conversions are made and a + `nullptr` is returned if the value and the requested pointer type does not + match.,get__PointerType} + + @sa @ref get_ptr() for explicit pointer-member access + + @since version 1.0.0 + */ + template<typename PointerType, typename std::enable_if< + std::is_pointer<PointerType>::value, int>::type = 0> + auto get() noexcept -> decltype(std::declval<basic_json_t&>().template get_ptr<PointerType>()) + { + // delegate the call to get_ptr + return get_ptr<PointerType>(); + } + + /*! + @brief get a pointer value (explicit) + @copydoc get() + */ + template<typename PointerType, typename std::enable_if< + std::is_pointer<PointerType>::value, int>::type = 0> + constexpr auto get() const noexcept -> decltype(std::declval<const basic_json_t&>().template get_ptr<PointerType>()) + { + // delegate the call to get_ptr + return get_ptr<PointerType>(); + } + + /*! + @brief get a reference value (implicit) + + Implicit reference access to the internally stored JSON value. No copies + are made. + + @warning Writing data to the referee of the result yields an undefined + state. + + @tparam ReferenceType reference type; must be a reference to @ref array_t, + @ref object_t, @ref string_t, @ref boolean_t, @ref number_integer_t, or + @ref number_float_t. Enforced by static assertion. + + @return reference to the internally stored JSON value if the requested + reference type @a ReferenceType fits to the JSON value; throws + type_error.303 otherwise + + @throw type_error.303 in case passed type @a ReferenceType is incompatible + with the stored JSON value; see example below + + @complexity Constant. + + @liveexample{The example shows several calls to `get_ref()`.,get_ref} + + @since version 1.1.0 + */ + template<typename ReferenceType, typename std::enable_if< + std::is_reference<ReferenceType>::value, int>::type = 0> + ReferenceType get_ref() + { + // delegate call to get_ref_impl + return get_ref_impl<ReferenceType>(*this); + } + + /*! + @brief get a reference value (implicit) + @copydoc get_ref() + */ + template<typename ReferenceType, typename std::enable_if< + std::is_reference<ReferenceType>::value and + std::is_const<typename std::remove_reference<ReferenceType>::type>::value, int>::type = 0> + ReferenceType get_ref() const + { + // delegate call to get_ref_impl + return get_ref_impl<ReferenceType>(*this); + } + + /*! + @brief get a value (implicit) + + Implicit type conversion between the JSON value and a compatible value. + The call is realized by calling @ref get() const. + + @tparam ValueType non-pointer type compatible to the JSON value, for + instance `int` for JSON integer numbers, `bool` for JSON booleans, or + `std::vector` types for JSON arrays. The character type of @ref string_t + as well as an initializer list of this type is excluded to avoid + ambiguities as these types implicitly convert to `std::string`. + + @return copy of the JSON value, converted to type @a ValueType + + @throw type_error.302 in case passed type @a ValueType is incompatible + to the JSON value type (e.g., the JSON value is of type boolean, but a + string is requested); see example below + + @complexity Linear in the size of the JSON value. + + @liveexample{The example below shows several conversions from JSON values + to other types. There a few things to note: (1) Floating-point numbers can + be converted to integers\, (2) A JSON array can be converted to a standard + `std::vector<short>`\, (3) A JSON object can be converted to C++ + associative containers such as `std::unordered_map<std::string\, + json>`.,operator__ValueType} + + @since version 1.0.0 + */ + template < typename ValueType, typename std::enable_if < + not std::is_pointer<ValueType>::value and + not std::is_same<ValueType, detail::json_ref<basic_json>>::value and + not std::is_same<ValueType, typename string_t::value_type>::value and + not detail::is_basic_json<ValueType>::value + +#ifndef _MSC_VER // fix for issue #167 operator<< ambiguity under VS2015 + and not std::is_same<ValueType, std::initializer_list<typename string_t::value_type>>::value +#if defined(JSON_HAS_CPP_17) && (defined(__GNUC__) || (defined(_MSC_VER) and _MSC_VER <= 1914)) + and not std::is_same<ValueType, typename std::string_view>::value +#endif +#endif + and detail::is_detected<detail::get_template_function, const basic_json_t&, ValueType>::value + , int >::type = 0 > + operator ValueType() const + { + // delegate the call to get<>() const + return get<ValueType>(); + } + + /// @} + + + //////////////////// + // element access // + //////////////////// + + /// @name element access + /// Access to the JSON value. + /// @{ + + /*! + @brief access specified array element with bounds checking + + Returns a reference to the element at specified location @a idx, with + bounds checking. + + @param[in] idx index of the element to access + + @return reference to the element at index @a idx + + @throw type_error.304 if the JSON value is not an array; in this case, + calling `at` with an index makes no sense. See example below. + @throw out_of_range.401 if the index @a idx is out of range of the array; + that is, `idx >= size()`. See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Constant. + + @since version 1.0.0 + + @liveexample{The example below shows how array elements can be read and + written using `at()`. It also demonstrates the different exceptions that + can be thrown.,at__size_type} + */ + reference at(size_type idx) + { + // at only works for arrays + if (JSON_LIKELY(is_array())) + { + JSON_TRY + { + return m_value.array->at(idx); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); + } + } + else + { + JSON_THROW(type_error::create(304, "cannot use at() with " + std::string(type_name()))); + } + } + + /*! + @brief access specified array element with bounds checking + + Returns a const reference to the element at specified location @a idx, + with bounds checking. + + @param[in] idx index of the element to access + + @return const reference to the element at index @a idx + + @throw type_error.304 if the JSON value is not an array; in this case, + calling `at` with an index makes no sense. See example below. + @throw out_of_range.401 if the index @a idx is out of range of the array; + that is, `idx >= size()`. See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Constant. + + @since version 1.0.0 + + @liveexample{The example below shows how array elements can be read using + `at()`. It also demonstrates the different exceptions that can be thrown., + at__size_type_const} + */ + const_reference at(size_type idx) const + { + // at only works for arrays + if (JSON_LIKELY(is_array())) + { + JSON_TRY + { + return m_value.array->at(idx); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); + } + } + else + { + JSON_THROW(type_error::create(304, "cannot use at() with " + std::string(type_name()))); + } + } + + /*! + @brief access specified object element with bounds checking + + Returns a reference to the element at with specified key @a key, with + bounds checking. + + @param[in] key key of the element to access + + @return reference to the element at key @a key + + @throw type_error.304 if the JSON value is not an object; in this case, + calling `at` with a key makes no sense. See example below. + @throw out_of_range.403 if the key @a key is is not stored in the object; + that is, `find(key) == end()`. See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Logarithmic in the size of the container. + + @sa @ref operator[](const typename object_t::key_type&) for unchecked + access by reference + @sa @ref value() for access by value with a default value + + @since version 1.0.0 + + @liveexample{The example below shows how object elements can be read and + written using `at()`. It also demonstrates the different exceptions that + can be thrown.,at__object_t_key_type} + */ + reference at(const typename object_t::key_type& key) + { + // at only works for objects + if (JSON_LIKELY(is_object())) + { + JSON_TRY + { + return m_value.object->at(key); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(403, "key '" + key + "' not found")); + } + } + else + { + JSON_THROW(type_error::create(304, "cannot use at() with " + std::string(type_name()))); + } + } + + /*! + @brief access specified object element with bounds checking + + Returns a const reference to the element at with specified key @a key, + with bounds checking. + + @param[in] key key of the element to access + + @return const reference to the element at key @a key + + @throw type_error.304 if the JSON value is not an object; in this case, + calling `at` with a key makes no sense. See example below. + @throw out_of_range.403 if the key @a key is is not stored in the object; + that is, `find(key) == end()`. See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Logarithmic in the size of the container. + + @sa @ref operator[](const typename object_t::key_type&) for unchecked + access by reference + @sa @ref value() for access by value with a default value + + @since version 1.0.0 + + @liveexample{The example below shows how object elements can be read using + `at()`. It also demonstrates the different exceptions that can be thrown., + at__object_t_key_type_const} + */ + const_reference at(const typename object_t::key_type& key) const + { + // at only works for objects + if (JSON_LIKELY(is_object())) + { + JSON_TRY + { + return m_value.object->at(key); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(403, "key '" + key + "' not found")); + } + } + else + { + JSON_THROW(type_error::create(304, "cannot use at() with " + std::string(type_name()))); + } + } + + /*! + @brief access specified array element + + Returns a reference to the element at specified location @a idx. + + @note If @a idx is beyond the range of the array (i.e., `idx >= size()`), + then the array is silently filled up with `null` values to make `idx` a + valid reference to the last stored element. + + @param[in] idx index of the element to access + + @return reference to the element at index @a idx + + @throw type_error.305 if the JSON value is not an array or null; in that + cases, using the [] operator with an index makes no sense. + + @complexity Constant if @a idx is in the range of the array. Otherwise + linear in `idx - size()`. + + @liveexample{The example below shows how array elements can be read and + written using `[]` operator. Note the addition of `null` + values.,operatorarray__size_type} + + @since version 1.0.0 + */ + reference operator[](size_type idx) + { + // implicitly convert null value to an empty array + if (is_null()) + { + m_type = value_t::array; + m_value.array = create<array_t>(); + assert_invariant(); + } + + // operator[] only works for arrays + if (JSON_LIKELY(is_array())) + { + // fill up array with null values if given idx is outside range + if (idx >= m_value.array->size()) + { + m_value.array->insert(m_value.array->end(), + idx - m_value.array->size() + 1, + basic_json()); + } + + return m_value.array->operator[](idx); + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with a numeric argument with " + std::string(type_name()))); + } + + /*! + @brief access specified array element + + Returns a const reference to the element at specified location @a idx. + + @param[in] idx index of the element to access + + @return const reference to the element at index @a idx + + @throw type_error.305 if the JSON value is not an array; in that case, + using the [] operator with an index makes no sense. + + @complexity Constant. + + @liveexample{The example below shows how array elements can be read using + the `[]` operator.,operatorarray__size_type_const} + + @since version 1.0.0 + */ + const_reference operator[](size_type idx) const + { + // const operator[] only works for arrays + if (JSON_LIKELY(is_array())) + { + return m_value.array->operator[](idx); + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with a numeric argument with " + std::string(type_name()))); + } + + /*! + @brief access specified object element + + Returns a reference to the element at with specified key @a key. + + @note If @a key is not found in the object, then it is silently added to + the object and filled with a `null` value to make `key` a valid reference. + In case the value was `null` before, it is converted to an object. + + @param[in] key key of the element to access + + @return reference to the element at key @a key + + @throw type_error.305 if the JSON value is not an object or null; in that + cases, using the [] operator with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be read and + written using the `[]` operator.,operatorarray__key_type} + + @sa @ref at(const typename object_t::key_type&) for access by reference + with range checking + @sa @ref value() for access by value with a default value + + @since version 1.0.0 + */ + reference operator[](const typename object_t::key_type& key) + { + // implicitly convert null value to an empty object + if (is_null()) + { + m_type = value_t::object; + m_value.object = create<object_t>(); + assert_invariant(); + } + + // operator[] only works for objects + if (JSON_LIKELY(is_object())) + { + return m_value.object->operator[](key); + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with a string argument with " + std::string(type_name()))); + } + + /*! + @brief read-only access specified object element + + Returns a const reference to the element at with specified key @a key. No + bounds checking is performed. + + @warning If the element with key @a key does not exist, the behavior is + undefined. + + @param[in] key key of the element to access + + @return const reference to the element at key @a key + + @pre The element with key @a key must exist. **This precondition is + enforced with an assertion.** + + @throw type_error.305 if the JSON value is not an object; in that case, + using the [] operator with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be read using + the `[]` operator.,operatorarray__key_type_const} + + @sa @ref at(const typename object_t::key_type&) for access by reference + with range checking + @sa @ref value() for access by value with a default value + + @since version 1.0.0 + */ + const_reference operator[](const typename object_t::key_type& key) const + { + // const operator[] only works for objects + if (JSON_LIKELY(is_object())) + { + assert(m_value.object->find(key) != m_value.object->end()); + return m_value.object->find(key)->second; + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with a string argument with " + std::string(type_name()))); + } + + /*! + @brief access specified object element + + Returns a reference to the element at with specified key @a key. + + @note If @a key is not found in the object, then it is silently added to + the object and filled with a `null` value to make `key` a valid reference. + In case the value was `null` before, it is converted to an object. + + @param[in] key key of the element to access + + @return reference to the element at key @a key + + @throw type_error.305 if the JSON value is not an object or null; in that + cases, using the [] operator with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be read and + written using the `[]` operator.,operatorarray__key_type} + + @sa @ref at(const typename object_t::key_type&) for access by reference + with range checking + @sa @ref value() for access by value with a default value + + @since version 1.1.0 + */ + template<typename T> + reference operator[](T* key) + { + // implicitly convert null to object + if (is_null()) + { + m_type = value_t::object; + m_value = value_t::object; + assert_invariant(); + } + + // at only works for objects + if (JSON_LIKELY(is_object())) + { + return m_value.object->operator[](key); + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with a string argument with " + std::string(type_name()))); + } + + /*! + @brief read-only access specified object element + + Returns a const reference to the element at with specified key @a key. No + bounds checking is performed. + + @warning If the element with key @a key does not exist, the behavior is + undefined. + + @param[in] key key of the element to access + + @return const reference to the element at key @a key + + @pre The element with key @a key must exist. **This precondition is + enforced with an assertion.** + + @throw type_error.305 if the JSON value is not an object; in that case, + using the [] operator with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be read using + the `[]` operator.,operatorarray__key_type_const} + + @sa @ref at(const typename object_t::key_type&) for access by reference + with range checking + @sa @ref value() for access by value with a default value + + @since version 1.1.0 + */ + template<typename T> + const_reference operator[](T* key) const + { + // at only works for objects + if (JSON_LIKELY(is_object())) + { + assert(m_value.object->find(key) != m_value.object->end()); + return m_value.object->find(key)->second; + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with a string argument with " + std::string(type_name()))); + } + + /*! + @brief access specified object element with default value + + Returns either a copy of an object's element at the specified key @a key + or a given default value if no element with key @a key exists. + + The function is basically equivalent to executing + @code {.cpp} + try { + return at(key); + } catch(out_of_range) { + return default_value; + } + @endcode + + @note Unlike @ref at(const typename object_t::key_type&), this function + does not throw if the given key @a key was not found. + + @note Unlike @ref operator[](const typename object_t::key_type& key), this + function does not implicitly add an element to the position defined by @a + key. This function is furthermore also applicable to const objects. + + @param[in] key key of the element to access + @param[in] default_value the value to return if @a key is not found + + @tparam ValueType type compatible to JSON values, for instance `int` for + JSON integer numbers, `bool` for JSON booleans, or `std::vector` types for + JSON arrays. Note the type of the expected value at @a key and the default + value @a default_value must be compatible. + + @return copy of the element at key @a key or @a default_value if @a key + is not found + + @throw type_error.306 if the JSON value is not an object; in that case, + using `value()` with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be queried + with a default value.,basic_json__value} + + @sa @ref at(const typename object_t::key_type&) for access by reference + with range checking + @sa @ref operator[](const typename object_t::key_type&) for unchecked + access by reference + + @since version 1.0.0 + */ + template<class ValueType, typename std::enable_if< + std::is_convertible<basic_json_t, ValueType>::value, int>::type = 0> + ValueType value(const typename object_t::key_type& key, const ValueType& default_value) const + { + // at only works for objects + if (JSON_LIKELY(is_object())) + { + // if key is found, return value and given default value otherwise + const auto it = find(key); + if (it != end()) + { + return *it; + } + + return default_value; + } + + JSON_THROW(type_error::create(306, "cannot use value() with " + std::string(type_name()))); + } + + /*! + @brief overload for a default value of type const char* + @copydoc basic_json::value(const typename object_t::key_type&, const ValueType&) const + */ + string_t value(const typename object_t::key_type& key, const char* default_value) const + { + return value(key, string_t(default_value)); + } + + /*! + @brief access specified object element via JSON Pointer with default value + + Returns either a copy of an object's element at the specified key @a key + or a given default value if no element with key @a key exists. + + The function is basically equivalent to executing + @code {.cpp} + try { + return at(ptr); + } catch(out_of_range) { + return default_value; + } + @endcode + + @note Unlike @ref at(const json_pointer&), this function does not throw + if the given key @a key was not found. + + @param[in] ptr a JSON pointer to the element to access + @param[in] default_value the value to return if @a ptr found no value + + @tparam ValueType type compatible to JSON values, for instance `int` for + JSON integer numbers, `bool` for JSON booleans, or `std::vector` types for + JSON arrays. Note the type of the expected value at @a key and the default + value @a default_value must be compatible. + + @return copy of the element at key @a key or @a default_value if @a key + is not found + + @throw type_error.306 if the JSON value is not an object; in that case, + using `value()` with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be queried + with a default value.,basic_json__value_ptr} + + @sa @ref operator[](const json_pointer&) for unchecked access by reference + + @since version 2.0.2 + */ + template<class ValueType, typename std::enable_if< + std::is_convertible<basic_json_t, ValueType>::value, int>::type = 0> + ValueType value(const json_pointer& ptr, const ValueType& default_value) const + { + // at only works for objects + if (JSON_LIKELY(is_object())) + { + // if pointer resolves a value, return it or use default value + JSON_TRY + { + return ptr.get_checked(this); + } + JSON_INTERNAL_CATCH (out_of_range&) + { + return default_value; + } + } + + JSON_THROW(type_error::create(306, "cannot use value() with " + std::string(type_name()))); + } + + /*! + @brief overload for a default value of type const char* + @copydoc basic_json::value(const json_pointer&, ValueType) const + */ + string_t value(const json_pointer& ptr, const char* default_value) const + { + return value(ptr, string_t(default_value)); + } + + /*! + @brief access the first element + + Returns a reference to the first element in the container. For a JSON + container `c`, the expression `c.front()` is equivalent to `*c.begin()`. + + @return In case of a structured type (array or object), a reference to the + first element is returned. In case of number, string, or boolean values, a + reference to the value is returned. + + @complexity Constant. + + @pre The JSON value must not be `null` (would throw `std::out_of_range`) + or an empty array or object (undefined behavior, **guarded by + assertions**). + @post The JSON value remains unchanged. + + @throw invalid_iterator.214 when called on `null` value + + @liveexample{The following code shows an example for `front()`.,front} + + @sa @ref back() -- access the last element + + @since version 1.0.0 + */ + reference front() + { + return *begin(); + } + + /*! + @copydoc basic_json::front() + */ + const_reference front() const + { + return *cbegin(); + } + + /*! + @brief access the last element + + Returns a reference to the last element in the container. For a JSON + container `c`, the expression `c.back()` is equivalent to + @code {.cpp} + auto tmp = c.end(); + --tmp; + return *tmp; + @endcode + + @return In case of a structured type (array or object), a reference to the + last element is returned. In case of number, string, or boolean values, a + reference to the value is returned. + + @complexity Constant. + + @pre The JSON value must not be `null` (would throw `std::out_of_range`) + or an empty array or object (undefined behavior, **guarded by + assertions**). + @post The JSON value remains unchanged. + + @throw invalid_iterator.214 when called on a `null` value. See example + below. + + @liveexample{The following code shows an example for `back()`.,back} + + @sa @ref front() -- access the first element + + @since version 1.0.0 + */ + reference back() + { + auto tmp = end(); + --tmp; + return *tmp; + } + + /*! + @copydoc basic_json::back() + */ + const_reference back() const + { + auto tmp = cend(); + --tmp; + return *tmp; + } + + /*! + @brief remove element given an iterator + + Removes the element specified by iterator @a pos. The iterator @a pos must + be valid and dereferenceable. Thus the `end()` iterator (which is valid, + but is not dereferenceable) cannot be used as a value for @a pos. + + If called on a primitive type other than `null`, the resulting JSON value + will be `null`. + + @param[in] pos iterator to the element to remove + @return Iterator following the last removed element. If the iterator @a + pos refers to the last element, the `end()` iterator is returned. + + @tparam IteratorType an @ref iterator or @ref const_iterator + + @post Invalidates iterators and references at or after the point of the + erase, including the `end()` iterator. + + @throw type_error.307 if called on a `null` value; example: `"cannot use + erase() with null"` + @throw invalid_iterator.202 if called on an iterator which does not belong + to the current JSON value; example: `"iterator does not fit current + value"` + @throw invalid_iterator.205 if called on a primitive type with invalid + iterator (i.e., any iterator which is not `begin()`); example: `"iterator + out of range"` + + @complexity The complexity depends on the type: + - objects: amortized constant + - arrays: linear in distance between @a pos and the end of the container + - strings: linear in the length of the string + - other types: constant + + @liveexample{The example shows the result of `erase()` for different JSON + types.,erase__IteratorType} + + @sa @ref erase(IteratorType, IteratorType) -- removes the elements in + the given range + @sa @ref erase(const typename object_t::key_type&) -- removes the element + from an object at the given key + @sa @ref erase(const size_type) -- removes the element from an array at + the given index + + @since version 1.0.0 + */ + template<class IteratorType, typename std::enable_if< + std::is_same<IteratorType, typename basic_json_t::iterator>::value or + std::is_same<IteratorType, typename basic_json_t::const_iterator>::value, int>::type + = 0> + IteratorType erase(IteratorType pos) + { + // make sure iterator fits the current value + if (JSON_UNLIKELY(this != pos.m_object)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); + } + + IteratorType result = end(); + + switch (m_type) + { + case value_t::boolean: + case value_t::number_float: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::string: + { + if (JSON_UNLIKELY(not pos.m_it.primitive_iterator.is_begin())) + { + JSON_THROW(invalid_iterator::create(205, "iterator out of range")); + } + + if (is_string()) + { + AllocatorType<string_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.string); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_value.string, 1); + m_value.string = nullptr; + } + + m_type = value_t::null; + assert_invariant(); + break; + } + + case value_t::object: + { + result.m_it.object_iterator = m_value.object->erase(pos.m_it.object_iterator); + break; + } + + case value_t::array: + { + result.m_it.array_iterator = m_value.array->erase(pos.m_it.array_iterator); + break; + } + + default: + JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()))); + } + + return result; + } + + /*! + @brief remove elements given an iterator range + + Removes the element specified by the range `[first; last)`. The iterator + @a first does not need to be dereferenceable if `first == last`: erasing + an empty range is a no-op. + + If called on a primitive type other than `null`, the resulting JSON value + will be `null`. + + @param[in] first iterator to the beginning of the range to remove + @param[in] last iterator past the end of the range to remove + @return Iterator following the last removed element. If the iterator @a + second refers to the last element, the `end()` iterator is returned. + + @tparam IteratorType an @ref iterator or @ref const_iterator + + @post Invalidates iterators and references at or after the point of the + erase, including the `end()` iterator. + + @throw type_error.307 if called on a `null` value; example: `"cannot use + erase() with null"` + @throw invalid_iterator.203 if called on iterators which does not belong + to the current JSON value; example: `"iterators do not fit current value"` + @throw invalid_iterator.204 if called on a primitive type with invalid + iterators (i.e., if `first != begin()` and `last != end()`); example: + `"iterators out of range"` + + @complexity The complexity depends on the type: + - objects: `log(size()) + std::distance(first, last)` + - arrays: linear in the distance between @a first and @a last, plus linear + in the distance between @a last and end of the container + - strings: linear in the length of the string + - other types: constant + + @liveexample{The example shows the result of `erase()` for different JSON + types.,erase__IteratorType_IteratorType} + + @sa @ref erase(IteratorType) -- removes the element at a given position + @sa @ref erase(const typename object_t::key_type&) -- removes the element + from an object at the given key + @sa @ref erase(const size_type) -- removes the element from an array at + the given index + + @since version 1.0.0 + */ + template<class IteratorType, typename std::enable_if< + std::is_same<IteratorType, typename basic_json_t::iterator>::value or + std::is_same<IteratorType, typename basic_json_t::const_iterator>::value, int>::type + = 0> + IteratorType erase(IteratorType first, IteratorType last) + { + // make sure iterator fits the current value + if (JSON_UNLIKELY(this != first.m_object or this != last.m_object)) + { + JSON_THROW(invalid_iterator::create(203, "iterators do not fit current value")); + } + + IteratorType result = end(); + + switch (m_type) + { + case value_t::boolean: + case value_t::number_float: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::string: + { + if (JSON_LIKELY(not first.m_it.primitive_iterator.is_begin() + or not last.m_it.primitive_iterator.is_end())) + { + JSON_THROW(invalid_iterator::create(204, "iterators out of range")); + } + + if (is_string()) + { + AllocatorType<string_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.string); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_value.string, 1); + m_value.string = nullptr; + } + + m_type = value_t::null; + assert_invariant(); + break; + } + + case value_t::object: + { + result.m_it.object_iterator = m_value.object->erase(first.m_it.object_iterator, + last.m_it.object_iterator); + break; + } + + case value_t::array: + { + result.m_it.array_iterator = m_value.array->erase(first.m_it.array_iterator, + last.m_it.array_iterator); + break; + } + + default: + JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()))); + } + + return result; + } + + /*! + @brief remove element from a JSON object given a key + + Removes elements from a JSON object with the key value @a key. + + @param[in] key value of the elements to remove + + @return Number of elements removed. If @a ObjectType is the default + `std::map` type, the return value will always be `0` (@a key was not + found) or `1` (@a key was found). + + @post References and iterators to the erased elements are invalidated. + Other references and iterators are not affected. + + @throw type_error.307 when called on a type other than JSON object; + example: `"cannot use erase() with null"` + + @complexity `log(size()) + count(key)` + + @liveexample{The example shows the effect of `erase()`.,erase__key_type} + + @sa @ref erase(IteratorType) -- removes the element at a given position + @sa @ref erase(IteratorType, IteratorType) -- removes the elements in + the given range + @sa @ref erase(const size_type) -- removes the element from an array at + the given index + + @since version 1.0.0 + */ + size_type erase(const typename object_t::key_type& key) + { + // this erase only works for objects + if (JSON_LIKELY(is_object())) + { + return m_value.object->erase(key); + } + + JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()))); + } + + /*! + @brief remove element from a JSON array given an index + + Removes element from a JSON array at the index @a idx. + + @param[in] idx index of the element to remove + + @throw type_error.307 when called on a type other than JSON object; + example: `"cannot use erase() with null"` + @throw out_of_range.401 when `idx >= size()`; example: `"array index 17 + is out of range"` + + @complexity Linear in distance between @a idx and the end of the container. + + @liveexample{The example shows the effect of `erase()`.,erase__size_type} + + @sa @ref erase(IteratorType) -- removes the element at a given position + @sa @ref erase(IteratorType, IteratorType) -- removes the elements in + the given range + @sa @ref erase(const typename object_t::key_type&) -- removes the element + from an object at the given key + + @since version 1.0.0 + */ + void erase(const size_type idx) + { + // this erase only works for arrays + if (JSON_LIKELY(is_array())) + { + if (JSON_UNLIKELY(idx >= size())) + { + JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); + } + + m_value.array->erase(m_value.array->begin() + static_cast<difference_type>(idx)); + } + else + { + JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()))); + } + } + + /// @} + + + //////////// + // lookup // + //////////// + + /// @name lookup + /// @{ + + /*! + @brief find an element in a JSON object + + Finds an element in a JSON object with key equivalent to @a key. If the + element is not found or the JSON value is not an object, end() is + returned. + + @note This method always returns @ref end() when executed on a JSON type + that is not an object. + + @param[in] key key value of the element to search for. + + @return Iterator to an element with key equivalent to @a key. If no such + element is found or the JSON value is not an object, past-the-end (see + @ref end()) iterator is returned. + + @complexity Logarithmic in the size of the JSON object. + + @liveexample{The example shows how `find()` is used.,find__key_type} + + @sa @ref contains(KeyT&&) const -- checks whether a key exists + + @since version 1.0.0 + */ + template<typename KeyT> + iterator find(KeyT&& key) + { + auto result = end(); + + if (is_object()) + { + result.m_it.object_iterator = m_value.object->find(std::forward<KeyT>(key)); + } + + return result; + } + + /*! + @brief find an element in a JSON object + @copydoc find(KeyT&&) + */ + template<typename KeyT> + const_iterator find(KeyT&& key) const + { + auto result = cend(); + + if (is_object()) + { + result.m_it.object_iterator = m_value.object->find(std::forward<KeyT>(key)); + } + + return result; + } + + /*! + @brief returns the number of occurrences of a key in a JSON object + + Returns the number of elements with key @a key. If ObjectType is the + default `std::map` type, the return value will always be `0` (@a key was + not found) or `1` (@a key was found). + + @note This method always returns `0` when executed on a JSON type that is + not an object. + + @param[in] key key value of the element to count + + @return Number of elements with key @a key. If the JSON value is not an + object, the return value will be `0`. + + @complexity Logarithmic in the size of the JSON object. + + @liveexample{The example shows how `count()` is used.,count} + + @since version 1.0.0 + */ + template<typename KeyT> + size_type count(KeyT&& key) const + { + // return 0 for all nonobject types + return is_object() ? m_value.object->count(std::forward<KeyT>(key)) : 0; + } + + /*! + @brief check the existence of an element in a JSON object + + Check whether an element exists in a JSON object with key equivalent to + @a key. If the element is not found or the JSON value is not an object, + false is returned. + + @note This method always returns false when executed on a JSON type + that is not an object. + + @param[in] key key value to check its existence. + + @return true if an element with specified @a key exists. If no such + element with such key is found or the JSON value is not an object, + false is returned. + + @complexity Logarithmic in the size of the JSON object. + + @liveexample{The following code shows an example for `contains()`.,contains} + + @sa @ref find(KeyT&&) -- returns an iterator to an object element + + @since version 3.6.0 + */ + template<typename KeyT> + bool contains(KeyT&& key) const + { + return is_object() and m_value.object->find(std::forward<KeyT>(key)) != m_value.object->end(); + } + + /// @} + + + /////////////// + // iterators // + /////////////// + + /// @name iterators + /// @{ + + /*! + @brief returns an iterator to the first element + + Returns an iterator to the first element. + + @image html range-begin-end.svg "Illustration from cppreference.com" + + @return iterator to the first element + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [Container](https://en.cppreference.com/w/cpp/named_req/Container) + requirements: + - The complexity is constant. + + @liveexample{The following code shows an example for `begin()`.,begin} + + @sa @ref cbegin() -- returns a const iterator to the beginning + @sa @ref end() -- returns an iterator to the end + @sa @ref cend() -- returns a const iterator to the end + + @since version 1.0.0 + */ + iterator begin() noexcept + { + iterator result(this); + result.set_begin(); + return result; + } + + /*! + @copydoc basic_json::cbegin() + */ + const_iterator begin() const noexcept + { + return cbegin(); + } + + /*! + @brief returns a const iterator to the first element + + Returns a const iterator to the first element. + + @image html range-begin-end.svg "Illustration from cppreference.com" + + @return const iterator to the first element + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [Container](https://en.cppreference.com/w/cpp/named_req/Container) + requirements: + - The complexity is constant. + - Has the semantics of `const_cast<const basic_json&>(*this).begin()`. + + @liveexample{The following code shows an example for `cbegin()`.,cbegin} + + @sa @ref begin() -- returns an iterator to the beginning + @sa @ref end() -- returns an iterator to the end + @sa @ref cend() -- returns a const iterator to the end + + @since version 1.0.0 + */ + const_iterator cbegin() const noexcept + { + const_iterator result(this); + result.set_begin(); + return result; + } + + /*! + @brief returns an iterator to one past the last element + + Returns an iterator to one past the last element. + + @image html range-begin-end.svg "Illustration from cppreference.com" + + @return iterator one past the last element + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [Container](https://en.cppreference.com/w/cpp/named_req/Container) + requirements: + - The complexity is constant. + + @liveexample{The following code shows an example for `end()`.,end} + + @sa @ref cend() -- returns a const iterator to the end + @sa @ref begin() -- returns an iterator to the beginning + @sa @ref cbegin() -- returns a const iterator to the beginning + + @since version 1.0.0 + */ + iterator end() noexcept + { + iterator result(this); + result.set_end(); + return result; + } + + /*! + @copydoc basic_json::cend() + */ + const_iterator end() const noexcept + { + return cend(); + } + + /*! + @brief returns a const iterator to one past the last element + + Returns a const iterator to one past the last element. + + @image html range-begin-end.svg "Illustration from cppreference.com" + + @return const iterator one past the last element + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [Container](https://en.cppreference.com/w/cpp/named_req/Container) + requirements: + - The complexity is constant. + - Has the semantics of `const_cast<const basic_json&>(*this).end()`. + + @liveexample{The following code shows an example for `cend()`.,cend} + + @sa @ref end() -- returns an iterator to the end + @sa @ref begin() -- returns an iterator to the beginning + @sa @ref cbegin() -- returns a const iterator to the beginning + + @since version 1.0.0 + */ + const_iterator cend() const noexcept + { + const_iterator result(this); + result.set_end(); + return result; + } + + /*! + @brief returns an iterator to the reverse-beginning + + Returns an iterator to the reverse-beginning; that is, the last element. + + @image html range-rbegin-rend.svg "Illustration from cppreference.com" + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [ReversibleContainer](https://en.cppreference.com/w/cpp/named_req/ReversibleContainer) + requirements: + - The complexity is constant. + - Has the semantics of `reverse_iterator(end())`. + + @liveexample{The following code shows an example for `rbegin()`.,rbegin} + + @sa @ref crbegin() -- returns a const reverse iterator to the beginning + @sa @ref rend() -- returns a reverse iterator to the end + @sa @ref crend() -- returns a const reverse iterator to the end + + @since version 1.0.0 + */ + reverse_iterator rbegin() noexcept + { + return reverse_iterator(end()); + } + + /*! + @copydoc basic_json::crbegin() + */ + const_reverse_iterator rbegin() const noexcept + { + return crbegin(); + } + + /*! + @brief returns an iterator to the reverse-end + + Returns an iterator to the reverse-end; that is, one before the first + element. + + @image html range-rbegin-rend.svg "Illustration from cppreference.com" + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [ReversibleContainer](https://en.cppreference.com/w/cpp/named_req/ReversibleContainer) + requirements: + - The complexity is constant. + - Has the semantics of `reverse_iterator(begin())`. + + @liveexample{The following code shows an example for `rend()`.,rend} + + @sa @ref crend() -- returns a const reverse iterator to the end + @sa @ref rbegin() -- returns a reverse iterator to the beginning + @sa @ref crbegin() -- returns a const reverse iterator to the beginning + + @since version 1.0.0 + */ + reverse_iterator rend() noexcept + { + return reverse_iterator(begin()); + } + + /*! + @copydoc basic_json::crend() + */ + const_reverse_iterator rend() const noexcept + { + return crend(); + } + + /*! + @brief returns a const reverse iterator to the last element + + Returns a const iterator to the reverse-beginning; that is, the last + element. + + @image html range-rbegin-rend.svg "Illustration from cppreference.com" + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [ReversibleContainer](https://en.cppreference.com/w/cpp/named_req/ReversibleContainer) + requirements: + - The complexity is constant. + - Has the semantics of `const_cast<const basic_json&>(*this).rbegin()`. + + @liveexample{The following code shows an example for `crbegin()`.,crbegin} + + @sa @ref rbegin() -- returns a reverse iterator to the beginning + @sa @ref rend() -- returns a reverse iterator to the end + @sa @ref crend() -- returns a const reverse iterator to the end + + @since version 1.0.0 + */ + const_reverse_iterator crbegin() const noexcept + { + return const_reverse_iterator(cend()); + } + + /*! + @brief returns a const reverse iterator to one before the first + + Returns a const reverse iterator to the reverse-end; that is, one before + the first element. + + @image html range-rbegin-rend.svg "Illustration from cppreference.com" + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [ReversibleContainer](https://en.cppreference.com/w/cpp/named_req/ReversibleContainer) + requirements: + - The complexity is constant. + - Has the semantics of `const_cast<const basic_json&>(*this).rend()`. + + @liveexample{The following code shows an example for `crend()`.,crend} + + @sa @ref rend() -- returns a reverse iterator to the end + @sa @ref rbegin() -- returns a reverse iterator to the beginning + @sa @ref crbegin() -- returns a const reverse iterator to the beginning + + @since version 1.0.0 + */ + const_reverse_iterator crend() const noexcept + { + return const_reverse_iterator(cbegin()); + } + + public: + /*! + @brief wrapper to access iterator member functions in range-based for + + This function allows to access @ref iterator::key() and @ref + iterator::value() during range-based for loops. In these loops, a + reference to the JSON values is returned, so there is no access to the + underlying iterator. + + For loop without iterator_wrapper: + + @code{cpp} + for (auto it = j_object.begin(); it != j_object.end(); ++it) + { + std::cout << "key: " << it.key() << ", value:" << it.value() << '\n'; + } + @endcode + + Range-based for loop without iterator proxy: + + @code{cpp} + for (auto it : j_object) + { + // "it" is of type json::reference and has no key() member + std::cout << "value: " << it << '\n'; + } + @endcode + + Range-based for loop with iterator proxy: + + @code{cpp} + for (auto it : json::iterator_wrapper(j_object)) + { + std::cout << "key: " << it.key() << ", value:" << it.value() << '\n'; + } + @endcode + + @note When iterating over an array, `key()` will return the index of the + element as string (see example). + + @param[in] ref reference to a JSON value + @return iteration proxy object wrapping @a ref with an interface to use in + range-based for loops + + @liveexample{The following code shows how the wrapper is used,iterator_wrapper} + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Constant. + + @note The name of this function is not yet final and may change in the + future. + + @deprecated This stream operator is deprecated and will be removed in + future 4.0.0 of the library. Please use @ref items() instead; + that is, replace `json::iterator_wrapper(j)` with `j.items()`. + */ + JSON_DEPRECATED + static iteration_proxy<iterator> iterator_wrapper(reference ref) noexcept + { + return ref.items(); + } + + /*! + @copydoc iterator_wrapper(reference) + */ + JSON_DEPRECATED + static iteration_proxy<const_iterator> iterator_wrapper(const_reference ref) noexcept + { + return ref.items(); + } + + /*! + @brief helper to access iterator member functions in range-based for + + This function allows to access @ref iterator::key() and @ref + iterator::value() during range-based for loops. In these loops, a + reference to the JSON values is returned, so there is no access to the + underlying iterator. + + For loop without `items()` function: + + @code{cpp} + for (auto it = j_object.begin(); it != j_object.end(); ++it) + { + std::cout << "key: " << it.key() << ", value:" << it.value() << '\n'; + } + @endcode + + Range-based for loop without `items()` function: + + @code{cpp} + for (auto it : j_object) + { + // "it" is of type json::reference and has no key() member + std::cout << "value: " << it << '\n'; + } + @endcode + + Range-based for loop with `items()` function: + + @code{cpp} + for (auto& el : j_object.items()) + { + std::cout << "key: " << el.key() << ", value:" << el.value() << '\n'; + } + @endcode + + The `items()` function also allows to use + [structured bindings](https://en.cppreference.com/w/cpp/language/structured_binding) + (C++17): + + @code{cpp} + for (auto& [key, val] : j_object.items()) + { + std::cout << "key: " << key << ", value:" << val << '\n'; + } + @endcode + + @note When iterating over an array, `key()` will return the index of the + element as string (see example). For primitive types (e.g., numbers), + `key()` returns an empty string. + + @return iteration proxy object wrapping @a ref with an interface to use in + range-based for loops + + @liveexample{The following code shows how the function is used.,items} + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Constant. + + @since version 3.1.0, structured bindings support since 3.5.0. + */ + iteration_proxy<iterator> items() noexcept + { + return iteration_proxy<iterator>(*this); + } + + /*! + @copydoc items() + */ + iteration_proxy<const_iterator> items() const noexcept + { + return iteration_proxy<const_iterator>(*this); + } + + /// @} + + + ////////////// + // capacity // + ////////////// + + /// @name capacity + /// @{ + + /*! + @brief checks whether the container is empty. + + Checks if a JSON value has no elements (i.e. whether its @ref size is `0`). + + @return The return value depends on the different types and is + defined as follows: + Value type | return value + ----------- | ------------- + null | `true` + boolean | `false` + string | `false` + number | `false` + object | result of function `object_t::empty()` + array | result of function `array_t::empty()` + + @liveexample{The following code uses `empty()` to check if a JSON + object contains any elements.,empty} + + @complexity Constant, as long as @ref array_t and @ref object_t satisfy + the Container concept; that is, their `empty()` functions have constant + complexity. + + @iterators No changes. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @note This function does not return whether a string stored as JSON value + is empty - it returns whether the JSON container itself is empty which is + false in the case of a string. + + @requirement This function helps `basic_json` satisfying the + [Container](https://en.cppreference.com/w/cpp/named_req/Container) + requirements: + - The complexity is constant. + - Has the semantics of `begin() == end()`. + + @sa @ref size() -- returns the number of elements + + @since version 1.0.0 + */ + bool empty() const noexcept + { + switch (m_type) + { + case value_t::null: + { + // null values are empty + return true; + } + + case value_t::array: + { + // delegate call to array_t::empty() + return m_value.array->empty(); + } + + case value_t::object: + { + // delegate call to object_t::empty() + return m_value.object->empty(); + } + + default: + { + // all other types are nonempty + return false; + } + } + } + + /*! + @brief returns the number of elements + + Returns the number of elements in a JSON value. + + @return The return value depends on the different types and is + defined as follows: + Value type | return value + ----------- | ------------- + null | `0` + boolean | `1` + string | `1` + number | `1` + object | result of function object_t::size() + array | result of function array_t::size() + + @liveexample{The following code calls `size()` on the different value + types.,size} + + @complexity Constant, as long as @ref array_t and @ref object_t satisfy + the Container concept; that is, their size() functions have constant + complexity. + + @iterators No changes. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @note This function does not return the length of a string stored as JSON + value - it returns the number of elements in the JSON value which is 1 in + the case of a string. + + @requirement This function helps `basic_json` satisfying the + [Container](https://en.cppreference.com/w/cpp/named_req/Container) + requirements: + - The complexity is constant. + - Has the semantics of `std::distance(begin(), end())`. + + @sa @ref empty() -- checks whether the container is empty + @sa @ref max_size() -- returns the maximal number of elements + + @since version 1.0.0 + */ + size_type size() const noexcept + { + switch (m_type) + { + case value_t::null: + { + // null values are empty + return 0; + } + + case value_t::array: + { + // delegate call to array_t::size() + return m_value.array->size(); + } + + case value_t::object: + { + // delegate call to object_t::size() + return m_value.object->size(); + } + + default: + { + // all other types have size 1 + return 1; + } + } + } + + /*! + @brief returns the maximum possible number of elements + + Returns the maximum number of elements a JSON value is able to hold due to + system or library implementation limitations, i.e. `std::distance(begin(), + end())` for the JSON value. + + @return The return value depends on the different types and is + defined as follows: + Value type | return value + ----------- | ------------- + null | `0` (same as `size()`) + boolean | `1` (same as `size()`) + string | `1` (same as `size()`) + number | `1` (same as `size()`) + object | result of function `object_t::max_size()` + array | result of function `array_t::max_size()` + + @liveexample{The following code calls `max_size()` on the different value + types. Note the output is implementation specific.,max_size} + + @complexity Constant, as long as @ref array_t and @ref object_t satisfy + the Container concept; that is, their `max_size()` functions have constant + complexity. + + @iterators No changes. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @requirement This function helps `basic_json` satisfying the + [Container](https://en.cppreference.com/w/cpp/named_req/Container) + requirements: + - The complexity is constant. + - Has the semantics of returning `b.size()` where `b` is the largest + possible JSON value. + + @sa @ref size() -- returns the number of elements + + @since version 1.0.0 + */ + size_type max_size() const noexcept + { + switch (m_type) + { + case value_t::array: + { + // delegate call to array_t::max_size() + return m_value.array->max_size(); + } + + case value_t::object: + { + // delegate call to object_t::max_size() + return m_value.object->max_size(); + } + + default: + { + // all other types have max_size() == size() + return size(); + } + } + } + + /// @} + + + /////////////// + // modifiers // + /////////////// + + /// @name modifiers + /// @{ + + /*! + @brief clears the contents + + Clears the content of a JSON value and resets it to the default value as + if @ref basic_json(value_t) would have been called with the current value + type from @ref type(): + + Value type | initial value + ----------- | ------------- + null | `null` + boolean | `false` + string | `""` + number | `0` + object | `{}` + array | `[]` + + @post Has the same effect as calling + @code {.cpp} + *this = basic_json(type()); + @endcode + + @liveexample{The example below shows the effect of `clear()` to different + JSON types.,clear} + + @complexity Linear in the size of the JSON value. + + @iterators All iterators, pointers and references related to this container + are invalidated. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @sa @ref basic_json(value_t) -- constructor that creates an object with the + same value than calling `clear()` + + @since version 1.0.0 + */ + void clear() noexcept + { + switch (m_type) + { + case value_t::number_integer: + { + m_value.number_integer = 0; + break; + } + + case value_t::number_unsigned: + { + m_value.number_unsigned = 0; + break; + } + + case value_t::number_float: + { + m_value.number_float = 0.0; + break; + } + + case value_t::boolean: + { + m_value.boolean = false; + break; + } + + case value_t::string: + { + m_value.string->clear(); + break; + } + + case value_t::array: + { + m_value.array->clear(); + break; + } + + case value_t::object: + { + m_value.object->clear(); + break; + } + + default: + break; + } + } + + /*! + @brief add an object to an array + + Appends the given element @a val to the end of the JSON value. If the + function is called on a JSON null value, an empty array is created before + appending @a val. + + @param[in] val the value to add to the JSON array + + @throw type_error.308 when called on a type other than JSON array or + null; example: `"cannot use push_back() with number"` + + @complexity Amortized constant. + + @liveexample{The example shows how `push_back()` and `+=` can be used to + add elements to a JSON array. Note how the `null` value was silently + converted to a JSON array.,push_back} + + @since version 1.0.0 + */ + void push_back(basic_json&& val) + { + // push_back only works for null objects or arrays + if (JSON_UNLIKELY(not(is_null() or is_array()))) + { + JSON_THROW(type_error::create(308, "cannot use push_back() with " + std::string(type_name()))); + } + + // transform null object into an array + if (is_null()) + { + m_type = value_t::array; + m_value = value_t::array; + assert_invariant(); + } + + // add element to array (move semantics) + m_value.array->push_back(std::move(val)); + // invalidate object: mark it null so we do not call the destructor + // cppcheck-suppress accessMoved + val.m_type = value_t::null; + } + + /*! + @brief add an object to an array + @copydoc push_back(basic_json&&) + */ + reference operator+=(basic_json&& val) + { + push_back(std::move(val)); + return *this; + } + + /*! + @brief add an object to an array + @copydoc push_back(basic_json&&) + */ + void push_back(const basic_json& val) + { + // push_back only works for null objects or arrays + if (JSON_UNLIKELY(not(is_null() or is_array()))) + { + JSON_THROW(type_error::create(308, "cannot use push_back() with " + std::string(type_name()))); + } + + // transform null object into an array + if (is_null()) + { + m_type = value_t::array; + m_value = value_t::array; + assert_invariant(); + } + + // add element to array + m_value.array->push_back(val); + } + + /*! + @brief add an object to an array + @copydoc push_back(basic_json&&) + */ + reference operator+=(const basic_json& val) + { + push_back(val); + return *this; + } + + /*! + @brief add an object to an object + + Inserts the given element @a val to the JSON object. If the function is + called on a JSON null value, an empty object is created before inserting + @a val. + + @param[in] val the value to add to the JSON object + + @throw type_error.308 when called on a type other than JSON object or + null; example: `"cannot use push_back() with number"` + + @complexity Logarithmic in the size of the container, O(log(`size()`)). + + @liveexample{The example shows how `push_back()` and `+=` can be used to + add elements to a JSON object. Note how the `null` value was silently + converted to a JSON object.,push_back__object_t__value} + + @since version 1.0.0 + */ + void push_back(const typename object_t::value_type& val) + { + // push_back only works for null objects or objects + if (JSON_UNLIKELY(not(is_null() or is_object()))) + { + JSON_THROW(type_error::create(308, "cannot use push_back() with " + std::string(type_name()))); + } + + // transform null object into an object + if (is_null()) + { + m_type = value_t::object; + m_value = value_t::object; + assert_invariant(); + } + + // add element to array + m_value.object->insert(val); + } + + /*! + @brief add an object to an object + @copydoc push_back(const typename object_t::value_type&) + */ + reference operator+=(const typename object_t::value_type& val) + { + push_back(val); + return *this; + } + + /*! + @brief add an object to an object + + This function allows to use `push_back` with an initializer list. In case + + 1. the current value is an object, + 2. the initializer list @a init contains only two elements, and + 3. the first element of @a init is a string, + + @a init is converted into an object element and added using + @ref push_back(const typename object_t::value_type&). Otherwise, @a init + is converted to a JSON value and added using @ref push_back(basic_json&&). + + @param[in] init an initializer list + + @complexity Linear in the size of the initializer list @a init. + + @note This function is required to resolve an ambiguous overload error, + because pairs like `{"key", "value"}` can be both interpreted as + `object_t::value_type` or `std::initializer_list<basic_json>`, see + https://github.com/nlohmann/json/issues/235 for more information. + + @liveexample{The example shows how initializer lists are treated as + objects when possible.,push_back__initializer_list} + */ + void push_back(initializer_list_t init) + { + if (is_object() and init.size() == 2 and (*init.begin())->is_string()) + { + basic_json&& key = init.begin()->moved_or_copied(); + push_back(typename object_t::value_type( + std::move(key.get_ref<string_t&>()), (init.begin() + 1)->moved_or_copied())); + } + else + { + push_back(basic_json(init)); + } + } + + /*! + @brief add an object to an object + @copydoc push_back(initializer_list_t) + */ + reference operator+=(initializer_list_t init) + { + push_back(init); + return *this; + } + + /*! + @brief add an object to an array + + Creates a JSON value from the passed parameters @a args to the end of the + JSON value. If the function is called on a JSON null value, an empty array + is created before appending the value created from @a args. + + @param[in] args arguments to forward to a constructor of @ref basic_json + @tparam Args compatible types to create a @ref basic_json object + + @throw type_error.311 when called on a type other than JSON array or + null; example: `"cannot use emplace_back() with number"` + + @complexity Amortized constant. + + @liveexample{The example shows how `push_back()` can be used to add + elements to a JSON array. Note how the `null` value was silently converted + to a JSON array.,emplace_back} + + @since version 2.0.8 + */ + template<class... Args> + void emplace_back(Args&& ... args) + { + // emplace_back only works for null objects or arrays + if (JSON_UNLIKELY(not(is_null() or is_array()))) + { + JSON_THROW(type_error::create(311, "cannot use emplace_back() with " + std::string(type_name()))); + } + + // transform null object into an array + if (is_null()) + { + m_type = value_t::array; + m_value = value_t::array; + assert_invariant(); + } + + // add element to array (perfect forwarding) + m_value.array->emplace_back(std::forward<Args>(args)...); + } + + /*! + @brief add an object to an object if key does not exist + + Inserts a new element into a JSON object constructed in-place with the + given @a args if there is no element with the key in the container. If the + function is called on a JSON null value, an empty object is created before + appending the value created from @a args. + + @param[in] args arguments to forward to a constructor of @ref basic_json + @tparam Args compatible types to create a @ref basic_json object + + @return a pair consisting of an iterator to the inserted element, or the + already-existing element if no insertion happened, and a bool + denoting whether the insertion took place. + + @throw type_error.311 when called on a type other than JSON object or + null; example: `"cannot use emplace() with number"` + + @complexity Logarithmic in the size of the container, O(log(`size()`)). + + @liveexample{The example shows how `emplace()` can be used to add elements + to a JSON object. Note how the `null` value was silently converted to a + JSON object. Further note how no value is added if there was already one + value stored with the same key.,emplace} + + @since version 2.0.8 + */ + template<class... Args> + std::pair<iterator, bool> emplace(Args&& ... args) + { + // emplace only works for null objects or arrays + if (JSON_UNLIKELY(not(is_null() or is_object()))) + { + JSON_THROW(type_error::create(311, "cannot use emplace() with " + std::string(type_name()))); + } + + // transform null object into an object + if (is_null()) + { + m_type = value_t::object; + m_value = value_t::object; + assert_invariant(); + } + + // add element to array (perfect forwarding) + auto res = m_value.object->emplace(std::forward<Args>(args)...); + // create result iterator and set iterator to the result of emplace + auto it = begin(); + it.m_it.object_iterator = res.first; + + // return pair of iterator and boolean + return {it, res.second}; + } + + /// Helper for insertion of an iterator + /// @note: This uses std::distance to support GCC 4.8, + /// see https://github.com/nlohmann/json/pull/1257 + template<typename... Args> + iterator insert_iterator(const_iterator pos, Args&& ... args) + { + iterator result(this); + assert(m_value.array != nullptr); + + auto insert_pos = std::distance(m_value.array->begin(), pos.m_it.array_iterator); + m_value.array->insert(pos.m_it.array_iterator, std::forward<Args>(args)...); + result.m_it.array_iterator = m_value.array->begin() + insert_pos; + + // This could have been written as: + // result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, cnt, val); + // but the return value of insert is missing in GCC 4.8, so it is written this way instead. + + return result; + } + + /*! + @brief inserts element + + Inserts element @a val before iterator @a pos. + + @param[in] pos iterator before which the content will be inserted; may be + the end() iterator + @param[in] val element to insert + @return iterator pointing to the inserted @a val. + + @throw type_error.309 if called on JSON values other than arrays; + example: `"cannot use insert() with string"` + @throw invalid_iterator.202 if @a pos is not an iterator of *this; + example: `"iterator does not fit current value"` + + @complexity Constant plus linear in the distance between @a pos and end of + the container. + + @liveexample{The example shows how `insert()` is used.,insert} + + @since version 1.0.0 + */ + iterator insert(const_iterator pos, const basic_json& val) + { + // insert only works for arrays + if (JSON_LIKELY(is_array())) + { + // check if iterator pos fits to this JSON value + if (JSON_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); + } + + // insert to array and return iterator + return insert_iterator(pos, val); + } + + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()))); + } + + /*! + @brief inserts element + @copydoc insert(const_iterator, const basic_json&) + */ + iterator insert(const_iterator pos, basic_json&& val) + { + return insert(pos, val); + } + + /*! + @brief inserts elements + + Inserts @a cnt copies of @a val before iterator @a pos. + + @param[in] pos iterator before which the content will be inserted; may be + the end() iterator + @param[in] cnt number of copies of @a val to insert + @param[in] val element to insert + @return iterator pointing to the first element inserted, or @a pos if + `cnt==0` + + @throw type_error.309 if called on JSON values other than arrays; example: + `"cannot use insert() with string"` + @throw invalid_iterator.202 if @a pos is not an iterator of *this; + example: `"iterator does not fit current value"` + + @complexity Linear in @a cnt plus linear in the distance between @a pos + and end of the container. + + @liveexample{The example shows how `insert()` is used.,insert__count} + + @since version 1.0.0 + */ + iterator insert(const_iterator pos, size_type cnt, const basic_json& val) + { + // insert only works for arrays + if (JSON_LIKELY(is_array())) + { + // check if iterator pos fits to this JSON value + if (JSON_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); + } + + // insert to array and return iterator + return insert_iterator(pos, cnt, val); + } + + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()))); + } + + /*! + @brief inserts elements + + Inserts elements from range `[first, last)` before iterator @a pos. + + @param[in] pos iterator before which the content will be inserted; may be + the end() iterator + @param[in] first begin of the range of elements to insert + @param[in] last end of the range of elements to insert + + @throw type_error.309 if called on JSON values other than arrays; example: + `"cannot use insert() with string"` + @throw invalid_iterator.202 if @a pos is not an iterator of *this; + example: `"iterator does not fit current value"` + @throw invalid_iterator.210 if @a first and @a last do not belong to the + same JSON value; example: `"iterators do not fit"` + @throw invalid_iterator.211 if @a first or @a last are iterators into + container for which insert is called; example: `"passed iterators may not + belong to container"` + + @return iterator pointing to the first element inserted, or @a pos if + `first==last` + + @complexity Linear in `std::distance(first, last)` plus linear in the + distance between @a pos and end of the container. + + @liveexample{The example shows how `insert()` is used.,insert__range} + + @since version 1.0.0 + */ + iterator insert(const_iterator pos, const_iterator first, const_iterator last) + { + // insert only works for arrays + if (JSON_UNLIKELY(not is_array())) + { + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()))); + } + + // check if iterator pos fits to this JSON value + if (JSON_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); + } + + // check if range iterators belong to the same JSON object + if (JSON_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(210, "iterators do not fit")); + } + + if (JSON_UNLIKELY(first.m_object == this)) + { + JSON_THROW(invalid_iterator::create(211, "passed iterators may not belong to container")); + } + + // insert to array and return iterator + return insert_iterator(pos, first.m_it.array_iterator, last.m_it.array_iterator); + } + + /*! + @brief inserts elements + + Inserts elements from initializer list @a ilist before iterator @a pos. + + @param[in] pos iterator before which the content will be inserted; may be + the end() iterator + @param[in] ilist initializer list to insert the values from + + @throw type_error.309 if called on JSON values other than arrays; example: + `"cannot use insert() with string"` + @throw invalid_iterator.202 if @a pos is not an iterator of *this; + example: `"iterator does not fit current value"` + + @return iterator pointing to the first element inserted, or @a pos if + `ilist` is empty + + @complexity Linear in `ilist.size()` plus linear in the distance between + @a pos and end of the container. + + @liveexample{The example shows how `insert()` is used.,insert__ilist} + + @since version 1.0.0 + */ + iterator insert(const_iterator pos, initializer_list_t ilist) + { + // insert only works for arrays + if (JSON_UNLIKELY(not is_array())) + { + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()))); + } + + // check if iterator pos fits to this JSON value + if (JSON_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); + } + + // insert to array and return iterator + return insert_iterator(pos, ilist.begin(), ilist.end()); + } + + /*! + @brief inserts elements + + Inserts elements from range `[first, last)`. + + @param[in] first begin of the range of elements to insert + @param[in] last end of the range of elements to insert + + @throw type_error.309 if called on JSON values other than objects; example: + `"cannot use insert() with string"` + @throw invalid_iterator.202 if iterator @a first or @a last does does not + point to an object; example: `"iterators first and last must point to + objects"` + @throw invalid_iterator.210 if @a first and @a last do not belong to the + same JSON value; example: `"iterators do not fit"` + + @complexity Logarithmic: `O(N*log(size() + N))`, where `N` is the number + of elements to insert. + + @liveexample{The example shows how `insert()` is used.,insert__range_object} + + @since version 3.0.0 + */ + void insert(const_iterator first, const_iterator last) + { + // insert only works for objects + if (JSON_UNLIKELY(not is_object())) + { + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()))); + } + + // check if range iterators belong to the same JSON object + if (JSON_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(210, "iterators do not fit")); + } + + // passed iterators must belong to objects + if (JSON_UNLIKELY(not first.m_object->is_object())) + { + JSON_THROW(invalid_iterator::create(202, "iterators first and last must point to objects")); + } + + m_value.object->insert(first.m_it.object_iterator, last.m_it.object_iterator); + } + + /*! + @brief updates a JSON object from another object, overwriting existing keys + + Inserts all values from JSON object @a j and overwrites existing keys. + + @param[in] j JSON object to read values from + + @throw type_error.312 if called on JSON values other than objects; example: + `"cannot use update() with string"` + + @complexity O(N*log(size() + N)), where N is the number of elements to + insert. + + @liveexample{The example shows how `update()` is used.,update} + + @sa https://docs.python.org/3.6/library/stdtypes.html#dict.update + + @since version 3.0.0 + */ + void update(const_reference j) + { + // implicitly convert null value to an empty object + if (is_null()) + { + m_type = value_t::object; + m_value.object = create<object_t>(); + assert_invariant(); + } + + if (JSON_UNLIKELY(not is_object())) + { + JSON_THROW(type_error::create(312, "cannot use update() with " + std::string(type_name()))); + } + if (JSON_UNLIKELY(not j.is_object())) + { + JSON_THROW(type_error::create(312, "cannot use update() with " + std::string(j.type_name()))); + } + + for (auto it = j.cbegin(); it != j.cend(); ++it) + { + m_value.object->operator[](it.key()) = it.value(); + } + } + + /*! + @brief updates a JSON object from another object, overwriting existing keys + + Inserts all values from from range `[first, last)` and overwrites existing + keys. + + @param[in] first begin of the range of elements to insert + @param[in] last end of the range of elements to insert + + @throw type_error.312 if called on JSON values other than objects; example: + `"cannot use update() with string"` + @throw invalid_iterator.202 if iterator @a first or @a last does does not + point to an object; example: `"iterators first and last must point to + objects"` + @throw invalid_iterator.210 if @a first and @a last do not belong to the + same JSON value; example: `"iterators do not fit"` + + @complexity O(N*log(size() + N)), where N is the number of elements to + insert. + + @liveexample{The example shows how `update()` is used__range.,update} + + @sa https://docs.python.org/3.6/library/stdtypes.html#dict.update + + @since version 3.0.0 + */ + void update(const_iterator first, const_iterator last) + { + // implicitly convert null value to an empty object + if (is_null()) + { + m_type = value_t::object; + m_value.object = create<object_t>(); + assert_invariant(); + } + + if (JSON_UNLIKELY(not is_object())) + { + JSON_THROW(type_error::create(312, "cannot use update() with " + std::string(type_name()))); + } + + // check if range iterators belong to the same JSON object + if (JSON_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(210, "iterators do not fit")); + } + + // passed iterators must belong to objects + if (JSON_UNLIKELY(not first.m_object->is_object() + or not last.m_object->is_object())) + { + JSON_THROW(invalid_iterator::create(202, "iterators first and last must point to objects")); + } + + for (auto it = first; it != last; ++it) + { + m_value.object->operator[](it.key()) = it.value(); + } + } + + /*! + @brief exchanges the values + + Exchanges the contents of the JSON value with those of @a other. Does not + invoke any move, copy, or swap operations on individual elements. All + iterators and references remain valid. The past-the-end iterator is + invalidated. + + @param[in,out] other JSON value to exchange the contents with + + @complexity Constant. + + @liveexample{The example below shows how JSON values can be swapped with + `swap()`.,swap__reference} + + @since version 1.0.0 + */ + void swap(reference other) noexcept ( + std::is_nothrow_move_constructible<value_t>::value and + std::is_nothrow_move_assignable<value_t>::value and + std::is_nothrow_move_constructible<json_value>::value and + std::is_nothrow_move_assignable<json_value>::value + ) + { + std::swap(m_type, other.m_type); + std::swap(m_value, other.m_value); + assert_invariant(); + } + + /*! + @brief exchanges the values + + Exchanges the contents of a JSON array with those of @a other. Does not + invoke any move, copy, or swap operations on individual elements. All + iterators and references remain valid. The past-the-end iterator is + invalidated. + + @param[in,out] other array to exchange the contents with + + @throw type_error.310 when JSON value is not an array; example: `"cannot + use swap() with string"` + + @complexity Constant. + + @liveexample{The example below shows how arrays can be swapped with + `swap()`.,swap__array_t} + + @since version 1.0.0 + */ + void swap(array_t& other) + { + // swap only works for arrays + if (JSON_LIKELY(is_array())) + { + std::swap(*(m_value.array), other); + } + else + { + JSON_THROW(type_error::create(310, "cannot use swap() with " + std::string(type_name()))); + } + } + + /*! + @brief exchanges the values + + Exchanges the contents of a JSON object with those of @a other. Does not + invoke any move, copy, or swap operations on individual elements. All + iterators and references remain valid. The past-the-end iterator is + invalidated. + + @param[in,out] other object to exchange the contents with + + @throw type_error.310 when JSON value is not an object; example: + `"cannot use swap() with string"` + + @complexity Constant. + + @liveexample{The example below shows how objects can be swapped with + `swap()`.,swap__object_t} + + @since version 1.0.0 + */ + void swap(object_t& other) + { + // swap only works for objects + if (JSON_LIKELY(is_object())) + { + std::swap(*(m_value.object), other); + } + else + { + JSON_THROW(type_error::create(310, "cannot use swap() with " + std::string(type_name()))); + } + } + + /*! + @brief exchanges the values + + Exchanges the contents of a JSON string with those of @a other. Does not + invoke any move, copy, or swap operations on individual elements. All + iterators and references remain valid. The past-the-end iterator is + invalidated. + + @param[in,out] other string to exchange the contents with + + @throw type_error.310 when JSON value is not a string; example: `"cannot + use swap() with boolean"` + + @complexity Constant. + + @liveexample{The example below shows how strings can be swapped with + `swap()`.,swap__string_t} + + @since version 1.0.0 + */ + void swap(string_t& other) + { + // swap only works for strings + if (JSON_LIKELY(is_string())) + { + std::swap(*(m_value.string), other); + } + else + { + JSON_THROW(type_error::create(310, "cannot use swap() with " + std::string(type_name()))); + } + } + + /// @} + + public: + ////////////////////////////////////////// + // lexicographical comparison operators // + ////////////////////////////////////////// + + /// @name lexicographical comparison operators + /// @{ + + /*! + @brief comparison: equal + + Compares two JSON values for equality according to the following rules: + - Two JSON values are equal if (1) they are from the same type and (2) + their stored values are the same according to their respective + `operator==`. + - Integer and floating-point numbers are automatically converted before + comparison. Note than two NaN values are always treated as unequal. + - Two JSON null values are equal. + + @note Floating-point inside JSON values numbers are compared with + `json::number_float_t::operator==` which is `double::operator==` by + default. To compare floating-point while respecting an epsilon, an alternative + [comparison function](https://github.com/mariokonrad/marnav/blob/master/src/marnav/math/floatingpoint.hpp#L34-#L39) + could be used, for instance + @code {.cpp} + template<typename T, typename = typename std::enable_if<std::is_floating_point<T>::value, T>::type> + inline bool is_same(T a, T b, T epsilon = std::numeric_limits<T>::epsilon()) noexcept + { + return std::abs(a - b) <= epsilon; + } + @endcode + + @note NaN values never compare equal to themselves or to other NaN values. + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether the values @a lhs and @a rhs are equal + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @complexity Linear. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__equal} + + @since version 1.0.0 + */ + friend bool operator==(const_reference lhs, const_reference rhs) noexcept + { + const auto lhs_type = lhs.type(); + const auto rhs_type = rhs.type(); + + if (lhs_type == rhs_type) + { + switch (lhs_type) + { + case value_t::array: + return *lhs.m_value.array == *rhs.m_value.array; + + case value_t::object: + return *lhs.m_value.object == *rhs.m_value.object; + + case value_t::null: + return true; + + case value_t::string: + return *lhs.m_value.string == *rhs.m_value.string; + + case value_t::boolean: + return lhs.m_value.boolean == rhs.m_value.boolean; + + case value_t::number_integer: + return lhs.m_value.number_integer == rhs.m_value.number_integer; + + case value_t::number_unsigned: + return lhs.m_value.number_unsigned == rhs.m_value.number_unsigned; + + case value_t::number_float: + return lhs.m_value.number_float == rhs.m_value.number_float; + + default: + return false; + } + } + else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float) + { + return static_cast<number_float_t>(lhs.m_value.number_integer) == rhs.m_value.number_float; + } + else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer) + { + return lhs.m_value.number_float == static_cast<number_float_t>(rhs.m_value.number_integer); + } + else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_float) + { + return static_cast<number_float_t>(lhs.m_value.number_unsigned) == rhs.m_value.number_float; + } + else if (lhs_type == value_t::number_float and rhs_type == value_t::number_unsigned) + { + return lhs.m_value.number_float == static_cast<number_float_t>(rhs.m_value.number_unsigned); + } + else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_integer) + { + return static_cast<number_integer_t>(lhs.m_value.number_unsigned) == rhs.m_value.number_integer; + } + else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_unsigned) + { + return lhs.m_value.number_integer == static_cast<number_integer_t>(rhs.m_value.number_unsigned); + } + + return false; + } + + /*! + @brief comparison: equal + @copydoc operator==(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator==(const_reference lhs, const ScalarType rhs) noexcept + { + return lhs == basic_json(rhs); + } + + /*! + @brief comparison: equal + @copydoc operator==(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator==(const ScalarType lhs, const_reference rhs) noexcept + { + return basic_json(lhs) == rhs; + } + + /*! + @brief comparison: not equal + + Compares two JSON values for inequality by calculating `not (lhs == rhs)`. + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether the values @a lhs and @a rhs are not equal + + @complexity Linear. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__notequal} + + @since version 1.0.0 + */ + friend bool operator!=(const_reference lhs, const_reference rhs) noexcept + { + return not (lhs == rhs); + } + + /*! + @brief comparison: not equal + @copydoc operator!=(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator!=(const_reference lhs, const ScalarType rhs) noexcept + { + return lhs != basic_json(rhs); + } + + /*! + @brief comparison: not equal + @copydoc operator!=(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator!=(const ScalarType lhs, const_reference rhs) noexcept + { + return basic_json(lhs) != rhs; + } + + /*! + @brief comparison: less than + + Compares whether one JSON value @a lhs is less than another JSON value @a + rhs according to the following rules: + - If @a lhs and @a rhs have the same type, the values are compared using + the default `<` operator. + - Integer and floating-point numbers are automatically converted before + comparison + - In case @a lhs and @a rhs have different types, the values are ignored + and the order of the types is considered, see + @ref operator<(const value_t, const value_t). + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether @a lhs is less than @a rhs + + @complexity Linear. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__less} + + @since version 1.0.0 + */ + friend bool operator<(const_reference lhs, const_reference rhs) noexcept + { + const auto lhs_type = lhs.type(); + const auto rhs_type = rhs.type(); + + if (lhs_type == rhs_type) + { + switch (lhs_type) + { + case value_t::array: + // note parentheses are necessary, see + // https://github.com/nlohmann/json/issues/1530 + return (*lhs.m_value.array) < (*rhs.m_value.array); + + case value_t::object: + return *lhs.m_value.object < *rhs.m_value.object; + + case value_t::null: + return false; + + case value_t::string: + return *lhs.m_value.string < *rhs.m_value.string; + + case value_t::boolean: + return lhs.m_value.boolean < rhs.m_value.boolean; + + case value_t::number_integer: + return lhs.m_value.number_integer < rhs.m_value.number_integer; + + case value_t::number_unsigned: + return lhs.m_value.number_unsigned < rhs.m_value.number_unsigned; + + case value_t::number_float: + return lhs.m_value.number_float < rhs.m_value.number_float; + + default: + return false; + } + } + else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float) + { + return static_cast<number_float_t>(lhs.m_value.number_integer) < rhs.m_value.number_float; + } + else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer) + { + return lhs.m_value.number_float < static_cast<number_float_t>(rhs.m_value.number_integer); + } + else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_float) + { + return static_cast<number_float_t>(lhs.m_value.number_unsigned) < rhs.m_value.number_float; + } + else if (lhs_type == value_t::number_float and rhs_type == value_t::number_unsigned) + { + return lhs.m_value.number_float < static_cast<number_float_t>(rhs.m_value.number_unsigned); + } + else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_unsigned) + { + return lhs.m_value.number_integer < static_cast<number_integer_t>(rhs.m_value.number_unsigned); + } + else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_integer) + { + return static_cast<number_integer_t>(lhs.m_value.number_unsigned) < rhs.m_value.number_integer; + } + + // We only reach this line if we cannot compare values. In that case, + // we compare types. Note we have to call the operator explicitly, + // because MSVC has problems otherwise. + return operator<(lhs_type, rhs_type); + } + + /*! + @brief comparison: less than + @copydoc operator<(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator<(const_reference lhs, const ScalarType rhs) noexcept + { + return lhs < basic_json(rhs); + } + + /*! + @brief comparison: less than + @copydoc operator<(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator<(const ScalarType lhs, const_reference rhs) noexcept + { + return basic_json(lhs) < rhs; + } + + /*! + @brief comparison: less than or equal + + Compares whether one JSON value @a lhs is less than or equal to another + JSON value by calculating `not (rhs < lhs)`. + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether @a lhs is less than or equal to @a rhs + + @complexity Linear. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__greater} + + @since version 1.0.0 + */ + friend bool operator<=(const_reference lhs, const_reference rhs) noexcept + { + return not (rhs < lhs); + } + + /*! + @brief comparison: less than or equal + @copydoc operator<=(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator<=(const_reference lhs, const ScalarType rhs) noexcept + { + return lhs <= basic_json(rhs); + } + + /*! + @brief comparison: less than or equal + @copydoc operator<=(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator<=(const ScalarType lhs, const_reference rhs) noexcept + { + return basic_json(lhs) <= rhs; + } + + /*! + @brief comparison: greater than + + Compares whether one JSON value @a lhs is greater than another + JSON value by calculating `not (lhs <= rhs)`. + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether @a lhs is greater than to @a rhs + + @complexity Linear. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__lessequal} + + @since version 1.0.0 + */ + friend bool operator>(const_reference lhs, const_reference rhs) noexcept + { + return not (lhs <= rhs); + } + + /*! + @brief comparison: greater than + @copydoc operator>(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator>(const_reference lhs, const ScalarType rhs) noexcept + { + return lhs > basic_json(rhs); + } + + /*! + @brief comparison: greater than + @copydoc operator>(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator>(const ScalarType lhs, const_reference rhs) noexcept + { + return basic_json(lhs) > rhs; + } + + /*! + @brief comparison: greater than or equal + + Compares whether one JSON value @a lhs is greater than or equal to another + JSON value by calculating `not (lhs < rhs)`. + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether @a lhs is greater than or equal to @a rhs + + @complexity Linear. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__greaterequal} + + @since version 1.0.0 + */ + friend bool operator>=(const_reference lhs, const_reference rhs) noexcept + { + return not (lhs < rhs); + } + + /*! + @brief comparison: greater than or equal + @copydoc operator>=(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator>=(const_reference lhs, const ScalarType rhs) noexcept + { + return lhs >= basic_json(rhs); + } + + /*! + @brief comparison: greater than or equal + @copydoc operator>=(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator>=(const ScalarType lhs, const_reference rhs) noexcept + { + return basic_json(lhs) >= rhs; + } + + /// @} + + /////////////////// + // serialization // + /////////////////// + + /// @name serialization + /// @{ + + /*! + @brief serialize to stream + + Serialize the given JSON value @a j to the output stream @a o. The JSON + value will be serialized using the @ref dump member function. + + - The indentation of the output can be controlled with the member variable + `width` of the output stream @a o. For instance, using the manipulator + `std::setw(4)` on @a o sets the indentation level to `4` and the + serialization result is the same as calling `dump(4)`. + + - The indentation character can be controlled with the member variable + `fill` of the output stream @a o. For instance, the manipulator + `std::setfill('\\t')` sets indentation to use a tab character rather than + the default space character. + + @param[in,out] o stream to serialize to + @param[in] j JSON value to serialize + + @return the stream @a o + + @throw type_error.316 if a string stored inside the JSON value is not + UTF-8 encoded + + @complexity Linear. + + @liveexample{The example below shows the serialization with different + parameters to `width` to adjust the indentation level.,operator_serialize} + + @since version 1.0.0; indentation character added in version 3.0.0 + */ + friend std::ostream& operator<<(std::ostream& o, const basic_json& j) + { + // read width member and use it as indentation parameter if nonzero + const bool pretty_print = o.width() > 0; + const auto indentation = pretty_print ? o.width() : 0; + + // reset width to 0 for subsequent calls to this stream + o.width(0); + + // do the actual serialization + serializer s(detail::output_adapter<char>(o), o.fill()); + s.dump(j, pretty_print, false, static_cast<unsigned int>(indentation)); + return o; + } + + /*! + @brief serialize to stream + @deprecated This stream operator is deprecated and will be removed in + future 4.0.0 of the library. Please use + @ref operator<<(std::ostream&, const basic_json&) + instead; that is, replace calls like `j >> o;` with `o << j;`. + @since version 1.0.0; deprecated since version 3.0.0 + */ + JSON_DEPRECATED + friend std::ostream& operator>>(const basic_json& j, std::ostream& o) + { + return o << j; + } + + /// @} + + + ///////////////////// + // deserialization // + ///////////////////// + + /// @name deserialization + /// @{ + + /*! + @brief deserialize from a compatible input + + This function reads from a compatible input. Examples are: + - an array of 1-byte values + - strings with character/literal type with size of 1 byte + - input streams + - container with contiguous storage of 1-byte values. Compatible container + types include `std::vector`, `std::string`, `std::array`, + `std::valarray`, and `std::initializer_list`. Furthermore, C-style + arrays can be used with `std::begin()`/`std::end()`. User-defined + containers can be used as long as they implement random-access iterators + and a contiguous storage. + + @pre Each element of the container has a size of 1 byte. Violating this + precondition yields undefined behavior. **This precondition is enforced + with a static assertion.** + + @pre The container storage is contiguous. Violating this precondition + yields undefined behavior. **This precondition is enforced with an + assertion.** + + @warning There is no way to enforce all preconditions at compile-time. If + the function is called with a noncompliant container and with + assertions switched off, the behavior is undefined and will most + likely yield segmentation violation. + + @param[in] i input to read from + @param[in] cb a parser callback function of type @ref parser_callback_t + which is used to control the deserialization by filtering unwanted values + (optional) + @param[in] allow_exceptions whether to throw exceptions in case of a + parse error (optional, true by default) + + @return deserialized JSON value; in case of a parse error and + @a allow_exceptions set to `false`, the return value will be + value_t::discarded. + + @throw parse_error.101 if a parse error occurs; example: `""unexpected end + of input; expected string literal""` + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + + @complexity Linear in the length of the input. The parser is a predictive + LL(1) parser. The complexity can be higher if the parser callback function + @a cb has a super-linear complexity. + + @note A UTF-8 byte order mark is silently ignored. + + @liveexample{The example below demonstrates the `parse()` function reading + from an array.,parse__array__parser_callback_t} + + @liveexample{The example below demonstrates the `parse()` function with + and without callback function.,parse__string__parser_callback_t} + + @liveexample{The example below demonstrates the `parse()` function with + and without callback function.,parse__istream__parser_callback_t} + + @liveexample{The example below demonstrates the `parse()` function reading + from a contiguous container.,parse__contiguouscontainer__parser_callback_t} + + @since version 2.0.3 (contiguous containers) + */ + JSON_NODISCARD + static basic_json parse(detail::input_adapter&& i, + const parser_callback_t cb = nullptr, + const bool allow_exceptions = true) + { + basic_json result; + parser(i, cb, allow_exceptions).parse(true, result); + return result; + } + + static bool accept(detail::input_adapter&& i) + { + return parser(i).accept(true); + } + + /*! + @brief generate SAX events + + The SAX event lister must follow the interface of @ref json_sax. + + This function reads from a compatible input. Examples are: + - an array of 1-byte values + - strings with character/literal type with size of 1 byte + - input streams + - container with contiguous storage of 1-byte values. Compatible container + types include `std::vector`, `std::string`, `std::array`, + `std::valarray`, and `std::initializer_list`. Furthermore, C-style + arrays can be used with `std::begin()`/`std::end()`. User-defined + containers can be used as long as they implement random-access iterators + and a contiguous storage. + + @pre Each element of the container has a size of 1 byte. Violating this + precondition yields undefined behavior. **This precondition is enforced + with a static assertion.** + + @pre The container storage is contiguous. Violating this precondition + yields undefined behavior. **This precondition is enforced with an + assertion.** + + @warning There is no way to enforce all preconditions at compile-time. If + the function is called with a noncompliant container and with + assertions switched off, the behavior is undefined and will most + likely yield segmentation violation. + + @param[in] i input to read from + @param[in,out] sax SAX event listener + @param[in] format the format to parse (JSON, CBOR, MessagePack, or UBJSON) + @param[in] strict whether the input has to be consumed completely + + @return return value of the last processed SAX event + + @throw parse_error.101 if a parse error occurs; example: `""unexpected end + of input; expected string literal""` + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + + @complexity Linear in the length of the input. The parser is a predictive + LL(1) parser. The complexity can be higher if the SAX consumer @a sax has + a super-linear complexity. + + @note A UTF-8 byte order mark is silently ignored. + + @liveexample{The example below demonstrates the `sax_parse()` function + reading from string and processing the events with a user-defined SAX + event consumer.,sax_parse} + + @since version 3.2.0 + */ + template <typename SAX> + static bool sax_parse(detail::input_adapter&& i, SAX* sax, + input_format_t format = input_format_t::json, + const bool strict = true) + { + assert(sax); + return format == input_format_t::json + ? parser(std::move(i)).sax_parse(sax, strict) + : detail::binary_reader<basic_json, SAX>(std::move(i)).sax_parse(format, sax, strict); + } + + /*! + @brief deserialize from an iterator range with contiguous storage + + This function reads from an iterator range of a container with contiguous + storage of 1-byte values. Compatible container types include + `std::vector`, `std::string`, `std::array`, `std::valarray`, and + `std::initializer_list`. Furthermore, C-style arrays can be used with + `std::begin()`/`std::end()`. User-defined containers can be used as long + as they implement random-access iterators and a contiguous storage. + + @pre The iterator range is contiguous. Violating this precondition yields + undefined behavior. **This precondition is enforced with an assertion.** + @pre Each element in the range has a size of 1 byte. Violating this + precondition yields undefined behavior. **This precondition is enforced + with a static assertion.** + + @warning There is no way to enforce all preconditions at compile-time. If + the function is called with noncompliant iterators and with + assertions switched off, the behavior is undefined and will most + likely yield segmentation violation. + + @tparam IteratorType iterator of container with contiguous storage + @param[in] first begin of the range to parse (included) + @param[in] last end of the range to parse (excluded) + @param[in] cb a parser callback function of type @ref parser_callback_t + which is used to control the deserialization by filtering unwanted values + (optional) + @param[in] allow_exceptions whether to throw exceptions in case of a + parse error (optional, true by default) + + @return deserialized JSON value; in case of a parse error and + @a allow_exceptions set to `false`, the return value will be + value_t::discarded. + + @throw parse_error.101 in case of an unexpected token + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + + @complexity Linear in the length of the input. The parser is a predictive + LL(1) parser. The complexity can be higher if the parser callback function + @a cb has a super-linear complexity. + + @note A UTF-8 byte order mark is silently ignored. + + @liveexample{The example below demonstrates the `parse()` function reading + from an iterator range.,parse__iteratortype__parser_callback_t} + + @since version 2.0.3 + */ + template<class IteratorType, typename std::enable_if< + std::is_base_of< + std::random_access_iterator_tag, + typename std::iterator_traits<IteratorType>::iterator_category>::value, int>::type = 0> + static basic_json parse(IteratorType first, IteratorType last, + const parser_callback_t cb = nullptr, + const bool allow_exceptions = true) + { + basic_json result; + parser(detail::input_adapter(first, last), cb, allow_exceptions).parse(true, result); + return result; + } + + template<class IteratorType, typename std::enable_if< + std::is_base_of< + std::random_access_iterator_tag, + typename std::iterator_traits<IteratorType>::iterator_category>::value, int>::type = 0> + static bool accept(IteratorType first, IteratorType last) + { + return parser(detail::input_adapter(first, last)).accept(true); + } + + template<class IteratorType, class SAX, typename std::enable_if< + std::is_base_of< + std::random_access_iterator_tag, + typename std::iterator_traits<IteratorType>::iterator_category>::value, int>::type = 0> + static bool sax_parse(IteratorType first, IteratorType last, SAX* sax) + { + return parser(detail::input_adapter(first, last)).sax_parse(sax); + } + + /*! + @brief deserialize from stream + @deprecated This stream operator is deprecated and will be removed in + version 4.0.0 of the library. Please use + @ref operator>>(std::istream&, basic_json&) + instead; that is, replace calls like `j << i;` with `i >> j;`. + @since version 1.0.0; deprecated since version 3.0.0 + */ + JSON_DEPRECATED + friend std::istream& operator<<(basic_json& j, std::istream& i) + { + return operator>>(i, j); + } + + /*! + @brief deserialize from stream + + Deserializes an input stream to a JSON value. + + @param[in,out] i input stream to read a serialized JSON value from + @param[in,out] j JSON value to write the deserialized input to + + @throw parse_error.101 in case of an unexpected token + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + + @complexity Linear in the length of the input. The parser is a predictive + LL(1) parser. + + @note A UTF-8 byte order mark is silently ignored. + + @liveexample{The example below shows how a JSON value is constructed by + reading a serialization from a stream.,operator_deserialize} + + @sa parse(std::istream&, const parser_callback_t) for a variant with a + parser callback function to filter values while parsing + + @since version 1.0.0 + */ + friend std::istream& operator>>(std::istream& i, basic_json& j) + { + parser(detail::input_adapter(i)).parse(false, j); + return i; + } + + /// @} + + /////////////////////////// + // convenience functions // + /////////////////////////// + + /*! + @brief return the type as string + + Returns the type name as string to be used in error messages - usually to + indicate that a function was called on a wrong JSON type. + + @return a string representation of a the @a m_type member: + Value type | return value + ----------- | ------------- + null | `"null"` + boolean | `"boolean"` + string | `"string"` + number | `"number"` (for all number types) + object | `"object"` + array | `"array"` + discarded | `"discarded"` + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @complexity Constant. + + @liveexample{The following code exemplifies `type_name()` for all JSON + types.,type_name} + + @sa @ref type() -- return the type of the JSON value + @sa @ref operator value_t() -- return the type of the JSON value (implicit) + + @since version 1.0.0, public since 2.1.0, `const char*` and `noexcept` + since 3.0.0 + */ + const char* type_name() const noexcept + { + { + switch (m_type) + { + case value_t::null: + return "null"; + case value_t::object: + return "object"; + case value_t::array: + return "array"; + case value_t::string: + return "string"; + case value_t::boolean: + return "boolean"; + case value_t::discarded: + return "discarded"; + default: + return "number"; + } + } + } + + + private: + ////////////////////// + // member variables // + ////////////////////// + + /// the type of the current element + value_t m_type = value_t::null; + + /// the value of the current element + json_value m_value = {}; + + ////////////////////////////////////////// + // binary serialization/deserialization // + ////////////////////////////////////////// + + /// @name binary serialization/deserialization support + /// @{ + + public: + /*! + @brief create a CBOR serialization of a given JSON value + + Serializes a given JSON value @a j to a byte vector using the CBOR (Concise + Binary Object Representation) serialization format. CBOR is a binary + serialization format which aims to be more compact than JSON itself, yet + more efficient to parse. + + The library uses the following mapping from JSON values types to + CBOR types according to the CBOR specification (RFC 7049): + + JSON value type | value/range | CBOR type | first byte + --------------- | ------------------------------------------ | ---------------------------------- | --------------- + null | `null` | Null | 0xF6 + boolean | `true` | True | 0xF5 + boolean | `false` | False | 0xF4 + number_integer | -9223372036854775808..-2147483649 | Negative integer (8 bytes follow) | 0x3B + number_integer | -2147483648..-32769 | Negative integer (4 bytes follow) | 0x3A + number_integer | -32768..-129 | Negative integer (2 bytes follow) | 0x39 + number_integer | -128..-25 | Negative integer (1 byte follow) | 0x38 + number_integer | -24..-1 | Negative integer | 0x20..0x37 + number_integer | 0..23 | Integer | 0x00..0x17 + number_integer | 24..255 | Unsigned integer (1 byte follow) | 0x18 + number_integer | 256..65535 | Unsigned integer (2 bytes follow) | 0x19 + number_integer | 65536..4294967295 | Unsigned integer (4 bytes follow) | 0x1A + number_integer | 4294967296..18446744073709551615 | Unsigned integer (8 bytes follow) | 0x1B + number_unsigned | 0..23 | Integer | 0x00..0x17 + number_unsigned | 24..255 | Unsigned integer (1 byte follow) | 0x18 + number_unsigned | 256..65535 | Unsigned integer (2 bytes follow) | 0x19 + number_unsigned | 65536..4294967295 | Unsigned integer (4 bytes follow) | 0x1A + number_unsigned | 4294967296..18446744073709551615 | Unsigned integer (8 bytes follow) | 0x1B + number_float | *any value* | Double-Precision Float | 0xFB + string | *length*: 0..23 | UTF-8 string | 0x60..0x77 + string | *length*: 23..255 | UTF-8 string (1 byte follow) | 0x78 + string | *length*: 256..65535 | UTF-8 string (2 bytes follow) | 0x79 + string | *length*: 65536..4294967295 | UTF-8 string (4 bytes follow) | 0x7A + string | *length*: 4294967296..18446744073709551615 | UTF-8 string (8 bytes follow) | 0x7B + array | *size*: 0..23 | array | 0x80..0x97 + array | *size*: 23..255 | array (1 byte follow) | 0x98 + array | *size*: 256..65535 | array (2 bytes follow) | 0x99 + array | *size*: 65536..4294967295 | array (4 bytes follow) | 0x9A + array | *size*: 4294967296..18446744073709551615 | array (8 bytes follow) | 0x9B + object | *size*: 0..23 | map | 0xA0..0xB7 + object | *size*: 23..255 | map (1 byte follow) | 0xB8 + object | *size*: 256..65535 | map (2 bytes follow) | 0xB9 + object | *size*: 65536..4294967295 | map (4 bytes follow) | 0xBA + object | *size*: 4294967296..18446744073709551615 | map (8 bytes follow) | 0xBB + + @note The mapping is **complete** in the sense that any JSON value type + can be converted to a CBOR value. + + @note If NaN or Infinity are stored inside a JSON number, they are + serialized properly. This behavior differs from the @ref dump() + function which serializes NaN or Infinity to `null`. + + @note The following CBOR types are not used in the conversion: + - byte strings (0x40..0x5F) + - UTF-8 strings terminated by "break" (0x7F) + - arrays terminated by "break" (0x9F) + - maps terminated by "break" (0xBF) + - date/time (0xC0..0xC1) + - bignum (0xC2..0xC3) + - decimal fraction (0xC4) + - bigfloat (0xC5) + - tagged items (0xC6..0xD4, 0xD8..0xDB) + - expected conversions (0xD5..0xD7) + - simple values (0xE0..0xF3, 0xF8) + - undefined (0xF7) + - half and single-precision floats (0xF9-0xFA) + - break (0xFF) + + @param[in] j JSON value to serialize + @return MessagePack serialization as byte vector + + @complexity Linear in the size of the JSON value @a j. + + @liveexample{The example shows the serialization of a JSON value to a byte + vector in CBOR format.,to_cbor} + + @sa http://cbor.io + @sa @ref from_cbor(detail::input_adapter&&, const bool, const bool) for the + analogous deserialization + @sa @ref to_msgpack(const basic_json&) for the related MessagePack format + @sa @ref to_ubjson(const basic_json&, const bool, const bool) for the + related UBJSON format + + @since version 2.0.9 + */ + static std::vector<uint8_t> to_cbor(const basic_json& j) + { + std::vector<uint8_t> result; + to_cbor(j, result); + return result; + } + + static void to_cbor(const basic_json& j, detail::output_adapter<uint8_t> o) + { + binary_writer<uint8_t>(o).write_cbor(j); + } + + static void to_cbor(const basic_json& j, detail::output_adapter<char> o) + { + binary_writer<char>(o).write_cbor(j); + } + + /*! + @brief create a MessagePack serialization of a given JSON value + + Serializes a given JSON value @a j to a byte vector using the MessagePack + serialization format. MessagePack is a binary serialization format which + aims to be more compact than JSON itself, yet more efficient to parse. + + The library uses the following mapping from JSON values types to + MessagePack types according to the MessagePack specification: + + JSON value type | value/range | MessagePack type | first byte + --------------- | --------------------------------- | ---------------- | ---------- + null | `null` | nil | 0xC0 + boolean | `true` | true | 0xC3 + boolean | `false` | false | 0xC2 + number_integer | -9223372036854775808..-2147483649 | int64 | 0xD3 + number_integer | -2147483648..-32769 | int32 | 0xD2 + number_integer | -32768..-129 | int16 | 0xD1 + number_integer | -128..-33 | int8 | 0xD0 + number_integer | -32..-1 | negative fixint | 0xE0..0xFF + number_integer | 0..127 | positive fixint | 0x00..0x7F + number_integer | 128..255 | uint 8 | 0xCC + number_integer | 256..65535 | uint 16 | 0xCD + number_integer | 65536..4294967295 | uint 32 | 0xCE + number_integer | 4294967296..18446744073709551615 | uint 64 | 0xCF + number_unsigned | 0..127 | positive fixint | 0x00..0x7F + number_unsigned | 128..255 | uint 8 | 0xCC + number_unsigned | 256..65535 | uint 16 | 0xCD + number_unsigned | 65536..4294967295 | uint 32 | 0xCE + number_unsigned | 4294967296..18446744073709551615 | uint 64 | 0xCF + number_float | *any value* | float 64 | 0xCB + string | *length*: 0..31 | fixstr | 0xA0..0xBF + string | *length*: 32..255 | str 8 | 0xD9 + string | *length*: 256..65535 | str 16 | 0xDA + string | *length*: 65536..4294967295 | str 32 | 0xDB + array | *size*: 0..15 | fixarray | 0x90..0x9F + array | *size*: 16..65535 | array 16 | 0xDC + array | *size*: 65536..4294967295 | array 32 | 0xDD + object | *size*: 0..15 | fix map | 0x80..0x8F + object | *size*: 16..65535 | map 16 | 0xDE + object | *size*: 65536..4294967295 | map 32 | 0xDF + + @note The mapping is **complete** in the sense that any JSON value type + can be converted to a MessagePack value. + + @note The following values can **not** be converted to a MessagePack value: + - strings with more than 4294967295 bytes + - arrays with more than 4294967295 elements + - objects with more than 4294967295 elements + + @note The following MessagePack types are not used in the conversion: + - bin 8 - bin 32 (0xC4..0xC6) + - ext 8 - ext 32 (0xC7..0xC9) + - float 32 (0xCA) + - fixext 1 - fixext 16 (0xD4..0xD8) + + @note Any MessagePack output created @ref to_msgpack can be successfully + parsed by @ref from_msgpack. + + @note If NaN or Infinity are stored inside a JSON number, they are + serialized properly. This behavior differs from the @ref dump() + function which serializes NaN or Infinity to `null`. + + @param[in] j JSON value to serialize + @return MessagePack serialization as byte vector + + @complexity Linear in the size of the JSON value @a j. + + @liveexample{The example shows the serialization of a JSON value to a byte + vector in MessagePack format.,to_msgpack} + + @sa http://msgpack.org + @sa @ref from_msgpack for the analogous deserialization + @sa @ref to_cbor(const basic_json& for the related CBOR format + @sa @ref to_ubjson(const basic_json&, const bool, const bool) for the + related UBJSON format + + @since version 2.0.9 + */ + static std::vector<uint8_t> to_msgpack(const basic_json& j) + { + std::vector<uint8_t> result; + to_msgpack(j, result); + return result; + } + + static void to_msgpack(const basic_json& j, detail::output_adapter<uint8_t> o) + { + binary_writer<uint8_t>(o).write_msgpack(j); + } + + static void to_msgpack(const basic_json& j, detail::output_adapter<char> o) + { + binary_writer<char>(o).write_msgpack(j); + } + + /*! + @brief create a UBJSON serialization of a given JSON value + + Serializes a given JSON value @a j to a byte vector using the UBJSON + (Universal Binary JSON) serialization format. UBJSON aims to be more compact + than JSON itself, yet more efficient to parse. + + The library uses the following mapping from JSON values types to + UBJSON types according to the UBJSON specification: + + JSON value type | value/range | UBJSON type | marker + --------------- | --------------------------------- | ----------- | ------ + null | `null` | null | `Z` + boolean | `true` | true | `T` + boolean | `false` | false | `F` + number_integer | -9223372036854775808..-2147483649 | int64 | `L` + number_integer | -2147483648..-32769 | int32 | `l` + number_integer | -32768..-129 | int16 | `I` + number_integer | -128..127 | int8 | `i` + number_integer | 128..255 | uint8 | `U` + number_integer | 256..32767 | int16 | `I` + number_integer | 32768..2147483647 | int32 | `l` + number_integer | 2147483648..9223372036854775807 | int64 | `L` + number_unsigned | 0..127 | int8 | `i` + number_unsigned | 128..255 | uint8 | `U` + number_unsigned | 256..32767 | int16 | `I` + number_unsigned | 32768..2147483647 | int32 | `l` + number_unsigned | 2147483648..9223372036854775807 | int64 | `L` + number_float | *any value* | float64 | `D` + string | *with shortest length indicator* | string | `S` + array | *see notes on optimized format* | array | `[` + object | *see notes on optimized format* | map | `{` + + @note The mapping is **complete** in the sense that any JSON value type + can be converted to a UBJSON value. + + @note The following values can **not** be converted to a UBJSON value: + - strings with more than 9223372036854775807 bytes (theoretical) + - unsigned integer numbers above 9223372036854775807 + + @note The following markers are not used in the conversion: + - `Z`: no-op values are not created. + - `C`: single-byte strings are serialized with `S` markers. + + @note Any UBJSON output created @ref to_ubjson can be successfully parsed + by @ref from_ubjson. + + @note If NaN or Infinity are stored inside a JSON number, they are + serialized properly. This behavior differs from the @ref dump() + function which serializes NaN or Infinity to `null`. + + @note The optimized formats for containers are supported: Parameter + @a use_size adds size information to the beginning of a container and + removes the closing marker. Parameter @a use_type further checks + whether all elements of a container have the same type and adds the + type marker to the beginning of the container. The @a use_type + parameter must only be used together with @a use_size = true. Note + that @a use_size = true alone may result in larger representations - + the benefit of this parameter is that the receiving side is + immediately informed on the number of elements of the container. + + @param[in] j JSON value to serialize + @param[in] use_size whether to add size annotations to container types + @param[in] use_type whether to add type annotations to container types + (must be combined with @a use_size = true) + @return UBJSON serialization as byte vector + + @complexity Linear in the size of the JSON value @a j. + + @liveexample{The example shows the serialization of a JSON value to a byte + vector in UBJSON format.,to_ubjson} + + @sa http://ubjson.org + @sa @ref from_ubjson(detail::input_adapter&&, const bool, const bool) for the + analogous deserialization + @sa @ref to_cbor(const basic_json& for the related CBOR format + @sa @ref to_msgpack(const basic_json&) for the related MessagePack format + + @since version 3.1.0 + */ + static std::vector<uint8_t> to_ubjson(const basic_json& j, + const bool use_size = false, + const bool use_type = false) + { + std::vector<uint8_t> result; + to_ubjson(j, result, use_size, use_type); + return result; + } + + static void to_ubjson(const basic_json& j, detail::output_adapter<uint8_t> o, + const bool use_size = false, const bool use_type = false) + { + binary_writer<uint8_t>(o).write_ubjson(j, use_size, use_type); + } + + static void to_ubjson(const basic_json& j, detail::output_adapter<char> o, + const bool use_size = false, const bool use_type = false) + { + binary_writer<char>(o).write_ubjson(j, use_size, use_type); + } + + + /*! + @brief Serializes the given JSON object `j` to BSON and returns a vector + containing the corresponding BSON-representation. + + BSON (Binary JSON) is a binary format in which zero or more ordered key/value pairs are + stored as a single entity (a so-called document). + + The library uses the following mapping from JSON values types to BSON types: + + JSON value type | value/range | BSON type | marker + --------------- | --------------------------------- | ----------- | ------ + null | `null` | null | 0x0A + boolean | `true`, `false` | boolean | 0x08 + number_integer | -9223372036854775808..-2147483649 | int64 | 0x12 + number_integer | -2147483648..2147483647 | int32 | 0x10 + number_integer | 2147483648..9223372036854775807 | int64 | 0x12 + number_unsigned | 0..2147483647 | int32 | 0x10 + number_unsigned | 2147483648..9223372036854775807 | int64 | 0x12 + number_unsigned | 9223372036854775808..18446744073709551615| -- | -- + number_float | *any value* | double | 0x01 + string | *any value* | string | 0x02 + array | *any value* | document | 0x04 + object | *any value* | document | 0x03 + + @warning The mapping is **incomplete**, since only JSON-objects (and things + contained therein) can be serialized to BSON. + Also, integers larger than 9223372036854775807 cannot be serialized to BSON, + and the keys may not contain U+0000, since they are serialized a + zero-terminated c-strings. + + @throw out_of_range.407 if `j.is_number_unsigned() && j.get<std::uint64_t>() > 9223372036854775807` + @throw out_of_range.409 if a key in `j` contains a NULL (U+0000) + @throw type_error.317 if `!j.is_object()` + + @pre The input `j` is required to be an object: `j.is_object() == true`. + + @note Any BSON output created via @ref to_bson can be successfully parsed + by @ref from_bson. + + @param[in] j JSON value to serialize + @return BSON serialization as byte vector + + @complexity Linear in the size of the JSON value @a j. + + @liveexample{The example shows the serialization of a JSON value to a byte + vector in BSON format.,to_bson} + + @sa http://bsonspec.org/spec.html + @sa @ref from_bson(detail::input_adapter&&, const bool strict) for the + analogous deserialization + @sa @ref to_ubjson(const basic_json&, const bool, const bool) for the + related UBJSON format + @sa @ref to_cbor(const basic_json&) for the related CBOR format + @sa @ref to_msgpack(const basic_json&) for the related MessagePack format + */ + static std::vector<uint8_t> to_bson(const basic_json& j) + { + std::vector<uint8_t> result; + to_bson(j, result); + return result; + } + + /*! + @brief Serializes the given JSON object `j` to BSON and forwards the + corresponding BSON-representation to the given output_adapter `o`. + @param j The JSON object to convert to BSON. + @param o The output adapter that receives the binary BSON representation. + @pre The input `j` shall be an object: `j.is_object() == true` + @sa @ref to_bson(const basic_json&) + */ + static void to_bson(const basic_json& j, detail::output_adapter<uint8_t> o) + { + binary_writer<uint8_t>(o).write_bson(j); + } + + /*! + @copydoc to_bson(const basic_json&, detail::output_adapter<uint8_t>) + */ + static void to_bson(const basic_json& j, detail::output_adapter<char> o) + { + binary_writer<char>(o).write_bson(j); + } + + + /*! + @brief create a JSON value from an input in CBOR format + + Deserializes a given input @a i to a JSON value using the CBOR (Concise + Binary Object Representation) serialization format. + + The library maps CBOR types to JSON value types as follows: + + CBOR type | JSON value type | first byte + ---------------------- | --------------- | ---------- + Integer | number_unsigned | 0x00..0x17 + Unsigned integer | number_unsigned | 0x18 + Unsigned integer | number_unsigned | 0x19 + Unsigned integer | number_unsigned | 0x1A + Unsigned integer | number_unsigned | 0x1B + Negative integer | number_integer | 0x20..0x37 + Negative integer | number_integer | 0x38 + Negative integer | number_integer | 0x39 + Negative integer | number_integer | 0x3A + Negative integer | number_integer | 0x3B + Negative integer | number_integer | 0x40..0x57 + UTF-8 string | string | 0x60..0x77 + UTF-8 string | string | 0x78 + UTF-8 string | string | 0x79 + UTF-8 string | string | 0x7A + UTF-8 string | string | 0x7B + UTF-8 string | string | 0x7F + array | array | 0x80..0x97 + array | array | 0x98 + array | array | 0x99 + array | array | 0x9A + array | array | 0x9B + array | array | 0x9F + map | object | 0xA0..0xB7 + map | object | 0xB8 + map | object | 0xB9 + map | object | 0xBA + map | object | 0xBB + map | object | 0xBF + False | `false` | 0xF4 + True | `true` | 0xF5 + Null | `null` | 0xF6 + Half-Precision Float | number_float | 0xF9 + Single-Precision Float | number_float | 0xFA + Double-Precision Float | number_float | 0xFB + + @warning The mapping is **incomplete** in the sense that not all CBOR + types can be converted to a JSON value. The following CBOR types + are not supported and will yield parse errors (parse_error.112): + - byte strings (0x40..0x5F) + - date/time (0xC0..0xC1) + - bignum (0xC2..0xC3) + - decimal fraction (0xC4) + - bigfloat (0xC5) + - tagged items (0xC6..0xD4, 0xD8..0xDB) + - expected conversions (0xD5..0xD7) + - simple values (0xE0..0xF3, 0xF8) + - undefined (0xF7) + + @warning CBOR allows map keys of any type, whereas JSON only allows + strings as keys in object values. Therefore, CBOR maps with keys + other than UTF-8 strings are rejected (parse_error.113). + + @note Any CBOR output created @ref to_cbor can be successfully parsed by + @ref from_cbor. + + @param[in] i an input in CBOR format convertible to an input adapter + @param[in] strict whether to expect the input to be consumed until EOF + (true by default) + @param[in] allow_exceptions whether to throw exceptions in case of a + parse error (optional, true by default) + + @return deserialized JSON value; in case of a parse error and + @a allow_exceptions set to `false`, the return value will be + value_t::discarded. + + @throw parse_error.110 if the given input ends prematurely or the end of + file was not reached when @a strict was set to true + @throw parse_error.112 if unsupported features from CBOR were + used in the given input @a v or if the input is not valid CBOR + @throw parse_error.113 if a string was expected as map key, but not found + + @complexity Linear in the size of the input @a i. + + @liveexample{The example shows the deserialization of a byte vector in CBOR + format to a JSON value.,from_cbor} + + @sa http://cbor.io + @sa @ref to_cbor(const basic_json&) for the analogous serialization + @sa @ref from_msgpack(detail::input_adapter&&, const bool, const bool) for the + related MessagePack format + @sa @ref from_ubjson(detail::input_adapter&&, const bool, const bool) for the + related UBJSON format + + @since version 2.0.9; parameter @a start_index since 2.1.1; changed to + consume input adapters, removed start_index parameter, and added + @a strict parameter since 3.0.0; added @a allow_exceptions parameter + since 3.2.0 + */ + JSON_NODISCARD + static basic_json from_cbor(detail::input_adapter&& i, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + const bool res = binary_reader(detail::input_adapter(i)).sax_parse(input_format_t::cbor, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + /*! + @copydoc from_cbor(detail::input_adapter&&, const bool, const bool) + */ + template<typename A1, typename A2, + detail::enable_if_t<std::is_constructible<detail::input_adapter, A1, A2>::value, int> = 0> + JSON_NODISCARD + static basic_json from_cbor(A1 && a1, A2 && a2, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + const bool res = binary_reader(detail::input_adapter(std::forward<A1>(a1), std::forward<A2>(a2))).sax_parse(input_format_t::cbor, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + /*! + @brief create a JSON value from an input in MessagePack format + + Deserializes a given input @a i to a JSON value using the MessagePack + serialization format. + + The library maps MessagePack types to JSON value types as follows: + + MessagePack type | JSON value type | first byte + ---------------- | --------------- | ---------- + positive fixint | number_unsigned | 0x00..0x7F + fixmap | object | 0x80..0x8F + fixarray | array | 0x90..0x9F + fixstr | string | 0xA0..0xBF + nil | `null` | 0xC0 + false | `false` | 0xC2 + true | `true` | 0xC3 + float 32 | number_float | 0xCA + float 64 | number_float | 0xCB + uint 8 | number_unsigned | 0xCC + uint 16 | number_unsigned | 0xCD + uint 32 | number_unsigned | 0xCE + uint 64 | number_unsigned | 0xCF + int 8 | number_integer | 0xD0 + int 16 | number_integer | 0xD1 + int 32 | number_integer | 0xD2 + int 64 | number_integer | 0xD3 + str 8 | string | 0xD9 + str 16 | string | 0xDA + str 32 | string | 0xDB + array 16 | array | 0xDC + array 32 | array | 0xDD + map 16 | object | 0xDE + map 32 | object | 0xDF + negative fixint | number_integer | 0xE0-0xFF + + @warning The mapping is **incomplete** in the sense that not all + MessagePack types can be converted to a JSON value. The following + MessagePack types are not supported and will yield parse errors: + - bin 8 - bin 32 (0xC4..0xC6) + - ext 8 - ext 32 (0xC7..0xC9) + - fixext 1 - fixext 16 (0xD4..0xD8) + + @note Any MessagePack output created @ref to_msgpack can be successfully + parsed by @ref from_msgpack. + + @param[in] i an input in MessagePack format convertible to an input + adapter + @param[in] strict whether to expect the input to be consumed until EOF + (true by default) + @param[in] allow_exceptions whether to throw exceptions in case of a + parse error (optional, true by default) + + @return deserialized JSON value; in case of a parse error and + @a allow_exceptions set to `false`, the return value will be + value_t::discarded. + + @throw parse_error.110 if the given input ends prematurely or the end of + file was not reached when @a strict was set to true + @throw parse_error.112 if unsupported features from MessagePack were + used in the given input @a i or if the input is not valid MessagePack + @throw parse_error.113 if a string was expected as map key, but not found + + @complexity Linear in the size of the input @a i. + + @liveexample{The example shows the deserialization of a byte vector in + MessagePack format to a JSON value.,from_msgpack} + + @sa http://msgpack.org + @sa @ref to_msgpack(const basic_json&) for the analogous serialization + @sa @ref from_cbor(detail::input_adapter&&, const bool, const bool) for the + related CBOR format + @sa @ref from_ubjson(detail::input_adapter&&, const bool, const bool) for + the related UBJSON format + @sa @ref from_bson(detail::input_adapter&&, const bool, const bool) for + the related BSON format + + @since version 2.0.9; parameter @a start_index since 2.1.1; changed to + consume input adapters, removed start_index parameter, and added + @a strict parameter since 3.0.0; added @a allow_exceptions parameter + since 3.2.0 + */ + JSON_NODISCARD + static basic_json from_msgpack(detail::input_adapter&& i, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + const bool res = binary_reader(detail::input_adapter(i)).sax_parse(input_format_t::msgpack, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + /*! + @copydoc from_msgpack(detail::input_adapter&&, const bool, const bool) + */ + template<typename A1, typename A2, + detail::enable_if_t<std::is_constructible<detail::input_adapter, A1, A2>::value, int> = 0> + JSON_NODISCARD + static basic_json from_msgpack(A1 && a1, A2 && a2, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + const bool res = binary_reader(detail::input_adapter(std::forward<A1>(a1), std::forward<A2>(a2))).sax_parse(input_format_t::msgpack, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + /*! + @brief create a JSON value from an input in UBJSON format + + Deserializes a given input @a i to a JSON value using the UBJSON (Universal + Binary JSON) serialization format. + + The library maps UBJSON types to JSON value types as follows: + + UBJSON type | JSON value type | marker + ----------- | --------------------------------------- | ------ + no-op | *no value, next value is read* | `N` + null | `null` | `Z` + false | `false` | `F` + true | `true` | `T` + float32 | number_float | `d` + float64 | number_float | `D` + uint8 | number_unsigned | `U` + int8 | number_integer | `i` + int16 | number_integer | `I` + int32 | number_integer | `l` + int64 | number_integer | `L` + string | string | `S` + char | string | `C` + array | array (optimized values are supported) | `[` + object | object (optimized values are supported) | `{` + + @note The mapping is **complete** in the sense that any UBJSON value can + be converted to a JSON value. + + @param[in] i an input in UBJSON format convertible to an input adapter + @param[in] strict whether to expect the input to be consumed until EOF + (true by default) + @param[in] allow_exceptions whether to throw exceptions in case of a + parse error (optional, true by default) + + @return deserialized JSON value; in case of a parse error and + @a allow_exceptions set to `false`, the return value will be + value_t::discarded. + + @throw parse_error.110 if the given input ends prematurely or the end of + file was not reached when @a strict was set to true + @throw parse_error.112 if a parse error occurs + @throw parse_error.113 if a string could not be parsed successfully + + @complexity Linear in the size of the input @a i. + + @liveexample{The example shows the deserialization of a byte vector in + UBJSON format to a JSON value.,from_ubjson} + + @sa http://ubjson.org + @sa @ref to_ubjson(const basic_json&, const bool, const bool) for the + analogous serialization + @sa @ref from_cbor(detail::input_adapter&&, const bool, const bool) for the + related CBOR format + @sa @ref from_msgpack(detail::input_adapter&&, const bool, const bool) for + the related MessagePack format + @sa @ref from_bson(detail::input_adapter&&, const bool, const bool) for + the related BSON format + + @since version 3.1.0; added @a allow_exceptions parameter since 3.2.0 + */ + JSON_NODISCARD + static basic_json from_ubjson(detail::input_adapter&& i, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + const bool res = binary_reader(detail::input_adapter(i)).sax_parse(input_format_t::ubjson, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + /*! + @copydoc from_ubjson(detail::input_adapter&&, const bool, const bool) + */ + template<typename A1, typename A2, + detail::enable_if_t<std::is_constructible<detail::input_adapter, A1, A2>::value, int> = 0> + JSON_NODISCARD + static basic_json from_ubjson(A1 && a1, A2 && a2, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + const bool res = binary_reader(detail::input_adapter(std::forward<A1>(a1), std::forward<A2>(a2))).sax_parse(input_format_t::ubjson, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + /*! + @brief Create a JSON value from an input in BSON format + + Deserializes a given input @a i to a JSON value using the BSON (Binary JSON) + serialization format. + + The library maps BSON record types to JSON value types as follows: + + BSON type | BSON marker byte | JSON value type + --------------- | ---------------- | --------------------------- + double | 0x01 | number_float + string | 0x02 | string + document | 0x03 | object + array | 0x04 | array + binary | 0x05 | still unsupported + undefined | 0x06 | still unsupported + ObjectId | 0x07 | still unsupported + boolean | 0x08 | boolean + UTC Date-Time | 0x09 | still unsupported + null | 0x0A | null + Regular Expr. | 0x0B | still unsupported + DB Pointer | 0x0C | still unsupported + JavaScript Code | 0x0D | still unsupported + Symbol | 0x0E | still unsupported + JavaScript Code | 0x0F | still unsupported + int32 | 0x10 | number_integer + Timestamp | 0x11 | still unsupported + 128-bit decimal float | 0x13 | still unsupported + Max Key | 0x7F | still unsupported + Min Key | 0xFF | still unsupported + + @warning The mapping is **incomplete**. The unsupported mappings + are indicated in the table above. + + @param[in] i an input in BSON format convertible to an input adapter + @param[in] strict whether to expect the input to be consumed until EOF + (true by default) + @param[in] allow_exceptions whether to throw exceptions in case of a + parse error (optional, true by default) + + @return deserialized JSON value; in case of a parse error and + @a allow_exceptions set to `false`, the return value will be + value_t::discarded. + + @throw parse_error.114 if an unsupported BSON record type is encountered + + @complexity Linear in the size of the input @a i. + + @liveexample{The example shows the deserialization of a byte vector in + BSON format to a JSON value.,from_bson} + + @sa http://bsonspec.org/spec.html + @sa @ref to_bson(const basic_json&) for the analogous serialization + @sa @ref from_cbor(detail::input_adapter&&, const bool, const bool) for the + related CBOR format + @sa @ref from_msgpack(detail::input_adapter&&, const bool, const bool) for + the related MessagePack format + @sa @ref from_ubjson(detail::input_adapter&&, const bool, const bool) for the + related UBJSON format + */ + JSON_NODISCARD + static basic_json from_bson(detail::input_adapter&& i, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + const bool res = binary_reader(detail::input_adapter(i)).sax_parse(input_format_t::bson, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + /*! + @copydoc from_bson(detail::input_adapter&&, const bool, const bool) + */ + template<typename A1, typename A2, + detail::enable_if_t<std::is_constructible<detail::input_adapter, A1, A2>::value, int> = 0> + JSON_NODISCARD + static basic_json from_bson(A1 && a1, A2 && a2, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + const bool res = binary_reader(detail::input_adapter(std::forward<A1>(a1), std::forward<A2>(a2))).sax_parse(input_format_t::bson, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + + + /// @} + + ////////////////////////// + // JSON Pointer support // + ////////////////////////// + + /// @name JSON Pointer functions + /// @{ + + /*! + @brief access specified element via JSON Pointer + + Uses a JSON pointer to retrieve a reference to the respective JSON value. + No bound checking is performed. Similar to @ref operator[](const typename + object_t::key_type&), `null` values are created in arrays and objects if + necessary. + + In particular: + - If the JSON pointer points to an object key that does not exist, it + is created an filled with a `null` value before a reference to it + is returned. + - If the JSON pointer points to an array index that does not exist, it + is created an filled with a `null` value before a reference to it + is returned. All indices between the current maximum and the given + index are also filled with `null`. + - The special value `-` is treated as a synonym for the index past the + end. + + @param[in] ptr a JSON pointer + + @return reference to the element pointed to by @a ptr + + @complexity Constant. + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.404 if the JSON pointer can not be resolved + + @liveexample{The behavior is shown in the example.,operatorjson_pointer} + + @since version 2.0.0 + */ + reference operator[](const json_pointer& ptr) + { + return ptr.get_unchecked(this); + } + + /*! + @brief access specified element via JSON Pointer + + Uses a JSON pointer to retrieve a reference to the respective JSON value. + No bound checking is performed. The function does not change the JSON + value; no `null` values are created. In particular, the the special value + `-` yields an exception. + + @param[in] ptr JSON pointer to the desired element + + @return const reference to the element pointed to by @a ptr + + @complexity Constant. + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + + @liveexample{The behavior is shown in the example.,operatorjson_pointer_const} + + @since version 2.0.0 + */ + const_reference operator[](const json_pointer& ptr) const + { + return ptr.get_unchecked(this); + } + + /*! + @brief access specified element via JSON Pointer + + Returns a reference to the element at with specified JSON pointer @a ptr, + with bounds checking. + + @param[in] ptr JSON pointer to the desired element + + @return reference to the element pointed to by @a ptr + + @throw parse_error.106 if an array index in the passed JSON pointer @a ptr + begins with '0'. See example below. + + @throw parse_error.109 if an array index in the passed JSON pointer @a ptr + is not a number. See example below. + + @throw out_of_range.401 if an array index in the passed JSON pointer @a ptr + is out of range. See example below. + + @throw out_of_range.402 if the array index '-' is used in the passed JSON + pointer @a ptr. As `at` provides checked access (and no elements are + implicitly inserted), the index '-' is always invalid. See example below. + + @throw out_of_range.403 if the JSON pointer describes a key of an object + which cannot be found. See example below. + + @throw out_of_range.404 if the JSON pointer @a ptr can not be resolved. + See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Constant. + + @since version 2.0.0 + + @liveexample{The behavior is shown in the example.,at_json_pointer} + */ + reference at(const json_pointer& ptr) + { + return ptr.get_checked(this); + } + + /*! + @brief access specified element via JSON Pointer + + Returns a const reference to the element at with specified JSON pointer @a + ptr, with bounds checking. + + @param[in] ptr JSON pointer to the desired element + + @return reference to the element pointed to by @a ptr + + @throw parse_error.106 if an array index in the passed JSON pointer @a ptr + begins with '0'. See example below. + + @throw parse_error.109 if an array index in the passed JSON pointer @a ptr + is not a number. See example below. + + @throw out_of_range.401 if an array index in the passed JSON pointer @a ptr + is out of range. See example below. + + @throw out_of_range.402 if the array index '-' is used in the passed JSON + pointer @a ptr. As `at` provides checked access (and no elements are + implicitly inserted), the index '-' is always invalid. See example below. + + @throw out_of_range.403 if the JSON pointer describes a key of an object + which cannot be found. See example below. + + @throw out_of_range.404 if the JSON pointer @a ptr can not be resolved. + See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Constant. + + @since version 2.0.0 + + @liveexample{The behavior is shown in the example.,at_json_pointer_const} + */ + const_reference at(const json_pointer& ptr) const + { + return ptr.get_checked(this); + } + + /*! + @brief return flattened JSON value + + The function creates a JSON object whose keys are JSON pointers (see [RFC + 6901](https://tools.ietf.org/html/rfc6901)) and whose values are all + primitive. The original JSON value can be restored using the @ref + unflatten() function. + + @return an object that maps JSON pointers to primitive values + + @note Empty objects and arrays are flattened to `null` and will not be + reconstructed correctly by the @ref unflatten() function. + + @complexity Linear in the size the JSON value. + + @liveexample{The following code shows how a JSON object is flattened to an + object whose keys consist of JSON pointers.,flatten} + + @sa @ref unflatten() for the reverse function + + @since version 2.0.0 + */ + basic_json flatten() const + { + basic_json result(value_t::object); + json_pointer::flatten("", *this, result); + return result; + } + + /*! + @brief unflatten a previously flattened JSON value + + The function restores the arbitrary nesting of a JSON value that has been + flattened before using the @ref flatten() function. The JSON value must + meet certain constraints: + 1. The value must be an object. + 2. The keys must be JSON pointers (see + [RFC 6901](https://tools.ietf.org/html/rfc6901)) + 3. The mapped values must be primitive JSON types. + + @return the original JSON from a flattened version + + @note Empty objects and arrays are flattened by @ref flatten() to `null` + values and can not unflattened to their original type. Apart from + this example, for a JSON value `j`, the following is always true: + `j == j.flatten().unflatten()`. + + @complexity Linear in the size the JSON value. + + @throw type_error.314 if value is not an object + @throw type_error.315 if object values are not primitive + + @liveexample{The following code shows how a flattened JSON object is + unflattened into the original nested JSON object.,unflatten} + + @sa @ref flatten() for the reverse function + + @since version 2.0.0 + */ + basic_json unflatten() const + { + return json_pointer::unflatten(*this); + } + + /// @} + + ////////////////////////// + // JSON Patch functions // + ////////////////////////// + + /// @name JSON Patch functions + /// @{ + + /*! + @brief applies a JSON patch + + [JSON Patch](http://jsonpatch.com) defines a JSON document structure for + expressing a sequence of operations to apply to a JSON) document. With + this function, a JSON Patch is applied to the current JSON value by + executing all operations from the patch. + + @param[in] json_patch JSON patch document + @return patched document + + @note The application of a patch is atomic: Either all operations succeed + and the patched document is returned or an exception is thrown. In + any case, the original value is not changed: the patch is applied + to a copy of the value. + + @throw parse_error.104 if the JSON patch does not consist of an array of + objects + + @throw parse_error.105 if the JSON patch is malformed (e.g., mandatory + attributes are missing); example: `"operation add must have member path"` + + @throw out_of_range.401 if an array index is out of range. + + @throw out_of_range.403 if a JSON pointer inside the patch could not be + resolved successfully in the current JSON value; example: `"key baz not + found"` + + @throw out_of_range.405 if JSON pointer has no parent ("add", "remove", + "move") + + @throw other_error.501 if "test" operation was unsuccessful + + @complexity Linear in the size of the JSON value and the length of the + JSON patch. As usually only a fraction of the JSON value is affected by + the patch, the complexity can usually be neglected. + + @liveexample{The following code shows how a JSON patch is applied to a + value.,patch} + + @sa @ref diff -- create a JSON patch by comparing two JSON values + + @sa [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902) + @sa [RFC 6901 (JSON Pointer)](https://tools.ietf.org/html/rfc6901) + + @since version 2.0.0 + */ + basic_json patch(const basic_json& json_patch) const + { + // make a working copy to apply the patch to + basic_json result = *this; + + // the valid JSON Patch operations + enum class patch_operations {add, remove, replace, move, copy, test, invalid}; + + const auto get_op = [](const std::string & op) + { + if (op == "add") + { + return patch_operations::add; + } + if (op == "remove") + { + return patch_operations::remove; + } + if (op == "replace") + { + return patch_operations::replace; + } + if (op == "move") + { + return patch_operations::move; + } + if (op == "copy") + { + return patch_operations::copy; + } + if (op == "test") + { + return patch_operations::test; + } + + return patch_operations::invalid; + }; + + // wrapper for "add" operation; add value at ptr + const auto operation_add = [&result](json_pointer & ptr, basic_json val) + { + // adding to the root of the target document means replacing it + if (ptr.empty()) + { + result = val; + return; + } + + // make sure the top element of the pointer exists + json_pointer top_pointer = ptr.top(); + if (top_pointer != ptr) + { + result.at(top_pointer); + } + + // get reference to parent of JSON pointer ptr + const auto last_path = ptr.back(); + ptr.pop_back(); + basic_json& parent = result[ptr]; + + switch (parent.m_type) + { + case value_t::null: + case value_t::object: + { + // use operator[] to add value + parent[last_path] = val; + break; + } + + case value_t::array: + { + if (last_path == "-") + { + // special case: append to back + parent.push_back(val); + } + else + { + const auto idx = json_pointer::array_index(last_path); + if (JSON_UNLIKELY(static_cast<size_type>(idx) > parent.size())) + { + // avoid undefined behavior + JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); + } + + // default case: insert add offset + parent.insert(parent.begin() + static_cast<difference_type>(idx), val); + } + break; + } + + // if there exists a parent it cannot be primitive + default: // LCOV_EXCL_LINE + assert(false); // LCOV_EXCL_LINE + } + }; + + // wrapper for "remove" operation; remove value at ptr + const auto operation_remove = [&result](json_pointer & ptr) + { + // get reference to parent of JSON pointer ptr + const auto last_path = ptr.back(); + ptr.pop_back(); + basic_json& parent = result.at(ptr); + + // remove child + if (parent.is_object()) + { + // perform range check + auto it = parent.find(last_path); + if (JSON_LIKELY(it != parent.end())) + { + parent.erase(it); + } + else + { + JSON_THROW(out_of_range::create(403, "key '" + last_path + "' not found")); + } + } + else if (parent.is_array()) + { + // note erase performs range check + parent.erase(static_cast<size_type>(json_pointer::array_index(last_path))); + } + }; + + // type check: top level value must be an array + if (JSON_UNLIKELY(not json_patch.is_array())) + { + JSON_THROW(parse_error::create(104, 0, "JSON patch must be an array of objects")); + } + + // iterate and apply the operations + for (const auto& val : json_patch) + { + // wrapper to get a value for an operation + const auto get_value = [&val](const std::string & op, + const std::string & member, + bool string_type) -> basic_json & + { + // find value + auto it = val.m_value.object->find(member); + + // context-sensitive error message + const auto error_msg = (op == "op") ? "operation" : "operation '" + op + "'"; + + // check if desired value is present + if (JSON_UNLIKELY(it == val.m_value.object->end())) + { + JSON_THROW(parse_error::create(105, 0, error_msg + " must have member '" + member + "'")); + } + + // check if result is of type string + if (JSON_UNLIKELY(string_type and not it->second.is_string())) + { + JSON_THROW(parse_error::create(105, 0, error_msg + " must have string member '" + member + "'")); + } + + // no error: return value + return it->second; + }; + + // type check: every element of the array must be an object + if (JSON_UNLIKELY(not val.is_object())) + { + JSON_THROW(parse_error::create(104, 0, "JSON patch must be an array of objects")); + } + + // collect mandatory members + const std::string op = get_value("op", "op", true); + const std::string path = get_value(op, "path", true); + json_pointer ptr(path); + + switch (get_op(op)) + { + case patch_operations::add: + { + operation_add(ptr, get_value("add", "value", false)); + break; + } + + case patch_operations::remove: + { + operation_remove(ptr); + break; + } + + case patch_operations::replace: + { + // the "path" location must exist - use at() + result.at(ptr) = get_value("replace", "value", false); + break; + } + + case patch_operations::move: + { + const std::string from_path = get_value("move", "from", true); + json_pointer from_ptr(from_path); + + // the "from" location must exist - use at() + basic_json v = result.at(from_ptr); + + // The move operation is functionally identical to a + // "remove" operation on the "from" location, followed + // immediately by an "add" operation at the target + // location with the value that was just removed. + operation_remove(from_ptr); + operation_add(ptr, v); + break; + } + + case patch_operations::copy: + { + const std::string from_path = get_value("copy", "from", true); + const json_pointer from_ptr(from_path); + + // the "from" location must exist - use at() + basic_json v = result.at(from_ptr); + + // The copy is functionally identical to an "add" + // operation at the target location using the value + // specified in the "from" member. + operation_add(ptr, v); + break; + } + + case patch_operations::test: + { + bool success = false; + JSON_TRY + { + // check if "value" matches the one at "path" + // the "path" location must exist - use at() + success = (result.at(ptr) == get_value("test", "value", false)); + } + JSON_INTERNAL_CATCH (out_of_range&) + { + // ignore out of range errors: success remains false + } + + // throw an exception if test fails + if (JSON_UNLIKELY(not success)) + { + JSON_THROW(other_error::create(501, "unsuccessful: " + val.dump())); + } + + break; + } + + default: + { + // op must be "add", "remove", "replace", "move", "copy", or + // "test" + JSON_THROW(parse_error::create(105, 0, "operation value '" + op + "' is invalid")); + } + } + } + + return result; + } + + /*! + @brief creates a diff as a JSON patch + + Creates a [JSON Patch](http://jsonpatch.com) so that value @a source can + be changed into the value @a target by calling @ref patch function. + + @invariant For two JSON values @a source and @a target, the following code + yields always `true`: + @code {.cpp} + source.patch(diff(source, target)) == target; + @endcode + + @note Currently, only `remove`, `add`, and `replace` operations are + generated. + + @param[in] source JSON value to compare from + @param[in] target JSON value to compare against + @param[in] path helper value to create JSON pointers + + @return a JSON patch to convert the @a source to @a target + + @complexity Linear in the lengths of @a source and @a target. + + @liveexample{The following code shows how a JSON patch is created as a + diff for two JSON values.,diff} + + @sa @ref patch -- apply a JSON patch + @sa @ref merge_patch -- apply a JSON Merge Patch + + @sa [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902) + + @since version 2.0.0 + */ + JSON_NODISCARD + static basic_json diff(const basic_json& source, const basic_json& target, + const std::string& path = "") + { + // the patch + basic_json result(value_t::array); + + // if the values are the same, return empty patch + if (source == target) + { + return result; + } + + if (source.type() != target.type()) + { + // different types: replace value + result.push_back( + { + {"op", "replace"}, {"path", path}, {"value", target} + }); + return result; + } + + switch (source.type()) + { + case value_t::array: + { + // first pass: traverse common elements + std::size_t i = 0; + while (i < source.size() and i < target.size()) + { + // recursive call to compare array values at index i + auto temp_diff = diff(source[i], target[i], path + "/" + std::to_string(i)); + result.insert(result.end(), temp_diff.begin(), temp_diff.end()); + ++i; + } + + // i now reached the end of at least one array + // in a second pass, traverse the remaining elements + + // remove my remaining elements + const auto end_index = static_cast<difference_type>(result.size()); + while (i < source.size()) + { + // add operations in reverse order to avoid invalid + // indices + result.insert(result.begin() + end_index, object( + { + {"op", "remove"}, + {"path", path + "/" + std::to_string(i)} + })); + ++i; + } + + // add other remaining elements + while (i < target.size()) + { + result.push_back( + { + {"op", "add"}, + {"path", path + "/" + std::to_string(i)}, + {"value", target[i]} + }); + ++i; + } + + break; + } + + case value_t::object: + { + // first pass: traverse this object's elements + for (auto it = source.cbegin(); it != source.cend(); ++it) + { + // escape the key name to be used in a JSON patch + const auto key = json_pointer::escape(it.key()); + + if (target.find(it.key()) != target.end()) + { + // recursive call to compare object values at key it + auto temp_diff = diff(it.value(), target[it.key()], path + "/" + key); + result.insert(result.end(), temp_diff.begin(), temp_diff.end()); + } + else + { + // found a key that is not in o -> remove it + result.push_back(object( + { + {"op", "remove"}, {"path", path + "/" + key} + })); + } + } + + // second pass: traverse other object's elements + for (auto it = target.cbegin(); it != target.cend(); ++it) + { + if (source.find(it.key()) == source.end()) + { + // found a key that is not in this -> add it + const auto key = json_pointer::escape(it.key()); + result.push_back( + { + {"op", "add"}, {"path", path + "/" + key}, + {"value", it.value()} + }); + } + } + + break; + } + + default: + { + // both primitive type: replace value + result.push_back( + { + {"op", "replace"}, {"path", path}, {"value", target} + }); + break; + } + } + + return result; + } + + /// @} + + //////////////////////////////// + // JSON Merge Patch functions // + //////////////////////////////// + + /// @name JSON Merge Patch functions + /// @{ + + /*! + @brief applies a JSON Merge Patch + + The merge patch format is primarily intended for use with the HTTP PATCH + method as a means of describing a set of modifications to a target + resource's content. This function applies a merge patch to the current + JSON value. + + The function implements the following algorithm from Section 2 of + [RFC 7396 (JSON Merge Patch)](https://tools.ietf.org/html/rfc7396): + + ``` + define MergePatch(Target, Patch): + if Patch is an Object: + if Target is not an Object: + Target = {} // Ignore the contents and set it to an empty Object + for each Name/Value pair in Patch: + if Value is null: + if Name exists in Target: + remove the Name/Value pair from Target + else: + Target[Name] = MergePatch(Target[Name], Value) + return Target + else: + return Patch + ``` + + Thereby, `Target` is the current object; that is, the patch is applied to + the current value. + + @param[in] apply_patch the patch to apply + + @complexity Linear in the lengths of @a patch. + + @liveexample{The following code shows how a JSON Merge Patch is applied to + a JSON document.,merge_patch} + + @sa @ref patch -- apply a JSON patch + @sa [RFC 7396 (JSON Merge Patch)](https://tools.ietf.org/html/rfc7396) + + @since version 3.0.0 + */ + void merge_patch(const basic_json& apply_patch) + { + if (apply_patch.is_object()) + { + if (not is_object()) + { + *this = object(); + } + for (auto it = apply_patch.begin(); it != apply_patch.end(); ++it) + { + if (it.value().is_null()) + { + erase(it.key()); + } + else + { + operator[](it.key()).merge_patch(it.value()); + } + } + } + else + { + *this = apply_patch; + } + } + + /// @} +}; +} // namespace nlohmann + +/////////////////////// +// nonmember support // +/////////////////////// + +// specialization of std::swap, and std::hash +namespace std +{ + +/// hash value for JSON objects +template<> +struct hash<nlohmann::json> +{ + /*! + @brief return a hash value for a JSON object + + @since version 1.0.0 + */ + std::size_t operator()(const nlohmann::json& j) const + { + // a naive hashing via the string representation + const auto& h = hash<nlohmann::json::string_t>(); + return h(j.dump()); + } +}; + +/// specialization for std::less<value_t> +/// @note: do not remove the space after '<', +/// see https://github.com/nlohmann/json/pull/679 +template<> +struct less< ::nlohmann::detail::value_t> +{ + /*! + @brief compare two value_t enum values + @since version 3.0.0 + */ + bool operator()(nlohmann::detail::value_t lhs, + nlohmann::detail::value_t rhs) const noexcept + { + return nlohmann::detail::operator<(lhs, rhs); + } +}; + +/*! +@brief exchanges the values of two JSON objects + +@since version 1.0.0 +*/ +template<> +inline void swap<nlohmann::json>(nlohmann::json& j1, nlohmann::json& j2) noexcept( + is_nothrow_move_constructible<nlohmann::json>::value and + is_nothrow_move_assignable<nlohmann::json>::value +) +{ + j1.swap(j2); +} + +} // namespace std + +/*! +@brief user-defined string literal for JSON values + +This operator implements a user-defined string literal for JSON objects. It +can be used by adding `"_json"` to a string literal and returns a JSON object +if no parse error occurred. + +@param[in] s a string representation of a JSON object +@param[in] n the length of string @a s +@return a JSON object + +@since version 1.0.0 +*/ +inline nlohmann::json operator "" _json(const char* s, std::size_t n) +{ + return nlohmann::json::parse(s, s + n); +} + +/*! +@brief user-defined string literal for JSON pointer + +This operator implements a user-defined string literal for JSON Pointers. It +can be used by adding `"_json_pointer"` to a string literal and returns a JSON pointer +object if no parse error occurred. + +@param[in] s a string representation of a JSON Pointer +@param[in] n the length of string @a s +@return a JSON pointer object + +@since version 2.0.0 +*/ +inline nlohmann::json::json_pointer operator "" _json_pointer(const char* s, std::size_t n) +{ + return nlohmann::json::json_pointer(std::string(s, n)); +} + +// #include <nlohmann/detail/macro_unscope.hpp> + + +// restore GCC/clang diagnostic settings +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #pragma GCC diagnostic pop +#endif +#if defined(__clang__) + #pragma GCC diagnostic pop +#endif + +// clean up +#undef JSON_INTERNAL_CATCH +#undef JSON_CATCH +#undef JSON_THROW +#undef JSON_TRY +#undef JSON_LIKELY +#undef JSON_UNLIKELY +#undef JSON_DEPRECATED +#undef JSON_NODISCARD +#undef JSON_HAS_CPP_14 +#undef JSON_HAS_CPP_17 +#undef NLOHMANN_BASIC_JSON_TPL_DECLARATION +#undef NLOHMANN_BASIC_JSON_TPL + + +#endif // INCLUDE_NLOHMANN_JSON_HPP_ diff --git a/tools/mapjson/Makefile b/tools/mapjson/Makefile index d09acad50..9a49be506 100644 --- a/tools/mapjson/Makefile +++ b/tools/mapjson/Makefile @@ -6,7 +6,10 @@ SRCS := json11.cpp mapjson.cpp HEADERS := mapjson.h -.PHONY: clean +.PHONY: all clean + +all: mapjson + @: mapjson: $(SRCS) $(HEADERS) $(CXX) $(CXXFLAGS) $(SRCS) -o $@ $(LDFLAGS) diff --git a/tools/preproc/Makefile b/tools/preproc/Makefile index 3d3275819..63dedda1f 100644 --- a/tools/preproc/Makefile +++ b/tools/preproc/Makefile @@ -8,7 +8,10 @@ SRCS := asm_file.cpp c_file.cpp charmap.cpp preproc.cpp string_parser.cpp \ HEADERS := asm_file.h c_file.h char_util.h charmap.h preproc.h string_parser.h \ utf8.h -.PHONY: clean +.PHONY: all clean + +all: preproc + @: preproc: $(SRCS) $(HEADERS) $(CXX) $(CXXFLAGS) $(SRCS) -o $@ $(LDFLAGS) diff --git a/tools/ramscrgen/Makefile b/tools/ramscrgen/Makefile index 9aa309aa1..858db1a77 100644 --- a/tools/ramscrgen/Makefile +++ b/tools/ramscrgen/Makefile @@ -6,7 +6,10 @@ SRCS := main.cpp sym_file.cpp elf.cpp HEADERS := ramscrgen.h sym_file.h elf.h char_util.h -.PHONY: clean +.PHONY: all clean + +all: ramscrgen + @: ramscrgen: $(SRCS) $(HEADERS) $(CXX) $(CXXFLAGS) $(SRCS) -o $@ $(LDFLAGS) diff --git a/tools/rsfont/Makefile b/tools/rsfont/Makefile index 582be7b88..abe1cab51 100644 --- a/tools/rsfont/Makefile +++ b/tools/rsfont/Makefile @@ -6,7 +6,10 @@ LIBS = -lpng -lz SRCS = main.c convert_png.c util.c font.c -.PHONY: clean +.PHONY: all clean + +all: rsfont + @: rsfont: $(SRCS) convert_png.h gfx.h global.h util.h font.h $(CC) $(CFLAGS) $(SRCS) -o $@ $(LDFLAGS) $(LIBS) diff --git a/tools/scaninc/Makefile b/tools/scaninc/Makefile index 53c9d0060..1516f159c 100644 --- a/tools/scaninc/Makefile +++ b/tools/scaninc/Makefile @@ -6,7 +6,10 @@ SRCS = scaninc.cpp c_file.cpp asm_file.cpp source_file.cpp HEADERS := scaninc.h asm_file.h c_file.h source_file.h -.PHONY: clean +.PHONY: all clean + +all: scaninc + @: scaninc: $(SRCS) $(HEADERS) $(CXX) $(CXXFLAGS) $(SRCS) -o $@ $(LDFLAGS) |