Commit Graph
120 Commits
Author SHA1 Message Date
Asdow 82aca548f5 Merge branch 'master' into ExtraMercs 2025-09-24 16:14:10 +03:00
BeatAroundTheBuscherandGitHub ed00830202 Fixes Upper/Lower Casing for include paths (#487)
* Fixing upper/lower case for includes

types.h, zconf.h and zlib.h were renamed so that global includes like Types.h
are not used.
2025-08-16 22:01:12 -03:00
Asdow ec4dc8b058 Provide gMapViewRegion through mapscreen.h 2025-04-09 23:10:32 +03:00
Asdow c475f9e4e6 Convert MapScreenCharacterSt::usSolID to SoldierID 2024-11-17 01:25:00 +02:00
Asdow 2918801f75 AddSoldierToSector & OBJECTTYPE::soldierID changed to SoldierID 2024-11-16 20:55:08 +02:00
Asdow 10250dc035 Merge branch 'master' into ExtraMercs 2024-11-09 13:44:53 +02:00
AsdowandGitHub 49a119e6b9 Convert INVTYPE boolean fields to flagmask (#325)
Rearranged fields from largest to smallest to remove alignment padding
2024-08-22 08:48:29 +03:00
Asdow 03482ffc3d Merge branch 'master' into ExtraMercs 2023-07-26 13:17:49 +03:00
rftrdevandGitHub ff360153c7 Redraw inventory panel when changing selected merc in strategic view (#127) 2023-02-21 23:22:30 -08: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 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
AsdowandGitHub 1f567d9602 Fix CTD when displaying long names in map inventory (#52) 2022-12-25 16:01:01 +02:00
Asdow 1f0a8f46e8 Import changes from the local SVN working copy 2022-10-10 10:08:44 +03: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
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 abdfd022ae Implements mouse wheel scrolling for switching mercs in strategic map when hovering mouse above teamlist, character inventory and character info panels (by Asdow).
Simplified the r9266 inventory scrolling and made it obey inverted mouse wheel scrolling direction that is in the options screen (by Asdow).

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9267 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-18 22:05:01 +00:00
Sevenfm f1ba48f51f Added mouse wheel scroll functionality for changing pages in strategic map inventory (by Asdow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9266 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-18 19:29: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 9ea0968001 fixed bug when manually placing item from soldier/vehicle inventory to not currently loaded sector inventory bugged the items and made them inaccesible after the sector got loaded
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9058 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-05-29 04:16:46 +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 b12b5dd03a Fix: items stacking with those that player cannot take from sector inventory when using CTRL+LMB from merc inventory (by Shadooow).
Fixed some warnings.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8983 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-04-27 05:12:21 +00:00
Sevenfm b29e9700f3 Fixed incorrect integer calculation.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8706 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-11-22 14:24:21 +00:00
silversurfer 6a1fd17026 Fix: Items that were placed by function AutoPlaceObjectToWorld() had incorrect sGridNo so they could end up in inaccessible places.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8690 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-08-20 17:41:56 +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 f7423782db New Feature: gear templates allow us to save and load a merc's equipment, thereby speeding up the equipment process.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23462&goto=350497&#msg_350497

Requires GameDir >= r2384

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8440 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-08-06 21:06:49 +00:00
TheBob 3c4da04532 Cleaned up attachment removal code
Fixed rare issue with squads and movement groups not being defined at game start.
Fixed wrong type declarations in header files

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8407 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-06-12 17:09:25 +00:00
TheBob b60a94afc5 Added: Ctrl+Shift+E now fill LBE items in sector with other items and places them in vehicles first.
Added: Right-Click on remove attachments button on sector inventory screen will not empty LBE items in sector
Changed: SLAY_STAYS_FOREVER disables Slay's hourly chance to leave when unattended
Added: SLAY_HOURLY_CHANCE_TO_LEAVE setting to Ja2_Options.ini
Fixed: a bunch of array index out of bounds bugs
Fixed: a bunch of typos in if contitions
Fixed: BuildListFile() function loading items from index 1 instead 0
Added translation: Polish text for some map inventory screen items
Added translation: English texts for new functionality for other language files
Cleaned up some old TODOs

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8404 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-05-19 13:40:34 +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
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
silversurfer ab554b937c Fix:
- price and militia resource points display in sector inventory was incorrect and didn't take Shift key into account
- display of militia resource below the map didn't work if MILITIA_VOLUNTEER_POOL was FALSE

Enhancements:
- militia resource points display below map now better organized
- militia resource points display below map now available when in sector inventory and pressing ALT key
- conversion of items to militia resource points now available with ALT + RMB, ALT + Shift + RMB and ALT + Shift + Y + RMB just like quick sell feature works


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8275 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-07-17 13:44:58 +00:00
Flugente 6acbd72c89 Slightly altered militia resource display
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8274 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-07-16 22:13:53 +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
Flugente 7a34e9a154 New feature: militia resources requires the player to convert items to resources to be able to train and promote militia
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8271 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-07-15 19:33:44 +00:00
Flugente 7124df2354 - Fix: Get Item assignement: if no valid gridno is found, let the game find one upon loading the sector instead of risking a wrong gridno assignment
- Fix: When dropping an item in strategic inventory, height values are not set 
- Fix: When looking for a valid gridno to drop items t via strategic inventory, WORLD_ITEM_REACHABLE is not reliable, as updated map topology trumps this. Instead rely upon finding a valid gridno once the sector is entered.
- Fix: when searching for a new item dropoff gridno, search for new height too
- Fix: if items are spawned mid-air, the player cannot retrieve them

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8136 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-04-09 16:11:43 +00:00
Flugente 499ff2db06 If the itemlist is huge and one uses New Inventory System, New Attachment System and a lot of MOLLE items, there is a noticable slowdown if inventory is open in tactical. I cleaned up code to ease that somewhat, but the problem will likely persist.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7600 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-10-19 21:53:05 +00:00
silversurfer 5f80ad78d7 Fix (by Ocular): Reusing the pInventoryPoolList vector lead to incorrect flags on items that were placed in slots that previously had an action item in them. This fix resets the flags for these slots to 0 when the list is updated.
http://www.ja-galaxy-forum.com/ubbthreads.php/topics/336486/[PATCH]_Fix_invalid_slots_in_m#Post336486


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7552 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-10-12 11:35:53 +00:00
silversurfer 64f85b6c9b Fix (by Ocular):
Removing attached grenade launchers makes their grenades vanish under NAS. This fix removes the grenades first and then the launcher.
http://www.ja-galaxy-forum.com/ubbthreads.php/topics/336539/[PATCH]_Fix_missing_UGL_grenad#Post336539


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7550 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-10-11 09:10:34 +00:00
Wanne 06367419c0 Merged from revision: 7548
Bugfix: Place inventory on same bLevel as merc when dropping items through map screen inventory (by Ocular)
- see: http://www.ja-galaxy-forum.com/ubbthreads.php/ubb/showflat/Number/336500/gonew/1/[PATCH]_Place_inventory_on_sam#UNREAD

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7549 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-10-09 11:34:54 +00:00
Flugente ce3369f72e Slightly improved loading times.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7394 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-08-17 18:55:00 +00:00
Wanne b4af6cec69 Merged from revision: 7380
Fixes (by Buggler)
- Fixed lost items when autoplace stacks from sector inventory to vehicle inventory
- Changed autoplace items priority to stacking first; previous order: specialized pockets > stacking > other pockets
- Improved autoplace stacks logic from sector inventory
- Fixed OIV vehicle inventory figure sti not loaded

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7381 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-08-09 11:06:08 +00:00
Wanne 05fdcb5d2e Merged from revision: 7363
- Map Editor now properly handles all available items without empty placeholders in between (by anv)
- Added item compare popup help text (by Buggler)
- Enemy icons will not be shown as 10x icons in 640x480 due to visibility issues (the rest remains as it is) (by Buggler)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7364 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-07-26 13:07:32 +00:00
Wanne d7d1cce626 Merged from revision: 7350
Fixes (by Buggler)
- Fixed mouse region for item stack popup in strategic screen for non-standard resolutions
- Disabled Ctrl+Click for dropping item to sector inventory in combat
- Disabled Sector Inventory Stack Popup in combat
- Removed unused Ja2Options.ini: MIN_RANGE_FOR_FULL_COWERING_TARGET_PENALTY and STAMINA_HIT (by Buggler & Sevenfm)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7351 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-07-21 18:07:47 +00:00
Wanne f086611d21 Merged from revision: 7344
Fixes (by Buggler)
- Centered strategic screen in non-standard resolutions
- Fixed message log disappearing when clicking map border buttons
- Minor fix for increased MAX_BUILDINGS limit 

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7345 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-07-19 13:48:27 +00:00
Wanne 4f0ee82ccb Merged from revision: 7290
- Fixed inaccessible or lost items for moving items from mercs to sector inventory when a different tactical map is loaded (by Buggler & anv)
- Revert fix on queen reinforcement pool being replenished on depletion when playing with limited enemy troops setting (by Buggler)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7291 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-06-25 17:53:15 +00:00
Wanne f5e94e869a Merged from revision: 7267
Fixes (by Buggler)
- Allows sector inventory item deletion feature to delete inaccessible and not-in-sector items. Hold 'Delete' hotkey and click the item
- Hot key Ctrl+Tab can now switch to the second page of General tab in EDB for weapons
- Fixed hardcoded mine icons and spawning pool sector in AI Viewer

Editor
- Hotkey for finding previous merc changed to 'Ctrl+Space' to avoid out-of-map boundary display
- Added editor command line options in popup help text

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7268 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-06-05 14:37:32 +00:00
Wanne 0fcbed45b3 Merged from revision: 7219
Fixes (anv & Buggler)
- fix: backpacks stacked in the same sector inventory slot would share ownership, causing soldier to pick-up both of them, now when stacking ownership is automatically disabled,
- fix: when manually reorganizing backpacks in inventory slots, ownerships are properly swapped too,
- fix: when using auto pick-up backpack feature function was looping through non-existing items in sector inventory, possibly creating duplicates,
- fix: "drop all backpacks" feature was limited to 18 mercs, now it works for all player-controlled characters.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7220 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-05-19 19:00:14 +00:00
Kriplo ab5bfe2bf3 Brief: //dnl ch85
- Some fixing and adding position in overhead map to be in center of big map.
Details:
- Calculate overhead map cords from your current position on big maps.
- Fix incorrect placing room numbers in maps with cliffs.
- Fix CTD during deletion of sector items using CTRL+D or CTRL+Del.
- Remove light, door and item cursor and item tiles after coping building.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6888 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-02-08 15:20:13 +00:00
Flugente 5635e84e15 Merged revision(s) 6881 from branches/ja2_source_official_2014:
- close item description box when autoplace item from sector inventory (by Buggler)
- allow toggling of item restriction only when move item button is activated (by Buggler)
- sector inventory item filter buttons now shows in 640x480 too (by Buggler)


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6882 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-02-06 18:21:58 +00:00
Flugente d6186aca15 Merged revision(s) 6826-6828 from branches/ja2_source_official_2014:
- Minor code improvements and cleanup
- Fix from r6775 is no longer necessary.
- Code improvement: Instead of calling inv.size() repeatedly, just call it once and remember that value

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6829 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-01-26 12:18:43 +00:00