Marco Antonio J. Costaandmajcosta 5fd1d5f567 build with clang-cl from a toolchain file and a preset
The tree compiles and links under clang-cl, so make that a configuration
anyone can ask for rather than a command line to reconstruct:

  MSVC_DIRECTORY=/path/to/msvc cmake --preset '1dot13 Release clang-cl'

It is a check on the source, not a port -- MSVC still builds what ships. What
it buys is a second front end over every translation unit, which is how the
inline assembly with no operand size and the resource string with a raw 0xA9
were found, and it runs natively: clang-cl, lld-link, llvm-rc and llvm-lib
need no Wine, so a full JA2.exe takes a fraction of the time.

The toolchain file names every MSVC and SDK include directory, because
clang-cl does not read INCLUDE and LIB the way cl does, and picks the newest
version of each tree rather than pinning one. MSVC_DIRECTORY says where they
live and is reported plainly when it is missing or wrong.

build a bindable Bink import library when not building with MSVC

The shipped binkw32.lib is an old ordinal-based long-format import library.
MSVC's link.exe binds it, but clang-cl's lld-link does not: it leaves every
Bink import unresolved, so at run time the calls jump into arbitrary code and
crash the game at startup, six access violations deep in unrelated code before
the game's own handler gives up.

Rebuild the import library from binkw32.def with llvm-dlltool on any front end
other than MSVC. The library imports by ordinal, for the reasons binkw32.def
records: binkw32.dll exports decorated stdcall names that keep their leading
underscore (_BinkOpen@8), and llvm-dlltool strips that underscore from the
imported name whatever --no-leading-underscore says, so a by-name import would
look up a name the DLL does not export and Wine would substitute a builtin stub
that aborts ("unimplemented function binkw32.dll.BinkSetSoundSystem@8").
Ordinals have no such ambiguity and match the retail DLL. MSVC keeps binding the
shipped library, so the retail build is untouched.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

refactor toolchain

make the preset template something CMake will read

The template carries two // comments. JSON has no comments and neither does
the preset format, so CMake refuses the whole file:

  CMakePresets.json:10: Missing '}' or object member name

Which means the file CopyUserPresetTemplate drops into the source directory
has never worked as handed over -- "cmake --preset '1dot13 Release'" fails
until you delete the comments yourself.

The text they carried is worth keeping, so it moves to the description field
the format does have, and cmake --preset '1dot13 Release' now configures.
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%