- MSBuild has safe exception handlers (safeseh) enabled by default, which
some of our libraries don't support
- also needs legacy_stdio_definitions.lib to be linked
create empty CMakeUserPresets.json file so build happens on first run
comment doesn't apply anymore
no need to specify the compiler when using msbuild@xxx
ask ninja for the verbose command line when building
In widescreen strategic UI, team panel sort buttons would be hidden when transferring items to and fro merc inventory via CTRL + left click
Exit inventory panel button should always be disabled in widescreen UI
* Add include guard to EditorMercs.h
* bring CivGroup related symbols from Tactical over to Editor
and adjust #includes accordingly
* remove redundant #ifdef
* Add on option to start at maximum aiming level
When hovering mouse on an enemy, aiming level is started at maximum instead of no aiming when this option is toggled.
* Allow game to continue after offering to surrender to enemies
* Fix issues related to surrender and POW quests
- Quests were ended prematurely if one had prisoners in both alma and tixa
- Strategic status flags for rescue/escape were not set properly
- Only the maximum amount a prison can hold will be taken as POWs, rest of the mercs will either escape or have to fight to the death, to prevent a player having unrescuable POWs
- Capturing a mercenary had a lot of functions called that should not have been, IF the merc is not going to be captured after all
* Switch all tactical surrender calls to use one unified function
* Only mercs that are capable can escape
Incapacitated mercs left behind will die.
Should probably prioritize incapacitated mercs to be captured by the enemy to prevent needless deaths
* Combine pow quest state changes into one function
* Add JumpIntoEscapedSector to header file
* Allow enemy to demand surrender even if they already have POWs in Tixa and Alma
* Remove surrender from UB
* Address review feedback
* Use a modifiable user-preset sample for VS 2022/2019
Customizing a repo-tracked preset file doesn't work:
Type in your gamedir for debugging, or toggle verbose mode for the build, or configure Chinese
UB MapEditor: you now have an unstaged `CMakePresets.json` change in your working directory.
very annoying.
Also, Visual Studio 2022's preset support has a bug: if you have a `CMakePresets.json` file,
no matter in which file (user or repo) the preset you have selected is defined, if you click
"Manage Configurations..." it will always open `CMakePresets.json` for editing, setting the
user up for failure and editing the commited-to-repository file.
Having just the `CMakeUserPresets.json` file also sidesteps another poor Visual Studio 2022
decision: hiding in Folder View files that are .gitignore'd (like `CMakeUserPresets.json`).
In the absence of a `CMakePresets.json` file, selecting "Manage Configurations..." will open
the right file for editing.
The workflow is then:
Copy `CMakeUserPresets.json.sample` into `CMakeUserPresets.json` _once_, then customize
that to your heart's content without git bothering you and accidentally adding an
unwanted change to a patch. Or make your own.
* Added auto-copy of profile template.
* declutter things a bit
move function out of root cmakelists.txt file
move user preset template to a presets directory
this is horrible and I hate it
Co-authored-by: CptMoore <39010654+CptMoore@users.noreply.github.com>
Error messages will now print the video object's file name when throwing the error, giving us an immediate starting point for debugging. Especially useful when those intermittent assertion errors happen.
* Fix bug if vehicle holds more soldiers than can fit in a squad (by Seven)
We would fail Assert(fSuccess) as all passengers would not fit in one squad, and the code wouldn't allow creating a new squad where they could be placed.
* Add missing if conditional to previous fix
My bad
We would fail Assert(fSuccess) as all passengers would not fit in one squad, and the code wouldn't allow creating a new squad where they could be placed.
* Remove option to disable 'Mercs Lights during Movement"
This might've cost someone some frames in 1999, but today even a 10
year old smartphone can probably run with this turned on at 1080p without
dropping a sweat
This does not remove the menu option which I plan to replace with
'Highlight Mercs' which was hidden for some reason.
'Merc Lights during Movement' is a noop now tho
* Replace 'Merc Lights during movement' with 'Highlight Mercs'
as title
* Make 'Merc Highlights' default to false
"Wtf why am I glowing?" well your problems are over
* Flashlight changes:
- Fixed the lighted area being way too large in the diagonal directions.
- Added a minimum range to simulate a flashlight user not illuminating its feet.
- Added angle based calculations instead of the hardcoded one.
* Flashlight changes, MR feedback.
when running the cmake Debug build instead of the ja2_vs2019.sln file s_SoundLog is undefined.
the most likely reason for that is that static objects in global scope
have unspecified initialization order. the problem is fixed if the
static SoundLog object is created inside the SoundLog(CHAR8*) function
instead.
also remove the comment whose meaning apparently has been lost to the
sands of time
* simplify the language/executable validation function
removing the 'ALL' corner-case so that the default behavior is to configure all valid languages and applications allows to simplify this function quite a bit
* keep the CMakePreset.json options listed for ease of use
Tried to stay as close as possible to ja2_2019.sln
On Visual Studio 2022 just Project -> CMake Settings for Ja2, add
the x86 configurations you want and press F7.
Below shows how the -DLanguages -DApplications switches work, If you don't
set them, the CMakeCache.txt of them will be set to ENGLISH and JA2,
respectively:
cmake [...] // nothing set, configure just JA2_ENGLISH.exe by default
cmake [...] -DApplications="JA2UB" // configures just Unfinished Business
cmake [...] build -DApplications="JA2UB;JA2UBMAPEDITOR" // Unfinished Business and UB Map Editor
cmake [...] build -DApplications="JA2UB;JA2MAPEDITOR;ALL" // ALL is in the list, configures every application
cmake [...] build -DApplications="JA2MAPEDITOR;DeathStranding" // fatal error: DeathStranding not an application
cmake [...] -DLanguages="GERMAN" // configures just German targets
cmake [...] build -DLanguages="GERMAN;ENGLISH" // German and English
cmake [...] build -DLanguages="GERMAN;ENGLISH;ALL" // ALL is in the list, configures every language
cmake [...] build -DLanguages="ENGLISH;ESPERANTO" // fatal error: ESPERANTO not supported