Commit Graph
461 Commits
Author SHA1 Message Date
Asdow 872a356e82 Correct column size check 2025-07-23 15:11:03 +03:00
Asdow e2f296c42c Remove #pragma optimize("", off)
Managed to slip in in commit f21cb38. Bad Asdow, bad!
2025-05-01 10:39:19 +03:00
Asdow f21cb38647 Increase TileNo to UINT32
Bigmap grid number values go over uint16 max
2025-04-05 16:20:37 +03:00
Asdow fffb3a45fb Remove 8bit mode
Obsolete and doesn't work

* Remove gbPixelDepth
* Remove 8-bit to 8-bit blitters
* FileNameForBPP now only calls strcopy
2025-02-24 21:42:36 +02:00
Marco Antonio J. Costaandmajcosta 86ad401186 add newline at end of file where it's lacking
.editorconfig already enforces it but it's getting changed piecemeal in
every commit. just get it done with.

the script:
```

find . -type f -not -path "./.git/*" -not -path "./.vs/*" | while read -r file; do
	isFile=$(file -0 "$file" | cut -d $'\0' -f2)
	case "$isFile" in
		(*text*)
			echo "$file is text"
			if [[ $(tail -c 1 "$file" | wc -l) -ne 1 ]]; then
				echo "" >> "$file"
			fi
			;;
		(*)
			echo "file isn't text"
			;;
	esac
done
```
2024-12-14 19:05:48 -03: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
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
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
Shadooow 68664bed77 fixed bleeding value not being substracted when losing max hp which resulted into the graphic HP bar having wrong color
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9189 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-10-18 08:26:32 +00:00
Sevenfm 0a717c2697 Removed option AI_DECISION_INFO.
Added quest debug logging to Logs\QuestInfo.txt

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9177 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-10-14 08:35:32 +00:00
Sevenfm a8c2fa6788 ADD_SMOKE_AFTER_EXPLOSION option:
- use default item SMOKE_GRENADE (151) if it's available
- search for first smoke grenade if default item is not grenade
- check that correct smoke grenade was found

Also added new functions:
- ItemIsHandGrenade to check if item is hand grenade
- GetFirstHandGrenadeOfType to find first item which is hand grenade of selected type
- GetHandGrenadeOfType same as GetFirstHandGrenadeOfType, but first check if provided default item is hand grenade of needed type

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9156 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-08-27 17:30: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 6cad680b02 We can now use interactive actions to alter decals on walls, so it is possible to simulate taking off an object from the scenery and add it as an item.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=363513&#msg_363513

Requires GameDir >= r2601

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9141 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-07-13 19:50:49 +00:00