static void gate_write(const trigger * t, struct storage *store) { gate_data *gd = (gate_data *) t->data.v; building *b = gd->gate; region *r = gd->target; write_building_reference(b, store); write_region_reference(r, store); }
static void object_write(const attrib * a, const void *owner, struct storage *store) { const object_data *data = (object_data *) a->data.v; int type = (int)data->type; WRITE_TOK(store, data->name); WRITE_INT(store, type); switch (data->type) { case TINTEGER: WRITE_INT(store, data->data.i); break; case TREAL: WRITE_FLT(store, (float)data->data.real); break; case TSTRING: WRITE_STR(store, data->data.str); break; case TUNIT: write_unit_reference(data->data.u, store); break; case TFACTION: write_faction_reference(data->data.f, store); break; case TBUILDING: write_building_reference(data->data.b, store); break; case TSHIP: /* write_ship_reference(data->data.sh, store); */ assert(!"not implemented"); break; case TREGION: write_region_reference(data->data.r, store); break; case TNONE: break; default: assert(!"illegal type in object-attribute"); } }
static void caldera_write(const trigger * t, struct storage *store) { building *b = (building *) t->data.v; write_building_reference(b, store); }
static void wormhole_write(const struct attrib *a, const void *owner, struct storage *store) { wormhole_data *data = (wormhole_data *)a->data.v; write_building_reference(data->entry, store); write_region_reference(data->exit, store); }
void a_writesiege(const attrib * a, const void *owner, struct storage *store) { struct building *b = (struct building *)a->data.v; write_building_reference(b, store); }
static void unguard_write(const trigger * t, struct storage *store) { write_building_reference((building *)t->data.v, store); }