本文整理汇总了C++中Costume::saveState方法的典型用法代码示例。如果您正苦于以下问题:C++ Costume::saveState方法的具体用法?C++ Costume::saveState怎么用?C++ Costume::saveState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Costume
的用法示例。
在下文中一共展示了Costume::saveState方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: saveState
void Actor::saveState(SaveGame *savedState) const {
// store actor name
savedState->writeString(_name);
savedState->writeString(_setName);
savedState->writeColor(_talkColor);
savedState->writeVector3d(_pos);
savedState->writeFloat(_pitch.getDegrees());
savedState->writeFloat(_yaw.getDegrees());
savedState->writeFloat(_roll.getDegrees());
savedState->writeFloat(_walkRate);
savedState->writeFloat(_turnRate);
savedState->writeBool(_constrain);
savedState->writeFloat(_reflectionAngle);
savedState->writeBool(_visible);
savedState->writeBool(_lookingMode),
savedState->writeFloat(_scale);
savedState->writeFloat(_timeScale);
savedState->writeBool(_puckOrient);
savedState->writeString(_talkSoundName);
savedState->writeBool(_talking);
savedState->writeBool(_backgroundTalk);
savedState->writeLEUint32((uint32)_collisionMode);
savedState->writeFloat(_collisionScale);
if (_lipSync) {
savedState->writeBool(true);
savedState->writeString(_lipSync->getFilename());
} else {
savedState->writeBool(false);
}
savedState->writeLEUint32(_costumeStack.size());
for (Common::List<Costume *>::const_iterator i = _costumeStack.begin(); i != _costumeStack.end(); ++i) {
Costume *c = *i;
savedState->writeString(c->getFilename());
Costume *pc = c->getPreviousCostume();
int depth = 0;
while (pc) {
++depth;
pc = pc->getPreviousCostume();
}
savedState->writeLESint32(depth);
pc = c->getPreviousCostume();
for (int j = 0; j < depth; ++j) { //save the previousCostume hierarchy
savedState->writeString(pc->getFilename());
pc = pc->getPreviousCostume();
}
c->saveState(savedState);
}
savedState->writeBool(_turning);
savedState->writeFloat(_moveYaw.getDegrees());
savedState->writeBool(_walking);
savedState->writeVector3d(_destPos);
_restChore.saveState(savedState);
_walkChore.saveState(savedState);
savedState->writeBool(_walkedLast);
savedState->writeBool(_walkedCur);
_leftTurnChore.saveState(savedState);
_rightTurnChore.saveState(savedState);
savedState->writeLESint32(_lastTurnDir);
savedState->writeLESint32(_currTurnDir);
for (int i = 0; i < 10; ++i) {
_talkChore[i].saveState(savedState);
}
savedState->writeLESint32(_talkAnim);
_mumbleChore.saveState(savedState);
for (int i = 0; i < MAX_SHADOWS; ++i) {
Shadow &shadow = _shadowArray[i];
savedState->writeString(shadow.name);
savedState->writeVector3d(shadow.pos);
savedState->writeLEUint32(shadow.planeList.size());
// Cannot use g_grim->getCurrSet() here because an actor can have walk planes
// from other scenes. It happens e.g. when Membrillo calls Velasco to tell him
// Naranja is dead.
for (SectorListType::iterator j = shadow.planeList.begin(); j != shadow.planeList.end(); ++j) {
Plane &p = *j;
savedState->writeString(p.setName);
savedState->writeString(p.sector->getName());
}
savedState->writeLESint32(shadow.shadowMaskSize);
savedState->write(shadow.shadowMask, shadow.shadowMaskSize);
savedState->writeBool(shadow.active);
savedState->writeBool(shadow.dontNegate);
}
//.........这里部分代码省略.........