Finish edit terrain type dialog in the editor and tweak some terrain properties

- Introduce enum for step sounds
- Remove union for treating terrain flags as either signed or unsigned
Editor:
- Add Choose button to select the "transform to" terrain.
- Implement Choose buttons as appropriate for the terrain flags, including editing the special that a terrain calls.
- Range-check the terrain flags.
- Add Custom button to choose a town as the combat arena.
- Fix/tweak/improve several of the terrain flag prompts.
- Fix placing shortcut key in field as its ASCII code instead of the letter
- Fix some of the range checks that were already in place but were incorrect or improperly static
Game:
- The wilderness terrain types now allow specifying how many d6's of food you get when hunting there.
- Crumbling terrain uses flag 2 instead of 3 to determine method (flag 2 was supposed to be strength but was never used)
- Merge two functions that did almost exactly the same thing (namely altering a terrain space and potentially updating conveyor/lights info)
- Merge switch_level into handle_lever since it was the only place it was called
- Remove global store_special_loc; the location is stored in the stuff_done array now
- Change when use/step on terrains will now update lighting if they changed to a terrain with a different light level
- Terrains that call a special no longer support mixed global/local modes - they either always call a local special or always call a global special
- Use previously unused swap_ter function (which did the exact same thing as the swap terrain special node)
Dialog Engine:
- Don't "erase" invisible icons or buttons; it's not necessary, since the entire window is filled with background before the draw() method is called, and it causes problems in case of overlapping elements.
This commit is contained in:
2015-01-28 15:43:58 -05:00
parent 92a20b1c67
commit a23682306c
29 changed files with 431 additions and 317 deletions

View File

@@ -41,6 +41,7 @@
<field name='light' top='193' left='271' height='16' width='52' />
<text top='193' left='333' height='14' width='128'>Transform to what?</text>
<field name='trans' top='193' left='467' height='16' width='52' />
<button name='picktrans' top='190' left='530' type='regular'>Choose</button>
<text top='217' left='8' height='14' width='91'>Ground type:</text>
<field name='ground' top='216' left='109' height='16' width='52' />
@@ -81,6 +82,7 @@
<text name='flag1text' framed='true' top='385' left='109' height='14' width='209'>*flag1</text>
<field name='flag1' top='384' left='329' height='16' width='64' />
<button name='pickflag1' top='381' left='404' type='regular'>Choose</button>
<button name='editspec' top='381' left='404' type='large'>Create/Edit</button>
<text name='flag2text' framed='true' top='410' left='109' height='14' width='209'>*flag2</text>
<field name='flag2' top='409' left='329' height='16' width='64' />
<button name='pickflag2' top='406' left='404' type='regular'>Choose</button>
@@ -91,10 +93,11 @@
<text top='254' left='467' height='14' width='100'>Combat Arena:</text>
<field name='arena' top='275' left='467' height='16' width='64'/>
<button name='pickarena' type='regular' top='299' left='467'>Choose</button>
<button name='picktown' type='regular' top='299' left='532'>Custom</button>
<button name='object' top='344' left='467' type='large'>Object Details</button>
<text top='385' left='470' width='60' height='14'>Map icon:</text>
<pict name='seemap' top='375' left='550' type='map' num='0'/>
<field name='map' top='406' left='470' width='100' height='16'/>
<text top='410' left='470' width='60' height='14'>Map icon:</text>
<pict name='seemap' top='400' left='550' type='map' num='0'/>
<field name='map' top='431' left='475' width='100' height='16'/>
<button name='done' type='regular' def-key='enter' top='455' left='517'>OK</button>
<button name='cancel' type='regular' def-key='esc' top='455' left='451'>Cancel</button>
<button name='left' type='left' top='455' left='11'/>