1 Commits

25 changed files with 156 additions and 600 deletions

View File

@ -1,14 +0,0 @@
# Bug Report
## What issue have you found?
<!--- Please provide a detailed explanation of the bug here. -->
## What did you expect to happen instead of this bug?
<!--- What did you expect to happen instead? Please explain in detail. -->
<!--- Please check the following boxes. -->
- [ ] I am using the **latest version** of TumbledEmerald.
- [ ] I am using mGBA, the official CIA package, or a Game Boy Advance flashcart.

View File

@ -1,4 +0,0 @@
<!---
Please make sure to look at the issue templates and use the one that best describes your problem. If your issue
doesn't fit into one of these categories, please type your issue below. If we need more information, we'll ask!
-->

View File

@ -1,18 +0,0 @@
# Feature Request
## Requested feature: <!--- type what you want added here. -->
## Why do you want this feature?
<!--- Please check the following boxes. -->
- [ ] I have submitted a merge request to implement this feature. <!--- not required, but if this is the case, please indicate so! -->
- If you have submitted a merge request, please reference it here: <!--- use the !NUMBER format. -->
- [ ] This feature has not been requested in another issue before.
- [ ] I would like to be listed in the credits.

View File

@ -1,16 +0,0 @@
## Save Porting Request
Version of my save: <!--- replace this text with the game version that your save was created in. -->
Version I want to have my save ported to: <!--- replace this text with the game version you want to use your save in. -->
- [ ] I have attached my save file in `.sav` format to this request.
- [ ] I would like to authorize my save file to be used for testing and debugging purposes. (OPTIONAL)
<!---
Please note:
I might not get to your save right away. If it takes longer than a month to make you a new save, I'll update
it to work with the latest version of the game for you.
This process is NOT a conversion. This is me (an idiot!) rummaging through your save and trying to replicate it on the version you chose. I might miss something. If you notice something I missed, let me know.
-->

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "agbcc"]
path = agbcc
url = https://github.com/pret/agbcc

View File

@ -3,6 +3,6 @@
# and commit this file to your remote git repository to share the goodness with others.
tasks:
- init: make clean && sudo apt install binutils-arm-none-eabi -y && git submodule update --remote && cd agbcc && ./build.sh && ./install.sh ../
- init: echo "See INSTALL.md for compilation instructions."

View File

