Commit Graph

101 Commits

Author SHA1 Message Date
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
Michael Bonfils
d940f2c39d Merge branch 'linux' into merge_linux 2018-02-08 20:36:46 +01:00
db6132bb03 Fix MSVC warning in catch.hpp 2017-09-16 12:56:56 -04:00
9127e4a03f Enable building tests in MSVC 2013 2017-09-16 12:46:31 -04:00
c2ce2a2cd1 Split up the graphtool files 2017-04-14 15:43:07 -04:00
82abdab695 Major code reorganization
This commit only updates the XCode project for the changes.
A later commit each will update it for scons and MSVC.

A few actual changes are mixed in:
- Add a prefix header for a handful of common definitions
- Moved current_cursor into the Cursor class as a static member
- Removed the make_cursor_sword and make_cursor_watch functions
- Include tests in the All target
- Remove redundant -l flags for Common and Common-Party (since they're included in the Link phases anyway)
2017-04-14 00:24:29 -04:00
766853d7a4 Fix unit tests 2017-04-11 20:42:25 -04:00
73cfe2bd24 Merge branch 'master' into linux 2017-01-30 14:02:41 -05:00
ultra
dde0212dc4 renamed sounds to match filenames in source (lowercase .wav), fixed up scenario and character editors 2017-01-26 17:17:33 -05:00
8edc156496 Finish tests for converting legacy special nodes 2016-09-29 22:23:17 -04:00
5c095fb284 More tests for importing legacy special nodes
Errors fixed:
- If Cave Lore / Woodsman not converted correctly
- If Have Item Class Equipped erroneously converted to its +take variant
  (...probably)
- Text Response didn't correctly convert the alternate answer
2016-09-26 20:01:05 -04:00
b18605a8ad More tests for converting legacy special nodes
Errors fixed:
- Affect Party Status nodes were erroneously converted to Affect Status instead
2016-09-26 01:53:22 -04:00
1e084fa5af Add more tests for converting legacy specials
Errors fixed:
- Picture forced to 19 for stairway nodes.

(The game actually did this, and also forced to 22 for portals,
but I decided that wasn't necessary to preserve.)
2016-09-25 20:16:24 -04:00