#ifndef _VAR_H_
#define _VAR_H_
-#define V_MAX 255
-
#define PLG_HEALTHY 0
#define PLG_DYING 1
#define PLG_INFECT 2
#define PLG_INCUBATE 3
#define PLG_EXPOSED 4
-#define VT_ITEM 0
-#define VT_TYPE (7<<5)
-
-#define isitem(x) (((x) & VT_TYPE) == VT_ITEM)
-#define unitem(x) ((x) & (VT_ITEM -1))
-
-#define V_ITEM(x) ((x)|VT_ITEM) /* a moveable, sellable(?) commodity */
+#define V_ITEM(x) (x)
#define I_NONE 0
#define I_CIVIL 1
{
register int x, first = 1, i, j;
char *tmpstr;
- char c;
- char *outputs = " cmsgpidbfolhur";
for (x = 0; x < SCT_MAXDEF + 2; x++) {
if ((dchr[x].d_mnem == 0) || (dchr[x].d_prd == 0))
&& pchr[j].p_ctype[i] > I_NONE
&& pchr[j].p_ctype[i] <= I_MAX) {
pr("%2d %c ", pchr[j].p_camt[i],
- ichr[pchr[j].p_ctype[i] & (~VT_ITEM)].i_name[0]);
+ ichr[pchr[j].p_ctype[i]].i_name[0]);
} else {
pr(" ");
}
tmpstr = " ";
break;
}
- if (pchr[j].p_type)
- c = outputs[pchr[j].p_type - VT_ITEM];
- else
- c = ' ';
pr("%-5s %3d %3d %4d %3d %3d %c",
tmpstr,
pchr[j].p_nlmin,
pchr[j].p_nllag,
- pchr[j].p_effic, pchr[j].p_cost, pchr[j].p_nrdep, c);
+ pchr[j].p_effic, pchr[j].p_cost, pchr[j].p_nrdep,
+ pchr[j].p_type ? ichr[pchr[j].p_type].i_mnem : ' ');
pr("\n");
}
product = &pchr[dchr[desig].d_prd];
if (product == &pchr[0])
return 0;
- vtype = product->p_type;
- item = vtype & ~VT_ITEM;
+ item = product->p_type;
*amount = 0;
*cost = 0;
* Adjust produced amount by commodity production ratio
*/
output = material_consume * prodeff;
- if ((vtype == 0) && (!player->simulation)) {
+ if (item == I_NONE && !player->simulation) {
levels[sp->sct_own][product->p_level] += output;
wu((natid)0, sp->sct_own, "%s (%.2f) produced in %s\n",
product->p_name, output, ownxy(sp));