@ -1,9 +1,6 @@
# Cool people:
# Compilation Hall of Fame
These people have built or compiled TumbledEmerald releases in a pinch, lending their time to the project in a super helpful way!
## SanicConnoissuer_91: Built the 22.08a .CIA. Thanks a bunch, dude!
## creepyguy: Compiled 1.0.0, since I couldn't. He's awesome, go check him out on [Scratch](https://scratch.mit.edu/users/creepyguy256/)
# creepyguy: Compiled 1.0.0, since I couldn't. He's awesome, go check him out on [Scratch](https://scratch.mit.edu/users/creepyguy256/)
- @ghoulslash: A lot of the features here are directly from [ghoulslash/pokeemerald](https://github.com/ghoulslash/pokeemerald.git) and its many amazing feature branches.
- Tutorial authors: ~~Some~~ Most features were adapted from code in the [tutorials](https://github.com/pret/pokeemerald/wiki/Tutorials/) in [pret](https://github.com/pret/)'s wiki.
@ -17,7 +14,6 @@ These people have built or compiled TumbledEmerald releases in a pinch, lending
- @sh4/@Daisenryaku: you know why. (yes, I'm still using that "clicky clicky `****` frontend" ;)
- @issotm: for running my awful sprite editing attempts through GIMP.
- @cosarara: for showing me how to use `CTRL`+`Shift`+`F` in VSCodium.
- @pokechu22: for dealing with my GNU hatred. (no luck with clang and CMake yet, but I'm working on it!)
# Cool people who put up with me on Discord/GitHub:
- @Rangi42: sorry for sliding into ur dm's.

View File

@ -13,9 +13,4 @@ titles and update them while still remaining faithful to the original games.
* The keyboard prompt automatically switches to lowercase after the first character.
* Dynamic trade names have been implemented: rather than pulling trade Pokemon info from a list, it pulls from the Pokemon's data instead.
* The "move grammar" table leftover from the Japanese versions has been completely nuked, making the game faster.
* Pokémon Center receptionists now heal your Pokémon without prompt, and you turn around once the process is over to avoid accidentally healing again
* Default options have been changed to make the game quicker.
* The Aurora Ticket, Mystic Ticket, and Old Sea Map have been reimplemented:
* For the tickets, beat Wallace and talk to the girl who originally blocks Route 101 back in Littleroot Town.
* For the map, beat Wallace and talk to the fisherman who gives you the Old Rod, telling him that fishing is "not so good."
* The Fairy type from Generation VI+ has been added.
*

351
Makefile
View File

@ -1,34 +1,13 @@
TOOLCHAIN := $(DEVKITARM)
COMPARE ?= 0
ifeq (compare,$(MAKECMDGOALS))
COMPARE := 1
endif
# don't use dkP's base_tools anymore
# because the redefinition of $(CC) conflicts
# with when we want to use $(CC) to preprocess files
# thus, manually create the variables for the bin
# files, or use arm-none-eabi binaries on the system
# if dkP is not installed on this system
ifneq (,$(TOOLCHAIN))
ifneq ($(wildcard $(TOOLCHAIN)/bin),)
export PATH := $(TOOLCHAIN)/bin:$(PATH)
endif
endif
PREFIX := arm-none-eabi-
PREFIX :=
OBJCOPY := $(PREFIX)objcopy
OBJDUMP := $(PREFIX)objdump
CC := $(PREFIX)gcc
AS := $(PREFIX)as
LD := $(PREFIX)ld
SDL_DIR := /k/gba/pokeemerald-pc/SDL-1.2.15
ASM_PSEUDO_OP_CONV := sed -e 's/\.4byte/\.int/g;s/\.2byte/\.short/g'
# note: the makefile must be set up so MODERNCC is never called
# if MODERN=0
MODERNCC := $(PREFIX)gcc
PATH_MODERNCC := PATH=$(TOOLCHAIN)/bin:PATH $(MODERNCC)
export CPP := $(PREFIX)cpp
export LD := $(PREFIX)ld
ifeq ($(OS),Windows_NT)
EXE := .exe
@ -36,91 +15,41 @@ else
EXE :=
endif
TITLE := POKEMON EMER
GAME_CODE := BPEE
MAKER_CODE := 01
REVISION := 0
MODERN ?= 0
ifeq (modern,$(MAKECMDGOALS))
MODERN := 1
endif
# use arm-none-eabi-cpp for macOS
# as macOS's default compiler is clang
# and clang's preprocessor will warn on \u
# when preprocessing asm files, expecting a unicode literal
# we can't unconditionally use arm-none-eabi-cpp
# as installations which install binutils-arm-none-eabi
# don't come with it
ifneq ($(MODERN),1)
ifeq ($(shell uname -s),Darwin)
CPP := $(PREFIX)cpp
else
CPP := $(CC) -E
endif
else
CPP := $(PREFIX)cpp
endif
ROM_NAME := tumbledemerald.gba
ELF_NAME := $(ROM_NAME:.gba=.elf)
MAP_NAME := $(ROM_NAME:.gba=.map)
OBJ_DIR_NAME := build/tumbled
MODERN_ROM_NAME := tumbledemerald_modern.gba
MODERN_ELF_NAME := $(MODERN_ROM_NAME:.gba=.elf)
MODERN_MAP_NAME := $(MODERN_ROM_NAME:.gba=.map)
MODERN_OBJ_DIR_NAME := build/modern
MODERN := 1
SHELL := /bin/bash -o pipefail
ELF = $(ROM:.gba=.elf)
MAP = $(ROM:.gba=.map)
SYM = $(ROM:.gba=.sym)
C_SUBDIR = src
GFLIB_SUBDIR = gflib
ASM_SUBDIR = asm
DATA_SRC_SUBDIR = src/data
DATA_ASM_SUBDIR = data
SONG_SUBDIR = sound/songs
MID_SUBDIR = sound/songs/midi
SAMPLE_SUBDIR = sound/direct_sound_samples
CRY_SUBDIR = sound/direct_sound_samples/cries
C_BUILDDIR = $(OBJ_DIR)/$(C_SUBDIR)
GFLIB_BUILDDIR = $(OBJ_DIR)/$(GFLIB_SUBDIR)
ASM_BUILDDIR = $(OBJ_DIR)/$(ASM_SUBDIR)
DATA_ASM_BUILDDIR = $(OBJ_DIR)/$(DATA_ASM_SUBDIR)
SONG_BUILDDIR = $(OBJ_DIR)/$(SONG_SUBDIR)
MID_BUILDDIR = $(OBJ_DIR)/$(MID_SUBDIR)
ASFLAGS := -mcpu=arm7tdmi --defsym MODERN=$(MODERN)
ASFLAGS := --32 --defsym MODERN=$(MODERN) --defsym PORTABLE=1
ifeq ($(MODERN),0)
CC1 := tools/agbcc/bin/agbcc$(EXE)
override CFLAGS += -mthumb-interwork -Wimplicit -Wparentheses -Werror -O2 -fhex-asm -g
ROM := $(ROM_NAME)
OBJ_DIR := $(OBJ_DIR_NAME)
LIBPATH := -L ../../tools/agbcc/lib
LIB := $(LIBPATH) -lgcc -lc -L../../libagbsyscall -lagbsyscall
else
CC1 = $(shell $(PATH_MODERNCC) --print-prog-name=cc1) -quiet
override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast -g
ROM := $(MODERN_ROM_NAME)
OBJ_DIR := $(MODERN_OBJ_DIR_NAME)
LIBPATH := -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libgcc.a))" -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libnosys.a))" -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libc.a))"
LIB := $(LIBPATH) -lc -lnosys -lgcc -L../../libagbsyscall -lagbsyscall
endif
GCC_VER := $(shell $(CC) -dumpversion)
CPPFLAGS := -iquote include -iquote $(GFLIB_SUBDIR) -Wno-trigraphs -DMODERN=$(MODERN)
ifneq ($(MODERN),1)
CPPFLAGS += -I tools/agbcc/include -I tools/agbcc -nostdinc -undef
endif
CC1 := $(shell $(PREFIX)gcc --print-prog-name=cc1) -quiet
override CFLAGS += -Wno-trigraphs -Wimplicit -Wparentheses -Wunused -O0 -g -m32 -std=gnu99 -fno-leading-underscore -fno-dce -Wno-unused-function -DPORTABLE -DNONMATCHING
ROM := pokeemerald_modern.gba
OBJ_DIR := build/pc
CPPFLAGS := -iquote include -Wno-trigraphs -D NONMATCHING -D PORTABLE -I$(SDL_DIR)/include -L$(SDL_DIR)/lib
LDFLAGS = -Map ../../$(MAP)
LIB := $(LIBPATH) -lgcc -lc
SHA1 := $(shell { command -v sha1sum || command -v shasum; } 2>/dev/null) -c
GFX := tools/gbagfx/gbagfx$(EXE)
AIF := tools/aif2pcm/aif2pcm$(EXE)
@ -132,14 +61,6 @@ FIX := tools/gbafix/gbafix$(EXE)
MAPJSON := tools/mapjson/mapjson$(EXE)
JSONPROC := tools/jsonproc/jsonproc$(EXE)
PERL := perl
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:
# Don't delete intermediate files
@ -150,50 +71,14 @@ MAKEFLAGS += --no-print-directory
# Secondary expansion is required for dependency variables in object rules.
.SECONDEXPANSION:
.PHONY: all rom clean compare tidy tools mostlyclean clean-tools $(TOOLDIRS) berry_fix libagbsyscall modern tidymodern tidynonmodern
.PHONY: rom clean compare tidy tools mostlyclean clean-tools
infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line))))
# Build tools when building the rom
# Disable dependency scanning for clean/tidy/tools
# Use a separate minimal makefile for speed
# Since we don't need to reload most of this makefile
ifeq (,$(filter-out all rom compare modern berry_fix libagbsyscall syms,$(MAKECMDGOALS)))
$(call infoshell, $(MAKE) -f make_tools.mk)
else
NODEP ?= 1
endif
# check if we need to scan dependencies based on the rule
ifeq (,$(MAKECMDGOALS))
SCAN_DEPS ?= 1
else
# clean, tidy, tools, mostlyclean, clean-tools, $(TOOLDIRS), tidymodern, tidynonmodern don't even build the ROM
# berry_fix and libagbsyscall do their own thing
ifeq (,$(filter-out clean tidy tools mostlyclean clean-tools $(TOOLDIRS) tidymodern tidynonmodern berry_fix libagbsyscall,$(MAKECMDGOALS)))
SCAN_DEPS ?= 0
else
SCAN_DEPS ?= 1
endif
endif
ifeq ($(SCAN_DEPS),1)
C_SRCS_IN := $(wildcard $(C_SUBDIR)/*.c $(C_SUBDIR)/*/*.c $(C_SUBDIR)/*/*/*.c)
C_SRCS := $(foreach src,$(C_SRCS_IN),$(if $(findstring .inc.c,$(src)),,$(src)))
C_SRCS := $(wildcard $(C_SUBDIR)/*.c $(C_SUBDIR)/*/*.c $(C_SUBDIR)/*/*/*.c)
C_OBJS := $(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(C_SRCS))
GFLIB_SRCS := $(wildcard $(GFLIB_SUBDIR)/*.c)
GFLIB_OBJS := $(patsubst $(GFLIB_SUBDIR)/%.c,$(GFLIB_BUILDDIR)/%.o,$(GFLIB_SRCS))
C_ASM_SRCS += $(wildcard $(C_SUBDIR)/*.s $(C_SUBDIR)/*/*.s $(C_SUBDIR)/*/*/*.s)
C_ASM_OBJS := $(patsubst $(C_SUBDIR)/%.s,$(C_BUILDDIR)/%.o,$(C_ASM_SRCS))
ASM_SRCS := $(wildcard $(ASM_SUBDIR)/*.s)
#ASM_SRCS := $(wildcard $(ASM_SUBDIR)/*.s)
ASM_OBJS := $(patsubst $(ASM_SUBDIR)/%.s,$(ASM_BUILDDIR)/%.o,$(ASM_SRCS))
# get all the data/*.s files EXCEPT the ones with specific rules
REGULAR_DATA_ASM_SRCS := $(filter-out $(DATA_ASM_SUBDIR)/maps.s $(DATA_ASM_SUBDIR)/map_events.s, $(wildcard $(DATA_ASM_SUBDIR)/*.s))
DATA_ASM_SRCS := $(wildcard $(DATA_ASM_SUBDIR)/*.s)
DATA_ASM_OBJS := $(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o,$(DATA_ASM_SRCS))
@ -203,61 +88,51 @@ SONG_OBJS := $(patsubst $(SONG_SUBDIR)/%.s,$(SONG_BUILDDIR)/%.o,$(SONG_SRCS))
MID_SRCS := $(wildcard $(MID_SUBDIR)/*.mid)
MID_OBJS := $(patsubst $(MID_SUBDIR)/%.mid,$(MID_BUILDDIR)/%.o,$(MID_SRCS))
OBJS := $(C_OBJS) $(GFLIB_OBJS) $(C_ASM_OBJS) $(ASM_OBJS) $(DATA_ASM_OBJS) $(SONG_OBJS) $(MID_OBJS)
OBJS := $(C_OBJS) $(ASM_OBJS) $(DATA_ASM_OBJS) $(SONG_OBJS) $(MID_OBJS)
OBJS_REL := $(patsubst $(OBJ_DIR)/%,%,$(OBJS))
SUBDIRS := $(sort $(dir $(OBJS)))
$(shell mkdir -p $(SUBDIRS))
endif
AUTO_GEN_TARGETS :=
all: rom
TOOLDIRS := $(filter-out tools/agbcc tools/binutils,$(wildcard tools/*))
TOOLBASE = $(TOOLDIRS:tools/%=%)
TOOLS = $(foreach tool,$(TOOLBASE),tools/%(tool)/$(tool)$(EXE))
tools: $(TOOLDIRS)
$(shell mkdir -p $(SUBDIRS))
syms: $(SYM)
all: tools rom
$(TOOLDIRS):
@$(MAKE) -C $@
tools: $(TOOLS)
$(TOOLS):
@$(foreach tooldir,$(TOOLDIRS),$(MAKE) -C $(tooldir);)
rom: $(ROM)
ifeq ($(COMPARE),1)
@$(SHA1) rom.sha1
endif
# For contributors to make sure a change didn't affect the contents of the ROM.
compare: all
@$(SHA1) rom.sha1
clean: mostlyclean clean-tools
clean-tools:
@$(foreach tooldir,$(TOOLDIRS),$(MAKE) clean -C $(tooldir);)
mostlyclean: tidynonmodern tidymodern
rm -f $(SAMPLE_SUBDIR)/*.bin
rm -f $(CRY_SUBDIR)/*.bin
mostlyclean: tidy
rm -f sound/direct_sound_samples/*.bin
rm -f $(MID_SUBDIR)/*.s
find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.rl' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -exec rm {} +
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)
@$(MAKE) clean -C berry_fix
@$(MAKE) clean -C libagbsyscall
tidy: tidynonmodern tidymodern
tidynonmodern:
rm -f $(ROM_NAME) $(ELF_NAME) $(MAP_NAME)
rm -rf $(OBJ_DIR_NAME)
tidymodern:
rm -f $(MODERN_ROM_NAME) $(MODERN_ELF_NAME) $(MODERN_MAP_NAME)
rm -rf $(MODERN_OBJ_DIR_NAME)
ifneq ($(MODERN),0)
$(C_BUILDDIR)/berry_crush.o: override CFLAGS += -Wno-address-of-packed-member
tidy:
rm -f $(ROM) $(ELF) $(MAP)
rm -r $(OBJ_DIR)
ifeq ($(MODERN),0)
@$(MAKE) tidy MODERN=1
endif
include graphics_file_rules.mk
@ -278,129 +153,44 @@ include songs.mk
%.gbapal: %.png ; $(GFX) $< $@
%.lz: % ; $(GFX) $< $@
%.rl: % ; $(GFX) $< $@
$(CRY_SUBDIR)/%.bin: $(CRY_SUBDIR)/%.aif ; $(AIF) $< $@ --compress
sound/direct_sound_samples/cry_%.bin: sound/direct_sound_samples/cry_%.aif ; $(AIF) $< $@ --compress
sound/%.bin: sound/%.aif ; $(AIF) $< $@
ifeq ($(MODERN),0)
$(C_BUILDDIR)/libc.o: CC1 := tools/agbcc/bin/old_agbcc$(EXE)
$(C_BUILDDIR)/libc.o: CFLAGS := -O2
%src/platform/sdl2.o: CFLAGS += -fleading-underscore -O3
$(C_BUILDDIR)/siirtc.o: CFLAGS := -mthumb-interwork
$(C_BUILDDIR)/agb_flash.o: CFLAGS := -O -mthumb-interwork
$(C_BUILDDIR)/agb_flash_1m.o: CFLAGS := -O -mthumb-interwork
$(C_BUILDDIR)/agb_flash_mx.o: CFLAGS := -O -mthumb-interwork
$(C_BUILDDIR)/m4a.o: CC1 := tools/agbcc/bin/old_agbcc$(EXE)
$(C_BUILDDIR)/record_mixing.o: CFLAGS += -ffreestanding
$(C_BUILDDIR)/librfu_intr.o: CC1 := tools/agbcc/bin/agbcc_arm$(EXE)
$(C_BUILDDIR)/librfu_intr.o: CFLAGS := -O2 -mthumb-interwork -quiet
else
$(C_BUILDDIR)/librfu_intr.o: CFLAGS := -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast
endif
ifeq ($(DDEBUG), 1)
override ASFLAGS += --defsym DEBUG=1
override CPPFLAGS += -D DEBUG=1
endif
ifeq ($(DINFO),1)
override CFLAGS += -g
endif
# The dep rules have to be explicit or else missing files won't be reported.
# As a side effect, they're evaluated immediately instead of when the rule is invoked.
# It doesn't look like $(shell) can be deferred so there might not be a better way.
ifeq ($(SCAN_DEPS),1)
ifeq ($(NODEP),1)
$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.c
ifeq (,$(KEEP_TEMPS))
@echo "$(CC1) <flags> -o $@ $<"
@$(CPP) $(CPPFLAGS) $< | $(PREPROC) $< charmap.txt -i | $(CC1) $(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $(AS) $(ASFLAGS) -o $@ -
$(C_BUILDDIR)/%.o: c_dep :=
else
$(C_BUILDDIR)/%.o: c_dep = $(shell $(SCANINC) -I include $(C_SUBDIR)/$*.c)
endif
$(C_BUILDDIR)/%.o : $(C_SUBDIR)/%.c $$(c_dep)
@$(CPP) $(CPPFLAGS) $< -o $(C_BUILDDIR)/$*.i
@$(PREPROC) $(C_BUILDDIR)/$*.i charmap.txt | $(CC1) $(CFLAGS) -o $(C_BUILDDIR)/$*.s
@echo -e ".text\n\t.align\t2, 0\n" >> $(C_BUILDDIR)/$*.s
$(AS) $(ASFLAGS) -o $@ $(C_BUILDDIR)/$*.s
endif
else
define C_DEP
$1: $2 $$(shell $(SCANINC) -I include -I tools/agbcc/include -I gflib $2)
ifeq (,$$(KEEP_TEMPS))
@echo "$$(CC1) <flags> -o $$@ $$<"
@$$(CPP) $$(CPPFLAGS) $$< | $$(PREPROC) $$< charmap.txt -i | $$(CC1) $$(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $$(AS) $$(ASFLAGS) -o $$@ -
else
@$$(CPP) $$(CPPFLAGS) $$< -o $$(C_BUILDDIR)/$3.i
@$$(PREPROC) $$(C_BUILDDIR)/$3.i charmap.txt | $$(CC1) $$(CFLAGS) -o $$(C_BUILDDIR)/$3.s
@echo -e ".text\n\t.align\t2, 0\n" >> $$(C_BUILDDIR)/$3.s
$$(AS) $$(ASFLAGS) -o $$@ $$(C_BUILDDIR)/$3.s
endif
endef
$(foreach src, $(C_SRCS), $(eval $(call C_DEP,$(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(src)),$(src),$(patsubst $(C_SUBDIR)/%.c,%,$(src)))))
endif
ifeq ($(NODEP),1)
$(GFLIB_BUILDDIR)/%.o: $(GFLIB_SUBDIR)/%.c $$(c_dep)
ifeq (,$(KEEP_TEMPS))
@echo "$(CC1) <flags> -o $@ $<"
@$(CPP) $(CPPFLAGS) $< | $(PREPROC) $< charmap.txt -i | $(CC1) $(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $(AS) $(ASFLAGS) -o $@ -
$(ASM_BUILDDIR)/%.o: asm_dep :=
else
@$(CPP) $(CPPFLAGS) $< -o $(GFLIB_BUILDDIR)/$*.i
@$(PREPROC) $(GFLIB_BUILDDIR)/$*.i charmap.txt | $(CC1) $(CFLAGS) -o $(GFLIB_BUILDDIR)/$*.s
@echo -e ".text\n\t.align\t2, 0\n" >> $(GFLIB_BUILDDIR)/$*.s
$(AS) $(ASFLAGS) -o $@ $(GFLIB_BUILDDIR)/$*.s
endif
else
define GFLIB_DEP
$1: $2 $$(shell $(SCANINC) -I include -I tools/agbcc/include -I gflib $2)
ifeq (,$$(KEEP_TEMPS))
@echo "$$(CC1) <flags> -o $$@ $$<"
@$$(CPP) $$(CPPFLAGS) $$< | $$(PREPROC) $$< charmap.txt -i | $$(CC1) $$(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $$(AS) $$(ASFLAGS) -o $$@ -
else
@$$(CPP) $$(CPPFLAGS) $$< -o $$(GFLIB_BUILDDIR)/$3.i
@$$(PREPROC) $$(GFLIB_BUILDDIR)/$3.i charmap.txt | $$(CC1) $$(CFLAGS) -o $$(GFLIB_BUILDDIR)/$3.s
@echo -e ".text\n\t.align\t2, 0\n" >> $$(GFLIB_BUILDDIR)/$3.s
$$(AS) $$(ASFLAGS) -o $$@ $$(GFLIB_BUILDDIR)/$3.s
endif
endef
$(foreach src, $(GFLIB_SRCS), $(eval $(call GFLIB_DEP,$(patsubst $(GFLIB_SUBDIR)/%.c,$(GFLIB_BUILDDIR)/%.o, $(src)),$(src),$(patsubst $(GFLIB_SUBDIR)/%.c,%, $(src)))))
$(ASM_BUILDDIR)/%.o: asm_dep = $(shell $(SCANINC) -I "" $(ASM_SUBDIR)/$*.s)
endif
ifeq ($(NODEP),1)
$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.s
$(PREPROC) $< charmap.txt | $(CPP) -I include - | $(AS) $(ASFLAGS) -o $@
else
define SRC_ASM_DATA_DEP
$1: $2 $$(shell $(SCANINC) -I include -I "" $2)
$$(PREPROC) $$< charmap.txt | $$(CPP) -I include - | $$(AS) $$(ASFLAGS) -o $$@
endef
$(foreach src, $(C_ASM_SRCS), $(eval $(call SRC_ASM_DATA_DEP,$(patsubst $(C_SUBDIR)/%.s,$(C_BUILDDIR)/%.o, $(src)),$(src))))
endif
ifeq ($(NODEP),1)
$(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s
$(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s $$(asm_dep)
$(AS) $(ASFLAGS) -o $@ $<
else
define ASM_DEP
$1: $2 $$(shell $(SCANINC) -I include -I "" $2)
$$(AS) $$(ASFLAGS) -o $$@ $$<
endef
$(foreach src, $(ASM_SRCS), $(eval $(call ASM_DEP,$(patsubst $(ASM_SUBDIR)/%.s,$(ASM_BUILDDIR)/%.o, $(src)),$(src))))
endif
ifeq ($(NODEP),1)
$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s
$(PREPROC) $< charmap.txt | $(CPP) -I include - | $(AS) $(ASFLAGS) -o $@
$(DATA_ASM_BUILDDIR)/%.o: data_dep :=
else
$(foreach src, $(REGULAR_DATA_ASM_SRCS), $(eval $(call SRC_ASM_DATA_DEP,$(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o, $(src)),$(src))))
endif
$(DATA_ASM_BUILDDIR)/%.o: data_dep = $(shell $(SCANINC) -I include -I "" $(DATA_ASM_SUBDIR)/$*.s)
endif
$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s $$(data_dep)
$(PREPROC) $< charmap.txt | $(CPP) -I include | $(ASM_PSEUDO_OP_CONV) | $(AS) $(ASFLAGS) -o $@
$(SONG_BUILDDIR)/%.o: $(SONG_SUBDIR)/%.s
$(AS) $(ASFLAGS) -I sound -o $@ $<
$(ASM_PSEUDO_OP_CONV) $< | $(AS) $(ASFLAGS) -I sound -o $@
$(OBJ_DIR)/sym_bss.ld: sym_bss.txt
$(RAMSCRGEN) .bss $< ENGLISH > $@
@ -422,28 +212,17 @@ 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) berry_fix libagbsyscall
@echo "cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ <objects> <lib>"
@cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ $(OBJS_REL) $(LIB)
$(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 --silent
$(ROM): $(ELF)
$(OBJCOPY) -O binary $< $@
$(FIX) $@ -p --silent
pokeemerald.exe: $(OBJS)
$(CC) $(CFLAGS) -Wl,--demangle $^ -L$(SDL_DIR)/lib -lmingw32 -lSDLmain -lSDL.dll -lwinmm -static-libgcc -o $@
modern: all
$(ROM): pokeemerald.exe
@:
berry_fix/berry_fix.gba: berry_fix
berry_fix:
@$(MAKE) -C berry_fix COMPARE=$(COMPARE) TOOLCHAIN=$(TOOLCHAIN) MODERN=$(MODERN)
libagbsyscall:
@$(MAKE) -C libagbsyscall TOOLCHAIN=$(TOOLCHAIN) MODERN=$(MODERN)
###################
### Symbol file ###
###################
$(SYM): $(ELF)
$(OBJDUMP) -t $< | sort -u | grep -E "^0[2389]" | $(PERL) -p -e 's/^(\w{8}) (\w).{6} \S+\t(\w{8}) (\S+)$$/\1 \2 \3 \4/g' > $@
modern: ; @$(MAKE) MODERN=1

173
README.md
View File

@ -1,160 +1,39 @@
# tumbledemerald
`tumbledemerald` is an open-source project to modernize and update Pokémon: Emerald Version.
# tumbledemerald [![Chat on Matrix](https://matrix.to/img/matrix-badge.svg)](https://matrix.to/#/#rebirthteam:matrix.org)
[TOC]
This is a decompilation of Pokémon Emerald, with many improvements and edits, similar to Rangi42's [polishedcrystal](https://github.com/Rangi42/polishedcrystal)
## Why?
About a year ago, I started working on the `pokecrystal` code to update and modernize it. That fell through for two main reasons:
It builds the following ROM:
- People were already doing it, a lot.
- I suck at assembly language.
**tumbledemerald.gba**
Eventually, the project was put on hold while I looked for a new project to take on. I found the `pokeemerald` decompilation about a week later. It was nice, it was clean, and it seemed like almost no one was making QoL hacks out of it. It started as a "running indoors and Repel system" hack. Then it got bigger. And bigger. And bigger. That's about all there is to it; a little project to work on when I have nothing better to do.
To set up the repository, see [INSTALL.md](INSTALL.md), or see our `utilities` repo for buildscripts
## How do I play `tumbledemerald`?
Tumbled has [releases](https://gitlab.com/tbld/game/-/releases) once or twice every week on average, with pre-compiled ROM images. I test the latest changes, run a [specific buildscript](https://gitlab.com/tbld/binaries/-/blob/main/scripts/gitpod.sh) to build the files, clean up the repository, and push it to GitLab.
For those who prefer to compile themselves, we have comprehensive [install documentation](INSTALL.md), or you can use the T.E.C.S. (TumbledEmerald Compilation Script) [here](https://gitlab.com/tbld/binaries/-/blob/main/scripts/main.sh)
Here is the last time Tumbled was updated to `pret:master`
Once you've found your way over to the releases, or compiled the latest code yourself, you'll need a way to run the game:
**20 December 2021**
> Please note that save files are not compatible between versions of the game, and regular Emerald saves are not compatible *at all*.
## See also
### Game Boy Advance, Game Boy Advance SP, Game Boy micro, Game Boy Player, Nintendo DS, Nintendo DS lite, Nintendo DSi, and Nintendo DSi XL/LL consoles
We recommend the usage of a device known as a "flashcart" to play `tumbledemerald` on the Game Boy line and Nintendo DS/DSi consoles. A cart we recommend can be found [here](https://krikzz.com/our-products/cartridges/everdrive-gba-mini.html).
Other disassembly and/or decompilation projects:
* [**Pokémon Red and Blue**](https://github.com/pret/pokered)
* [**Pokémon Gold and Silver (Space World '97 demo)**](https://github.com/pret/pokegold-spaceworld)
* [**Pokémon Yellow**](https://github.com/pret/pokeyellow)
* [**Pokémon Trading Card Game**](https://github.com/pret/poketcg)
* [**Pokémon Pinball**](https://github.com/pret/pokepinball)
* [**Pokémon Stadium**](https://github.com/pret/pokestadium)
* [**Pokémon Gold and Silver**](https://github.com/pret/pokegold)
* [**Pokémon Crystal**](https://github.com/pret/pokecrystal)
* [**Pokémon Ruby and Sapphire**](https://github.com/pret/pokeruby)
* [**Pokémon Pinball: Ruby & Sapphire**](https://github.com/pret/pokepinballrs)
* [**Pokémon FireRed and LeafGreen**](https://github.com/pret/pokefirered)
* [**Pokémon Mystery Dungeon: Red Rescue Team**](https://github.com/pret/pmd-red)
* [**Pokémon Diamond and Pearl**](https://github.com/pret/pokediamond)
* [**Pokémon HeartGold and SoulSilver**](https://github.com/pret/pokeheartgold)
### Nintendo 3DS, Nintendo 3DS XL/LL, Nintendo 2DS, New Nintendo 3DS, New Nintendo 3DS XL/LL, and New Nintendo 2DS XL/LL consoles
All Nintendo 3DS and 2DS consoles will need to be modified by the end-user (that's you!) to play `tumbledemerald`.
> This is a limitation imposed by Nintendo's default software. There's no better way to go about this, sadly. (Believe me, I've looked!)
* Follow [the recommended guide](https://3ds.hacks.guide) to install the necessary software modifications onto the console.
> We are not liable for any hardware or software damage caused by this procedure. While we believe this process to be perfectly safe, and have used it ourselves, this is being done **at your own risk**.
* Download the latest `tumbledemerald.cia` package from the [releases](https://gitlab.com/tbld/game/-/releases) page and transfer it to your console's SD or μSD card.
* Open the **FBI** application on your console.
- Select **SD** on the menu that appears.
- Navigate to the `tumbledemerald.cia` package.
- Select **Install and delete CIA**.
- Wait while the program is installed.
* Return to the HOME Menu and unwrap the "tumbledemerald version xx.xx" present.
* Launch the game and enjoy!
## Contacts
### Nintendo Switch
You can slide into my **[matrix]** PM's: @fierymewtwo:matrix.org. However, there is an official Rebirth "room" (see the **[matrix]** badge above)
All Nintendo Switch consoles will need to be modified by the end-user (that's you!) to play `tumbledemerald`.
Running `tumbledemerald` on the Nintendo Switch is a little more complex than other platforms. Nevertheless, the instructions are relatively simple:
* Follow [the recommended guide](https://switchgui.de) to install the necessary software modifications onto the console. Please note that later Nintendo Switch consoles, as well as all Nintendo Switch Lite and Nintendo Switch (OLED version) consoles are not compatible with `tumbledemerald`.
> We are not liable for any hardware or software damage caused by this procedure. While we believe this process to be perfectly safe, and have used it ourselves, this is being done **at your own risk**.
* Download the latest `tumbledemerald.gba` file from the [releases](https://gitlab.com/tbld/game/-/releases) page and transfer it to your console's μSD card.
* Open the [4TU QuickStore](https://apps.fortheusers.org/switch/quickstore) on your computer.
> If **Homebrew App Store** is selected, de-select it by clicking on it or touching it.
- Select **mGBA** from the list.
- Click **Download 1 Selected**.
- Copy the *contents* of the downloaded `.zip` file to the [root](https://ibin.co/6xpoMqUta7Dm.jpg) of the µSD card, overwriting any existing files.
- Reinsert the µSD card and boot Atmosphère.
* Open the **Album** from Atmosphère's HOME Menu to open the Homebrew Menu.
* Open **mGBA**
* Browse to and select `tumbledemerald.gba`.
* Enjoy!
### PlayStation Vita
All PlayStation Vita consoles will need to be modified by the end-user (that's you!) to play `tumbledemerald`.
> This is a limitation imposed by Sony's default software. There's no better way to go about this, sadly. (Believe me, I've looked!)
* Follow [the recommended guide](https://vita.hacks.guide) to install the necessary software modifications onto the console.
> We are not liable for any hardware or software damage caused by this procedure. While we believe this process to be perfectly safe, this is being done **at your own risk**.
* Download the latest `tumbledemerald.gba` file from the [releases](https://gitlab.com/tbld/game/-/releases) page and transfer it to your console's Memory Card.
* Install the latest version of [**mGBA**](https://mgba.io) using the `.vpk` package.
* Open **mGBA**
* Browse to and select `tumbledemerald.gba`.
* Enjoy!
### Windows
On some devices, you may need to disable S mode before you can play `tumbledemerald`. For instructions on how to do so, see [this](https://support.microsoft.com/en-us/windows/switching-out-of-s-mode-in-windows-4f56d9be-99ec-6983-119f-031bfb28a307) knowledge base article.
> Why do I need to disable these settings? Is this safe to use?
> mGBA, the program used on macOS to play `tumbledemerald` is perfectly safe to use. You are welcome to browse the [source code](https://github.com/mgba-emu/mgba) to verify this. The reason that you may need to tweak system settings is due to the fact that `endrift`, mGBA's developer, has not submitted mGBA to the Microsoft Store. S mode allows **only** apps from the Microsoft Store, hence why S mode needs to be disabled.
> Disabling S mode won't cause your computer to lose any functionality. However, disabling S mode *is* permanent. Once disabled, S mode **can't be re-enabled**.
* Download the latest `tumbledemerald.gba` file from the [releases](https://gitlab.com/tbld/game/-/releases) page.
* Install the latest version of [**mGBA**](https://mgba.io), depending on what kind of computer you have.
* Open **mGBA**
* Navigate to File > Load ROM.
* Browse to and select `tumbledemerald.gba`.
* Enjoy!
### macOS
Playing `tumbledemerald` on macOS is a bit more complicated due to macOS security features. You may have to change several preferences on your Mac before you can play.
See [this page](https://support.apple.com/en-us/HT202491) for more details.
> Why do I need to disable these settings? Is this safe to use?
> mGBA, the program used on macOS to play `tumbledemerald` is perfectly safe to use. You are welcome to browse the [source code](https://github.com/mgba-emu/mgba) to verify this. The reason that you may need to tweak system settings is due to the fact that `endrift`, mGBA's developer, has not gotten mGBA notarized and signed by Apple as of yet. Additionally, mGBA is *not* available in the Mac App Store. You will need to allow apps from outside the Mac App Store, and you may or may not need to add mGBA to the Gatekeeper whitelist.
* Download the latest `tumbledemerald.gba` file from the [releases](https://gitlab.com/tbld/game/-/releases) page.
* Install the latest version of [**mGBA**](https://mgba.io), depending on what kind of Mac and/or what version of macOS you have.
* Open **mGBA**
* Navigate to File > Load ROM.
* Browse to and select `tumbledemerald.gba`.
* Enjoy!
### Linux
(No, I will *not* call it GNU/Linux.)
To play `tumbledemerald` on Steam Deck, we recommend the use of the standalone `mgba` program rather than RetroArch.
> Handy tip: When using Steam Deck in Desktop mode, press the Steam and X buttons simultaneously to open the virtual keyboard.
* Power on your Deck.
* Once Deck UI loads, press and hold the power key.
* Select **Switch to Desktop**.
- If you have never used Steam Deck's desktop mode, you will need to set a password. Do this now if necessary.
> mGBA can usually be found in your distribution's repositories or ports tree. If not, download the latest development `appimage` from [here](https://mgba.io/download)
* Open a web browser on your computer and download `tumbledemerald.gba` from [this page](https://gitlab.com/tbld/game/-/releases).
* Open the mGBA application.
* Navigate to File > Load ROM.
* Browse to and select `tumbledemerald.gba`.
* Enjoy!
### Steam Deck
To play `tumbledemerald` on Steam Deck, we recommend the use of the standalone `mgba` program rather than RetroArch.
> Handy tip: When using Steam Deck in Desktop mode, press the Steam and X buttons simultaneously to open the virtual keyboard.
* Power on your Deck.
* Once Deck UI loads, press and hold the power key.
* Select **Switch to Desktop**.
- If you have never used Steam Deck's desktop mode, you will need to set a password. Do this now if necessary.
* Use the right trackpad to open **Discover**. It looks like a small shopping bag with a "K" on it.
* Search for **mGBA**.
* Select **Install**.
- You *will* be prompted to enter your password at this step. Don't forget it!
- If you have never used Steam Deck's desktop mode, you will need to install a web browser:
- Use the right trackpad to open **Discover**. It looks like a small shopping bag with a "K" on it.
- Search for any web browser you like. (I personally prefer Firefox)
- Select **Install**.
- You *will* be prompted to enter your password at this step. Don't forget it!
* Open a web browser on your Deck and download `tumbledemerald.gba` from [this page](https://gitlab.com/tbld/game/-/releases).
* Open the mGBA application.
* Navigate to File > Load ROM.
* Browse to and select `tumbledemerald.gba`.
* Enjoy!
## How can I contribute?
Merge Requests and Issues are appreciated greatly. If you find a bug, have a cool idea, or need help with something, just tell us in an issue! (Make sure to mark it with `not-issue`.)
We do not, have not, cannot, and will not accept **any** financial contributions due to legal issues. If someone tries to solicit money while masquerading as us, let us know!
***If you paid for any part of `tumbledemerald`, you were ripped off and should ask your bank or credit union for a refund directly.***
> The old GitHub repositories are now unmaintained, and all future development will take place on GitLab.

1
agbcc

Submodule agbcc deleted from d59cfb5ac1

View File

@ -1378,7 +1378,7 @@ BattleFrontier_BattleTowerLobby_Text_ExplainMultiLinkRules:
.string "The Link Multi Battle Mode is for two\n"
.string "friends to mount a challenge together.\p"
.string "You and your friend must be linked with\n"
.string "Wireless Adapters or a GBA Game Link\l"
.string "Wireless Adapters or a Gba Game Link\l"
.string "cable.\p"
.string "You must choose two Pokémon at\n"
.string "the registration counter.\p"

View File

@ -118,19 +118,6 @@ DewfordTown_EventScript_FishingExcellent::
DewfordTown_EventScript_FishingNotSoGood::
msgbox DewfordTown_Text_FishingAdvice, MSGBOX_DEFAULT
goto_if_set FLAG_SYS_GAME_CLEAR, DewfordTown_EventScript_Intermediate_GiveOldSeaMap
release
end
DewfordTown_EventScript_Intermediate_GiveOldSeaMap::
goto_if_unset FLAG_RECEIVED_OLD_SEA_MAP, DewfordTown_EventScript_GiveOldSeaMap
release
end
DewfordTown_EventScript_GiveOldSeaMap::
msgbox DewfordTown_Text_MaybeExploringWouldBeBetter, MSGBOX_DEFAULT
giveitem ITEM_OLD_SEA_MAP
setflag FLAG_RECEIVED_OLD_SEA_MAP
release
end
@ -736,12 +723,6 @@ DewfordTown_Text_ThrowInFishingAdvice:
.string "you need to time the pulls on your Rod\l"
.string "to haul them in.$"
DewfordTown_Text_MaybeExploringWouldBeBetter:
.string "Hmmm... Well, if you aren't having much\n"
.string "luck with fishing...\l"
.string "Maybe exploring would be a better\n"
.string "fit for a Trainer like you?$"
DewfordTown_Text_ThatsTooBadThen:
.string "Oh, is that so?\n"
.string "That's too bad, then.$"

View File

@ -259,7 +259,6 @@ LittlerootTown_EventScript_Twin::
faceplayer
goto_if_set FLAG_ADVENTURE_STARTED, LittlerootTown_EventScript_GoodLuck
goto_if_set FLAG_RESCUED_BIRCH, LittlerootTown_EventScript_YouSavedBirch
goto_if_set FLAG_SYS_GAME_CLEAR, LittlerootTown_EventScript_Intermediate_DustyTickets
goto_if_ne VAR_LITTLEROOT_TOWN_STATE, 0, LittlerootTown_EventScript_GoSaveBirch
msgbox LittlerootTown_Text_IfYouGoInGrassPokemonWillJumpOut, MSGBOX_DEFAULT
release
@ -286,20 +285,6 @@ LittlerootTown_EventScript_GoodLuck::
release
end
LittlerootTown_EventScript_Intermediate_DustyTickets::
goto_if_unset FLAG_AURORA_MYSTIC_RECEIVED, LittlerootTown_EventScript_DustyTickets
end
LittlerootTown_EventScript_DustyTickets::
msgbox LittlerootTown_Text_FoundTickets, MSGBOX_DEFAULT
giveitem ITEM_MYSTIC_TICKET
giveitem ITEM_AURORA_TICKET
setflag FLAG_RECEIVED_AURORA_TICKET
setflag FLAG_RECEIVED_MYSTIC_TICKET
setflag FLAG_AURORA_MYSTIC_RECEIVED @ because I'm bad at hacking.
release
end
LittlerootTown_EventScript_NeedPokemonTriggerLeft::
lockall
applymovement LOCALID_TWIN, LittlerootTown_Movement_TwinApproachPlayerLeft
@ -1012,13 +997,6 @@ LittlerootTown_Text_GoodLuckCatchingPokemon:
.string "Are you going to catch Pokémon?\n"
.string "Good luck!$"
LittlerootTown_Text_FoundTickets:
.string "Um, hi!\p"
.string "I found these in an old suitcase. My\n"
.string "daddy doesn't want them, so I decided\n"
.string "to give these to you!$"
LittlerootTown_Text_TownSign:
.string "Littleroot Town\n"
.string "“A town that can't be shaded any hue.”$"

View File

@ -1258,7 +1258,7 @@ EventScript_CloseMossdeepGameCornerBarrier::
return
CableClub_OnResume:
@ special InitUnionRoom commented out by default, but can be easily re-enabled, see docs.
special InitUnionRoom
end
MossdeepCity_GameCorner_1F_EventScript_InfoMan2::

View File

@ -1,6 +1,7 @@
@ Interact with cuttable tree
EventScript_CutTree::
lockall
goto_if_unset FLAG_BADGE01_GET, EventScript_CheckTreeCantCut
checkpartymove MOVE_CUT
goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CheckTreeCantCut
setfieldeffectargument 0, VAR_RESULT
@ -53,6 +54,7 @@ Text_CantCut:
@ Interact with smashable rock
EventScript_RockSmash::
lockall
goto_if_unset FLAG_BADGE03_GET, EventScript_CantSmashRock
checkpartymove MOVE_ROCK_SMASH
goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantSmashRock
setfieldeffectargument 0, VAR_RESULT
@ -109,6 +111,7 @@ Text_CantSmash:
EventScript_StrengthBoulder::
lockall
goto_if_unset FLAG_BADGE04_GET, EventScript_CantStrength
goto_if_set FLAG_SYS_USE_STRENGTH, EventScript_CheckActivatedBoulder
checkpartymove MOVE_STRENGTH
goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantStrength

View File

@ -17,7 +17,7 @@ EventScript_PkmnCenterNurse_HealPkmn::
waitmessage
call EventScript_PkmnCenterNurse_TakeAndHealPkmn
goto_if_unset FLAG_POKERUS_EXPLAINED, EventScript_PkmnCenterNurse_CheckPokerus
goto EventScript_PkmnCenterNurse_ReturnPkmn
goto EventScript_PkmnCenterNurse_CheckTrainerHillAndUnionRoom
end
EventScript_PkmnCenterNurse_IllTakeYourPkmn::
@ -75,7 +75,7 @@ EventScript_PkmnCenterNurse_PlayerWaitingInUnionRoom::
EventScript_PkmnCenterNurse_CheckPokerus::
specialvar VAR_RESULT, IsPokerusInParty
goto_if_eq VAR_RESULT, TRUE, EventScript_PkmnCenterNurse_ExplainPokerus
goto_if_eq VAR_RESULT, FALSE, EventScript_PkmnCenterNurse_ReturnPkmn
goto_if_eq VAR_RESULT, FALSE, EventScript_PkmnCenterNurse_CheckTrainerHillAndUnionRoom
end
EventScript_PkmnCenterNurse_ExplainPokerus::

View File

@ -116,7 +116,7 @@ PlayersHouse_2F_EventScript_SetWallClock::
PlayersHouse_2F_Movement_MomEntersMale:
delay_8
walk_faster_down
walk_down
walk_in_place_faster_left
delay_16
delay_8
@ -124,18 +124,18 @@ PlayersHouse_2F_Movement_MomEntersMale:
step_end
PlayersHouse_2F_Movement_MomExitsMale:
walk_faster_right
walk_right
walk_up
delay_8
step_end
PlayersHouse_2F_Movement_MomEntersFemale:
delay_8
walk_faster_down
walk_down
walk_in_place_faster_right
delay_16
delay_8
walk_faster_right
walk_right
step_end
PlayersHouse_2F_Movement_MomExitsFemale:
@ -221,11 +221,11 @@ PlayersHouse_1F_EventScript_WatchGymBroadcast::
PlayersHouse_1F_Movement_MomApproachDadMale:
walk_up
walk_faster_right
walk_faster_right
walk_faster_right
walk_faster_right
walk_faster_down
walk_right
walk_right
walk_right
walk_right
walk_down
walk_in_place_faster_right
step_end
@ -235,12 +235,12 @@ PlayersHouse_1F_Movement_MomApproachDadFemale:
walk_left
walk_left
walk_left
walk_faster_down
walk_down
walk_in_place_faster_left
step_end
PlayersHouse_1F_Movement_MomApproachPlayerMale:
walk_faster_right
walk_right
step_end
PlayersHouse_1F_Movement_MomApproachPlayerFemale:
@ -277,8 +277,8 @@ PlayersHouse_1F_Movement_MomApproachPlayerAfterTVMale:
PlayersHouse_1F_Movement_MomApproachPlayerAfterTVFemale:
walk_up
walk_faster_right
walk_faster_right
walk_right
walk_right
step_end
PlayersHouse_1F_Movement_MomMakeRoomToSeeTVMale:
@ -287,19 +287,19 @@ PlayersHouse_1F_Movement_MomMakeRoomToSeeTVMale:
step_end
PlayersHouse_1F_Movement_MomMakeRoomToSeeTVFemale:
walk_faster_right
walk_right
walk_in_place_faster_left
step_end
PlayersHouse_1F_Movement_MomReturnToSeatMale:
walk_left
walk_faster_down
walk_down
walk_in_place_faster_right
step_end
PlayersHouse_1F_Movement_MomReturnToSeatFemale:
walk_faster_right
walk_faster_down
walk_right
walk_down
walk_in_place_faster_left
step_end
@ -393,27 +393,27 @@ PlayersHouse_1F_EventScript_Vigoroth2::
end
PlayersHouse_1F_Movement_PlayerApproachTVForGymMale:
walk_faster_down
walk_faster_down
walk_faster_left
walk_faster_left
walk_faster_left
walk_down
walk_down
walk_left
walk_left
walk_left
step_end
PlayersHouse_1F_Movement_PlayerMoveToTVMale:
walk_faster_left
walk_left
step_end
PlayersHouse_1F_Movement_PlayerApproachTVForGymFemale:
walk_faster_down
walk_faster_down
walk_faster_right
walk_faster_right
walk_faster_right
walk_down
walk_down
walk_right
walk_right
walk_right
step_end
PlayersHouse_1F_Movement_PlayerMoveToTVFemale:
walk_faster_right
walk_right
step_end
PlayersHouse_1F_Movement_MovePlayerAwayFromDoor:
@ -603,8 +603,8 @@ PlayersHouse_1F_EventScript_MomApproachPlayerAfterTVFemale::
return
PlayersHouse_1F_Movement_DadApproachPlayerMale:
walk_faster_right
walk_faster_right
walk_right
walk_right
step_end
PlayersHouse_1F_Movement_DadApproachPlayerFemale:
@ -621,24 +621,24 @@ PlayersHouse_1F_Movement_DadFaceMomFemale:
step_end
PlayersHouse_1F_Movement_DadExitsMale:
walk_faster_down
walk_faster_right
walk_faster_down
walk_down
walk_right
walk_down
delay_8
step_end
PlayersHouse_1F_Movement_DadExitsFemale:
walk_faster_down
walk_down
walk_left
walk_faster_down
walk_down
delay_8
step_end
PlayersHouse_1F_Movement_PlayerEnterRoomMale:
delay_16
walk_faster_down
walk_faster_down
walk_faster_down
walk_down
walk_down
walk_down
walk_in_place_faster_left
step_end
@ -651,9 +651,9 @@ PlayersHouse_1F_Movement_MomAndPlayerWatchDadExit:
PlayersHouse_1F_Movement_PlayerEnterRoomFemale:
delay_16
walk_faster_down
walk_faster_down
walk_faster_down
walk_down
walk_down
walk_down
walk_in_place_faster_right
step_end
@ -668,10 +668,10 @@ PlayersHouse_1F_Movement_PlayerApproachTVForLatiMale:
PlayersHouse_1F_Movement_PlayerApproachTVForLatiFemale:
walk_up
walk_faster_right
walk_faster_right
walk_faster_right
walk_faster_right
walk_right
walk_right
walk_right
walk_right
walk_in_place_faster_up
step_end

View File

@ -10,15 +10,15 @@ CableClub_Text_WhichService:
CableClub_Text_TradeUsingLinkCable::
.string "Trade Pokémon with another player\n"
.string "using a GBA Game Link cable.$"
.string "using a Gba Game Link cable.$"
CableClub_Text_BattleUsingLinkCable::
.string "You may battle another Trainer\n"
.string "using a GBA Game Link cable.$"
.string "using a Gba Game Link cable.$"
CableClub_Text_RecordCornerUsingLinkCable::
.string "You can use the Record Corner with\n"
.string "others using a GBA Game Link cable.$"
.string "others using a Gba Game Link cable.$"
@ Unused
CableClub_Text_CloseThisMenu:
@ -440,7 +440,7 @@ CableClub_Text_ExplainWirelessClubFirstTime:
.string "with your friends in this room.\p"
.string "If the Wireless Adapter isn't\n"
.string "connected, you may still link up\l"
.string "using a GBA Game Link cable.\p"
.string "using a Gba Game Link cable.\p"
.string "If that is the case, you must go\n"
.string "to the Direct Corner.\p"
.string "I hope you enjoy the Wireless \n"
@ -476,7 +476,7 @@ CableClub_Text_ExplainWirelessClub:
.string "to your friends.\p"
.string "If the Wireless Adapter isn't\n"
.string "connected, you may still link up\l"
.string "using a GBA Game Link cable.\p"
.string "using a Gba Game Link cable.\p"
.string "If that is the case, you must go\n"
.string "to the Direct Corner.\p"
.string "I hope you enjoy the Wireless \n"

View File

@ -97,7 +97,7 @@
#define FLAG_LEGENDARIES_IN_SOOTOPOLIS 0x53
#define FLAG_REMOVE_WARP_FADE 0x54 // Custom flag used in tumbledemerald.
#define FLAG_AURORA_MYSTIC_RECEIVED 0x55 // Custom flag used in tumbledemerald. Basically a workaround.
#define FLAG_UNUSED_0x055 0x55 // Unused Flag
#define FLAG_HIDE_CONTEST_POKE_BALL 0x56 // Always set after new game, object it hides is added directly
#define FLAG_MET_RIVAL_MOM 0x57

BIN
pokeemerald-0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
pokeemerald-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

1
rom.sha1 Normal file
View File

@ -0,0 +1 @@
f3ae088181bf583e55daf962a92bb46f4f1d07b7 pokeemerald.gba

View File

@ -189,7 +189,7 @@ const u8 gMoveNames[MOVES_COUNT][MOVE_NAME_LENGTH + 1] =
[MOVE_SWEET_KISS] = _("Sweet Kiss"),
[MOVE_BELLY_DRUM] = _("Belly Drum"),
[MOVE_SLUDGE_BOMB] = _("Sludge Bomb"),
[MOVE_MUD_SLAP] = _("Mud-Slap"),
[MOVE_MUD_SLAP] = _("Mud-slap"),
[MOVE_OCTAZOOKA] = _("Octazooka"),
[MOVE_SPIKES] = _("Spikes"),
[MOVE_ZAP_CANNON] = _("Zap Cannon"),

View File

@ -1180,7 +1180,7 @@ const u8 gText_ThunderWave48BP[] = _("Thunder Wave{CLEAR_TO 0x4E}48Bp");
const u8 gText_SwordsDance48BP[] = _("Swords Dance{CLEAR_TO 0x4E}48Bp");
const u8 gText_DefenseCurl16BP[] = _("Defense Curl{CLEAR_TO 0x4E}16Bp");
const u8 gText_Snore24BP[] = _("Snore{CLEAR_TO 0x4E}24Bp");
const u8 gText_MudSlap24BP[] = _("Mud-Slap{CLEAR_TO 0x4E}24Bp");
const u8 gText_MudSlap24BP[] = _("Mud-slap{CLEAR_TO 0x4E}24Bp");
const u8 gText_Swift24BP[] = _("Swift{CLEAR_TO 0x4E}24Bp");
const u8 gText_IcyWind24BP[] = _("Icy Wind{CLEAR_TO 0x4E}24Bp");
const u8 gText_Endure48BP[] = _("Endure{CLEAR_TO 0x4E}48Bp");