Commit Graph

355 Commits

Author SHA1 Message Date
afb9554eda Fix all scenario editor compiler warnings except the ones in the Boost.Process header. 2025-08-01 23:25:22 -04:00
7ed3f36351 scenedit always play sounds when working with sounds 2025-06-18 11:37:39 -05:00
472f80896a fix inheritance of undo()/redo() in cTerrainAction 2025-06-14 11:48:40 -05:00
f4aa9780e0 delete last town is just the inverse of create town 2025-06-04 09:55:58 -05:00
862fff6c2f remove num_actions 2025-06-04 09:55:57 -05:00
b6fb93f199 scenedit undo/redo infrastructure 2025-06-04 09:55:56 -05:00
075cdd2f86 Debug logging for scenedit undo/redo system 2025-06-02 11:32:20 -05:00
1084f26a88 Count preferences dialog when detecting max UI scale to fit (Fix #740) 2025-05-23 09:11:27 -05:00
99b0c9a227 Fix scenario editor launch scenario feature run from .app
Fix #729
2025-05-19 21:41:10 -05:00
ddeecc9956 add range check to vector2d 2025-05-19 21:41:03 -05:00
c718a9a186 Revert "use at() to get exceptions"
This reverts commit d91d5425d3f2b6ad9f1975c948e064faa4c251a4.
2025-05-11 10:49:46 -05:00
973cd71627 Replay errors show line number of action
I would have done this FOREVER ago but every time I looked
in ticpp for a way to get element file positions I somehow
missed Row() and Column()
2025-05-11 10:49:33 -05:00
c0008e183a use at() to get exceptions
I encountered a new error from an out-of-bounds access on a
terrain array, which I wasn't able to record because it caused
a segfault, not throwing an exception. If the error happens again,
I want to catch and record it.
2025-05-11 10:49:32 -05:00
07c15dc1e7 Fix window focus bugs for Windows 2025-05-11 10:49:31 -05:00
3ba9259482 Remember window positions as preferences 2025-05-11 10:49:21 -05:00
447f9739a4 Remove RepeatRoomDescriptions, which never did anything
Fix #712
2025-05-06 15:24:13 -05:00
5112673ebf functions in the game for profiling slow dialogs 2025-03-16 14:03:53 -04:00
5cfc6ba328 Fix all the compile warnings that occur on Mac.
(Except the OpenGL deprecation warning and some warnings coming from Boost.Process.)
2025-03-08 20:43:04 -05:00
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