Marco Antonio J. Costaandmajcosta 8495af4b00 spell the Chinese percent sign as an escape instead of raw bytes
Four string literals carry the bytes A3 A5, which is GBK for U+FF05, the
fullwidth percent sign. All four sit in g_lang == i18n::Lang::zh branches
added by "Chinese specific update (by zww from tbs)", and each has an ASCII
sibling in the else branch using an ordinary percent.

clang-cl decodes source as UTF-8, where A3 is not a valid lead byte:

  error: illegal character encoding in string literal

A raw high byte in a literal means whatever the compiler's source charset
says it means, so this text has never been portable. Asking the cl we build
with what it makes of L"%d%<A3><A5>%%" gives a 7-character string whose
fourth character is 163 -- it reads the bytes as Latin-1 and produces two
characters, £ and ¥, not the one the author wrote. The same probe on
L"%d%%%%" gives 6 characters with U+FF05 in that position.

So the Chinese text has been rendering as garbage in any build not made on a
CP936 machine, this one included. Writing the character as % says
exactly which character is meant regardless of the compiler's charset, and
restores what the branch was written to display.

The format grammar is untouched. In each of these strings the character is
preceded by a percent, making %<fullwidth percent> an unknown conversion
specification that prints the character following it -- the same trick the
else branches spell as %%. Where a string is formatted twice, once into a
buffer and again as the format argument of mprintf, the doubling in the
sibling literal (%%%%) is what survives two passes; that pairing is
unchanged.

Both files are now pure ASCII:

  python3 -c "print(sum(1 for b in open(F,'rb').read() if b>0x7f))"

The parse sweep drops from 5 error sites in 3 files to 1 in 1 -- the inline
assembly in sgp/vobject_blitters.cpp is all that is left.
2026-07-23 19:29:55 -03:00
2025-01-05 07:57:57 -03:00
2025-01-02 08:02:52 -03:00
2023-01-10 13:50:05 +01:00

JA2 v1.13




JA2 v1.13



Preamble

Jagged Alliance 2 v1.13 is a modification for the Jagged Alliance 2 game.

Original development was done through SVN, this however ended abruptly in 2022, to keep the development going the step to Github has been made.

Feel free to participate in the development!

For more information you can visit the following locations:

In case of any issues, look at Reports or Participation

Downloads

Note

All-in-one releases come for different languages and include JA2 v1.13, the Map Editor and JA2 Unfinished Business.

Visit the releases page to download the latest all-in-one.

Installation

  1. Install the original Jagged Alliance 2

  2. Download the latest all-in-one release and copy its content to JA2 game directory. Overwrite when asked.

  3. Modify ini settings if you like.

  4. Play the game.

    Some additional information on can be found in folder "docs" inside download.

    If you face issues with higher resolutions, alt+tab not working, blackscreen, etc.,
    run the "cnc-ddraw-config.exe" in game-folder and adjust settings to your liking.
    (those issues can occur due to the combination of old game and modern OS/hardware, cnc-ddraw helps to avoid those)

Visual Studio setup

  1. Run Visual Studio 2019 or newer.
  2. Clone and open the location with the source code using one of these two options:
    • Click Clone a repository
      • Enter git@github.com:1dot13/source.git or https://github.com/1dot13/source.git in the Repository location field, select the path you want to clone the repository to and click Clone.
      • Double-click on Folder View in the Solution Explorer
    • Click Open a local folder
      • Use this option if you already cloned the repository yourself.
  3. Visual Studio will automatically detect the CMake configuration files and will run the CMake generation. There will bet a CMake error in the logs saying No existing preset was found, copied a preset template to [some_path]. This is normal and only happens once.
  4. Click on the dropdown that says x64-Debug and select Manage configurations.... This should trigger Visual Studio to load the CMakeUserPresets.json file it just copied. Now you can close the window for managing the configurations.
  5. The x64-Debug option should have been replaced by 1dot13 Debug. Click it and select Manage configurations... again. Here is where you configure the language for the built executables as well as which ones to build, Most important, here is where you set CMAKE_RUNTIME_OUTPUT_DIRECTORY to the path to your JA2 1.13 installation. This will be used for debugging. Note that the path needs to have a working 1.13 installation, and that includes the 1.13 game data.
  6. You can use Build -> Build All to build the executables you selected in the configuration.

Reports

For more information and reports, visit Bug reports at Bear's Pit Forum or join the Bear's Pit Discord

Participation

Feel free to participate on GitHub. If you want to know how, or simply wanna share your thoughts on a topic join the Bear's Pit Discord

S
Description
No description provided
Readme
1.7 GiB
Languages
Python 78.8%
C++ 18.2%
C 1.9%
Lua 0.6%
GAP 0.3%