bool AdSceneState::persist(BasePersistenceManager *persistMgr) { persistMgr->transfer(TMEMBER(_filename)); _nodeStates.persist(persistMgr); return STATUS_OK; }
bool AdSentence::persist(BasePersistenceManager *persistMgr) { persistMgr->transfer(TMEMBER(_gameRef)); persistMgr->transfer(TMEMBER_INT(_align)); persistMgr->transfer(TMEMBER(_currentStance)); persistMgr->transfer(TMEMBER(_currentSprite)); persistMgr->transfer(TMEMBER(_currentSkelAnim)); persistMgr->transfer(TMEMBER(_duration)); persistMgr->transfer(TMEMBER(_font)); persistMgr->transfer(TMEMBER(_pos)); persistMgr->transfer(TMEMBER(_sound)); persistMgr->transfer(TMEMBER(_soundStarted)); persistMgr->transfer(TMEMBER(_stances)); persistMgr->transfer(TMEMBER(_startTime)); persistMgr->transfer(TMEMBER(_talkDef)); persistMgr->transfer(TMEMBER(_tempStance)); persistMgr->transfer(TMEMBER(_text)); persistMgr->transfer(TMEMBER(_width)); persistMgr->transfer(TMEMBER(_fixedPos)); persistMgr->transfer(TMEMBER(_freezable)); return STATUS_OK; }
bool AdActor::persist(BasePersistenceManager *persistMgr) { AdTalkHolder::persist(persistMgr); persistMgr->transfer(TMEMBER_INT(_dir)); persistMgr->transfer(TMEMBER(_path)); persistMgr->transfer(TMEMBER(_pFCount)); persistMgr->transfer(TMEMBER(_pFStepX)); persistMgr->transfer(TMEMBER(_pFStepY)); persistMgr->transfer(TMEMBER(_pFX)); persistMgr->transfer(TMEMBER(_pFY)); persistMgr->transfer(TMEMBER(_standSprite)); _talkSprites.persist(persistMgr); _talkSpritesEx.persist(persistMgr); persistMgr->transfer(TMEMBER_INT(_targetDir)); persistMgr->transfer(TMEMBER_INT(_afterWalkDir)); persistMgr->transfer(TMEMBER(_targetPoint)); persistMgr->transfer(TMEMBER(_turnLeftSprite)); persistMgr->transfer(TMEMBER(_turnRightSprite)); persistMgr->transfer(TMEMBER(_walkSprite)); persistMgr->transfer(TMEMBER(_animSprite2)); persistMgr->transfer(TMEMBER(_talkAnimName)); persistMgr->transfer(TMEMBER(_idleAnimName)); persistMgr->transfer(TMEMBER(_walkAnimName)); persistMgr->transfer(TMEMBER(_turnLeftAnimName)); persistMgr->transfer(TMEMBER(_turnRightAnimName)); _anims.persist(persistMgr); return STATUS_OK; }
HRESULT CBSprite::Persist(CBPersistMgr *PersistMgr) { CBScriptHolder::Persist(PersistMgr); PersistMgr->Transfer(TMEMBER(m_CanBreak)); PersistMgr->Transfer(TMEMBER(m_Changed)); PersistMgr->Transfer(TMEMBER(m_Paused)); PersistMgr->Transfer(TMEMBER(m_Continuous)); PersistMgr->Transfer(TMEMBER(m_CurrentFrame)); PersistMgr->Transfer(TMEMBER(m_EditorAllFrames)); PersistMgr->Transfer(TMEMBER(m_EditorBgAlpha)); PersistMgr->Transfer(TMEMBER(m_EditorBgFile)); PersistMgr->Transfer(TMEMBER(m_EditorBgOffsetX)); PersistMgr->Transfer(TMEMBER(m_EditorBgOffsetY)); PersistMgr->Transfer(TMEMBER(m_EditorMuted)); PersistMgr->Transfer(TMEMBER(m_Finished)); m_Frames.Persist(PersistMgr); PersistMgr->Transfer(TMEMBER(m_LastFrameTime)); PersistMgr->Transfer(TMEMBER(m_Looping)); PersistMgr->Transfer(TMEMBER(m_MoveX)); PersistMgr->Transfer(TMEMBER(m_MoveY)); PersistMgr->Transfer(TMEMBER(m_Owner)); PersistMgr->Transfer(TMEMBER(m_Precise)); PersistMgr->Transfer(TMEMBER(m_Streamed)); PersistMgr->Transfer(TMEMBER(m_StreamedKeepLoaded)); return S_OK; }
void Timer::persist(BasePersistenceManager *persistMgr) { persistMgr->transfer(TMEMBER(_timer)); persistMgr->transfer(TMEMBER(_timerDelta)); persistMgr->transfer(TMEMBER(_timerLast)); }
bool PartParticle::persist(BasePersistenceManager *persistMgr) { persistMgr->transfer(TMEMBER(_alpha1)); persistMgr->transfer(TMEMBER(_alpha2)); persistMgr->transfer(TMEMBER(_border)); persistMgr->transfer(TMEMBER(_pos)); persistMgr->transfer(TMEMBER(_posZ)); persistMgr->transfer(TMEMBER(_velocity)); persistMgr->transfer(TMEMBER(_scale)); persistMgr->transfer(TMEMBER(_creationTime)); persistMgr->transfer(TMEMBER(_lifeTime)); persistMgr->transfer(TMEMBER(_isDead)); persistMgr->transfer(TMEMBER_INT(_state)); persistMgr->transfer(TMEMBER(_fadeStart)); persistMgr->transfer(TMEMBER(_fadeTime)); persistMgr->transfer(TMEMBER(_currentAlpha)); persistMgr->transfer(TMEMBER(_angVelocity)); persistMgr->transfer(TMEMBER(_rotation)); persistMgr->transfer(TMEMBER(_growthRate)); persistMgr->transfer(TMEMBER(_exponentialGrowth)); persistMgr->transfer(TMEMBER(_fadeStartAlpha)); if (persistMgr->getIsSaving()) { const char *filename = _sprite->getFilename(); persistMgr->transfer(TMEMBER(filename)); } else { char *filename; persistMgr->transfer(TMEMBER(filename)); SystemClassRegistry::getInstance()->_disabled = true; setSprite(filename); SystemClassRegistry::getInstance()->_disabled = false; delete[] filename; filename = nullptr; } return STATUS_OK; }
bool ScScript::persist(BasePersistenceManager *persistMgr) { persistMgr->transfer(TMEMBER(_gameRef)); // buffer if (persistMgr->getIsSaving()) { if (_state != SCRIPT_PERSISTENT && _state != SCRIPT_FINISHED && _state != SCRIPT_THREAD_FINISHED) { persistMgr->transfer(TMEMBER(_bufferSize)); persistMgr->putBytes(_buffer, _bufferSize); } else { // don't save idle/finished scripts int bufferSize = 0; persistMgr->transfer(TMEMBER(bufferSize)); } } else { persistMgr->transfer(TMEMBER(_bufferSize)); if (_bufferSize > 0) { _buffer = new byte[_bufferSize]; persistMgr->getBytes(_buffer, _bufferSize); _scriptStream = new Common::MemoryReadStream(_buffer, _bufferSize); initTables(); } else { _buffer = NULL; _scriptStream = NULL; } } persistMgr->transfer(TMEMBER(_callStack)); persistMgr->transfer(TMEMBER(_currentLine)); persistMgr->transfer(TMEMBER(_engine)); persistMgr->transfer(TMEMBER(_filename)); persistMgr->transfer(TMEMBER(_freezable)); persistMgr->transfer(TMEMBER(_globals)); persistMgr->transfer(TMEMBER(_iP)); persistMgr->transfer(TMEMBER(_scopeStack)); persistMgr->transfer(TMEMBER(_stack)); persistMgr->transfer(TMEMBER_INT(_state)); persistMgr->transfer(TMEMBER(_operand)); persistMgr->transfer(TMEMBER_INT(_origState)); persistMgr->transfer(TMEMBER(_owner)); persistMgr->transfer(TMEMBER(_reg1)); persistMgr->transfer(TMEMBER(_thread)); persistMgr->transfer(TMEMBER(_threadEvent)); persistMgr->transfer(TMEMBER(_thisStack)); persistMgr->transfer(TMEMBER(_timeSlice)); persistMgr->transfer(TMEMBER(_waitObject)); persistMgr->transfer(TMEMBER(_waitScript)); persistMgr->transfer(TMEMBER(_waitTime)); persistMgr->transfer(TMEMBER(_waitFrozen)); persistMgr->transfer(TMEMBER(_methodThread)); persistMgr->transfer(TMEMBER(_methodThread)); persistMgr->transfer(TMEMBER(_unbreakable)); persistMgr->transfer(TMEMBER(_parentScript)); if (!persistMgr->getIsSaving()) { _tracingMode = false; } return STATUS_OK; }
HRESULT CUIObject::Persist(CBPersistMgr* PersistMgr){ CBObject::Persist(PersistMgr); PersistMgr->Transfer(TMEMBER(m_Back)); PersistMgr->Transfer(TMEMBER(m_CanFocus)); PersistMgr->Transfer(TMEMBER(m_Disable)); PersistMgr->Transfer(TMEMBER(m_FocusedWidget)); PersistMgr->Transfer(TMEMBER(m_Font)); PersistMgr->Transfer(TMEMBER(m_Height)); PersistMgr->Transfer(TMEMBER(m_Image)); PersistMgr->Transfer(TMEMBER(m_ListenerObject)); PersistMgr->Transfer(TMEMBER(m_ListenerParamObject)); PersistMgr->Transfer(TMEMBER(m_ListenerParamDWORD)); PersistMgr->Transfer(TMEMBER(m_Parent)); PersistMgr->Transfer(TMEMBER(m_ParentNotify)); PersistMgr->Transfer(TMEMBER(m_SharedFonts)); PersistMgr->Transfer(TMEMBER(m_SharedImages)); PersistMgr->Transfer(TMEMBER(m_Text)); PersistMgr->Transfer(TMEMBER_INT(m_Type)); PersistMgr->Transfer(TMEMBER(m_Visible)); PersistMgr->Transfer(TMEMBER(m_Width)); return S_OK; }
bool AdObject::persist(BasePersistenceManager *persistMgr) { BaseObject::persist(persistMgr); persistMgr->transferBool(TMEMBER(_active)); persistMgr->transferPtr(TMEMBER_PTR(_blockRegion)); persistMgr->transferPtr(TMEMBER_PTR(_currentBlockRegion)); persistMgr->transferPtr(TMEMBER_PTR(_currentWptGroup)); persistMgr->transferPtr(TMEMBER_PTR(_currentSprite)); persistMgr->transferBool(TMEMBER(_drawn)); persistMgr->transferPtr(TMEMBER_PTR(_font)); persistMgr->transferBool(TMEMBER(_ignoreItems)); persistMgr->transfer(TMEMBER_INT(_nextState)); persistMgr->transferPtr(TMEMBER_PTR(_sentence)); persistMgr->transfer(TMEMBER_INT(_state)); persistMgr->transferPtr(TMEMBER_PTR(_animSprite)); persistMgr->transferBool(TMEMBER(_sceneIndependent)); persistMgr->transfer(TMEMBER(_forcedTalkAnimName)); persistMgr->transferBool(TMEMBER(_forcedTalkAnimUsed)); persistMgr->transferPtr(TMEMBER_PTR(_tempSprite2)); persistMgr->transfer(TMEMBER_INT(_type)); persistMgr->transferPtr(TMEMBER_PTR(_wptGroup)); persistMgr->transferPtr(TMEMBER_PTR(_stickRegion)); persistMgr->transferBool(TMEMBER(_subtitlesModRelative)); persistMgr->transfer(TMEMBER(_subtitlesModX)); persistMgr->transfer(TMEMBER(_subtitlesModY)); persistMgr->transferBool(TMEMBER(_subtitlesModXCenter)); persistMgr->transfer(TMEMBER(_subtitlesWidth)); persistMgr->transferPtr(TMEMBER_PTR(_inventory)); persistMgr->transferPtr(TMEMBER_PTR(_partEmitter)); for (int i = 0; i < MAX_NUM_REGIONS; i++) { persistMgr->transferPtr(TMEMBER_PTR(_currentRegions[i])); } _attachmentsPre.persist(persistMgr); _attachmentsPost.persist(persistMgr); persistMgr->transferPtr(TMEMBER_PTR(_registerAlias)); persistMgr->transferBool(TMEMBER(_partFollowParent)); persistMgr->transfer(TMEMBER(_partOffsetX)); persistMgr->transfer(TMEMBER(_partOffsetY)); return STATUS_OK; }
bool ScValue::persist(BasePersistenceManager *persistMgr) { persistMgr->transferPtr(TMEMBER_PTR(_gameRef)); persistMgr->transfer(TMEMBER(_persistent)); persistMgr->transfer(TMEMBER(_isConstVar)); persistMgr->transfer(TMEMBER_INT(_type)); persistMgr->transfer(TMEMBER(_valBool)); persistMgr->transfer(TMEMBER(_valFloat)); persistMgr->transfer(TMEMBER(_valInt)); persistMgr->transferPtr(TMEMBER_PTR(_valNative)); int32 size; const char *str; if (persistMgr->getIsSaving()) { size = _valObject.size(); persistMgr->transfer("", &size); _valIter = _valObject.begin(); while (_valIter != _valObject.end()) { str = _valIter->_key.c_str(); persistMgr->transfer("", &str); persistMgr->transferPtr("", &_valIter->_value); _valIter++; } } else { ScValue *val = nullptr; persistMgr->transfer("", &size); for (int i = 0; i < size; i++) { persistMgr->transfer("", &str); persistMgr->transferPtr("", &val); _valObject[str] = val; delete[] str; } } persistMgr->transferPtr(TMEMBER_PTR(_valRef)); persistMgr->transfer(TMEMBER(_valString)); /* // TODO: Convert to Debug-statements. FILE* f = fopen("c:\\val.log", "a+"); switch(_type) { case VAL_STRING: fprintf(f, "str %s\n", _valString); break; case VAL_INT: fprintf(f, "int %d\n", _valInt); break; case VAL_BOOL: fprintf(f, "bool %d\n", _valBool); break; case VAL_NULL: fprintf(f, "null\n"); break; case VAL_NATIVE: fprintf(f, "native\n"); break; case VAL_VARIABLE_REF: fprintf(f, "ref\n"); break; case VAL_OBJECT: fprintf(f, "obj\n"); break; case VAL_FLOAT: fprintf(f, "float\n"); break; } fclose(f); */ return STATUS_OK; }
HRESULT CAdActor::Persist(CBPersistMgr *PersistMgr) { CAdTalkHolder::Persist(PersistMgr); PersistMgr->Transfer(TMEMBER_INT(m_Dir)); PersistMgr->Transfer(TMEMBER(m_Path)); PersistMgr->Transfer(TMEMBER(m_PFCount)); PersistMgr->Transfer(TMEMBER(m_PFStepX)); PersistMgr->Transfer(TMEMBER(m_PFStepY)); PersistMgr->Transfer(TMEMBER(m_PFX)); PersistMgr->Transfer(TMEMBER(m_PFY)); PersistMgr->Transfer(TMEMBER(m_StandSprite)); m_TalkSprites.Persist(PersistMgr); m_TalkSpritesEx.Persist(PersistMgr); PersistMgr->Transfer(TMEMBER_INT(m_TargetDir)); PersistMgr->Transfer(TMEMBER_INT(m_AfterWalkDir)); PersistMgr->Transfer(TMEMBER(m_TargetPoint)); PersistMgr->Transfer(TMEMBER(m_TurnLeftSprite)); PersistMgr->Transfer(TMEMBER(m_TurnRightSprite)); PersistMgr->Transfer(TMEMBER(m_WalkSprite)); if(PersistMgr->CheckVersion(1, 7, 92)) { PersistMgr->Transfer(TMEMBER(m_AnimSprite2)); PersistMgr->Transfer(TMEMBER(m_TalkAnimName)); PersistMgr->Transfer(TMEMBER(m_IdleAnimName)); PersistMgr->Transfer(TMEMBER(m_WalkAnimName)); PersistMgr->Transfer(TMEMBER(m_TurnLeftAnimName)); PersistMgr->Transfer(TMEMBER(m_TurnRightAnimName)); m_Anims.Persist(PersistMgr); } else { if(!PersistMgr->m_Saving) { SetDefaultAnimNames(); m_AnimSprite2 = NULL; } } return S_OK; }
HRESULT CAdInventoryBox::Persist(CBPersistMgr* PersistMgr) { CBObject::Persist(PersistMgr); PersistMgr->Transfer(TMEMBER(m_CloseButton)); PersistMgr->Transfer(TMEMBER(m_HideSelected)); PersistMgr->Transfer(TMEMBER(m_ItemHeight)); PersistMgr->Transfer(TMEMBER(m_ItemsArea)); PersistMgr->Transfer(TMEMBER(m_ItemWidth)); PersistMgr->Transfer(TMEMBER(m_ScrollBy)); PersistMgr->Transfer(TMEMBER(m_ScrollOffset)); PersistMgr->Transfer(TMEMBER(m_Spacing)); PersistMgr->Transfer(TMEMBER(m_Visible)); PersistMgr->Transfer(TMEMBER(m_Window)); PersistMgr->Transfer(TMEMBER(m_Exclusive)); return S_OK; }