Commit Graph

337 Commits

Author SHA1 Message Date
628b0ee677 Add a new spell pattern picker.
The picker is used in the special node dialog and also in monster abilities.

Some changes were made to the game as well:
* If the rotatable wall is used for a field missile or touch ability, there's no longer an option for the designer to pick an orientation. Instead, it behaves like the rotatable wall in a radiate field ability, selecting an orientation based on the creature's facing direction.
* The magic values sent to place_spell_pattern for direct damage were rearranged to match the order of the eDamageType enum. This should have no effect, since the core place_spell_pattern function is only called by the various wrapper overloads. It also simplifies the code quite a bit.
* The Protective Circle spell pattern is now exposed to the place patten special nodes. It can be used as just a radius 4 circle, but the effect of different layers of fields can also be obtained by specifying a field type or damage type of -1.

There is also a change to the dialog engine:
* Calling setText() also implicitly calls recalcRect()
2025-03-08 20:05:12 -05:00
2396637d23 Implement file picker load/save normal 2025-03-07 08:43:09 -05:00
Nathan R
598fd4836a Fixed up: Move file-static RenderWindow and RenderTexture instances inside functions to fix GL race condition on startup (#682) 2025-03-06 19:40:40 -05:00
8ba173e5eb Record replays into AppData 2025-02-23 09:38:23 -06:00
64702b3a88 support for recording replay in memory 2025-02-23 09:38:22 -06:00
f80f8a932a Implement a feature flags system.
* Scenarios contain a string map of feature flags. The flag names are the keys, and flag versions are the values, so a typical value might be "fixed" for bug fixes or for evolving features, "V1", "V2", etc.
* The game has a map of flags to lists of supported versions. The game can therefore signal that it supports a legacy behavior for a given feature flag. The last version in the list is considered to be this build version's default behavior.
* When launching a scenario, we check to make sure the game supports the scenario's required versions of its feature flags.
* When launching a replay, we make sure the game supports the feature flags that the version of the game that made the recording did.

Fix #555
Close #591
2025-02-19 22:32:12 -05:00
3bd8874147 make all targets compile text-based pref handling in prefs.cpp
mac replays use preference std::map
2025-02-14 09:54:33 -05:00
1d25b447e7 fix typo in mac preference recording code 2025-02-14 09:54:32 -05:00
a3ddff55aa add was_replaying to track how the game started 2025-02-14 09:54:32 -05:00
aed913a7f4 use bool_to_str 2025-02-14 09:54:32 -05:00
c20dbbf88e DRY launch doc url 2025-02-07 09:51:45 -05:00
f6be98acfb Fix win-scons CI (#531)
* scons follow reference to c++ compiler
* don't worry about testing C compiler
* on failure, compile test program
* fix windows DEBUG definition flag
* add source file to win-scons SConscript

This fixes #514
2025-01-22 09:14:24 -05: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
df02f79ab8 fix explosions breaking old replays 2025-01-16 16:53:36 -06:00
3455327363 Mac replay ignore obsolete settings (fix #532) 2025-01-16 12:09:10 -06:00
80aa0341a1 properly force string prefs to be quoted on win/linux 2025-01-15 23:05:53 -05:00
aa58b3cb41 push_front() doesn't exist -- use insert() 2025-01-15 23:05:53 -05:00
2c5fe3485f include fileio.hpp 2025-01-15 23:05:53 -05:00
adb4b8a027 fix template syntax 2025-01-15 23:05:53 -05:00
056fbfe393 use existing string quoting functions 2025-01-15 23:05:53 -05:00
1bf9c71865 get_ and set_ string prefs windows/linux 2025-01-15 23:05:53 -05:00
213b61e7ec hack tinyxml to save/load string prefs win/linux 2025-01-15 23:05:53 -05:00
8e3256a5b9 use UTF-8 for string preferences 2025-01-15 23:05:53 -05:00
18b32194dd implement string preferences for mac
they don't need to be recorded/loaded in replays yet so I didn't do that part.
2025-01-15 23:05:53 -05:00
73e85836a3 we've been using the wrong define for mac detection 2025-01-15 23:05:52 -05:00
65dbf8dc88 Merge pull request #519 from NQNStudios:sounds
* Changed shop purchase sound effects where Yum! definitely didn't fit. For alchemy, mage spells, and priest spells, I made the sound the same as the sound when you perform those actions. I figure this actually makes sense because the teacher would show you how to do the thing.
* For skill training, I made the sound be the same as leveling up. I think this makes sense.
* When something is too heavy to pick up, the "Argh!" labeled as 'Action Failure' in the editor sound picker makes a lot of sense--you tried to pick it up and were frustrated.
* I changed beep() so every platform just plays sound effect 1, the one labeled "low beep" [here](http://openboe.com/docs/editor/appendix/Sounds.html) that's labeled "Cancel target lock" in the editor picker. I think this reasonable.
* Removed `ding()` which was an unused alias for `beep()`
2025-01-07 21:34:08 -05:00
34dd31cf51 Remove 3 obsolete settings 2024-12-03 09:44:40 -05:00
42e51a3b36 make beep() use a game sound on Linux 2024-12-01 18:50:13 -06:00
e187f07307 Revert "make beep use a game sound"
This reverts commit 44881905cf.
2024-12-01 18:49:07 -06:00
a665ec9033 Improve replay system CLI handling 2024-12-01 18:43:12 -05:00
44881905cf make beep use a game sound 2024-12-01 17:21:45 -06:00
b441401475 wrap pollEvent() to guarantee all loops handle modifiers (#477) 2024-11-23 17:46:54 -05:00
6d6f25f326 Fix #476 directly 2024-11-23 14:05:37 -05:00
9d972a3961 Pick the largest suitable default scale. Fix #468 (#472) 2024-11-19 19:17:15 -05:00
77297c2a88 wrap load_party base64 data 2024-11-10 00:32:17 -05:00
c81e56baf9 make cosmetic advance_time() mismatches warnings unless --strict 2024-11-10 00:32:17 -05:00
d47249b404 rename control_click to click_control 2024-11-10 00:32:17 -05:00
56f3337e6f prefix action debug prints 2024-11-10 00:32:17 -05:00
1a6f005a36 change --advance-time to --verbose, w/ better replay behavior 2024-11-10 00:32:17 -05:00
22ffc1201b discard control_click when tracking last_action_type 2024-11-10 00:32:17 -05:00
d5aa280e4a record and validate advance_time() calls with --advance-time 2024-11-10 00:32:17 -05:00
9548369023 linux zenity installation message
fix nqnstudios#2
2024-09-22 13:22:47 -04:00
6f0661e276 Fix #451 2024-09-22 11:28:27 -04:00
33a2df5145 combine the conditional compilation block 2024-09-15 22:14:53 -04:00
46f48b94ed compile-guard some git logging for MSBuild 2024-09-15 22:14:53 -04:00
640492a428 record the git repo 2024-09-15 22:14:53 -04:00
d5df0e4e8f record SHA, tag, and git status in action log 2024-09-15 22:14:53 -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
71a9d11cd0 Gather all alchemy info into a single place 2024-09-10 22:18:59 -04:00
e7a56f08a2 use text for bool representations 2024-09-03 00:08:26 -04:00