Commit Graph

277 Commits

Author SHA1 Message Date
0f140d3d86 The names of spells and alchemy were duplicated in several places, all slightly different; this unifies them all in one place 2014-12-16 00:39:24 -05:00
a3edc5cba6 Spread out magic-names string list to make sure there's room for special spells 2014-12-15 23:35:31 -05:00
0344cf2525 Introduce a spell enum, and use it everywhere for PC spellcasting
- Monster spellcasting is untouched
- Also updated the spells documentation, which had some old information from Exile III and omitted a lot of ranges.
2014-12-15 08:46:43 -05:00
f331d3d6db Allow placing low-level spells in shops 2014-12-12 13:26:26 -05:00
43285d0809 Implement two-part drawing for force cages
- Also a missing check for them
2014-12-11 01:36:32 -05:00
ae09fc518f Add a few item graphics 2014-12-11 01:36:31 -05:00
c0110adb40 New special nodes:
- Town set attitude for affecting single creature, adapted from Windows code; technically redundant, but maybe handy
- If numeric response
- Print nums (for debugging)
- SDF arithmetic - add, subtract, multiply, divide, exponentiate
- Store random to SDF (adapted from Windows code)
- Display picture (inspired by Windows code, but the implementation is completely different and totally incompatible)
2014-12-11 01:36:22 -05:00
869ca7b2d7 Clean up, fix, and tweak the spellcasting dialog
- Includes new status effect images for the forcecage and for hypothetical inverses of dumbfound and magic resistance, as well as icons for the whole-party statuses.
2014-12-11 00:15:05 -05:00
4db81f1403 Implementation of parsing for the map format (untested)
- Some stubs inserted for loading new-format scenario data
2014-12-05 00:50:17 -05:00
4f6ce11dd9 Convert create scenario dialogs, reimplement part of the scenario creation process, and allow text edit fields to contain default values in the XML definition.
- Note: This does not mean that scenario creation is now possible, since it relies on scenario saving which is still not implemented.
2014-12-04 22:34:37 -05:00
ecd0867b65 Convert scenario details dialog and make numeric fields validate their contents 2014-12-04 16:54:21 -05:00
5b7649543f Merge race and monster type enums 2014-12-03 18:27:34 -05:00
7a2a0f93d3 Finally, a working parser!
--> At least, it parses the sample file correctly

- I reverted the choice of using a skip parser, because it was failing and I couldn't figure out why. This means there's a lot of *ws where whitespace can go.
- Grammar rearranged a little
2014-12-03 05:03:10 -05:00
d1a8db9b70 Sample nodes file, more semantic actions
- Note: This parser is still untested.
2014-12-02 17:07:39 -05:00
01f0a62160 Define a grammar for special node definition files 2014-12-02 15:59:38 -05:00
d61c0a5c1e Convert five more dialogs and fix the string choice dialog
(The latter was always returning 0)
2014-12-02 09:44:21 -05:00
d64770b1e0 Use folder references for strings and dialogs.
This means I won't have to remember to explicitly add each new file to the build.
It also means they'll be automatically kept sorted.
2014-12-01 22:51:18 -05:00
73c3430f05 Argh! How did I forget to commit this file? 2014-12-01 22:13:42 -05:00
c62ac56702 More enumeration in the schema instead of arbitrary integers 2014-12-01 20:11:45 -05:00
3a1de0c890 Strictify item variety enum 2014-12-01 14:46:17 -05:00
84f53a8a7d Dialog tab order implementation
- Defaults to order of definition in file
- tab-order attribtue can be set to a postive number to force towards the start, or a negative number to force towards the end
2014-11-29 16:03:54 -05:00
13d00cd27a Convert the edit special item dialog 2014-11-29 12:12:01 -05:00
c5b1416c33 Whoops, forgot that file 2014-11-29 03:21:40 -05:00
6f73841764 Schemas for monster, item, and terrain definitions 2014-11-29 03:20:07 -05:00
c855983de4 Convert item type editing dialogs 2014-11-29 02:13:49 -05:00
bc7d1a3772 Simplification 2014-11-28 16:22:43 -05:00
5d1697c206 Schema for town dialogue 2014-11-28 16:22:33 -05:00
6e2e6d31a1 Schema for outdoors definitions 2014-11-28 15:10:35 -05:00
c1c4ce4b5c Forgot area description rects 2014-11-28 14:41:44 -05:00
d96ef5713b Move entry and wandering locs to the map data 2014-11-28 14:38:35 -05:00
d3c640b782 Formalize scenario ratings 2014-11-28 14:31:01 -05:00
b64cc7b8c6 Add xml extension 2014-11-28 14:19:26 -05:00
1a9f85da29 In the scenario file, rects require all four attributes 2014-11-28 14:11:03 -05:00
f21ef07111 Formalize schema for town definition file 2014-11-28 14:10:40 -05:00
de7489d47d Forgot storage shortcuts, also validate language codes 2014-11-28 12:07:42 -05:00
fbb0b70626 Formalize scenario schema
- Except ratings, those still need to be formalized
2014-11-28 11:58:58 -05:00
7d287769ab CRLF-->LF 2014-11-28 11:57:19 -05:00
07ff864f4b Convert monster abilities dialog 2014-11-28 02:19:07 -05:00
41c3396aa3 Tear out most of the legacy code in the scenario editor - see below for details
- All Carbon code is gone
- Many dialogs converted; some are still left unimplemented since they still need to be converted
- Menus converted to a xib file
- The giant arrays specifying the configuration of the special node dialog for each special node type have been replaced with maps and sets.

