Commit Graph
74 Commits
Author SHA1 Message Date
Asdow e6824bf15d set function static 2025-12-03 23:52:05 +02:00
Asdow 63a58502d1 Remove duplicate includes 2025-12-03 23:52:05 +02:00
Asdow 173f786f55 Remove unused includes 2025-12-03 23:52:05 +02:00
Asdow ea1a3a9e9e Set functions static 2025-12-03 23:52:05 +02:00
Asdow b562b45c00 Externalize tunnel sectors for adding enemies to 2025-11-27 22:38:29 +02:00
Asdow 20ee284e42 Remove transitive include 2025-11-23 18:28:17 +02:00
Asdow ec6401ee5d Initialize variables 2025-11-23 18:28:17 +02:00
Asdow d8d3db89d2 Make functions static 2025-11-23 18:28:17 +02:00
Asdow af1ad3885f Fix typo 2025-11-23 18:28:17 +02:00
Asdow 0199084f05 Remove commented out extern 2025-11-23 18:28:17 +02:00
Asdow 1db9af545c Remove commented out function 2025-11-23 18:28:17 +02:00
Asdow 951a88e947 Combine JA2UB includes with its function declaration ifdef 2025-11-23 18:28:17 +02:00
Asdow b6e276ac34 Formatting & whitespace 2025-11-23 18:28:17 +02:00
Asdow 3a3b415cc5 Remove unused includes 2025-11-23 18:28:17 +02:00
Asdow d0b86e69d8 Combine JA2UB ifdef includes 2025-11-23 18:28:17 +02:00
Asdow 10f6a48f50 Remove duplicate includes 2025-11-23 18:28:17 +02:00
Asdow 18dfda46f2 Remove unused function declarations and commented out functions 2025-11-23 18:28:17 +02:00
Asdow 5f6114fed9 Remove unused files 2025-11-19 21:11:19 +02:00
AsdowandGitHub 264105071a Load old ObjectData correctly (#553)
* Load old ObjectData correctly

ITS changed ObjectDataStructs::OBJECT_BOMBS_AND_OTHER::ubBombOwner data size from 1 byte to 2 bytes, and it was not taken into account when loading ObjectData
2025-11-11 20:14:46 +02:00
Marco Antonio J. Costaandmajcosta 219cc6f88d missed one 2025-10-10 17:54:58 -03:00
Marco Antonio J. Costaandmajcosta 8257f2c9df edit remaining default settings
TODO make this have a single source of truth instead of three or four
2025-10-10 17:51:08 -03:00
Marco Antonio J. Costaandmajcosta c6fd81d289 Fix discrepant TOPTION values in GameSettings.cpp
Ja2_Settings was supposed to be automatically generated but over time we
started to edit defaults either there or in GameSettings.cpp inconsistently
2025-10-09 21:53:55 -03:00
Marco Antonio J. Costaandmajcosta 3d29eff4d8 use FormatMoney everywhere 2025-10-08 05:36:37 -03:00
stephandmajcosta f6ae1a96cd Some BP, and snitch settings were using wrong mapping 2025-10-07 20:41:24 -03:00
Marco Antonio J. Costaandmajcosta e14a337e03 Prevent AllowReinforcements from reverting to TRUE regardless of setting whenever you save 2025-09-25 15:27:30 -03:00
Asdow d21b487884 Fix include filenames 2025-09-25 13:06:18 +03:00
Asdow f47908e033 Fix debug mode defines
JA2BETAVERSION gets defined in cmake depending on selected config
2025-09-24 19:21:58 +03:00
Asdow 82aca548f5 Merge branch 'master' into ExtraMercs 2025-09-24 16:14:10 +03:00
Marco Antonio J. Costaandmajcosta 216cd78b18 Let players make an IMP with 3 major and 0 minor traits 2025-09-02 20:02:15 -03:00
Marco Antonio J. Costaandmajcosta 7d9cd87da8 fully externalize bQueenLosingControlOfSector 2025-09-02 20:01:47 -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 e8399bb7c8 Make backpack AP stance costs depend on actual weight instead of a bool checking if a backpack is equipped or not (#486)
* Externalize the Divisor for usBackPackWeight

A new ini value BACKPACK_WEIGHT_FACTOR is introduced to replace the hard coded 50.
The value goes from 1 to 250 and its default value is 50 as before.

* Refactor usBPPenalty into its own function GetBackbackAPPenaltyFromBackpack

The same code is also used in GetAPsCrouch as well as GetAPsProne

The intent of the change is to make sure that backpacks including their content
do not add an additional AP cost of +1. Now it checks if
the backpack weight is > ubBackPackWeightFactorForAPPenalty (default value 50).
The min exists to make sure that the AP cost does not become higher than previously.

Previously the bool fBackpackCheck was used to add +1 if there is any backpack.
But this also includes an empty tactical sling (backpack with 0.2 kg) and
therefore makes the item much less interesting to use.
2025-08-15 22:52:43 +02:00
Asdow f3194718e4 Remove useless check for savegame version
ITS breaks save games.
2025-08-08 21:21:48 +03:00
Asdow c62d767622 Update to Master 2025-08-08 18:00:31 +03:00
Asdow 1074e9c408 Fix save game compability for MERCPROFILESTRUCT 2025-08-07 21:34:54 +03:00
kitty624 4ae331c19e IniOption Food items can show without using Food
- food items are usualy not shown in game without using Food
- option ALWAYS_FOOD allows them to be shown even without
- default is false, no food items without Food
2025-08-03 08:12:48 +02:00
Asdow 09ce332721 Allow 10 size squads for 720p resolution in UB 2025-06-27 16:00:10 +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 efb54202ea Fix Mercprofile usStrategicInsertionData for bigmaps
NPCs would not appear in the map if their gridno was over 65535 in large maps
2025-06-15 14:42:34 +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 9c951adfea Read correct variable from CTHconstants.ini 2025-02-24 16:11:58 +02:00
Marco Antonio J. Costaandmajcosta ff8376d625 Keep UB specific enum value for all builds
but at the end, not beginning as to not make a mess

along with an intro.lua change in gamedir/Data-UB/Scripts this gets rid of a nasty preprocessor conditional in a header file
2025-01-09 21:34:07 -03: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. Costaandmajcosta f471b74f5b fix inconsistent case for a few files
you can now build in a case-sensitive filesystem
2025-01-04 13:14:22 -03:00
Marco Antonio J. Costaandmajcosta b908bcecb9 fix missing icon in executable
the Ja2.rc file needs to be in the add_executable target for the icon
to appear, and that one requires WinMain.

so get rid of dummy.cpp and put sgp/sgp.cpp in there
2025-01-02 08:02:52 -03:00
Marco Antonio J. Costa 959c29434e Adjust the build system
Language is now just built once per app (still some JA2UB conditionals
going on in there) but building everything should now take eight times
less work
2024-12-31 18:24:36 -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