Split code off from main into functions for easier readibility, and
improved code formatting some. Also, reduced the amount of hex
dumped for "buildings under cursor" mode, since any more than that
was dumping memory regions that were constantly changing as ticks
went by even if nothing was done to the building.
Added support for reading and writing the third creature flag group,
t_creaturflags3 (the offest already exists in Memory.xml). So far I've
only figured out three of the flags (out of an apparent 13):
1) announce_titan, which causes the creature to be announced as if
it was a titan or FB which had just arrived.
2) scuttle, which causes the creature to be die like it had been
killed in the game. That is, it leaves behind a corpse, and
will generate unhappy thoughts in dwarves if approriate.
3) ghostly, for creatures which are the ghosts of dead dwarves.
I updated creaturemanager to use scuttle for --kill, and added the
action --erase to kill in the old way which doesn't leave a corpse or
creatre unhappy thoughts.
Issues #88: sometimes the end of the heap of the DF process will change
between detaching and re-attaching to the process. To deal with this,
/proc/PID/maps is re-read every time the process is attached.
Also, made semgent finder give a little more info if there's an error
doing a memory read.
Multiple changes:
* Slight rearrangement of help message.
* Fixed bug where "Dead" flag wasn't being displayed with
--showallflags.
* Added option "-saf" as a shortcut for --showallflags.
* Creature origin (memory pointer) and civilization number are
displayed in the multi-line listing.
* Split logic for testing if creature is to be used off into it's
own function, which is easier to read.
* Added "--type" filter, which can select tame creatures, wild
creatures, demonic creatures, and so on. If the creature type
hasn't been changed from the default of DWARF then's it's
automatically changed to ALL (but can still explicitly be set
via '-c DWARF')
* Added actions to tame selected creatures and to mark them for
butchering.
You can now do "cmake .. -DBUILD_NO_CURSES=ON" to prevent curses tools
from being compiled, since there's a problem using mvwaddwstr() on some
Linux distributions.