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.
- 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
- 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
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.
- 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.
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
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
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
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