Commit Graph
3966 Commits
Author SHA1 Message Date
Robert BiterandGitHub 6e30d24ce5 make gitignore Visual Studio definitions more specific (#144)
* make gitignore Visual Studio definitions more specific
2023-05-20 19:56:27 -03:00
AsdowandGitHub 35bb9a70ec Do not load language specific icon file (#146)
Unnecessary, as there is no translated text in the image files
2023-05-19 16:47:42 +03:00
AsdowandGitHub 690d2054c6 Added new filters for LOBOT (#145)
* Weapon class for SECONDHANDPOS items
* Check if weapon is two handed for HANDPOS and SECONDHANDPOS
2023-05-18 23:33:17 +03:00
rftrdevandGitHub a0aa58f9e5 Update disease flags (hand and face) so that they can be used on the same item (#143)
* Allow an item to have both disease flags enabled

* Remove extra line break for disease hand protection helptext
2023-05-15 00:51:37 -07:00
90cd7be71d Add instructions to the README.md file (#142)
* Add instructions to the README.md file

* Update README.md

Co-authored-by: Robert Biter <robert.biter@zalando.de>

---------

Co-authored-by: Robert Biter <robert.biter@zalando.de>
2023-05-09 12:08:33 -03:00
Marco Antonio Jaguaribe Costaandmajcosta 760f8ab3d7 Remove all MSBuild files
now that CI is using cmake, we can be clean up the tree quite a bit

btw, cmake can still configure for the msbuild generator for those so inclined:

create the folder, cmd to it, run `cmake [project_root_dir] -G"Visual Studio 17 2022" -A Win32 -DLanguages=ENGLISH -DApplications=JA2` once, then open the solution file using Visual Studio 2022
2023-05-08 06:44:35 -03:00
Marco Antonio Jaguaribe Costaandmajcosta 18417ce45a Get CMake's MSBuild generator to work correctly
- 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
2023-05-07 07:23:07 -03:00
Marco Antonio Jaguaribe Costaandmajcosta 74f4979296 A few nits
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
2023-04-22 04:31:37 -03:00
CptMooreandmajcosta d8728c9b92 GitHub Workflow: Adjusted for CMake. 2023-04-22 04:31:37 -03:00
Marco Antonio Jaguaribe Costaandmajcosta 3173b73ba0 don't build ja2 export tool by default
most users don't need this, better if whoever needs it just set
BUILD_JA2EXPORT=ON on their end
2023-04-22 01:40:11 -03:00
zwwoooooandGitHub fd7ac29917 Chinese translation update(by TBS) (#136)
* Chinese translation update(by TBS)

* Chinese translation update(by TBS)
2023-04-12 11:22:03 +03:00
CptMooreandGitHub dc12e1f4f1 Merge pull request #135 from 1dot13/fixed-github-workflow-latest-release-again
Fixed github workflow latest release again
2023-04-08 10:36:58 +02:00
CptMooreandGitHub 172d7d20ba Fixed github workflow latest release again 2023-04-08 10:36:47 +02:00
CptMooreandGitHub 94ac6d97ec Merge pull request #133 from 1dot13/fix-broken-build-process
Fix broken build process
2023-03-21 13:14:09 +01:00
CptMooreandGitHub 6618309895 Fix broken build process 2023-03-21 13:13:48 +01:00
rftrdevandGitHub ff360153c7 Redraw inventory panel when changing selected merc in strategic view (#127) 2023-02-21 23:22:30 -08:00
AsdowandGitHub e1f7fa7bfb Fix button glitches in widescreen UI (#125)
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
2023-02-15 16:36:57 +02:00
AsdowandGitHub 17a0a08097 Add Astars pathing to ingame options (#124)
* Enabled astars pathing

* Add toggleable pathfinding choice to ingame options

You can choose between original and A* pathfinding algorithms
2023-02-15 11:49:04 +02:00
Marco Antonio Jaguaribe Costaandmajcosta aa3e10cd29 missing NO_ZLIB_COMPRESSION compile definition for SGP
forgot about that one
2023-02-01 10:02:46 -03:00
AsdowandGitHub 35109a5615 Guard against possible illegal array access (by Seven) (#121)
ClosestPanicTrigger() can return -1 but its use in indexing gTacticalStatus.bPanicTriggerIsAlarm was not checked in all the places in the code
2023-01-31 20:26:21 +02:00
Marco Antonio Jaguaribe Costaandmajcosta f8f8461a65 replace header preprocessor conditional with cpp function 2023-01-30 09:25:01 -03:00
rftrdevandGitHub b5ec955324 Disable backpack climb check for non-player soldiers (#117) 2023-01-27 17:56:46 -08:00
Marco Antonio Jaguaribe Costaandmajcosta 30fe4bd33b better name for the app/lang dependent shared lib targets 2023-01-27 20:51:25 -03:00
Marco Antonio Jaguaribe Costaandmajcosta dc5eaf7b67 better name for the executable target 2023-01-27 20:51:25 -03:00
Marco Antonio Jaguaribe Costaandmajcosta 7bbe68e6dd improve the comments on root CMakeLists.txt file 2023-01-27 20:51:25 -03:00
Marco Antonio Jaguaribe Costaandmajcosta 319a0ca979 Extract Debug definitions to some syntactic sugar
this will be used in more targets in the future, this will avoid
repetition
2023-01-27 20:51:25 -03:00
Marco Antonio Jaguaribe Costaandmajcosta 06f7827d4a There's no need to make a copy of this list, really 2023-01-27 20:51:25 -03:00
majcostaandGitHub d007d3ba9e Remove gszCivGroupNames dependency from main executable (#114)
* Add include guard to EditorMercs.h

* bring CivGroup related symbols from Tactical over to Editor

and adjust #includes accordingly

* remove redundant #ifdef
2023-01-26 19:09:46 -03:00
Marco Antonio Jaguaribe Costaandmajcosta 0ee2cfe010 Add Ja2Export target and get it to build on C++17
nice little tool
2023-01-26 19:09:05 -03:00
AsdowandGitHub 3985dca2c1 Add on option to start at maximum aiming level (#112)
* 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.
2023-01-22 23:35:42 +02:00
AsdowandGitHub ae1fd0a2ee Prisoner feature bugfix (#110)
* 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
2023-01-22 23:35:08 +02:00
57d2674f37 Use a modifiable user-preset sample for VS 2022/2019 (#97)
* 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>
2023-01-21 20:26:49 -03:00
AsdowandGitHub 8048dd4201 Fix mapeditor compilation in French language config (#107)
Wrong array had been commented out in _FrenchText.cpp
2023-01-21 20:09:40 +02:00
AsdowandGitHub 8733c2c2eb Improve vobject error messages (#106)
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.
2023-01-21 17:01:35 +02:00
AsdowandGitHub 1770f7f081 Fix illegal array access in imp gear selection (#104) 2023-01-20 20:41:09 +02:00
AsdowandGitHub a252a42ec7 Fix bug if vehicle holds more soldiers than can fit in a squad (by Seven) (#103)
* 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
2023-01-20 16:54:58 +02:00
AsdowandGitHub f0d0ba7307 Revert "Fix bug if vehicle holds more soldiers than can fit in a squad (by Seven) (#101)" (#102)
This reverts commit 46c4ac2b64.
2023-01-20 16:48:27 +02:00
AsdowandGitHub 46c4ac2b64 Fix bug if vehicle holds more soldiers than can fit in a squad (by Seven) (#101)
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.
2023-01-20 16:24:18 +02:00
AsdowandGitHub fc0182118c Display item info in tooltip (#100) 2023-01-20 16:10:16 +02:00
AsdowandGitHub 57fcdaf4fe Add ability to match against leg armor attachments (#96) 2023-01-19 14:16:03 +02:00
majcostaandGitHub e62fa859ff Re-add Debug messages when door structures are missing (#95)
Uncovered in #87
2023-01-19 12:10:27 +02:00
AsdowandGitHub a55dab43b2 Prevent illegal array access if GridNo = NOWHERE (#93) 2023-01-19 00:47:01 +02:00
Marco Antonio Jaguaribe CostaandAsdow d4abc82488 Address review feedback 2023-01-19 00:13:08 +02:00
Marco Antonio Jaguaribe CostaandAsdow 8b1c4effa0 nuke all the #if 0's
scripted commit:

find . -not -path '*/.*' -and -not -path '*/ext*' -type d -exec coan source -R -E {} ';'

https://coan2.sourceforge.net/coan_man_1.html
2023-01-19 00:13:08 +02:00
majcostaandGitHub 6afe785f4b Default to not displaying the fake light around mercs (#86)
* 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
2023-01-18 20:56:34 +02:00
CptMooreandGitHub 624c0f3bc4 Flashlight changes (#81)
* 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.
2023-01-18 20:52:12 +02:00
d6896c9234 Added a minimalistic .editorconfig with some sensible defaults. (#85)
Co-authored-by: CptMoore <39010654+CptMoore@users.noreply.github.com>
2023-01-17 23:33:24 -08:00
majcostaandGitHub 6b0c704b19 avoid static initialization order fiasco in soundman.cpp (#80)
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
2023-01-17 23:33:06 -08:00
majcostaandGitHub e4295acfec simplify the language/executable validation function (#79)
* 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
2023-01-17 23:32:38 -08:00
KittyandGitHub 76d5c85605 Merge pull request #78 from majcosta/pr_fix_cmake_and_preset_for_vs2019
Make cmake build and preset work with the version bundled with VS2019
2023-01-15 23:06:19 +01:00