Commit Graph

97 Commits

Author SHA1 Message Date
ac1798ef8e add parens for xcode 2025-06-16 19:57:24 -05:00
3c18822d78 draw the 1 row/column from next outdoor section as transparent 2025-06-16 09:15:15 -05:00
eab83c2112 undo/redo for drawing/erasing fields 2025-06-14 19:13:03 -05:00
92dc716c4d Make the rest of editing modes restorable 2025-06-12 12:40:09 -05:00
854f18ff9e make editing special items a mode 2025-06-12 09:07:21 -05:00
756f29bd1b MODE_EDIT_TYPES support monsters and items, with create/delete undo/redo 2025-06-04 09:56:03 -05:00
fb56cbf607 Editor search field for terrains, monsters, items in palette 2025-06-02 11:32:20 -05:00
d47a95bf8d creature palette tooltip show default attitude instead of always 'Monster:' 2025-06-02 11:32:19 -05:00
4cd07098cd optimize the last change 2025-05-19 21:40:59 -05:00
166b66e34e scenedit text list render as much as can fit, with ellipsis 2025-05-19 21:40:57 -05:00
3ee36b6dbc highlight editor right button selected 2025-05-19 21:40:57 -05:00
fd7218ba35 when zoomed out, prompt for area shift by bounds, not center 2025-05-11 13:59:21 -04:00
005d40806c Flesh out acid as a real damage type 2025-05-11 10:51:08 -05:00
58107f1856 str("") is unsafe on its own for clearing stream 2025-05-11 10:49:27 -05:00
bcf8bf963e Show road to the right of the toolbar when the road tool is active, like what happens with other field types. 2025-03-16 14:09:05 -04:00
4e736a7e93 Fix foreground terrain to the right of the toolbar being drawn as a tiny square when the item palette is active and an item with a tiny graphic is selected. 2025-03-16 14:09:05 -04: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
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
2789d24936 properly measure scenario editor button clickable labels 2024-11-30 22:52:53 -05:00
b441401475 wrap pollEvent() to guarantee all loops handle modifiers (#477) 2024-11-23 17:46:54 -05: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
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
3e686cb908 Tweak text colours to be less blindingly bright and closer to the original Mac BoE 2020-02-01 19:55:30 -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
d530abe00b Make use of the new resource manager's purgeable flag 2020-01-26 16:14:39 -05:00
14e2597108 Expose the shared pointer instead of the raw pointer in the resource manager and rewrite the custom sheets list to use a vector instead of manual memory management
In particular, this should fix a segmentation fault in the sound system caused by the resource manager pulling a resource that's in use.
2020-01-26 15:10:57 -05:00
542c037342 Integrate a new resource manager which should have better performance 2020-01-26 11:53:19 -05:00
Mark Clark
e70c360e11 Minor fixes to get build working for vs2017 project; 2018-02-25 14:55:13 -05:00
4c135e57fa Fix scenario editor build 2017-09-04 20:42:37 -04:00
9c69e006d8 Refactor rendering to use an SFML view for placing the main UI within the overall interface 2017-09-04 14:36:55 -04:00
9d86053817 Fix up MSVC project file for the major reorganization 2017-08-30 00:09:01 -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
92ba1e0fb0 Fix "Center" text positioning, and replace it with context-sensitive tooltips 2017-02-07 22:24:28 -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
c2604b56a7 Fix minor graphical glitch in editor tool palette 2016-08-25 21:28:45 -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
785943b9be More usage of standard containers instead of bare arrays 2016-08-15 12:31:45 -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
3166d0d002 Free editor splash image after splash screen
Since it's only used once, there's no need to keep it around.
2016-04-28 19:29:54 -04:00
906016b98d Fix some cases of wrong cut-off point for tiny item graphics 2015-10-06 00:00:46 -04:00
7f00d0c775 Change image resource type from sf::Image to sf::Texture
This includes an added optimization to the resource manager - it now uses unordered (hash) maps instead of ordered (tree) maps to keep track of loaded resources and paths, for the average constant lookup time.
2015-10-05 23:57:42 -04:00
c68b01c3a2 Make roads an overlay instead of a terrain trim type
Game:
- Roads now show on the automap again!
- Possible fix for undetected issue in displaying outdoor special spots
- Road conversion code for legacy scenarios now applied in towns too

Editor:
- New tool for placing roads, works the same as special dots
- Roads appear at all zoom levels

Other:
- Removed all terrain graphics that used the small road dot, replacing them with blank (white) space
- Make obvious out-of-bounds array accesses an error in the project settings
2015-09-27 22:37:12 -04:00
66efa9cb62 Hilite full area for large monsters and terrain objects 2015-09-27 13:34:05 -04:00
b437045f12 Make fields paintable 2015-09-26 02:29:45 -04:00
f66c1cb36f More init/splash streamlining, now including the scenario editor 2015-09-25 19:03:40 -04:00
66f84ef396 Fix several little issues with cursors
- Sometimes they didn't reappear when the program was reactivated
- Watch is now used in more places
2015-09-24 19:12:12 -04:00