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'/>

View File

@@ -0,0 +1,14 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
<dialog defbtn='cancel'>
<pict type='dlog' num='16' top='8' left='8'/>
<text top='8' left='50' width='300' height='80'>
This terrain type is set to call a local special when used or stepped on.
That means it will call the special with the given ID in the current area, whether town or outdoors.
From here you can edit the corresponding special node in the currently active town or outdoor section.
Which would you like to edit?
</text>
<button name='town' type='large' top='90' left='10'>Edit Town</button>
<button name='out' type='large' top='90' left='125'>Edit Outdoor</button>
<button name='cancel' type='regular' top='90' left='287'>Cancel</button>
</dialog>

View File

@@ -1,6 +1,6 @@
Small Icon
What to change to?
Amount of damage done
Sides per die
Unused
Graphic when occupied
Strength (1-8)
@@ -13,8 +13,8 @@ Unused
Number of special to call
Unused
Unused
Unused
Unused
Number of Dice
Number of Dice
Direction
Direction
Direction

View File

@@ -1,16 +1,16 @@
Unused
Number of sound (99 - no sound)
Damage multiplier
Number of Dice
Unused
Unused
Percentage chance
Unused
Strength
Method
Unused
Difficulty (0-4 L, 5-9 M, 10 I)
Unused
Unused
Type of special (0 - local, 1 - town/global, 2 - out/global, 3 - global)
Type of special (0 - global, 1 - local)
Unused
Unused
Unused
@@ -21,4 +21,4 @@ Unused
Unused
Unused
Number of sound (99 - no sound)
Type of special (0 - local, 1 - town/global, 2 - out/global, 3 - global)
Type of special (0 - global, 1 - local)

View File

@@ -5,7 +5,7 @@ Unused
Unused
Status type
Unused
Method (1 - Move Mountains, 2 - quickfire, 0 - either)
Unused
Unused
Can be bashed? (0 - can't, 1 - can)
Unused