Repository navigation
Port: Spanish text fixes for the Spheda tutorial and the jump gate menus (#55, #80) - #143
Merged
Adubbz merged 3 commits intoOct 23, 2026
Conversation
The PAL disc's Spanish script for the map where Max learns Spheda, map/s/s17/s17_5.stb, is a byte-for-byte copy of the Italian s17_4.stb. Playing in Spanish, the Spheda tutorial, its prompts and the dialogue there all read in Italian. No other Spanish script shares another language's text this way. port/src/script_text.cpp replaces those 19 strings when the script is read from the data index, after the NTSC timing conversion. Each line is anchored on its PUSH_CONST string instruction and the Italian text it must find there; a script that does not show every line is left unchanged with a warning. A text that fits is written over the Italian one, a longer one is appended after the script, and ResolveFile's size queries add the same byte count so buffers sized from them hold it. The wording keeps the PAL Spanish names (Esfera, Esfeda, Baston Multiusos, the main menu's Ayuda) and reuses the Spheda courses' own lines where they exist. Tests build a script with the disc's layout, check every push lands on its Spanish text, that a mismatching or other script is left alone, that the lines fit the window, and run on the extracted s17_5.stb when DC2_DATA has it.
The Spanish text of the Spheda lesson, event/e300/e314/e314_5.txt, says "No tienes que acordarte de nada mas" right before the colour rules, and has a Sphere turn from black to blue and turn black after a bounce, a colour it never takes. script_text now also edits event message files by exact text, and corrects those three lines when the file is read: Tienes que acordarte de otra cosa mas. De azul a rojo, de rojo a azul. Asi. ... y cambiara el color. A file that does not hold each retail line exactly once is left unchanged with a warning. The file gets shorter and is zero-filled to its read size. Tests cover the edits, a file without the retail lines, and the extracted e314_5.txt when DC2_DATA has it.
The Spanish jump gate menus (map/f/f04/f04_5.stb twice and map/s/s30/s30_5.stb) put East and West on one line, "Puerta de salto Este -- Oeste", so they list one destination fewer than the script offers: the last choice is blank, and the choices after North take the player one destination further than they say. script_text gives the three menus one line per destination, as in the English menu, and names the time gate "Puerta del tiempo" as the Spanish text does elsewhere: Puerta de salto Norte Puerta de salto Este Puerta de salto Oeste Enfrente de la Puerta del tiempo Puente de Paznos (first f04 menu only) Tests check the line counts and widths, and the extracted scripts when DC2_DATA has them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #55. Fixes #80.
Before: playing in Spanish, the map where Max learns Spheda (map/s/s17) shows its Spheda tutorial, prompts and dialogue in Italian. The disc’s s17_5.stb is a byte-for-byte copy of the Italian s17_4.stb. The Spanish Spheda lesson that follows (event/e300/e314/e314_5.txt) also says there is nothing more to remember right before the colour rules, and has a Sphere turn black, a colour it never takes, clearly a wrong translation that confuses the player.
After: the map’s 19 strings read in Spanish, using the Spanish names (Esfera, Esfeda, Bastón Multiusos, Ayuda) and the Spheda courses’ own lines where they exist. The three lesson lines read “Tienes que acordarte de otra cosa más.”, “De azul a rojo, de rojo a azul.” and “...y cambiará el color.”.
Before: The Spanish jump gate menus in Gundorada put East and West on one line (“Puerta de salto Este -- Oeste”), so the last choice is blank and the choices after North go one destination further than they say.
After: The jump gate menus list one destination per line as in English: Norte, Este, Oeste, “Enfrente de la Puerta del tiempo” (and “Puente de Paznos” where the menu has it).
How: port/src/script_text.cpp patches the files when ResolveFile reads them from the data index, after the NTSC timing conversion. Each script line (s17_5.stb, and the three menus in f04_5.stb and s30_5.stb) is anchored on its PUSH_CONST string instruction and the retail text it must find there; a text that fits is written in place, a longer one is appended after the script and the instruction pointed at it, and size queries add the same byte count. Event text lines are found by exact text, each once. A file that does not match is left unchanged with a warning. Nothing in ps2/src changes. docs/PC.md describes it under Retail data fixes.
Tests build a script with the disc’s layout and check every push lands on its Spanish text, that mismatching or other files are left alone, that lines fit the message window, the event text edits, the jump gate menus’ line counts, and the real files when DC2_DATA has them.