Commit Graph

9 Commits

Author SHA1 Message Date
bd3aa33807 Schemas: Fix indentation 2015-10-06 22:17:27 -04:00
f0af9ff67f Schemas: Enforce root element by eliminating global element declarations 2015-10-06 22:17:27 -04:00
68eec0fe16 Some schema updates
- Store timers as a type instead of an element in the common schema
- Fix errors in terrain and monster schemas
2015-10-06 22:17:26 -04:00
ab232bb31a Generalize the editor's terrain frills mechanism 2015-09-26 15:05:49 -04:00
4104e08481 Factor out some common definitions from the XML schemas 2015-07-10 15:02:50 -04:00
0798f98523 Symbolic I/O for more enums
- Nearly every enum that gets written to a file now uses a symbolic form rather than a numeric form. Input supports both forms.
- The special node type enum, however, no longer has a symbolic form output operator, as the only place it's output is in the special nodes file which uses the opcode.
- Collected some enums scattered around the files into one place in simpletypes.hpp
2015-06-13 15:43:29 -04:00
a990921e90 Several tweaks/fixes
- Nuke some uses of strcpy, sprintf, etc; current info strings in the scenario editor are now stored as std::string instead of C-strings.
- A smarter method of calculating the "erase" terrain for a given terrain type. In case of impassable spaces, trims, and walkways, instead of using the ground terrain, the trim terrain (if any) is used as the erase terrain; if there's no trim, ground 0 (cave, by default) is used. The method of determining if two terrains are essentially the same (ie, whether to paint or erase) has also been improved a little.
- Also, to reduce confusion, the erase terrain is now shown beneath the paint terrain.

Terrain changes:
- Add "archetype" flag as a better way of determining which amongst a set of terrains sharing the same ground type should be considered as the most basic terrain of that ground type. It's automatically applied to any terrains using original graphics when importing an old scenario; generally, any with no terrain special will be marked as an archetype, but if the lava graphic was used, it's instead any with a terrain special. It's a crude method that may easily break, but probably not possible to do better.
- When importing old scenarios, set the two walkways to be separate ground types while the crops should have grass as their ground, and the conveyors have cave.
- Fix fly, boat, block horse LEDs not being cleared if a terrain lacks that flag when using the arrow buttons. This could lead to terrains accidentally picking up the flags of nearby terrains in the list.
- Fix the block horse flag was not correctly saved when closing the dialog.
- Fix the block horse flag not being correctly loaded from the scenario file
2015-06-11 22:32:28 -04:00
1894b31e20 Implement loading of scenarios
- This also tweaks the scenario schemas for consistency between schemas and code, adds some unique key restraints, and makes some attributes required.
2015-02-11 14:03:03 -05:00
a1da743a47 Move scenario schemas to the schemas directory 2015-02-05 22:56:57 -05:00