unsigned int BasicMonster::save(Savegame& sg) { unsigned int id; if (sg.saved(this, &id)) return id; SaveBlock store("BasicMonster", id); storeAll(sg, store); sg << store; return id; }
unsigned int Object::save(Savegame& sg) { unsigned int id; if (sg.saved(this,&id)) return id; SaveBlock store("Object", id); store ("type", (int) type) ("name", name) ("formatFlags", formatFlags); store ("symbol", sym) ("color", color) ("visible", visible); sg << store; return id; }
unsigned int Tool::save(Savegame& sg) { unsigned int id; if (sg.saved(this,&id)) return id; SaveBlock store("Tool", id); store ("name", name) ("symbol", sym) ("color", color); store ("amount", amount) ("weight", weight) ("active", active); store ("tool", tool); sg << store; return id; }