(i_type, I_NONE): shift the enum down 1, so that I_NONE does not need to

be skipped or stored in arrays of size I_MAX. I_NONE's int equivalent
becomes -1 by this patch, so all array indices of type i_type have been
checked not to use I_NONE as index.  This change reduces the size of the
arrays stored in files.
This commit is contained in:
Marc Olzheim 2004-10-12 19:48:53 +00:00
parent 19e4dc57ed
commit 442803c30a
7 changed files with 65 additions and 75 deletions

View file

@ -31,17 +31,11 @@
*
*/
/*
* must be in same order as defines in var.h
*/
#include "misc.h"
#include "var.h"
#include "item.h"
struct ichrstr ichr[I_MAX + 2] = {
/* mnem vtype val sell lbs {in rg wh ur bnk} name */
{'?', I_NONE, 0, 0, 0, {0, 0, 0, 0, 0}, "unused"},
{'c', I_CIVIL, 1, 0, 1, {1, 10, 10, 10, 10}, "civilians"},
{'m', I_MILIT, 0, 0, 1, {1, 1, 1, 1, 1}, "military"},
{'s', I_SHELL, 5, 1, 1, {1, 1, 10, 1, 1}, "shells"},