Commit Graph

113 Commits

Author SHA1 Message Date
992768131d thoroughness level 2 - use --strict 2024-11-10 00:32:17 -05:00
d47249b404 rename control_click to click_control 2024-11-10 00:32:17 -05:00
cbc58afe0f replay test bash script (tested, works on mac) 2024-11-10 00:32:17 -05:00
cd50a0183d track whether current scenario pushed paths 2024-09-21 20:57:22 -04:00
2d0b249d43 reorder includes 2024-09-21 20:57:22 -04:00
34b7eb9a76 Issue #101 unit test (should fail) 2024-09-21 20:57:22 -04:00
0eda9f40a1 win-scons don't exit with error msg on test failure 2024-09-20 20:22:56 -04:00
df79344bb1 scons exit with non-zero test failure exit code 2024-09-20 20:22:56 -04:00
c227b00553 Fix my dialog construction test case's file loading 2024-09-17 20:49:05 -04:00
8a522bdcbf Fix #444: win-scons include Visual Studio debug symbols 2024-09-17 20:48:32 -04:00
a4231005f6 Add a new "rechargeable" flag to items
A way to set this flag is not yet exposed in the scenario editor.
The flag is intended only for non-stackable items, but this currently isn't enforced.
Items now have a maximum number of charges, which is equal to their default number set in the item record.
Enchanted items with charges are now rechargeable.
2024-09-10 22:18:59 -04:00
6965b822dc Gather all enchantment info into a single place
This also resolves several TODO notes about duplicate code and makes cPresetItem::ability an eEnchant
2024-09-10 22:18:59 -04:00
17aec7c73c Fix unit tests 2024-08-22 08:43:53 -04:00
4d4ab09395 Update Catch to v2.13.10 2024-08-10 15:16:24 -04:00
b7692c2fa6 use specific stringstream types 2024-07-28 17:07:33 -04:00
54ac26b4da allow parsing locations 2024-07-28 17:07:33 -04:00
4a7d145168 Fix win scons (#359)
* fix a link flag
* another hack to find weirdly named libraries
* Fix handling VCRedistInstall.exe
* add src folders to win-scons include paths
* use path.join
* more weird library suffixes
* fix old python syntax in an SConscript file
* find vcpkg libraries and headers
* add icon dir to windows include paths
* remove non-recursive os.listdir line
* remove bad lib paths
* tools build with env["bits"]
* hard-code vcvarsall.bat path, with a note
* pass in other lib paths
* fix syntax without trying to use f-strings
* more bundled libs on windows
* add bin folders for windows installation to find dlls
* fix CheckLib stuff
* test scons pass X86 correctly
* make 64-bit builds the default for scons
* add package flag for building installers
2024-06-12 13:52:19 -04:00
1442e290a0 Specify overloads for visual studio 2023-01-28 22:05:14 -05:00
b03c34396d Split quest flags into two separate boolean values 2023-01-22 18:56:50 -05:00
b929852e22 Maybe the MSVC build failure is because they have the same object name? 2023-01-21 17:01:25 -05:00
effc355fe1 Enable the dialogs test in Xcode and fix one dialog that failed
This also makes the test itself better
2023-01-21 16:36:31 -05:00
76ee270c6e Add some new features to our quoted string parser, and a unit test
- Now supports \n \t \f escape sequences
- Now supports strings with literal tabs
2023-01-21 15:55:58 -05:00
20102c7f52 vector2d: few more tests 2023-01-18 09:53:19 -05:00
2492610ec7 Reading and writing saved games now uses the new tagfile system.
This should avoid any format inconsistencies, like missing newlines and the like.
Although a basic save and load works, there may still be some issues with the format.
This probably renders older saved games incompatible.
The format is mostly the same, but there are a few small changes
in the name of making the format more uniform.
2023-01-18 00:54:39 -05:00
99bd1678e4 tagfile: Support mapped containers, similar to a sparse array
Note: This now treats vector<pair> as a mapped container as well – an ordered multimap, so to speak
2023-01-18 00:54:39 -05:00
50d611e319 tagfile: Support vector2d, both sparse and dense 2023-01-18 00:54:39 -05:00
9aa0262247 vector2d: row/col assignment (+test), default value in resize 2023-01-18 00:54:39 -05:00
50bd1e9c6e tagfile: A few more tests; support sparse arrays 2023-01-18 00:54:39 -05:00
d3ed054bbb tagfile: Support hexadecimal integer tags 2023-01-18 00:54:39 -05:00
e5b347c70f tagfile: A few more tests; fix tuple handling 2023-01-18 00:54:39 -05:00
657df9ea8d Rework the tagfile library
After further experimentation, the previous template-heavy design
turned out to cause issues with compilation.

Thus, it has now been replaced with a simpler, dumber implementation
that pushes more of the logic into the caller.
2023-01-18 00:54:39 -05:00
35a890a577 Add a partial unit test for vector2d and fix several issues with the resize function 2023-01-12 21:26:08 -05:00
8872f1aa25 Stop storing players as bare pointers - use unique_ptr instead
Should fix some potential memory leaks that were caught by static analysis
2023-01-12 21:26:08 -05:00
ac5cbe3a60 Test case for dialog XMLs in-engine 2023-01-08 17:25:33 -05:00
6319d46d67 Fix compilation on Xcode 4
- Add new files to project
- Xcode 4 doesn't support inheriting constructors
2023-01-07 14:27:02 -05:00
71f9dd0043 TagFile refinements
- Use a custom prefix system for tagfiles - f for a file, p for a page, t for a tag
- Add a hex tag that reads and writes a number as hex
- Ensure booleans are always read and written as alpha
2023-01-07 13:55:04 -05:00
cb73719af3 Make item abil_data a bit more readable
A two-element array is an ugly thing to behold
2023-01-06 02:13:46 -05:00
81bea5a01a Add use flag assertions for every ability in the unit test 2023-01-06 01:23:48 -05:00
baf8bfd5c7 Make flight ability usable outdoors 2023-01-06 00:55:11 -05:00
ae9ea960f1 tests: Make sure this is initialized 2023-01-05 19:52:30 -05:00
4b336d06fb add Catch2 to scons build 2023-01-05 02:10:20 -05:00
b469b3aeea Add a new class to encapsulate the file format used by save files
The class is not yet used in the wild, but does have a unit test
2023-01-04 19:57:12 -05:00
f6f7cd59dc Make catch a submodule so it can be updated more easily 2022-07-12 20:35:45 -04:00
df631f6c3c fix unit tests 2022-07-12 20:35:45 -04:00
5b2561d034 Disable header maps in Xcode 12 2022-07-12 20:35:41 -04:00
7b93726383 Replace 4-character constants with enums
This covers only the places where they were used to indicate
a preset selection in constructors.

The usage in qdpict where they're actually passed to the Resource Manager,
as well as the 4-character constants representing file types and creator
codes, are still present.
2020-02-21 00:16:58 -05:00
511b1858a3 Fix Windows build and tests 2020-02-02 22:32:33 -05:00
542c037342 Integrate a new resource manager which should have better performance 2020-01-26 11:53:19 -05:00
9691470611 Fix the legacy special tests 2020-01-19 16:26:24 -05:00
699e66a69c Remove obsolete failing test 2019-12-29 13:26:00 -05:00