- Shop scrollbar now only visible when needed
- Outdoor shop special node now supports junk shops
- Outdoor shop special node now uses correct title string
- Fix minor issue with framing rects
- Any picture type is now possible; the nodes split by picture type alone were merged
- Town portal now honours your chosen picture. Town stairway also allows you to choose.
- The two one-shot dialogs now use msg3 where they previously used msg2; this is to make way for later expansion
- Now has space for the additional fields that have been added.
- The dialog text has been updated so that labels, names, etc reflect all (or at least most) changes that have been made to specials so far.
- A lot more fields provide a Choose button than previously. A few of these are still unimplemented though.
- Rect specials have their own button now, instead of being filed under Town specials.
- New help button (not yet implemented)
- You can now cancel when deep into a node chain. You're given a choice of discarding the entire chain or just the current node; choosing the latter is similar to clicking "Go Back", but doesn't save your changes.
- Nodes are no longer saved prior to clicking OK (which saves all the nodes you were working on) or "Go Back" (which saves just the current node). So, choosing the first option when clicking Cancel could lead to a lot lost.
- Incidental change: The arithmetic special nodes now use the message 1 and 2 fields in the standard way.
Supporting dialog engine changes:
- Picture choice dialog now has a way to get the index of the selection, rather than just the picture selected.
- Picture choice dialog no longer sorts the list of pictures. If sorting is desired, the list should be sorted prior to passing it in.
- Picture and string choice dialogs now support attaching a "select handler" to be called when the selected item changes, because the normal way to do this would override the all-important focus handler that the dialog uses to track the currently selected item.
Some other tweaks and fixes got pulled in along the way.
Details:
- Improved const-correctness
- The scenario is now part of the universe, so now there's no global scenario object in the game or the PC editor. (Of course, the scenario editor has no universe, so it still has a global scenario object.)
- Towns and outdoors now store a reference to the scenario; the party, current town, and current outdoors store a reference to the universe. Altogether this means that the data module has no need for global scenario or universe objects.
- The fileio routines now take a scenario or universe reference as a parameter, so they don't need the global scenario or universe objects either.
- cCurOut now has an arrow operator for accessing the current outdoor section, instead of a 2x2 subset of the outdoors; this replaces using i_w_c to index the 2x2 subset. (And it's much less verbose!)
- cCurTown no longer stores a pointer to the town record, since it can simply access it through the universe instance which it stores a reference to.
- Tweaked how the monster roster menu works (it now caches up to 60 monsters)
- The operator= functions that convert from legacy to new scenario/save format are now ordinary functions rather than operators.
- The bizarre use of assigning a cCreature to itself to populate certain fields has been nuked.
- When at the corner of an outdoor sector, the scenario editor now shows the cornermost terrain in the diagonally adjacent sector.
- There was a missing check to prevent horses entering dangerous terrain (eg, swamp) while in town.
- Fix cancelling load party dialog causing a party to appear
- Clipboard support
- Text will now wrap when a word is longer than the width of the destination rect (doesn't just apply to text fields, but is most relevant there)
- Edit menu stub added in scenario editor code
- Rich text keys (eg cut, copy, paste, select all) are no longer processed by the dialog itself; only the text field processes them; this just means that if they were set as button equivalents they would no longer work (you'd have to set the raw equivalent instead, eg ctrl+C instead of copy).
- Text fields now rely on SFML's TextEntered event for actual input - the practical result of this is that your keyboard layout is honoured (though non-ASCII characters just display as boxes).
- In a similar vein, shift is not auto-applied to the input keys, so you'd have to set shift+2 instead of @ as the key equivalent (this actually fixes some stuff, such as in the spellcasting dialog, since I was already setting shift+2 instead of @).
- Preset animated graphics now start at 960 instead of 400, due to all the new preset terrains from the previous commit running into their range.
- Tore out some optimization in the automap drawing, because it made it harder to figure out why it wasn't working
- Both game and editor now use the larger 12x12 map graphics, and fall back to shrinking down the 28x36 terrain graphic if no map graphic is set
- Upon loading an old scenario, map graphic is automatically set the same as the main graphic if it's a preset graphic; for custom graphics it's set to none
- Scenario now has three zoom levels for mini-map - the original in which the entire town is visible, a slightly closer one that matches the in-game view, and a large one using the 12x12 map graphics at full size.
- Fix some map patterns having the wrong bounding rect
- Graphics (and sounds) now included in the project by folder reference, so that I don't need to manually every new sheet to the project
- LED groups now trigger their own click handler in addition to the clicked LED's click handler (provided the latter returns true). If the handler returns false, the click has no effect.
- LED groups now cancel the selection change if their focus handler returns false; this mimics the behaviour when an individual LED's focus handler returns false.
- Move the dialog getResult() definitions inline - since there's only two of them now that I'm using boost::any, having them in a separate file is pointless.
- Changed how the pict choice dialog returns its result - now it returns only whether the user clicked cancel and provides getters to obtain the number and type.
- Pict and string choice dialogs now hide the arrow buttons when there is only one page of options.
- Fix pict choice dialog always returning the initially selected value (similar to how the string choice dialog did before I fixed it)
- When passed an invalid starting selection, the pict choice dialog now always starts with the first icon selected
- Fix wrong bounds for several typs of custom graphics in dialogs
- Fix wrong /source/ bounds for custom 28x36 graphics /everywhere in the game/.
- Fix select PC graphic dialog having a second page with an invalid graphic that can be selected.
- Warnings completely suppressed for the included TinyXML and gzstream libraries
- Parentheses warnings are now errors, since there were several that looked like bugs
- Ditto for dangling else warnings
Some of these warnings were actually bugs:
- Town wandering monsters would have never spawned, because the code to do so was accidentally nested within a check for overall_mode == MODE_OUTDOORS
---> boe.monster.cpp, lines 105-137
- Monster's behaviour with respect to elemental fields did not correctly depend on their immunities (this is the same precedence issue Sylae messed up fixing in the Windows code)
---> boe.monsters.cpp, lines 345-359
- Display of damage blocked by armour appeared to be incorrect (needs verification)
---> boe.newgraph.cpp, line 1079
- Three-choice dialogs probably weren't dealing with unusual button types correctly, though that's a minor point since they aren't expected to use such buttons