void Gui::save(TCODZip &zip) { zip.putInt(log.size()); for (Message **it = log.begin(); it != log.end(); it++) { zip.putString((*it)->text); zip.putColor(&(*it)->col); } }
void Destructible::Save(TCODZip &zip) { //zip.putFloat(maxHp_); //zip.putFloat(hp_); zip.putFloat(defense_); zip.putString(corpseName_); }
void Actor::Save(TCODZip& zip) { zip.putInt(x); zip.putInt(y); zip.putInt(code); zip.putColor(&color); zip.putString(name); zip.putInt(blocks); zip.putInt(fovOnly); zip.putInt(destructible != nullptr); zip.putInt(ai != nullptr); zip.putInt(pickable != nullptr); zip.putInt(container != nullptr); if(destructible) { destructible->Save(zip); } if(ai) { ai->Save(zip); } if(pickable) { pickable->Save(zip); } if(container) { container->Save(zip); } }
void Destructible::save(TCODZip &zip) { zip.putFloat(maxHp); zip.putFloat(hp); zip.putFloat(defense); zip.putInt(isImmortal); zip.putString(corpseName); }
void Destructible::save(TCODZip &zip) { zip.putFloat(maxHp); zip.putFloat(hp); zip.putFloat(baseDefense); zip.putFloat(totalDefense); zip.putString(corpseName); zip.putInt(xp); }
void Actor::save(TCODZip &zip) { zip.putInt(x); zip.putInt(y); zip.putInt(ch); zip.putColor(&col); zip.putString(name); zip.putInt(blocks); zip.putInt(attacker != NULL); zip.putInt(destructible != NULL); zip.putInt(ai != NULL); zip.putInt(pickable != NULL); zip.putInt(container != NULL); if (attacker) attacker->save(zip); if (destructible) destructible->save(zip); if (ai) ai->save(zip); if (pickable) pickable->save(zip); if (container) container->save(zip); }
void Actor::Save(TCODZip &zip) { zip.putInt(x_); zip.putInt(y_); zip.putInt(ch_); zip.putColor(&col_); zip.putString(name_); zip.putInt(blocks_); zip.putInt(attacker_ != NULL); zip.putInt(destructible_ != NULL); zip.putInt(ai_ != NULL); zip.putInt(pickable_ != NULL); zip.putInt(container_ != NULL); if (attacker_ != NULL) attacker_->Save(zip); if (destructible_ != NULL) destructible_->Save(zip); if (ai_ != NULL) ai_->Save(zip); if (pickable_ != NULL) pickable_->Save(zip); if (container_ != NULL) container_->Save(zip); }
void AiChangeEffect::save(TCODZip &zip) { zip.putInt(Effect::AI_CHANGE); newAi->save(zip); zip.putColor(&color); zip.putString(message); }
void HealthEffect::save(TCODZip &zip) { zip.putInt(Effect::HEALTH); zip.putInt(amount); zip.putColor(&color); zip.putString(message); }