本文整理汇总了C++中TCODZip::putInt方法的典型用法代码示例。如果您正苦于以下问题:C++ TCODZip::putInt方法的具体用法?C++ TCODZip::putInt怎么用?C++ TCODZip::putInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TCODZip
的用法示例。
在下文中一共展示了TCODZip::putInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Save
void Map::Save(TCODZip &zip)
{
zip.putInt(seed_);
for (int32_t i = 0; i < width_ * height_; i++) {
zip.putInt(tiles_[i].explored_);
}
}
示例2: save
void Aura::save(TCODZip &zip) {
zip.putInt(stat);
zip.putInt(totalDuration);
zip.putInt(duration);
zip.putInt(bonus);
zip.putInt(life);
}
示例3: save
void Healer::save(TCODZip &zip) {
zip.putInt(type);
zip.putFloat(amount);
zip.putInt(stacks);
zip.putInt(stackSize);
zip.putInt(value);
}
示例4:
void
Engine::Save() {
if(player->destructible->IsDead()) {
TCODSystem::deleteFile("game.sav");
}
else {
TCODZip zip;
zip.putInt(SAVEGAME_VERSION);
zip.putInt(map->width);
zip.putInt(map->height);
map->Save(zip);
player->Save(zip);
zip.putInt(allActors.size() - 2);
for(Actor** it = allActors.begin(); it != allActors.end(); ++it) {
if(*it != player) {
(*it)->Save(zip);
}
}
gui->Save(zip);
zip.saveToFile("game.sav");
}
}
示例5: save
void Engine::save()
{
if (player->destructible->isDead())
{
TCODSystem::deleteFile("game.sav");
}
else
{
TCODZip zip;
//save the map first
zip.putInt(map->width);
zip.putInt(map->height);
map->save(zip);
//then the player
player->save(zip);
//then the stairs
stairs->save(zip);
//then all the other actors
zip.putInt(map->actors.size()-2);
for (Actor **i=map->actors.begin(); i!=map->actors.end(); i++)
{
if (*i!=player && *i!=stairs)
{
(*i)->save(zip);
}
}
// finally the message log
topGui->save(zip);
zip.saveToFile("game.sav");
}
}
示例6: save
void ConfusedMonsterAi::save(TCODZip &zip)
{
zip.putInt(CONFUSED_MONSTER);
zip.putInt(nbTurns);
oldAi->save(zip);
zip.putColor(&oldColor);
}
示例7: save
void Destructible::save(TCODZip &zip) {
zip.putFloat(maxHp);
zip.putFloat(hp);
zip.putFloat(defense);
zip.putString(corpseName);
zip.putInt(maxAp);
zip.putInt(ap);
}
示例8: save
void Pickable::save(TCODZip &zip){
zip.putInt(selector != NULL);
zip.putInt(effect != NULL);
if(selector)
selector->save(zip);
if(effect)
effect->save(zip);
}
示例9: Save
void clBuilding::Save(TCODZip &file)
{
file.putChar(CL_BUILDING);
file.putInt(mytile->GetSave()->num);
file.putInt(t->GetBuildingID());
file.putInt(mypic);
file.putInt(data);
file.putInt(mat->ID);
}
示例10: save
void Map::save(TCODZip &zip, NodeType type){
zip.putInt(seed);
for(int i = 0; i < width * height; i++){
zip.putInt(tiles[i].explored);
//zip.putInt(tiles[i].walkable);
//zip.putInt(tiles[i].inFOV);
}
zip.putInt(actors.size());
for(Actor **it = actors.begin(); it != actors.end(); it++){
(*it)->save(zip);
}
zip.putInt(nextLevel != NULL);
zip.putInt(prevLevel != NULL);
if(nextLevel && (type == ROOT || type == BELOW_ROOT)){
zip.putInt(nextLevel->width);
zip.putInt(nextLevel->height);
nextLevel->save(zip, BELOW_ROOT);
}
if(prevLevel && (type == ROOT || type == ABOVE_ROOT)){
zip.putInt(prevLevel->width);
zip.putInt(prevLevel->height);
prevLevel->save(zip, ABOVE_ROOT);
}
}
示例11: save
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);
}
}
示例12: save
void Destructible::save(TCODZip &zip) {
zip.putFloat(maxHp);
zip.putFloat(hp);
zip.putFloat(baseDefense);
zip.putFloat(totalDefense);
zip.putString(corpseName);
zip.putInt(xp);
}
示例13: save
void Engine::save() {
if (player->destructible->isDead() ){
TCODSystem::deleteFile("game.sav");
}else {
TCODZip zip;
//save the map
zip.putInt(map->width);
zip.putInt(map->height);
map->save(zip);
//then the player
player->save(zip);
//All the other actors
zip.putInt(actors.size()-1);
for (Actor **iterator=actors.begin(); iterator!=actors.end();
iterator++){
if(*iterator != player){
(*iterator)->save(zip);
}
}
//Save the logs
gui->save(zip);
zip.saveToFile("game.sav");
}
}
示例14: save
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);
}
示例15: save
void LightningBolt::save(TCODZip &zip)
{
zip.putInt(LIGHTNING_BOLT);
zip.putFloat(range);
zip.putFloat(damage);
}