Commit Graph

177 Commits

Author SHA1 Message Date
f58d95496d fix unit test for last_cast change 2025-01-20 13:42:26 -06:00
17a4c25d3c Merge pull request #534 from NQNStudios:fix-479
Fixing text buffer texture/font corruption (#479)

* #479 demonstrates that the contents of the text buffer are NOT irrelevant for reproducing bugs. So I set up recording/replay for the burma shave easter egg. This also makes an easy way to mess with the buffer state when debugging (just mash &/\*/&/\*/&/\* n times)
* When a replay throws an error, it puts up a showError() dialog. If the next action is a control_click, the system will try to click that control on the error dialog--which is totally divergent from the replay's intended behavior. So we should just stop replaying when an error happens.
* If you have a long replay and want to run it very fast, but then slow down when you get to the sequence that reproduces your bug, now you can add a `<change_fps>` to your replay to achieve that.
* Fixes for the 2 legacy replay errors that I opened recently

Fix #479 
Fix #532 
Fix #533
2025-01-20 09:10:17 -05:00
9d12177eef test don't expect newline in empty player name 2025-01-16 17:12:31 -06:00
4cbe474431 add check_for_interrupt to boe_test 2025-01-16 17:05:20 -06:00
5936b1c579 global vector for extra scenario directories 2025-01-15 23:05:52 -05:00
34dd31cf51 Remove 3 obsolete settings 2024-12-03 09:44:40 -05:00
9df9d4ae23 replay shows 511 is fixed 2024-12-01 18:43:35 -05:00
1563096f06 Add prefab party for recording spellcasting 2024-12-01 18:43:35 -05:00
94bb4c7e41 Replay reproduces crash #511 2024-12-01 18:43:35 -05:00
1ae3715618 unpack the modern-format test scenario 2024-11-30 22:52:53 -05:00
e5ef638061 legacy scenario and replay show the bug is already fixed 2024-11-30 22:52:53 -05:00
3de10ec741 replay test shows #8 does not affect new scenario format 2024-11-30 22:52:53 -05:00
34702d588e remove placeholder replay 2024-11-30 22:52:53 -05:00
dd347a5f79 replace the debug flag with a release flag 2024-11-30 17:58:42 -05:00
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