Commit Graph
466 Commits
Author SHA1 Message Date
Asdow 274be524e6 More functions converted to SoldierID 2024-11-17 16:25:12 +02:00
Asdow 34f0b40f93 Convert functions and globals to SoldierID 2024-11-17 14:53:52 +02:00
Asdow f58cf588a6 Mark TacticalStatusType::sSlideReason as _UNUSED
Removed from function call parameters at the same time.
It was supplied to SlideTo, SlideToLocation and SoldierLocationRelativeToScreen but was never used.
2024-11-17 14:20:37 +02:00
Asdow 3e1c87f53c Remove unused global gusOldSelectedSoldier 2024-11-17 10:27:42 +02:00
Asdow 2918801f75 AddSoldierToSector & OBJECTTYPE::soldierID changed to SoldierID 2024-11-16 20:55:08 +02:00
Asdow b98732daa7 Convert gusSelectedSoldier to SoldierID 2024-11-15 19:06:34 +02:00
Asdow 1c631cb85f REAL_OBJECT.ubLastTargetTakenDamage -> SoldierID 2024-11-15 01:32:25 +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
AsdowandGitHub 62dd0914fc Allocate one INT8 for ZStripInfo pbZChange (#256)
Fixes assertion errors in DEBUG build when LOBOT is enabled.
2023-12-24 17:29:01 +02:00
Asdow 4b1de56b01 Remove #ifdefs for USE_VFS 2023-10-08 16:45:06 +03:00
AsdowandGitHub b8a870df02 Reduce code duplication (#233)
* Use ConvertGridNoToCenterCellXY instead of CenterX & CenterY

* Add direction utility function

We have a lot of places in the code that calculate direction based on center cell coordinates, but lack a utility function for it similar to other direction methods.

* Use utility function for calculating direction

* Use ConvertGridNoToCenterCellXY

* Use utility function for direction

* Use ConvertGridNoToCenterCellXY instead of CenterX & CenterY

* Use ConvertGridNoToCenterCellXY instead of CenterX & CenterY

* Remove CenterX & CenterY functions

Use ConvertGridNoToCenterCellXY instead

* Remove CenterX & CenterY calls from UB configuration

* Address review feedback

* Remove duplicate function

ConvertGridNoToCenterCellXY and ConvertMapPosToWorldTileCenter do the exact same thing

* Use PythSpacesAway instead of GetRangeFromGridNoDiff

Both functions calculate the same thing

* Remove GetRangeFromGridNoDiff

* Remove calls to abs()

The values end up being squared anyways making these unnecessary
2023-10-07 15:14:15 +03:00
Andrzej FałkowskiandGitHub 9033e1097a Radar and overhead map color variants (#219) 2023-10-02 19:30:17 +03:00
sun-alf 4c861e441a [Fix] Revive FPS drawing overlay
To enable built-in FPS, change gbFPSDisplay to SHOW_FULL_FPS (1) in debugger (or change it in src code and rebuild).
2023-09-08 21:58:13 +03:00
Andrzej FałkowskiandGitHub 7edecd6849 Fixed vehicle body not properly removed when destroyed during ramming (#210) 2023-08-28 16:26:46 +03:00
Asdow 03482ffc3d Merge branch 'master' into ExtraMercs 2023-07-26 13:17:49 +03:00
AsdowandGitHub c036160959 fix radarmap drawing in tactical inventory view (#177)
720p resolution with 10 man squads had radarscreen rendered in a wrong location
2023-07-14 07:56:27 +03:00
AsdowandGitHub 986d280193 Enable bigger squad sizes for 720p resolution (#160) 2023-05-28 16:32:12 +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
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
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
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
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
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 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
Asdow 1f0a8f46e8 Import changes from the local SVN working copy 2022-10-10 10:08:44 +03:00
Sevenfm 3d1f8b1951 New ingame option "Show enemy movement" - show location of recently known enemy (seen/heard last turn).
Improved tooltip for formation movement: SHIFT + click to move in formation.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9372 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-05-01 08:24:46 +00:00
Sevenfm 904fae7a96 CancelDrag, StartDrag: update interface panel to change drag icon status.
DrawTraitRadius uses usColour.
Allow to start dragging from any stance, soldier will crouch automatically.
Show draggable objects when drag skill menu is active.
Press [\] key to start dragging object/solder/corpse in front of merc.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9369 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-04-24 18:21:44 +00:00
Shadooow f0c6e32f05 Fixed exploit allowing to duplicate drag able structures by opening/closing them during dragging.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9334 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-03-20 05:08:09 +00:00
Shadooow a78f886fd2 Fixed regression caused mercs not to be visible and commandable in undegrounds sectors.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9327 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-03-17 13:39:41 +00:00
Shadooow f360fcbf22 Fixed regression causing cutscenes with deidranna going into endless clocks.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9320 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-03-14 10:16:46 +00:00
Shadooow 0d5c1be5d4 Fixed regression caused by r9305 where maps in some mods like AIMNAS became unwalkable completely.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9317 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-03-06 06:49:55 +00:00
Shadooow 24f18eeec1 Fixed vanilla bug where grenades and launchers in some maps aren't working properly which manifested either by merc able to throw/toss/launch only 1 tile far or much farther than it should.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9315 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-03-02 02:29:19 +00:00
Shadooow 539de4e838 Fixed dead enemies after autoresolve sometimes being placed on non-walkable grids which, if they dropped any items, made such items inaccessible as well.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9305 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-02-19 10:22:49 +00:00
Sevenfm 1015614473 Play different sound when object drops into water, depending on object weight and type.
Play S_WATER_IMPACT1 when bullet hits water.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9294 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-02-08 10:17:38 +00:00
Shadooow 5c938440c2 Fix for decals not being cleared properly causing graphical issues on strategic map.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9278 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-26 14:58:32 +00:00
Shadooow 5aad9fc2dc Fixed bug where clicking where radar screen would be during Tactical Placement GUI broke it and allowed to enter map without placing anyone.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9250 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-12 02:44:17 +00:00
Shadooow 0792d70583 Fixed ALLOW_SKYRIDER_HOT_LZ = 1 actually not enforcing the center restriction and allowing to place mercs anywhere.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9249 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-12 02:19:57 +00:00
Shadooow beb6e35c09 Improved behavior of buttons in Tactical Placement GUI when hot-dropping.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9248 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-12 02:11:34 +00:00
Shadooow 586e3dd0d4 Disabled Spread button in Tactical Placement GUI when hotdropping as the group always appeared together anyway.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9247 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-12 01:32:32 +00:00
Shadooow 2bf3549142 fix for error in last commit
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9245 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-12 00:02:28 +00:00
Shadooow 3f0ccb0a56 Implemented the missing option of hot drop merc via helicopter into center of the map only, ie. ALLOW_SKYRIDER_HOT_LZ = 1
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9243 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-11 23:52:50 +00:00
Sevenfm 6704eca440 Added requirements for thrown object to break window glass:
- ubWeight >= 4
- sinks
- not unaerodynamic
- made of metal or rock

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9236 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-06 12:54:34 +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
Sevenfm f6fd480c45 This fixes player mercs' shading not updating based on the tile's lightlevel. Especially noticeable when running around at night in a map with lights (by Asdow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9211 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-11-05 04:42:01 +00:00
Shadooow fbade9d355 fixed rain disappearing with NCTH
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9207 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-10-31 00:20:10 +00:00