summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL.md26
-rw-r--r--Makefile79
-rw-r--r--config.mk13
-rw-r--r--data/btl_attrs.s44
-rw-r--r--data/debug_mystery_event_scripts.s131
-rw-r--r--data/pokemon_storage_system.s7
-rw-r--r--include/config.h17
-rw-r--r--include/global.h5
-rw-r--r--include/main.h2
-rw-r--r--include/pokemon.h4
-rw-r--r--include/start_menu.h6
-rw-r--r--ruby_debug.sha11
-rw-r--r--sapphire_de_debug.sha11
-rw-r--r--sapphire_debug.sha11
-rw-r--r--src/battle_ai_script_commands.c2
-rw-r--r--src/battle_main.c97
-rw-r--r--src/berry_blender.c2
-rw-r--r--src/data/graphics.c8
-rw-r--r--src/debug/mori_debug_menu.c6
-rw-r--r--src/debug/nakamura_debug_menu.c20
-rw-r--r--src/debug/nohara_debug_menu.c257
-rw-r--r--src/debug/start_menu_debug.c144
-rw-r--r--src/debug/tomomichi_debug_menu.c57
-rw-r--r--src/debug/watanabe_debug_menu.c19
-rw-r--r--src/main.c11
-rw-r--r--src/pokemon_1.c3
-rw-r--r--src/pokemon_summary_screen.c63
-rw-r--r--src/roulette.c45
-rw-r--r--src/save.c4
-rw-r--r--src/save_failed_screen.c4
-rw-r--r--src/slot_machine.c4
-rw-r--r--src/text.c9
-rw-r--r--sym_common.txt14
33 files changed, 761 insertions, 345 deletions
diff --git a/INSTALL.md b/INSTALL.md
index 9b8003726..2b8d35db3 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -38,9 +38,9 @@ To set up the repository:
cd ../pokeruby
-To build **pokeruby.gba** and confirm it matches the official ROM image:
+To build Pokémon Ruby:
- make
+ make ruby
To build Pokémon Sapphire:
@@ -50,6 +50,15 @@ The above two commands will build the English v1.0 version of the respective tit
make ruby_rev2
+To also build debug targets (only v1.0 is currently supported), run either of the following:
+
+ make ruby_debug
+ make sapphire_debug
+
+To compare between official ROM images for each target:
+
+ make (target) COMPARE=1
+
## 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`.
@@ -57,33 +66,28 @@ The above two commands will build the English v1.0 version of the respective tit
* 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)
## Notes about the German language ROMs
-This repository also supports the German versions of Ruby and Sapphire. However, due to major differences in scripts, text, and graphics, a special configuration needs to be set up before compilation and torn down after.
+This repository also supports the "first edition" German versions of Ruby and Sapphire. However, due to major differences in scripts, text, and graphics, a special configuration needs to be set up before compilation and torn down after.
To set up the repository:
make clean
sh de_before.sh
-To compile the German ROMs:
+To compile the "first edition" German ROMs:
make ruby_de
make sapphire_de
-To compile the leaked Debug ROM (German):
+To compile their debug equivalents:
make ruby_de_debug
+ make sapphire_de_debug
To restore the repository (**MUST BE DONE BEFORE ATTEMPTING TO BUILD ANY ENGLISH LANGUAGE ROM**):
make clean
sh de_after.sh
-# Guidance
-
-To build **pokeruby.gba** with your changes:
-
- make COMPARE=0
-
## 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.
diff --git a/Makefile b/Makefile
index 70eb57508..befd85598 100644
--- a/Makefile
+++ b/Makefile
@@ -38,8 +38,8 @@ GBAFIX := tools/gbafix/gbafix$(EXE)
MAPJSON := tools/mapjson/mapjson$(EXE)
JSONPROC := tools/jsonproc/jsonproc$(EXE)
-ASFLAGS := -mcpu=arm7tdmi -I include --defsym $(GAME_VERSION)=1 --defsym REVISION=$(GAME_REVISION) --defsym DEBUG_TRANSLATE=$(DEBUG_TRANSLATE) --defsym $(GAME_LANGUAGE)=1 --defsym DEBUG=$(DEBUG) --defsym MODERN=$(MODERN)
-CPPFLAGS := -iquote include -Werror -Wno-trigraphs -D $(GAME_VERSION) -D REVISION=$(GAME_REVISION) -D $(GAME_LANGUAGE) -DDEBUG_TRANSLATE=$(DEBUG_TRANSLATE) -D DEBUG=$(DEBUG) -D MODERN=$(MODERN)
+ASFLAGS := -mcpu=arm7tdmi -I include --defsym $(GAME_VERSION)=1 --defsym REVISION=$(GAME_REVISION) --defsym DEBUG_FIX=$(DEBUG_FIX) --defsym $(GAME_LANGUAGE)=1 --defsym DEBUG=$(DEBUG) --defsym MODERN=$(MODERN)
+CPPFLAGS := -iquote include -Werror -Wno-trigraphs -D $(GAME_VERSION) -D REVISION=$(GAME_REVISION) -D $(GAME_LANGUAGE) -D=DEBUG_FIX$(DEBUG_FIX) -D DEBUG=$(DEBUG) -D MODERN=$(MODERN)
ifeq ($(MODERN),0)
CPPFLAGS += -I tools/agbcc/include -nostdinc -undef
CC1FLAGS := -mthumb-interwork -Wimplicit -Wparentheses -Wunused -Werror -O2 -fhex-asm
@@ -105,8 +105,7 @@ endif
#### Main Rules ####
-ALL_BUILDS := ruby ruby_rev1 ruby_rev2 sapphire sapphire_rev1 sapphire_rev2 ruby_de sapphire_de ruby_de_debug
-ALL_BUILDS := ruby ruby_rev1 ruby_rev2 sapphire sapphire_rev1 sapphire_rev2 ruby_de sapphire_de ruby_de_debug ruby_en_debug
+ALL_BUILDS := ruby ruby_debug ruby_rev1 ruby_rev2 sapphire sapphire_debug sapphire_rev1 sapphire_rev2 ruby_de ruby_de_debug sapphire_de sapphire_de_debug
MODERN_BUILDS := $(ALL_BUILDS:%=%_modern)
# Available targets
@@ -217,39 +216,45 @@ $(BUILD_DIR)/%.o: %.s $$(ASM_DEP)
$(AS) $(ASFLAGS) $< -o $@
# "friendly" target names for convenience sake
-ruby: ; @$(MAKE) GAME_VERSION=RUBY
-ruby_rev1: ; @$(MAKE) GAME_VERSION=RUBY GAME_REVISION=1
-ruby_rev2: ; @$(MAKE) GAME_VERSION=RUBY GAME_REVISION=2
-sapphire: ; @$(MAKE) GAME_VERSION=SAPPHIRE
-sapphire_rev1: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_REVISION=1
-sapphire_rev2: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_REVISION=2
-ruby_de: ; @$(MAKE) GAME_VERSION=RUBY GAME_LANGUAGE=GERMAN
-sapphire_de: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_LANGUAGE=GERMAN
-ruby_de_debug: ; @$(MAKE) GAME_VERSION=RUBY GAME_LANGUAGE=GERMAN DEBUG=1
-
-modern: ; @$(MAKE) GAME_VERSION=RUBY MODERN=1
-ruby_modern: ; @$(MAKE) GAME_VERSION=RUBY MODERN=1
-ruby_rev1_modern: ; @$(MAKE) GAME_VERSION=RUBY GAME_REVISION=1 MODERN=1
-ruby_rev2_modern: ; @$(MAKE) GAME_VERSION=RUBY GAME_REVISION=2 MODERN=1
-sapphire_modern: ; @$(MAKE) GAME_VERSION=SAPPHIRE MODERN=1
-sapphire_rev1_modern: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_REVISION=1 MODERN=1
-sapphire_rev2_modern: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_REVISION=2 MODERN=1
-ruby_de_modern: ; @$(MAKE) GAME_VERSION=RUBY GAME_LANGUAGE=GERMAN MODERN=1
-sapphire_de_modern: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_LANGUAGE=GERMAN MODERN=1
-ruby_de_debug_modern: ; @$(MAKE) GAME_VERSION=RUBY GAME_LANGUAGE=GERMAN DEBUG=1 MODERN=1
-
-ruby_en_debug: ; @$(MAKE) GAME_VERSION=RUBY DEBUG=1 DEBUG_TRANSLATE=1
-
-compare_ruby: ; @$(MAKE) GAME_VERSION=RUBY COMPARE=1
-compare_ruby_rev1: ; @$(MAKE) GAME_VERSION=RUBY GAME_REVISION=1 COMPARE=1
-compare_ruby_rev2: ; @$(MAKE) GAME_VERSION=RUBY GAME_REVISION=2 COMPARE=1
-compare_sapphire: ; @$(MAKE) GAME_VERSION=SAPPHIRE COMPARE=1
-compare_sapphire_rev1: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_REVISION=1 COMPARE=1
-compare_sapphire_rev2: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_REVISION=2 COMPARE=1
-compare_ruby_de: ; @$(MAKE) GAME_VERSION=RUBY GAME_LANGUAGE=GERMAN COMPARE=1
-compare_sapphire_de: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_LANGUAGE=GERMAN COMPARE=1
-compare_ruby_de_debug: ; @$(MAKE) GAME_VERSION=RUBY GAME_LANGUAGE=GERMAN DEBUG=1 COMPARE=1
-compare_ruby_en_debug: ; @$(MAKE) GAME_VERSION=RUBY DEBUG=1 DEBUG_TRANSLATE=1 COMPARE=1
+ruby: ; @$(MAKE) GAME_VERSION=RUBY
+ruby_debug: ; @$(MAKE) GAME_VERSION=RUBY DEBUG=1
+ruby_rev1: ; @$(MAKE) GAME_VERSION=RUBY GAME_REVISION=1
+ruby_rev2: ; @$(MAKE) GAME_VERSION=RUBY GAME_REVISION=2
+sapphire: ; @$(MAKE) GAME_VERSION=SAPPHIRE
+sapphire_debug: ; @$(MAKE) GAME_VERSION=SAPPHIRE DEBUG=1
+sapphire_rev1: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_REVISION=1
+sapphire_rev2: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_REVISION=2
+ruby_de: ; @$(MAKE) GAME_VERSION=RUBY GAME_LANGUAGE=GERMAN
+ruby_de_debug: ; @$(MAKE) GAME_VERSION=RUBY GAME_LANGUAGE=GERMAN DEBUG=1
+sapphire_de: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_LANGUAGE=GERMAN
+sapphire_de_debug: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_LANGUAGE=GERMAN DEBUG=1
+
+modern: ; @$(MAKE) GAME_VERSION=RUBY MODERN=1
+ruby_modern: ; @$(MAKE) GAME_VERSION=RUBY MODERN=1
+ruby_debug_modern: ; @$(MAKE) GAME_VERSION=RUBY DEBUG=1 MODERN=1
+ruby_rev1_modern: ; @$(MAKE) GAME_VERSION=RUBY GAME_REVISION=1 MODERN=1
+ruby_rev2_modern: ; @$(MAKE) GAME_VERSION=RUBY GAME_REVISION=2 MODERN=1
+sapphire_modern: ; @$(MAKE) GAME_VERSION=SAPPHIRE MODERN=1
+sappphire_debug_modern: ; @$(MAKE) GAME_VERSION=SAPPHIRE DEBUG=1 MODERN=1
+sapphire_rev1_modern: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_REVISION=1 MODERN=1
+sapphire_rev2_modern: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_REVISION=2 MODERN=1
+ruby_de_modern: ; @$(MAKE) GAME_VERSION=RUBY GAME_LANGUAGE=GERMAN MODERN=1
+ruby_de_debug_modern: ; @$(MAKE) GAME_VERSION=RUBY GAME_LANGUAGE=GERMAN DEBUG=1 MODERN=1
+sapphire_de_modern: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_LANGUAGE=GERMAN MODERN=1
+sapphire_de_debug_modern: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_LANGUAGE=GERMAN DEBUG=1 MODERN=1
+
+compare_ruby: ; @$(MAKE) GAME_VERSION=RUBY COMPARE=1
+compare_ruby_debug: ; @$(MAKE) GAME_VERSION=RUBY DEBUG=1 COMPARE=1
+compare_ruby_rev1: ; @$(MAKE) GAME_VERSION=RUBY GAME_REVISION=1 COMPARE=1
+compare_ruby_rev2: ; @$(MAKE) GAME_VERSION=RUBY GAME_REVISION=2 COMPARE=1
+compare_sapphire: ; @$(MAKE) GAME_VERSION=SAPPHIRE COMPARE=1
+compare_sapphire_debug: ; @$(MAKE) GAME_VERSION=SAPPHIRE DEBUG=1 COMPARE=1
+compare_sapphire_rev1: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_REVISION=1 COMPARE=1
+compare_sapphire_rev2: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_REVISION=2 COMPARE=1
+compare_ruby_de: ; @$(MAKE) GAME_VERSION=RUBY GAME_LANGUAGE=GERMAN COMPARE=1
+compare_ruby_de_debug: ; @$(MAKE) GAME_VERSION=RUBY GAME_LANGUAGE=GERMAN DEBUG=1 COMPARE=1
+compare_sapphire_de: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_LANGUAGE=GERMAN COMPARE=1
+compare_sapphire_de_debug: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_LANGUAGE=GERMAN DEBUG=1 COMPARE=1
#### Graphics Rules ####
diff --git a/config.mk b/config.mk
index 303af6233..fb5b79ee7 100644
--- a/config.mk
+++ b/config.mk
@@ -6,8 +6,8 @@ GAME_REVISION ?= 0
GAME_LANGUAGE ?= ENGLISH
DEBUG ?= 0
MODERN ?= 0
-DEBUG_TRANSLATE ?= 0
-COMPARE ?= 0
+DEBUG_FIX ?= 0
+COMPARE ?= 0
# For gbafix
MAKER_CODE := 01
@@ -55,8 +55,8 @@ else
endif
endif
-# Debug translations (always nonmatching)
-ifeq ($(DEBUG_TRANSLATE),1)
+# Debug fixes (always nonmatching)
+ifeq ($(DEBUG_FIX), 1)
COMPARE := 0
DEBUG = 1
endif
@@ -64,9 +64,8 @@ endif
# Debug
ifeq ($(DEBUG), 1)
BUILD_NAME := $(BUILD_NAME)_debug
-ifeq ($(GAME_LANGUAGE), ENGLISH)
- COMPARE := 0
- DEBUG_TRANSLATE := 1
+ifeq ($(DEBUG_FIX), 1)
+ BUILD_NAME := $(BUILD_NAME)_fixed
endif
endif
diff --git a/data/btl_attrs.s b/data/btl_attrs.s
index 06ab16430..2857c70f4 100644
--- a/data/btl_attrs.s
+++ b/data/btl_attrs.s
@@ -104,10 +104,14 @@ gUnknown_Debug_821F5AC::
.byte 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x0e, 0x14, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
Str_821F624:: @ 0x821F624
+.if (ENGLISH && REVISION == 0)
+ .string "ーーーーーーーー$"
+.else
.string "ーーーーーーーーーーーー$"
+.endif
-.if DEBUG_TRANSLATE
-
+.if DEBUG_FIX
+@ TODO: GERMAN translations
str_821F631:: @ 0x821F631
.string "JUNICHI$"
.string "STEVEN LOW$"
@@ -118,16 +122,18 @@ Str_821F649:: @ 0x821F649
.string "TETSUJI$"
debug_unk_0b::
-@ 0x821F64D
- .string "  ON$"
+ .string " "
+
+Str_821F64D::
+ .string "ON$"
-@ 0x821F652
+Str_821F652::
.string "OFF$"
-@ 0x821F655
+Str_821F655::
.string "MONO$"
-@ 0x821F65A
+Str_821F65A::
.string "STEREO$"
@ 0x821F65F
@@ -138,8 +144,7 @@ debug_unk_0b::
@ 0x821F66D
.string "Connection error$"
-
-.else @ !DEBUG_TRANSLATE
+.else @ !DEBUG_FIX
str_821F631:: @ 0x821F631
.string "ジュンイチ$"
.string "ダイゴロウ$"
@@ -150,16 +155,18 @@ Str_821F649:: @ 0x821F649
.string "てつじ$"
debug_unk_0b::
-@ 0x821F64D
- .string "  オン$"
+ .string " "
+
+Str_821F64D::
+ .string "オン$"
-@ 0x821F652
+Str_821F652::
.string "オフ$"
-@ 0x821F655
+Str_821F655::
.string "モノラル$"
-@ 0x821F65A
+Str_821F65A::
.string "ステレオ$"
@ 0x821F65F
@@ -171,7 +178,7 @@ debug_unk_0b::
@ 0x821F66D
.string "せつぞくエラー$"
-.endif @ !DEBUG_TRANSLATE
+.endif @ !DEBUG_FIX
@ 0x821f675
.byte 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00
@@ -190,7 +197,8 @@ gUnknown_Debug_821F680::
gUnknown_Debug_821F798::
.byte 0xc0, 0x03, 0x00, 0x00, 0xd6, 0x03, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x56, 0x04, 0x00, 0x00, 0xc0, 0x0b, 0x00, 0x00, 0xd6, 0x0b, 0x00, 0x00, 0x40, 0x0c, 0x00, 0x00, 0x56, 0x0c, 0x00, 0x00
-.if DEBUG_TRANSLATE
+.if DEBUG_FIX
+@ TODO: GERMAN translations
Str_821F7B8:: @ 0x821F7B8
.string "HEIGHT$"
@@ -209,7 +217,7 @@ Str_821F7EA:: @ 0x821F7EA
gUnknown_Debug_821F7F3::
.string "Would you like to save?$"
-.else @ !DEBUG_TRANSLATE
+.else @ !DEBUG_FIX
Str_821F7B8:: @ 0x821F7B8
.string "たかさ $"
@@ -228,7 +236,7 @@ Str_821F7EA:: @ 0x821F7EA
@ 0x821F7F3
gUnknown_Debug_821F7F3::
.string "セーブしますか?$"
-.endif @ DEBUG_TRANSLATE
+.endif @ !DEBUG_FIX
.endif @ DEBUG
diff --git a/data/debug_mystery_event_scripts.s b/data/debug_mystery_event_scripts.s
index 6fa509c34..409fcae70 100644
--- a/data/debug_mystery_event_scripts.s
+++ b/data/debug_mystery_event_scripts.s
@@ -17,8 +17,20 @@
.section .rodata
+.if (ENGLISH && REVISION == 0)
+ .set unkConstant, 2
+.else @ GERMAN
+ .set unkConstant, 4
+.endif @ GERMAN
+
+.if SAPPHIRE
+ .set unkConstant2, 0x100
+.else @ RUBY
+ .set unkConstant2, 0x80
+.endif @ RUBY
+
gUnknown_Debug_845DAE1::
- me_checkcompat gUnknown_Debug_845DAE1, 0x4, 0x4, 0x4, 0x80
+ me_checkcompat gUnknown_Debug_845DAE1, unkConstant, unkConstant, 0x4, unkConstant2
me_crc 0x0, _0845DAFF, _0845DAFFEnd
_0845DAFF:
me_initramscript MAP_PETALBURG_CITY_GYM, 0x1, _845DB56, _845DB56End
@@ -26,15 +38,15 @@ _0845DAFF:
me_runscript _0845DD0D
me_end
-.if DEBUG_TRANSLATE
+.if ENGLISH
_0845DB16:
- .string "Run and visit your DAD in the\n"
- .string "PETALBURG CITY GYM.$"
-.else
+ .string "Go see your father at the GYM in\n"
+ .string "PETALBURG.$"
+.else @ GERMAN
_0845DB16:
.string "Lauf und besuche deinen Vater in der\n"
.string "ARENA von BLÜTENBURG CITY.$"
-.endif
+.endif @ GERMAN
_845DB56:
setvaddress _845DB56
checkitem ITEM_EON_TICKET, 0x1
@@ -70,22 +82,22 @@ _0845DBB5:
release
end
-.if DEBUG_TRANSLATE
+.if ENGLISH
_0845DBBE:
- .string "DAD: {PLAYER}! Nice to see you!\n"
- .string "Here is a Letter for you, {PLAYER}.$"
+ .string "DAD: {PLAYER}! Good to see you!\n"
+ .string "There's a letter here for you, {PLAYER}.$"
_0845DC00:
- .string "DAD: I'm not sure. It could be a\n"
- .string "TICKET for a Ferry.\p"
- .string "You should go to LILYCOVE CITY and\n"
- .string "ask about it there.$"
+ .string "DAD: It appears to be a ferry TICKET,\n"
+ .string "but I've never seen one like it before.\p"
+ .string "You should visit LILYCOVE and ask\n"
+ .string "about it there.$"
_0845DC94:
- .string "DAD: {PLAYER}, the KEY ITEMS pocket\n"
- .string "in your BAG is full.\p"
- .string "Store some of your KEY ITEMS in\n"
- .string "the PC and come back later.$"
-.else @ !DEBUG_TRANSLATE
+ .string "DAD: {PLAYER}, the KEY ITEMS POCKET in\n"
+ .string "your BAG is full.\p"
+ .string "Move some key items for safekeeping\n"
+ .string "in your PC, then come see me.$"
+.else @ GERMAN
_0845DBBE:
.string "VATER: {PLAYER}! Schön, dich zu sehen!\n"
.string "Hier ist ein Brief für dich, {PLAYER}.$"
@@ -100,7 +112,7 @@ _0845DC94:
.string "deines BEUTELS ist voll.\p"
.string "Lagere einige deiner Basis-Items in\n"
.string "deinem PC und komm dann wieder.$"
-.endif @ !DEBUG_TRANSLATE
+.endif @ GERMAN
_845DB56End:
.size _845DB56, _845DB56End - _845DB56
@@ -132,26 +144,25 @@ _0845DD5B:
setmysteryeventstatus 0x3
end
-.if DEBUG_TRANSLATE
+.if ENGLISH
_0845DD63:
- .string "This GIFT can only be used\n"
- .string "once.$"
+ .string "This EVENT may be played only once.$"
_0845DD95:
- .string "The KEY ITEMS pocket is full.$"
-.else
+ .string "Your BAG's KEY ITEMS POCKET is full.$"
+.else @ GERMAN
_0845DD63:
.string "Dieses GESCHEHEN kann nur einmal\n"
.string "gespielt werden.$"
_0845DD95:
.string "Deine BASIS-TASCHE ist voll.$"
-.endif
+.endif @ GERMAN
_0845DAFFEnd:
.size _0845DAFF, _0845DAFFEnd - _0845DAFF
gUnknown_Debug_845DAE1End::
gUnknown_Debug_845DDB2::
- me_checkcompat gUnknown_Debug_845DDB2, 4, 4, 4, 0x80
+ me_checkcompat gUnknown_Debug_845DDB2, unkConstant, unkConstant, 0x4, unkConstant2
me_checksum 0x0, _0845DDD0, _0845DDD0End
_0845DDD0:
me_setenigmaberry gUnknown_Debug_845DDD6
@@ -164,7 +175,7 @@ _0845DDD0End:
gUnknown_Debug_845DDB2End::
gUnknown_Debug_845E306::
- me_checkcompat gUnknown_Debug_845E306, 0x4, 0x4, 0x4, 0x80
+ me_checkcompat gUnknown_Debug_845E306, unkConstant, unkConstant, 0x4, unkConstant2
me_runscript _0845E329
me_setmsg 0x2, _0845E34F
me_setmsg 0x3, _0845E387
@@ -183,16 +194,15 @@ _0845E34C:
setmysteryeventstatus 0x3
end
-.if DEBUG_TRANSLATE
+.if ENGLISH
_0845E34F:
- .string "A POKéMON was added to {PLAYER}'s\n"
- .string "team.$"
+ .string "A POKéMON was added to the\n"
+ .string "player's party.$"
_0845E387:
- .string "Your team is full.\n"
- .string "No more POKéMON can be added to your\l"
- .string "team.$"
-.else
+ .string "The player's party is full.\n"
+ .string "A POKéMON couldn't be added.$"
+.else @ GERMAN
_0845E34F:
.string "Ein POKéMON wurde in das Team des\n"
.string "Spielers aufgenommen.$"
@@ -201,10 +211,10 @@ _0845E387:
.string "Das Team des Spielers ist vollständig.\n"
.string "Es kann kein weiteres POKéMON\l"
.string "aufgenommen werden.$"
-.endif
+.endif @ GERMAN
gUnknown_Debug_845E3E0::
- me_checkcompat gUnknown_Debug_845E3E0, 0x4, 0x4, 0x4, 0x80
+ me_checkcompat gUnknown_Debug_845E3E0, unkConstant, unkConstant, 0x4, unkConstant2
me_crc 0x0, _0845E3FE, _0845E3FEEnd
_0845E3FE:
me_giveribbon 0x0, 0x1
@@ -214,7 +224,7 @@ _0845E3FEEnd:
gUnknown_Debug_845E3E0End::
gUnknown_Debug_845E402::
- me_checkcompat gUnknown_Debug_845E402, 0x4, 0x4, 0x4, 0x80
+ me_checkcompat gUnknown_Debug_845E402, unkConstant, unkConstant, 0x4, unkConstant2
me_crc 0x0, _0845E420, _0845E420End
_0845E420:
me_givenationaldex
@@ -224,7 +234,7 @@ _0845E420End:
gUnknown_Debug_845E402End::
gUnknown_Debug_845E422::
- me_checkcompat gUnknown_Debug_845E422, 0x4, 0x4, 0x4, 0x80
+ me_checkcompat gUnknown_Debug_845E422, unkConstant, unkConstant, 0x4, unkConstant2
me_crc 0x0, _0845E440, _0845E440End
_0845E440:
me_addrareword 0x1
@@ -234,7 +244,7 @@ _0845E440End:
gUnknown_Debug_845E422End::
gUnknown_Debug_845E443::
- me_checkcompat gUnknown_Debug_845E443, 0x4, 0x4, 0x4, 0x80
+ me_checkcompat gUnknown_Debug_845E443, unkConstant, unkConstant, 0x4, unkConstant2
me_crc 0x0, _0845E461, _0845E461End
_0845E461:
me_givepokemon gUnknown_Debug_845E467
@@ -250,7 +260,7 @@ _0845E461End:
gUnknown_Debug_845E443End::
gUnknown_Debug_845E4EF::
- me_checkcompat gUnknown_Debug_845E4EF, 0x4, 0x4, 0x4, 0x80
+ me_checkcompat gUnknown_Debug_845E4EF, unkConstant, unkConstant, 0x4, unkConstant2
me_addtrainer gUnknown_Debug_845E506
me_end
@@ -259,13 +269,13 @@ gUnknown_Debug_845E506::
gUnknown_Debug_845E4EFEnd::
gUnknown_Debug_845E606::
- me_checkcompat gUnknown_Debug_845E606, 0x4, 0x4, 0x4, 0x80
+ me_checkcompat gUnknown_Debug_845E606, unkConstant, unkConstant, 0x4, unkConstant2
me_enableresetrtc
me_end
gUnknown_Debug_845E606End::
gUnknown_Debug_845E619::
- me_checkcompat gUnknown_Debug_845E619, 0x4, 0x4, 0x4, 0x80
+ me_checkcompat gUnknown_Debug_845E619, unkConstant, unkConstant, 0x4, unkConstant2
me_checksum 0x0, _0845E637, _0845E637End
_0845E637:
me_initramscript MAP_PETALBURG_CITY_GYM, 0x1, _0845E683, _0845E683End
@@ -273,16 +283,15 @@ _0845E637:
me_setstatus 0x2
me_end
-.if DEBUG_TRANSLATE
-
+.if ENGLISH
_0845E64C:
- .string "Visit your DAD in the PETALBURG\n"
- .string "CITY GYM.$"
-.else
+ .string "Go see your dad at the\n"
+ .string "PETALBURG GYM.$"
+.else @ GERMAN
_0845E64C:
.string "Besuche deinen Vater in der ARENA\n"
.string "von BLÜTENBURG CITY.$"
-.endif
+.endif @ GERMAN
_0845E683:
setvaddress _0845E683
@@ -305,17 +314,17 @@ _0845E683:
_0845E6BF:
gotoram
-.if DEBUG_TRANSLATE
+.if ENGLISH
_0845E6C0:
.string "DAD: Hi, {PLAYER}!\p"
- .string "I have just received this rare\n"
- .string "BERRY. You can have it!$"
-.else
+ .string "I just received a rare BERRY.\n"
+ .string "I'd like you to have it.$"
+.else @ GERMAN
_0845E6C0:
.string "VATER: Hi, {PLAYER}!\p"
.string "Ich habe gerade diese seltene BEERE\n"
.string "erhalten. Ich schenke sie dir!$"
-.endif
+.endif @GERMAN
_0845E637End:
.size _0845E637, _0845E637End - _0845E637
@@ -324,7 +333,7 @@ _0845E683End:
gUnknown_Debug_845E619End::
gUnknown_Debug_845E712::
- me_checkcompat gUnknown_Debug_845E712, 0x4, 0x4, 0x4, 0x80
+ me_checkcompat gUnknown_Debug_845E712, unkConstant, unkConstant, 0x4, unkConstant2
me_crc 0x0, _0845E730, _0845E730End
_0845E730:
me_runscript _0845E736
@@ -345,26 +354,26 @@ _0845E755:
setmysteryeventstatus 0x3
end
-.if DEBUG_TRANSLATE
+.if ENGLISH
_0845E75D:
- .string "{STR_VAR_1} was handed over.$"
+ .string "{STR_VAR_1} was received!$"
_0845E771:
- .string "There is no room for {STR_VAR_1}\n"
- .string "available...$"
-.else
+ .string "There was no room to accept\n"
+ .string "{STR_VAR_1}...$"
+.else @ GERMAN
_0845E75D:
.string "{STR_VAR_1} wurde übergeben.$"
_0845E771:
.string "Es ist kein Platz für {STR_VAR_1}\n"
.string "vorhanden...$"
-.endif
+.endif @ GERMAN
_0845E730End:
.size _0845E730, _0845E730End - _0845E730
gUnknown_Debug_845E712End::
gUnknown_Debug_845E797::
- me_checkcompat gUnknown_Debug_845E797, 0x4, 0x4, 0x4, 0x80
+ me_checkcompat gUnknown_Debug_845E797, unkConstant, unkConstant, 0x4, unkConstant2
me_crc 0x0, gUnknown_Debug_845E7B5, gUnknown_Debug_845E7B5End
gUnknown_Debug_845E7B5::
me_setrecordmixinggift 0x1, 0x3, ITEM_POTION
diff --git a/data/pokemon_storage_system.s b/data/pokemon_storage_system.s
index e4a4cf95c..361ecf847 100644
--- a/data/pokemon_storage_system.s
+++ b/data/pokemon_storage_system.s
@@ -73,13 +73,14 @@ gSpriteTemplate_83BBC88:: @ 83BBC88
spr_template 1, 56006, gOamData_83BBC34, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_809CB74
.if DEBUG
-.if DEBUG_TRANSLATE
+.if DEBUG_FIX
gUnknown_Debug_0x83E6268:: @ 0x83E6268
+@ TODO: translations
.string "SET$"
-.else
+.else @ !DEBUG_FIX
gUnknown_Debug_0x83E6268:: @ 0x83E6268
.string "セットする$"
-.endif
+.endif @ !DEBUG_FIX
.endif
.align 2
diff --git a/include/config.h b/include/config.h
index 0046c3878..57154e8e2 100644
--- a/include/config.h
+++ b/include/config.h
@@ -5,11 +5,11 @@
// Ruby/Sapphire and Emerald do not have these asserts while Fire Red
// still has them in the ROM. This is because the developers forgot
// to define NDEBUG before release, however this has been changed as
-// Ruby's actual debug build does not use the AGBPrint features.
+// Ruby's actual debug builds do not use the AGBPrint features.
// To note, Ruby/Sapphire likely did not use AGBPrint. This is because
-// the german debug ROM of Ruby did not have any uses of AGBPrint and
-// the assert commands but instead a "crash" screen. This config exists
+// the debug ROMs of Ruby did not have any uses of AGBPrint and the
+// assert commands but instead a "crash" screen. This config exists
// for convenience for the user of pokeruby and NOT because it is
// authoritative. These additions are for user convenience based on
// officially recommended SDK practices for debugging and is therefore
@@ -55,15 +55,8 @@
#define UNITS_METRIC
#endif
-// An option to use translations/encoding fixes for the Debug menus.
-// Selected by default for custom English debug roms.
-#ifndef DEBUG_TRANSLATE
-#if ENGLISH && DEBUG
-#define DEBUG_TRANSLATE 1
-#else
-#define DEBUG_TRANSLATE 0
-#endif
-#endif
+// An option to use fuller translations for debug ROMs.
+// #define DEBUG_FIX 1 // Unsupported languages default to English text.
// Fixed in Emerald.
// #define BUGFIX_SETMONIVS
diff --git a/include/global.h b/include/global.h
index 0ddc2d7bb..4ca22ff32 100644
--- a/include/global.h
+++ b/include/global.h
@@ -21,12 +21,13 @@
#endif
// For debug menu translations.
-// DTR("こんにちは", "Hello") will expand to "Hello" with DEBUG_TRANSLATE,
+// DTR("こんにちは", "Hello") will expand to "Hello" with DEBUG_FIX,
// or "こんにちは" if not.
// The KANA macro will wrap Japanese text with encoding markers to
// prevent mojibake while they are being translated.
-#if DEBUG_TRANSLATE
+// TODO: Support multiple languages.
+#if DEBUG_FIX
#define DTR(japanese, english) _(english)
#define KANA(txt) _("{JPN}" txt "{ENG}")
#else
diff --git a/include/main.h b/include/main.h
index 8a7c4d67c..20ed1ec74 100644
--- a/include/main.h
+++ b/include/main.h
@@ -64,7 +64,7 @@ void InitFlashTimer(void);
void DoSoftReset(void);
void ClearPokemonCrySongs(void);
-extern const char BuildDateTime[];
+extern const u8 BuildDateTime[];
extern s8 gPcmDmaCounter;
#endif // GUARD_MAIN_H
diff --git a/include/pokemon.h b/include/pokemon.h
index df2d42522..cb02268a8 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -509,8 +509,8 @@ void BoxMonRestorePP(struct BoxPokemon *);
bool8 HealStatusConditions(struct Pokemon *mon, u32 unused, u32 healMask, u8 battleId);
u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit);
-#if DEBUG
+#if DEBUG && !(ENGLISH && REVISION == 0)
void Nakamura_NakaGenderTest_RecalcStats(struct Pokemon *);
-#endif // DEBUG
+#endif
#endif // GUARD_POKEMON_H
diff --git a/include/start_menu.h b/include/start_menu.h
index 327df8c16..b035eb211 100644
--- a/include/start_menu.h
+++ b/include/start_menu.h
@@ -13,7 +13,11 @@ void debug_sub_8075DB4(struct BattleTowerEReaderTrainer *ereaderTrainer, const u
bool8 debug_sub_8075C30(void);
#if DEBUG
-extern u32 gUnknown_Debug_03004BD0;
+extern u8 gUnknown_Debug_03004BD0;
+// TODO: see if this is in rev1+
+#if (ENGLISH && REVISION == 0)
+extern u8 gUnknown_Debug_Murakawa2;
+#endif
#endif // DEBUG
#endif // GUARD_START_MENU_H
diff --git a/ruby_debug.sha1 b/ruby_debug.sha1
new file mode 100644
index 000000000..c67d57fde
--- /dev/null
+++ b/ruby_debug.sha1
@@ -0,0 +1 @@
+1d03a9128288a7076f6b4517e7602b29f76218a1 pokeruby_debug.gba
diff --git a/sapphire_de_debug.sha1 b/sapphire_de_debug.sha1
new file mode 100644
index 000000000..20d097b15
--- /dev/null
+++ b/sapphire_de_debug.sha1
@@ -0,0 +1 @@
+261bec8dbd7159790cd5126bd47df5b5cef61ac1 pokesapphire_de_debug.gba \ No newline at end of file
diff --git a/sapphire_debug.sha1 b/sapphire_debug.sha1
new file mode 100644
index 000000000..961712d4a
--- /dev/null
+++ b/sapphire_debug.sha1
@@ -0,0 +1 @@
+e96e268b802aaa3e9215afeada21a2498dd2a9c5 pokesapphire_debug.gba
diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c
index bf5444cf6..956cc2f6e 100644
--- a/src/battle_ai_script_commands.c
+++ b/src/battle_ai_script_commands.c
@@ -334,7 +334,7 @@ void BattleAI_SetupAIData(void)
AI_THINKING_STRUCT->aiFlags = 0x20000000;
else if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE)
AI_THINKING_STRUCT->aiFlags = 0x80000000;
-#ifdef GERMAN
+#if GERMAN || (ENGLISH && DEBUG && REVISION == 0)
else if (gBattleTypeFlags & (BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_BATTLE_TOWER) || gTrainerBattleOpponent == SECRET_BASE_OPPONENT)
AI_THINKING_STRUCT->aiFlags = 7;
#endif
diff --git a/src/battle_main.c b/src/battle_main.c
index 721aa7f9f..b34beeb98 100644
--- a/src/battle_main.c
+++ b/src/battle_main.c
@@ -1378,7 +1378,7 @@ void debug_sub_8011EA0(u8);
void debug_sub_8012294(void);
void debug_sub_80123D8(u8);
void debug_sub_8012540(void);
-void debug_nullsub_3(void);
+void debug_ShowCurrentAnimAudioOptions(void);
void debug_sub_80125A0(void);
void debug_sub_80125E4(void);
void debug_sub_8012628(void);
@@ -1478,7 +1478,7 @@ void debug_sub_80108B8(void)
debug_sub_8012294();
debug_sub_80123D8(gUnknown_Debug_030043A4 * 5);
debug_sub_8012540();
- debug_nullsub_3();
+ debug_ShowCurrentAnimAudioOptions();
gUnknown_Debug_030043A8 = 0;
debug_sub_80125A0();
if (gUnknown_Debug_2023A76[0][0x22] == 8)
@@ -1612,7 +1612,7 @@ void debug_sub_8010CAC(void)
gSaveBlock2.optionsBattleSceneOff = (r5 & 1);
gSaveBlock2.optionsSound = (r5 & 2) >> 1;
SetPokemonCryStereo(gSaveBlock2.optionsSound);
- debug_nullsub_3();
+ debug_ShowCurrentAnimAudioOptions();
}
}
if (gMain.newKeysRaw == START_BUTTON)
@@ -1690,7 +1690,7 @@ void debug_sub_8010CAC(void)
debug_sub_8011E5C();
debug_sub_8011E74();
debug_sub_8012540();
- debug_nullsub_3();
+ debug_ShowCurrentAnimAudioOptions();
debug_sub_80123D8(gUnknown_Debug_030043A4 * 5);
break;
case 32:
@@ -1698,7 +1698,7 @@ void debug_sub_8010CAC(void)
debug_sub_8011E5C();
debug_sub_8011E74();
debug_sub_8012540();
- debug_nullsub_3();
+ debug_ShowCurrentAnimAudioOptions();
debug_sub_80123D8(gUnknown_Debug_030043A4 * 5);
break;
case 33:
@@ -1751,7 +1751,7 @@ void debug_sub_8010CAC(void)
debug_sub_8011E5C();
debug_sub_8011E74();
debug_sub_8012540();
- debug_nullsub_3();
+ debug_ShowCurrentAnimAudioOptions();
debug_sub_80123D8(gUnknown_Debug_030043A4 * 5);
break;
case 32:
@@ -1759,7 +1759,7 @@ void debug_sub_8010CAC(void)
debug_sub_8011E5C();
debug_sub_8011E74();
debug_sub_8012540();
- debug_nullsub_3();
+ debug_ShowCurrentAnimAudioOptions();
debug_sub_80123D8(gUnknown_Debug_030043A4 * 5);
break;
case 33:
@@ -2214,7 +2214,12 @@ void debug_sub_8011EA0(u8 a)
case 15:
case 20:
case 25:
+// TODO: check other revisions
+#if (ENGLISH && REVISION == 0)
+ debug_sub_8010A7C(0, 8);
+#else
debug_sub_8010A7C(0, 20);
+#endif
Text_InitWindow(
&gUnknown_Debug_03004370,
gBattleTextBuff1,
@@ -2223,6 +2228,8 @@ void debug_sub_8011EA0(u8 a)
gUnknown_Debug_821F424[a][2]);
Text_PrintWindow8002F44(&gUnknown_Debug_03004370);
ConvertIntToDecimalStringN(gBattleTextBuff1, gUnknown_Debug_2023A76[gUnknown_Debug_03004360][a], 2, 3);
+// TODO: check other revisions
+#if !(ENGLISH && REVISION == 0)
Text_InitWindow(
&gUnknown_Debug_03004370,
gBattleTextBuff1,
@@ -2231,6 +2238,7 @@ void debug_sub_8011EA0(u8 a)
0);
Text_PrintWindow8002F44(&gUnknown_Debug_03004370);
gBattleTextBuff1[0] = EOS;
+#endif
StringAppend(gBattleTextBuff1, gSpeciesNames[gUnknown_Debug_2023A76[gUnknown_Debug_03004360][a]]);
Text_InitWindow(
&gUnknown_Debug_03004370,
@@ -2262,7 +2270,12 @@ void debug_sub_8011EA0(u8 a)
case 17:
case 22:
case 27:
+// TODO: check other revisions
+#if (ENGLISH && REVISION == 0)
+ debug_sub_8010A7C(0, 11);
+#else
debug_sub_8010A7C(0, 24);
+#endif
Text_InitWindow(
&gUnknown_Debug_03004370,
gBattleTextBuff1,
@@ -2271,6 +2284,8 @@ void debug_sub_8011EA0(u8 a)
gUnknown_Debug_821F424[a][2]);
Text_PrintWindow8002F44(&gUnknown_Debug_03004370);
ConvertIntToDecimalStringN(gBattleTextBuff1, gUnknown_Debug_2023A76[gUnknown_Debug_03004360][a], 2, 3);
+// TODO: check other revisions
+#if !(ENGLISH && REVISION == 0)
Text_InitWindow(
&gUnknown_Debug_03004370,
gBattleTextBuff1,
@@ -2279,6 +2294,7 @@ void debug_sub_8011EA0(u8 a)
0);
Text_PrintWindow8002F44(&gUnknown_Debug_03004370);
gBattleTextBuff1[0] = EOS;
+#endif
if (gUnknown_Debug_2023A76[gUnknown_Debug_03004360][a] != 0)
StringAppend(gBattleTextBuff1, ItemId_GetName(gUnknown_Debug_2023A76[gUnknown_Debug_03004360][a]));
else
@@ -2297,7 +2313,12 @@ void debug_sub_8011EA0(u8 a)
case 19:
case 24:
case 29:
+// TODO: check other revisions
+#if (ENGLISH && REVISION == 0)
+ debug_sub_8010A7C(0, 2);
+#else
debug_sub_8010A7C(0, 4);
+#endif
Text_InitWindow(
&gUnknown_Debug_03004370,
gBattleTextBuff1,
@@ -2370,7 +2391,12 @@ void debug_sub_8012294(void)
if (r5 < 30)
{
+// TODO: check other revisions
+#if (ENGLISH && REVISION == 0)
+ debug_sub_8010A7C(0, 10);
+#else
debug_sub_8010A7C(0, 24);
+#endif
Text_InitWindow(
&gUnknown_Debug_03004370,
gBattleTextBuff1,
@@ -2379,6 +2405,8 @@ void debug_sub_8012294(void)
gUnknown_Debug_821F564[gUnknown_Debug_030043A8][2]);
Text_PrintWindow8002F44(&gUnknown_Debug_03004370);
ConvertIntToDecimalStringN(gBattleTextBuff1, gUnknown_Debug_2023B02[gUnknown_Debug_03004360][r5 / 5][gUnknown_Debug_030043A8], 2, 3);
+// TODO: check other revisions
+#if !(ENGLISH && REVISION == 0)
Text_InitWindow(
&gUnknown_Debug_03004370,
gBattleTextBuff1,
@@ -2387,6 +2415,7 @@ void debug_sub_8012294(void)
0);
Text_PrintWindow8002F44(&gUnknown_Debug_03004370);
gBattleTextBuff1[0] = EOS;
+#endif
StringAppend(gBattleTextBuff1, gMoveNames[gUnknown_Debug_2023B02[gUnknown_Debug_03004360][r5 / 5][gUnknown_Debug_030043A8]]);
Text_InitWindow(
&gUnknown_Debug_03004370,
@@ -2404,7 +2433,12 @@ void debug_sub_80123D8(u8 a)
{
if (a < 30)
{
+// TODO: check other revisions
+#if (ENGLISH && REVISION == 0)
+ debug_sub_8010A7C(0, 7);
+#else
debug_sub_8010A7C(0, 18);
+#endif
Text_InitWindow(
&gUnknown_Debug_03004370,
gBattleTextBuff1,
@@ -2420,7 +2454,12 @@ void debug_sub_80123D8(u8 a)
gUnknown_Debug_821F58C[1],
gUnknown_Debug_821F58C[2]);
Text_PrintWindow8002F44(&gUnknown_Debug_03004370);
+// TODO: check other revisions
+#if (ENGLISH && REVISION == 0)
+ debug_sub_8010A7C(0, 7);
+#else
debug_sub_8010A7C(0, 18);
+#endif
Text_InitWindow(
&gUnknown_Debug_03004370,
gBattleTextBuff1,
@@ -2469,8 +2508,50 @@ void debug_sub_8012540(void)
Text_PrintWindow8002F44(&gUnknown_Debug_03004370);
}
-void debug_nullsub_3(void)
+// TODO: check other revisions
+#if (ENGLISH && REVISION == 0)
+extern const u8 Str_821F64D[];
+extern const u8 Str_821F652[];
+extern const u8 Str_821F655[];
+extern const u8 Str_821F65A[];
+#endif
+
+void debug_ShowCurrentAnimAudioOptions(void)
{
+// TODO: check other revisions
+#if (ENGLISH && REVISION == 0)
+ if (gSaveBlock2.optionsBattleSceneOff)
+ Text_InitWindow(
+ &gUnknown_Debug_03004370,
+ Str_821F652,
+ 418,
+ gUnknown_Debug_03004360 * 32 + 21,
+ 0);
+ else
+ Text_InitWindow(
+ &gUnknown_Debug_03004370,
+ Str_821F64D,
+ 418,
+ gUnknown_Debug_03004360 * 32 + 21,
+ 0);
+ Text_PrintWindow8002F44(&gUnknown_Debug_03004370);
+
+ if (gSaveBlock2.optionsSound)
+ Text_InitWindow(
+ &gUnknown_Debug_03004370,
+ Str_821F65A,
+ 422,
+ gUnknown_Debug_03004360 * 32 + 24,
+ 0);
+ else
+ Text_InitWindow(
+ &gUnknown_Debug_03004370,
+ Str_821F655,
+ 422,
+ gUnknown_Debug_03004360 * 32 + 24,
+ 0);
+ Text_PrintWindow8002F44(&gUnknown_Debug_03004370);
+#endif
}
extern const u32 gUnknown_Debug_821F680[][0x23];
diff --git a/src/berry_blender.c b/src/berry_blender.c
index a0300ed1f..a0d69f3e4 100644
--- a/src/berry_blender.c
+++ b/src/berry_blender.c
@@ -3272,7 +3272,7 @@ void debug_sub_80524BC(void)
}
// Partially fixes the clipping on longer names.
-#if DEBUG_TRANSLATE && DEBUG
+#if DEBUG_FIX
# define BLENDER_DEBUG_BERRY_LEN 12
#else
# define BLENDER_DEBUG_BERRY_LEN 6
diff --git a/src/data/graphics.c b/src/data/graphics.c
index 9cb0a83d6..0e98195cd 100644
--- a/src/data/graphics.c
+++ b/src/data/graphics.c
@@ -10,10 +10,10 @@ const u8 gMonBackPic_CircledQuestionMark[] = INCBIN_U8("graphics/pokemon/circled
const u16 gMonPalette_CircledQuestionMark[] = INCBIN_U16("graphics/pokemon/circled_question_mark/normal.gbapal.lz");
const u16 gMonShinyPalette_CircledQuestionMark[] = INCBIN_U16("graphics/pokemon/circled_question_mark/shiny.gbapal.lz");
-// The test menu debug battle tileset. This uses the old Crystal charmap and
-// rendering method (it uses tiles instead of text).
-// Oddly, the English version is in Japanese and the German version is in English.
-#if DEBUG_TRANSLATE || GERMAN
+// The test menu debug battle tileset. This uses the old Crystal
+// charmap and rendering method (it uses tiles instead of text).
+// The non-English releases use translated graphics.
+#if DEBUG_FIX || !ENGLISH
const u8 gDebugBattleCharmap_Gfx_lz[] = INCBIN_U8("graphics/debug/debug_battle_charmap_en.4bpp.lz");
const u8 gDebugBattleCharmap_Tilemap_lz[] = INCBIN_U8("graphics/debug/debug_battle_charmap_en.bin.lz");
const u8 gDebugBattleCharmap_Pal_lz[] = INCBIN_U8("graphics/debug/debug_battle_charmap_en.gbapal.lz");
diff --git a/src/debug/mori_debug_menu.c b/src/debug/mori_debug_menu.c
index dfa2487a5..7d6553e0e 100644
--- a/src/debug/mori_debug_menu.c
+++ b/src/debug/mori_debug_menu.c
@@ -42,10 +42,10 @@ const u8 Text_39B28B[] = _("10000 steps");
const u8 Text_39B297[] = _("MOVE TUTOR");
const u8 Text_39B2A2[] = _("Breed an egg");
const u8 Text_39B2AF[] = _("Long name");
-#ifdef GERMAN
-const u8 Text_39B2B9[] = _("Delete {POKEBLOCK}");
+#if (ENGLISH && REVISION == 0)
+const u8 Text_39B2B9[] = _("ポロックけす");
#else
-const u8 Text_39B2B9[] = DTR("ポロックけす", "Delete {POKEBLOCK}");
+const u8 Text_39B2B9[] = _("Delete {POKEBLOCK}");
#endif
const struct MenuAction gMoriDebugMenuActions[] =
diff --git a/src/debug/nakamura_debug_menu.c b/src/debug/nakamura_debug_menu.c
index a56fab2b7..e8f40f08e 100644
--- a/src/debug/nakamura_debug_menu.c
+++ b/src/debug/nakamura_debug_menu.c
@@ -100,7 +100,9 @@ static bool8 TopMenu_HandleJoypad(void)
if (gMain.newKeys & A_BUTTON)
{
MenuFunc func = sNakamuraTopMenuActions[Menu_GetCursorPos()].func;
+#if !(ENGLISH && REVISION == 0)
Menu_DestroyCursor();
+#endif
return func();
}
@@ -739,6 +741,17 @@ static bool8 GiveAllDecorations(void)
// FISHING POINTS (Feebas)
// =======================================================
+#if (ENGLISH && REVISION == 0)
+static const u8 Str_843E58D[] = _(
+ "つりばしょ R119\n"
+ " Y1\n"
+ " Y2\n"
+ " Y3\n"
+ "エンカウントばしょ\n"
+ "\n"
+ "\n"
+ "じぶんのまえ");
+#else
static const u8 Str_843E58D[] = _(
"Fishing location R119\n"
" Y1\n"
@@ -748,6 +761,7 @@ static const u8 Str_843E58D[] = _(
"\n"
"\n"
"front of you");
+#endif
static u16 FishingPoints_CountFishingTilesInMapThird(u8 a0)
{
@@ -974,7 +988,13 @@ static void NakaGenderTest_AdjustLevel(u8 i, s8 dirn)
if (sNakaGenderTestData[i].level < 1)
sNakaGenderTestData[i].level = 100;
SetMonData(gPlayerParty + i, MON_DATA_EXP, gExperienceTables[gBaseStats[sNakaGenderTestData[i].species].growthRate] + sNakaGenderTestData[i].level);
+// TODO: check other revisions
+#if (ENGLISH && REVISION == 0)
+ CalculateMonStats(gPlayerParty + i);
+#else
+ // Same function, but without the Shedninja specific code.
Nakamura_NakaGenderTest_RecalcStats(gPlayerParty + i);
+#endif
}
}
diff --git a/src/debug/nohara_debug_menu.c b/src/debug/nohara_debug_menu.c
index d26d6038c..e89cb144e 100644
--- a/src/debug/nohara_debug_menu.c
+++ b/src/debug/nohara_debug_menu.c
@@ -104,8 +104,13 @@ bool8 debug_sub_808F414(void)
}
}
+#if (ENGLISH && REVISION == 0)
+const u8 gUnknown_Debug_083C4980[] = _("ひみつがたを すぐみれるように ひだりキーで\n"
+ "データタイプを へんこうしますか? きりかえ");
+#else
const u8 gUnknown_Debug_083C4980[] = _("Want to change data type{CLEAR_TO 143}Press Left\n"
"to see secret type now?{CLEAR_TO 143}to switch");
+#endif
const u8 gUnknown_Debug_083C49CA[] = _("Choose the TV data you wish to\n"
"create to check a transmission。");
@@ -470,6 +475,11 @@ void debug_sub_808FA88(u8 a0, u8 a1)
u8 leadMonIndex = GetLeadMonIndex();
u8 channel;
+// This is garbage.
+#define GF_ACCESS(x) ((struct x*)(&(gSaveBlock1.tvShows[a0])))
+#define TERU_ACCESS(x) show->x
+#define DECLARE_TERU_POINTER TVShow * show = gSaveBlock1.tvShows + a0
+
gSaveBlock1.tvShows[a0].common.kind = a1;
gSaveBlock1.tvShows[a0].common.active = TRUE;
for (i = 0; i < 0x22; i++)
@@ -480,34 +490,135 @@ void debug_sub_808FA88(u8 a0, u8 a1)
{
case 2:
case 4:
- sub_80BE160(gSaveBlock1.tvShows + a0);
+ sub_80BE160(&gSaveBlock1.tvShows[a0]);
break;
case 3:
- sub_80BE138(gSaveBlock1.tvShows + a0);
+ sub_80BE138(&gSaveBlock1.tvShows[a0]);
break;
}
+#if (ENGLISH && REVISION == 0)
switch (a1)
{
case TVSHOW_FAN_CLUB_LETTER:
case TVSHOW_RECENT_HAPPENINGS:
{
- TVShow * show = gSaveBlock1.tvShows + a0;
+ GF_ACCESS(TVShowFanClubLetter)->species = SPECIES_BULBASAUR;
+ StringCopy(GF_ACCESS(TVShowFanClubLetter)->playerName, gSaveBlock2.playerName);
+ GF_ACCESS(TVShowFanClubLetter)->language = GAME_LANGUAGE;
+ break;
+ }
+ case TVSHOW_PKMN_FAN_CLUB_OPINIONS:
+ {
+ GF_ACCESS(TVShowFanclubOpinions)->var02 = 1;
+ StringCopy(GF_ACCESS(TVShowFanclubOpinions)->playerName, gSaveBlock2.playerName);
+ GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_NICKNAME, GF_ACCESS(TVShowFanclubOpinions)->var10);
+ GF_ACCESS(TVShowFanclubOpinions)->language = GAME_LANGUAGE;
+ GF_ACCESS(TVShowFanclubOpinions)->var0E = GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_LANGUAGE);
+ break;
+ }
+ case TVSHOW_UNKN_SHOWTYPE_04:
+ {
+ break;
+ }
+ case TVSHOW_NAME_RATER_SHOW:
+ {
+ GF_ACCESS(TVShowNameRaterShow)->species = GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_SPECIES);
+ GF_ACCESS(TVShowNameRaterShow)->var1C = 1;
+ StringCopy(GF_ACCESS(TVShowNameRaterShow)->trainerName, gSaveBlock2.playerName);
+ GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_NICKNAME, GF_ACCESS(TVShowNameRaterShow)->pokemonName);
+ GF_ACCESS(TVShowNameRaterShow)->language = GAME_LANGUAGE;
+ GF_ACCESS(TVShowNameRaterShow)->pokemonNameLanguage = GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_LANGUAGE);
+ break;
+ }
+ case TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE:
+ {
+ GF_ACCESS(TVShowBravoTrainerPokemonProfiles)->species = SPECIES_BULBASAUR;
+ StringCopy(GF_ACCESS(TVShowBravoTrainerPokemonProfiles)->playerName, gSaveBlock2.playerName);
+ GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_NICKNAME, GF_ACCESS(TVShowBravoTrainerPokemonProfiles)->pokemonNickname);
+ GF_ACCESS(TVShowBravoTrainerPokemonProfiles)->language = GAME_LANGUAGE;
+ GF_ACCESS(TVShowBravoTrainerPokemonProfiles)->var1f = GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_LANGUAGE);
+ break;
+ }
+ case TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE:
+ {
+ GF_ACCESS(TVShowBravoTrainerBattleTowerSpotlight)->species = SPECIES_BULBASAUR;
+ GF_ACCESS(TVShowBravoTrainerBattleTowerSpotlight)->defeatedSpecies = SPECIES_BULBASAUR;
+ StringCopy(GF_ACCESS(TVShowBravoTrainerBattleTowerSpotlight)->trainerName, gSaveBlock2.playerName);
+ StringCopy(GF_ACCESS(TVShowBravoTrainerBattleTowerSpotlight)->enemyTrainerName, gSaveBlock2.playerName);
+ GF_ACCESS(TVShowBravoTrainerBattleTowerSpotlight)->language = GAME_LANGUAGE;
+ break;
+ }
+ case TVSHOW_MASS_OUTBREAK:
+ {
+ GF_ACCESS(TVShowMassOutbreak)->species = SPECIES_BULBASAUR;
+ GF_ACCESS(TVShowMassOutbreak)->daysLeft = 1;
+ break;
+ }
+ case TVSHOW_POKEMON_TODAY_CAUGHT:
+ {
+ GF_ACCESS(TVShowPokemonToday)->species = SPECIES_BULBASAUR;
+ StringCopy(GF_ACCESS(TVShowPokemonToday)->playerName, gSaveBlock2.playerName);
+ GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_NICKNAME, GF_ACCESS(TVShowPokemonToday)->nickname);
+ GF_ACCESS(TVShowPokemonToday)->language = GAME_LANGUAGE;
+ GF_ACCESS(TVShowPokemonToday)->language2 = GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_LANGUAGE);
+ break;
+ }
+ case TVSHOW_SMART_SHOPPER:
+ {
+ StringCopy(GF_ACCESS(TVShowSmartShopper)->playerName, gSaveBlock2.playerName);
+ GF_ACCESS(TVShowSmartShopper)->language = GAME_LANGUAGE;
+ break;
+ }
+ case TVSHOW_POKEMON_TODAY_FAILED:
+ {
+ GF_ACCESS(TVShowPokemonTodayFailed)->species = SPECIES_BULBASAUR;
+ GF_ACCESS(TVShowPokemonTodayFailed)->species2 = SPECIES_BULBASAUR;
+ StringCopy(GF_ACCESS(TVShowPokemonTodayFailed)->playerName, gSaveBlock2.playerName);
+ GF_ACCESS(TVShowPokemonTodayFailed)->language = GAME_LANGUAGE;
+ break;
+ }
+ case TVSHOW_FISHING_ADVICE:
+ {
+ GF_ACCESS(TVShowPokemonAngler)->var04 = SPECIES_BULBASAUR;
+ StringCopy(GF_ACCESS(TVShowPokemonAngler)->playerName, gSaveBlock2.playerName);
+ GF_ACCESS(TVShowPokemonAngler)->language = GAME_LANGUAGE;
+ break;
+ }
+ case TVSHOW_WORLD_OF_MASTERS:
+ {
+ GF_ACCESS(TVShowWorldOfMasters)->var04 = SPECIES_BULBASAUR;
+ GF_ACCESS(TVShowWorldOfMasters)->var08 = SPECIES_BULBASAUR;
+ StringCopy(GF_ACCESS(TVShowWorldOfMasters)->playerName, gSaveBlock2.playerName);
+ GF_ACCESS(TVShowWorldOfMasters)->language = GAME_LANGUAGE;
+ break;
+ }
+ }
+#else
+// Murakawa must have really hated working with GF code. He devised his own, less complicated
+// access method after US rev0. Also, this iteration of the code has his self inserts: TERUKUN,
+// TERU, and TERUDA. Who all love Wigglytuff.
+ switch (a1)
+ {
+ case TVSHOW_FAN_CLUB_LETTER:
+ case TVSHOW_RECENT_HAPPENINGS:
+ {
+ DECLARE_TERU_POINTER;
- show->fanclubLetter.species = SPECIES_BULBASAUR;
- StringCopy(gSaveBlock1.tvShows[a0].fanclubLetter.playerName, gSaveBlock2.playerName);
- show->fanclubLetter.language = GAME_LANGUAGE;
+ GF_ACCESS(TVShowFanClubLetter)->species = SPECIES_BULBASAUR; // Yet he didn't change Game Freak's lines.
+ StringCopy(GF_ACCESS(TVShowFanClubLetter)->playerName, gSaveBlock2.playerName);
+ TERU_ACCESS(fanclubLetter).language = GAME_LANGUAGE;
break;
}
case TVSHOW_PKMN_FAN_CLUB_OPINIONS:
{
- TVShow * show = gSaveBlock1.tvShows + a0;
+ DECLARE_TERU_POINTER;
- show->fanclubOpinions.var02 = 1;
- StringCopy(gSaveBlock1.tvShows[a0].fanclubOpinions.playerName, gSaveBlock2.playerName);
- GetMonData(gPlayerParty + leadMonIndex, MON_DATA_NICKNAME, gSaveBlock1.tvShows[a0].fanclubOpinions.var10);
- show->fanclubOpinions.language = GAME_LANGUAGE;
- show->fanclubOpinions.var0E = GetMonData(gPlayerParty + leadMonIndex, MON_DATA_LANGUAGE);
+ GF_ACCESS(TVShowFanclubOpinions)->var02 = 1;
+ StringCopy(GF_ACCESS(TVShowFanclubOpinions)->playerName, gSaveBlock2.playerName);
+ GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_NICKNAME, GF_ACCESS(TVShowFanclubOpinions)->var10);
+ TERU_ACCESS(fanclubOpinions).language = GAME_LANGUAGE;
+ TERU_ACCESS(fanclubOpinions).var0E = GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_LANGUAGE);
break;
}
case TVSHOW_UNKN_SHOWTYPE_04:
@@ -516,120 +627,118 @@ void debug_sub_808FA88(u8 a0, u8 a1)
}
case TVSHOW_NAME_RATER_SHOW:
{
- u16 species = GetMonData(gPlayerParty + leadMonIndex, MON_DATA_SPECIES);
- TVShow * show = gSaveBlock1.tvShows + a0;
+ u16 species = GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_SPECIES);
+ DECLARE_TERU_POINTER;
- show->nameRaterShow.species = species;
- show->nameRaterShow.var1C = 1;
- StringCopy(gSaveBlock1.tvShows[a0].nameRaterShow.trainerName, gSaveBlock2.playerName);
- GetMonData(gPlayerParty + leadMonIndex, MON_DATA_NICKNAME, gSaveBlock1.tvShows[a0].nameRaterShow.pokemonName);
- show->nameRaterShow.language = GAME_LANGUAGE;
- show->nameRaterShow.pokemonNameLanguage = GetMonData(gPlayerParty + leadMonIndex, MON_DATA_LANGUAGE);
+ GF_ACCESS(TVShowNameRaterShow)->species = species;
+ GF_ACCESS(TVShowNameRaterShow)->var1C = 1;
+ StringCopy(GF_ACCESS(TVShowNameRaterShow)->trainerName, gSaveBlock2.playerName);
+ GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_NICKNAME, GF_ACCESS(TVShowNameRaterShow)->pokemonName);
+ TERU_ACCESS(nameRaterShow).language = GAME_LANGUAGE;
+ TERU_ACCESS(nameRaterShow).pokemonNameLanguage = GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_LANGUAGE);
break;
}
case TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE:
{
- TVShow * show = gSaveBlock1.tvShows + a0;
+ DECLARE_TERU_POINTER;
- show->bravoTrainer.species = SPECIES_BULBASAUR;
- StringCopy(gSaveBlock1.tvShows[a0].bravoTrainer.playerName, gSaveBlock2.playerName);
- GetMonData(gPlayerParty + leadMonIndex, MON_DATA_NICKNAME, gSaveBlock1.tvShows[a0].bravoTrainer.pokemonNickname);
- show->bravoTrainer.language = GAME_LANGUAGE;
- show->bravoTrainer.var1f = GetMonData(gPlayerParty + leadMonIndex, MON_DATA_LANGUAGE);
+ GF_ACCESS(TVShowBravoTrainerPokemonProfiles)->species = SPECIES_BULBASAUR;
+ StringCopy(GF_ACCESS(TVShowBravoTrainerPokemonProfiles)->playerName, gSaveBlock2.playerName);
+ GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_NICKNAME, GF_ACCESS(TVShowBravoTrainerPokemonProfiles)->pokemonNickname);
+ TERU_ACCESS(bravoTrainer).language = GAME_LANGUAGE;
+ TERU_ACCESS(bravoTrainer).var1f = GetMonData(&gPlayerParty[leadMonIndex], MON_DATA_LANGUAGE);
break;
}
case TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE:
{
- TVShow * show = gSaveBlock1.tvShows + a0;
+ DECLARE_TERU_POINTER;
- show->bravoTrainerTower.species = SPECIES_BULBASAUR;
- show->bravoTrainerTower.defeatedSpecies = SPECIES_BULBASAUR;
- StringCopy(gSaveBlock1.tvShows[a0].bravoTrainerTower.trainerName, gSaveBlock2.playerName);
- StringCopy(gSaveBlock1.tvShows[a0].bravoTrainerTower.enemyTrainerName, gSaveBlock2.playerName);
- show->bravoTrainerTower.language = GAME_LANGUAGE;
+ GF_ACCESS(TVShowBravoTrainerBattleTowerSpotlight)->species = SPECIES_BULBASAUR;
+ GF_ACCESS(TVShowBravoTrainerBattleTowerSpotlight)->defeatedSpecies = SPECIES_BULBASAUR;
+ StringCopy(GF_ACCESS(TVShowBravoTrainerBattleTowerSpotlight)->trainerName, gSaveBlock2.playerName);
+ StringCopy(GF_ACCESS(TVShowBravoTrainerBattleTowerSpotlight)->enemyTrainerName, gSaveBlock2.playerName);
+ TERU_ACCESS(bravoTrainerTower).language = GAME_LANGUAGE;
break;
}
case TVSHOW_MASS_OUTBREAK:
{
- TVShow * show = gSaveBlock1.tvShows + a0;
-
- show->massOutbreak.species = SPECIES_BULBASAUR;
- show->massOutbreak.daysLeft = 1;
+ GF_ACCESS(TVShowMassOutbreak)->species = SPECIES_BULBASAUR;
+ GF_ACCESS(TVShowMassOutbreak)->daysLeft = 1;
break;
}
case TVSHOW_POKEMON_TODAY_CAUGHT:
{
- TVShow * show = gSaveBlock1.tvShows + a0;
+ DECLARE_TERU_POINTER;
u8 gUnknown_Debug_083C4C64[] = _("TERUKUN");
u8 gUnknown_Debug_083C4C6C[] = _("TERUTERUDA");
- show->pokemonToday.var12 = 255;
- StringCopy(show->pokemonToday.playerName, gUnknown_Debug_083C4C64);
- StringCopy(show->pokemonToday.nickname, gUnknown_Debug_083C4C6C);
- show->pokemonToday.ball = ITEM_PREMIER_BALL;
- show->pokemonToday.species = SPECIES_WIGGLYTUFF;
- show->pokemonToday.language = GAME_LANGUAGE;
- show->pokemonToday.language2 = GAME_LANGUAGE;
+ TERU_ACCESS(pokemonToday).var12 = 255;
+ StringCopy(TERU_ACCESS(pokemonToday).playerName, gUnknown_Debug_083C4C64);
+ StringCopy(TERU_ACCESS(pokemonToday).nickname, gUnknown_Debug_083C4C6C);
+ TERU_ACCESS(pokemonToday).ball = ITEM_PREMIER_BALL;
+ TERU_ACCESS(pokemonToday).species = SPECIES_WIGGLYTUFF;
+ TERU_ACCESS(pokemonToday).language = GAME_LANGUAGE;
+ TERU_ACCESS(pokemonToday).language2 = GAME_LANGUAGE;
break;
}
case TVSHOW_SMART_SHOPPER:
{
- TVShow * show = gSaveBlock1.tvShows + a0;
+ DECLARE_TERU_POINTER;
u8 gUnknown_Debug_083C4C64[] = _("TERUKUN");
int ii;
for (ii = 0; ii < 3; ii++)
- show->smartshopperShow.itemAmounts[ii] = 254;
- show->smartshopperShow.priceReduced = TRUE;
- show->smartshopperShow.shopLocation = 40;
+ TERU_ACCESS(smartshopperShow).itemAmounts[ii] = 254;
+ TERU_ACCESS(smartshopperShow).priceReduced = TRUE;
+ TERU_ACCESS(smartshopperShow).shopLocation = 40;
for (ii = 0; ii < 3; ii++)
- show->smartshopperShow.itemIds[ii] = ITEM_ENERGY_POWDER;
- StringCopy(show->smartshopperShow.playerName, gUnknown_Debug_083C4C64);
- show->smartshopperShow.language = GAME_LANGUAGE;
+ TERU_ACCESS(smartshopperShow).itemIds[ii] = ITEM_ENERGY_POWDER;
+ StringCopy(TERU_ACCESS(smartshopperShow).playerName, gUnknown_Debug_083C4C64);
+ TERU_ACCESS(smartshopperShow).language = GAME_LANGUAGE;
break;
}
case TVSHOW_POKEMON_TODAY_FAILED:
{
- TVShow * show = gSaveBlock1.tvShows + a0;
+ DECLARE_TERU_POINTER;
u8 gUnknown_Debug_083C4C64[] = _("TERUKUN");
- show->pokemonTodayFailed.species = SPECIES_WIGGLYTUFF;
- show->pokemonTodayFailed.species2 = SPECIES_WIGGLYTUFF;
- show->pokemonTodayFailed.var12 = 3;
- show->pokemonTodayFailed.var10 = 0xff;
- show->pokemonTodayFailed.var11 = 1;
- StringCopy(show->pokemonTodayFailed.playerName, gUnknown_Debug_083C4C64);
- show->pokemonTodayFailed.language = GAME_LANGUAGE;
+ TERU_ACCESS(pokemonTodayFailed).species = SPECIES_WIGGLYTUFF;
+ TERU_ACCESS(pokemonTodayFailed).species2 = SPECIES_WIGGLYTUFF;
+ TERU_ACCESS(pokemonTodayFailed).var12 = 3;
+ TERU_ACCESS(pokemonTodayFailed).var10 = 0xff;
+ TERU_ACCESS(pokemonTodayFailed).var11 = 1;
+ StringCopy(TERU_ACCESS(pokemonTodayFailed).playerName, gUnknown_Debug_083C4C64);
+ TERU_ACCESS(pokemonTodayFailed).language = GAME_LANGUAGE;
break;
}
case TVSHOW_FISHING_ADVICE:
{
- TVShow * show = gSaveBlock1.tvShows + a0;
+ DECLARE_TERU_POINTER;
u8 gUnknown_Debug_083C4C64[] = _("TERUKUN");
- show->pokemonAngler.var02 = 0xff;
- show->pokemonAngler.var03 = 0;
- show->pokemonAngler.var04 = 40;
- StringCopy(show->pokemonAngler.playerName, gUnknown_Debug_083C4C64);
- show->pokemonAngler.language = GAME_LANGUAGE;
+ TERU_ACCESS(pokemonAngler).var02 = 0xff;
+ TERU_ACCESS(pokemonAngler).var03 = 0;
+ TERU_ACCESS(pokemonAngler).var04 = 40;
+ StringCopy(TERU_ACCESS(pokemonAngler).playerName, gUnknown_Debug_083C4C64);
+ TERU_ACCESS(pokemonAngler).language = GAME_LANGUAGE;
break;
}
case TVSHOW_WORLD_OF_MASTERS:
{
- TVShow * show = gSaveBlock1.tvShows + a0;
+ DECLARE_TERU_POINTER;
u8 gUnknown_Debug_083C4C64[] = _("TERUKUN");
- show->worldOfMasters.var02 = 0xffff;
- show->worldOfMasters.var06 = 0xffff;
- show->worldOfMasters.var04 = 40;
- show->worldOfMasters.var08 = 40;
- show->worldOfMasters.var0a = 3;
- StringCopy(show->worldOfMasters.playerName, gUnknown_Debug_083C4C64);
- show->worldOfMasters.language = GAME_LANGUAGE;
+ TERU_ACCESS(worldOfMasters).var02 = 0xffff;
+ TERU_ACCESS(worldOfMasters).var06 = 0xffff;
+ TERU_ACCESS(worldOfMasters).var04 = 40;
+ TERU_ACCESS(worldOfMasters).var08 = 40;
+ TERU_ACCESS(worldOfMasters).var0a = 3;
+ StringCopy(TERU_ACCESS(worldOfMasters).playerName, gUnknown_Debug_083C4C64);
+ TERU_ACCESS(worldOfMasters).language = GAME_LANGUAGE;
break;
}
-
}
+#endif
}
bool8 debug_sub_808FEBC(void)
diff --git a/src/debug/start_menu_debug.c b/src/debug/start_menu_debug.c
index 940f21ac7..ef83fc3f0 100644
--- a/src/debug/start_menu_debug.c
+++ b/src/debug/start_menu_debug.c
@@ -51,7 +51,8 @@ extern void Debug_SetUpFieldMove_Cut(void);
extern void Debug_SetUpFieldMove_SecretPower(void);
void debug_sub_8076BB4(u8);
-void debug_sub_8077CF4(u8 x, u8 y);
+void DebugMenu_DisplayBuildDate(u8 x, u8 y);
+void DebugMenu_DisplayContinuousDate(u8 x, u8 y);
u8 DebugMenu_807706C(void);
u8 DebugMenu_807709C(void);
void DebugMenu_807719C(void);
@@ -133,7 +134,9 @@ u8 DebugMenu_EndSequenceDemo(void);
u8 DebugMenu_RandomNumberTest(void);
u8 DebugMenu_MeTooBackupMan(void);
u8 DebugMenu_OpenMurakawa(void);
+#if !(ENGLISH && REVISION == 0)
u8 DebugMenu_OpenKiwa(void);
+#endif
u8 DebugMenu_8076CBC(void);
u8 DebugMenu_8076CC0(void);
u8 DebugMenu_8076CD4(void);
@@ -204,7 +207,9 @@ const u8 Str_839B972[] = _("End sequence demo");
const u8 Str_839B984[] = _("Random number test");
const u8 Str_839B997[] = _("Me-too BackupMan");
const u8 Str_839B9A8[] = _("MURAKAWA");
+#if !(ENGLISH && REVISION == 0)
const u8 Str_839B9B1[] = _("KINA(FONT)");
+#endif
const struct MenuAction gDebug0x839B9BC[] =
{
@@ -260,18 +265,34 @@ const struct MenuAction gDebug0x839B9BC[] =
{ Str_839B984, DebugMenu_RandomNumberTest },
{ Str_839B997, DebugMenu_MeTooBackupMan },
{ Str_839B9A8, DebugMenu_OpenMurakawa },
+#if !(ENGLISH && REVISION == 0)
{ Str_839B9B1, DebugMenu_OpenKiwa },
+#endif
};
+#if (ENGLISH && REVISION == 0)
+const u8 gUnknown_Debug_839BB64[] =
+{
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x00, 0x0b, 0x0c, 0x0d, 0x0e, 0x1f, 0x12, 0x13, 0x00, 0x08, 0x09, 0x0a, 0x1e, 0x10, 0x24, 0x0f, 0x00, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x00,
+ 0x1c, 0x1d, 0x14, 0x20, 0x21, 0x22, 0x23, 0x00, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x00, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x00, 0x11, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};
+#else
const u8 gUnknown_Debug_839BB64[] =
{
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x00, 0x0b, 0x0c, 0x0d, 0x0e, 0x1f, 0x12, 0x13, 0x00, 0x08, 0x09, 0x0a, 0x1e, 0x10, 0x24, 0x0f, 0x00, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x00,
0x1c, 0x1d, 0x14, 0x20, 0x21, 0x22, 0x23, 0x00, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x00, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x00, 0x11, 0x33, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00,
};
+#endif
-const u8 gUnknown_Debug_0839BBA4[] = _("Debugging Version");
-const u8 gUnknown_Debug_0839BBB6[] = _("{VERSION} Version");
-const u8 gUnknown_Debug_0839BBC1[] = _("Normal RTC compatible");
+#if ENGLISH
+const u8 gDebugCreatedString[] = _("Created");
+const u8 gDebugContinuousString[] = _("Continuous play\n"
+ "available from");
+#else
+const u8 gDebugRomString[] = _("Debugging Version");
+#endif
+const u8 gDebugVersionString[] = _("{VERSION} Version");
+const u8 gDebugRTCString[] = _("Normal RTC compatible");
const u8 gTestMenu_TestMenuHeaderText[] = DTR("か の じっけん", "TEST MENU"); // 科の実験 (Test section)
const u8 gTestMenu_Test2Text[] = DTR("じっけん2", "Test2");
@@ -345,6 +366,7 @@ extern const u8 Str_839BD4C[];
static u8 gUnknown_030006B8;
+#ifndef ENGLISH
struct DebugBuildDateInfo {
s32 max;
s32 digitMultiplier;
@@ -353,6 +375,7 @@ struct DebugBuildDateInfo {
};
static const struct DebugBuildDateInfo *gDebugBuildDate;
+#endif
static u8 gUnknown_030006C0;
static u8 gUnknown_030006C1;
static const u8 * gUnknown_030006C4;
@@ -382,10 +405,17 @@ void debug_sub_8076B4C(void)
// Initializes test menu
void debug_sub_8076B68(void)
{
- Menu_PrintText(gUnknown_Debug_0839BBB6, 1, 1);
- Menu_PrintText(gUnknown_Debug_0839BBC1, 1, 3);
- Menu_PrintText(gUnknown_Debug_0839BBA4, 1, 9);
- debug_sub_8077CF4(4, 11);
+ Menu_PrintText(gDebugVersionString, 1, 1);
+ Menu_PrintText(gDebugRTCString, 1, 3);
+#if ENGLISH
+ Menu_PrintText(gDebugCreatedString, 1, 7);
+ DebugMenu_DisplayBuildDate(3, 9);
+ Menu_PrintText(gDebugContinuousString, 1, 12);
+ DebugMenu_DisplayContinuousDate(3, 16);
+#else
+ Menu_PrintText(gDebugRomString, 1, 9);
+ DebugMenu_DisplayBuildDate(4, 11);
+#endif
debug_sub_8076AC8(0);
CreateTask(debug_sub_8076BB4, 1);
}
@@ -699,6 +729,9 @@ void DebugMenu_8077048(void)
u8 DebugMenu_807706C(void)
{
+#if (ENGLISH && REVISION == 0)
+ gUnknown_Debug_Murakawa2 = 1;
+#endif
InitMenuWindow(&gMenuTextWindowTemplate);
DebugMenu_8077004();
DebugMenu_807719C();
@@ -710,6 +743,8 @@ u8 DebugMenu_807706C(void)
u8 DebugMenu_807709C(void)
{
+ u8 actionRet;
+
if (gMain.newKeys & DPAD_UP)
{
PlaySE(SE_SELECT);
@@ -743,11 +778,21 @@ u8 DebugMenu_807709C(void)
if (gMain.newKeys & A_BUTTON)
{
PlaySE(SE_SELECT);
- return gDebug0x839B9BC[gUnknown_030006C4[gUnknown_030006C0]].func();
+ actionRet = gDebug0x839B9BC[gUnknown_030006C4[gUnknown_030006C0]].func();
+// TODO: see if this is in rev1+
+#if (ENGLISH && REVISION == 0)
+ if (actionRet == 1)
+ gUnknown_Debug_Murakawa2 = 0;
+#endif
+ return actionRet;
}
if (gMain.newKeys & (B_BUTTON | START_BUTTON))
{
CloseMenu();
+// TODO: see if this is in rev1+
+#if (ENGLISH && REVISION == 0)
+ gUnknown_Debug_Murakawa2 = 0;
+#endif
return TRUE;
}
return FALSE;
@@ -1389,15 +1434,47 @@ u8 DebugMenu_8077C14(void)
const u8 Str_839BFDC[] = DTR(" じかん ふん びょう", " HOURS MINUTES SECONDS");
+#if ENGLISH
+const u8 ContinousDateTime[] = "2002 08 01 20:25";
+#else
static const struct DebugBuildDateInfo gDebugBuildDateInfo[] = {
{ 99, 10, 2, 23 },
{ 99, 10, 2, 26 }
};
+#endif
// Parses the version code in a highly inefficient and unsafe way.
-void DebugMenu_ConvertBuildDate(const char *buildDateStr, u8 *out)
+void DebugMenu_ConvertBuildDate(const u8 *buildDateStr, u8 *out)
{
- int i;
+ s32 i;
+#if ENGLISH
+ u16 year;
+ u16 month;
+ u16 day;
+ u16 hour;
+ u16 minutes;
+
+ for (year = 0, i = 0; i < 2; i++)
+ {
+ year *= 10;
+ year += (buildDateStr[i+2] - '0');
+ }
+
+ month = (buildDateStr[5] - '0') * 10 + (buildDateStr[6] - '0');
+ day = (buildDateStr[8] - '0') * 10 + (buildDateStr[9] - '0');
+ hour = (buildDateStr[11] - '0') * 10 + (buildDateStr[12] - '0');
+ minutes = (buildDateStr[14] - '0') * 10 + (buildDateStr[15] - '0');
+
+ out = ConvertIntToDecimalStringN(out, year, STR_CONV_MODE_LEADING_ZEROS, 2);
+ *out++ = CHAR_SLASH;
+ out = ConvertIntToDecimalStringN(out, month, STR_CONV_MODE_LEADING_ZEROS, 2);
+ *out++ = CHAR_SLASH;
+ out = ConvertIntToDecimalStringN(out, day, STR_CONV_MODE_LEADING_ZEROS, 2);
+ *out++ = CHAR_SPACE;
+ out = ConvertIntToDecimalStringN(out, hour, STR_CONV_MODE_LEADING_ZEROS, 2);
+ *out++ = CHAR_COLON;
+ out = ConvertIntToDecimalStringN(out, minutes, STR_CONV_MODE_LEADING_ZEROS, 2);
+#else
// Prevents register allocation swap
// Intended: r7 = out, r6 = gDebugBuildDate->numDigits
// Observed: r6 = out, r7 = gDebugBuildDate->numDigits
@@ -1408,8 +1485,8 @@ void DebugMenu_ConvertBuildDate(const char *buildDateStr, u8 *out)
*out++ = CHAR_SPACE;
for (i = 0; i < 2; i++, gDebugBuildDate++)
{
- int j;
- int mul;
+ s32 j;
+ s32 mul;
u32 date = 0;
for (mul = gDebugBuildDate->digitMultiplier, j = 0; j < gDebugBuildDate->numDigits; j++, mul /= 10)
date += (buildDateStr[gDebugBuildDate->offset + j] - '0') * mul;
@@ -1421,14 +1498,23 @@ void DebugMenu_ConvertBuildDate(const char *buildDateStr, u8 *out)
if (out[0] > 0xf6) // prevent special characters
out[0] = 0xf6;
out[1] = EOS;
+#endif
}
-void debug_sub_8077CF4(u8 x, u8 y)
+void DebugMenu_DisplayBuildDate(u8 x, u8 y)
{
DebugMenu_ConvertBuildDate(BuildDateTime, gStringVar4);
Menu_PrintText(gStringVar4, x, y);
}
+#if ENGLISH
+void DebugMenu_DisplayContinuousDate(u8 x, u8 y)
+{
+ DebugMenu_ConvertBuildDate(ContinousDateTime, gStringVar4);
+ Menu_PrintText(gStringVar4, x, y);
+}
+#endif
+
void DebugMenu_8077D24(const struct MenuAction *menuAction, u8 width, u8 itemCount)
{
Menu_EraseScreen();
@@ -2591,14 +2677,22 @@ u8 DebugMenu_PTime(void)
return TRUE;
}
+#if (ENGLISH && REVISION == 0)
+const u8 gDebug0x839C60C[] = _("switch DISP mode");
+#else
const u8 gDebug0x839C60C[] = _("Set FLASH ERR");
+#endif
void DebugMenu_8079058(u8 taskId)
{
switch (gTasks[taskId].data[0])
{
case 0:
+#if (ENGLISH && REVISION == 0)
+ gUnknown_Debug_Murakawa2 = 1;
+#else
gUnknown_Debug_03004BD0 = 0;
+#endif
Menu_DisplayDialogueFrame();
gTasks[taskId].data[0]++;
break;
@@ -2619,6 +2713,9 @@ void DebugMenu_8079058(u8 taskId)
gUnknown_Debug_03004BD0 = 0;
break;
}
+#if (ENGLISH && REVISION == 0)
+ gUnknown_Debug_Murakawa2 = 0;
+#endif
Menu_EraseScreen();
ScriptContext2_Disable();
DestroyTask(taskId);
@@ -2634,13 +2731,17 @@ u8 DebugMenu_OpenMurakawa(void)
return TRUE;
}
-const u8 Str_839C61A[] = _("abcde; abcde: ABCDE; ABCDE:\p"
- "Tableaux des verbes du 2{SUPER_E} groupe.\p"
- "La1{SUPER_RE} chose à apprendre c'est de lire.\p"
- "Tableaux des verbes du 1{SUPER_ER} groupe.\p"
- "“あいうえおかきくけコさしすせそたちつてとな”\n"
- "<にぬネのはひふへほマみむめもやゆよらりるれろわャッ>\p"
- "をんゃゅょアイウエオカキクケサシスルレロワ,");
+#if !(ENGLISH && REVISION == 0)
+const u8 Str_839C61A[] = _(
+#if GERMAN
+ "abcde; abcde: ABCDE; ABCDE:\p"
+#endif
+ "Tableaux des verbes du 2{SUPER_E} groupe.\p"
+ "La1{SUPER_RE} chose à apprendre c'est de lire.\p"
+ "Tableaux des verbes du 1{SUPER_ER} groupe.\p"
+ "“あいうえおかきくけコさしすせそたちつてとな”\n"
+ "<にぬネのはひふへほマみむめもやゆよらりるれろわャッ>\p"
+ "をんゃゅょアイウエオカキクケサシスルレロワ,");
void DebugMenu_8079110(u8 taskId)
{
@@ -2672,5 +2773,6 @@ u8 DebugMenu_OpenKiwa(void)
ScriptContext2_Enable();
// return TRUE;
}
+#endif
#endif
diff --git a/src/debug/tomomichi_debug_menu.c b/src/debug/tomomichi_debug_menu.c
index c9804c638..d9f5a3f5b 100644
--- a/src/debug/tomomichi_debug_menu.c
+++ b/src/debug/tomomichi_debug_menu.c
@@ -245,12 +245,21 @@ static const struct MenuAction sMenuActions_TopMenu[] = {
{sString_ControlWORK, ControlWorks},
};
+#if (ENGLISH && REVISION == 0)
+static const u8 sString_ContestMenuTitle[] = _("コンテスト");
+
+static const u8 sString_Contest_PokemonNo[] = _("ポケモンナンバー");
+static const u8 sString_Contest_Personality[] = _("こせいらんすう");
+static const u8 sString_Contest_Type[] = _("コンテストしゅるい");
+static const u8 sString_Contest_PokeArt[] = _("ひょうじ");
+#else
static const u8 sString_ContestMenuTitle[] = _("Contest");
static const u8 sString_Contest_PokemonNo[] = _("Pokémon No.");
static const u8 sString_Contest_Personality[] = _("ID rnd. digit");
static const u8 sString_Contest_Type[] = _("Contest Type");
static const u8 sString_Contest_PokeArt[] = _("Poké Art");
+#endif
static const struct MenuAction sMenuActions_ContestPicTest[] = {
{sString_Contest_PokemonNo, DummyMenuAction},
@@ -259,12 +268,21 @@ static const struct MenuAction sMenuActions_ContestPicTest[] = {
{sString_Contest_PokeArt, ContestGraphics_Show}
};
+#if (ENGLISH && REVISION == 0)
+static const u8 sString_Contest_ArtMuseumTitle[] = _("びじゅつかん");
+
+static const u8 sString_Contest_ArtMuseum_PokemonNo[] = _("ポケモンナンバー");
+static const u8 sString_Contest_ArtMuseum_Personality[] = _("こせいらんすう");
+static const u8 sString_Contest_ArtMuseum_Type[] = _("タイトルしゅるい");
+static const u8 sString_Contest_ArtMuseum_PokeArt[] = _("ひょうじ");
+#else
static const u8 sString_Contest_ArtMuseumTitle[] = _("Art Mus.");
static const u8 sString_Contest_ArtMuseum_PokemonNo[] = _("Pokémon No.");
static const u8 sString_Contest_ArtMuseum_Personality[] = _("ID rnd. digit");
static const u8 sString_Contest_ArtMuseum_Type[] = _("Title Type");
static const u8 sString_Contest_ArtMuseum_PokeArt[] = _("Poké Art");
+#endif
static const struct MenuAction sMenuActions_ArtMuseumPicTest[] = {
{sString_Contest_ArtMuseum_PokemonNo, DummyMenuAction},
@@ -273,12 +291,21 @@ static const struct MenuAction sMenuActions_ArtMuseumPicTest[] = {
{sString_Contest_ArtMuseum_PokeArt, MuseumGraphics_Show}
};
+#if (ENGLISH && REVISION == 0)
+static const u8 sString_Contest_PreviewTitle[] = _("プレビュー");
+
+static const u8 sString_Contest_Preview_PokemonNo[] = _("ポケモンナンバー");
+static const u8 sString_Contest_Preview_Personality[] = _("こせいらんすう");
+static const u8 sString_Contest_Preview_Type[] = _("しゅるい");
+static const u8 sString_Contest_Preview_PokeArt[] = _("ひょうじ");
+#else
static const u8 sString_Contest_PreviewTitle[] = _("Preview");
static const u8 sString_Contest_Preview_PokemonNo[] = _("Pokémon No.");
static const u8 sString_Contest_Preview_Personality[] = _("ID rnd. digit");
static const u8 sString_Contest_Preview_Type[] = _("Type");
static const u8 sString_Contest_Preview_PokeArt[] = _("Poké Art");
+#endif
static const struct MenuAction sMenuActions_PreviewPicTest[] = {
{sString_Contest_Preview_PokemonNo, DummyMenuAction},
@@ -287,10 +314,19 @@ static const struct MenuAction sMenuActions_PreviewPicTest[] = {
{sString_Contest_Preview_PokeArt, PreviewGraphics_Show}
};
+#if (ENGLISH && REVISION == 0)
+static const u8 sString_TrickRelated[] = _("カラクリかんれん");
+#else
static const u8 sString_TrickRelated[] = _("Trick related");
+#endif
static const u8 sString_TrickRelated_Level[] = _("Level");
+
+#if (ENGLISH && REVISION == 0)
+static const u8 sString_TrickRelated_TrickMaster[] = _("MASTER");
+#else
static const u8 sString_TrickRelated_TrickMaster[] = _("Trick Master");
+#endif
static const struct MenuAction sMenuActions_TrickRelated[] = {
{sString_TrickRelated_Level, TrickRelated_Level_InitSubmenu},
@@ -1841,6 +1877,17 @@ static const u16 gUnknown_Debug_083C478E[][9] = {
{VAR_TEMP_9, VAR_TEMP_A, VAR_TEMP_B, VAR_TEMP_C, VAR_TEMP_D, VAR_TEMP_E, VAR_TEMP_F}
};
+#if (ENGLISH && REVISION == 0)
+static const u8 gUnknown_Debug_083C47B2[] = _("レベル");
+static const u8 gUnknown_Debug_083C47B8[] = _("シーン1");
+static const u8 gUnknown_Debug_083C47BF[] = _("シーン2");
+static const u8 gUnknown_Debug_083C47C6[] = _("シーン3");
+static const u8 gUnknown_Debug_083C47CD[] = _("シーン4");
+static const u8 gUnknown_Debug_083C47D4[] = _("シーン5");
+static const u8 gUnknown_Debug_083C47DB[] = _("シーン6");
+static const u8 gUnknown_Debug_083C47E2[] = _("シーン7");
+static const u8 gUnknown_Debug_083C47E9[] = _("シーン8");
+#else
static const u8 gUnknown_Debug_083C47B2[] = _("Level");
static const u8 gUnknown_Debug_083C47B8[] = _("Scene1");
static const u8 gUnknown_Debug_083C47BF[] = _("Scene2");
@@ -1850,6 +1897,7 @@ static const u8 gUnknown_Debug_083C47D4[] = _("Scene5");
static const u8 gUnknown_Debug_083C47DB[] = _("Scene6");
static const u8 gUnknown_Debug_083C47E2[] = _("Scene7");
static const u8 gUnknown_Debug_083C47E9[] = _("Scene8");
+#endif
static const struct MenuAction gUnknown_Debug_083C47F0[] = {
{gUnknown_Debug_083C47B8, DummyMenuAction},
@@ -1862,7 +1910,11 @@ static const struct MenuAction gUnknown_Debug_083C47F0[] = {
{gUnknown_Debug_083C47E9, DummyMenuAction}
};
+#if (ENGLISH && REVISION == 0)
+static const u8 gUnknown_Debug_083C4830[] = _("カラクリだいおう");
+#else
static const u8 gUnknown_Debug_083C4830[] = _("Trick Master");
+#endif
static const u8 gUnknown_Debug_083C483D[] = _("Hidden MASTER");
static const u8 gUnknown_Debug_083C484B[] = _("Inside the HOUSE");
@@ -1878,8 +1930,13 @@ static const struct MenuAction gUnknown_Debug_083C4888[] = {
{gUnknown_Debug_083C4876, DummyMenuAction}
};
+#if (ENGLISH && REVISION == 0)
+static const u8 sDummyNickname[] = _("ポケモンめい");
+static const u8 sDummyTrainerName[] = _("ブリーダーめい");
+#else
static const u8 sDummyNickname[] = _("PMNICKNAME");
static const u8 sDummyTrainerName[] = _("BREEDER");
+#endif
bool8 InitTomomichiDebugWindow(void)
{
diff --git a/src/debug/watanabe_debug_menu.c b/src/debug/watanabe_debug_menu.c
index c055781fb..205d4d5e3 100644
--- a/src/debug/watanabe_debug_menu.c
+++ b/src/debug/watanabe_debug_menu.c
@@ -1812,6 +1812,15 @@ const struct WatanabeDebugMenuItem gUnknown_Debug_083F8698[] = {
{gUnknown_Debug_083F868F, {.type3 = 0x6}}
};
+#if (ENGLISH && REVISION == 0)
+const u8 gUnknown_Debug_083F86C8[] = _("ふつう");
+const u8 gUnknown_Debug_083F86CC[] = _("ねむり");
+const u8 gUnknown_Debug_083F86D0[] = _("どく");
+const u8 gUnknown_Debug_083F86D4[] = _("やけど");
+const u8 gUnknown_Debug_083F86D8[] = _("こおり");
+const u8 gUnknown_Debug_083F86DC[] = _("まひ");
+const u8 gUnknown_Debug_083F86E0[] = _("どくどく");
+#else
const u8 gUnknown_Debug_083F86C8[] = _("ーーー");
const u8 gUnknown_Debug_083F86CC[] = _("SLP");
const u8 gUnknown_Debug_083F86D0[] = _("PSN");
@@ -1819,6 +1828,7 @@ const u8 gUnknown_Debug_083F86D4[] = _("BRN");
const u8 gUnknown_Debug_083F86D8[] = _("FRZ");
const u8 gUnknown_Debug_083F86DC[] = _("PAR");
const u8 gUnknown_Debug_083F86E0[] = _("PSN2");
+#endif
const struct WatanabeDebugMenuItem gUnknown_Debug_083F86E8[] = {
{gUnknown_Debug_083F86C8, {.type3 = 0x0}},
@@ -1830,8 +1840,13 @@ const struct WatanabeDebugMenuItem gUnknown_Debug_083F86E8[] = {
{gUnknown_Debug_083F86E0, {.type3 = 0x80}}
};
+#if (ENGLISH && REVISION == 0)
+const u8 gUnknown_Debug_083F8720[] = _("ポケモンを てもちに くわえました");
+const u8 gUnknown_Debug_083F872A[] = _("ポケモンを ボックスに くわえました");
+#else
const u8 gUnknown_Debug_083F8720[] = _("PKMN{RIGHT_ARROW}LIST");
const u8 gUnknown_Debug_083F872A[] = _("PKMN{RIGHT_ARROW}BOX");
+#endif
void InitCreatePokemon(void)
{
u8 sp04[] = _("Create POKéMON LR:Shift START:Add");
@@ -2196,7 +2211,11 @@ void debug_80C5FFC(void)
{
u32 ivs;
u8 sp10[] = DTR("たまご", "EGG");
+#if (ENGLISH && REVISION == 0)
+ u8 sp14[] = _("デバッグポケ1");
+#else
u8 sp14[] = _("DebugーG");
+#endif
u8 one;
u16 ff;
diff --git a/src/main.c b/src/main.c
index b778631f3..a4335425d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -34,12 +34,11 @@ const u8 gGameVersion = GAME_VERSION;
const u8 gGameLanguage = GAME_LANGUAGE;
-// The debug menu expects this exact format. With the English build string, it
-// will overflow on the title debug menu, outputting '9999ィ'.
-#if defined(GERMAN) || DEBUG
-const char BuildDateTime[] = "$Name: debug-Euro-2003-05-09-A $";
-#elif defined(ENGLISH)
-const char BuildDateTime[] = "2002 10 15 20:34";
+// International versions of the debug menu use a different format.
+#if defined(ENGLISH)
+const u8 BuildDateTime[] = "2002 10 15 20:34";
+#elif defined(GERMAN)
+const u8 BuildDateTime[] = "$Name: debug-Euro-2003-05-09-A $";
#endif
const IntrFunc gIntrTableTemplate[] =
diff --git a/src/pokemon_1.c b/src/pokemon_1.c
index 1883c8754..aeeb6080d 100644
--- a/src/pokemon_1.c
+++ b/src/pokemon_1.c
@@ -1764,6 +1764,8 @@ void CalculateMonStats(struct Pokemon *mon)
}
#if DEBUG
+// TODO: check other revisions
+#if !(ENGLISH && REVISION == 0)
void Nakamura_NakaGenderTest_RecalcStats(struct Pokemon *mon)
{
s32 currentHP = GetMonData(mon, MON_DATA_HP, NULL);
@@ -1809,6 +1811,7 @@ void Nakamura_NakaGenderTest_RecalcStats(struct Pokemon *mon)
SetMonData(mon, MON_DATA_HP, &currentHP);
}
#endif
+#endif
void ExpandBoxMon(const struct BoxPokemon *src, struct Pokemon *dest)
{
diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c
index 64ae716d3..a6e007618 100644
--- a/src/pokemon_summary_screen.c
+++ b/src/pokemon_summary_screen.c
@@ -4183,7 +4183,6 @@ u8 GetMonStatusAndPokerus(struct Pokemon *mon)
return statusAilment;
}
-#ifdef NONMATCHING
void sub_80A1D18(void)
{
struct Pokemon mon;
@@ -4196,9 +4195,6 @@ void sub_80A1D18(void)
if (statusAndPkrs)
{
statusAndPkrs2 = statusAndPkrs - 1;
-
- if (ewram1A000[29] == 0xFF)
- ewram1A000[29] = CreateSprite(&sSpriteTemplate_StatusCondition, 64, 152, 0);
}
else
{
@@ -4206,65 +4202,10 @@ void sub_80A1D18(void)
return;
}
+ if (ewram1A000[29] == 0xFF)
+ ewram1A000[29] = CreateSprite(&sSpriteTemplate_StatusCondition, 64, 152, 0);
StartSpriteAnim(&gSprites[ewram1A000[29]], statusAndPkrs2);
}
-#else
-NAKED
-void sub_80A1D18(void)
-{
- asm(".syntax unified\n\
- push {r4,r5,lr}\n\
- sub sp, 0x64\n\
- mov r0, sp\n\
- bl SummaryScreen_GetPokemon\n\
- mov r0, sp\n\
- bl GetMonStatusAndPokerus\n\
- lsls r0, 24\n\
- lsrs r0, 24\n\
- cmp r0, 0\n\
- beq _080A1D58\n\
- subs r0, 0x1\n\
- lsls r0, 24\n\
- lsrs r5, r0, 24\n\
- ldr r4, _080A1D50 @ =gSharedMem + 0x1A01D\n\
- ldrb r0, [r4]\n\
- cmp r0, 0xFF\n\
- bne _080A1D60\n\
- ldr r0, _080A1D54 @ =sSpriteTemplate_StatusCondition\n\
- movs r1, 0x40\n\
- movs r2, 0x98\n\
- movs r3, 0\n\
- bl CreateSprite\n\
- strb r0, [r4]\n\
- b _080A1D60\n\
- .align 2, 0\n\
-_080A1D50: .4byte gSharedMem + 0x1A01D\n\
-_080A1D54: .4byte sSpriteTemplate_StatusCondition\n\
-_080A1D58:\n\
- movs r0, 0x1D\n\
- bl sub_80A18E4\n\
- b _080A1D74\n\
-_080A1D60:\n\
- ldr r0, _080A1D7C @ =gSharedMem + 0x1A01D\n\
- ldrb r1, [r0]\n\
- lsls r0, r1, 4\n\
- adds r0, r1\n\
- lsls r0, 2\n\
- ldr r1, _080A1D80 @ =gSprites\n\
- adds r0, r1\n\
- adds r1, r5, 0\n\
- bl StartSpriteAnim\n\
-_080A1D74:\n\
- add sp, 0x64\n\
- pop {r4,r5}\n\
- pop {r0}\n\
- bx r0\n\
- .align 2, 0\n\
-_080A1D7C: .4byte gSharedMem + 0x1A01D\n\
-_080A1D80: .4byte gSprites\n\
- .syntax divided\n");
-}
-#endif // NONMATCHING
static void sub_80A1D84(struct Pokemon *mon)
{
diff --git a/src/roulette.c b/src/roulette.c
index c4f6067a1..40acd41c8 100644
--- a/src/roulette.c
+++ b/src/roulette.c
@@ -1661,16 +1661,31 @@ void Task_Roulette_0(u8 taskid)
#if DEBUG
+#if (ENGLISH && REVISION == 0)
+ static const u8 gUnknown_Debug_0842510D[] = _("コインの かず STARTで きめて\nAーp1 Bーm1 R:Lー×10");
+#else
+ static const u8 gUnknown_Debug_0842510D[] = _("Set COIN and Press START\nAーp1 Bーm1 R:Lー×10");
+#endif
+
void debug_sub_812CDE4(u8 taskId)
{
+#if (ENGLISH && REVISION == 0)
+ u8 coinText[] = {0xFD, 0x02, 0xFF};
+#endif
+
if (gMain.newKeys & A_BUTTON)
{
gTasks[taskId].data[13]++;
if (gTasks[taskId].data[13] == 10000)
gTasks[taskId].data[13] = 0;
ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[13], 1, 4);
+#if (ENGLISH && REVISION == 0)
+ StringExpandPlaceholders(gStringVar4, coinText);
+ Menu_PrintText(gStringVar4, 2, 1);
+#else
StringExpandPlaceholders(gStringVar4, gOtherText_Coins);
MenuPrint_RightAligned(gStringVar4, 9, 1);
+#endif
}
else if (gMain.newKeys & B_BUTTON)
{
@@ -1678,8 +1693,13 @@ void debug_sub_812CDE4(u8 taskId)
if (gTasks[taskId].data[13] == -1)
gTasks[taskId].data[13] = 9999;
ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[13], 1, 4);
+#if (ENGLISH && REVISION == 0)
+ StringExpandPlaceholders(gStringVar4, coinText);
+ Menu_PrintText(gStringVar4, 2, 1);
+#else
StringExpandPlaceholders(gStringVar4, gOtherText_Coins);
MenuPrint_RightAligned(gStringVar4, 9, 1);
+#endif
}
else if (gMain.newKeys & R_BUTTON)
{
@@ -1687,8 +1707,13 @@ void debug_sub_812CDE4(u8 taskId)
if (gTasks[taskId].data[13] > 9999)
gTasks[taskId].data[13] -= 9999;
ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[13], 1, 4);
+#if (ENGLISH && REVISION == 0)
+ StringExpandPlaceholders(gStringVar4, coinText);
+ Menu_PrintText(gStringVar4, 2, 1);
+#else
StringExpandPlaceholders(gStringVar4, gOtherText_Coins);
MenuPrint_RightAligned(gStringVar4, 9, 1);
+#endif
}
else if (gMain.newKeys & L_BUTTON)
{
@@ -1696,16 +1721,26 @@ void debug_sub_812CDE4(u8 taskId)
if (gTasks[taskId].data[13] < 0)
gTasks[taskId].data[13] += 9999;
ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[13], 1, 4);
+#if (ENGLISH && REVISION == 0)
+ StringExpandPlaceholders(gStringVar4, coinText);
+ Menu_PrintText(gStringVar4, 2, 1);
+#else
StringExpandPlaceholders(gStringVar4, gOtherText_Coins);
MenuPrint_RightAligned(gStringVar4, 9, 1);
+#endif
}
else if (gMain.newKeys & START_BUTTON)
{
gSaveBlock1.coins = gTasks[taskId].data[13];
gTasks[taskId].func = Task_Roulette_0;
ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[13], 1, 4);
+#if (ENGLISH && REVISION == 0)
+ StringExpandPlaceholders(gStringVar4, coinText);
+ Menu_PrintText(gStringVar4, 2, 1);
+#else
StringExpandPlaceholders(gStringVar4, gOtherText_Coins);
MenuPrint_RightAligned(gStringVar4, 9, 1);
+#endif
unk_2039560 = 0;
}
else if (gMain.newKeys & SELECT_BUTTON)
@@ -1713,22 +1748,30 @@ void debug_sub_812CDE4(u8 taskId)
gSaveBlock1.coins = gTasks[taskId].data[13];
gTasks[taskId].func = Task_Roulette_0;
ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[13], 1, 4);
+#if (ENGLISH && REVISION == 0)
+ StringExpandPlaceholders(gStringVar4, coinText);
+ Menu_PrintText(gStringVar4, 2, 1);
+#else
StringExpandPlaceholders(gStringVar4, gOtherText_Coins);
MenuPrint_RightAligned(gStringVar4, 9, 1);
+#endif
unk_2039560 = 1;
}
}
void debug_sub_812CFE8(u8 taskId)
{
- static const u8 gUnknown_Debug_0842510D[] = _("Set COIN and Press START\nAーp1 Bーm1 R:Lー×10");
gTasks[taskId].data[13] = gSaveBlock1.coins;
if (Random() & 1)
gSpecialVar_0x8004 |= 128;
ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[13], 1, 4);
StringExpandPlaceholders(gStringVar4, gOtherText_Coins);
Menu_DrawStdWindowFrame(0, 0, 9, 3);
+#if (ENGLISH && REVISION == 0)
+ Menu_PrintText(gStringVar4, 2, 1);
+#else
MenuPrint_RightAligned(gStringVar4, 9, 1);
+#endif
Menu_DrawStdWindowFrame(0, 14, 29, 19);
Menu_PrintText(gUnknown_Debug_0842510D, 1, 15);
gTasks[taskId].func = debug_sub_812CDE4;
diff --git a/src/save.c b/src/save.c
index 3eeea88de..3b6cabe6a 100644
--- a/src/save.c
+++ b/src/save.c
@@ -738,7 +738,7 @@ u8 Save_WriteDataInternal(u8 saveType)
return 0;
}
-#if DEBUG
+#if (DEBUG && GERMAN)
extern u32 gUnknown_Debug_03004BD0;
#endif
@@ -749,7 +749,7 @@ u8 Save_WriteData(u8 saveType) // TrySave
Save_WriteDataInternal(saveType);
if (!gDamagedSaveSectors
-#if DEBUG
+#if (DEBUG && GERMAN)
&& gUnknown_Debug_03004BD0 == 0
#endif
)
diff --git a/src/save_failed_screen.c b/src/save_failed_screen.c
index f5544bc65..9ef5f541c 100644
--- a/src/save_failed_screen.c
+++ b/src/save_failed_screen.c
@@ -155,7 +155,7 @@ static void CB2_WipeSave(void)
gSaveFailedClockInfo[0] = TRUE;
-#if DEBUG
+#if (DEBUG && !(ENGLISH && REVISION == 0))
if (gUnknown_Debug_03004BD0 != 0)
gDamagedSaveSectors = 1;
#endif
@@ -277,7 +277,7 @@ static bool8 IsSectorNonEmpty(u16 sector)
ReadFlash(sector, 0, ptr, 4096);
-#if DEBUG // Don't verify the sector wipe?
+#if (DEBUG && !(ENGLISH && REVISION == 0)) // Don't verify the sector wipe?
for (i = 0; i < 0x400; i++, ptr++)
;
return gUnknown_Debug_03004BD0;
diff --git a/src/slot_machine.c b/src/slot_machine.c
index c03ae0dfa..c6cbdb1c8 100644
--- a/src/slot_machine.c
+++ b/src/slot_machine.c
@@ -5677,7 +5677,7 @@ void debug_sub_811B310(void)
PRINT_NUMBER(eSlotMachine->unk6C, 10, 5);
PRINT_NUMBER(eSlotMachine->unk10, 10, 7);
-#if DEBUG_TRANSLATE
+#if DEBUG_FIX
#define OFFSET 24 // wider window
#else
#define OFFSET 20
@@ -5785,7 +5785,7 @@ static void debug_sub_811B654(u8 taskId)
switch (task->data[0])
{
case 0:
-#if DEBUG_TRANSLATE
+#if DEBUG_FIX
Menu_DrawStdWindowFrame(0, 0, 28, 19); // wider window
#else
Menu_DrawStdWindowFrame(0, 0, 24, 19);
diff --git a/src/text.c b/src/text.c
index dbf74ab61..d963045df 100644
--- a/src/text.c
+++ b/src/text.c
@@ -6,6 +6,7 @@
#include "constants/songs.h"
#include "sound.h"
#include "string_util.h"
+#include "start_menu.h"
enum
{
@@ -2078,7 +2079,7 @@ static u8 sub_8002FA0(struct Window *win, const u8 *text)
static u8 PrintNextChar(struct Window *win)
{
- u8 c = win->text[win->textIndex++];
+ u32 c = win->text[win->textIndex++];
// Handle special control characters
switch (c)
@@ -2106,6 +2107,12 @@ static u8 PrintNextChar(struct Window *win)
return HandleExtCtrlCode(win);
}
+// TODO: see if this is in rev1+
+#if (DEBUG && ENGLISH && REVISION == 0)
+ // Code related to the Murakawa task.
+ if ((gUnknown_Debug_03004BD0) && (!gUnknown_Debug_Murakawa2))
+ c = win->textMode + CHAR_0;
+#endif
sPrintGlyphFuncs[win->textMode](win, c);
return 1;
}
diff --git a/sym_common.txt b/sym_common.txt
index fe75d4d0e..6ccc79be0 100644
--- a/sym_common.txt
+++ b/sym_common.txt
@@ -6,12 +6,12 @@
// main.c
-#if DEBUG
-/*. += 0x18;*/
+#if (DEBUG && ENGLISH && REVISION == 0)
+. += 0x8;
#endif
SYMBOL(gKeyRepeatStartDelay, 4)
SYMBOL(gLinkTransferringData, 4)
-#if DEBUG
+#if (DEBUG && !(ENGLISH && REVISION == 0))
. += 0x8;
#endif
SYMBOL(gMain, 1088)
@@ -197,6 +197,10 @@ SYMBOL(gMenuCallback, 4)
#if DEBUG
SYMBOL(gUnknown_Debug_03004BD0, 4)
+// TODO: see if this is in rev1+
+#if (ENGLISH && REVISION == 0)
+SYMBOL(gUnknown_Debug_Murakawa2, 4)
+#endif
#endif
// sound.c
@@ -204,8 +208,12 @@ SYMBOL(gDisableMusic, 4)
#if DEBUG
unk_debug_common_2 = .;
+#if (ENGLISH && REVISION == 0)
+. += 0x4;
+#else
. += 0x8;
#endif
+#endif
// battle_anim.c
SYMBOL(gSoundAnimFramesToWait, 4)