From a631973b73977f33ef98042abca9fca287792439 Mon Sep 17 00:00:00 2001 From: "easyaspi314 (Devin)" Date: Fri, 23 Aug 2019 20:44:01 -0400 Subject: [WIP] English Debug menu translations! (Plus some build system fixes) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I'm back!            す Éß テ-ブ↑& ÒÛªù! (かなテーブルを捨てろよ!/Throw away the kana table!) When compiled in English with DEBUG, instead of óじばÌ (mojibake), you now get actual English translations! No more switching from the game, to the kana chart, and if you don't know Japanese, Google Translate, just to read one sentence. Additionally, the few unknown translations should use proper encoding or Romaji. I decided to use a nicer macro system: static const u8 sStrHello[] = DTR("こんにちは", "Hello"); This prevents ifdef HELL, as the mixed Japanese and English would be messy. Additionally, some special character issues were corrected. Things untranslated/bugs: - Tomomichi's dummy functions. Of course, they don't do much. - The title screen battle menu. This uses a Gen 2 style tile rendering and the way it is rendered is incredibly overcomplicated. - A few phrases which I couldn't get a clear translation for. I don't know much Japanese lol. - Song names. Just tedious with the limited buffer size. - A few layout issues. Some dimensions should be tweaked to avoid text box ovetflows. - Potential buffer overflows, which I want to try to avoid - (ASan for GBA? :morphon:) - While I use the DEBUG_TRANSLATE flag (automatic with ENGLISH && DEBUG) for C code, the asm data only checks for ENGLISH && DEBUG. Additionally, they are ugly. - Haven't tested all builds yet. - Some code formatting issues. I also made it so this will compile with the system preprocessor (including Clang), and my agbcc binutils (which will attempt to be selected automatically if you don't have DKP). Clang needs a few flags (it can't do asm enums with line numbers and it does trigraphs in standard mode), but it is no longer flipping out. I am going to restart my build system project. It was getting way off track, and ucpp was too difficult to maintain (one of the main reasons for the silence). --- data/debug_mystery_event_scripts.s | 73 +++++++++++++++++++++++++++++++++++--- 1 file changed, 69 insertions(+), 4 deletions(-) (limited to 'data/debug_mystery_event_scripts.s') diff --git a/data/debug_mystery_event_scripts.s b/data/debug_mystery_event_scripts.s index 1d29998ef..9a08941c3 100644 --- a/data/debug_mystery_event_scripts.s +++ b/data/debug_mystery_event_scripts.s @@ -26,10 +26,15 @@ _0845DAFF: me_runscript _0845DD0D me_end +.if ENGLISH +_0845DB16: + .string "Run and visit your DAD in the\n" + .string "PETALBURG CITY GYM.$" +.else _0845DB16: .string "Lauf und besuche deinen Vater in der\n" .string "ARENA von BLÜTENBURG CITY.$" - +.endif _845DB56: setvaddress _845DB56 checkitem ITEM_EON_TICKET, 0x1 @@ -65,10 +70,25 @@ _0845DBB5: release end +.if ENGLISH +_0845DBBE: + .string "DAD: {PLAYER}! Nice to see you!\n" + .string "Here is a Letter 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.$" + +_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 _0845DBBE: .string "VATER: {PLAYER}! Schön, dich zu sehen!\n" .string "Hier ist ein Brief für dich, {PLAYER}.$" - _0845DC00: .string "VATER: Ich bin mir nicht sicher, es\n" .string "könnte ein TICKET für eine Fähre sein.\p" @@ -80,6 +100,8 @@ _0845DC94: .string "deines BEUTELS ist voll.\p" .string "Lagere einige deiner Basis-Items in\n" .string "deinem PC und komm dann wieder.$" +.endif + _845DB56End: .size _845DB56, _845DB56End - _845DB56 @@ -110,12 +132,20 @@ _0845DD5B: setmysteryeventstatus 0x3 end +.if ENGLISH +_0845DD63: + .string "This GIFT can only be used\n" + .string "once.$" +_0845DD95: + .string "The KEY ITEMS pocket is full.$" +.else _0845DD63: .string "Dieses GESCHEHEN kann nur einmal\n" .string "gespielt werden.$" - _0845DD95: - .string "Deine BASIS-TASCHE ist voll.$" + .string "Deine BASIS-TASCHE ist voll.$" +.endif + _0845DAFFEnd: .size _0845DAFF, _0845DAFFEnd - _0845DAFF gUnknown_Debug_845DAE1End:: @@ -153,6 +183,16 @@ _0845E34C: setmysteryeventstatus 0x3 end +.if ENGLISH +_0845E34F: + .string "A POKéMON was added to the {PLAYER}'s\n" + .string "team.$" + +_0845E387: + .string "Your team is full.\n" + .string "No more POKéMON can be added to your\l" + .string "team.$" +.else _0845E34F: .string "Ein POKéMON wurde in das Team des\n" .string "Spielers aufgenommen.$" @@ -161,6 +201,7 @@ _0845E387: .string "Das Team des Spielers ist vollständig.\n" .string "Es kann kein weiteres POKéMON\l" .string "aufgenommen werden.$" +.endif gUnknown_Debug_845E3E0:: me_checkcompat gUnknown_Debug_845E3E0, 0x4, 0x4, 0x4, 0x80 @@ -232,9 +273,16 @@ _0845E637: me_setstatus 0x2 me_end +.if ENGLISH + +_0845E64C: + .string "Visit your DAD in the PETALBURG\n" + .string "CITY GYM.$" +.else _0845E64C: .string "Besuche deinen Vater in der ARENA\n" .string "von BLÜTENBURG CITY.$" +.endif _0845E683: setvaddress _0845E683 @@ -257,10 +305,18 @@ _0845E683: _0845E6BF: gotoram +.if ENGLISH +_0845E6C0: + .string "DAD: Hi, {PLAYER}!\p" + .string "I have just received this rare\n" + .string "BERRY. You can have it!$" +.else _0845E6C0: .string "VATER: Hi, {PLAYER}!\p" .string "Ich habe gerade diese seltene BEERE\n" .string "erhalten. Ich schenke sie dir!$" +.endif + _0845E637End: .size _0845E637, _0845E637End - _0845E637 _0845E683End: @@ -289,11 +345,20 @@ _0845E755: setmysteryeventstatus 0x3 end +.if ENGLISH +_0845E75D: + .string "{STR_VAR_1} was handed over.$" +_0845E771: + .string "There is no room for {STR_VAR_1}\n" + .string "available...$" +.else _0845E75D: .string "{STR_VAR_1} wurde übergeben.$" _0845E771: .string "Es ist kein Platz für {STR_VAR_1}\n" .string "vorhanden...$" +.endif + _0845E730End: .size _0845E730, _0845E730End - _0845E730 gUnknown_Debug_845E712End:: -- cgit v1.2.3 From 532e6397d51951ac1ead3e0eb58557b54588b3ae Mon Sep 17 00:00:00 2001 From: "easyaspi314 (Devin)" Date: Sat, 24 Aug 2019 00:11:41 -0400 Subject: .if ENGLISH != .ifdef ENGLISH --- data/debug_mystery_event_scripts.s | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'data/debug_mystery_event_scripts.s') diff --git a/data/debug_mystery_event_scripts.s b/data/debug_mystery_event_scripts.s index 9a08941c3..8c07ed9a5 100644 --- a/data/debug_mystery_event_scripts.s +++ b/data/debug_mystery_event_scripts.s @@ -26,7 +26,7 @@ _0845DAFF: me_runscript _0845DD0D me_end -.if ENGLISH +.ifdef ENGLISH _0845DB16: .string "Run and visit your DAD in the\n" .string "PETALBURG CITY GYM.$" @@ -70,7 +70,7 @@ _0845DBB5: release end -.if ENGLISH +.ifdef ENGLISH _0845DBBE: .string "DAD: {PLAYER}! Nice to see you!\n" .string "Here is a Letter for you, {PLAYER}.$" @@ -132,7 +132,7 @@ _0845DD5B: setmysteryeventstatus 0x3 end -.if ENGLISH +.ifdef ENGLISH _0845DD63: .string "This GIFT can only be used\n" .string "once.$" @@ -183,7 +183,7 @@ _0845E34C: setmysteryeventstatus 0x3 end -.if ENGLISH +.ifdef ENGLISH _0845E34F: .string "A POKéMON was added to the {PLAYER}'s\n" .string "team.$" @@ -273,7 +273,7 @@ _0845E637: me_setstatus 0x2 me_end -.if ENGLISH +.ifdef ENGLISH _0845E64C: .string "Visit your DAD in the PETALBURG\n" @@ -305,7 +305,7 @@ _0845E683: _0845E6BF: gotoram -.if ENGLISH +.ifdef ENGLISH _0845E6C0: .string "DAD: Hi, {PLAYER}!\p" .string "I have just received this rare\n" @@ -345,7 +345,7 @@ _0845E755: setmysteryeventstatus 0x3 end -.if ENGLISH +.ifdef ENGLISH _0845E75D: .string "{STR_VAR_1} was handed over.$" _0845E771: -- cgit v1.2.3 From 2c42658d8713bf75a01e39bcc72ae76295033e24 Mon Sep 17 00:00:00 2001 From: "easyaspi314 (Devin)" Date: Sat, 24 Aug 2019 11:49:18 -0400 Subject: Beware the BRENDAN --- data/debug_mystery_event_scripts.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data/debug_mystery_event_scripts.s') diff --git a/data/debug_mystery_event_scripts.s b/data/debug_mystery_event_scripts.s index 8c07ed9a5..a2c436e3b 100644 --- a/data/debug_mystery_event_scripts.s +++ b/data/debug_mystery_event_scripts.s @@ -185,7 +185,7 @@ _0845E34C: .ifdef ENGLISH _0845E34F: - .string "A POKéMON was added to the {PLAYER}'s\n" + .string "A POKéMON was added to {PLAYER}'s\n" .string "team.$" _0845E387: -- cgit v1.2.3 From 6eafbcabf3b9ec732a3dfce982e379b988d1a14b Mon Sep 17 00:00:00 2001 From: "easyaspi314 (Devin)" Date: Mon, 26 Aug 2019 21:08:41 -0400 Subject: Change data debug translations to use DEBUG_TRANSLATE I'd prefer a macro, but preproc currently comes first. --- data/debug_mystery_event_scripts.s | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'data/debug_mystery_event_scripts.s') diff --git a/data/debug_mystery_event_scripts.s b/data/debug_mystery_event_scripts.s index a2c436e3b..54ddb565d 100644 --- a/data/debug_mystery_event_scripts.s +++ b/data/debug_mystery_event_scripts.s @@ -26,7 +26,7 @@ _0845DAFF: me_runscript _0845DD0D me_end -.ifdef ENGLISH +.ifdef DEBUG_TRANSLATE _0845DB16: .string "Run and visit your DAD in the\n" .string "PETALBURG CITY GYM.$" @@ -70,7 +70,7 @@ _0845DBB5: release end -.ifdef ENGLISH +.ifdef DEBUG_TRANSLATE _0845DBBE: .string "DAD: {PLAYER}! Nice to see you!\n" .string "Here is a Letter for you, {PLAYER}.$" @@ -85,7 +85,7 @@ _0845DC94: .string "in your BAG is full.\p" .string "Store some of your KEY ITEMS in\n" .string "the PC and come back later.$" -.else +.else @ !DEBUG_TRANSLATE _0845DBBE: .string "VATER: {PLAYER}! Schön, dich zu sehen!\n" .string "Hier ist ein Brief für dich, {PLAYER}.$" @@ -100,7 +100,7 @@ _0845DC94: .string "deines BEUTELS ist voll.\p" .string "Lagere einige deiner Basis-Items in\n" .string "deinem PC und komm dann wieder.$" -.endif +.endif @ !DEBUG_TRANSLATE _845DB56End: .size _845DB56, _845DB56End - _845DB56 @@ -132,7 +132,7 @@ _0845DD5B: setmysteryeventstatus 0x3 end -.ifdef ENGLISH +.ifdef DEBUG_TRANSLATE _0845DD63: .string "This GIFT can only be used\n" .string "once.$" @@ -183,7 +183,7 @@ _0845E34C: setmysteryeventstatus 0x3 end -.ifdef ENGLISH +.ifdef DEBUG_TRANSLATE _0845E34F: .string "A POKéMON was added to {PLAYER}'s\n" .string "team.$" @@ -273,7 +273,7 @@ _0845E637: me_setstatus 0x2 me_end -.ifdef ENGLISH +.ifdef DEBUG_TRANSLATE _0845E64C: .string "Visit your DAD in the PETALBURG\n" @@ -305,7 +305,7 @@ _0845E683: _0845E6BF: gotoram -.ifdef ENGLISH +.ifdef DEBUG_TRANSLATE _0845E6C0: .string "DAD: Hi, {PLAYER}!\p" .string "I have just received this rare\n" @@ -345,7 +345,7 @@ _0845E755: setmysteryeventstatus 0x3 end -.ifdef ENGLISH +.ifdef DEBUG_TRANSLATE _0845E75D: .string "{STR_VAR_1} was handed over.$" _0845E771: @@ -373,4 +373,4 @@ gUnknown_Debug_845E7B5End: .size gUnknown_Debug_845E7B5, gUnknown_Debug_845E7B5End - gUnknown_Debug_845E7B5 gUnknown_Debug_845E797End:: -.endif +.endif @ DEBUG -- cgit v1.2.3 From 98d87b1a47301566095549a97fe681f88b927b9b Mon Sep 17 00:00:00 2001 From: "easyaspi314 (Devin)" Date: Tue, 27 Aug 2019 00:34:24 -0400 Subject: Make DEBUG_TRANSLATE a makefile flag --- data/debug_mystery_event_scripts.s | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'data/debug_mystery_event_scripts.s') diff --git a/data/debug_mystery_event_scripts.s b/data/debug_mystery_event_scripts.s index 54ddb565d..798c6fdd9 100644 --- a/data/debug_mystery_event_scripts.s +++ b/data/debug_mystery_event_scripts.s @@ -26,7 +26,7 @@ _0845DAFF: me_runscript _0845DD0D me_end -.ifdef DEBUG_TRANSLATE +.if DEBUG_TRANSLATE _0845DB16: .string "Run and visit your DAD in the\n" .string "PETALBURG CITY GYM.$" @@ -70,7 +70,7 @@ _0845DBB5: release end -.ifdef DEBUG_TRANSLATE +.if DEBUG_TRANSLATE _0845DBBE: .string "DAD: {PLAYER}! Nice to see you!\n" .string "Here is a Letter for you, {PLAYER}.$" @@ -132,7 +132,7 @@ _0845DD5B: setmysteryeventstatus 0x3 end -.ifdef DEBUG_TRANSLATE +.if DEBUG_TRANSLATE _0845DD63: .string "This GIFT can only be used\n" .string "once.$" @@ -183,7 +183,7 @@ _0845E34C: setmysteryeventstatus 0x3 end -.ifdef DEBUG_TRANSLATE +.if DEBUG_TRANSLATE _0845E34F: .string "A POKéMON was added to {PLAYER}'s\n" .string "team.$" @@ -273,7 +273,7 @@ _0845E637: me_setstatus 0x2 me_end -.ifdef DEBUG_TRANSLATE +.if DEBUG_TRANSLATE _0845E64C: .string "Visit your DAD in the PETALBURG\n" @@ -305,7 +305,7 @@ _0845E683: _0845E6BF: gotoram -.ifdef DEBUG_TRANSLATE +.if DEBUG_TRANSLATE _0845E6C0: .string "DAD: Hi, {PLAYER}!\p" .string "I have just received this rare\n" @@ -345,7 +345,7 @@ _0845E755: setmysteryeventstatus 0x3 end -.ifdef DEBUG_TRANSLATE +.if DEBUG_TRANSLATE _0845E75D: .string "{STR_VAR_1} was handed over.$" _0845E771: -- cgit v1.2.3 From 11170ce90c0baf77b196e378441d25e7f16e2cf3 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 1 Oct 2019 02:30:10 -0400 Subject: Sync specialvars with pokeemerald --- data/debug_mystery_event_scripts.s | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'data/debug_mystery_event_scripts.s') diff --git a/data/debug_mystery_event_scripts.s b/data/debug_mystery_event_scripts.s index 798c6fdd9..6fa509c34 100644 --- a/data/debug_mystery_event_scripts.s +++ b/data/debug_mystery_event_scripts.s @@ -38,10 +38,10 @@ _0845DB16: _845DB56: setvaddress _845DB56 checkitem ITEM_EON_TICKET, 0x1 - compare RESULT, 0x1 + compare VAR_RESULT, 0x1 vgoto_if 0x1, _0845DBB4 checkpcitem ITEM_EON_TICKET, 0x1 - compare RESULT, 0x1 + compare VAR_RESULT, 0x1 vgoto_if 0x1, _0845DBB4 checkflag FLAG_ENCOUNTERED_LATIAS_OR_LATIOS vgoto_if 0x1, _0845DBB4 @@ -51,10 +51,10 @@ _845DB56: waitmessage waitbuttonpress checkitemspace ITEM_EON_TICKET, 0x1 - compare RESULT, 0x0 + compare VAR_RESULT, 0x0 vgoto_if 0x1, _0845DBB5 - setorcopyvar VAR_SPECIAL_0, ITEM_EON_TICKET - setorcopyvar VAR_SPECIAL_1, 0x1 + setorcopyvar VAR_0x8000, ITEM_EON_TICKET + setorcopyvar VAR_0x8001, 0x1 callstd 0x0 setflag FLAG_SYS_HAS_EON_TICKET vmessage _0845DC00 @@ -108,15 +108,15 @@ _845DB56End: _0845DD0D: setvaddress _0845DD0D checkitem ITEM_EON_TICKET, 0x1 - compare RESULT, 0x1 + compare VAR_RESULT, 0x1 vgoto_if 0x1, _0845DD53 checkpcitem ITEM_EON_TICKET, 0x1 - compare RESULT, 0x1 + compare VAR_RESULT, 0x1 vgoto_if 0x1, _0845DD53 checkflag FLAG_ENCOUNTERED_LATIAS_OR_LATIOS vgoto_if 0x1, _0845DD53 checkitemspace ITEM_EON_TICKET, 0x1 - compare RESULT, 0x0 + compare VAR_RESULT, 0x0 vgoto_if 0x1, _0845DD5B vloadptr _0845DB16 setmysteryeventstatus 0x2 @@ -173,7 +173,7 @@ gUnknown_Debug_845E306:: _0845E329: setvaddress _0845E329 getpartysize - compare RESULT, 0x6 + compare VAR_RESULT, 0x6 vgoto_if 0x1, _0845E34C givemon SPECIES_LUVDISC, 15, ITEM_BERRY_JUICE, 0x0, 0x0, 0x0 setmysteryeventstatus 0x2 @@ -287,18 +287,18 @@ _0845E64C: _0845E683: setvaddress _0845E683 checkitem ITEM_GANLON_BERRY, 0x1 - compare RESULT, 0x1 + compare VAR_RESULT, 0x1 vgoto_if 0x1, _0845E6BF checkpcitem ITEM_GANLON_BERRY, 0x1 - compare RESULT, 0x1 + compare VAR_RESULT, 0x1 vgoto_if 0x1, _0845E6BF lock faceplayer vmessage _0845E6C0 waitmessage waitbuttonpress - setorcopyvar VAR_SPECIAL_0, ITEM_GANLON_BERRY - setorcopyvar VAR_SPECIAL_1, 0x1 + setorcopyvar VAR_0x8000, ITEM_GANLON_BERRY + setorcopyvar VAR_0x8001, 0x1 callstd 0x0 release killscript @@ -334,7 +334,7 @@ _0845E736: setvaddress _0845E736 bufferdecorationname 0x0, DECOR_REGISTEEL_DOLL givedecoration DECOR_REGISTEEL_DOLL - compare RESULT, 0x0 + compare VAR_RESULT, 0x0 vgoto_if 0x1, _0845E755 vloadptr _0845E75D setmysteryeventstatus 0x2 -- cgit v1.2.3