Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localization cleanup #511

Open
wants to merge 61 commits into
base: main
Choose a base branch
from

Conversation

winterheart
Copy link
Collaborator

Pull Request Type

  • GitHub Workflow changes
  • Documentation or Wiki changes
  • Build and Dependency changes
  • Runtime changes
    • Render changes
    • Audio changes
    • Input changes
    • Network changes
    • Other changes

Description

Currently there in project two kinds of localization files: STR (where all messages of all languages assembled into one file; used in core engine) and MSG (where messages split by language). This PR overhauls localization both frameworks.

Both frameworks now exports their functions to DLL API, so CHECKSUM is changed. OSIRIS scripts has huge internal changes, which may make them incompatible with legacy editor script generator.

Related Issues

Screenshots (if applicable)

Checklist

  • I have tested my changes locally and verified that they work as intended.
  • I have documented any new or modified functionality.
  • I have reviewed the changes to ensure they do not introduce any unnecessary complexity or duplicate code.
  • I understand that by submitting this pull request, I am agreeing to license my contributions under the project's license.

Additional Comments

@winterheart winterheart force-pushed the localization-update branch 3 times, most recently from eef4e92 to 93d7729 Compare August 3, 2024 18:04
@Lgt2x Lgt2x self-assigned this Aug 9, 2024
@winterheart winterheart force-pushed the localization-update branch 2 times, most recently from 01bdfcd to b0c0ab9 Compare August 11, 2024 02:12
@winterheart winterheart marked this pull request as ready for review August 11, 2024 03:00
@winterheart
Copy link
Collaborator Author

There some additional changes to OSIRIS checksum generation. I'm still planning to rewrite save/load functions with platform independent serialization, but some features of these are required right now.

Added serial_version field to tOSIRISModuleInit to solve problem when CHECKSUM is different on various platforms and environments due variadic size of structs.

Descent3/localization.cpp Outdated Show resolved Hide resolved
Descent3/localization.cpp Show resolved Hide resolved
Descent3/localization.cpp Outdated Show resolved Hide resolved
scripts/AIGame.cpp Outdated Show resolved Hide resolved
scripts/AIGame3.cpp Outdated Show resolved Hide resolved
scripts/aigame2.cpp Outdated Show resolved Hide resolved
scripts/aigame4.cpp Outdated Show resolved Hide resolved
scripts/clutter.cpp Outdated Show resolved Hide resolved
scripts/generic.cpp Outdated Show resolved Hide resolved
@winterheart winterheart force-pushed the localization-update branch 2 times, most recently from aa3bc27 to 153a09c Compare September 12, 2024 12:09
@winterheart winterheart force-pushed the localization-update branch 3 times, most recently from 674118b to 4efea68 Compare September 18, 2024 18:21
called once guard prevents to re-load messages for different language in case if language is changed on runtime.
This field intended to solve problem when CHECKSUM is different on various platforms and environments due variadic size of structs. Unfortunately, this approach cannot be applied for all structs used in checksum calculation since part of them are poorly serialized/deserialized by fread() / fwrite() functions.
Rename function since GetMessage() is part of WinAPI.
Assuming that index will never be negative, change it to unsigned int.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants