Commit Graph
236 Commits
Author SHA1 Message Date
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 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
rftr 87b0c7c6b7 new feature: madlab's robot can be upgraded
requires gamedir r2642

https://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=364403

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9338 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-03-21 17:34:49 +00:00
Shadooow 682cbda213 Fixed graphic glitches, usually black screen or shadow boxes over the screen, appearing when inside the key ring popup box.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9326 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-03-16 22:38:32 +00:00
Shadooow 1503b32e30 Fixes random merc portraits sometimes appearing in a region where would merc inventory normally be when opening inventory of a vehicle.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9289 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-02-02 15:20:12 +00:00
Shadooow a57cc79c83 enabled new attachments to be shown even without EDB for all items except LBE gear
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9239 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-11 01:11:50 +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
Shadooow d238927dd0 detaching attachment will no longer check for 12AP more than it should, this was kind of safety check, but it is confusing and not needed anymore
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9199 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-10-28 08:48:54 +00:00
Sevenfm d02547c7c8 When attaching launchable to attached launcher, use launcher's reload AP cost.
Don't apply ambidextrous attach speed bonus when attaching launchable to launcher.
When playing reload sounds, set volume and pan based on soldier's location.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9196 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-10-26 13:49:55 +00:00
Shadooow 566f8ab5d4 fixed exploit allowing to steal attachments from vendor items
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9168 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-09-24 01:45:04 +00:00
Shadooow 2e7071d1c7 highlighting fix: hovering over item will now highlight valid attachment that doesn't have attachment tag
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9111 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-06-27 02:52:51 +00:00
Shadooow 326b44787b improved inventory costs feature to show red straffing on pockets that soldier has not enough APs to move currently held item into
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9044 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-05-24 05:28:51 +00:00
Sevenfm 239005365f More highlighting changes (by Shadooow):
- unified the highlight behavior with currently held item in cursor to only ever highlight compatible items for that item (was the case in tactical, not in map screen)
- enabled the body silhouette in map screen to be lit up when hovering/holding consumable item just as it happens in tactical mode
- few small fixes correcting code I sent previously

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8999 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-05-04 09:56:58 +00:00
Sevenfm a9a6193a81 Another efficiency improvement for attachments validity check function - will not check all items in inventory to be a valid gun/ammo for tested item if the tested item is attachment/hidden addon (by Shadooow).
Significant improvement for the inventory panel item highlighting code on map screen. There is also a fix for wrong items highlighted when changing currently selected merc (by Shadooow).
Old code was constantly running update for highlights several times a second. Now it only happens when the mouse position first finds or loses an item in inventory.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8998 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-05-03 04:57:07 +00:00
Sevenfm 1db29862c8 Fix for incorrect highlighting attachments + lots of efficiency improvements (by Shadooow).
Code formatting.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8996 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-05-02 05:19:43 +00:00
Sevenfm 3784f56ce1 Fix: small GUI issue where the body silhouette in merc inventory turned dark after moving applicable item onto it and then out of it (by Shadooow).
Fix: GUI issue where the body silhouette wasn't lit up with some of the new consumable items such as energy drinks, etc. Also, empty canteen will no longer lit up the body silhouette anymore (by Shadooow).

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8994 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-05-01 16:13:40 +00:00
Sevenfm f8768a557d Minor code improvement for r8924.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8925 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-01-31 14:37:38 +00:00
Sevenfm bc3b398b63 Use MAXITEMS + 1 max limit when checking transformations.
UpdateAttachmentTooltips: 
- separate items, launchables and attachments checks as they have different max limits
- improved searching of existing item in vector

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8924 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-01-31 13:48:21 +00:00
Sevenfm 0d969503c5 PopupAttachmentInfo class: added missing initializations in constructor.
DragSelection class: added missing initialization in constructor.
MERCPROFILEGEAR class: added missing copy constructor.
WORLDITEM class: added missing copy constructor.
BuildString class: added missing assignment operator.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8906 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-10-21 06:28:15 +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
Sevenfm 03d7fd5266 DrawItemUIBarEx: use GetGunOverheatDisplayPercentage so that OVERHEATING_DISPLAY_JAMPERCENTAGE option can have effect.
Minor code improvements.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8797 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-05 16:34:15 +00:00
Sevenfm 7f8fc44a7d Improved code to update scope mode when changing stance.
ChangeScopeMode: use NOWHERE instead of 0 as incorrect target gridno.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8796 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-30 00:48:52 +00:00
Sevenfm 26a1b0aa5a New option SHOW_BACKPACK_OWNER (TRUE by default): show backpack owner's name on the ground and in taking items interface.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8735 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-19 19:38:30 +00:00
Sevenfm f54a91718b Play grenade pin sound (supports custom grenade pin sound with <sSound> tag in Weapons.xml)
Help AI associate noise with enemy presence: 
- melee attack noise type changed to NOISE_BULLET_IMPACT
- HTH attack noise type changed to NOISE_BULLET_IMPACT
- grenade pin noise type changed to NOISE_GRENADE_IMPACT
- launcher attack noise type changed to NOISE_GUNFIRE

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8728 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-11 17:15:17 +00:00
Sevenfm 3efe899526 HandleItemPointerClick(): use correct target level.
CalcPreRecoilOffset(), CalcRecoilOffset(): fix counterforce calculation for weapon resting feature.
SOLDIERTYPE::GetAPBonus(): use THROUGH_STRATEGIC_MOVE instead of soldier's facing direction to determine sector type.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8719 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-12-22 05:57:52 +00:00
Flugente be7005c3f8 - Fix: messagebox flagmask is UINT32, not UINT16 or UINT8
- added flag to display messagebox buttons horizontally instead of vertically

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8661 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-02-10 14:03:28 +00:00
Flugente f4800dbacc Show scope mode on launchers
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8656 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-01-28 22:32:25 +00:00
Flugente e7f098c2f2 If DELAYED_GRENADE_EXPLOSION = TRUE in JA2_Options.ini, toggling fire modes on a grenade launcher toggles whether the grenades explode on impact or with a 1-turn delay.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8653 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-01-27 23:53:11 +00:00
Flugente a5e5ff6bd8 The new <BarrelConfiguration>-tag specifies how many bullets a gun shoots at once. Several values can be used. If no value is set, 1 will be used.
Toggling fire modes cycles between barrel configurations if several have been set.

Requires GameDir >= r2461

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8652 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-01-27 19:48:18 +00:00
Flugente 7a49e4921a Ammo colour in AmmoTypes.xml is now set using <red>/<green>/<blue> tags instead of <fontColour>/<grayed>/<offNormal>/<onNormal>.
For more information, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=20659&goto=355255&#msg_355255

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8627 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-10-06 17:51:25 +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 c320bd98d0 Removed WEAPON_RESTING_DISPLAY, DISPLAY_SCOPE_MODES and OVERHEATING_DISPLAY_THERMOMETER options (always show indicators if features are on instead)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8599 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-08-24 22:26:37 +00:00
silversurfer fed9ca298c - new modifiers "MISS_MAX_RADIUS_x" for grenades and mortar to set a max radius where they will land. Chance to hit something with explosives is now based more on skill than on luck.
- fixed infinite loop in function "RandomGridFromRadius" when min and max radius were 1
- fixed incorrect exit condition in function "RandomGridFromRadius" when min radius was 0
- fixed incorrect CtH calculation for mortar

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8598 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-08-22 17:54:24 +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 876b8f2502 Fix: possible crash during item transformation
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8520 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-02-17 19:23:03 +00:00
Flugente 35cdd64a92 Fix: redraw ammo count in EDB if button is dirty
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8439 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-08-06 20:20:18 +00:00
silversurfer d7f91064f0 Fixes (by The_Bob):
- Fixed index out of bounds in get items assignment check
- Fixed attachment popup not allowing more than one of the same attachment
- Improved timer control sanity check code
- Added timer adjustment for variable CPU frequency
- Added shortcut: ctrl+left-click on attachment to remove and drop it in sector inventory

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8400 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-04-14 08:34:20 +00:00
silversurfer fef0722178 Fixes (by The_Bob):
- Fixed random freeze on win8/10
- Fixed crash on mercs entering sector
- Fixed crash when using cover display (del/end)
- Fixed attachment popup showing incompatible attachments (crash/freeze/confusion on clicking the option)
- Fixed attachment popup positioning
- Fixed LBE contents corruption/deletion
- Fixed access violation (out of array bounds) in interrupt code
- Fixed a bunch of random old stuff
- Got the project to build on VS2015
- Improved popup class handling of grayed out options
- Improved performance of get item assignment check (added by Flugente)
- Added Ctrl+Space bind for testing/fixing broken LBE contents


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8399 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-04-12 08:09:12 +00:00
Flugente c2b3d1a5a0 Speed up inventory rendering by avoiding unnecessary function calls
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8394 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-03-11 15:35:39 +00:00
Flugente 48254ea5a5 Fix: deadlock on ammo creation popup
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8385 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-01-31 21:05:01 +00:00
Flugente 43fa9090c1 Fix: crash when displaying LBE with corrupted content.
This des not fix whatever corrupts the LBE, it merely stops the game from crashing.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8373 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-01-22 20:37:13 +00:00
Flugente ec52ab30e5 When trading, mark items that the trader won't buy.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8367 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-01-15 23:48:34 +00:00
silversurfer 372adc37b8 repair and dirt system change:
Dirt is now part of gun status. The original dirt system has been removed. For details see:
http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=20198&goto=347370&#msg_347370


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8325 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-10-19 15:58:02 +00:00
Sevenfm e9a1f4b352 New feature: delayed grenade explosions:
- use transformation menu to change explosion mode
- only Normal/Stun/Flashbang type grenades can be delayed
- AI soldiers will avoid staying close to armed grenades\explosives
- use option DELAYED_GRENADE_EXPLOSION to make all hand\GL grenades work as delayed
- new value AP_GRENADE_MODE = 4 in APBPConstants.ini
- new item flag DELAYED_GRENADE_EXPLOSION

Other changes:
- fixed call to sqrt in DrawExplosionWarning() that prevented compiling in VS2010
- correctly update interface after transformations
- PATHAI: AI soldiers will skip gassed tiles if not in gas already
- InGas check: AI soldiers will avoid mustard gas even when wearing gas mask
- Yellow AI: added check to avoid gas/water/bomb using FindNearestUngassedLand
- gas/flare grenades will always explode instantly even when in bad state
- LegalNPCDestination: locations near armed bombs are not legal
- FindBestNearbyCover: avoid locations near armed bombs

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8324 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-10-18 12:39:06 +00:00
Flugente c32bf09bbb New feature: bear traps are mechanical traps that function like bombs, cause no explosion, can be reused, deal significant damage to legs and pin down the target.
GameDir >= r2338 is recommended.

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

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8287 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-08-12 20:48:34 +00:00
Flugente 57ec4e7fa1 Due to erroneous code, the encyclopedia feature has been deactivated. for more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23090&goto=345928&#msg_345928
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8273 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-07-16 12:21:22 +00:00
silversurfer 5307881cb7 Fixes (by Sevenfm):
- incorrect sized array for secondary item stat regions
- incorrect check for secondary item stat display removed

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8248 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-06-05 13:23:26 +00:00
Flugente bd59b2fcba - Fix: UB cannot be compiled
- Fixed a few compiler warnings

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8176 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-04-24 19:59:25 +00:00
Flugente 8fa2d4402c Rdio sets no longer need a battery.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7974 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-08-14 20:50:27 +00:00