Added more direction flags to engravings.

develop
Petr Mrázek 2011-04-04 11:57:09 +02:00
parent 4bc7365a45
commit 5465890b34
2 changed files with 21 additions and 7 deletions

@ -18,13 +18,19 @@ namespace DFHack
*/
struct flg_engraving
{
unsigned int floor : 1; // engraved on a floor
unsigned int west : 1; // engraved from west
unsigned int east : 1; // engraved from east
unsigned int north : 1; // engraved from north
unsigned int south : 1; // engraved from south
unsigned int hidden : 1; // hide the engraving
unsigned int rest : 26; // probably unused
// there are 9 directions an engraving can have.
// unfortunately, a tile can't be engraved from more than one direction by the game
unsigned int floor : 1; // engraved on a floor 0x1
unsigned int west : 1; // engraved from west 0x2
unsigned int east : 1; // engraved from east 0x4
unsigned int north : 1; // engraved from north 0x8
unsigned int south : 1; // engraved from south 0x10
unsigned int hidden : 1; // hide the engraving 0x20
unsigned int northwest : 1; // engraved from... 0x40
unsigned int northeast : 1; // engraved from... 0x80
unsigned int southwest : 1; // engraved from... 0x100
unsigned int southeast : 1; // engraved from... 0x200
unsigned int rest : 22; // probably unused
};
/**

@ -31,6 +31,14 @@ void describe (dfh_engraving &engraving)
printf("From east.");
if(data.flags.west)
printf("From west.");
if(data.flags.northeast)
printf("From north-east.");
if(data.flags.northwest)
printf("From north-west.");
if(data.flags.southeast)
printf("From south-east.");
if(data.flags.southwest)
printf("From south-west.");
printf("\n");
if(data.flags.hidden)
printf("The symbol is hidden.\n");