Commit Graph

123 Commits

Author SHA1 Message Date
e95d4dcaf8 Write editor state to a new, separate xml file (fix #728) 2025-05-11 10:51:02 -05:00
18f4f17943 +/- keyboard shortcuts for zoom 2025-05-11 10:50:04 -05:00
58107f1856 str("") is unsafe on its own for clearing stream 2025-05-11 10:49:27 -05:00
2fd35b1053 Rework the scenario editor toolbars.
* The rightmost column is now mostly dedicated to non-modifying operations – eyedropper and zoom are moved there, pushing the 3 palette buttons down in town mode.
* Set Starting Location and Set Town Boundaries moved from the menus into the toolbar.
* Place Same Creature and Place Same Monster removed, since placing a monster or creature no longer resets the mode, so you can place as many of the same one as you like.
* Erase Town Entrance removed – what is it even good for? Removing the entrance without removing the town terrain is nonsensical. A town entrance can now be erased just by painting over it.
* Copy Item, Copy Monster, and Copy Terrain added. The latter copies a rectangle of terrain.
* Paste Special is removed. Instead there's a generic Paste button which pastes whatever type of thing you copied last, whether it be a special, a monster, an item, or even some terrain.
* Horse and boat no longer share a row with road. Instead, some of the fields have been reshuffled, so now fields take up three rows (though not three complete rows)
2025-03-16 14:09:05 -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
b546f9c5e5 Omit the Create New String option for sign and area rect strings, as creating one here would leave it orphaned 2025-03-08 20:05:12 -05:00
a1bc923de8 Remove the Edit Saved Item Rectangles menu item in favour of a toolbar button.
The limit of 3 saved item rectangles has been removed - you can now add as many as you want.
However, the 1 per town limit is now strictly enforced.

The saved item rectangle is now shown with a cyan border when editing town.
2025-03-08 20:05:12 -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
e082edf24a Remove reference to Blades of Exile license.
I don't know what it was, but I don't think we could enforce
one even if we wanted to. And it was probably to protect
Spiderweb's IP in the game, which is now Free, so there's
not much point.
2025-01-24 09:56:44 -05:00
77b11fe12a stricter maximum for talk node scrollbar. fix #144 2025-01-24 09:56:44 -05:00
145824ea84 Handle exiting town with multiple entrances 2025-01-21 16:26:56 -06:00
e303363900 prompt to go to town's entrance in the outdoors 2025-01-21 16:02:37 -06:00
6b575a0463 when hopping sections, make cen_x and cen_y match last pos 2025-01-21 15:43:13 -06:00
74dbc07e23 editing outdoor terrain: prompt to jump to next sections 2025-01-21 15:36:22 -06:00
7b92779e13 make switching outdoor sections DRY 2025-01-21 14:35:31 -06:00
37640bf349 fix compiler warnings 2025-01-20 09:41:29 -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
34785c3254 fix check_for_interrupt stubs in editors 2025-01-16 16:53:37 -06:00
62313e5bd6 allow interrupting replay 2025-01-16 16:53:34 -06:00
11767f553d more understandable prompt to save 2025-01-15 23:05:53 -05:00
d870180591 Update copyright notices and contact/pricing info.
Close #499
2024-11-30 19:19:34 -05:00
30e583b1d4 Address compile warnings (Xcode 12) in the editors 2024-08-10 12:58:01 -04:00
84b649a107 Fix dead store warnings from static analysis of the scenario editor 2024-08-10 12:45:35 -04:00
c8df04ab04 More taking advantage of the common superclass of cTown and cOutdoors 2023-01-22 14:07:26 -05:00
2539c28fe2 Prefer to call is_on_map() for terrain bounds checking whenever possible
Fix some cCurTown field functions not having bound checking
Scenario editor now takes better advantage of cTown and cOutdoors sharing a superclass
2023-01-22 14:07:26 -05:00
6b56f4af86 Add bounds-checking to coord_to_ter in the scenario editor 2023-01-18 10:00:08 -05:00
3bdcf02be0 Handle modifier keys differently to avoid Apple flagging us as wishing to monitor input from other applications
Fixes #291
2023-01-12 21:43:45 -05:00
f70f63eead Update and clean up the Visual Studio 2017 project files
These were very shoddily put together!
It seems the person who made them never really tried building
the editors or the tests.

Also included here are a couple of minor source changes that are needed
to make the project files build.
2023-01-05 19:29:16 -05:00
5b2561d034 Disable header maps in Xcode 12 2022-07-12 20:35:41 -04:00
deac7b0cb6 Merge pull request #251 from x-qq/fix_scrollbar_segfaults
fix for scrollbar segfaults

* fixes #206
* fixes broken mousewheel scrolling of the scenedit palette
* removed boost threads dependency
* added foundation for further refactoring of the drawing and event handling code: interfaces and drawable manager with layering
* removed a bunch of unneeded redraw calls
* removed some repeated recalculation of effectively constant values (boe.actions)
* removed recalculation of effectively constant scrollbar and button positions (boe.graphics)

Closes #251
2020-02-09 15:55:51 -05:00
1d61d48ec3 Enable UI scaling in the scenario and implement Linux menus
Patch from @x-qq
Addresses #195

Note: UI scaling for the scenario editor still needs some work,
but it's basically functional.
2020-01-28 20:13:24 -05:00
c21b0b8de7 Fix #155 2018-02-18 16:26:10 -05: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
683ab805ec Initial framework for scenario editor undo/redo
In addition to the framework, this enables undo/redo of one action - adding a new town
2017-02-12 18:27:01 -05:00
e38053d39f Remove some spurious scenario editor error messages
These errors are all no longer necessary due to the editor loading the entire scenario into memory at the same time
2017-02-12 18:19:29 -05:00
92ba1e0fb0 Fix "Center" text positioning, and replace it with context-sensitive tooltips 2017-02-07 22:24:28 -05:00
61816b7529 Fix inability to set special nodes outdoors 2017-02-07 20:09:15 -05:00
e7ae0b28a2 Fix floodfill potentially spilling off the edge of the map
(and corrupting memory)
2017-01-31 20:12:34 -05:00
5f9b9dff93 Fix inability to erase roads in town 2017-01-31 20:12:03 -05:00
63345beb9b Fix crash when deleting certain elements in town 2017-01-20 21:31:17 -05:00
88d6afce27 Merge all the town classes and remove the unimplemented templated towns
This also adds a common superclass shared by towns and outdoor sectors, and
enables towns of arbitrary sizes.
2016-09-03 02:50:29 -04:00
469d5fb8a6 Remove residual function 2016-08-25 21:28:44 -04:00
4cbd0d3013 New toolbar buttons for placing boats and horses; replaces the edit boats/horses dialogs 2016-08-25 21:28:42 -04:00
9363ab2fcf Eliminate function-scope loop index variables
This makes all loop index variables local to their loop and
fixes some issue arising from the loop variables being present
through the whole function, such as using the wrong index variable.

In addition, there has been some reduction of code duplication in
the scenario editor.
2016-08-21 00:46:40 -04:00
c59c58e7ab Fix crash when viewing monster info from menu 2016-05-07 17:57:25 -04:00
21f05c464f Fix tool buttons being unresponsive 2016-05-07 12:42:28 -04:00
8b792aea75 Eliminate some offscreen surfaces in the scenario editor
- This fixes an issue where parts of the UI were filled with black or random noise.
- This also creates some noticeable lag while drawing, though.
2016-04-29 13:36:31 -04:00
1b95f06207 Split dlogutil.hpp into separate headers for each dialog 2015-10-04 22:45:01 -04:00
62c342645a Use sword cursor at scenario editor main screen 2015-10-01 11:26:05 -04:00