Commit Graph
1185 Commits
Author SHA1 Message Date
Asdow f5a7c32bff Use SoldierID instead of pSoldier
ContinueDialogue was possible to be called with pSoldier that isn't null but is not valid pointer to MercPtrs array resulting in debugger catching an illegal memory access.
2025-09-25 22:47:51 +03:00
Asdow 82aca548f5 Merge branch 'master' into ExtraMercs 2025-09-24 16:14:10 +03:00
Marco Antonio J. Costaandmajcosta 4ec012ce7b fix bug where combat doesn't end on team retreat
fixes issue #498 where retreating from combat in a sector that has a merc
inbound via the airdrop marker causes combat not to end

the reason this fails is that a the inbound soldier counts as being in
the sector being retreated from, even though he isn't

I add a check for `MercPtrs[i]->bInSector` so this doesn't happen

that way the function doesn't leave early and CheckForEndOfCombatMode is
reached
2025-09-11 22:00:32 -03:00
Marco Antonio J. Costaandmajcosta ac59eba898 get rid of unnecessary #defines 2025-09-05 20:31:11 -03:00
Marco Antonio J. Costaandmajcosta 7d9cd87da8 fully externalize bQueenLosingControlOfSector 2025-09-02 20:01:47 -03:00
Buscherandmajcosta 1004ab6c8c Added Right Click to time compression to fast forward a single hour 2025-08-24 15:06:10 -03:00
Marco Antonio J. Costaandmajcosta 3c44f133fd Actually fix NOTIFY_IF_SLEEP_FAILS for multiple mercs selected 2025-08-24 07:39:00 -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
BeatAroundTheBuscherandGitHub e9b12908f7 ASD/ARC: Fix Error by One in gasCan Vector (#472)
* ASD/ARC: Fix Error by One in gasCan Vector

* Add size check for the gasCan vector as part of ARC

* Remove unused Vectors for ARC
2025-08-15 18:40:43 -07:00
Marco Antonio J. Costaandmajcosta 616d9a08e6 Fix NOTIFY_IF_SLEEP_FAILS for multiple mercs selected 2025-08-12 23:18:49 -03:00
Asdow c62d767622 Update to Master 2025-08-08 18:00:31 +03:00
Asdow d078a3439f Fix squad movement popupbox for increased squads 2025-08-08 17:01:13 +03:00
Asdow 9b83d6a3bc Increase squad amount to 40 2025-08-08 16:39:52 +03:00
Asdow c3a34a660d Check squads are on the same level 2025-08-07 22:02:49 +03:00
AsdowandGitHub 7bb7c54317 Guard against integer underflow (#462) 2025-07-20 17:30:22 -07:00
Asdow 49a56d01ac Load correct militia icons for 720p resolution 2025-07-08 20:21:54 +03:00
Asdow 9d1e9e8948 Fix line highlighting 2025-06-27 20:28:15 +03:00
Asdow 5e2c61ef12 Externalized UB bloodcat quest sector 2025-06-25 22:54:53 +03:00
Asdow a1bb85ca95 Externalize fan exitgrid location in the source sector 2025-06-24 22:54:44 +03:00
Asdow c02bbc90cb Fix helicopter for UB
No need to force an assert error here. We can simply ignore the meanwhile scene just like all the others.
2025-06-18 22:58:17 +03:00
Asdow 8dcb431ef2 Use (0,0) sector coordinates as unused cache
Makes the comment in Mod_Settings.ini valid advice
2025-04-17 23:51:44 +03:00
Asdow 8f98a9b985 Move UpdateAirspaceControl() out of #ifdef
Fixes UB not updating samsite airspace correctly after battle
2025-04-16 01:28:07 +03:00
Asdow 36a84ffe59 Remove pSecondColumnString
* Use the new columns added to Text instead
* Changed most functions to allow choosing a column
* Removed unneeded SecondColumn specific functions to lessen code duplication
* Lots of formatting changes to Popupbox.cpp, indentation was messed up in majority of the functions
2025-04-13 22:26:32 +03:00
Asdow 865288e622 Implement multicolumn popupbox
Mainly aimed for strategic movement popup box to accommodate increased team sizes
2025-04-13 19:11:45 +03:00
Asdow da3c3bace8 Use mouse position for squad movement popup box initial location 2025-04-09 23:11:11 +03:00
Asdow ec4dc8b058 Provide gMapViewRegion through mapscreen.h 2025-04-09 23:10:32 +03:00
Asdow 07320ba996 Limit TeamList mouseregions to correct amount 2025-04-09 21:33:28 +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
Asdow dcf202990f Remove duplicate header includes 2025-01-05 17:08:02 +02:00
Asdow db40cd433e Move mapscreen bottom coordinates' initialization
Fixes radar map's initial  position in strategic screen being in the top right corner.
2025-01-05 17:08:02 +02:00
Marco Antonio J. Costa 70f09471c2 just cast g_lang into lua's language code
because magically I got the enum order right first try
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
Marco Antonio J. Costa 5d19c1fe25 make conditional CHINESE preprocessor def into global constant 2024-12-31 16:28:44 -03:00
Asdow 5b966b4df9 Provide MAX_TACTICAL_ENEMIES to lua 2024-12-24 00:16:09 +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 20a33893d9 Fix Teamlist for smaller resolutions
Merc names were being printed past the end of teamlist area
2024-12-04 20:49:53 +02:00
AsdowandGitHub 11bb0f741f Fix music playing when crepitus is present (#341)
UseCreatureMusic( HostileZombiesPresent() ); was overriding the music mode set in PrepareCreaturesForBattle() when encountering crepitus or being in the creature caves, resulting in regular tense and battle music being played.
2024-12-02 01:10:58 +02:00
Asdow abe6877d90 Delete VS project files
Remnant from the initial branch commit
2024-12-01 21:51:56 +02: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 79b57c326e Move check for surgery into its own function 2024-11-30 18:29:55 +02:00
Asdow c2b1ac0109 use SoldierID 2024-11-30 18:29:17 +02:00
Asdow 5bbbec18bb Use SoldierID 2024-11-30 17:06:11 +02:00
Asdow 24656f2810 Use SoldierID 2024-11-30 15:20:18 +02:00
Asdow 0d97e36c34 Use SoldierID 2024-11-21 23:56:44 +02:00
Asdow d687956cf1 Remove unused function 2024-11-21 21:53:48 +02:00
Asdow 94f2e830e0 Lessen repetition 2024-11-21 21:53:36 +02:00
Asdow 67c8081104 Use SoldierID 2024-11-21 21:29:28 +02:00
Asdow 0dc2ceabb2 Use SoldierID 2024-11-21 19:48:54 +02:00
Asdow 1ec2867ced Use SoldierID
Fixed if conditions as well
SOLDIERTYPE::ubProfile would never match with values above NOBODY
2024-11-20 23:02:39 +02:00