Commit Graph
561 Commits
Author SHA1 Message Date
Marco Antonio J. Costaandmajcosta e8aedb29d5 show daily discounted costs for 1week and 2week contracts
also shorten translations to fit the UI
2025-09-26 02:31:02 -03:00
Marco Antonio J. Costaandmajcosta ffe987061e remove DrawMoneyOnScreen
there's already a function to draw text on the screen. a money amount is
text, so just return a string and print that.
2025-09-26 02:31:02 -03:00
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 c62d767622 Update to Master 2025-08-08 18:00:31 +03:00
Asdow 9b83d6a3bc Increase squad amount to 40 2025-08-08 16:39:52 +03:00
Asdow ee2807ae64 Default to 1st kit if deciding not to buy gear in UB
1st one is included in the hiring fee
2025-04-26 00:37:38 +03:00
Asdow b23c9ac8b1 Do not prompt for buying inventory for 1st kit in UB 2025-04-26 00:37:38 +03:00
Asdow fa0c5a2862 Prevent hiring MERC in UB if not enough funds 2025-04-26 00:37:38 +03:00
Asdow db6da100e1 Reset selected gear kit when browsing mercs 2025-04-26 00:37:38 +03:00
Asdow a3e7ce5794 Display special offer for 1st M.E.R.C. inv kit in UB
* Use weekly instead of daily salary for total cost calculation
2025-04-26 00:37:38 +03:00
Asdow 5062ae74f2 Display correct salary info for MERCs in UB campaign 2025-04-26 00:37:38 +03:00
Marco Antonio J. Costaandmajcosta ac6a1504df add a space to string to prevent compilation errors in GB2312 2025-01-05 10:04:04 -03:00
majcostaandGitHub 4a16698cdb CHINESE: actually display BobbyR amount purchased correctly at runtime (#398)
* Revert "Move CHINESE BOBBYR_ITEMS_BOUGHT_X conditional definition to i18n"

This reverts commit ecdc8916f2.

* actually display the amount purchased correctly at runtime
2025-01-03 21:03:09 -03:00
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
Asdow bfb724eab9 Use SoldierID 2024-12-01 18:23:52 +02:00
Asdow de56f653ec Use SoldierID 2024-11-30 23:47:00 +02:00
Asdow 2eb16c583c Use SoldierID 2024-11-30 17:18:04 +02:00
Asdow 845d784bff Use SoldierID 2024-11-20 22:33:33 +02:00
Asdow 2a52347198 Update personnel.cpp 2024-11-20 00:04:29 +02:00
Asdow 648a50f1e8 Convert currentTeamList to SoldierID 2024-11-20 00:01:35 +02:00
Asdow 698176e841 Convert DisplayCharPersonality() to SoldierID 2024-11-19 23:33:11 +02:00
Asdow 8b90c84738 Convert DisplayCharStats() to SoldierID
Moved two repeated print calls to their own functions
Removed compiler warning about exceeding stack size
2024-11-19 23:20:45 +02:00
Asdow be5c4b1601 Convert to SoldierID 2024-11-19 21:41:07 +02:00
Asdow 534ce662f3 Convert to SoldierID 2024-11-19 01:08:26 +02:00
Asdow ff638a5473 Convert to SoldierID 2024-11-19 01:01:41 +02:00
Asdow 5b4be9bcdb Convert to SoldierID 2024-11-19 00:55:36 +02:00
Asdow e9e8080077 Update merccompare.cpp 2024-11-18 23:12:17 +02:00
Asdow f49013307f Convert to SoldierID 2024-11-18 01:01:57 +02:00
Asdow e7fe1d1cda Update LaptopSave.h 2024-11-16 11:55:57 +02:00
Asdow f99065d0c6 Remove unused button callback functions
Unimplemented feature of browsing 4 mercs forward/backwards in personnel page.
2024-11-09 15:30:42 +02:00
Asdow bc870123bf Implement page scrolling in Laptop Personnel page
Pressing Shift and right or left arrow buttons, 'a' or 'd' buttons, or previous or next ingame buttons now advance one whole page. Without shift pressed down, all three function as original and move one merc at a time.
2024-11-09 15:29:07 +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
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