Commit Graph

458 Commits

Author SHA1 Message Date
889b0663d1 Fix some issues with incorrect range errors from the talk node editor 2016-09-29 17:12:52 -04: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
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
785943b9be More usage of standard containers instead of bare arrays 2016-08-15 12:31:45 -04:00
c59c58e7ab Fix crash when viewing monster info from menu 2016-05-07 17:57:25 -04:00
4cd7368fbf Some fixes to scenario dirty flag 2016-05-07 12:42:47 -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
ca2b6c5c4f Fix crash when editing monster summoning ability 2016-04-28 19:30:10 -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
fa928a122f Fix missing scenario editor menus on Windows
This also seems to fix an issue with menu accelerator keys on Windows.
2015-10-22 18:29:29 -04:00
63df1e4401 Fix Windows build 2015-10-15 15:16:05 -04:00
ba984279b0 Some item ability stuff
- Two new item abilities that increase damage as sp/hp is lost
- Two new item abilities that reduce damage as sp/hp is lost
- Support for using sp/hp as a weapon's key skill to determine hit chance
2015-10-12 14:11:27 -04:00
76168b2071 Nuke several globals; some were unused, others moved to universe 2015-10-06 22:17:28 -04:00
d19880a463 Stop storing preferences and legacy flags in the saved game
- Nuke global preference variables (they're now fetched with get_xxx_pref whenever needed)
- Nuke magic SDFs that store preferences and other info
- The only preferences now stored in the saved game are those related to difficulty
- play_sound no longer takes an option repeat parameter, but instead takes a delay which will be used if sounds are disabled
- SDF array increased to 350x50
- When saving a legacy scenario, a dialog is shown to remind you to update and to allow you to clear the legacy flag
2015-10-06 22:17:25 -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
17095e1760 Three new wallsets and one new floorset by ADoS 2015-10-05 18:27:40 -04:00
1b95f06207 Split dlogutil.hpp into separate headers for each dialog 2015-10-04 22:45:01 -04:00
cae5fc3140 Rearrange the basic_buttons array to avoid the extra indirection step
- All buttons from the array that were strictly related to UI have been removed.
- Some new buttons have been added. The duplicate Leave button has been removed.
2015-10-04 21:11:16 -04:00
a455941d92 New scroll pane control in the dialog engine
Also:
- Use a scroll pane for the credits in the about dialog, so that new credits can be added without altering other elements
- Use a scroll pane for the list of sections to be deleted in the resize outdoors dialog
- New cContainer superclass for controls that contain other controls
- Scrollbars consider their maximum as part of their state
2015-10-02 17:03:25 -04:00
f6183cad63 Separate "Splits When Hit" from "Immune to Assassinate" 2015-10-01 22:53:32 -04:00
0a97824033 Use spaces instead of 'x' for an inactive dialogue keyword 2015-10-01 21:49:40 -04:00
62c342645a Use sword cursor at scenario editor main screen 2015-10-01 11:26:05 -04:00
43e82281af More read/write tests for town and outdoors, including maps/dialogue
Fixes:
- For towns, the "has tavern" flag was not saved or loaded
- Outdoor roads were not saved or loaded
- For outdoor encounters, the "can't flee" and "forced" flags were not loaded, and "forced" was not saved
--> These two flags have also been separated in the code
2015-09-30 17:00:05 -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
1222cb57f5 Move Set Town Start to Town menu and make it work the same as Set Out Start
- Also fix problem with initial starting town in new scenarios (it was uninitialized)
2015-09-27 14:50:00 -04:00
66efa9cb62 Hilite full area for large monsters and terrain objects 2015-09-27 13:34:05 -04:00
a217b91f0a Only show editing cursors while over the terrain area
- Also show eyedropper when selecting a terrain/item/monster to paint
2015-09-27 13:08:08 -04:00
96190c042c Remove a now-useless function 2015-09-27 03:16:50 -04:00
082e3fc9d9 Implement flood-fill tool 2015-09-27 03:15:05 -04:00
18bb16df9c More read/write test cases for monsters, especially monster abilities
Fixes:
- For radiate abilities, the pattern was not saved and defaulted to single instead of square on load
- For summon abilities, what to summon was not saved and chance was incorrectly saved
2015-09-27 01:20:33 -04:00
ab232bb31a Generalize the editor's terrain frills mechanism 2015-09-26 15:05:49 -04:00
06930e30d4 Scenario Editor: Redraw screen after a menu command 2015-09-26 14:17:05 -04:00
4866081def Fix quit confirm at start screen after closing scenario 2015-09-26 02:30:25 -04:00
b437045f12 Make fields paintable 2015-09-26 02:29:45 -04:00
df6c0afa6e Make items and monsters paintable 2015-09-26 00:54:10 -04:00
26ddd47c3a Whoops! Got confused there! 2015-09-25 23:32:36 -04:00
f66c1cb36f More init/splash streamlining, now including the scenario editor 2015-09-25 19:03:40 -04:00
088166a534 Don't set application icon on OSX since it overrides the Dock icon 2015-09-25 00:47:14 -04:00
e81b63d36f Windows: Set a titlebar icon 2015-09-25 00:41:17 -04:00
d7eb593aa1 Add close button to scenario window titlebar 2015-09-24 19:28:43 -04:00
f1e883741c Fix scenario dirty flag being cleared when quit confirmation displayed
(regardless of your response)
2015-09-24 19:28:29 -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
da9b65118e Add readable books as a special item ability 2015-09-24 18:25:02 -04:00
249e0e0027 Add UI for scenario init special and hail townsperson special 2015-09-24 10:13:36 -04:00
6cf37c3daa Fix outdoor encounter dialog being unusable 2015-09-20 23:40:45 -04:00