Commit Graph
3943 Commits
Author SHA1 Message Date
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
Marco Antonio Jaguaribe Costa 1312b4dcbe Make cmake build and preset work the version bundled with VS2019 2023-01-15 18:59:57 -03:00
AsdowandGitHub a32e276e4d Add possibility to match against helmet attachments (#77) 2023-01-15 23:02:28 +02:00
KittyandGitHub bcdd44726b Merge pull request #75 from CptMoore/cmake_default_presets
Cmake + default presets that work with Visual Studio
2023-01-15 16:41:57 +01:00
CptMoore 050e7cc5f9 Add more to gitignore 2023-01-14 06:50:43 +01:00
CptMoore f5c0985c38 Better default presets that work for VS and CLion. 2023-01-14 06:50:42 +01:00
Marco Antonio Jaguaribe Costa 8609944467 Add a CMake build
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
2023-01-14 02:08:39 -03:00
CptMooreandGitHub 9f5b181299 Don't push v1.13 tag but fake a v0. Normalized product label, especially removed prepended v to avoid confusion with git tags, also matches the main menu logo now. (#72) 2023-01-11 21:58:21 -08:00
zwwoooooandGitHub 56b4d16aea Chinese translation update(by TBS) (#70) 2023-01-10 23:11:49 -08:00
CptMooreandGitHub 1a75806dd2 GitHub Workflow improvements (#59)
* GitHub Workflow improvements
- Automatically pre-release master as "latest"
- Build all languages
- Parallelize workflow
- Support tag based releases

* GitHub Workflow: Added support for ja2ubmapeditor.
2023-01-10 17:52:46 -08:00
majcostaandGitHub 512717aff9 remove leftover references to removed files in VS project files (#69)
missed those in #49
2023-01-10 20:40:58 +02:00
KittyandGitHub 5732b0ff28 Merge pull request #68 from kitty624/readme
Readme
2023-01-10 14:00:09 +01:00
kitty624 71cb574b31 add readme.md
added readme.md with descriptions and links

a link to upcomming release can be placed here, made a placeholder for now

a png added with ja2v1.13 logo for readme.md
2023-01-10 13:50:05 +01:00
kitty624 4d7ca11c07 Delete readme.txt
deleted old readme.txt

will be replaced by readme.md
2023-01-10 13:43:59 +01:00
majcostaandGitHub cee328f073 replace auto_ptr with std::unique_ptr (#64)
deprecated in C++11 and removed in C++17
2023-01-06 22:49:41 +02:00
majcostaandGitHub be4f1b5e1c remove std:binary_function inheritance from comparator (#65)
deprecated since C++11, removed in C++17
2023-01-06 22:49:27 +02:00
majcostaandGitHub aaa8b094c9 remove UTIL and JA2 preprocessor definitions (#66)
UTIL is never used, and JA2 is always used. assumption being we'll never make 1.13 for Wizardry 8.

video2.h doesn't exist, which prevented me from deleting it.
2023-01-05 20:40:36 +02:00
majcostaandGitHub 24425a82b1 More unused stuff removal (#49)
* More unused stuff removal

delete:
- giant 'metaheaders' (JA2 All.h, Laptop All.h, etc), preferring to add #includes directly where needed
- unused ExceptionHandling and DbMan translation units
- unused WizShare.h, Bitmap.h, trle.h, video_private.h headers

* remove mentions from vc proj files too

* remove preprocessor conditionals for unused definitions

find . -iname '*.h' -o -iname '*.cpp' -exec unifdef.exe -m -UPRECOMPILED_HEADERS -UJA2_PRECOMPILED_HEADERS -UWIZ8_PRECOMPILED_HEADERS -UPRECOMPILEDHEADERS {} ';'

then manually fixed a couple files the tool errored out on

* yes, the comments too

as title
2023-01-03 15:51:48 +02:00
majcostaandGitHub 6024ed62b0 convert UTF-16LE files to UTF-8 (#55)
these three files were in UTF-16LE encoding for some reason, which led
to git treating them as binary files, which means they weren't being git
grep'd

I just converted them using iconv -f utf-16le -t utf8 [origFile] -o
[destFile]

use git show --text to view
2023-01-01 09:26:45 +02:00
AsdowandGitHub 08982d92e7 Fix illegal array access (#53)
Array length was too small when using old skill trait system.
2022-12-25 17:10:46 +02:00
AsdowandGitHub 1f567d9602 Fix CTD when displaying long names in map inventory (#52) 2022-12-25 16:01:01 +02:00
majcostaandGitHub 03e5fbbffd remove Mutex Manager and associated dead code (#44)
this does nothing
2022-12-19 17:43:03 -08:00
12c778118e Remove write-only variable (#42)
git-svn-id: svn://tron.homeunix.org/ja2/trunk@30 5e31c081-6ce3-0310-bb30-f584a8092234

-

https://github.com/ja2-stracciatella/ja2-stracciatella/commit/d1d7fe722a68b07bc8bdc3c90ba9149746eec24e

Co-authored-by: tron <tron@5e31c081-6ce3-0310-bb30-f584a8092234>
2022-12-11 01:27:47 -08:00
rftrdevandGitHub d562424c4b LOBOT: enemies wear backpacks properly
If an enemy soldier gets a backpack when randomly generated, put it into the backpack inventory slot instead of a generic inventory slot.
2022-12-10 02:45:12 -08:00