Repository navigation
Localization json - #112
Merged
Merged
Conversation
The fragment shaders' discard compiles to OpDemoteToHelperInvocation, which requires the Vulkan 1.3 feature shaderDemoteToHelperInvocation. The device did not enable it, so the validation layer reported it and the graphics tests that count validation messages (TexDecode, GfxMisc) failed. It is a core 1.3 feature, which the renderer already requires. The test fixture also set the deprecated VK_LAYER_ENABLES, which the layer reports as a message of its own; use VK_LAYER_VALIDATE_SYNC instead. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…tion
Game text can come from JSON files, with the disc's own message files as the
fallback, and message text can be drawn from a TrueType font so it is sharp at
any window size. Nothing from the disc is added to the repository.
- The files are laid out as Minecraft's language files are: one flat JSON file
per language (en_gb.json, fr_fr.json...), each a "dotted.key": "text" object
with the same keys in every language. A key is the message file's key (its
path with the language and the .mes taken out, slashes made dots) and the
message id: "dun.script.d01.d01.12".
- localize.{hpp,cpp} reads <exe>/lang and <save>/lang and lays the text over a
message file as the game loads it (LoadFile2, LoadFileBG and the pack lookup
GetPackFile). A missing message, file, bad JSON or a text that does not fit
keeps the disc's text and says so once on stderr. patches/*.json make small
edits to the disc's text (replace pairs, or whole text, guarded by a hash).
- darkcloud --export-text DIR, run once automatically for a save folder with
no export, writes one file per language from the user's own data (855
message files on the PAL disc, each reading back to the disc's codes), and
the hashes patches check. The export is gitignored.
- The Options screen's own words are looked up by key too
(options.<setting>.label, .help, .choice.<n>, options.page.<name>), with the
English in the code as the fallback; port/lang/ ships French, German,
Italian and Spanish for them, copied beside the executable by the build.
- lang/font.ttf draws message text with stb_truetype at the screen's
resolution, in the game's own cells; letters the font lacks (accents,
cedilla, inverted marks, oe) are built from the font's own glyphs.
- A Language row on the Game page and game.language in config.json skip the
start-up language screen; changing it reloads the town or title once Options
closes so images, menus and messages all change together.
- scripts/port/compare_text.py compares the languages message by message.
- docs/LOCALIZATION.md describes the formats and limits.
Japanese is not decoded: its text is glyph indices into the game's own font,
so ja_jp.json keeps them as {N} codes, which still round-trip.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The outline and drop shadow were drawn at 60% of the bitmaps' offsets and faintly, so they vanished under a thin glyph. They now sit at the full offsets and the outline is laid down nine times, which reads as dark as the bitmaps' text.
… since the sandbox has no network
…text; refresh the truncation report's line numbers
…nt's icons and the textures' painted buttons Settings input.glyphs (new/original) and input.glyph_device (auto/ps4/ps5/xbox/switch/keyboard) with two Options rows (translated in fr/de/es/it), the symbols drawn with a cast shadow like the font's, stb_image as a pinned download / Flatpak source, tests, docs/GLYPHS.md. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… box The build copies tools/font/DarkCloudCompendium.ttf, which the repository already holds, to lang/font.ttf beside the executable, so message text is drawn from it as built (Dayuppy confirmed on 2026-10-06 that the community font may be used here; credited in CREDITS and tools/font/README.md). Its accented letters, cedilla, inverted marks and oe are blank in the file and are built from its own glyphs, which covers every language the game has. --font FILE names another font, a font in the save folder's lang/ wins over the bundled one, and a missing font is said once instead of silently falling back to the bitmaps. The language JSON is written on the first start with the game data in place; docs/LOCALIZATION.md and the README now start with that quick start. The font tests run on the repository's own font, so they no longer skip. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Doxygen reads only README.md and docs/PC.md, so a markdown link to docs/LOCALIZATION.md cannot resolve and its warning fails the documentation build. The rest of the README and PC.md name other docs in backticks; do the same.
build_glyphs.py --ps5-pack rebuilds only the PS5 atlas and its glyphs.json entry from a flat folder of 64 px buttons.
Text Shadow and a new Symbol Shadow are percents in steps of 5: 0 casts none, 50 is the soft shadow (the letters' default), 100 the deep one. The button symbols default to 25, a lighter shadow, since a solid shape stacks it where a thin stroke does not. The old soft and deep config values still read as 50 and 100.
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.
Updated: rebased on current master (d16ee57) and reworked the text shadow.
Rebase
Text shadow
Font