Commit Graph
525 Commits
Author SHA1 Message Date
Marco Antonio J. Costa 4a7625cef0 Slightly clunky RUSSIAN conversion 2024-12-31 16:28:44 -03:00
Marco Antonio J. Costa ecdc8916f2 Move CHINESE BOBBYR_ITEMS_BOUGHT_X conditional definition to i18n
Just awful
2024-12-31 16:28:44 -03:00
Marco Antonio J. Costa cf0b4dfc40 Manual unrolling preprocessor stuff and added function
This function is just for GERMAN but it has a unique name so it's no
problem.

Had to slightly change how MercID gets populated
2024-12-31 16:28:44 -03:00
Marco Antonio J. Costa d008d10b31 Replace a ton of trivial #ifdefs with runtime checks
This one is big, but unless I missed something, should be all be
trivial.

scripted-diff with the following, then manually tweaked whatever needed:
```

if [ $# -ne 3 ]; then
    echo "Usage: $0 '<pattern>' '<replacement>' '<filename>'"
    exit 1
fi

pattern="$1"
replacement="$2"
filename="$3"

if [ ! -f "$filename" ]; then
    echo "Error: File $filename does not exist."
    exit 1
fi

sed -i '/'"$pattern"'/ {
    :loop
    $ !{
        N
        /'"$pattern"'.*\n.*#endif/ {
            s/'"$pattern"'/'"$replacement"'/
            s/#else/} else {/
            s/#endif/}/
            P
            D
        }
        /'"$pattern"'/ b loop
    }
}' "$filename"

echo "Replacement complete in $filename"
```

h/t to Grok2 for the sed command
2024-12-31 16:28:44 -03:00
Asdow 3cfde817ba Set table mouse_region priorities lower than bookmark bar 2024-12-30 21:21:30 +02:00
Marco Antonio J. Costaandmajcosta 897f684705 remove all #include's for Language Defines
scripted diff:

find . -type f -iname "*.h" -exec sed -i -E '/#include.*language\ defines\.h/I d' {} \;
find . -type f -iname "*.cpp" -exec sed -i -E '/#include.*language\ defines\.h/I d' {} \;
2024-12-27 02:35:29 -03:00
Marco Antonio J. Costaandmajcosta 6b9997b9c5 we don't use USE_CODE_PAGE anymore 2024-12-26 11:51:31 -03:00
Asdow c30b1c1b25 Reimplement UB pricing for AIM 2024-12-24 22:48:41 +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
kitty624 6650f70c93 Update AimMembers.cpp
reworking r9343

- this resulted in player being forced to choose features to allways see all possible merc gear sets

- loosing whole gearsets to avoid a few items is too much

- in some item-mods that even could result in some mercs not having any

- therefore deleted
2024-04-15 01:08:41 +02:00
kitty624 682dbaa8fc Alternative IMP Background Selection
- two new options in ja2options.ini
 ALTERNATIVE IMP CREATION
- adds new additional backgrounds, exclusive to this option
- which IMP backgrounds will be available at selection is determined by previously made choices for skills, character traits and disablities
- if a tag in background is contradicting to content of skill/character/disability, it won't be shown at selection
- what's considered contradicting is based on what's been found in code for conntent of skill/character/disability
- i.e. HeatIntolerant adds a penalty for desert and tropical sectors, so don't show backgrounds that add bonus for those sectortypes instead
- a new tag <alt_impcreation, has been added to backgrounds for this as well
- if that tag is found, it will be considered as additional IMP background exclusive to the option

REDUCED IMP CREATION
- same as above, but this time only the new additional backgrounds will be avaialable at selection
- same rules for possible restrictions to be shown

ALTERNATIVE IMP CREATION is required for REDUCED IMP CREATION to work

For ja2options.ini, a new category, "Backgrounds" was created.
This will contain the two new options and the general option to enable backgrounds

Accompanying changes in gamedir:

