Commit Graph
220 Commits
Author SHA1 Message Date
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 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
rftrdev a554f0de17 Remove #pragma optimize 2022-11-04 22:32:23 -07:00
rftrdev b0b26d8ef2 Fix being able to assign Radio Scan in specific cases 2022-10-14 23:43:43 -07:00
rftrdev dea5da5fc6 Implement "Train Militia Anywhere"
Subtract supplies when starting mission

Fix second stage mission strategic event
2022-10-14 00:26:38 -07:00
rftrdev feaf9827c9 Set up ASSIGNMENT_REBELCOMMAND
Hook up Start Mission button
2022-10-13 11:31:48 -07:00
rftrdev 7b0830c060 Initial commit - SVN checkpoint to git branch 2022-10-11 00:17:12 -07:00
Sevenfm 07700a8d7e MakeSureMedKitIsInHand:
- for AI, just swap objects as they don't care about pockets
- only show "nowhere to place item" message for player mercs (prevents medic AI from spamming messages)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9394 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-08-06 12:44:56 +00:00
Sevenfm 058a2cd40f HandlePrison:
- more precise calculation of prisoner to guard ratio
- improved calculation of random number of prisoners escaping (allow single prisoner/max prisoners to escape when not guarded)
- check that someone actually escaped before showing riot message
- limit ubNumTroops to 255 (like in other places) as 512 makes no sense for UINT8 value

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9390 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-07-31 15:30:22 +00:00
rftr 8d952591fd fix assert/crash when a spy is hiding or gathering intel in the 2 rightmost columns. this was caused by an overflow in the fSectorsWithSoldiers array when doing the hourly assignment update
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9359 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-04-05 05:38:27 +00:00
Sevenfm 0fdaba84f6 World items patch (by Asdow).
Adds timing logs to savegame function, similar to how we already had in loading a save file. 
Uses a global struct for unloaded sectors' inventory instead of using map item temp files every time unloaded inventory is accessed.
From timing loading and saving functions with a save that has dozens of sectors with hundreds of items each, saving is a little bit slower than before, because map item temp files have to be written to disk just before the save, when that wasn't the case before (from ~0.3 s -> ~0.5s). It is offset by a decrease in loading a game (from ~1.1s -> 0.745s), once an older save is saved at least once. Any unloaded sector inventory access during gameplay is considerably faster and for example the autoresolve lag when militia is using sector equipment is completely gone for me.
Preserves save game compatibility

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9277 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-26 01:02:30 +00:00
Sevenfm 5282553a8c Stop being able to change assignments of in transit mercs (by Asdow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9268 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-20 17:48:39 +00:00
Shadooow 7c40f27359 Dismissing vehicle will drop items in its inventory in current sector without asking.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9257 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-14 22:58:32 +00:00
Shadooow a9fa54e69a Fixed not being able to remove vehicle from merc list.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9255 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-14 22:12:18 +00:00
Shadooow d2ccd4a307 Correction to not disable retreat when ALLOW_SKYRIDER_HOT_LZ is 2 or 3.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9246 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-12 01:31:08 +00:00
Shadooow a577db2752 Disabled retreat when hot dropping and only center of the map is allowed.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9244 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-11 23:54:17 +00:00
Sevenfm 0cc70519d3 Widescreen UI patch (by Asdow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9216 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-11-21 12:56:27 +00:00
Flugente eca080f0f9 New feature (by rftr): Arulco Rebel Command (ARC)
Improve you cities and overall campaign by choosing out of several upgrades

Requires GameDir >= r2613

For more info, see https://thepit.ja-galaxy-forum.com/index.php?t=msg&th=24884&start=0&

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9153 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-08-22 19:00:09 +00:00
Flugente 960bb2d4ba New feature (by rftr): Mini events are a feature where the player can receive short text blurbs, and pick one of two outcomes.
Based on game implementations like Gloomhaven (road/city events) or Battletech (travel events).

For more info, see https://thepit.ja-galaxy-forum.com/index.php?t=msg&th=24865&goto=363481&#msg_363481

Requires GameDir >= r2599

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9137 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-07-09 19:38:55 +00:00
Shadooow 9f0033dac8 disabled changing assignment on POW mercs to prevent to break them free improperly
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9093 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-06-21 01:56:37 +00:00
Sevenfm fc3869bcd6 Fixed function PickPocket to work with MOLLE type of LBEs (by Shadooow).
Changed code that handles putting medical kit from merc inventory into his main hand to respect pockets restrictions to avoid putting gun into medkit only pocket etc.. Writes an error in case that medical kit cannot be put into hands due to no suitable place for currently held items (by Shadooow).

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9015 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-05-11 04:40:54 +00:00
Sevenfm b7cc3bbcf8 Fix for Dynamic Opinions feature not respecting ini setting and not allowing it to be disabled easily (by Shadooow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9002 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-05-05 03:40:57 +00:00
Sevenfm c6c0b09b70 Added basic requirements to start snitching (alive, conscious, not in transit etc).
When clicking on move equipment menu, check basic requirements.
If soldiers land into enemy sector from helicopter, use gsGridNoSweetSpot instead of default arrival location when ESC is pressed.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8919 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-01-14 15:17:56 +00:00
Sevenfm c32f5c76da VR r2698 fix: snitch assignments were not properly taking mercs out of vehicles (by anv)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8918 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-12-11 05:59:51 +00:00
silversurfer d867051cd6 fix: when multiple mercs are repairing, it could happen that one of them didn't spend any points, causing an error message about insufficient skill
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8900 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-10-16 07:52:46 +00:00
silversurfer 7931497b9c Fix:
- when USE_XML_SQUADNAMES was TRUE, the squad box was shifted upwards over the column headers, causing clipping issues
- when READ_PROFILE_DATA_FROM_XML was TRUE, the game would still read profile data from prof.dat, if the old inventory system was used

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8868 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-07-17 11:22:29 +00:00
Flugente ce61a0b85b Fix: if no squad name is provided in xml, fall back on hardcoded name
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8867 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-07-15 21:23:53 +00:00
Flugente 1e101b2065 Use macro where appropriate for easier maintenance
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8847 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-07-07 19:47:52 +00:00
Flugente 0544227958 Fix: militia can retreat to impassable sectors in autoresolve
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8836 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-07-04 14:46:19 +00:00
Flugente de24b4df88 Fix: noticable lag on slow machines or while debugging when plotting a path in strategic view
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8832 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-07-02 21:58:45 +00:00
Flugente 8119662904 New feature: the refilling of the queen's army resevere now requires her to train recruits, which the player can disrupt to some degree (by sun_alf)
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=20659&goto=360475&#msg_360475 and http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=24433&goto=359872&#msg_359872

Requires GameDir >= r2555

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8830 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-06-29 20:12:53 +00:00
Flugente dd9f2c28e8 Minor code cleanup
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8824 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-06-17 22:27:20 +00:00
Flugente f0c8db784a New feature: exploration assignment indicates items on the map
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=360244&#msg_360244


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8815 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-06-01 20:46:45 +00:00
Flugente b25a4be4e7 Fix: compiler warnings
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8814 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-30 14:26:16 +00:00
Flugente e932393eae minor code cleanup (by sun_alf)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8813 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-30 13:34:57 +00:00
Flugente c5022fa1e5 New feature: turncoats can be created from enemies and ordered to switch sides
Requires GameDir >= r2535

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=360191&#msg_360191

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8811 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-30 00:13:42 +00:00
Sevenfm 8051e9b064 ASD: don't change reinforcement pool when unlimited reinforcements enabled.
Interrogate prisoner: don't change reinforcement pool when unlimited reinforcements enabled.
EvaluateQueenSituation:
- allow recruiting when pool size drops below iQueenPoolIncrementPerDifficultyLevel, this should result in more stable strategic AI behavior
- with default values, recruiting can result in up to 8 days of doing nothing, I think that skipping once cycle of decisions should be enough

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8787 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-20 16:43:14 +00:00
Sevenfm 1455409057 AI:
- before deciding anything, stop cowering animation
- before deciding anything, stop giving aid animation
- before deciding to raise weapon, check if weapon can be raised
- simplified scope check
- removed duplicate code in Red AI

Added missing actions to gzActionStr[].
Fixed OKLIFE checks.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8740 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-25 19:02:53 +00:00
Flugente 47a89e3725 New feature: mercs on administration assignment boost the effectivity of other mercs
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=356696&#msg_356696

Requires GameDir >= r2472

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8665 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-02-14 20:48:07 +00:00
Flugente 84d08a8821 A paramedic can use empty bloodbags (<emptybloodbag>-tag, item #1756) to create blood bags (<bloodbag>-tag, item #1757) from other mercs. These can then boost the health returned by surgery by ONTOP_PERCENT_SURGERY_HEAL_BLOODBAG percent.
Requires GameDir >= r2467.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8662 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-02-10 16:26:48 +00:00
Flugente 494c4500e5 Fix: disease menu can be accessed in transit
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8657 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-01-29 23:59:13 +00:00
silversurfer 54d5bb0317 fix (by Sevenfm): some functions ignored the last member of a team
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8629 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-10-16 11:59:54 +00:00
Flugente 494dbc6e69 Store the profile type in the profile structure and remove superfluous code
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8620 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-09-24 19:36:28 +00:00
Flugente 2dbacd32de The following options have been moved from the campaign the campaign start screen to JA2_Options.ini:
- Maximum number of IMPs (now MAX_IMP_CHARACTERS (Default: 10))
- Enemies drop all items (now DROP_ALL (Default: FALSE))
- Merc Story Backgrounds (now BACKGROUNDS (Default: TRUE))
- Food System (now FOOD (Default: FALSE))
- Improved Interrupt System (now IMPROVED_INTERRUPT_SYSTEM (Default: TRUE))
- Inventory Manipulation Costs AP (now INVENTORY_MANIPULATION_COSTS_AP (Default: FALSE))

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23855&goto=354656&#msg_354656

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8610 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-09-02 15:14:01 +00:00
Flugente 2e86f6c0ef 'Disease->Diagnose' assignment also checks for contaminated items and marks them permanently
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8595 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-08-15 19:20:08 +00:00
Flugente a59b75b0be New feature: we have to bury corpses, or their rot causes diseases in sectors
Requires GameDir >= r2436.

Fopr more info, see http://thepit.ja-galaxy-forum.com/index.php?t=tree&th=23828&goto=354321&#msg_354321

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8591 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-08-12 12:42:38 +00:00
Flugente 100eea196b New feature: quest & intel map overlay
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23742&goto=353499&#msg_353499

Requires GameDir >= r2424

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8560 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-05-14 21:26:37 +00:00
Flugente 140e377d1e Fix: interrogation intel gains are wrong
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8551 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-04-09 19:21:06 +00:00
Flugente 65c99e02a3 Fix: healing update relied on first merc
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8550 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-04-03 19:40:22 +00:00
Flugente 64a971edec If MILITIA_STRATEGIC_COMMAND_REQUIRES_MERC is FALSE, militia can be controlled everywhere even without staffing a HQ
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8548 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-03-14 20:20:13 +00:00