Changes to dialogs:
- pict choice dialog can now show picts of differing types; this was required for picking a monster graphic, as monsters of all sizes need to be shown in the same dialog
- string choice dialog can set the title, and properly shows the currently selected string
- LEDs now accept font format
- Fixed LED group's calculation of its rect
- Fixed LED group crashing if it has no selection
- Tabbing between text fields now works
- Fix display of larger monster graphics in dialogs
- Fix the script element content showing in the browser preview
2014-07-12 22:13:27 -04:00
bbc9667c88 Fix unwanted transparency in some of the monster graphics 2014-04-25 22:41:40 -04:00
a4430cdf5a Fix spellcasting and dynamic menus
- Spell targeting line and array draws nicely, though not the same as the original
- Fix targeting falsely complaining about being off the edge of town
- Monster info dialog works properly; attacks now display correctly
- Fix dialogs always showing the wrong terrain or monster graphic
- Spell menus, monster menus, and PC editor item menus all work
- Spellcasting dialog now chooses the correct spell
- Fix out-of-place LED in spellcasting dialog
2014-04-22 02:06:31 -04:00
446bb1550d Some more tweaks to cursor handling
- Fix cursor turning into a sword during universe shifts
- Hide cursor along with menubar during splash screen
- Add watch cursor, used during splash screen
- Properly restore cursor after a dialog
- Use sword cursor for dialogs
- Show ibeam cursor in dialog text fields
- Move everything cursor-related out of graphtool
2014-04-21 13:47:52 -04:00
002ee640da Remove the global TextStyle; this should fix some of the textual glitches 2014-04-21 01:49:07 -04:00
b960139d6b Populate item menus in PC editor (they're not functional yet though) 2014-04-17 03:37:44 -04:00
9463ecf2fe Add a few resources for future use:
- Graphics for scrollbars
- DejaVu Sans Book, for "plain" text (to replace Geneva Regular)
- Capriola Regular, for "bold" text (to replace Silom which replaced Geneva Bold)
2014-04-17 02:45:01 -04:00
f449b47f36 Fix a lot of bugs in the PC editor
- Alchemy dialog had black text on dark background
- Buttons didn't depress when clicked
- Edit XP button just said "Edit"
- Two menuitems in Special Edit menu had been left with default names
- Callbacks in Special Edit and Free Extras menu weren't correctly assigned
- Edit XP dialog put the XP to next level in the wrong place
- Fixed alchemy dialog LED naming

Supporting changes in the dialog engine:
- Getting or setting control text as a number now uses the long long type to allow maximal precision
- When adding a label to a button, the dialog's default text colour is used instead of the button's text colour if the dialog's background is dark
2014-04-17 02:24:35 -04:00
eb2e8f3536 Fix button label in one of the PC editor dialogs 2014-04-16 17:50:16 -04:00
199f84e0db Make dialog preview stylesheet default to dark background 2014-04-16 17:49:13 -04:00
caa461f8e7 Tear out most of the legacy code in the PC editor - see below for details
(Scenario Editor is unaffected by this commit.)

- Menubar converted to a .xib file
- Don't include the Info.plist in "Copy Files" stage
- Several more dialogs converted; as before, the source resources have had their resource name changed to the new filename
- One more converted STR# has been included

There were several functions in the PC Editor code that also existed in the BoE game code. I've moved these into the pc.editors.cpp file, so that there's only one copy of each.
- display_alchemy() functions changed signatures
- moved keyToChar() function into a common file (winutil)
- Several constants and globals moved to pc.editors.cpp

Supporting changes to dialog framework:
- New formatting option to set the frame style; this because the PC editor uses a different frame style in some contexts
- Added global default dialog background setting
--> This was necessary to correctly set the default text colour
--> Will also be needed for the scenario editor, which uses a different default background

Other changes:
- Add option to load_scenario to skip loading the strings
- Fix for crash in soundtool in the event of initialization before playing the first sound
2014-04-16 17:07:08 -04:00
2ae75df4a7 Fix the blue arrows for look mode 2014-04-14 22:15:33 -04:00