INIEditorJA2Options.xml
ja2options.ini
backgrounds.xml
2024-03-19 19:37:16 +01:00
KittyandGitHub 668a4e96ad Merge branch '1dot13:master' into Backgrounds 2023-11-08 01:27:57 +01:00
majcostaandGitHub ae55496e39 Move main executable source to its own directory (#248)
* Move main executable files to their own directory

* Adapt the build to the new file structure

... and fix some weird #include's that were relying on the project root
being an include directory.
2023-10-23 15:46:51 -03:00
Asdow 5a922e3a42 Remove useless function 2023-10-08 16:48:18 +03:00
Asdow 4b1de56b01 Remove #ifdefs for USE_VFS 2023-10-08 16:45:06 +03:00
sun-alf f8637e5972 [~] Performance optimizations around Attachment[] and Launchable[] arrays
AIMNAS with its ~50K elements in Attachment[] suffered of performance drop when MOLLE stuff is in the visible inventory. To resolve it the following is done:
* Introduce gMAXATTACHMENTS_READ with actual number of elements in Attachment[]; according refactoring.
* Introduce gMAXLAUNCHABLES_READ with actual number of elements in Launchable[]; according refactoring.
* Introduce std::multimap AttachmentBackmap for quick access to attachments using itemId as a key.
* Sort Attachment[] by attachmentIndex right after loading from XML. According order in XML is not needed anymore.
* Introduce FindAttachmentRange() for quick access to attachments using attachmentId as a key (binary search in Attachment[]).
In a few words, GetHelpTextForItemInLaptop(), ValidAttachment(), SetAttachmentSlotsFlag() were heavily optimized.
2023-09-08 21:58:14 +03:00
kitty624 0962319a43 Fix skill checks for backgrounds during IMP creation
fixed checks for major and minor traits determining available IMP backgrounds

edited disability trait case HEAT INTOLERANT

added case DEAF at disability traits
2023-08-31 02:55:51 +02:00
kitty624 7910be0ab7 Fix personality check for backgrounds during IMP creation 2023-08-30 19:34:30 +02:00
rftrdevandGitHub 6bae48658e Fix personality check for backgrounds during IMP creation (#208) 2023-08-23 00:34:54 -07:00
rftrdevandGitHub b91871b518 Move grenade bonuses from Demolitions to Throwing (#202)
* Copy grenade settings from demolitions to throwing

* Fix setting strings

* Add throwing bonuses to the same spots as demolitions

* Delete grenade bonuses from Demolitions

* Update text

* Reapply throwing check
2023-08-11 11:27:29 -07:00
rftrdevandGitHub aaeea9aac8 Replace evolution with growth rates (#201) 2023-08-09 18:36:44 -07:00
rftrdevandGitHub 7868ddf1c9 Pablo speech fix (#187)
Courtesy of Seven

Fixes #181
2023-07-26 23:44:25 -07:00
rftrdevandGitHub fb03cba2fa New feature: transport groups (#172)
https://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=365395
2023-07-04 20:58:56 -07: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 1770f7f081 Fix illegal array access in imp gear selection (#104) 2023-01-20 20:41:09 +02:00
AsdowandGitHub fc0182118c Display item info in tooltip (#100) 2023-01-20 16:10:16 +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
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
AsdowandGitHub 08982d92e7 Fix illegal array access (#53)
Array length was too small when using old skill trait system.
2022-12-25 17:10:46 +02:00
rftrdevandGitHub 7fb55752fa Fix IMPs having 0 need to sleep (#26) 2022-11-16 23:28:24 -08:00
rftrdev 5000f965e1 Add "Soldier Bounties" mission 2022-10-22 17:54:06 -07:00
Asdow 317f741811 Added assertion with error message to prevent silent crashes/nullptr dereference if loading big item graphics fails.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9396 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-08-16 13:37:08 +00:00
Asdow 9f0a3e03bb Fixed glowing rectangle staying on the screen if one selects an item, clicks Finish button instead of closing inventory pool with checkmark/right click and then goes back to gear selection screen through Attributes screen
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9392 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-08-02 07:42:38 +00:00
Asdow 1f095b7d31 Implemented new IMP gear selection interface to replace the dropdown menus. Requires GameDir rev 2652.
Enrico's letter is forced to the first hired merc in old inventory, similar to new inventory in case a free item pocket is not found.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9391 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-08-01 21:15:34 +00:00
rftr 02a8c48873 fix ARC cashback bug: https://thepit.ja-galaxy-forum.com/index.php?t=msg&th=22776&goto=364578&#msg_364578
also remove incorrect dependency on fAssignTraitsToEnemy for HVT strikes

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9367 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-04-15 16:32:07 +00:00
Sevenfm 67d5aeadb0 Additional Laptop files (by sun_alf).
Example file: https://github.com/sun-alf/BRAINMOD-o/blob/master/Data-BRAINMOD/TableData/Laptop/AdditionalFiles.xml

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9363 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-04-13 10:43:49 +00:00
Sevenfm 6e0a311c4c By default sort AIM names in descending order (original behavior).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9360 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-04-05 18:14:04 +00:00
rftr 746d15a1ba remove magic numbers from the usLimitedToSystem bitflag
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9355 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-04-02 01:11:25 +00:00
Shadooow 033ae4a191 Added two new tags into Items.xml, <FoodSystemExclusive> and <DiseaseSystemExclusive> which prevents specific items to appear without these systems enabled.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9343 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-03-24 05:40:46 +00:00
Shadooow 14ae31c4f1 Partial revert of previous commit from unrelated changes that prevented the build to compile.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9332 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-03-19 02:41:43 +00:00
Shadooow c3bb1c0da5 Option SHOW_SKILLS_IN_HIRING_PAGE removed and made to be enabled automatically.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9331 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-03-18 22:05:29 +00:00
rftr 5cfd9660d8 add mousewheel support to the MERC website, similar to AIM's implementation (hover over a merc's face). shift/ctrl modifiers are applied to the mousewheel, just like A/D/left/right keyboard inputs.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9329 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-03-18 05:19:09 +00:00
rftr f63b121ec8 AIM members can now be sorted ascending/descending by name
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9328 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-03-17 16:33:33 +00:00
Shadooow 0c95fd4f2a Fixed crash in debug mode when opening BR Order Page without any item selected first.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9284 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-31 00:29:11 +00:00
Shadooow 44eccb5eab Adds mouse wheel functionality to AIM member page when hovering mouse over the merc photo and for browsing Bobby Rays inventory pages. If mouse is over an item's big picture, 'ctrl' + mouse wheel will allow adding or removing items from shopping cart (by Asdow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9283 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-27 22:02:13 +00:00
Sevenfm 5c7959adec Removed duplicate macro (by rftr).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9231 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-03 23:13:44 +00:00
Sevenfm 36d67602fd Added camouflage bonus to the survival trait (by rftr).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9193 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-10-24 09:02:48 +00:00
Sevenfm ff172cc92f fix: follow-up minievents properly wait for the specified time (by rftr)
fix: money income from rebel command displays properly in finances (by rftr)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9188 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-10-18 06:15:40 +00:00