Make sector types signed

get_empobj_chr() and emp_obj_chr_name() access struct sctstr member
sct_type through struct empobj member type.  This is technically
non-portable, because the two differ in signedness.  It was also
undocumented.  Fix by making sct_type signed.  sct_newtype as well,
for consistency.

map_char() uses unsigned char for a sector type argument.  Change that
to int.  Matches how this is done elsewhere.
This commit is contained in:
Markus Armbruster 2008-02-22 20:58:37 +01:00
parent c36cae7a64
commit 74e873e96c
4 changed files with 8 additions and 7 deletions

View file

@ -56,7 +56,8 @@ struct empobj {
short uid;
coord x; /* is valid if EFF_XY is set in table def. */
coord y; /* is valid if EFF_XY is set in table def. */
signed char type;
signed char type; /* is valid for sectors and units */
/* remaining are valid for units */
signed char effic;
signed char mobil;
unsigned char off;