Ejemplo n.º 1
0
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;
}
Ejemplo n.º 2
0
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;
}
Ejemplo n.º 3
0
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;
}