Commit Graph

808 Commits

Author SHA1 Message Date
b11199d7d9 Set up a Visual Studio project and tweak things until it compiles
- It doesn't link yet, but that was expected
- Fixed some issues with global variables having different types in different files.
2014-12-29 14:52:54 -05:00
fdb98bf34a Merge the two main git ignore files 2014-12-28 12:22:24 -05:00
af0ee110c6 Rename osx directory to src since it's now the official source base 2014-12-28 12:12:38 -05:00
ca15b2781e Fix up item editing dialog 2014-12-28 11:43:52 -05:00
e9f6e63b25 Fix up the monster editing dialogs 2014-12-28 11:31:57 -05:00
37089b471a Reimplement importing towns 2014-12-28 11:01:19 -05:00
805ffaaac6 Update scenario editor resource file so that the converted DITL resourcers are named by the filename of the converted dialog. Also deleted some DITL resources that are relics of Exile III. 2014-12-28 10:48:23 -05:00
5bbda27a1c Convert the last of the scenario editor dialogs 2014-12-28 10:47:25 -05:00
022571afe8 Make Choose buttons smaller in the edit special node dialog, as they used to be 2014-12-28 00:13:18 -05:00
ab57e71d90 Convert the two dialogue editing dialogs. 2014-12-28 00:12:59 -05:00
a1b83fa9d2 Fix tab key clobbering field contents 2014-12-27 17:31:56 -05:00
e25f8ccc3f Fix Choose buttons in town wandering dialog 2014-12-27 17:31:36 -05:00
df25711e87 Implement the remaining Choose buttons for the special node edit dialog.
Also:
- Fix text response node using wrong string for response matching
- Fix inability to change PC race during party creation
- Info string area in select trait dialog widened considerably
2014-12-27 17:25:46 -05:00
ddbc143c84 The select town/sector dialogs now offer a Choose button 2014-12-27 16:18:05 -05:00
d00e44f650 Introduce a shop type enum and a shop class
- 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
2014-12-27 16:17:03 -05:00
d5575ee8fa Dialog engine now appends the XML file extension automatically.
- This creates the possibility of changing the file extension later
2014-12-26 23:23:33 -05:00
57a0e728bb Reform the dialog special node types.
- 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
2014-12-26 23:04:09 -05:00
131093f1bc Remove fire barrier from list of field graphics in choose_graphic, because it's on a different sheet now.
(Selecting a field graphic was never actually used, though.)
2014-12-26 02:04:18 -05:00
b7d909aaf2 Some TODO notes regarding sounds, and fix incorrect door closing sound 2014-12-26 02:03:34 -05:00
bdcd2fc67c Complete rewrite of special node edit dialog
- 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.
2014-12-26 02:02:56 -05:00
d6cc7bae53 Nuke special node dialog globals 2014-12-23 00:09:36 -05:00
d7e3e3bd71 Fix many of the buttons doing nothing in the special node dialog 2014-12-23 00:04:03 -05:00
f4c9d98808 Generalize the special node types dealing with fields.
- IF_FIELDS (formerly IF_OBJECTS) can now deal with any kind of field (apart from special spots, which aren't technically a field but share some implementation details).
- The twelve RECT_PLACE_XXX field nodes (well, one of them was RECT_CLEANSE) have been collapsed into one, allowing the placement of any kind of field (apart from special spots). In particular, antimagic fields can now be placed! (There wasn't a node for them before.) As a bonus, since it exists in the field type enum, RECT_PLACE_FIELDS can also smash fragile wall terrains (like the Move Mountains spell).
2014-12-22 23:34:28 -05:00
fb1f97e2f1 Preset town fields now use the field type enum 2014-12-22 22:46:30 -05:00
c768b2557c More operator= -> append for legacy data conversion 2014-12-22 22:17:23 -05:00
0aaf7636a4 Rearrange special node dialog XML into a more logical order 2014-12-22 22:13:36 -05:00
d193c0da7b Fix crash when loading party death dialog 2014-12-22 20:15:12 -05:00
18a78e9526 Attempt to fix monster combat poses not displaying 2014-12-22 20:14:55 -05:00
6499923ab5 Fix preset fields (and special spots) not appearing 2014-12-22 18:37:59 -05:00
9f7846c3bb Fix seeing monsters through walls in combat mode 2014-12-22 18:27:30 -05:00
37a8b27209 Fix missile and explosion animations 2014-12-22 18:20:16 -05:00
da975d6e3e Dragging in a text field now selects the dragged-over text
Note: Seems to need optimization, may not work when text overruns field boundaries
2014-12-22 16:37:36 -05:00
6f04844c89 Shift-clicking in a text field now sets the selection endpoint where you clicked 2014-12-22 16:31:48 -05:00
6bad9f57d5 Clicking in a text field now sets the insertion point where you clicked 2014-12-22 16:27:24 -05:00
99f8da734b Fix several dialogxml error messages naming the wrong element tag name 2014-12-22 13:22:25 -05:00
dcd28b363b Finally implemented the stack control, and used it for town comments in the town details dialog 2014-12-22 13:22:06 -05:00
5e762147bd Typos 2014-12-22 09:53:10 -05:00
e54c67aaa1 DialogXML header extensions -> .hpp 2014-12-22 09:52:58 -05:00
317a01afa1 Look up saved talk/encounter strings when loading a legacy savegame 2014-12-22 09:29:01 -05:00
4b96f579b7 Embark on an epic journey to make both the game and the two editors load the entire scenario into memory.
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
2014-12-22 00:20:37 -05:00
e88eb9b949 Convert more dialogs related to town settings 2014-12-19 16:29:15 -05:00
728c294d0e Expand on text field keyboard shortcuts
- 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 @).
2014-12-19 03:44:18 -05:00
8e26881331 Unification of petrification abilities
- Note: Petrification from higher-level monsters is now harder to resist!
- AFFECT_DEADNESS special node now has an additional option to allow PCs a saving throw (based on things like luck and items with life-saving ability) when killing them, and to specify the difficulty of resisting when petrifying monsters or PCs
- AFFECT_DEADNESS special node now triggers monster death specials when petrifying them (in addition to when killing them), and substitutes ash for the normal sfx when turning them to dust
2014-12-19 03:25:38 -05:00
d41616db6a Some tweaking of monster spell mechanics to bring them more in line with the PC versions
- Spark now deals magic damage and Wound deals unblockable damage
- Damage is capped for Flame as for the PC version; the damage is still calculated differently though
- Poison and Minor Poison damage now depends on the monster's level
2014-12-18 20:36:11 -05:00
d36f00eb3d Use slow_monst, curse_monst, slow_pc, and curse_pc for all blessing and hasting from spells
- This means the cap of 8 is automatically respected; most of the monster versions did not respect the cap before.
- The functions also automatically print messages, so there'll be more messages than before.
- A previously unused instant help message is now used! (For when you're blessed.)
2014-12-18 20:03:56 -05:00
e471750c6b Fix up text placement in the scenario edit tool buttons area 2014-12-18 19:24:30 -05:00
7a2b6e2349 Add a field to outdoor details dialog for editing the sector's comment string (which has been uneditable since I reformed the string system). 2014-12-18 19:05:46 -05:00
72200a57f3 Convert several more dialogs, mostly related to outdoors stuff 2014-12-18 18:55:21 -05:00
a672ec050d Re-indent stuff touched by recent commits 2014-12-18 12:55:45 -05:00
5d8f974742 Catch all exceptions in the editors in order to show an error dialog.
(This is the same as what the game already does.)
2014-12-18 12:52:01 -05:00